File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 6363# Default to "mpif90" Fortran compiler if environment variable CAFC is empty or unset:
6464CAFC=${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
6767max_arguments=100
6868link_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
8284elif [[ $1 == '-h' || $1 == '--help' ]]; then
8385 # Print usage information
8486 usage | less
Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ elif [[ $1 == '-v' || $1 == '-V' || $1 == '--version' ]]; then
3939 echo "the file named LICENSE."
4040 echo ""
4141elif [[ $1 == '-w' || $1 == '--wraps' ]]; then
42- mpirun -v
42+ "${CAFRUN}" -v
4343elif [[ $1 == '-h' || $1 == '--help' ]]; then
4444 usage
4545else
46- mpirun "$@"
46+ "${CAFRUN}" "$@"
4747fi
Original file line number Diff line number Diff line change 8484endif ()
8585
8686if ( DEFINED ENV{FC} )
87- file (APPEND "${compiler_wrapper} " "CAFC=$ENV{FC } \n " )
87+ file (APPEND "${compiler_wrapper} " "CAFC=${MPI_Fortran_COMPILER } \n " )
8888endif ()
8989
9090if ("${CMAKE_SYSTEM_NAME} " MATCHES "Linux" )
@@ -103,6 +103,7 @@ install(
103103file (READ ${CMAKE_CURRENT_SOURCE_DIR} /../extensions/cafrun-head CAFRUN_HEADER)
104104file (WRITE "${caf_launcher} " "${CAFRUN_HEADER} \n " )
105105file (APPEND "${caf_launcher} " "caf_version=${PROJECT_VERSION} \n " )
106+ file (APPEND "${caf_launcher} " "CAFRUN=${MPIEXEC} \n " )
106107
107108file (READ ${CMAKE_CURRENT_SOURCE_DIR} /../extensions/cafrun-foot FOOTER)
108109file (APPEND "${caf_launcher} " "${FOOTER} " )
You can’t perform that action at this time.
0 commit comments