added caching of MPI_INCLUDE

This commit is contained in:
edoapra 2023-12-14 13:17:38 -08:00
parent a5a95288c2
commit 02c1d2b2b9
No known key found for this signature in database
GPG key ID: 9E6A0B70826967BA
2 changed files with 10 additions and 2 deletions

View file

@ -3893,7 +3893,7 @@ ifdef USE_MPI
endif
endif
# check if mpif90 is present
MPIF90YN = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
MPIF90YN=$(shell $(NWCHEM_TOP)/src/tools/check_mpi_inc.sh)
ifeq ($(MPIF90YN),mpif90notfound)
errormpif90:
$(info )
@ -3902,7 +3902,7 @@ ifdef USE_MPI
$(info )
$(error )
endif
NWMPI_INCLUDE = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
NWMPI_INCLUDE = $(shell $(NWCHEM_TOP)/src/tools/check_mpi_inc.sh)
NWMPI_LIB = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_lib)
NWLIBMPI = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --libmpi)
endif

8
src/tools/check_mpi_inc.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
echo `date` >> /tmp/edo/log
if [ ! -f ${NWCHEM_TOP}/src/mpi_include.txt ]; then
${NWCHEM_TOP}/src/tools/guess-mpidefs --mpi_include > ${NWCHEM_TOP}/src/mpi_include.txt
echo created file >> /tmp/edo/log
fi
/usr/bin/cat ${NWCHEM_TOP}/src/mpi_include.txt >> /tmp/edo/log
/usr/bin/cat ${NWCHEM_TOP}/src/mpi_include.txt