quick exit when BLASOPT is not defined

This commit is contained in:
edoapra 2023-11-24 11:55:50 -08:00
parent b113c2e510
commit 1f3dc2f08c
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0

View file

@ -9,10 +9,18 @@ mylog=/tmp/mylog.txt
NWCHEM_TOP=$1
file_check=$NWCHEM_TOP/src/oblas_ompcheck_done.txt
if [ -f $file_check ]; then
echo $file_check present >> $mylog
# echo $file_check present >> $mylog
cat $file_check
exit 0
fi
echo BLASOPT is $BLASOPT >> $mylog
if [[ -z "${BLASOPT}" ]]; then
echo BLASOPT is empty >> $mylog
echo 0 > $NWCHEM_TOP/src/oblas_ompcheck_done.txt
exit 0
else
echo BLASOPT is not empty @$BLASOPT@ >> $mylog
fi
#extract oblas_dir & oblas_name from BLASOPT
#
oblas_dir=$(echo $BLASOPT | awk 'sub(/.*-L */,""){f=1} f{if ( sub(/ * .*/,"") ) f=0; print}')