mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Update Intel compiler flags. Allow CC to be set in run_tests.py
This commit is contained in:
parent
ede81f95e9
commit
195f81cacb
2 changed files with 11 additions and 5 deletions
|
|
@ -147,8 +147,7 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
|||
if(debug)
|
||||
list(APPEND f90flags -g -warn -ftrapuv -fp-stack-check
|
||||
"-check all" -fpe0)
|
||||
list(APPEND cflags -g -warn -ftrapuv -fp-stack-check
|
||||
"-check all" -fpe0)
|
||||
list(APPEND cflags -g -w3 -ftrapuv -fp-stack-check)
|
||||
list(APPEND ldflags -g)
|
||||
endif()
|
||||
if(profile)
|
||||
|
|
@ -161,9 +160,9 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
|||
list(APPEND cflags -O3)
|
||||
endif()
|
||||
if(openmp)
|
||||
list(APPEND f90flags -openmp)
|
||||
list(APPEND cflags -openmp)
|
||||
list(APPEND ldflags -openmp)
|
||||
list(APPEND f90flags -qopenmp)
|
||||
list(APPEND cflags -qopenmp)
|
||||
list(APPEND ldflags -qopenmp)
|
||||
endif()
|
||||
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL PGI)
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ parser.add_option("-s", "--script", action="store_true", dest="script",
|
|||
|
||||
# Default compiler paths
|
||||
FC='gfortran'
|
||||
CC='gcc'
|
||||
MPI_DIR='/opt/mpich/3.2-gnu'
|
||||
HDF5_DIR='/opt/hdf5/1.8.16-gnu'
|
||||
PHDF5_DIR='/opt/phdf5/1.8.16-gnu'
|
||||
|
|
@ -52,6 +53,8 @@ script_mode = False
|
|||
# Override default compiler paths if environmental vars are found
|
||||
if 'FC' in os.environ:
|
||||
FC = os.environ['FC']
|
||||
if 'CC' in os.environ:
|
||||
CC = os.environ['CC']
|
||||
if 'MPI_DIR' in os.environ:
|
||||
MPI_DIR = os.environ['MPI_DIR']
|
||||
if 'HDF5_DIR' in os.environ:
|
||||
|
|
@ -158,8 +161,10 @@ class Test(object):
|
|||
self.fc = os.path.join(MPI_DIR, 'bin', 'mpifort')
|
||||
else:
|
||||
self.fc = os.path.join(MPI_DIR, 'bin', 'mpif90')
|
||||
self.cc = os.path.join(MPI_DIR, 'bin', 'mpicc')
|
||||
else:
|
||||
self.fc = FC
|
||||
self.cc = CC
|
||||
|
||||
# Sets the build name that will show up on the CDash
|
||||
def get_build_name(self):
|
||||
|
|
@ -189,6 +194,7 @@ class Test(object):
|
|||
# Runs the ctest script which performs all the cmake/ctest/cdash
|
||||
def run_ctest_script(self):
|
||||
os.environ['FC'] = self.fc
|
||||
os.environ['CC'] = self.cc
|
||||
if self.mpi:
|
||||
os.environ['MPI_DIR'] = MPI_DIR
|
||||
if self.phdf5:
|
||||
|
|
@ -203,6 +209,7 @@ class Test(object):
|
|||
# Runs cmake when in non-script mode
|
||||
def run_cmake(self):
|
||||
os.environ['FC'] = self.fc
|
||||
os.environ['CC'] = self.cc
|
||||
if self.mpi:
|
||||
os.environ['MPI_DIR'] = MPI_DIR
|
||||
if self.phdf5:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue