Skip to content

Commit cbcdbb5

Browse files
committed
Replace mpif90mpifort, mpirunmpiexec
Closes #378 (cherry picked from commit 19baa86b31dcfdea18afc7845668899694223c3c)
1 parent ca372db commit cbcdbb5

File tree

19 files changed

+35
-42
lines changed

19 files changed

+35
-42
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
8181
"in a manner such as\n"
8282
" $ mkdir build-opencarrays\n"
8383
" $ cd build-opencoarrays\n"
84-
" $ CC=mpicc FC=mpif90 cmake <path-to-opencoarrays-source-directory> -DCMAKE_INSTALL_PREFIX=<path-to-install-directory>\n"
84+
" $ CC=gcc FC=gfortran cmake -DBUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/dir /path/to/opencoarrays/src/dir \n"
8585
"\nsubstituting the appropriate syntax for your shell (the above line assumes the bash shell)."
8686
)
8787
endif()
@@ -188,7 +188,7 @@ endif()
188188
# Find MPI and set some flags so that FC and CC can point to gfortran and gcc
189189
#----------------------------------------------------------------------------
190190

191-
# If the user passes FC=mpif90 etc. check and prefer that location
191+
# If the user passes FC=mpifort etc. check and prefer that location
192192
get_filename_component( FTN_COMPILER_NAME "${CMAKE_Fortran_COMPILER}"
193193
NAME )
194194
get_filename_component( C_COMPILER_NAME "${CMAKE_C_COMPILER}"

GETTING_STARTED.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ If the `caf` compiler wrapper cannot process the source code in question, invoke
107107
the underlying communication library directly:
108108

109109
```bash
110-
mpif90 -fcoarray=lib -L/opt/opencoarrays/ tally.f90 \ -lcaf_mpi -o htally -I<OpenCoarrays-install-path>/mod
110+
mpifort -fcoarray=lib -L/opt/opencoarrays/ tally.f90 \ -lcaf_mpi -o htally -I<OpenCoarrays-install-path>/mod
111111
```
112112

113113
and also run the program with the lower-level communication library:
114114

115115
```bash
116-
mpirun -np <number-of-images> ./tally
116+
mpiexec -np <number-of-images> ./tally
117117
```
118118

119119
---

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ OpenCoarrays provides a compiler wrapper (named `caf`), a runtime
4646
library (named `libcaf_mpi.a` by default), and an executable file
4747
launcher (named `cafrun`). With OpenCoarrays-aware compilers, the
4848
compiler wrapper passes the provided source code to the chosen
49-
compiler (`mpif90` by default). For non-OpenCoarrays-aware compilers,
49+
compiler (`mpifort` by default). For non-OpenCoarrays-aware compilers,
5050
the wrapper transforms CAF syntax into OpenCoarrays procedure calls
5151
before invoking the chosen compiler on the transformed code. The
5252
runtime library supports compiler communication and synchronization
5353
requests by invoking a lower-level communication library--the Message
5454
Passing Interface ([MPI]) by default. The launcher passes execution
5555
to the chosen communication library's parallel program launcher
56-
(`mpirun` by default).
56+
(`mpiexec` by default).
5757

5858
OpenCoarrays defines an application binary interface ([ABI]) that
5959
translates high-level communication and synchronization requests into

developer-scripts/patched-trunk-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ echo "Building MPICH with the patched compilers."
179179

180180
# Verify that MPICH installed where expected
181181
mpich_install_path=$(./install.sh -P mpich)
182-
if ! type "${mpich_install_path}"/bin/mpif90; then
182+
if ! type "${mpich_install_path}"/bin/mpifort; then
183183
echo "MPICH is not installed in the expected location ${mpich_install_path}."
184184
exit 1
185185
fi

prerequisites/install-functions/find_or_install.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ find_or_install()
88
package_executable_array=(
99
"gcc:gfortran"
1010
"cmake:cmake"
11-
"mpich:mpif90"
11+
"mpich:mpifort"
1212
"flex:flex"
1313
"bison:yacc"
1414
"m4:m4"
@@ -121,11 +121,11 @@ find_or_install()
121121
# MPIFC, MPICC, and MPICXX environment variables. Every branch must also manage the
122122
# dependency stack.
123123

124-
# If the user specified a Fortran compiler, verify that mpif90 wraps the specified compiler
124+
# If the user specified a Fortran compiler, verify that mpifort wraps the specified compiler
125125
if [[ ! -z "${arg_M:-}" ]]; then
126126

127127
echo -e "$this_script: Using the $package specified by -M or --with-mpi: ${arg_M}\n"
128-
export MPIFC="${arg_M}"/bin/mpif90
128+
export MPIFC="${arg_M}"/bin/mpifort
129129
export MPICC="${arg_M}"/bin/mpicc
130130
export MPICXX="${arg_M}"/bin/mpicxx
131131
# Halt the recursion
@@ -136,7 +136,7 @@ find_or_install()
136136
elif [[ "$script_installed_package" == true ]]; then
137137

138138
echo -e "$this_script: Using the $package installed by $this_script\n"
139-
export MPIFC=$package_install_path/bin/mpif90
139+
export MPIFC=$package_install_path/bin/mpifort
140140
export MPICC=$package_install_path/bin/mpicc
141141
export MPICXX=$package_install_path/bin/mpicxx
142142
# Halt the recursion
@@ -147,8 +147,8 @@ find_or_install()
147147
elif [[ "$package_in_path" == "true" ]]; then
148148

149149
echo -e "$this_script: Checking whether $executable in PATH wraps gfortran... "
150-
mpif90_version_header=$(mpif90 --version | head -1)
151-
first_three_characters=$(echo "$mpif90_version_header" | cut -c1-3)
150+
mpifort_version_header=$(mpifort --version | head -1)
151+
first_three_characters=$(echo "$mpifort_version_header" | cut -c1-3)
152152
if [[ "$first_three_characters" != "GNU" ]]; then
153153
printf "no.\n"
154154
# Trigger 'find_or_install gcc' and subsequent build of $package
@@ -162,7 +162,7 @@ find_or_install()
162162

163163
info "-f (or --with-fortran) argument detected with value ${arg_f}"
164164
printf "yes.\n %s: Using the specified %s.\n" "$this_script" "$executable"
165-
export MPIFC=mpif90
165+
export MPIFC=mpifort
166166
export MPICC=mpicc
167167
export MPICXX=mpicxx
168168

@@ -185,7 +185,7 @@ find_or_install()
185185
fi
186186
if [[ "$acceptable" == "${is_true:-}" ]]; then
187187
printf "yes.\n %s: Using the $executable found in the PATH.\n" "$this_script"
188-
export MPIFC=mpif90
188+
export MPIFC=mpifort
189189
export MPICC=mpicc
190190
export MPICXX=mpicxx
191191

@@ -637,8 +637,8 @@ find_or_install()
637637
export LD_LIBRARY_PATH="$gfortran_lib_paths:$LD_LIBRARY_PATH"
638638
fi
639639
elif [[ $package == "mpich" ]]; then
640-
echo "$this_script: export MPIFC=$package_install_path/bin/mpif90"
641-
export MPIFC="$package_install_path/bin/mpif90"
640+
echo "$this_script: export MPIFC=$package_install_path/bin/mpifort"
641+
export MPIFC="$package_install_path/bin/mpifort"
642642
echo "$this_script: export MPICC= $package_install_path/bin/mpicc"
643643
export MPICC="$package_install_path/bin/mpicc"
644644
echo "$this_script: export MPICXX=$package_install_path/bin/mpicxx"

src/extensions/caf-foot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ usage()
2929
echo " * be the only Fortran source file in the argument list,"
3030
echo " * have a name of the form *.f90, *.F90, *.f, or *.F. "
3131
echo " c. The environment variable 'CAFC' must be empty or point to a Fortran compiler/linker. "
32-
echo " d. If 'CAFC' is empty, a default value of 'mpif90' is used. "
32+
echo " d. If 'CAFC' is empty, a default value of 'mpifort' is used. "
3333
echo ""
3434
echo " 2. With non-OCA CAF compilers (Intel or Cray),"
3535
echo " a. Observe restrictions 1a-d above."
@@ -60,8 +60,8 @@ if [ $# == 0 ]; then
6060
exit 1
6161
fi
6262

63-
# Default to "mpif90" Fortran compiler if environment variable CAFC is empty or unset:
64-
CAFC=${CAFC:-mpif90}
63+
# Default to "mpifort" Fortran compiler if environment variable CAFC is empty or unset:
64+
CAFC=${CAFC:-mpifort}
6565

6666
# TODO -- refactor this script to use the bash3boilerplate use case
6767
max_arguments=100

src/extensions/cafrun-head

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,3 @@
2626
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2727
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2828
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
30-
# This script invokes the chosen Fortran compiler with the received command-line
31-
# arguments. Current assumptions:
32-
# 1. The only argument is either an informational flag or a CAF executable
33-
# file.
34-
# 2. The environment variable "FC" is used to determine the identity fo the Fortran compiler/linker.
35-
# 3. If "FC" is empty, a default value of "mpif90" is used.

src/make.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ compiler=gnu
3838
ifeq ($(compiler),gnu)
3939
FC=gfortran
4040
CC=gcc
41-
MPFC = mpif90
41+
MPFC = mpifort
4242
MPICC = mpicc
4343
FFLAGS_EXTRA = -fcoarray=lib
4444
MPI_EXTRA_FLAGS = -Wall -Wextra -Wno-error=cpp -Wno-error=unused-parameter -DSTRIDED#-DNONBLOCKING_PUT -DCAF_MPI_LOCK_UNLOCK
45-
MPI_RUN = mpirun -np 2
45+
MPI_RUN = mpiexec -np 2
4646
else
4747
ifeq ($(compiler),cray)
4848
FC=ftn
@@ -71,4 +71,4 @@ GASNET_CFLAGS += # -DSTRIDED
7171
GASNET_PATH =
7272
GASNET_MAK = $(GASNET_PATH)/GASNet-1.22.4/smp-conduit/smp-par.mak
7373
GASNET_LDFLAGS +=$(GASNET_LIBS)
74-
GASNET_RUN = mpirun -np 2
74+
GASNET_RUN = mpiexec -np 2

src/make.inc.Cray-XE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ GASNET_CFLAGS += -I/opt/chapel/1.8.0/cray-xk/third-party/gasnet/install/cray-xk-
3232
-Wno-all
3333
GASNET_MAK = /opt/chapel/1.8.0/cray-xk/third-party/gasnet/install/cray-xk-cray-prgenv-gnu/seg-fast/nodbg/include/gemini-conduit/gemini-par.mak
3434
GASNET_CC = cc
35-
GASNET_RUN = mpirun -np 2
35+
GASNET_RUN = mpiexec -np 2

src/tests/integration/coarrayHelloWorld/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
opencoarrays=/opt/opencoarrays
33
executable=hello_multiverse
44
opt=-L $(opencoarrays)/lib
5-
compile=mpif90 -fcoarray=lib
5+
compile=mpifort -fcoarray=lib
66
lib=-lcaf_mpi
77

88
$(executable): hello_multiverse.o Makefile

0 commit comments

Comments
 (0)