Merge branch 'development' into using-submodules

This commit is contained in:
Sharan Roongta 2020-07-16 00:09:46 +02:00
commit 98d0da8e31
34 changed files with 1086 additions and 1038 deletions

View File

@ -1 +1 @@
v2.0.3-2872-g0a2d3046 v2.0.3-2881-gc07efe84

6
env/DAMASK.csh vendored
View File

@ -9,8 +9,8 @@ source $ENV_ROOT/CONFIG
set path = ($DAMASK_ROOT/bin $path) set path = ($DAMASK_ROOT/bin $path)
set SOLVER=`which DAMASK_spectral` set SOLVER=`which DAMASK_grid`
if ( "x$DAMASK_NUM_THREADS" == "x" ) then if ( "x$DAMASK_NUM_THREADS" == "x" ) then
set DAMASK_NUM_THREADS=1 set DAMASK_NUM_THREADS=1
endif endif
@ -30,7 +30,7 @@ if ( $?prompt ) then
echo echo
echo Using environment with ... echo Using environment with ...
echo "DAMASK $DAMASK_ROOT" echo "DAMASK $DAMASK_ROOT"
echo "Grid Solver $SOLVER" echo "Grid Solver $SOLVER"
if ( $?PETSC_DIR) then if ( $?PETSC_DIR) then
echo "PETSc location $PETSC_DIR" echo "PETSc location $PETSC_DIR"
endif endif

4
env/DAMASK.sh vendored
View File

@ -35,7 +35,7 @@ cd $DAMASK_ROOT >/dev/null; BRANCH=$(git branch 2>/dev/null| grep -E '^\* '); cd
PATH=${DAMASK_ROOT}/bin:$PATH PATH=${DAMASK_ROOT}/bin:$PATH
SOLVER=$(type -p DAMASK_spectral || true 2>/dev/null) SOLVER=$(type -p DAMASK_grid || true 2>/dev/null)
[ "x$SOLVER" == "x" ] && SOLVER=$(blink 'Not found!') [ "x$SOLVER" == "x" ] && SOLVER=$(blink 'Not found!')
[ "x$DAMASK_NUM_THREADS" == "x" ] && DAMASK_NUM_THREADS=1 [ "x$DAMASK_NUM_THREADS" == "x" ] && DAMASK_NUM_THREADS=1
@ -56,7 +56,7 @@ if [ ! -z "$PS1" ]; then
echo echo
echo Using environment with ... echo Using environment with ...
echo "DAMASK $DAMASK_ROOT $BRANCH" echo "DAMASK $DAMASK_ROOT $BRANCH"
echo "Grid Solver $SOLVER" echo "Grid Solver $SOLVER"
if [ "x$PETSC_DIR" != "x" ]; then if [ "x$PETSC_DIR" != "x" ]; then
echo -n "PETSc location " echo -n "PETSc location "
[ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR [ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR

4
env/DAMASK.zsh vendored
View File

@ -27,7 +27,7 @@ cd $DAMASK_ROOT >/dev/null; BRANCH=$(git branch 2>/dev/null| grep -E '^\* '); cd
PATH=${DAMASK_ROOT}/bin:$PATH PATH=${DAMASK_ROOT}/bin:$PATH
SOLVER=$(which DAMASK_spectral || true 2>/dev/null) SOLVER=$(which DAMASK_grid || true 2>/dev/null)
[[ "x$SOLVER" == "x" ]] && SOLVER=$(blink 'Not found!') [[ "x$SOLVER" == "x" ]] && SOLVER=$(blink 'Not found!')
[[ "x$DAMASK_NUM_THREADS" == "x" ]] && DAMASK_NUM_THREADS=1 [[ "x$DAMASK_NUM_THREADS" == "x" ]] && DAMASK_NUM_THREADS=1
@ -48,7 +48,7 @@ if [ ! -z "$PS1" ]; then
echo echo
echo "Using environment with ..." echo "Using environment with ..."
echo "DAMASK $DAMASK_ROOT $BRANCH" echo "DAMASK $DAMASK_ROOT $BRANCH"
echo "Grid Solver $SOLVER" echo "Grid Solver $SOLVER"
if [ "x$PETSC_DIR" != "x" ]; then if [ "x$PETSC_DIR" != "x" ]; then
echo -n "PETSc location " echo -n "PETSc location "
[ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR [ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR

View File

@ -1,2 +0,0 @@
itmin 4
itmax 40

View File

@ -0,0 +1,3 @@
grid:
itmin: 4
itmax: 40

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -63,7 +63,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -177,16 +177,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -203,7 +203,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -226,7 +226,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -246,7 +246,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -269,7 +269,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -333,7 +333,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -388,7 +388,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -498,7 +498,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -523,7 +523,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -543,7 +543,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -613,7 +613,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -624,7 +624,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -635,7 +635,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -651,7 +651,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -665,7 +665,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -676,7 +676,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -847,7 +847,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -898,7 +898,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -934,7 +934,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -943,7 +943,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -998,24 +998,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1030,7 +1030,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1059,7 +1059,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1093,14 +1093,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1108,7 +1108,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1222,11 +1222,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1291,7 +1291,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $nauto -gt 2 if test $nauto -gt 2
then then
error="$error error="$error
incorrect option for auto restart " incorrect option for auto restart "
fi fi
fi fi
@ -1299,7 +1299,7 @@ incorrect option for auto restart "
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1307,7 +1307,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1315,7 +1315,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1642,7 +1642,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1660,7 +1660,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1783,7 +1783,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1825,7 +1825,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1975,7 +1975,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2039,42 +2039,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2327,7 +2327,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2360,7 +2360,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2474,9 +2474,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2560,7 +2560,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2569,7 +2569,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2729,7 +2729,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2753,23 +2753,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2809,7 +2809,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2859,7 +2859,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2870,7 +2870,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2975,7 +2975,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3267,6 +3267,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3309,7 +3310,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3318,10 +3319,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3389,15 +3390,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3579,7 +3580,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3599,6 +3600,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3647,7 +3649,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3696,7 +3698,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3913,7 +3915,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3933,6 +3935,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3972,7 +3975,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4055,7 +4058,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -63,7 +63,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -177,16 +177,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -203,7 +203,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -226,7 +226,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -246,7 +246,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -269,7 +269,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -333,7 +333,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -388,7 +388,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -498,7 +498,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -523,7 +523,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -543,7 +543,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -613,7 +613,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -624,7 +624,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -635,7 +635,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -651,7 +651,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -665,7 +665,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -676,7 +676,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -847,7 +847,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -898,7 +898,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -934,7 +934,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -943,7 +943,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -998,24 +998,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1030,7 +1030,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1059,7 +1059,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1093,14 +1093,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1108,7 +1108,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1222,11 +1222,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1291,7 +1291,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $nauto -gt 2 if test $nauto -gt 2
then then
error="$error error="$error
incorrect option for auto restart " incorrect option for auto restart "
fi fi
fi fi
@ -1299,7 +1299,7 @@ incorrect option for auto restart "
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1307,7 +1307,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1315,7 +1315,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1642,7 +1642,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1660,7 +1660,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1783,7 +1783,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1825,7 +1825,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1975,7 +1975,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2039,42 +2039,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2327,7 +2327,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2360,7 +2360,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2474,9 +2474,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2560,7 +2560,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2569,7 +2569,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2729,7 +2729,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2753,23 +2753,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2809,7 +2809,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2859,7 +2859,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2870,7 +2870,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2975,7 +2975,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3267,6 +3267,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3309,7 +3310,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3318,10 +3319,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3389,15 +3390,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3579,7 +3580,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3599,6 +3600,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3647,7 +3649,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3696,7 +3698,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3913,7 +3915,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3933,6 +3935,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3972,7 +3975,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4055,7 +4058,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -63,7 +63,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -177,16 +177,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -203,7 +203,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -226,7 +226,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -246,7 +246,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -269,7 +269,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -333,7 +333,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -388,7 +388,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -498,7 +498,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -523,7 +523,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -543,7 +543,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -613,7 +613,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -624,7 +624,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -635,7 +635,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -651,7 +651,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -665,7 +665,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -676,7 +676,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -847,7 +847,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -898,7 +898,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -934,7 +934,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -943,7 +943,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -998,24 +998,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1030,7 +1030,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1059,7 +1059,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1093,14 +1093,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1108,7 +1108,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1222,11 +1222,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1291,7 +1291,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $nauto -gt 2 if test $nauto -gt 2
then then
error="$error error="$error
incorrect option for auto restart " incorrect option for auto restart "
fi fi
fi fi
@ -1299,7 +1299,7 @@ incorrect option for auto restart "
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1307,7 +1307,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1315,7 +1315,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1642,7 +1642,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1660,7 +1660,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1783,7 +1783,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1825,7 +1825,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1975,7 +1975,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2039,42 +2039,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2327,7 +2327,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2360,7 +2360,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2474,9 +2474,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2560,7 +2560,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2569,7 +2569,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2729,7 +2729,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2753,23 +2753,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2809,7 +2809,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2859,7 +2859,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2870,7 +2870,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2975,7 +2975,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3267,6 +3267,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3309,7 +3310,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3318,10 +3319,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3389,15 +3390,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3579,7 +3580,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3599,6 +3600,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3647,7 +3649,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3696,7 +3698,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3913,7 +3915,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3933,6 +3935,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3972,7 +3975,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4055,7 +4058,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -63,7 +63,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -177,16 +177,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -203,7 +203,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -226,7 +226,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -246,7 +246,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -269,7 +269,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -333,7 +333,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -388,7 +388,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -498,7 +498,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -523,7 +523,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -543,7 +543,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -613,7 +613,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -624,7 +624,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -635,7 +635,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -651,7 +651,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -665,7 +665,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -676,7 +676,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -847,7 +847,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -898,7 +898,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -934,7 +934,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -943,7 +943,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -998,24 +998,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1030,7 +1030,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1059,7 +1059,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1093,14 +1093,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1108,7 +1108,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1222,11 +1222,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1291,7 +1291,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $nauto -gt 2 if test $nauto -gt 2
then then
error="$error error="$error
incorrect option for auto restart " incorrect option for auto restart "
fi fi
fi fi
@ -1299,7 +1299,7 @@ incorrect option for auto restart "
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1307,7 +1307,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1315,7 +1315,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1642,7 +1642,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1660,7 +1660,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1783,7 +1783,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1825,7 +1825,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1975,7 +1975,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2039,42 +2039,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2327,7 +2327,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2360,7 +2360,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2474,9 +2474,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2560,7 +2560,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2569,7 +2569,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2729,7 +2729,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2753,23 +2753,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2809,7 +2809,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2859,7 +2859,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2870,7 +2870,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2975,7 +2975,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3267,6 +3267,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3309,7 +3310,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3318,10 +3319,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3389,15 +3390,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3579,7 +3580,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3599,6 +3600,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3647,7 +3649,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3696,7 +3698,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3913,7 +3915,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3933,6 +3935,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3972,7 +3975,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4055,7 +4058,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -63,7 +63,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -177,16 +177,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -203,7 +203,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -226,7 +226,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -246,7 +246,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -269,7 +269,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -333,7 +333,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -388,7 +388,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -498,7 +498,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -523,7 +523,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -543,7 +543,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -613,7 +613,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -624,7 +624,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -635,7 +635,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -651,7 +651,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -665,7 +665,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -676,7 +676,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -847,7 +847,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -898,7 +898,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -934,7 +934,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -943,7 +943,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -998,24 +998,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1030,7 +1030,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1059,7 +1059,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1093,14 +1093,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1108,7 +1108,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1222,11 +1222,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1291,7 +1291,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $nauto -gt 2 if test $nauto -gt 2
then then
error="$error error="$error
incorrect option for auto restart " incorrect option for auto restart "
fi fi
fi fi
@ -1299,7 +1299,7 @@ incorrect option for auto restart "
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1307,7 +1307,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1315,7 +1315,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1642,7 +1642,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1660,7 +1660,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1783,7 +1783,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1825,7 +1825,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1975,7 +1975,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2039,42 +2039,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2327,7 +2327,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2360,7 +2360,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2474,9 +2474,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2560,7 +2560,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2569,7 +2569,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2729,7 +2729,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2753,23 +2753,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2809,7 +2809,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2859,7 +2859,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2870,7 +2870,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2975,7 +2975,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3267,6 +3267,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3309,7 +3310,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3318,10 +3319,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3389,15 +3390,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3579,7 +3580,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3599,6 +3600,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3647,7 +3649,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3696,7 +3698,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3913,7 +3915,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3933,6 +3935,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3972,7 +3975,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4055,7 +4058,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -63,7 +63,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -177,16 +177,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -203,7 +203,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -226,7 +226,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -246,7 +246,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -269,7 +269,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -333,7 +333,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -388,7 +388,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -498,7 +498,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -523,7 +523,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -543,7 +543,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -613,7 +613,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -624,7 +624,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -635,7 +635,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -651,7 +651,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -665,7 +665,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -676,7 +676,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -847,7 +847,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -898,7 +898,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -934,7 +934,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -943,7 +943,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -998,24 +998,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1030,7 +1030,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1059,7 +1059,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1093,14 +1093,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1108,7 +1108,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1222,11 +1222,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1291,7 +1291,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $nauto -gt 2 if test $nauto -gt 2
then then
error="$error error="$error
incorrect option for auto restart " incorrect option for auto restart "
fi fi
fi fi
@ -1299,7 +1299,7 @@ incorrect option for auto restart "
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1307,7 +1307,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1315,7 +1315,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1642,7 +1642,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1660,7 +1660,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1783,7 +1783,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1825,7 +1825,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1975,7 +1975,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2039,42 +2039,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2327,7 +2327,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2360,7 +2360,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2474,9 +2474,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2560,7 +2560,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2569,7 +2569,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2729,7 +2729,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2753,23 +2753,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2809,7 +2809,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2859,7 +2859,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2870,7 +2870,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2975,7 +2975,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3267,6 +3267,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3309,7 +3310,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3318,10 +3319,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3389,15 +3390,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3579,7 +3580,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3599,6 +3600,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3647,7 +3649,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3696,7 +3698,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3913,7 +3915,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3933,6 +3935,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3972,7 +3975,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4055,7 +4058,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -49,4 +49,5 @@ echo "program: $program"
exit 1 exit 1
} }
/bin/rm $userobj /bin/rm $userobj
/bin/rm $DIRJOB/*.mod /bin/rm $DIRJOB/*.mod
/bin/rm $DIRJOB/*.smod

View File

@ -62,7 +62,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -176,16 +176,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -202,7 +202,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -225,7 +225,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -245,7 +245,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -268,7 +268,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -332,7 +332,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -387,7 +387,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -497,7 +497,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -522,7 +522,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -542,7 +542,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -612,7 +612,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -623,7 +623,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -634,7 +634,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -650,7 +650,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -664,7 +664,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -675,7 +675,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -777,7 +777,7 @@ do
;; ;;
-au* | -AU*) -au* | -AU*)
nauto=$value nauto=$value
echo echo
echo warning: the option -au is no longer supported and will be ignored echo warning: the option -au is no longer supported and will be ignored
echo echo
;; ;;
@ -849,7 +849,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -900,7 +900,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -936,7 +936,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -945,7 +945,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -1000,24 +1000,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1032,7 +1032,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1061,7 +1061,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1095,14 +1095,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1110,7 +1110,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1224,11 +1224,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1293,7 +1293,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1301,7 +1301,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1309,7 +1309,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1626,7 +1626,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1644,7 +1644,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1767,7 +1767,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1809,7 +1809,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1959,7 +1959,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2017,42 +2017,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2305,7 +2305,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2338,7 +2338,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2452,9 +2452,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2538,7 +2538,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2547,7 +2547,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2707,7 +2707,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2731,23 +2731,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2787,7 +2787,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2837,7 +2837,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2848,7 +2848,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2953,7 +2953,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3241,6 +3241,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3283,7 +3284,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3292,10 +3293,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3363,15 +3364,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3553,7 +3554,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3573,6 +3574,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3621,7 +3623,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3670,7 +3672,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3887,7 +3889,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3907,6 +3909,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3946,7 +3949,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4029,7 +4032,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -62,7 +62,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -176,16 +176,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -202,7 +202,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -225,7 +225,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -245,7 +245,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -268,7 +268,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -332,7 +332,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -387,7 +387,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -497,7 +497,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -522,7 +522,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -542,7 +542,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -612,7 +612,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -623,7 +623,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -634,7 +634,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -650,7 +650,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -664,7 +664,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -675,7 +675,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -777,7 +777,7 @@ do
;; ;;
-au* | -AU*) -au* | -AU*)
nauto=$value nauto=$value
echo echo
echo warning: the option -au is no longer supported and will be ignored echo warning: the option -au is no longer supported and will be ignored
echo echo
;; ;;
@ -849,7 +849,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -900,7 +900,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -936,7 +936,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -945,7 +945,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -1000,24 +1000,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1032,7 +1032,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1061,7 +1061,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1095,14 +1095,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1110,7 +1110,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1224,11 +1224,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1293,7 +1293,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1301,7 +1301,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1309,7 +1309,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1626,7 +1626,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1644,7 +1644,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1767,7 +1767,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1809,7 +1809,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1959,7 +1959,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2017,42 +2017,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2305,7 +2305,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2338,7 +2338,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2452,9 +2452,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2538,7 +2538,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2547,7 +2547,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2707,7 +2707,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2731,23 +2731,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2787,7 +2787,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2837,7 +2837,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2848,7 +2848,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2953,7 +2953,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3241,6 +3241,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3283,7 +3284,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3292,10 +3293,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3363,15 +3364,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3553,7 +3554,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3573,6 +3574,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3621,7 +3623,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3670,7 +3672,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3887,7 +3889,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3907,6 +3909,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3946,7 +3949,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4029,7 +4032,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -62,7 +62,7 @@
# =1, element storage out-of-core # # =1, element storage out-of-core #
# -dll run marc using shared library libmarc.so and exe_marc # # -dll run marc using shared library libmarc.so and exe_marc #
# =1, used # # =1, used #
# =2, do not free streaming input memory # # =2, do not free streaming input memory #
# =3, run with marc input deck # # =3, run with marc input deck #
# -trk run marc for post-tracking # # -trk run marc for post-tracking #
# -gpuid run marc using GPGPU capability # # -gpuid run marc using GPGPU capability #
@ -176,16 +176,16 @@ fi
# MARC_MODE i8 # MARC_MODE i8
# it can also be set by the environmental variable MARC_INTEGER_SIZE # it can also be set by the environmental variable MARC_INTEGER_SIZE
# and by the command line option "-mo" # and by the command line option "-mo"
# #
mode= mode=
modeerror= modeerror=
modeoption= modeoption=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
fi fi
line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults`
@ -202,7 +202,7 @@ fi
if test -f $HOME/run_marc_defaults; then if test -f $HOME/run_marc_defaults; then
line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults`
if test "$line" = "MARC_MODE"; then if test "$line" = "MARC_MODE"; then
echo echo
echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
line= line=
@ -225,7 +225,7 @@ if test -z "$mode" ; then
mode=i8 mode=i8
fi fi
case $mode in case $mode in
i4) i4)
modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported."
modeoption=error modeoption=error
echo $modeerror echo $modeerror
@ -245,7 +245,7 @@ for arg in $* ; do
if $setmode ; then if $setmode ; then
mode=$arg mode=$arg
case $mode in case $mode in
i4) i4)
modeerror="bad value for mode option; only i8 is supported." modeerror="bad value for mode option; only i8 is supported."
modeoption=error modeoption=error
echo echo
@ -268,7 +268,7 @@ for arg in $* ; do
setmode=false setmode=false
fi fi
if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then
echo echo
echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available
echo echo
setmode=true setmode=true
@ -332,7 +332,7 @@ case "`echo '\c'`" in
;; ;;
esac esac
# #
# Variables for the MARC environment # Variables for the MARC environment
# #
@ -387,7 +387,7 @@ LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export LD_LIBRARY64_PATH export LD_LIBRARY64_PATH
export LD_LIBRARYN32_PATH export LD_LIBRARYN32_PATH
atexit() { atexit() {
kill -15 $$ kill -15 $$
# #
@ -497,7 +497,7 @@ MDSRCLIB=$MARC_LIB/mdsrc.a
# or in the user's home directory # or in the user's home directory
# format: # format:
# MARC_MPI <mpiversion> # MARC_MPI <mpiversion>
# #
value= value=
file= file=
if test -f $DIRSCRIPT/run_marc_defaults; then if test -f $DIRSCRIPT/run_marc_defaults; then
@ -522,7 +522,7 @@ if test -n "$value"; then
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
@ -542,7 +542,7 @@ if test -n "$value"; then
fi fi
fi fi
fi fi
# #
# #
# allow scratch directory to be specified with environmental variable # allow scratch directory to be specified with environmental variable
# MARCSCRATCH # MARCSCRATCH
@ -612,7 +612,7 @@ do
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
;; ;;
-r* | -R*) -r* | -R*)
rid=`$BASENAME $value .t08` rid=`$BASENAME $value .t08`
@ -623,7 +623,7 @@ do
*) *)
DIRRID=`pwd`/$DIRRID DIRRID=`pwd`/$DIRRID
;; ;;
esac esac
;; ;;
-si* | -SI*) -si* | -SI*)
sid=$value sid=$value
@ -634,7 +634,7 @@ do
*) *)
DIRSID=`pwd`/$DIRSID DIRSID=`pwd`/$DIRSID
;; ;;
esac esac
;; ;;
-pi* | -PI*) -pi* | -PI*)
if test -f $value.t19 if test -f $value.t19
@ -650,7 +650,7 @@ do
*) *)
DIRPID=`pwd`/$DIRPID DIRPID=`pwd`/$DIRPID
;; ;;
esac esac
;; ;;
-bdf | -BDF) -bdf | -BDF)
makebdf=1 makebdf=1
@ -664,7 +664,7 @@ do
*) *)
DIRDID=`pwd`/$DIRDID DIRDID=`pwd`/$DIRDID
;; ;;
esac esac
;; ;;
-vf | -VF) -vf | -VF)
vid=`$BASENAME $value .vfs` vid=`$BASENAME $value .vfs`
@ -675,7 +675,7 @@ do
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
-u* | -U*) -u* | -U*)
user=$value user=$value
@ -777,7 +777,7 @@ do
;; ;;
-au* | -AU*) -au* | -AU*)
nauto=$value nauto=$value
echo echo
echo warning: the option -au is no longer supported and will be ignored echo warning: the option -au is no longer supported and will be ignored
echo echo
;; ;;
@ -849,7 +849,7 @@ do
*) *)
DIRSCR=`pwd`/$DIRSCR DIRSCR=`pwd`/$DIRSCR
;; ;;
esac esac
;; ;;
-ho* | -HO*) -ho* | -HO*)
host=$value host=$value
@ -900,7 +900,7 @@ fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -936,7 +936,7 @@ fi
ntprint=$nt ntprint=$nt
nteprint=$nte nteprint=$nte
# copy from -nprocd[s] # copy from -nprocd[s]
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
nteprint=$nprocdddm nteprint=$nprocdddm
fi fi
@ -945,7 +945,7 @@ if test $nte -ne 0
then then
nteprint=$nte nteprint=$nte
fi fi
# check for minimum 1 threads per processes for DDM # check for minimum 1 threads per processes for DDM
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
if test $nteprint -lt $nprocdddm if test $nteprint -lt $nprocdddm
@ -1000,24 +1000,24 @@ export OMP_STACKSIZE=7M
# deprecate -nthread option at arugment of marc # deprecate -nthread option at arugment of marc
nt=0 nt=0
# Reset nprocdddmm, nsolver and threads if not given. # Reset nprocdddmm, nsolver and threads if not given.
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdarg= nprocdarg=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddmprint= nprocdddmprint=
fi fi
if test $nprocdddm -eq 0 if test $nprocdddm -eq 0
then then
nprocdddm= nprocdddm=
fi fi
nsolverprint=$nsolver nsolverprint=$nsolver
if test $nsolver -eq 0 if test $nsolver -eq 0
then then
nsolverprint= nsolverprint=
fi fi
# end of threads setting. # end of threads setting.
gpuoption= gpuoption=
if test "$gpuids" = "" ; then if test "$gpuids" = "" ; then
@ -1032,7 +1032,7 @@ else
MARCCUDALIBS=$MARCCUDALIBS2 MARCCUDALIBS=$MARCCUDALIBS2
export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH
fi fi
# Linux 64 + HPMPI, Below code is taken from include_linux64 # Linux 64 + HPMPI, Below code is taken from include_linux64
if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64"
then then
export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@ -1061,7 +1061,7 @@ if test "$dllrun" -gt 0; then
fi fi
if test "$progdll"; then if test "$progdll"; then
/bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll
rmdll=yes rmdll=yes
pathdll=yes pathdll=yes
progdll=${progdll}_$marcdll progdll=${progdll}_$marcdll
@ -1095,14 +1095,14 @@ while test forever; do
if test $nprocdddm -gt 1 -a $icreated -eq 0; then if test $nprocdddm -gt 1 -a $icreated -eq 0; then
if test ! -f $DIRJID/1$jid$dotdat; then if test ! -f $DIRJID/1$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/1$jid$dotdat not accessible" input file $DIRJID/1$jid$dotdat not accessible"
fi fi
fi fi
else else
if test ! -f $DIRJID/$jid$dotdat; then if test ! -f $DIRJID/$jid$dotdat; then
if test "$jid" != "" ; then if test "$jid" != "" ; then
error="$error error="$error
input file $DIRJID/$jid$dotdat not accessible" input file $DIRJID/$jid$dotdat not accessible"
fi fi
fi fi
@ -1110,7 +1110,7 @@ fi
if test $nprocd -gt 1; then if test $nprocd -gt 1; then
if test "$host" ; then if test "$host" ; then
if test ! -f $host; then if test ! -f $host; then
error="$error error="$error
host name file $host not accessible" host name file $host not accessible"
fi fi
fi fi
@ -1224,11 +1224,11 @@ view factor file $DIRVID/$vid.vfs not accessible"
notok=false notok=false
fi fi
done done
if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then
notok=false notok=false
fi fi
if $notok; then if $notok; then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)"
fi fi
fi fi
@ -1293,7 +1293,7 @@ defaults file $DIRDID/$did$dotdat not accessible"
then then
if test $ndcoup -gt 3 if test $ndcoup -gt 3
then then
error="$error error="$error
incorrect option for contact decoupling " incorrect option for contact decoupling "
fi fi
fi fi
@ -1301,7 +1301,7 @@ incorrect option for contact decoupling "
then then
if test $ndytran -gt 1 if test $ndytran -gt 1
then then
error="$error error="$error
incorrect option for Marc-Dytran Switch " incorrect option for Marc-Dytran Switch "
fi fi
fi fi
@ -1309,7 +1309,7 @@ incorrect option for Marc-Dytran Switch "
then then
if test ! -x $MARC_BIN/$exefile if test ! -x $MARC_BIN/$exefile
then then
error="$error error="$error
incorrect option for -mpi option: $MARC_MPITYPE " incorrect option for -mpi option: $MARC_MPITYPE "
fi fi
fi fi
@ -1626,7 +1626,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRJID=`pwd`/$DIRJID DIRJID=`pwd`/$DIRJID
;; ;;
esac esac
fi fi
$ECHO "User subroutine name ($user)? $ECHOTXT" $ECHO "User subroutine name ($user)? $ECHOTXT"
read value read value
@ -1644,7 +1644,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
user=`pwd`/$user user=`pwd`/$user
;; ;;
esac esac
usernoext=$user usernoext=$user
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
@ -1767,7 +1767,7 @@ Program name ($prog)? $ECHOTXT"
*) *)
DIRVID=`pwd`/$DIRVID DIRVID=`pwd`/$DIRVID
;; ;;
esac esac
;; ;;
esac esac
fi fi
@ -1809,7 +1809,7 @@ Program name ($prog)? $ECHOTXT"
fi fi
if test $nsolver -gt 0 if test $nsolver -gt 0
then then
if test $nsolver -gt $nprocd if test $nsolver -gt $nprocd
then then
nprocd=$nsolver nprocd=$nsolver
fi fi
@ -1959,7 +1959,7 @@ Program name ($prog)? $ECHOTXT"
then then
qid=$value qid=$value
fi fi
case $qid in case $qid in
s* | S* | l* | L* | v* | V* ) s* | S* | l* | L* | v* | V* )
$ECHO "Queue priority ($priority)? $ECHOTXT" $ECHO "Queue priority ($priority)? $ECHOTXT"
read value read value
@ -2017,42 +2017,42 @@ esac
done done
# #
if test $nt -eq 0 if test $nt -eq 0
then then
ntarg= ntarg=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
ntprint= ntprint=
fi fi
if test $nt -eq 0 if test $nt -eq 0
then then
nt= nt=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
ntearg= ntearg=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nteprint= nteprint=
fi fi
if test $nte -eq 0 if test $nte -eq 0
then then
nte= nte=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsarg= ntsarg=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
ntsprint= ntsprint=
fi fi
if test $nts -eq 0 if test $nts -eq 0
then then
nts= nts=
fi fi
# #
@ -2305,7 +2305,7 @@ fi
execpath=$usernoext.marc execpath=$usernoext.marc
usersub=1 usersub=1
fi fi
export execpath export execpath
execname=`$BASENAME $execpath` execname=`$BASENAME $execpath`
if test "$host" if test "$host"
@ -2338,7 +2338,7 @@ fi
exit 1 exit 1
fi fi
# check for Myrinet that the number of processes per host is # check for Myrinet that the number of processes per host is
# less than number of available user ports, 5 # less than number of available user ports, 5
# .gmpi directory must exist in user's home directory # .gmpi directory must exist in user's home directory
# and must have write permission from remote hosts # and must have write permission from remote hosts
@ -2452,9 +2452,9 @@ fi
then then
# Intel MPI # Intel MPI
if test -f $jid.mfile if test -f $jid.mfile
then then
/bin/rm $jid.mfile 2> /dev/null /bin/rm $jid.mfile 2> /dev/null
fi fi
/bin/cp $host $jid.host /bin/cp $host $jid.host
grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile
# end Intel MPI for DMP # end Intel MPI for DMP
@ -2538,7 +2538,7 @@ fi
else else
host=$jid.host host=$jid.host
host_filt=$host host_filt=$host
if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi"
then then
host_filt=$jid.mfile host_filt=$jid.mfile
fi fi
@ -2547,7 +2547,7 @@ fi
# or distributed and set the variable "dirstatus" accordingly. # or distributed and set the variable "dirstatus" accordingly.
# only perform the check if user subroutine is used # only perform the check if user subroutine is used
# or a user subroutine executable is used # or a user subroutine executable is used
numfield=1 numfield=1
if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware
then then
@ -2707,7 +2707,7 @@ fi
fi fi
# modify new host file if NFS mounted heterogeneous machine # modify new host file if NFS mounted heterogeneous machine
doit= doit=
if test $program = $prog.marc if test $program = $prog.marc
then then
doit=yes doit=yes
fi fi
@ -2731,23 +2731,23 @@ if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \
printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
/bin/mv $jid.host{$$} $jid.host /bin/mv $jid.host{$$} $jid.host
host=$jid.host host=$jid.host
fi fi
fi fi
done done
fi fi
fi # if test $program = $prog.marc -o $user -o $obj fi # if test $program = $prog.marc -o $user -o $obj
else # if test $host else # if test $host
# assume shared memory machine if no hostfile given and # assume shared memory machine if no hostfile given and
# MPITYPE is set to mpich or Myrinet # MPITYPE is set to mpich or Myrinet
# check for Myrinet that the total number of processes is # check for Myrinet that the total number of processes is
# less than number of available user ports, 5 # less than number of available user ports, 5
if test $MPITYPE = "mpich" -o $MPITYPE = "scali" if test $MPITYPE = "mpich" -o $MPITYPE = "scali"
then then
numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'`
echo `hostname` $numproc $execpath > $jid.host echo `hostname` $numproc $execpath > $jid.host
host=$jid.host host=$jid.host
elif test $MPITYPE = "myrinet" elif test $MPITYPE = "myrinet"
then then
if test $nprocd -gt 5 if test $nprocd -gt 5
then then
@ -2787,7 +2787,7 @@ printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$}
fi # if test $host fi # if test $host
fi # if test $nprocd -gt 1 fi # if test $nprocd -gt 1
fi # if test $program = $exefile -o $program = $prog.marc fi # if test $program = $exefile -o $program = $prog.marc
############################################################################## ##############################################################################
@ -2837,7 +2837,7 @@ else
nsolverarg="$nsolverarg $nsolver" nsolverarg="$nsolverarg $nsolver"
fi fi
if test $nprocdddm -lt 2 -a $nsolver -eq 0 if test $nprocdddm -lt 2 -a $nsolver -eq 0
then then
nprocd=0 nprocd=0
fi fi
if test $nprocd -gt 0 if test $nprocd -gt 0
@ -2848,7 +2848,7 @@ then
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -2953,7 +2953,7 @@ $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB "
then then
echo " " echo " "
echo "error: parallel job attempted on non-parallel version," echo "error: parallel job attempted on non-parallel version,"
echo " or, if parallel version is installed, the include " echo " or, if parallel version is installed, the include "
echo " file is probably corrupted" echo " file is probably corrupted"
echo " " echo " "
if test "$deletelog" = no if test "$deletelog" = no
@ -3241,6 +3241,7 @@ else
fi fi
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3283,7 +3284,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
fi fi
else else
if test $cpdll = yes; then if test $cpdll = yes; then
@ -3292,10 +3293,10 @@ else
fi fi
if test $rmdll = yes if test $rmdll = yes
then then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
then then
numdom=$nprocdddm numdom=$nprocdddm
@ -3363,15 +3364,15 @@ else
# #
QUENAME=qsub QUENAME=qsub
SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid"
if test "$priority" if test "$priority"
then then
SUBMCMD=$SUBMCMD" -p $priority" SUBMCMD=$SUBMCMD" -p $priority"
fi fi
if test "$att" if test "$att"
then then
SUBMCMD=$SUBMCMD" -a $att" SUBMCMD=$SUBMCMD" -a $att"
fi fi
if test "$cpu" if test "$cpu"
then then
SUBMCMD=$SUBMCMD" -lt $cpu" SUBMCMD=$SUBMCMD" -lt $cpu"
fi fi
@ -3553,7 +3554,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3573,6 +3574,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# #
# run marc # run marc
@ -3621,7 +3623,7 @@ fi
if test $dllrun -eq 0; then if test $dllrun -eq 0; then
if test $prgsav = no if test $prgsav = no
then then
/bin/rm -f $bd$program 2>/dev/null /bin/rm -f $bd$program 2>/dev/null
# for network run, remove executable on remote machines # for network run, remove executable on remote machines
# and executables with modified name # and executables with modified name
if test $nprocd -gt 1 if test $nprocd -gt 1
@ -3670,7 +3672,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi
if test $nprocdddm -gt 1 if test $nprocdddm -gt 1
@ -3887,7 +3889,7 @@ then
then then
counter=$((counter+1)) counter=$((counter+1))
if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes"
then then
DIR1=$DIRJOB DIR1=$DIRJOB
line=`grep -v '^#' $userhost | grep "^$ibase "` line=`grep -v '^#' $userhost | grep "^$ibase "`
workdir=`echo $line | $AWK '{print $3}'` workdir=`echo $line | $AWK '{print $3}'`
@ -3907,6 +3909,7 @@ else # if test $link
fi # if test $link fi # if test $link
/bin/rm $userobj 2>/dev/null /bin/rm $userobj 2>/dev/null
/bin/rm $DIRJOB/*.mod 2>/dev/null /bin/rm $DIRJOB/*.mod 2>/dev/null
/bin/rm $DIRJOB/*.smod 2>/dev/null
# done if no job id given # done if no job id given
if test -z "$jid" if test -z "$jid"
then then
@ -3946,7 +3949,7 @@ if test $ddm_arc -gt 0; then
RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc " RUN_JOB="$MESHERDIR/sf_exeddm $RUN_JOB -ddm $ddm_arc "
fi fi
$RUN_JOB $RUN_JOB
if test $nprocd -gt 1 if test $nprocd -gt 1
then then
@ -4029,7 +4032,7 @@ else
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
fi fi
if test $rmdll = yes;then if test $rmdll = yes;then
/bin/rm -f $DIRJOB/$marcdll 2>/dev/null /bin/rm -f $DIRJOB/$marcdll 2>/dev/null
fi fi
fi fi

View File

@ -805,7 +805,7 @@ class Rotation:
"""Rotation matrix to Bunge-Euler angles.""" """Rotation matrix to Bunge-Euler angles."""
with np.errstate(invalid='ignore',divide='ignore'): with np.errstate(invalid='ignore',divide='ignore'):
zeta = 1.0/np.sqrt(1.0-om[...,2,2:3]**2) zeta = 1.0/np.sqrt(1.0-om[...,2,2:3]**2)
eu = np.where(np.isclose(np.abs(om[...,2,2:3]),1.0,1e-9), eu = np.where(np.isclose(np.abs(om[...,2,2:3]),1.0,0.0),
np.block([np.arctan2(om[...,0,1:2],om[...,0,0:1]), np.block([np.arctan2(om[...,0,1:2],om[...,0,0:1]),
np.pi*0.5*(1-om[...,2,2:3]), np.pi*0.5*(1-om[...,2,2:3]),
np.zeros(om.shape[:-2]+(1,)), np.zeros(om.shape[:-2]+(1,)),

View File

@ -150,7 +150,7 @@ def om2qu(a):
def om2eu(om): def om2eu(om):
"""Rotation matrix to Bunge-Euler angles.""" """Rotation matrix to Bunge-Euler angles."""
if not np.isclose(np.abs(om[2,2]),1.0,1.e-9): if not np.isclose(np.abs(om[2,2]),1.0,0.0):
zeta = 1.0/np.sqrt(1.0-om[2,2]**2) zeta = 1.0/np.sqrt(1.0-om[2,2]**2)
eu = np.array([np.arctan2(om[2,0]*zeta,-om[2,1]*zeta), eu = np.array([np.arctan2(om[2,0]*zeta,-om[2,1]*zeta),
np.arccos(om[2,2]), np.arccos(om[2,2]),

View File

@ -248,7 +248,7 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyS
endif validCalculation endif validCalculation
if (debugCPFEM%extensive & if (debugCPFEM%extensive &
.and. (debugCPFEM%element == elCP .and. debugCPFEM%ip == ip) .or. .not. debugCPFEM%selective) then .and. ((debugCPFEM%element == elCP .and. debugCPFEM%ip == ip) .or. .not. debugCPFEM%selective)) then
write(6,'(a,i8,1x,i2,/,12x,6(f10.3,1x)/)') & write(6,'(a,i8,1x,i2,/,12x,6(f10.3,1x)/)') &
'<< CPFEM >> stress/MPa at elFE ip ', elFE, ip, CPFEM_cs(1:6,ip,elCP)*1.0e-6_pReal '<< CPFEM >> stress/MPa at elFE ip ', elFE, ip, CPFEM_cs(1:6,ip,elCP)*1.0e-6_pReal
write(6,'(a,i8,1x,i2,/,6(12x,6(f10.3,1x)/))') & write(6,'(a,i8,1x,i2,/,6(12x,6(f10.3,1x)/))') &

View File

@ -529,6 +529,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'unknown material parameter:' msg = 'unknown material parameter:'
case (211) case (211)
msg = 'material parameter out of bounds:' msg = 'material parameter out of bounds:'
case (212)
msg = 'nonlocal model not supported'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! numerics error messages ! numerics error messages

View File

@ -15,7 +15,8 @@ module constitutive
use results use results
use lattice use lattice
use discretization use discretization
use geometry_plastic_nonlocal use geometry_plastic_nonlocal, only: &
geometry_plastic_nonlocal_disable
implicit none implicit none
private private

View File

@ -386,7 +386,11 @@ module subroutine plastic_nonlocal_init
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState) call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
plasticState(p)%nonlocal = config%KeyExists('/nonlocal/') plasticState(p)%nonlocal = config%KeyExists('/nonlocal/')
if(plasticState(p)%nonlocal .and. .not. allocated(IPneighborhood)) &
call IO_error(212,ext_msg='IPneighborhood does not exist')
plasticState(p)%offsetDeltaState = 0 ! ToDo: state structure does not follow convention plasticState(p)%offsetDeltaState = 0 ! ToDo: state structure does not follow convention
st0%rho => plasticState(p)%state0 (0*prm%sum_N_sl+1:10*prm%sum_N_sl,:) st0%rho => plasticState(p)%state0 (0*prm%sum_N_sl+1:10*prm%sum_N_sl,:)

View File

@ -118,6 +118,7 @@ subroutine discretization_grid_init(restart)
call results_addAttribute('origin',origin, 'geometry') call results_addAttribute('origin',origin, 'geometry')
call results_closeJobFile call results_closeJobFile
endif endif
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! geometry information required by the nonlocal CP model ! geometry information required by the nonlocal CP model
call geometry_plastic_nonlocal_setIPvolume(reshape([(product(mySize/real(myGrid,pReal)),j=1,product(myGrid))], & call geometry_plastic_nonlocal_setIPvolume(reshape([(product(mySize/real(myGrid,pReal)),j=1,product(myGrid))], &

View File

@ -21,24 +21,24 @@ module discretization_marc
implicit none implicit none
private private
type tCellNodeDefinition type tCellNodeDefinition
integer, dimension(:,:), allocatable :: parents integer, dimension(:,:), allocatable :: parents
integer, dimension(:,:), allocatable :: weights integer, dimension(:,:), allocatable :: weights
end type tCellNodeDefinition end type tCellNodeDefinition
type(tCellNodeDefinition), dimension(:), allocatable :: cellNodeDefinition type(tCellNodeDefinition), dimension(:), allocatable :: cellNodeDefinition
real(pReal), public, protected :: & real(pReal), public, protected :: &
mesh_unitlength !< physical length of one unit in mesh mesh_unitlength !< physical length of one unit in mesh
integer, dimension(:), allocatable, public :: & integer, dimension(:), allocatable, public :: &
mesh_FEM2DAMASK_elem, & !< DAMASK element ID for Marc element ID mesh_FEM2DAMASK_elem, & !< DAMASK element ID for Marc element ID
mesh_FEM2DAMASK_node !< DAMASK node ID for Marc node ID mesh_FEM2DAMASK_node !< DAMASK node ID for Marc node ID
public :: & public :: &
discretization_marc_init discretization_marc_init
contains contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -68,16 +68,16 @@ subroutine discretization_marc_init
connectivity_elem connectivity_elem
real(pReal), dimension(:,:,:,:),allocatable :: & real(pReal), dimension(:,:,:,:),allocatable :: &
unscaledNormals unscaledNormals
class(tNode), pointer :: & class(tNode), pointer :: &
num_commercialFEM num_commercialFEM
write(6,'(/,a)') ' <<<+- discretization_marc init -+>>>'; flush(6) write(6,'(/,a)') ' <<<+- discretization_marc init -+>>>'; flush(6)
!--------------------------------------------------------------------------------- !---------------------------------------------------------------------------------
! read debug parameters ! read debug parameters
debug_e = debug_root%get_asInt('element',defaultVal=1) debug_e = debug_root%get_asInt('element',defaultVal=1)
debug_i = debug_root%get_asInt('integrationpoint',defaultVal=1) debug_i = debug_root%get_asInt('integrationpoint',defaultVal=1)
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
! read numerics parameter and do sanity check ! read numerics parameter and do sanity check
@ -90,10 +90,10 @@ subroutine discretization_marc_init
if (debug_e < 1 .or. debug_e > nElems) call IO_error(602,ext_msg='element') if (debug_e < 1 .or. debug_e > nElems) call IO_error(602,ext_msg='element')
if (debug_i < 1 .or. debug_i > elem%nIPs) call IO_error(602,ext_msg='IP') if (debug_i < 1 .or. debug_i > elem%nIPs) call IO_error(602,ext_msg='IP')
FEsolving_execElem = [1,nElems] FEsolving_execElem = [1,nElems]
FEsolving_execIP = [1,elem%nIPs] FEsolving_execIP = [1,elem%nIPs]
allocate(cellNodeDefinition(elem%nNodes-1)) allocate(cellNodeDefinition(elem%nNodes-1))
allocate(connectivity_cell(elem%NcellNodesPerCell,elem%nIPs,nElems)) allocate(connectivity_cell(elem%NcellNodesPerCell,elem%nIPs,nElems))
call buildCells(connectivity_cell,cellNodeDefinition,& call buildCells(connectivity_cell,cellNodeDefinition,&
@ -108,7 +108,7 @@ subroutine discretization_marc_init
call discretization_init(microstructureAt,homogenizationAt,& call discretization_init(microstructureAt,homogenizationAt,&
IP_reshaped,& IP_reshaped,&
node0_cell) node0_cell)
call writeGeometry(elem,connectivity_elem,& call writeGeometry(elem,connectivity_elem,&
reshape(connectivity_cell,[elem%NcellNodesPerCell,elem%nIPs*nElems]),& reshape(connectivity_cell,[elem%NcellNodesPerCell,elem%nIPs*nElems]),&
node0_cell,IP_reshaped) node0_cell,IP_reshaped)
@ -119,8 +119,9 @@ subroutine discretization_marc_init
unscaledNormals = IPareaNormal(elem,nElems,connectivity_cell,node0_cell) unscaledNormals = IPareaNormal(elem,nElems,connectivity_cell,node0_cell)
call geometry_plastic_nonlocal_setIParea(norm2(unscaledNormals,1)) call geometry_plastic_nonlocal_setIParea(norm2(unscaledNormals,1))
call geometry_plastic_nonlocal_setIPareaNormal(unscaledNormals/spread(norm2(unscaledNormals,1),1,3)) call geometry_plastic_nonlocal_setIPareaNormal(unscaledNormals/spread(norm2(unscaledNormals,1),1,3))
!call geometry_plastic_nonlocal_setIPneighborhood ToDo: Support nonlocal
call geometry_plastic_nonlocal_results call geometry_plastic_nonlocal_results
end subroutine discretization_marc_init end subroutine discretization_marc_init
@ -139,7 +140,7 @@ subroutine writeGeometry(elem, &
real(pReal), dimension(:,:), intent(in) :: & real(pReal), dimension(:,:), intent(in) :: &
coordinates_nodes, & coordinates_nodes, &
coordinates_points coordinates_points
integer, dimension(:,:), allocatable :: & integer, dimension(:,:), allocatable :: &
connectivity_temp connectivity_temp
real(pReal), dimension(:,:), allocatable :: & real(pReal), dimension(:,:), allocatable :: &
@ -147,24 +148,24 @@ subroutine writeGeometry(elem, &
call results_openJobFile call results_openJobFile
call results_closeGroup(results_addGroup('geometry')) call results_closeGroup(results_addGroup('geometry'))
connectivity_temp = connectivity_elem connectivity_temp = connectivity_elem
call results_writeDataset('geometry',connectivity_temp,'T_e',& call results_writeDataset('geometry',connectivity_temp,'T_e',&
'connectivity of the elements','-') 'connectivity of the elements','-')
connectivity_temp = connectivity_cell connectivity_temp = connectivity_cell
call results_writeDataset('geometry',connectivity_temp,'T_c', & call results_writeDataset('geometry',connectivity_temp,'T_c', &
'connectivity of the cells','-') 'connectivity of the cells','-')
call results_addAttribute('VTK_TYPE',elem%vtkType,'geometry/T_c') call results_addAttribute('VTK_TYPE',elem%vtkType,'geometry/T_c')
coordinates_temp = coordinates_nodes coordinates_temp = coordinates_nodes
call results_writeDataset('geometry',coordinates_temp,'x_n', & call results_writeDataset('geometry',coordinates_temp,'x_n', &
'initial coordinates of the nodes','m') 'initial coordinates of the nodes','m')
coordinates_temp = coordinates_points coordinates_temp = coordinates_points
call results_writeDataset('geometry',coordinates_temp,'x_p', & call results_writeDataset('geometry',coordinates_temp,'x_p', &
'initial coordinates of the materialpoints','m') 'initial coordinates of the materialpoints','m')
call results_closeJobFile call results_closeJobFile
end subroutine writeGeometry end subroutine writeGeometry
@ -183,7 +184,7 @@ subroutine inputRead(elem,node0_elem,connectivity_elem,microstructureAt,homogeni
integer, dimension(:), allocatable, intent(out) :: & integer, dimension(:), allocatable, intent(out) :: &
microstructureAt, & microstructureAt, &
homogenizationAt homogenizationAt
integer :: & integer :: &
fileFormatVersion, & fileFormatVersion, &
hypoelasticTableStyle, & hypoelasticTableStyle, &
@ -193,7 +194,7 @@ subroutine inputRead(elem,node0_elem,connectivity_elem,microstructureAt,homogeni
integer, dimension(:), allocatable :: & integer, dimension(:), allocatable :: &
matNumber !< material numbers for hypoelastic material matNumber !< material numbers for hypoelastic material
character(len=pStringLen), dimension(:), allocatable :: inputFile !< file content, separated per lines character(len=pStringLen), dimension(:), allocatable :: inputFile !< file content, separated per lines
character(len=pStringLen), dimension(:), allocatable :: & character(len=pStringLen), dimension(:), allocatable :: &
nameElemSet nameElemSet
integer, dimension(:,:), allocatable :: & integer, dimension(:,:), allocatable :: &
@ -209,8 +210,8 @@ subroutine inputRead(elem,node0_elem,connectivity_elem,microstructureAt,homogeni
hypoelasticTableStyle,inputFile) hypoelasticTableStyle,inputFile)
call inputRead_NnodesAndElements(nNodes,nElems,& call inputRead_NnodesAndElements(nNodes,nElems,&
inputFile) inputFile)
call inputRead_mapElemSets(nameElemSet,mapElemSet,& call inputRead_mapElemSets(nameElemSet,mapElemSet,&
inputFile) inputFile)
@ -239,13 +240,13 @@ end subroutine inputRead
!> @brief Figures out version of Marc input file format !> @brief Figures out version of Marc input file format
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine inputRead_fileFormat(fileFormat,fileContent) subroutine inputRead_fileFormat(fileFormat,fileContent)
integer, intent(out) :: fileFormat integer, intent(out) :: fileFormat
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
integer, allocatable, dimension(:) :: chunkPos integer, allocatable, dimension(:) :: chunkPos
integer :: l integer :: l
do l = 1, size(fileContent) do l = 1, size(fileContent)
chunkPos = IO_stringPos(fileContent(l)) chunkPos = IO_stringPos(fileContent(l))
if(chunkPos(1) < 2) cycle if(chunkPos(1) < 2) cycle
@ -262,13 +263,13 @@ end subroutine inputRead_fileFormat
!> @brief Figures out table styles for initial cond and hypoelastic !> @brief Figures out table styles for initial cond and hypoelastic
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine inputRead_tableStyles(initialcond,hypoelastic,fileContent) subroutine inputRead_tableStyles(initialcond,hypoelastic,fileContent)
integer, intent(out) :: initialcond, hypoelastic integer, intent(out) :: initialcond, hypoelastic
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
integer, allocatable, dimension(:) :: chunkPos integer, allocatable, dimension(:) :: chunkPos
integer :: l integer :: l
initialcond = 0 initialcond = 0
hypoelastic = 0 hypoelastic = 0
@ -290,7 +291,7 @@ end subroutine inputRead_tableStyles
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine inputRead_matNumber(matNumber, & subroutine inputRead_matNumber(matNumber, &
tableStyle,fileContent) tableStyle,fileContent)
integer, allocatable, dimension(:), intent(out) :: matNumber integer, allocatable, dimension(:), intent(out) :: matNumber
integer, intent(in) :: tableStyle integer, intent(in) :: tableStyle
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
@ -326,7 +327,7 @@ end subroutine inputRead_matNumber
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine inputRead_NnodesAndElements(nNodes,nElems,& subroutine inputRead_NnodesAndElements(nNodes,nElems,&
fileContent) fileContent)
integer, intent(out) :: nNodes, nElems integer, intent(out) :: nNodes, nElems
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
@ -355,7 +356,7 @@ end subroutine inputRead_NnodesAndElements
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine inputRead_NelemSets(nElemSets,maxNelemInSet,& subroutine inputRead_NelemSets(nElemSets,maxNelemInSet,&
fileContent) fileContent)
integer, intent(out) :: nElemSets, maxNelemInSet integer, intent(out) :: nElemSets, maxNelemInSet
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
@ -401,7 +402,7 @@ end subroutine inputRead_NelemSets
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine inputRead_mapElemSets(nameElemSet,mapElemSet,& subroutine inputRead_mapElemSets(nameElemSet,mapElemSet,&
fileContent) fileContent)
character(len=pStringLen), dimension(:), allocatable, intent(out) :: nameElemSet character(len=pStringLen), dimension(:), allocatable, intent(out) :: nameElemSet
integer, dimension(:,:), allocatable, intent(out) :: mapElemSet integer, dimension(:,:), allocatable, intent(out) :: mapElemSet
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
@ -434,7 +435,7 @@ end subroutine inputRead_mapElemSets
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine inputRead_mapElems(FEM2DAMASK, & subroutine inputRead_mapElems(FEM2DAMASK, &
nElems,nNodesPerElem,fileContent) nElems,nNodesPerElem,fileContent)
integer, allocatable, dimension(:), intent(out) :: FEM2DAMASK integer, allocatable, dimension(:), intent(out) :: FEM2DAMASK
integer, intent(in) :: nElems, & !< number of elements integer, intent(in) :: nElems, & !< number of elements
@ -492,8 +493,8 @@ subroutine inputRead_mapNodes(FEM2DAMASK, &
chunkPos = IO_stringPos(fileContent(l)) chunkPos = IO_stringPos(fileContent(l))
if(chunkPos(1) < 1) cycle if(chunkPos(1) < 1) cycle
if(IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'coordinates') then if(IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'coordinates') then
chunkPos = [1,1,10]
do i = 1,nNodes do i = 1,nNodes
chunkPos = IO_stringPos(fileContent(l+1+i))
map_unsorted(:,i) = [IO_intValue(fileContent(l+1+i),chunkPos,1),i] map_unsorted(:,i) = [IO_intValue(fileContent(l+1+i),chunkPos,1),i]
enddo enddo
exit exit
@ -515,10 +516,10 @@ end subroutine inputRead_mapNodes
subroutine inputRead_elemNodes(nodes, & subroutine inputRead_elemNodes(nodes, &
nNode,fileContent) nNode,fileContent)
real(pReal), allocatable, dimension(:,:), intent(out) :: nodes real(pReal), allocatable, dimension(:,:), intent(out) :: nodes
integer, intent(in) :: nNode integer, intent(in) :: nNode
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
integer, allocatable, dimension(:) :: chunkPos integer, allocatable, dimension(:) :: chunkPos
integer :: i,j,m,l integer :: i,j,m,l
@ -528,8 +529,8 @@ subroutine inputRead_elemNodes(nodes, &
chunkPos = IO_stringPos(fileContent(l)) chunkPos = IO_stringPos(fileContent(l))
if(chunkPos(1) < 1) cycle if(chunkPos(1) < 1) cycle
if(IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'coordinates') then if(IO_lc(IO_stringValue(fileContent(l),chunkPos,1)) == 'coordinates') then
chunkPos = [4,1,10,11,30,31,50,51,70]
do i=1,nNode do i=1,nNode
chunkPos = IO_stringPos(fileContent(l+1+i))
m = mesh_FEM2DAMASK_node(IO_intValue(fileContent(l+1+i),chunkPos,1)) m = mesh_FEM2DAMASK_node(IO_intValue(fileContent(l+1+i),chunkPos,1))
do j = 1,3 do j = 1,3
nodes(j,m) = mesh_unitlength * IO_floatValue(fileContent(l+1+i),chunkPos,j+1) nodes(j,m) = mesh_unitlength * IO_floatValue(fileContent(l+1+i),chunkPos,j+1)
@ -580,15 +581,15 @@ subroutine inputRead_elemType(elem, &
endif endif
enddo enddo
contains contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief mapping of Marc element types to internal representation !> @brief mapping of Marc element types to internal representation
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
integer function mapElemtype(what) integer function mapElemtype(what)
character(len=*), intent(in) :: what character(len=*), intent(in) :: what
select case (IO_lc(what)) select case (IO_lc(what))
case ( '6') case ( '6')
mapElemtype = 1 ! Two-dimensional Plane Strain Triangle mapElemtype = 1 ! Two-dimensional Plane Strain Triangle
@ -630,20 +631,20 @@ end subroutine inputRead_elemType
!> @brief Stores node IDs !> @brief Stores node IDs
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function inputRead_connectivityElem(nElem,nNodes,fileContent) function inputRead_connectivityElem(nElem,nNodes,fileContent)
integer, intent(in) :: & integer, intent(in) :: &
nElem, & nElem, &
nNodes !< number of nodes per element nNodes !< number of nodes per element
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
integer, dimension(nNodes,nElem) :: & integer, dimension(nNodes,nElem) :: &
inputRead_connectivityElem inputRead_connectivityElem
integer, allocatable, dimension(:) :: chunkPos integer, allocatable, dimension(:) :: chunkPos
integer, dimension(1+nElem) :: contInts integer, dimension(1+nElem) :: contInts
integer :: i,k,j,t,e,l,nNodesAlreadyRead integer :: i,k,j,t,e,l,nNodesAlreadyRead
do l = 1, size(fileContent) do l = 1, size(fileContent)
chunkPos = IO_stringPos(fileContent(l)) chunkPos = IO_stringPos(fileContent(l))
if(chunkPos(1) < 1) cycle if(chunkPos(1) < 1) cycle
@ -694,7 +695,7 @@ subroutine inputRead_microstructureAndHomogenization(microstructureAt,homogeniza
character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines character(len=*), dimension(:), intent(in) :: fileContent !< file content, separated per lines
integer, allocatable, dimension(:) :: chunkPos integer, allocatable, dimension(:) :: chunkPos
integer, dimension(1+nElem) :: contInts integer, dimension(1+nElem) :: contInts
integer :: i,j,t,sv,myVal,e,nNodesAlreadyRead,l,k,m integer :: i,j,t,sv,myVal,e,nNodesAlreadyRead,l,k,m
@ -727,42 +728,41 @@ subroutine inputRead_microstructureAndHomogenization(microstructureAt,homogeniza
endif endif
endif endif
enddo enddo
end subroutine inputRead_microstructureAndHomogenization end subroutine inputRead_microstructureAndHomogenization
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Calculates cell node coordinates from element node coordinates !> @brief Determine cell connectivity and definition of cell nodes
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine buildCells(connectivity_cell,cellNodeDefinition, & subroutine buildCells(connectivity_cell,cellNodeDefinition, &
elem,connectivity_elem) elem,connectivity_elem)
type(tCellNodeDefinition), dimension(:), intent(out) :: cellNodeDefinition ! definition of cell nodes for increasing number of parents type(tCellNodeDefinition), dimension(:), intent(out) :: cellNodeDefinition ! definition of cell nodes for increasing number of parents
integer, dimension(:,:,:),intent(out) :: connectivity_cell integer, dimension(:,:,:),intent(out) :: connectivity_cell
type(tElement), intent(in) :: elem ! element definition type(tElement), intent(in) :: elem ! element definition
integer, dimension(:,:), intent(in) :: connectivity_elem ! connectivity of the elements integer, dimension(:,:), intent(in) :: connectivity_elem ! connectivity of the elements
integer,dimension(:), allocatable :: candidates_local integer,dimension(:), allocatable :: candidates_local
integer,dimension(:,:), allocatable :: parentsAndWeights,candidates_global integer,dimension(:,:), allocatable :: parentsAndWeights,candidates_global
integer :: e, n, c, p, s,i,m,j,nParentNodes,nCellNode,Nelem,candidateID integer :: e,n,c,p,s,i,m,j,&
nParentNodes,nCellNode,Nelem,candidateID
Nelem = size(connectivity_elem,2) Nelem = size(connectivity_elem,2)
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
! initialize global connectivity to negative local connectivity ! initialize global connectivity to negative local connectivity
connectivity_cell = -spread(elem%cell,3,Nelem) ! local cell node ID connectivity_cell = -spread(elem%cell,3,Nelem) ! local cell node ID
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
! set connectivity of cell nodes that coincide with FE nodes (defined by 1 parent node) ! set connectivity of cell nodes that coincide with FE nodes (defined by 1 parent node)
! and renumber local (negative) to global (positive) node ID ! and renumber local (negative) to global (positive) node ID
do e = 1, Nelem do e = 1, Nelem
do c = 1, elem%NcellNodes do c = 1, elem%NcellNodes
realNode: if (count(elem%cellNodeParentNodeWeights(:,c) /= 0) == 1) then realNode: if (count(elem%cellNodeParentNodeWeights(:,c) /= 0) == 1) then
where(connectivity_cell(:,:,e) == -c) where(connectivity_cell(:,:,e) == -c) connectivity_cell(:,:,e) = connectivity_elem(c,e)
connectivity_cell(:,:,e) = connectivity_elem(c,e)
end where
endif realNode endif realNode
enddo enddo
enddo enddo
@ -772,7 +772,7 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
! set connectivity of cell nodes that are defined by 2,...,nNodes real nodes ! set connectivity of cell nodes that are defined by 2,...,nNodes real nodes
do nParentNodes = 2, elem%nNodes do nParentNodes = 2, elem%nNodes
! get IDs of local cell nodes that are defined by the current number of parent nodes ! get IDs of local cell nodes that are defined by the current number of parent nodes
candidates_local = [integer::] candidates_local = [integer::]
do c = 1, elem%NcellNodes do c = 1, elem%NcellNodes
@ -780,11 +780,11 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
candidates_local = [candidates_local,c] candidates_local = [candidates_local,c]
enddo enddo
s = size(candidates_local) s = size(candidates_local)
if (allocated(candidates_global)) deallocate(candidates_global) if (allocated(candidates_global)) deallocate(candidates_global)
allocate(candidates_global(nParentNodes*2+2,s*Nelem)) ! stores parent node ID + weight together with element ID and cellnode id (local) allocate(candidates_global(nParentNodes*2+2,s*Nelem)) ! stores parent node ID + weight together with element ID and cellnode id (local)
parentsAndWeights = reshape([(0, i = 1,2*nParentNodes)],[nParentNodes,2]) ! (re)allocate parentsAndWeights = reshape([(0, i = 1,2*nParentNodes)],[nParentNodes,2]) ! (re)allocate
do e = 1, Nelem do e = 1, Nelem
do i = 1, size(candidates_local) do i = 1, size(candidates_local)
candidateID = (e-1)*size(candidates_local)+i ! including duplicates, runs to (Nelem*size(candidates_local)) candidateID = (e-1)*size(candidates_local)+i ! including duplicates, runs to (Nelem*size(candidates_local))
@ -792,18 +792,18 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
p = 0 p = 0
do j = 1, size(elem%cellNodeParentNodeWeights(:,c)) do j = 1, size(elem%cellNodeParentNodeWeights(:,c))
if (elem%cellNodeParentNodeWeights(j,c) /= 0) then ! real node 'j' partly defines cell node 'c' if (elem%cellNodeParentNodeWeights(j,c) /= 0) then ! real node 'j' partly defines cell node 'c'
p = p + 1 p = p + 1
parentsAndWeights(p,1:2) = [connectivity_elem(j,e),elem%cellNodeParentNodeWeights(j,c)] parentsAndWeights(p,1:2) = [connectivity_elem(j,e),elem%cellNodeParentNodeWeights(j,c)]
endif endif
enddo enddo
! store (and order) real node IDs and their weights together with the element number and local ID ! store (and order) real node IDs and their weights together with the element number and local ID
do p = 1, nParentNodes do p = 1, nParentNodes
m = maxloc(parentsAndWeights(:,1),1) m = maxloc(parentsAndWeights(:,1),1)
candidates_global(p, candidateID) = parentsAndWeights(m,1) candidates_global(p, candidateID) = parentsAndWeights(m,1)
candidates_global(p+nParentNodes, candidateID) = parentsAndWeights(m,2) candidates_global(p+nParentNodes, candidateID) = parentsAndWeights(m,2)
candidates_global(nParentNodes*2+1:nParentNodes*2+2,candidateID) = [e,c] candidates_global(nParentNodes*2+1:nParentNodes*2+2,candidateID) = [e,c]
parentsAndWeights(m,1) = -huge(parentsAndWeights(m,1)) ! out of the competition parentsAndWeights(m,1) = -huge(parentsAndWeights(m,1)) ! out of the competition
enddo enddo
enddo enddo
@ -811,7 +811,7 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
! sort according to real node IDs + weight (from left to right) ! sort according to real node IDs + weight (from left to right)
call math_sort(candidates_global,sortDim=1) ! sort according to first column call math_sort(candidates_global,sortDim=1) ! sort according to first column
do p = 2, nParentNodes*2 do p = 2, nParentNodes*2
n = 1 n = 1
do while(n <= size(candidates_local)*Nelem) do while(n <= size(candidates_local)*Nelem)
@ -826,11 +826,11 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
n = e+1 n = e+1
enddo enddo
enddo enddo
i = uniqueRows(candidates_global(1:2*nParentNodes,:)) i = uniqueRows(candidates_global(1:2*nParentNodes,:))
allocate(cellNodeDefinition(nParentNodes-1)%parents(i,nParentNodes)) allocate(cellNodeDefinition(nParentNodes-1)%parents(i,nParentNodes))
allocate(cellNodeDefinition(nParentNodes-1)%weights(i,nParentNodes)) allocate(cellNodeDefinition(nParentNodes-1)%weights(i,nParentNodes))
i = 1 i = 1
n = 1 n = 1
do while(n <= size(candidates_local)*Nelem) do while(n <= size(candidates_local)*Nelem)
@ -846,7 +846,7 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
where (connectivity_cell(:,:,candidates_global(nParentNodes*2+1,n+j)) == -candidates_global(nParentNodes*2+2,n+j)) ! still locally defined where (connectivity_cell(:,:,candidates_global(nParentNodes*2+1,n+j)) == -candidates_global(nParentNodes*2+2,n+j)) ! still locally defined
connectivity_cell(:,:,candidates_global(nParentNodes*2+1,n+j)) = nCellNode + 1 ! gets current new cell node id connectivity_cell(:,:,candidates_global(nParentNodes*2+1,n+j)) = nCellNode + 1 ! gets current new cell node id
end where end where
j = j+1 j = j+1
enddo enddo
nCellNode = nCellNode + 1 nCellNode = nCellNode + 1
@ -863,7 +863,7 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
!> @brief count unique rows (same rows need to be stored consecutively) !> @brief count unique rows (same rows need to be stored consecutively)
!------------------------------------------------------------------------------------------------ !------------------------------------------------------------------------------------------------
pure function uniqueRows(A) result(u) pure function uniqueRows(A) result(u)
integer, dimension(:,:), intent(in) :: A !< array, rows need to be sorted integer, dimension(:,:), intent(in) :: A !< array, rows need to be sorted
integer :: & integer :: &
@ -882,14 +882,14 @@ subroutine buildCells(connectivity_cell,cellNodeDefinition, &
u = u+1 u = u+1
r = r+d r = r+d
enddo enddo
end function uniqueRows end function uniqueRows
end subroutine buildCells end subroutine buildCells
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Calculates cell node coordinates from element node coordinates !> @brief Calculate cell node coordinates from element node coordinates
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine buildCellNodes(node_cell, & subroutine buildCellNodes(node_cell, &
definition,node_elem) definition,node_elem)
@ -897,9 +897,9 @@ subroutine buildCellNodes(node_cell, &
real(pReal), dimension(:,:), intent(out) :: node_cell !< cell node coordinates real(pReal), dimension(:,:), intent(out) :: node_cell !< cell node coordinates
type(tCellNodeDefinition), dimension(:), intent(in) :: definition !< cell node definition (weights and parents) type(tCellNodeDefinition), dimension(:), intent(in) :: definition !< cell node definition (weights and parents)
real(pReal), dimension(:,:), intent(in) :: node_elem !< element nodes real(pReal), dimension(:,:), intent(in) :: node_elem !< element nodes
integer :: i, j, k, n integer :: i, j, k, n
n = size(node_elem,2) n = size(node_elem,2)
node_cell(:,1:n) = node_elem !< initial nodes coincide with element nodes node_cell(:,1:n) = node_elem !< initial nodes coincide with element nodes
@ -914,12 +914,12 @@ subroutine buildCellNodes(node_cell, &
node_cell(:,n) = node_cell(:,n)/real(sum(definition(i)%weights(j,:)),pReal) node_cell(:,n) = node_cell(:,n)/real(sum(definition(i)%weights(j,:)),pReal)
enddo enddo
enddo enddo
end subroutine buildCellNodes end subroutine buildCellNodes
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Calculates IP coordinates as center of cell !> @brief Calculate IP coordinates as center of cell
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine buildIPcoordinates(IPcoordinates, & subroutine buildIPcoordinates(IPcoordinates, &
connectivity_cell,node_cell) connectivity_cell,node_cell)
@ -927,7 +927,7 @@ subroutine buildIPcoordinates(IPcoordinates, &
real(pReal), dimension(:,:), intent(out):: IPcoordinates !< cell-center/IP coordinates real(pReal), dimension(:,:), intent(out):: IPcoordinates !< cell-center/IP coordinates
integer, dimension(:,:), intent(in) :: connectivity_cell !< connectivity for each cell integer, dimension(:,:), intent(in) :: connectivity_cell !< connectivity for each cell
real(pReal), dimension(:,:), intent(in) :: node_cell !< cell node coordinates real(pReal), dimension(:,:), intent(in) :: node_cell !< cell node coordinates
integer :: i, n integer :: i, n
do i = 1, size(connectivity_cell,2) do i = 1, size(connectivity_cell,2)
@ -938,7 +938,7 @@ subroutine buildIPcoordinates(IPcoordinates, &
enddo enddo
IPcoordinates(:,i) = IPcoordinates(:,i)/real(size(connectivity_cell,1),pReal) IPcoordinates(:,i) = IPcoordinates(:,i)/real(size(connectivity_cell,1),pReal)
enddo enddo
end subroutine buildIPcoordinates end subroutine buildIPcoordinates
@ -948,11 +948,11 @@ end subroutine buildIPcoordinates
!> 2D cells assume an element depth of 1.0 !> 2D cells assume an element depth of 1.0
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
function IPvolume(elem,node,connectivity) function IPvolume(elem,node,connectivity)
type(tElement), intent(in) :: elem type(tElement), intent(in) :: elem
real(pReal), dimension(:,:), intent(in) :: node real(pReal), dimension(:,:), intent(in) :: node
integer, dimension(:,:,:), intent(in) :: connectivity integer, dimension(:,:,:), intent(in) :: connectivity
real(pReal), dimension(elem%nIPs,size(connectivity,3)) :: IPvolume real(pReal), dimension(elem%nIPs,size(connectivity,3)) :: IPvolume
real(pReal), dimension(3) :: x0,x1,x2,x3,x4,x5,x6,x7 real(pReal), dimension(3) :: x0,x1,x2,x3,x4,x5,x6,x7
@ -1011,19 +1011,19 @@ function IPareaNormal(elem,nElem,connectivity,node)
integer, intent(in) :: nElem integer, intent(in) :: nElem
integer, dimension(:,:,:), intent(in) :: connectivity integer, dimension(:,:,:), intent(in) :: connectivity
real(pReal), dimension(:,:), intent(in) :: node real(pReal), dimension(:,:), intent(in) :: node
real(pReal), dimension(3,elem%nIPneighbors,elem%nIPs,nElem) :: ipAreaNormal real(pReal), dimension(3,elem%nIPneighbors,elem%nIPs,nElem) :: ipAreaNormal
real(pReal), dimension (3,size(elem%cellFace,1)) :: nodePos real(pReal), dimension (3,size(elem%cellFace,1)) :: nodePos
integer :: e,i,f,n,m integer :: e,i,f,n,m
m = size(elem%cellFace,1) m = size(elem%cellFace,1)
do e = 1,nElem do e = 1,nElem
do i = 1,elem%nIPs do i = 1,elem%nIPs
do f = 1,elem%nIPneighbors do f = 1,elem%nIPneighbors
nodePos = node(1:3,connectivity(elem%cellface(1:m,f),i,e)) nodePos = node(1:3,connectivity(elem%cellface(1:m,f),i,e))
select case (elem%cellType) select case (elem%cellType)
case (1,2) ! 2D 3 or 4 node case (1,2) ! 2D 3 or 4 node
IPareaNormal(1,f,i,e) = nodePos(2,2) - nodePos(2,1) ! x_normal = y_connectingVector IPareaNormal(1,f,i,e) = nodePos(2,2) - nodePos(2,1) ! x_normal = y_connectingVector
@ -1038,7 +1038,7 @@ function IPareaNormal(elem,nElem,connectivity,node)
! the sum has to be divided by two; this whole prcedure tries to compensate for ! the sum has to be divided by two; this whole prcedure tries to compensate for
! probable non-planar cell surfaces ! probable non-planar cell surfaces
IPareaNormal(1:3,f,i,e) = 0.0_pReal IPareaNormal(1:3,f,i,e) = 0.0_pReal
do n = 1, m do n = 1, m
IPareaNormal(1:3,f,i,e) = IPareaNormal(1:3,f,i,e) & IPareaNormal(1:3,f,i,e) = IPareaNormal(1:3,f,i,e) &
+ math_cross(nodePos(1:3,mod(n+0,m)+1) - nodePos(1:3,n), & + math_cross(nodePos(1:3,mod(n+0,m)+1) - nodePos(1:3,n), &
nodePos(1:3,mod(n+1,m)+1) - nodePos(1:3,n)) * 0.5_pReal nodePos(1:3,mod(n+1,m)+1) - nodePos(1:3,n)) * 0.5_pReal

View File

@ -464,6 +464,8 @@ subroutine selfTest
real(pReal), dimension(4) :: qu real(pReal), dimension(4) :: qu
type(quaternion) :: q, q_2 type(quaternion) :: q, q_2
if(dNeq(abs(P),1.0_pReal)) call IO_error(0,ext_msg='P not in {-1,+1}')
call random_number(qu) call random_number(qu)
qu = (qu-0.5_pReal) * 2.0_pReal qu = (qu-0.5_pReal) * 2.0_pReal
q = quaternion(qu) q = quaternion(qu)

View File

@ -574,6 +574,7 @@ end function om2qu
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
!> @author Marc De Graef, Carnegie Mellon University !> @author Marc De Graef, Carnegie Mellon University
!> @brief orientation matrix to Euler angles !> @brief orientation matrix to Euler angles
!> @details Two step check for special cases to avoid invalid operations (not needed for python)
!--------------------------------------------------------------------------------------------------- !---------------------------------------------------------------------------------------------------
pure function om2eu(om) result(eu) pure function om2eu(om) result(eu)
@ -581,16 +582,16 @@ pure function om2eu(om) result(eu)
real(pReal), dimension(3) :: eu real(pReal), dimension(3) :: eu
real(pReal) :: zeta real(pReal) :: zeta
if (abs(om(3,3)) < 1.0_pReal) then if (dNeq(abs(om(3,3)),1.0_pReal,1.e-8_pReal)) then
zeta = 1.0_pReal/sqrt(1.0_pReal-om(3,3)**2.0_pReal) zeta = 1.0_pReal/sqrt(math_clip(1.0_pReal-om(3,3)**2.0_pReal,1e-64_pReal,1.0_pReal))
eu = [atan2(om(3,1)*zeta,-om(3,2)*zeta), & eu = [atan2(om(3,1)*zeta,-om(3,2)*zeta), &
acos(om(3,3)), & acos(math_clip(om(3,3),-1.0_pReal,1.0_pReal)), &
atan2(om(1,3)*zeta, om(2,3)*zeta)] atan2(om(1,3)*zeta, om(2,3)*zeta)]
else else
eu = [atan2(om(1,2),om(1,1)), 0.5_pReal*PI*(1.0_pReal-om(3,3)),0.0_pReal ] eu = [atan2(om(1,2),om(1,1)), 0.5_pReal*PI*(1.0_pReal-om(3,3)),0.0_pReal ]
end if end if
where(abs(eu) < 1.e-8_pReal) eu = 0.0_pReal
where(eu<0.0_pReal) eu = mod(eu+2.0_pReal*PI,[2.0_pReal*PI,PI,2.0_pReal*PI]) where(eu<0.0_pReal) eu = mod(eu+2.0_pReal*PI,[2.0_pReal*PI,PI,2.0_pReal*PI])
end function om2eu end function om2eu