added check for superheavy elements

This commit is contained in:
edoapra 2023-07-12 10:23:23 -07:00
parent b257e52cfd
commit a310cc34e2
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0
3 changed files with 54 additions and 32 deletions

View file

@ -627,8 +627,15 @@ let "myexit+=$?"
let "myexit+=$?"
./runtests.mpi.unix procs $np back_to_atguess
let "myexit+=$?"
./runtests.mpi.unix procs $np dft_tennessine
let "myexit+=$?"
# superheavy elements check
source ./qa_funcs.sh
strings -a $(get_nwchem_executable) |grep Tennessine >& /dev/null
exit_code=$?
if [[ $exit_code == 0 ]]; then
echo NWChem code ready for superheavy elements
./runtests.mpi.unix procs $np dft_tennessine
let "myexit+=$?"
fi
#
./runtests.mpi.unix procs $np ccsdt_ompt_w3pvdz
let "myexit+=$?"

41
QA/qa_funcs.sh Normal file
View file

@ -0,0 +1,41 @@
#!/usr/bin/env bash
get_nwchem_top(){
if [[ -z "${NWCHEM_TOP}" ]]; then
DIRQA=`dirname "$0"`
MYPWD=`pwd`
NWCHEM_TOP=`echo ${MYPWD}/${DIRQA} | sed -e 's/\/QA.*//' `
fi
echo $NWCHEM_TOP
}
get_nwchem_target(){
if [[ -z "${NWCHEM_TARGET}" ]]; then
UNAME_S=$(uname -s)
if [[ ${UNAME_S} == Linux ]]; then
NWCHEM_TARGET=LINUX64
elif [[ ${UNAME_S} == Darwin ]]; then
NWCHEM_TARGET=MACX64
else
echo
echo You must define NWCHEM_TARGET in your environment to be the name
echo of the machine you wish to build for ... for example
echo export NWCHEM_TARGET=SOLARIS
echo Known targets are SOLARIS, ...
echo See the INSTALL instructions for a complete list
echo ${UNAME_S}
exit 1
fi
fi
echo $NWCHEM_TARGET
}
get_nwchem_executable(){
NWCHEM_TOP=$(get_nwchem_top)
NWCHEM_TARGET=$(get_nwchem_target)
if [[ $(echo $NWCHEM_EXECUTABLE|cut -c 1-11) == 'singularity' ]] || [[ $(echo $NWCHEM_EXECUTABLE|cut -c 1-9) == 'apptainer' ]] || [[ -f $NWCHEM_EXECUTABLE ]]; then
NWCHEM=$NWCHEM_EXECUTABLE
else
NWCHEM=${NWCHEM_TOP}/bin/${NWCHEM_TARGET}/nwchem
fi
echo $NWCHEM
}

View file

@ -35,29 +35,11 @@ export HYDRA_DEBUG=0
if [[ -z "${USE_ASAN}" ]]; then
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
fi
source ./qa_funcs.sh
NWCHEM=$(get_nwchem_executable)
NWCHEM_TOP=$(get_nwchem_top)
NWCHEM_TARGET=$(get_nwchem_target)
if [[ -z "${NWCHEM_TARGET}" ]]; then
UNAME_S=$(uname -s)
if [[ ${UNAME_S} == Linux ]]; then
NWCHEM_TARGET=LINUX64
elif [[ ${UNAME_S} == Darwin ]]; then
NWCHEM_TARGET=MACX64
else
echo
echo You must define NWCHEM_TARGET in your environment to be the name
echo of the machine you wish to build for ... for example
echo export NWCHEM_TARGET=SOLARIS
echo Known targets are SOLARIS, ...
echo See the INSTALL instructions for a complete list
echo ${UNAME_S}
exit 1
fi
fi
if [[ -z "${NWCHEM_TOP}" ]]; then
DIRQA=`dirname "$0"`
MYPWD=`pwd`
NWCHEM_TOP=`echo ${MYPWD}/${DIRQA} | sed -e 's/\/QA.*//' `
fi
if [[ ! -z "${BUILD_MPICH}" ]]; then
export MPIRUN_PATH=$NWCHEM_TOP/src/libext/bin/mpiexec
export LD_LIBRARY_PATH=$NWCHEM_TOP/src/libext/lib:$LD_LIBRARY_PATH
@ -74,8 +56,6 @@ else
NONSTD_MPI=0
fi
NWCHEM_PROJ_PATH=${NWCHEM_TOP}/bin/${NWCHEM_TARGET}
if [[ $# -eq 0 ]] ; then
goto USAGE
fi
@ -102,12 +82,6 @@ done
CURDIR=$(pwd)
# Figure out where the executable is.
if [[ $(echo $NWCHEM_EXECUTABLE|cut -c 1-11) == 'singularity' ]] || [[ $(echo $NWCHEM_EXECUTABLE|cut -c 1-9) == 'apptainer' ]] || [[ -f $NWCHEM_EXECUTABLE ]]; then
NWCHEM=$NWCHEM_EXECUTABLE
else
NWCHEM=${NWCHEM_PROJ_PATH}/nwchem
fi
if [[ -x $"NWCHEM" ]]; then
echo failed: cannot execute \"$NWCHEM\"