Skip to content

Commit bb9ea64

Browse files
author
Damian Rouson
committed
Edit caf/cafrun for FC=gfortran instead of mpif90
1 parent 89bd04f commit bb9ea64

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/extensions/caf-foot

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fi
6363
# Default to "mpif90" Fortran compiler if environment variable CAFC is empty or unset:
6464
CAFC=${CAFC:-mpif90}
6565

66-
# TODO -- improve the syntax of the "set" command below to accepted an unlimited number of arguments
66+
# TODO -- refactor this script to use the bash3boilerplate use case
6767
max_arguments=100
6868
link_args="-fcoarray=lib -lcaf_mpi"
6969

@@ -77,8 +77,10 @@ if [[ $1 == '-v' || $1 == '-V' || $1 == '--version' ]]; then
7777
echo "BSD 3-Clause License. For more information about these matters, see"
7878
echo "the file named LICENSE."
7979
echo ""
80-
elif [[ $1 == '-w' || $1 == '--wrapping' || $1 == '--wraps' ]]; then
80+
elif [[ $1 == '-w' || $1 == '--wraps' ]]; then
8181
echo "caf wraps CAFC=$CAFC"
82+
elif [[ $1 == '-s' || $1 == '--show' ]]; then
83+
$CAFC -show
8284
elif [[ $1 == '-h' || $1 == '--help' ]]; then
8385
# Print usage information
8486
usage | less

src/extensions/cafrun-foot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ elif [[ $1 == '-v' || $1 == '-V' || $1 == '--version' ]]; then
3939
echo "the file named LICENSE."
4040
echo ""
4141
elif [[ $1 == '-w' || $1 == '--wraps' ]]; then
42-
mpirun -v
42+
"${CAFRUN}"-v
4343
elif [[ $1 == '-h' || $1 == '--help' ]]; then
4444
usage
4545
else
46-
mpirun "$@"
46+
"${CAFRUN}" "$@"
4747
fi

src/mpi/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ else()
8484
endif()
8585

8686
if ( DEFINED ENV{FC} )
87-
file(APPEND "${compiler_wrapper}" "CAFC=$ENV{FC}\n")
87+
file(APPEND "${compiler_wrapper}" "CAFC=${MPI_Fortran_COMPILER}\n")
8888
endif ()
8989

9090
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
@@ -103,6 +103,7 @@ install(
103103
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/cafrun-head CAFRUN_HEADER)
104104
file(WRITE "${caf_launcher}" "${CAFRUN_HEADER}\n")
105105
file(APPEND "${caf_launcher}" "caf_version=${PROJECT_VERSION}\n")
106+
file(APPEND "${caf_launcher}" "CAFRUN=${MPIEXEC}\n")
106107

107108
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/cafrun-foot FOOTER)
108109
file(APPEND "${caf_launcher}" "${FOOTER}")

0 commit comments

Comments
 (0)