use OMPI_FC for OpenMPI

This commit is contained in:
edoapra 2025-10-28 10:13:38 -07:00
parent 73eefef958
commit 5d0738e49e
No known key found for this signature in database
GPG key ID: 9E6A0B70826967BA
5 changed files with 26 additions and 1 deletions

View file

@ -175,6 +175,17 @@ echo MPICH_CC is "$MPICH_CC"
if [[ -z "$MPICH_CXX" ]] ; then
export MPICH_CXX="$CXX"
fi
if [[ -z "$OMPI_FC" ]] ; then
export OMPI_FC="$FC"
fi
echo OMPI_FC is "$OMPI_FC"
if [[ -z "$OMPI_CC" ]] ; then
export OMPI_CC="$CC"
fi
echo OMPI_CC is "$OMPI_CC"
if [[ -z "$OMPI_CXX" ]] ; then
export OMPI_CXX="$CXX"
fi
#Intel MPI
if [[ -z "$I_MPI_F90" ]] ; then
export I_MPI_F90="$FC"

View file

@ -240,10 +240,18 @@ if [[ -z "$MPICH_FC" ]] ; then
export MPICH_FC="$FC"
fi
echo MPICH_FC is "$MPICH_FC"
if [[ -z "$OMPI_FC" ]] ; then
export OMPI_FC="$FC"
fi
echo OMPI_FC is "$OMPI_FC"
if [[ -z "$MPICH_CC" ]] ; then
export MPICH_CC="$CC"
fi
echo MPICH_CC is "$MPICH_CC"
if [[ -z "$OMPI_CC" ]] ; then
export OMPI_CC="$CC"
fi
echo OMPI_CC is "$OMPI_CC"
echo $(${MPICC} -show)
#Intel MPI
if [[ -z "$I_MPI_F90" ]] ; then

View file

@ -10,6 +10,8 @@ fi
os=`uname`
dist="ubuntu"
arch=`uname -m`
export MPICH_FC=$FC
export OMPI_FC=$FC
env | grep FC || true
env | grep CC || true
if [[ "$os" == "Darwin" ]]; then
@ -143,7 +145,6 @@ fi
if [[ "$MPI_IMPL" != "build_mpich" ]]; then
#check mpi install
if [[ "$MPI_IMPL" == "mpich" ]]; then
export MPICH_FC=$FC
echo 'mpi90 -show' $("$HOMEBREW_PREFIX"/opt/mpich/bin/mpif90 -show)
fi
if [[ "$MPI_IMPL" == "openmpi" ]]; then

View file

@ -22,12 +22,14 @@ fi
cd $TRAVIS_BUILD_DIR/src
#FDOPT="-O0 -g"
export MPICH_FC=$FC
export OMPI_FC=$FC
if [[ "$arch" == "aarch64" ]]; then
if [[ "$FC" == "flang" ]] ; then
FOPT="-O2 -ffast-math"
elif [[ "$(basename -- $FC | cut -d \- -f 1)" == "nvfortran" ]] ; then
export USE_FPICF=1
export MPICH_FC=nvfortran
export OMPI_FC=nvfortran
env|egrep FC
nvfortran -V
else
@ -63,6 +65,7 @@ else
if [[ "$FC" == "nvfortran" ]]; then
export USE_FPICF=1
export MPICH_FC=nvfortran
export OMPI_FC=nvfortran
nvfortran -V
fi
fi

View file

@ -49,6 +49,7 @@ if [[ "$FC" == "nvfortran" ]]; then
export LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_"$arch"/latest/compilers/lib:$LD_LIBRARY_PATH
export FC=nvfortran
export MPICH_FC=nvfortran
export OMPI_FC=nvfortran
fi
if [[ "$FC" == "ifort" ]] || [[ "$FC" == "ifx" ]] ; then
if [[ "$os" == "Darwin" ]]; then
@ -185,6 +186,7 @@ if [[ -z "$USE_INTERNALBLAS" ]]; then
# if [[ ${FC} == gfortran ]] ; then
if [[ "$MPI_IMPL" == "mpich" ]]; then
export MPICH_FC=$FC
export OMPI_FC=$FC
# if [[ "$arch" != "aarch64" ]]; then
# export BUILD_MPICH=1
# fi