Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libsharp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Reinecke
libsharp
Commits
e231a0e1
Commit
e231a0e1
authored
6 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
better documentation
parent
90d2444b
No related branches found
Branches containing commit
No related tags found
1 merge request
!17
Multiarch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
COMPILE
+13
-13
13 additions, 13 deletions
COMPILE
with
13 additions
and
13 deletions
COMPILE
+
13
−
13
View file @
e231a0e1
...
@@ -28,14 +28,14 @@ to the C99 standard, you should still be able to compile libsharp with
...
@@ -28,14 +28,14 @@ to the C99 standard, you should still be able to compile libsharp with
Runtime CPU selection with gcc
Runtime CPU selection with gcc
------------------------------
------------------------------
When using a recent gcc (6.0 and newer) o
n
a
n x86_64 platform, the buil
d
When using a recent gcc (6.0 and newer) o
r
a
recent clang (successfully teste
d
machinery will compile the time-critical functions for several different
with versions 6 and 7) on an x86_64 platform, the build machinery can compile
architectures (SSE2, AVX, AVX2, FMA3, FMA4, AVX512F), and the appropriate
the time-critical functions for several different architectures (SSE2, AVX,
implementation will be selected
at runtime.
AVX2, FMA3, FMA4, AVX512F), and the appropriate
implementation will be selected
This only happens if you do _not_ explicitly specify a target architecture via
at runtime.
the compiler flags. I.e., please do _not_ specify "-march=native" or
This is enabled by passing "-DMULTIARCH" as part of the CFLAGS.
"-mtarget=avx" or similar if you want a portable binary that will run
If this is enabled, please do _not_ specify "-march=native" or
efficiently on different x86_64 CPUs.
"-mtarget=avx" or similar!
If you are compiling libsharp for a particular target CPU only, or if you are
If you are compiling libsharp for a particular target CPU only, or if you are
using a different compiler, however, "-march-native" should be used. The
using a different compiler, however, "-march-native" should be used. The
resulting binary will most likely not run on other computers, though.
resulting binary will most likely not run on other computers, though.
...
@@ -65,16 +65,16 @@ Example configure invocations
...
@@ -65,16 +65,16 @@ Example configure invocations
=============================
=============================
GCC, OpenMP, portable binary:
GCC, OpenMP, portable binary:
CFLAGS="-std=c99 -O3 -ffast-math -fopenmp" ./configure
CFLAGS="
-DMULTIARCH
-std=c99 -O3 -ffast-math -fopenmp" ./configure
GCC, no OpenMP, portable binary:
GCC, no OpenMP, portable binary:
CFLAGS="-std=c99 -O3 -ffast-math" ./configure
CFLAGS="
-DMULTIARCH
-std=c99 -O3 -ffast-math" ./configure
Clang, OpenMP,
non
portable binary:
Clang, OpenMP, portable binary:
CC=clang CFLAGS="-
std=c99 -O3 -march=native
-ffast-math -fopenmp" ./configure
CC=clang CFLAGS="-
DMULTIARCH -std=c99 -O3
-ffast-math -fopenmp" ./configure
Intel C compiler, OpenMP, nonportable binary:
Intel C compiler, OpenMP, nonportable binary:
CC=icc CFLAGS="-std=c99 -O3 -march=native -ffast-math -fopenmp" ./configure
CC=icc CFLAGS="-std=c99 -O3 -march=native -ffast-math -fopenmp
-D__PURE_INTEL_C99_HEADERS__
" ./configure
MPI support, nonportable binary:
MPI support, nonportable binary:
CC=mpicc CFLAGS="-DUSE_MPI -std=c99 -O3 -march=native -ffast-math" ./configure
CC=mpicc CFLAGS="-DUSE_MPI -std=c99 -O3 -march=native -ffast-math" ./configure
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment