Skip to content

Commit

Permalink
Removed coarray fortran stuff from the cmake script, as it is a lefto…
Browse files Browse the repository at this point in the history
…ver from the Swiftest project
  • Loading branch information
daminton committed Jun 10, 2024
1 parent 2a51b1a commit 32ca9b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ELSE ()
ENDIF ()

# Set some options the user may choose
OPTION(USE_COARRAY "Use Coarray Fortran for parallelization of test particles" OFF)
OPTION(USE_OPENMP "Use OpenMP for parallelization" ON)
OPTION(USE_SIMD "Use SIMD vectorization" ON)
OPTION(BUILD_SHARED_LIBS "Build using shared libraries" ON)
Expand Down
15 changes: 3 additions & 12 deletions cmake/Modules/SetParallelizationLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,11 @@ IF (USE_OPENMP)
ENDIF (NOT OpenMP_Fortran_FLAGS)
ENDIF (USE_OPENMP)

IF (USE_COARRAY)
IF (NOT Coarray_Fortran_FLAGS)
FIND_PACKAGE (Coarray_Fortran)
IF (NOT Coarray_Fortran_FLAGS)
MESSAGE (FATAL_ERROR "Fortran compiler does not support Coarrays")
ENDIF (NOT Coarray_Fortran_FLAGS)
ENDIF (NOT Coarray_Fortran_FLAGS)
ENDIF (USE_COARRAY)

IF (NOT USE_OPENMP AND NOT USE_COARRAY)
# Turn off both OpenMP and CAF
IF (NOT USE_OPENMP)
# Turn off OpenMP
SET (OMP_NUM_PROCS 0 CACHE
STRING "Number of processors OpenMP may use" FORCE)
UNSET (OpenMP_Fortran_FLAGS CACHE)
UNSET (Coarray_Fortran_FLAGS CACHE)
UNSET (GOMP_Fortran_LINK_FLAGS CACHE)
ENDIF (NOT USE_OPENMP AND NOT USE_COARRAY)
ENDIF ()

0 comments on commit 32ca9b5

Please sign in to comment.