diff --git a/src/GNUmakefile b/src/GNUmakefile index 10701e7150..180eb43f6f 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -129,7 +129,7 @@ realclean: -$(RM) $(LIBDIR)/*.a $(BINDIR)/* -$(RM) *.db movecs fort.41 fort.44 -$(RM) util/util_version.F - @# -$(RM) 64_to_32 32_to_64 deps_stamp # This conversion is such a hassle that realclean should not force it. + @# -$(RM) 64_to_32 32_to_64 deps_stamp mpi_include.txt # This conversion is such a hassle that realclean should not force it. .PHONY: cleanF cleanF: diff --git a/src/config/makefile.h b/src/config/makefile.h index 1bd9e4e5d0..1d73a2bcd5 100644 --- a/src/config/makefile.h +++ b/src/config/makefile.h @@ -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 diff --git a/src/config/oblas_ompcheck.sh b/src/config/oblas_ompcheck.sh index d965c3f272..fd2888ae25 100755 --- a/src/config/oblas_ompcheck.sh +++ b/src/config/oblas_ompcheck.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # oblas_dir directory where libopenblas is located # oblas_name "openblas" suffix in lib"openblas". # e.g. for debian pkg libopenblas64-pthread-dev diff --git a/src/python/nw_inp_from_string.c b/src/python/nw_inp_from_string.c index 010f1c1f04..47204b383c 100644 --- a/src/python/nw_inp_from_string.c +++ b/src/python/nw_inp_from_string.c @@ -29,8 +29,6 @@ int nw_inp_from_string(Integer rtdb, const char *input) FILE *file; #if (defined(USE_FCD) || defined(WIN32)) && !defined(__MINGW32__) _fcd fstring; -#else - char fstring[255]; #endif int status; const char base[] = "temp"; diff --git a/src/python/nwchem_wrap.c b/src/python/nwchem_wrap.c index 4aac5ea9b6..a407d0d72c 100644 --- a/src/python/nwchem_wrap.c +++ b/src/python/nwchem_wrap.c @@ -1797,12 +1797,6 @@ struct module_state { static struct module_state _state; #endif -static PyObject* error_out(PyObject *m) { - struct module_state *st = GETSTATE(m); - PyErr_SetString(st->error, "something bad happened"); - return NULL; -} - #if PY_MAJOR_VERSION >= 3 static int nwchem_traverse(PyObject *m, visitproc visit, void *arg) { diff --git a/src/python/task_python.c b/src/python/task_python.c index 6091ab2c3e..01d0862be9 100644 --- a/src/python/task_python.c +++ b/src/python/task_python.c @@ -42,7 +42,9 @@ int FATR task_python_(Integer *rtdb_ptr) wchar_t nwprogram[20]; mbstowcs(nwprogram, "NWChem", strlen("NWChem") + 1); #else +#if PY_VERSION_HEX < 0x03080000 wchar_t *nwprogram = Py_DecodeLocale("NWChem", NULL); +#endif #endif #if PY_VERSION_HEX < 0x03080000 Py_SetProgramName(nwprogram); diff --git a/src/tools/check_mpi_inc.sh b/src/tools/check_mpi_inc.sh new file mode 100755 index 0000000000..fdaebcc1ab --- /dev/null +++ b/src/tools/check_mpi_inc.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +if [ ! -f ${NWCHEM_TOP}/src/mpi_include.txt ]; then + ${NWCHEM_TOP}/src/tools/guess-mpidefs --mpi_include > ${NWCHEM_TOP}/src/mpi_include.txt +fi +cat ${NWCHEM_TOP}/src/mpi_include.txt