Skip to content

Commit d49c02e

Browse files
committed
WIP: switch to FC=gfortran, CC=gcc in bld_oc.sh
### WIP: switch to FC=gfortran, CC=gcc in build_opencoarrays.sh - BROKEN due to needing to pass in FC and CC correctly pointing to gfortran and gcc (well CC could point to clang or a different C compiler) - This should help resolve some MPI problems - We may be able to remove the consistency check between mpi and gcc
1 parent 2523653 commit d49c02e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

prerequisites/install-functions/build_opencoarrays.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#shellcheck shell=bash
12
# shellcheck disable=SC2154
23
build_opencoarrays()
34
{
@@ -9,12 +10,12 @@ build_opencoarrays()
910
build_path="${build_path}"/opencoarrays/$("${opencoarrays_src_dir}"/install.sh -V opencoarrays)
1011
mkdir -p "$build_path"
1112
pushd "$build_path"
12-
if [[ -z "${MPICC:-}" || -z "${MPIFC:-}" || -z "${CMAKE:-}" ]]; then
13-
emergency "Empty MPICC=$MPICC or MPIFC=$MPIFC or CMAKE=$CMAKE [exit 90]"
13+
if [[ -z "${MPICC:-}" || -z "${MPIFC:-}" || -z "${CMAKE:-}" || -z "${FC:-}" || -z "${CC:-}" ]]; then
14+
emergency "Empty MPICC=$MPICC or MPIFC=$MPIFC or FC or CC or CMAKE=$CMAKE [exit 90]"
1415
else
1516
info "Configuring OpenCoarrays in ${PWD} with the command:"
16-
info "CC=\"${MPICC}\" FC=\"${MPIFC}\" $CMAKE \"${opencoarrays_src_dir}\" -DCMAKE_INSTALL_PREFIX=\"${install_path}\""
17-
CC="${MPICC}" FC="${MPIFC}" $CMAKE "${opencoarrays_src_dir}" -DCMAKE_INSTALL_PREFIX="${install_path}"
17+
info "CC=\"${CC}\" FC=\"${FC}\" $CMAKE \"${opencoarrays_src_dir}\" -DCMAKE_INSTALL_PREFIX=\"${install_path}\" -DMPI_C_COMPILER=\"${MPICC}\" -DMPI_Fortran_COMPILER=\"${MPIFC}\""
18+
CC="${CC}" FC="${FC}" $CMAKE "${opencoarrays_src_dir}" -DCMAKE_INSTALL_PREFIX="${install_path}" -DMPI_C_COMPILER="${MPICC}" -DMPI_Fortran_COMPILER="${MPIFC}"
1819
info "Building OpenCoarrays in ${PWD} with the command make -j${num_threads}"
1920
make "-j${num_threads}"
2021
if [[ ! -z ${SUDO:-} ]]; then

0 commit comments

Comments
 (0)