Hi all,
I'm trying to run a parallel aoforce calculation but it runs single core only and I can't understand why.
Here's my .bashrc:
export LD_LIBRARY_PATH=/usr/local/TURBOMOLE/libso/x86_64-unknown-linux-gnu_ga
export TURBOARCH=x86_64-unknown-linux-gnu
export TURBOMOLE_SYSNAME=x86_64-unknown-linux-gnu
export PARA_ARCH=SMP
export TURBODIR=/usr/local/TURBOMOLE/
export PARNODES=12
PATH=$PATH:$TURBODIR/scripts
PATH=$PATH:$TURBODIR/bin/`sysname`
teo@machine:~$ sysname
x86_64-unknown-linux-gnu_smp
teo@machine:~$ sysname -s
x86_64-unknown-linux-gnu
teo@machine:~$ which aoforce
/usr/local/TURBOMOLE/bin/x86_64-unknown-linux-gnu_smp/aoforce
This is the aoforce script I have in the path:
#!/bin/sh
# pared down and modified from mpirun_scripts
if [ -z "${PARA_ARCH}" ]; then
export PARA_ARCH=MPI
echo "A PARALLEL `basename $0` calculation will be started!"
echo "A PARALLEL `basename $0` calculation will be started!" >&2
fi
DEBUG=""
# process the options
while getopts l:n:g: MPIOPT; do
case $MPIOPT in
"l") LOADOPT="$OPTARG" ;;
"n") NPOPT="$OPTARG"
# check if NPOPT is a number
if [ -n "`echo "$NPOPT" | grep "[^0-9]"`" ]; then
echo "The argument to option -n has to be a NUMBER!"
exit 1
fi
;;
"g") DEBUG="$OPTARG" ;;
esac
done
# Now to the default-number of NODES:
# if the number is given as an option to this script ("script" -n 8),
# KOTEN is $NPOPT, if $NPOPT is not set but $PARNODES,
# take this as default, else set KNOTEN to 2
# If OMP_NUM_THREADS or SMPCPUS are set, they will also be used.
# The hierarchy is:
# NPOPT > PARNODES > OMP_NUM_THREADS > SMPCPUS
KNOTEN=${SMPCPUS:-2}
KNOTEN=${OMP_NUM_THREADS:-$KNOTEN}
KNOTEN=${PARNODES:-$KNOTEN}
KNOTEN=${NPOPT:-$KNOTEN}
unset OMP_DYNAMIC
unset OMP_NUM_THREADS
export SMPCPUS=$KNOTEN
$TURBODIR/bin/`sysname -s`/aoforce
I do not understand why it always runs the aoforce executable from the serial version ("sysname -s").
I also tried setting SMPCPUS, KNOTEN, NPOPT OMP_NUM_THREADS before launching the script AND also by setting them inside the script with no change.
Launching "aoforce -n 12" doesn't work either. All I get is single-core aoforce.
Thank you for your help