Skip to content

Commit 8002142

Browse files
committed
Add -march=native everywhere.
1 parent b292013 commit 8002142

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyop2/compilation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class LinuxCompiler(Compiler):
393393
:kwarg comm: Optional communicator to compile the code on (only
394394
rank 0 compiles code) (defaults to COMM_WORLD)."""
395395
def __init__(self, cppargs=[], ldargs=[], cpp=False, comm=None):
396-
opt_flags = ['-O3', '-ffast-math', '-fopenmp-simd']
396+
opt_flags = ['-march=native', '-O3', '-ffast-math', '-fopenmp-simd']
397397
if configuration['debug']:
398398
opt_flags = ['-O0', '-g']
399399
cc = "mpicc"
@@ -419,7 +419,7 @@ class LinuxIntelCompiler(Compiler):
419419
rank 0 compiles code) (defaults to COMM_WORLD).
420420
"""
421421
def __init__(self, cppargs=[], ldargs=[], cpp=False, comm=None):
422-
opt_flags = ['-Ofast', '-xHost', '-qopenmp-simd']
422+
opt_flags = ['-march=native', '-Ofast', '-xHost', '-qopenmp-simd']
423423
if configuration['debug']:
424424
opt_flags = ['-O0', '-g']
425425
cc = "mpicc"

0 commit comments

Comments
 (0)