Merge branch 'development' of magit1.mpie.de:damask/DAMASK into development
This commit is contained in:
commit
3b88096cd7
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit a764ade044735df35fac93a5204446291ee29abc
|
Subproject commit fa02113fa7a0af3376648e4320318ec337fe79aa
|
|
@ -18,5 +18,5 @@ tau0_slip 405.8e6 456.7e6 # per family
|
||||||
tausat_slip 872.9e6 971.2e6 # per family
|
tausat_slip 872.9e6 971.2e6 # per family
|
||||||
h0_slipslip 563.0e9
|
h0_slipslip 563.0e9
|
||||||
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
|
||||||
w0_slip 2.0
|
a_slip 2.0
|
||||||
(output) totalshear
|
(output) totalshear
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRAN $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTHIGH $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTLOW $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTRAN $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTHIGH $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
|
@ -1,52 +0,0 @@
|
||||||
#!/bin/ksh
|
|
||||||
# 1st arg: $DIR
|
|
||||||
# 2nd arg: $DIRJOB
|
|
||||||
# 3rd arg: $user
|
|
||||||
# 4th arg: $program
|
|
||||||
DIR=$1
|
|
||||||
user=$3
|
|
||||||
program=$4
|
|
||||||
usernoext=$user
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
|
|
||||||
usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
|
|
||||||
|
|
||||||
# add BLAS options for linking
|
|
||||||
BLAS="%BLAS%"
|
|
||||||
|
|
||||||
. $DIR/tools/include
|
|
||||||
DIRJOB=$2
|
|
||||||
cd $DIRJOB
|
|
||||||
echo "Compiling and linking user subroutine $user on host `hostname`"
|
|
||||||
echo "program: $program"
|
|
||||||
$DFORTLOW $user || \
|
|
||||||
{
|
|
||||||
echo "$0: compile failed for $user"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $program 2>/dev/null
|
|
||||||
userobj=$usernoext.o
|
|
||||||
|
|
||||||
|
|
||||||
$LOAD ${program} $DIR/lib/main.o\
|
|
||||||
$DIR/lib/blkdta.o $DIR/lib/comm?.o \
|
|
||||||
${userobj-} \
|
|
||||||
$DIR/lib/srclib.a \
|
|
||||||
$MNFLIBS \
|
|
||||||
$MDUSER \
|
|
||||||
../lib/mdsrc.a \
|
|
||||||
../lib/mcvfit.a \
|
|
||||||
$STUBS \
|
|
||||||
${SOLVERLIBS} \
|
|
||||||
$TKLIBS \
|
|
||||||
$MRCLIBS \
|
|
||||||
$METISLIBS \
|
|
||||||
$BLAS \
|
|
||||||
$SYSLIBS || \
|
|
||||||
{
|
|
||||||
echo "$0: link failed for $usernoext.o on host `hostname`"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
/bin/rm $userobj
|
|
||||||
/bin/rm $DIRJOB/*.mod
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
echo "usage: $0 job_name"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo STOP > $1.cnt
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -1,187 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# The exit status of this script is read by Mentat.
|
|
||||||
# Normal exit status is 0.
|
|
||||||
#
|
|
||||||
|
|
||||||
DIR=%INSTALLDIR%/marc%VERSION%
|
|
||||||
if test $MARCDIR1
|
|
||||||
then
|
|
||||||
DIR=$MARCDIR1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DIR"; then
|
|
||||||
REALCOM="`ls -l $0 |awk '{ print $NF; }'`"
|
|
||||||
DIRSCRIPT=`dirname $REALCOM`
|
|
||||||
case $DIRSCRIPT in
|
|
||||||
\/*)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
DIRSCRIPT=`pwd`/$DIRSCRIPT
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
. $DIRSCRIPT/getarch
|
|
||||||
|
|
||||||
DIR="$MENTAT_MARCDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SRCEXT=.f
|
|
||||||
SRCEXTC=.F
|
|
||||||
RSTEXT=.t08
|
|
||||||
PSTEXT=.t19
|
|
||||||
PSTEXTB=.t16
|
|
||||||
VWFCEXT=.vfs
|
|
||||||
|
|
||||||
slv=$1
|
|
||||||
version=$2
|
|
||||||
ndom_fea_solver=$3
|
|
||||||
ndom_preprocessor=$4
|
|
||||||
hostfile=$5
|
|
||||||
compat=$6
|
|
||||||
job=$7
|
|
||||||
srcfile=$8
|
|
||||||
srcmeth=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
restart=$1
|
|
||||||
postfile=$2
|
|
||||||
viewfactorsfile=$3
|
|
||||||
autorst=$4
|
|
||||||
copy_datfile="-ci $5"
|
|
||||||
copy_postfile="-cr $6"
|
|
||||||
scr_dir=$7
|
|
||||||
dcoup=$8
|
|
||||||
assem_recov_nthread=$9
|
|
||||||
shift 9 # cannot use $10, $11, ...
|
|
||||||
nthread=$1
|
|
||||||
nsolver=$2
|
|
||||||
mode=$3
|
|
||||||
gpu=$4
|
|
||||||
|
|
||||||
if [ "$slv" != "" -a "$slv" != "marc" ]; then
|
|
||||||
slv="-iam sfm"
|
|
||||||
else
|
|
||||||
slv=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then
|
|
||||||
nprocds="-nprocds $ndom_fea_solver"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then
|
|
||||||
nprocd="-nprocd $ndom_preprocessor"
|
|
||||||
else
|
|
||||||
nprocd=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then
|
|
||||||
srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"`
|
|
||||||
case "$srcmeth" in
|
|
||||||
-)
|
|
||||||
srcfile="-u $srcfile"
|
|
||||||
;;
|
|
||||||
compsave)
|
|
||||||
srcfile="-u $srcfile -save y"
|
|
||||||
;;
|
|
||||||
runsaved)
|
|
||||||
srcfile=${srcfile%.*}".marc"
|
|
||||||
srcfile="-prog $srcfile"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
srcfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$restart" != "" -a "$restart" != "-" ]; then
|
|
||||||
restart=`echo $restart | sed "s/$RSTEXT$//"`
|
|
||||||
restart="-r $restart"
|
|
||||||
else
|
|
||||||
restart=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$postfile" != "" -a "$postfile" != "-" ]; then
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXT$//"`
|
|
||||||
postfile=`echo $postfile | sed "s/$PSTEXTB$//"`
|
|
||||||
postfile="-pid $postfile"
|
|
||||||
else
|
|
||||||
postfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then
|
|
||||||
viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"`
|
|
||||||
viewfactorsfile="-vf $viewfactorsfile"
|
|
||||||
else
|
|
||||||
viewfactorsfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then
|
|
||||||
hostfile="-ho $hostfile"
|
|
||||||
else
|
|
||||||
hostfile=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$compat" != "" -a "$compat" != "-" ]; then
|
|
||||||
compat="-co $compat"
|
|
||||||
else
|
|
||||||
compat=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then
|
|
||||||
scr_dir="-sd $scr_dir"
|
|
||||||
else
|
|
||||||
scr_dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then
|
|
||||||
dcoup="-dcoup $dcoup"
|
|
||||||
else
|
|
||||||
dcoup=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then
|
|
||||||
assem_recov_nthread="-nthread_elem $assem_recov_nthread"
|
|
||||||
else
|
|
||||||
assem_recov_nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then
|
|
||||||
nthread="-nthread $nthread"
|
|
||||||
else
|
|
||||||
nthread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then
|
|
||||||
nsolver="-nsolver $nsolver"
|
|
||||||
else
|
|
||||||
nsolver=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$mode" in
|
|
||||||
4) mode="-mo i4" ;;
|
|
||||||
8) mode="-mo i8" ;;
|
|
||||||
*) mode= ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ "$gpu" != "" -a "$gpu" != "-" ]; then
|
|
||||||
gpu="-gpu $gpu"
|
|
||||||
else
|
|
||||||
gpu=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $job.cnt
|
|
||||||
rm -f $job.sts
|
|
||||||
rm -f $job.out
|
|
||||||
rm -f $job.log
|
|
||||||
|
|
||||||
# To prevent a mismatch with the python version used by the solver
|
|
||||||
# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH
|
|
||||||
# unset environment variables PYTHONHOME and PYTHONPATH
|
|
||||||
unset PYTHONHOME
|
|
||||||
unset PYTHONPATH
|
|
||||||
|
|
||||||
"${DIR}/tools/run_damask_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \
|
|
||||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
|
||||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
|
||||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exit 0
|
|
|
@ -58,15 +58,9 @@ echo "Editor: $EDITOR"
|
||||||
echo ''
|
echo ''
|
||||||
echo 'adapting Marc tools...'
|
echo 'adapting Marc tools...'
|
||||||
theDIR=$INSTALLDIR/marc$VERSION/tools
|
theDIR=$INSTALLDIR/marc$VERSION/tools
|
||||||
for filename in 'comp_damask' \
|
for filename in 'comp_damask_mp' \
|
||||||
'comp_damask_l' \
|
|
||||||
'comp_damask_h' \
|
|
||||||
'comp_damask_mp' \
|
|
||||||
'comp_damask_lmp' \
|
'comp_damask_lmp' \
|
||||||
'comp_damask_hmp' \
|
'comp_damask_hmp' \
|
||||||
'run_damask' \
|
|
||||||
'run_damask_l' \
|
|
||||||
'run_damask_h' \
|
|
||||||
'run_damask_mp' \
|
'run_damask_mp' \
|
||||||
'run_damask_lmp' \
|
'run_damask_lmp' \
|
||||||
'run_damask_hmp' \
|
'run_damask_hmp' \
|
||||||
|
@ -85,15 +79,9 @@ for filename in 'edit_window' \
|
||||||
'submit4' \
|
'submit4' \
|
||||||
'submit5' \
|
'submit5' \
|
||||||
'submit6' \
|
'submit6' \
|
||||||
'submit7' \
|
|
||||||
'submit8' \
|
|
||||||
'submit9' \
|
|
||||||
'kill4' \
|
'kill4' \
|
||||||
'kill5' \
|
'kill5' \
|
||||||
'kill6' \
|
'kill6'; do
|
||||||
'kill7' \
|
|
||||||
'kill8' \
|
|
||||||
'kill9'; do
|
|
||||||
cp $SCRIPTLOCATION/$VERSION/Mentat_bin/$filename $theDIR
|
cp $SCRIPTLOCATION/$VERSION/Mentat_bin/$filename $theDIR
|
||||||
echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g"
|
echo $theDIR/$filename | xargs perl -pi -e "s:%INSTALLDIR%:${INSTALLDIR}:g"
|
||||||
echo $theDIR/$filename | xargs perl -pi -e "s:%VERSION%:${VERSION}:g"
|
echo $theDIR/$filename | xargs perl -pi -e "s:%VERSION%:${VERSION}:g"
|
||||||
|
@ -122,8 +110,8 @@ echo ''
|
||||||
echo 'setting file access rights...'
|
echo 'setting file access rights...'
|
||||||
for filename in marc$VERSION/tools/run_damask* \
|
for filename in marc$VERSION/tools/run_damask* \
|
||||||
marc$VERSION/tools/comp_damask* \
|
marc$VERSION/tools/comp_damask* \
|
||||||
mentat$VERSION/bin/submit{4..9} \
|
mentat$VERSION/bin/submit{4..6} \
|
||||||
mentat$VERSION/bin/kill{4..9} ; do
|
mentat$VERSION/bin/kill{4..6} ; do
|
||||||
chmod 755 $INSTALLDIR/${filename}
|
chmod 755 $INSTALLDIR/${filename}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -142,10 +130,7 @@ if [ -d "$BIN_DIR" ]; then
|
||||||
echo 'creating symlinks ...'
|
echo 'creating symlinks ...'
|
||||||
echo''
|
echo''
|
||||||
theDIR=$INSTALLDIR/marc$VERSION/tools
|
theDIR=$INSTALLDIR/marc$VERSION/tools
|
||||||
for filename in 'run_damask' \
|
for filename in 'run_damask_mp' \
|
||||||
'run_damask_l' \
|
|
||||||
'run_damask_h' \
|
|
||||||
'run_damask_mp' \
|
|
||||||
'run_damask_lmp' \
|
'run_damask_lmp' \
|
||||||
'run_damask_hmp'; do
|
'run_damask_hmp'; do
|
||||||
echo ${filename:4}$VERSION
|
echo ${filename:4}$VERSION
|
||||||
|
|
|
@ -21,16 +21,10 @@ The structure of this directory should be (VERSION = 20XX or 20XX.Y)
|
||||||
./installation.txt this text
|
./installation.txt this text
|
||||||
./apply_MPIE_modifications script file to apply modifications to the installation
|
./apply_MPIE_modifications script file to apply modifications to the installation
|
||||||
./VERSION/Marc_tools/comp_user.original original file from installation
|
./VERSION/Marc_tools/comp_user.original original file from installation
|
||||||
./VERSION/Marc_tools/comp_damask modified version using -O1 optimization
|
|
||||||
./VERSION/Marc_tools/comp_damask_l modified version using -O0 optimization
|
|
||||||
./VERSION/Marc_tools/comp_damask_h modified version using -O2 optimization
|
|
||||||
./VERSION/Marc_tools/comp_damask_mp modified version using -O1 optimization and OpenMP
|
./VERSION/Marc_tools/comp_damask_mp modified version using -O1 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/comp_damask_lmp modified version using -O0 optimization and OpenMP
|
./VERSION/Marc_tools/comp_damask_lmp modified version using -O0 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/comp_damask_hmp modified version using -O2 optimization and OpenMP
|
./VERSION/Marc_tools/comp_damask_hmp modified version using -O2 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/run_marc.original original file from installation
|
./VERSION/Marc_tools/run_marc.original original file from installation
|
||||||
./VERSION/Marc_tools/run_damask modified version using -O1 optimization
|
|
||||||
./VERSION/Marc_tools/run_damask_l modified version using -O0 optimization
|
|
||||||
./VERSION/Marc_tools/run_damask_h modified version using -O2 optimization
|
|
||||||
./VERSION/Marc_tools/run_damask_mp modified version using -O1 optimization and OpenMP
|
./VERSION/Marc_tools/run_damask_mp modified version using -O1 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/run_damask_lmp modified version using -O0 optimization and OpenMP
|
./VERSION/Marc_tools/run_damask_lmp modified version using -O0 optimization and OpenMP
|
||||||
./VERSION/Marc_tools/run_damask_hmp modified version using -O2 optimization and OpenMP
|
./VERSION/Marc_tools/run_damask_hmp modified version using -O2 optimization and OpenMP
|
||||||
|
@ -42,14 +36,8 @@ The structure of this directory should be (VERSION = 20XX or 20XX.Y)
|
||||||
./VERSION/Mentat_bin/submit4 modified version of original calling run_h_marc
|
./VERSION/Mentat_bin/submit4 modified version of original calling run_h_marc
|
||||||
./VERSION/Mentat_bin/submit5 modified version of original calling run_marc
|
./VERSION/Mentat_bin/submit5 modified version of original calling run_marc
|
||||||
./VERSION/Mentat_bin/submit6 modified version of original calling run_l_marc
|
./VERSION/Mentat_bin/submit6 modified version of original calling run_l_marc
|
||||||
./VERSION/Mentat_bin/submit7 modified version of original calling run_hmp_marc
|
|
||||||
./VERSION/Mentat_bin/submit8 modified version of original calling run_mp_marc
|
|
||||||
./VERSION/Mentat_bin/submit9 modified version of original calling run_lmp_marc
|
|
||||||
./VERSION/Mentat_bin/kill4 kill file for submit4, identical to original kill1
|
./VERSION/Mentat_bin/kill4 kill file for submit4, identical to original kill1
|
||||||
./VERSION/Mentat_bin/kill5 kill file for submit5, identical to original kill1
|
./VERSION/Mentat_bin/kill5 kill file for submit5, identical to original kill1
|
||||||
./VERSION/Mentat_bin/kill6 kill file for submit6, identical to original kill1
|
./VERSION/Mentat_bin/kill6 kill file for submit6, identical to original kill1
|
||||||
./VERSION/Mentat_bin/kill7 kill file for submit7, identical to original kill1
|
|
||||||
./VERSION/Mentat_bin/kill8 kill file for submit8, identical to original kill1
|
|
||||||
./VERSION/Mentat_bin/kill9 kill file for submit9, identical to original kill1
|
|
||||||
./VERSION/Mentat_menus/job_run.ms.original original file from installation
|
./VERSION/Mentat_menus/job_run.ms.original original file from installation
|
||||||
./VERSION/Mentat_menus/job_run.ms modified version adding DAMASK menu to run menu
|
./VERSION/Mentat_menus/job_run.ms modified version adding DAMASK menu to run menu
|
||||||
|
|
301
src/IO.f90
301
src/IO.f90
|
@ -22,6 +22,7 @@ module IO
|
||||||
public :: &
|
public :: &
|
||||||
IO_init, &
|
IO_init, &
|
||||||
IO_read, &
|
IO_read, &
|
||||||
|
IO_recursiveRead, &
|
||||||
IO_checkAndRewind, &
|
IO_checkAndRewind, &
|
||||||
IO_open_file_stat, &
|
IO_open_file_stat, &
|
||||||
IO_open_jobFile_stat, &
|
IO_open_jobFile_stat, &
|
||||||
|
@ -35,10 +36,6 @@ module IO
|
||||||
IO_hybridIA, &
|
IO_hybridIA, &
|
||||||
IO_isBlank, &
|
IO_isBlank, &
|
||||||
IO_getTag, &
|
IO_getTag, &
|
||||||
IO_countSections, &
|
|
||||||
IO_countTagInPart, &
|
|
||||||
IO_spotTagInPart, &
|
|
||||||
IO_globalTagInPart, &
|
|
||||||
IO_stringPos, &
|
IO_stringPos, &
|
||||||
IO_stringValue, &
|
IO_stringValue, &
|
||||||
IO_fixedStringValue ,&
|
IO_fixedStringValue ,&
|
||||||
|
@ -100,6 +97,7 @@ end subroutine IO_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief recursively reads a line from a text file.
|
!> @brief recursively reads a line from a text file.
|
||||||
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
||||||
|
!> @details unstable and buggy
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
recursive function IO_read(fileUnit,reset) result(line)
|
recursive function IO_read(fileUnit,reset) result(line)
|
||||||
|
|
||||||
|
@ -151,7 +149,7 @@ recursive function IO_read(fileUnit,reset) result(line)
|
||||||
pathOn(stack) = path(1:scan(path,SEP,.true.))//input ! glue include to current file's dir
|
pathOn(stack) = path(1:scan(path,SEP,.true.))//input ! glue include to current file's dir
|
||||||
endif
|
endif
|
||||||
|
|
||||||
open(newunit=unitOn(stack),iostat=myStat,file=pathOn(stack),action='read') ! open included file
|
open(newunit=unitOn(stack),iostat=myStat,file=pathOn(stack),action='read',status='old',position='rewind') ! open included file
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=pathOn(stack))
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=pathOn(stack))
|
||||||
|
|
||||||
line = IO_read(fileUnit)
|
line = IO_read(fileUnit)
|
||||||
|
@ -170,6 +168,80 @@ recursive function IO_read(fileUnit,reset) result(line)
|
||||||
|
|
||||||
end function IO_read
|
end function IO_read
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief recursively reads a text file.
|
||||||
|
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
recursive function IO_recursiveRead(fileName,cnt) result(fileContent)
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
character(len=*), intent(in) :: fileName
|
||||||
|
integer(pInt), intent(in), optional :: cnt !< recursion counter
|
||||||
|
character(len=256), dimension(:), allocatable :: fileContent !< file content, separated per lines
|
||||||
|
character(len=256), dimension(:), allocatable :: includedContent
|
||||||
|
character(len=256) :: line
|
||||||
|
character(len=256), parameter :: dummy = 'https://damask.mpie.de' !< to fill up remaining array
|
||||||
|
character(len=:), allocatable :: rawData
|
||||||
|
integer(pInt) :: &
|
||||||
|
fileLength, &
|
||||||
|
fileUnit, &
|
||||||
|
startPos, endPos, &
|
||||||
|
myTotalLines, & !< # lines read from file without include statements
|
||||||
|
includedLines, & !< # lines included from other file(s)
|
||||||
|
missingLines, & !< # lines missing from current file
|
||||||
|
l,i, &
|
||||||
|
myStat
|
||||||
|
|
||||||
|
if (merge(cnt,0_pInt,present(cnt))>10_pInt) call IO_error(106_pInt,ext_msg=trim(fileName))
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! read data as stream
|
||||||
|
inquire(file = fileName, size=fileLength)
|
||||||
|
open(newunit=fileUnit, file=fileName, access='stream',&
|
||||||
|
status='old', position='rewind', action='read',iostat=myStat)
|
||||||
|
if(myStat /= 0_pInt) call IO_error(100_pInt,ext_msg=trim(fileName))
|
||||||
|
allocate(character(len=fileLength)::rawData)
|
||||||
|
read(fileUnit) rawData
|
||||||
|
close(fileUnit)
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! count lines to allocate string array
|
||||||
|
myTotalLines = 0_pInt
|
||||||
|
do l=1_pInt, len(rawData)
|
||||||
|
if (rawData(l:l) == new_line('')) myTotalLines = myTotalLines+1
|
||||||
|
enddo
|
||||||
|
allocate(fileContent(myTotalLines))
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
! split raw data at end of line and handle includes
|
||||||
|
startPos = 1_pInt
|
||||||
|
endPos = 0_pInt
|
||||||
|
|
||||||
|
includedLines=0_pInt
|
||||||
|
l=0_pInt
|
||||||
|
do while (startPos <= len(rawData))
|
||||||
|
l = l + 1_pInt
|
||||||
|
endPos = endPos + scan(rawData(startPos:),new_line(''))
|
||||||
|
if(endPos - startPos >256) call IO_error(107_pInt,ext_msg=trim(fileName))
|
||||||
|
line = rawData(startPos:endPos-1_pInt)
|
||||||
|
startPos = endPos + 1_pInt
|
||||||
|
|
||||||
|
recursion: if(scan(trim(line),'{') < scan(trim(line),'}')) then
|
||||||
|
myTotalLines = myTotalLines - 1_pInt
|
||||||
|
includedContent = IO_recursiveRead(trim(line(scan(line,'{')+1_pInt:scan(line,'}')-1_pInt)), &
|
||||||
|
merge(cnt,1_pInt,present(cnt))) ! to track recursion depth
|
||||||
|
includedLines = includedLines + size(includedContent)
|
||||||
|
missingLines = myTotalLines + includedLines - size(fileContent(1:l-1)) -size(includedContent)
|
||||||
|
fileContent = [ fileContent(1:l-1_pInt), includedContent, [(dummy,i=1,missingLines)] ] ! add content and grow array
|
||||||
|
l = l - 1_pInt + size(includedContent)
|
||||||
|
else recursion
|
||||||
|
fileContent(l) = line
|
||||||
|
endif recursion
|
||||||
|
|
||||||
|
enddo
|
||||||
|
|
||||||
|
end function IO_recursiveRead
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief checks if unit is opened for reading, if true rewinds. Otherwise stops with
|
!> @brief checks if unit is opened for reading, if true rewinds. Otherwise stops with
|
||||||
|
@ -178,7 +250,7 @@ end function IO_read
|
||||||
subroutine IO_checkAndRewind(fileUnit)
|
subroutine IO_checkAndRewind(fileUnit)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: fileUnit !< file unit
|
integer(pInt), intent(in) :: fileUnit !< file unit
|
||||||
logical :: fileOpened
|
logical :: fileOpened
|
||||||
character(len=15) :: fileRead
|
character(len=15) :: fileRead
|
||||||
|
|
||||||
|
@ -203,7 +275,7 @@ subroutine IO_open_file(fileUnit,path)
|
||||||
|
|
||||||
integer(pInt) :: myStat
|
integer(pInt) :: myStat
|
||||||
|
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
end subroutine IO_open_file
|
end subroutine IO_open_file
|
||||||
|
@ -222,7 +294,8 @@ logical function IO_open_file_stat(fileUnit,path)
|
||||||
|
|
||||||
integer(pInt) :: myStat
|
integer(pInt) :: myStat
|
||||||
|
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
|
if (myStat /= 0_pInt) close(fileUnit)
|
||||||
IO_open_file_stat = (myStat == 0_pInt)
|
IO_open_file_stat = (myStat == 0_pInt)
|
||||||
|
|
||||||
end function IO_open_file_stat
|
end function IO_open_file_stat
|
||||||
|
@ -246,7 +319,7 @@ subroutine IO_open_jobFile(fileUnit,ext)
|
||||||
character(len=1024) :: path
|
character(len=1024) :: path
|
||||||
|
|
||||||
path = trim(getSolverJobName())//'.'//ext
|
path = trim(getSolverJobName())//'.'//ext
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
end subroutine IO_open_jobFile
|
end subroutine IO_open_jobFile
|
||||||
|
@ -270,7 +343,8 @@ logical function IO_open_jobFile_stat(fileUnit,ext)
|
||||||
character(len=1024) :: path
|
character(len=1024) :: path
|
||||||
|
|
||||||
path = trim(getSolverJobName())//'.'//ext
|
path = trim(getSolverJobName())//'.'//ext
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
|
if (myStat /= 0_pInt) close(fileUnit)
|
||||||
IO_open_jobFile_stat = (myStat == 0_pInt)
|
IO_open_jobFile_stat = (myStat == 0_pInt)
|
||||||
|
|
||||||
end function IO_open_JobFile_stat
|
end function IO_open_JobFile_stat
|
||||||
|
@ -296,11 +370,11 @@ subroutine IO_open_inputFile(fileUnit,modelName)
|
||||||
|
|
||||||
fileType = 1_pInt ! assume .pes
|
fileType = 1_pInt ! assume .pes
|
||||||
path = trim(modelName)//inputFileExtension(fileType) ! attempt .pes, if it exists: it should be used
|
path = trim(modelName)//inputFileExtension(fileType) ! attempt .pes, if it exists: it should be used
|
||||||
open(fileUnit+1,status='old',iostat=myStat,file=path)
|
open(fileUnit+1,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if(myStat /= 0_pInt) then ! if .pes does not work / exist; use conventional extension, i.e.".inp"
|
if(myStat /= 0_pInt) then ! if .pes does not work / exist; use conventional extension, i.e.".inp"
|
||||||
fileType = 2_pInt
|
fileType = 2_pInt
|
||||||
path = trim(modelName)//inputFileExtension(fileType)
|
path = trim(modelName)//inputFileExtension(fileType)
|
||||||
open(fileUnit+1,status='old',iostat=myStat,file=path)
|
open(fileUnit+1,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
endif
|
endif
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
|
@ -335,7 +409,7 @@ subroutine IO_open_logFile(fileUnit)
|
||||||
character(len=1024) :: path
|
character(len=1024) :: path
|
||||||
|
|
||||||
path = trim(getSolverJobName())//LogFileExtension
|
path = trim(getSolverJobName())//LogFileExtension
|
||||||
open(fileUnit,status='old',iostat=myStat,file=path)
|
open(fileUnit,status='old',iostat=myStat,file=path,action='read',position='rewind')
|
||||||
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
if (myStat /= 0_pInt) call IO_error(100_pInt,el=myStat,ext_msg=path)
|
||||||
|
|
||||||
end subroutine IO_open_logFile
|
end subroutine IO_open_logFile
|
||||||
|
@ -755,16 +829,22 @@ pure function IO_getTag(string,openChar,closeChar)
|
||||||
character(len=*), intent(in) :: string !< string to check for tag
|
character(len=*), intent(in) :: string !< string to check for tag
|
||||||
character(len=len_trim(string)) :: IO_getTag
|
character(len=len_trim(string)) :: IO_getTag
|
||||||
|
|
||||||
character(len=*), intent(in) :: openChar, & !< indicates beginning of tag
|
character, intent(in) :: openChar, & !< indicates beginning of tag
|
||||||
closeChar !< indicates end of tag
|
closeChar !< indicates end of tag
|
||||||
|
|
||||||
character(len=*), parameter :: SEP=achar(32)//achar(9)//achar(10)//achar(13) ! whitespaces
|
character(len=*), parameter :: SEP=achar(32)//achar(9)//achar(10)//achar(13) ! whitespaces
|
||||||
|
|
||||||
integer :: left,right ! no pInt
|
integer :: left,right ! no pInt
|
||||||
|
|
||||||
IO_getTag = ''
|
IO_getTag = ''
|
||||||
left = scan(string,openChar)
|
|
||||||
right = scan(string,closeChar)
|
|
||||||
|
if (openChar /= closeChar) then
|
||||||
|
left = scan(string,openChar)
|
||||||
|
right = scan(string,closeChar)
|
||||||
|
else
|
||||||
|
left = scan(string,openChar)
|
||||||
|
right = left + merge(scan(string(left+1:),openChar),0_pInt,len(string) > left)
|
||||||
|
endif
|
||||||
|
|
||||||
if (left == verify(string,SEP) .and. right > left) & ! openChar is first and closeChar occurs
|
if (left == verify(string,SEP) .and. right > left) & ! openChar is first and closeChar occurs
|
||||||
IO_getTag = string(left+1:right-1)
|
IO_getTag = string(left+1:right-1)
|
||||||
|
@ -772,173 +852,6 @@ pure function IO_getTag(string,openChar,closeChar)
|
||||||
end function IO_getTag
|
end function IO_getTag
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief count number of [sections] in <part> for given file handle
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
integer(pInt) function IO_countSections(fileUnit,part)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*), intent(in) :: part !< part name in which sections are counted
|
|
||||||
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
line = ''
|
|
||||||
IO_countSections = 0_pInt
|
|
||||||
rewind(fileUnit)
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif
|
|
||||||
if (IO_getTag(line,'[',']') /= '') & ! found [section] identifier
|
|
||||||
IO_countSections = IO_countSections + 1_pInt
|
|
||||||
enddo
|
|
||||||
|
|
||||||
end function IO_countSections
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief returns array of tag counts within <part> for at most N [sections]
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function IO_countTagInPart(fileUnit,part,tag,Nsections)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: Nsections !< maximum number of sections in which tag is searched for
|
|
||||||
integer(pInt), dimension(Nsections) :: IO_countTagInPart
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*),intent(in) :: part, & !< part in which tag is searched for
|
|
||||||
tag !< tag to search for
|
|
||||||
|
|
||||||
|
|
||||||
integer(pInt), dimension(Nsections) :: counter
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
|
||||||
integer(pInt) :: section
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
line = ''
|
|
||||||
counter = 0_pInt
|
|
||||||
section = 0_pInt
|
|
||||||
|
|
||||||
rewind(fileUnit)
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif
|
|
||||||
if (IO_getTag(line,'[',']') /= '') section = section + 1_pInt ! found [section] identifier
|
|
||||||
if (section > 0) then
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
if (tag == trim(IO_lc(IO_stringValue(line,chunkPos,1_pInt)))) & ! match
|
|
||||||
counter(section) = counter(section) + 1_pInt
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
|
|
||||||
IO_countTagInPart = counter
|
|
||||||
|
|
||||||
end function IO_countTagInPart
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief returns array of tag presence within <part> for at most N [sections]
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function IO_spotTagInPart(fileUnit,part,tag,Nsections)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: Nsections !< maximum number of sections in which tag is searched for
|
|
||||||
logical, dimension(Nsections) :: IO_spotTagInPart
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*),intent(in) :: part, & !< part in which tag is searched for
|
|
||||||
tag !< tag to search for
|
|
||||||
|
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
|
||||||
integer(pInt) :: section
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
IO_spotTagInPart = .false. ! assume to nowhere spot tag
|
|
||||||
section = 0_pInt
|
|
||||||
line = ''
|
|
||||||
|
|
||||||
rewind(fileUnit)
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif foundNextPart
|
|
||||||
if (IO_getTag(line,'[',']') /= '') section = section + 1_pInt ! found [section] identifier
|
|
||||||
if (section > 0_pInt) then
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
if (tag == trim(IO_lc(IO_stringValue(line,chunkPos,1_pInt)))) & ! match
|
|
||||||
IO_spotTagInPart(section) = .true.
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
|
|
||||||
end function IO_spotTagInPart
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief return logical whether tag is present within <part> before any [sections]
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
logical function IO_globalTagInPart(fileUnit,part,tag)
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer(pInt), intent(in) :: fileUnit !< file handle
|
|
||||||
character(len=*),intent(in) :: part, & !< part in which tag is searched for
|
|
||||||
tag !< tag to search for
|
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
|
||||||
character(len=65536) :: line
|
|
||||||
|
|
||||||
IO_globalTagInPart = .false. ! assume to nowhere spot tag
|
|
||||||
line =''
|
|
||||||
|
|
||||||
rewind(fileUnit)
|
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
enddo
|
|
||||||
|
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
|
||||||
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif foundNextPart
|
|
||||||
foundFirstSection: if (IO_getTag(line,'[',']') /= '') then
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif foundFirstSection
|
|
||||||
chunkPos = IO_stringPos(line)
|
|
||||||
match: if (tag == trim(IO_lc(IO_stringValue(line,chunkPos,1_pInt)))) then
|
|
||||||
IO_globalTagInPart = .true.
|
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
||||||
exit
|
|
||||||
endif match
|
|
||||||
enddo
|
|
||||||
|
|
||||||
end function IO_globalTagInPart
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief locates all space-separated chunks in given string and returns array containing number
|
!> @brief locates all space-separated chunks in given string and returns array containing number
|
||||||
!! them and the left/right position to be used by IO_xxxVal
|
!! them and the left/right position to be used by IO_xxxVal
|
||||||
|
@ -1450,12 +1363,16 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN)
|
||||||
pure function IO_intOut(intToPrint)
|
pure function IO_intOut(intToPrint)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=19) :: N_Digits ! maximum digits for 64 bit integer
|
|
||||||
character(len=40) :: IO_intOut
|
|
||||||
integer(pInt), intent(in) :: intToPrint
|
integer(pInt), intent(in) :: intToPrint
|
||||||
|
character(len=41) :: IO_intOut
|
||||||
|
integer(pInt) :: N_digits
|
||||||
|
character(len=19) :: width ! maximum digits for 64 bit integer
|
||||||
|
character(len=20) :: min_width ! longer for negative values
|
||||||
|
|
||||||
write(N_Digits, '(I19.19)') 1_pInt + int(log10(real(intToPrint)),pInt)
|
N_digits = 1_pInt + int(log10(real(max(abs(intToPrint),1_pInt))),pInt)
|
||||||
IO_intOut = 'I'//trim(N_Digits)//'.'//trim(N_Digits)
|
write(width, '(I19.19)') N_digits
|
||||||
|
write(min_width, '(I20.20)') N_digits + merge(1_pInt,0_pInt,intToPrint < 0_pInt)
|
||||||
|
IO_intOut = 'I'//trim(min_width)//'.'//trim(width)
|
||||||
|
|
||||||
end function IO_intOut
|
end function IO_intOut
|
||||||
|
|
||||||
|
@ -1513,6 +1430,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
msg = 'unknown output:'
|
msg = 'unknown output:'
|
||||||
case (106_pInt)
|
case (106_pInt)
|
||||||
msg = 'working directory does not exist:'
|
msg = 'working directory does not exist:'
|
||||||
|
case (107_pInt)
|
||||||
|
msg = 'line length exceeds limit of 256'
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! lattice error messages
|
! lattice error messages
|
||||||
|
@ -1558,6 +1477,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
msg = 'illegal texture transformation specified'
|
msg = 'illegal texture transformation specified'
|
||||||
case (160_pInt)
|
case (160_pInt)
|
||||||
msg = 'no entries in config part'
|
msg = 'no entries in config part'
|
||||||
|
case (161_pInt)
|
||||||
|
msg = 'config part found twice'
|
||||||
case (165_pInt)
|
case (165_pInt)
|
||||||
msg = 'homogenization configuration'
|
msg = 'homogenization configuration'
|
||||||
case (170_pInt)
|
case (170_pInt)
|
||||||
|
@ -1655,7 +1576,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
case (845_pInt)
|
case (845_pInt)
|
||||||
msg = 'incomplete information in spectral mesh header'
|
msg = 'incomplete information in spectral mesh header'
|
||||||
case (846_pInt)
|
case (846_pInt)
|
||||||
msg = 'not a rotation defined for loadcase rotation'
|
msg = 'rotation for load case rotation ill-defined (R:RT != I)'
|
||||||
case (847_pInt)
|
case (847_pInt)
|
||||||
msg = 'update of gamma operator not possible when pre-calculated'
|
msg = 'update of gamma operator not possible when pre-calculated'
|
||||||
case (880_pInt)
|
case (880_pInt)
|
||||||
|
|
327
src/config.f90
327
src/config.f90
|
@ -20,12 +20,17 @@ module config
|
||||||
type, public :: tPartitionedStringList
|
type, public :: tPartitionedStringList
|
||||||
type(tPartitionedString) :: string
|
type(tPartitionedString) :: string
|
||||||
type(tPartitionedStringList), pointer :: next => null()
|
type(tPartitionedStringList), pointer :: next => null()
|
||||||
|
|
||||||
contains
|
contains
|
||||||
procedure :: add => add
|
procedure :: add => add
|
||||||
procedure :: show => show
|
procedure :: show => show
|
||||||
procedure :: free => free
|
procedure :: free => free
|
||||||
|
|
||||||
|
! currently, a finalize is needed for all shapes of tPartitionedStringList.
|
||||||
|
! with Fortran 2015, we can define one recursive elemental function
|
||||||
|
! https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/543326
|
||||||
|
final :: finalize, &
|
||||||
|
finalizeArray
|
||||||
|
|
||||||
procedure :: keyExists => keyExists
|
procedure :: keyExists => keyExists
|
||||||
procedure :: countKeys => countKeys
|
procedure :: countKeys => countKeys
|
||||||
|
|
||||||
|
@ -37,11 +42,10 @@ module config
|
||||||
procedure :: getInts => getInts
|
procedure :: getInts => getInts
|
||||||
procedure :: getStrings => getStrings
|
procedure :: getStrings => getStrings
|
||||||
|
|
||||||
|
|
||||||
end type tPartitionedStringList
|
end type tPartitionedStringList
|
||||||
|
|
||||||
type(tPartitionedStringList), public :: emptyList
|
type(tPartitionedStringList), public, protected, allocatable, dimension(:) :: &
|
||||||
|
|
||||||
type(tPartitionedStringList), public, protected, allocatable, dimension(:) :: & ! QUESTION: rename to config_XXX?
|
|
||||||
config_phase, &
|
config_phase, &
|
||||||
config_microstructure, &
|
config_microstructure, &
|
||||||
config_homogenization, &
|
config_homogenization, &
|
||||||
|
@ -76,7 +80,6 @@ module config
|
||||||
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
|
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
|
||||||
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
|
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
|
||||||
|
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
config_init, &
|
config_init, &
|
||||||
config_deallocate
|
config_deallocate
|
||||||
|
@ -92,12 +95,14 @@ subroutine config_init()
|
||||||
compiler_version, &
|
compiler_version, &
|
||||||
compiler_options
|
compiler_options
|
||||||
#endif
|
#endif
|
||||||
|
use prec, only: &
|
||||||
|
pStringLen
|
||||||
|
use DAMASK_interface, only: &
|
||||||
|
getSolverJobName
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error, &
|
IO_error, &
|
||||||
IO_open_file, &
|
|
||||||
IO_read, &
|
|
||||||
IO_lc, &
|
IO_lc, &
|
||||||
IO_open_jobFile_stat, &
|
IO_recursiveRead, &
|
||||||
IO_getTag, &
|
IO_getTag, &
|
||||||
IO_timeStamp, &
|
IO_timeStamp, &
|
||||||
IO_EOF
|
IO_EOF
|
||||||
|
@ -107,12 +112,13 @@ subroutine config_init()
|
||||||
debug_levelBasic
|
debug_levelBasic
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt) :: myDebug,i
|
||||||
integer(pInt) :: myDebug
|
|
||||||
|
|
||||||
character(len=65536) :: &
|
character(len=pStringLen) :: &
|
||||||
line, &
|
line, &
|
||||||
part
|
part
|
||||||
|
character(len=pStringLen), dimension(:), allocatable :: fileContent
|
||||||
|
logical :: fileExists
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- config init -+>>>'
|
write(6,'(/,a)') ' <<<+- config init -+>>>'
|
||||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||||
|
@ -120,39 +126,40 @@ subroutine config_init()
|
||||||
|
|
||||||
myDebug = debug_level(debug_material)
|
myDebug = debug_level(debug_material)
|
||||||
|
|
||||||
if (.not. IO_open_jobFile_stat(FILEUNIT,material_localFileExt)) & ! no local material configuration present...
|
inquire(file=trim(getSolverJobName())//'.'//material_localFileExt,exist=fileExists)
|
||||||
call IO_open_file(FILEUNIT,material_configFile) ! ...open material.config file
|
if(fileExists) then
|
||||||
|
fileContent = IO_recursiveRead(trim(getSolverJobName())//'.'//material_localFileExt)
|
||||||
|
else
|
||||||
|
inquire(file='material.config',exist=fileExists)
|
||||||
|
if(.not. fileExists) call IO_error(100_pInt,ext_msg='material.config')
|
||||||
|
fileContent = IO_recursiveRead('material.config')
|
||||||
|
endif
|
||||||
|
|
||||||
rewind(fileUnit)
|
do i = 1_pInt, size(fileContent)
|
||||||
line = '' ! to have it initialized
|
line = trim(fileContent(i))
|
||||||
do while (trim(line) /= IO_EOF)
|
|
||||||
part = IO_lc(IO_getTag(line,'<','>'))
|
part = IO_lc(IO_getTag(line,'<','>'))
|
||||||
|
|
||||||
select case (trim(part))
|
select case (trim(part))
|
||||||
|
|
||||||
case (trim(material_partPhase))
|
case (trim(material_partPhase))
|
||||||
call parseFile(line,phase_name,config_phase,FILEUNIT)
|
call parseFile(phase_name,config_phase,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partMicrostructure))
|
case (trim(material_partMicrostructure))
|
||||||
call parseFile(line,microstructure_name,config_microstructure,FILEUNIT)
|
call parseFile(microstructure_name,config_microstructure,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Microstructure parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Microstructure parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partCrystallite))
|
case (trim(material_partCrystallite))
|
||||||
call parseFile(line,crystallite_name,config_crystallite,FILEUNIT)
|
call parseFile(crystallite_name,config_crystallite,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Crystallite parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Crystallite parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partHomogenization))
|
case (trim(material_partHomogenization))
|
||||||
call parseFile(line,homogenization_name,config_homogenization,FILEUNIT)
|
call parseFile(homogenization_name,config_homogenization,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Homogenization parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Homogenization parsed'; flush(6)
|
||||||
|
|
||||||
case (trim(material_partTexture))
|
case (trim(material_partTexture))
|
||||||
call parseFile(line,texture_name,config_texture,FILEUNIT)
|
call parseFile(texture_name,config_texture,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Texture parsed'; flush(6)
|
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Texture parsed'; flush(6)
|
||||||
|
|
||||||
case default
|
|
||||||
line = IO_read(fileUnit)
|
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
@ -173,107 +180,83 @@ end subroutine config_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief parses the material.config file
|
!> @brief parses the material.config file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine parseFile(line,&
|
subroutine parseFile(sectionNames,part,line, &
|
||||||
sectionNames,part,fileUnit)
|
fileContent)
|
||||||
|
use prec, only: &
|
||||||
|
pStringLen
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_read, &
|
|
||||||
IO_error, &
|
IO_error, &
|
||||||
IO_lc, &
|
IO_getTag
|
||||||
IO_getTag, &
|
|
||||||
IO_isBlank, &
|
|
||||||
IO_stringValue, &
|
|
||||||
IO_stringPos, &
|
|
||||||
IO_EOF
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: fileUnit
|
character(len=64), allocatable, dimension(:), intent(out) :: sectionNames
|
||||||
character(len=*), dimension(:), allocatable, intent(inout) :: sectionNames
|
|
||||||
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
|
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
|
||||||
character(len=65536),intent(out) :: line
|
character(len=pStringLen), intent(inout) :: line
|
||||||
|
character(len=pStringLen), dimension(:), intent(in) :: fileContent
|
||||||
|
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
integer(pInt), allocatable, dimension(:) :: partPosition ! position of [] tags + last line in section
|
||||||
integer(pInt) :: s
|
integer(pInt) :: i, j
|
||||||
character(len=65536) :: devNull
|
|
||||||
character(len=64) :: tag
|
|
||||||
logical :: echo
|
logical :: echo
|
||||||
|
|
||||||
echo = .false.
|
echo = .false.
|
||||||
allocate(part(0))
|
|
||||||
|
|
||||||
s = 0_pInt
|
if (allocated(part)) call IO_error(161_pInt,ext_msg=trim(line))
|
||||||
do while (trim(line) /= IO_EOF) ! read through sections of material part
|
allocate(partPosition(0))
|
||||||
line = IO_read(fileUnit)
|
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
do i = 1_pInt, size(fileContent)
|
||||||
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
|
line = trim(fileContent(i))
|
||||||
devNull = IO_read(fileUnit, .true.) ! reset IO_read to close any recursively included files
|
if (IO_getTag(line,'<','>') /= '') exit
|
||||||
exit
|
|
||||||
endif foundNextPart
|
|
||||||
nextSection: if (IO_getTag(line,'[',']') /= '') then
|
nextSection: if (IO_getTag(line,'[',']') /= '') then
|
||||||
s = s + 1_pInt
|
partPosition = [partPosition, i]
|
||||||
part = [part, emptyList]
|
|
||||||
tag = IO_getTag(line,'[',']')
|
|
||||||
GfortranBug86033: if (.not. allocated(sectionNames)) then
|
|
||||||
allocate(sectionNames(1),source=tag)
|
|
||||||
else GfortranBug86033
|
|
||||||
sectionNames = [sectionNames,tag]
|
|
||||||
endif GfortranBug86033
|
|
||||||
cycle
|
cycle
|
||||||
endif nextSection
|
endif nextSection
|
||||||
chunkPos = IO_stringPos(line)
|
if (size(partPosition) < 1_pInt) &
|
||||||
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
|
echo = (trim(IO_getTag(line,'/','/')) == 'echo') .or. echo
|
||||||
inSection: if (s > 0_pInt) then
|
|
||||||
call part(s)%add(IO_lc(trim(line)))
|
|
||||||
else inSection
|
|
||||||
echo = (trim(tag) == '/echo/')
|
|
||||||
endif inSection
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if (echo) then
|
allocate(sectionNames(size(partPosition)))
|
||||||
do s = 1, size(sectionNames)
|
allocate(part(size(partPosition)))
|
||||||
call part(s)%show()
|
|
||||||
end do
|
partPosition = [partPosition, i] ! needed when actually storing content
|
||||||
end if
|
|
||||||
|
do i = 1_pInt, size(partPosition) -1_pInt
|
||||||
|
sectionNames(i) = trim(adjustl(fileContent(partPosition(i))))
|
||||||
|
do j = partPosition(i) + 1_pInt, partPosition(i+1) -1_pInt
|
||||||
|
call part(i)%add(trim(adjustl(fileContent(j))))
|
||||||
|
enddo
|
||||||
|
if (echo) then
|
||||||
|
write(6,*) 'section',i, '"'//trim(sectionNames(i))//'"'
|
||||||
|
call part(i)%show()
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
end subroutine parseFile
|
end subroutine parseFile
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief deallocates the linked lists that store the content of the configuration files
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine config_deallocate(what)
|
subroutine config_deallocate(what)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_error
|
IO_error
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=*), intent(in) :: what
|
character(len=*), intent(in) :: what
|
||||||
integer(pInt) :: i
|
|
||||||
|
|
||||||
select case(what)
|
select case(trim(what))
|
||||||
|
|
||||||
case('material.config/phase')
|
case('material.config/phase')
|
||||||
do i=1, size(config_phase)
|
|
||||||
call config_phase(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_phase)
|
deallocate(config_phase)
|
||||||
|
|
||||||
case('material.config/microstructure')
|
case('material.config/microstructure')
|
||||||
do i=1, size(config_microstructure)
|
|
||||||
call config_microstructure(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_microstructure)
|
deallocate(config_microstructure)
|
||||||
|
|
||||||
case('material.config/crystallite')
|
case('material.config/crystallite')
|
||||||
do i=1, size(config_crystallite)
|
|
||||||
call config_crystallite(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_crystallite)
|
deallocate(config_crystallite)
|
||||||
|
|
||||||
case('material.config/homogenization')
|
case('material.config/homogenization')
|
||||||
do i=1, size(config_homogenization)
|
|
||||||
call config_homogenization(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_homogenization)
|
deallocate(config_homogenization)
|
||||||
|
|
||||||
case('material.config/texture')
|
case('material.config/texture')
|
||||||
do i=1, size(config_texture)
|
|
||||||
call config_texture(i)%free
|
|
||||||
enddo
|
|
||||||
deallocate(config_texture)
|
deallocate(config_texture)
|
||||||
|
|
||||||
case default
|
case default
|
||||||
|
@ -284,11 +267,17 @@ subroutine config_deallocate(what)
|
||||||
end subroutine config_deallocate
|
end subroutine config_deallocate
|
||||||
|
|
||||||
|
|
||||||
|
!##################################################################################################
|
||||||
|
! The folowing functions are part of the tPartitionedStringList object
|
||||||
|
!##################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief add element
|
!> @brief add element
|
||||||
!> @details Adds a string together with the start/end position of chunks in this string. The new
|
!> @details Adds a string together with the start/end position of chunks in this string. The new
|
||||||
!! element is added at the end of the list. Empty strings are not added. All strings are converted
|
!! element is added at the end of the list. Empty strings are not added. All strings are converted
|
||||||
!! to lower case
|
!! to lower case. The data is not stored in the new element but in the current.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine add(this,string)
|
subroutine add(this,string)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
|
@ -299,19 +288,18 @@ subroutine add(this,string)
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), target, intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: string
|
character(len=*), intent(in) :: string
|
||||||
type(tPartitionedStringList), pointer :: new, item
|
type(tPartitionedStringList), pointer :: new, temp
|
||||||
|
|
||||||
if (IO_isBlank(string)) return
|
if (IO_isBlank(string)) return
|
||||||
|
|
||||||
allocate(new)
|
allocate(new)
|
||||||
new%string%val = IO_lc (trim(string))
|
temp => this
|
||||||
new%string%pos = IO_stringPos(trim(string))
|
do while (associated(temp%next))
|
||||||
|
temp => temp%next
|
||||||
item => this
|
|
||||||
do while (associated(item%next))
|
|
||||||
item => item%next
|
|
||||||
enddo
|
enddo
|
||||||
item%next => new
|
temp%string%val = IO_lc (trim(string))
|
||||||
|
temp%string%pos = IO_stringPos(trim(string))
|
||||||
|
temp%next => new
|
||||||
|
|
||||||
end subroutine add
|
end subroutine add
|
||||||
|
|
||||||
|
@ -323,12 +311,12 @@ end subroutine add
|
||||||
subroutine show(this)
|
subroutine show(this)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
write(6,'(a)') trim(item%string%val)
|
write(6,'(a)') ' '//trim(item%string%val)
|
||||||
item => item%next
|
item => item%next
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
@ -336,28 +324,55 @@ end subroutine show
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief cleans entire list
|
!> @brief empties list and frees associated memory
|
||||||
!> @details list head is remains alive
|
!> @details explicit interface to reset list. Triggers final statement (and following chain reaction)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine free(this)
|
subroutine free(this)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), target, intent(in) :: this
|
class(tPartitionedStringList), intent(inout) :: this
|
||||||
type(tPartitionedStringList), pointer :: new, item
|
|
||||||
|
|
||||||
if (.not. associated(this%next)) return
|
if(associated(this%next)) deallocate(this%next)
|
||||||
|
|
||||||
item => this%next
|
|
||||||
do while (associated(item%next))
|
|
||||||
new => item
|
|
||||||
deallocate(item)
|
|
||||||
item => new%next
|
|
||||||
enddo
|
|
||||||
deallocate(item)
|
|
||||||
|
|
||||||
end subroutine free
|
end subroutine free
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief empties list and frees associated memory
|
||||||
|
!> @details called when variable goes out of scope. Triggers chain reaction for list
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
recursive subroutine finalize(this)
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
type(tPartitionedStringList), intent(inout) :: this
|
||||||
|
|
||||||
|
if(associated(this%next)) deallocate(this%next)
|
||||||
|
|
||||||
|
end subroutine finalize
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief cleans entire array of linke lists
|
||||||
|
!> @details called when variable goes out of scope and deallocates the list at each array entry
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine finalizeArray(this)
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
integer :: i
|
||||||
|
type(tPartitionedStringList), intent(inout), dimension(:) :: this
|
||||||
|
type(tPartitionedStringList), pointer :: temp ! bug in Gfortran?
|
||||||
|
|
||||||
|
do i=1, size(this)
|
||||||
|
if (associated(this(i)%next)) then
|
||||||
|
temp => this(i)%next
|
||||||
|
!deallocate(this(i)) !internal compiler error: in gfc_build_final_call, at fortran/trans.c:975
|
||||||
|
deallocate(temp)
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
|
end subroutine finalizeArray
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief reports wether a given key (string value at first position) exists in the list
|
!> @brief reports wether a given key (string value at first position) exists in the list
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -366,14 +381,14 @@ logical function keyExists(this,key)
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
keyExists = .false.
|
keyExists = .false.
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item) .and. .not. keyExists)
|
do while (associated(item%next) .and. .not. keyExists)
|
||||||
keyExists = trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)
|
keyExists = trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)
|
||||||
item => item%next
|
item => item%next
|
||||||
end do
|
end do
|
||||||
|
@ -391,14 +406,14 @@ integer(pInt) function countKeys(this,key)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
countKeys = 0_pInt
|
countKeys = 0_pInt
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) &
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) &
|
||||||
countKeys = countKeys + 1_pInt
|
countKeys = countKeys + 1_pInt
|
||||||
item => item%next
|
item => item%next
|
||||||
|
@ -419,17 +434,17 @@ real(pReal) function getFloat(this,key,defaultVal)
|
||||||
IO_FloatValue
|
IO_FloatValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
real(pReal), intent(in), optional :: defaultVal
|
real(pReal), intent(in), optional :: defaultVal
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found
|
logical :: found
|
||||||
|
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) getFloat = defaultVal
|
if (found) getFloat = defaultVal
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
||||||
|
@ -455,17 +470,17 @@ integer(pInt) function getInt(this,key,defaultVal)
|
||||||
IO_IntValue
|
IO_IntValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
integer(pInt), intent(in), optional :: defaultVal
|
integer(pInt), intent(in), optional :: defaultVal
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found
|
logical :: found
|
||||||
|
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) getInt = defaultVal
|
if (found) getInt = defaultVal
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
||||||
|
@ -491,13 +506,13 @@ character(len=65536) function getString(this,key,defaultVal,raw)
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
character(len=65536), intent(in), optional :: defaultVal
|
character(len=65536), intent(in), optional :: defaultVal
|
||||||
logical, intent(in), optional :: raw
|
logical, intent(in), optional :: raw
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
logical :: found, &
|
logical :: found, &
|
||||||
whole
|
whole
|
||||||
|
|
||||||
whole = merge(raw,.false.,present(raw)) ! whole string or white space splitting
|
whole = merge(raw,.false.,present(raw)) ! whole string or white space splitting
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
|
@ -506,8 +521,8 @@ character(len=65536) function getString(this,key,defaultVal,raw)
|
||||||
if (len_trim(getString) /= len_trim(defaultVal)) call IO_error(0_pInt,ext_msg='getString')
|
if (len_trim(getString) /= len_trim(defaultVal)) call IO_error(0_pInt,ext_msg='getString')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
if (item%string%pos(1) < 2_pInt) call IO_error(143_pInt,ext_msg=key)
|
||||||
|
@ -539,7 +554,7 @@ function getFloats(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), dimension(:), allocatable :: getFloats
|
real(pReal), dimension(:), allocatable :: getFloats
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
real(pReal), dimension(:), intent(in), optional :: defaultVal
|
real(pReal), dimension(:), intent(in), optional :: defaultVal
|
||||||
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
||||||
|
@ -553,8 +568,8 @@ function getFloats(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
allocate(getFloats(0))
|
allocate(getFloats(0))
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (.not. cumulative) getFloats = [real(pReal)::]
|
if (.not. cumulative) getFloats = [real(pReal)::]
|
||||||
|
@ -586,7 +601,7 @@ function getInts(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), dimension(:), allocatable :: getInts
|
integer(pInt), dimension(:), allocatable :: getInts
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
integer(pInt), dimension(:), intent(in), optional :: defaultVal, &
|
integer(pInt), dimension(:), intent(in), optional :: defaultVal, &
|
||||||
requiredShape
|
requiredShape
|
||||||
|
@ -600,8 +615,8 @@ function getInts(this,key,defaultVal,requiredShape)
|
||||||
|
|
||||||
allocate(getInts(0))
|
allocate(getInts(0))
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (.not. cumulative) getInts = [integer(pInt)::]
|
if (.not. cumulative) getInts = [integer(pInt)::]
|
||||||
|
@ -633,7 +648,7 @@ function getStrings(this,key,defaultVal,requiredShape,raw)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
character(len=65536),dimension(:), allocatable :: getStrings
|
character(len=65536),dimension(:), allocatable :: getStrings
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), target, intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
character(len=65536),dimension(:), intent(in), optional :: defaultVal
|
character(len=65536),dimension(:), intent(in), optional :: defaultVal
|
||||||
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
integer(pInt), dimension(:), intent(in), optional :: requiredShape
|
||||||
|
@ -649,8 +664,8 @@ function getStrings(this,key,defaultVal,requiredShape,raw)
|
||||||
whole = merge(raw,.false.,present(raw))
|
whole = merge(raw,.false.,present(raw))
|
||||||
found = .false.
|
found = .false.
|
||||||
|
|
||||||
item => this%next
|
item => this
|
||||||
do while (associated(item))
|
do while (associated(item%next))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) then
|
||||||
found = .true.
|
found = .true.
|
||||||
if (allocated(getStrings) .and. .not. cumulative) deallocate(getStrings)
|
if (allocated(getStrings) .and. .not. cumulative) deallocate(getStrings)
|
||||||
|
|
|
@ -58,14 +58,15 @@ subroutine constitutive_init()
|
||||||
IO_write_jobIntFile, &
|
IO_write_jobIntFile, &
|
||||||
IO_timeStamp
|
IO_timeStamp
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_deallocate
|
config_phase
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
FE_geomtype
|
FE_geomtype
|
||||||
use config, only: &
|
use config, only: &
|
||||||
material_Nphase, &
|
material_Nphase, &
|
||||||
material_localFileExt, &
|
material_localFileExt, &
|
||||||
phase_name, &
|
phase_name, &
|
||||||
material_configFile
|
material_configFile, &
|
||||||
|
config_deallocate
|
||||||
use material, only: &
|
use material, only: &
|
||||||
material_phase, &
|
material_phase, &
|
||||||
phase_plasticity, &
|
phase_plasticity, &
|
||||||
|
@ -138,7 +139,7 @@ subroutine constitutive_init()
|
||||||
use kinematics_hydrogen_strain
|
use kinematics_hydrogen_strain
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt), parameter :: FILEUNIT = 204_pInt
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
o, & !< counter in output loop
|
o, & !< counter in output loop
|
||||||
ph, & !< counter in phase loop
|
ph, & !< counter in phase loop
|
||||||
|
|
|
@ -172,9 +172,9 @@ subroutine crystallite_init
|
||||||
IO_error
|
IO_error
|
||||||
use material
|
use material
|
||||||
use config, only: &
|
use config, only: &
|
||||||
|
config_deallocate, &
|
||||||
config_crystallite, &
|
config_crystallite, &
|
||||||
crystallite_name, &
|
crystallite_name
|
||||||
config_deallocate
|
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_initialFi, &
|
constitutive_initialFi, &
|
||||||
constitutive_microstructure ! derived (shortcut) quantities of given state
|
constitutive_microstructure ! derived (shortcut) quantities of given state
|
||||||
|
|
|
@ -102,7 +102,7 @@ subroutine debug_init
|
||||||
IO_EOF
|
IO_EOF
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 300_pInt
|
integer(pInt), parameter :: FILEUNIT = 330_pInt
|
||||||
|
|
||||||
integer(pInt) :: i, what
|
integer(pInt) :: i, what
|
||||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
integer(pInt), allocatable, dimension(:) :: chunkPos
|
||||||
|
|
|
@ -85,9 +85,9 @@ subroutine homogenization_init
|
||||||
use crystallite, only: &
|
use crystallite, only: &
|
||||||
crystallite_maxSizePostResults
|
crystallite_maxSizePostResults
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_deallocate, &
|
|
||||||
material_configFile, &
|
material_configFile, &
|
||||||
material_localFileExt, &
|
material_localFileExt, &
|
||||||
|
config_deallocate, &
|
||||||
config_homogenization, &
|
config_homogenization, &
|
||||||
homogenization_name
|
homogenization_name
|
||||||
use material
|
use material
|
||||||
|
|
|
@ -111,6 +111,9 @@ module lattice
|
||||||
-1,-1, 0, -1, 1,-1 & ! D6
|
-1,-1, 0, -1, 1,-1 & ! D6
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Nslip]) !< Slip system <110>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Nslip]) !< Slip system <110>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
||||||
|
|
||||||
|
character(len=*), dimension(1), parameter, public :: LATTICE_FCC_SLIPFAMILY_NAME = &
|
||||||
|
['<0 1 -1>{1 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_fcc_Ntwin), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_fcc_Ntwin), parameter, private :: &
|
||||||
LATTICE_fcc_systemTwin = reshape(real( [&
|
LATTICE_fcc_systemTwin = reshape(real( [&
|
||||||
-2, 1, 1, 1, 1, 1, &
|
-2, 1, 1, 1, 1, 1, &
|
||||||
|
@ -127,6 +130,9 @@ module lattice
|
||||||
-1, 1, 2, -1, 1,-1 &
|
-1, 1, 2, -1, 1,-1 &
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ntwin]) !< Twin system <112>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ntwin]) !< Twin system <112>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
||||||
|
|
||||||
|
character(len=*), dimension(1), parameter, public :: LATTICE_FCC_TWINFAMILY_NAME = &
|
||||||
|
['<-2 1 1>{1 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_fcc_Ntrans), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_fcc_Ntrans), parameter, private :: &
|
||||||
LATTICE_fccTohex_systemTrans = reshape(real( [&
|
LATTICE_fccTohex_systemTrans = reshape(real( [&
|
||||||
-2, 1, 1, 1, 1, 1, &
|
-2, 1, 1, 1, 1, 1, &
|
||||||
|
@ -433,6 +439,10 @@ module lattice
|
||||||
! 1,-1, 1, 3, 2,-1 &
|
! 1,-1, 1, 3, 2,-1 &
|
||||||
],pReal),[ 3_pInt + 3_pInt ,LATTICE_bcc_Nslip])
|
],pReal),[ 3_pInt + 3_pInt ,LATTICE_bcc_Nslip])
|
||||||
|
|
||||||
|
character(len=*), dimension(2), parameter, public :: LATTICE_BCC_SLIPFAMILY_NAME = &
|
||||||
|
['<1 -1 1>{0 1 1}', &
|
||||||
|
'<1 -1 1>{2 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_bcc_Ntwin), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_bcc_Ntwin), parameter, private :: &
|
||||||
LATTICE_bcc_systemTwin = reshape(real([&
|
LATTICE_bcc_systemTwin = reshape(real([&
|
||||||
! Twin system <111>{112}
|
! Twin system <111>{112}
|
||||||
|
@ -450,6 +460,9 @@ module lattice
|
||||||
1, 1, 1, 1, 1,-2 &
|
1, 1, 1, 1, 1,-2 &
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_bcc_Ntwin])
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_bcc_Ntwin])
|
||||||
|
|
||||||
|
character(len=*), dimension(1), parameter, public :: LATTICE_BCC_TWINFAMILY_NAME = &
|
||||||
|
['<1 1 1>{2 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(LATTICE_bcc_Ntwin), parameter, private :: &
|
real(pReal), dimension(LATTICE_bcc_Ntwin), parameter, private :: &
|
||||||
LATTICE_bcc_shearTwin = 0.5_pReal*sqrt(2.0_pReal)
|
LATTICE_bcc_shearTwin = 0.5_pReal*sqrt(2.0_pReal)
|
||||||
|
|
||||||
|
@ -618,6 +631,14 @@ module lattice
|
||||||
1, 1, -2, 3, -1, -1, 2, 2 &
|
1, 1, -2, 3, -1, -1, 2, 2 &
|
||||||
],pReal),[ 4_pInt + 4_pInt,LATTICE_hex_Nslip]) !< slip systems for hex sorted by A. Alankar & P. Eisenlohr
|
],pReal),[ 4_pInt + 4_pInt,LATTICE_hex_Nslip]) !< slip systems for hex sorted by A. Alankar & P. Eisenlohr
|
||||||
|
|
||||||
|
character(len=*), dimension(6), parameter, public :: LATTICE_HEX_SLIPFAMILY_NAME = &
|
||||||
|
['<1 1 . 1>{0 0 . 1} ', &
|
||||||
|
'<1 1 . 1>{1 0 . 0} ', &
|
||||||
|
'<1 0 . 0>{1 1 . 0} ', &
|
||||||
|
'<1 1 . 0>{-1 1 . 1} ', &
|
||||||
|
'<1 1 . 3>{-1 0 . 1} ', &
|
||||||
|
'<1 1 . 3>{-1 -1 . 2}']
|
||||||
|
|
||||||
real(pReal), dimension(4+4,LATTICE_hex_Ntwin), parameter, private :: &
|
real(pReal), dimension(4+4,LATTICE_hex_Ntwin), parameter, private :: &
|
||||||
LATTICE_hex_systemTwin = reshape(real([&
|
LATTICE_hex_systemTwin = reshape(real([&
|
||||||
! Compression or Tension =f(twinning shear=f(c/a)) for each metal ! (according to Yoo 1981)
|
! Compression or Tension =f(twinning shear=f(c/a)) for each metal ! (according to Yoo 1981)
|
||||||
|
@ -650,6 +671,12 @@ module lattice
|
||||||
1, 1, -2, -3, 1, 1, -2, 2 &
|
1, 1, -2, -3, 1, 1, -2, 2 &
|
||||||
],pReal),[ 4_pInt + 4_pInt ,LATTICE_hex_Ntwin]) !< twin systems for hex, order follows Prof. Tom Bieler's scheme; but numbering in data was restarted from 1
|
],pReal),[ 4_pInt + 4_pInt ,LATTICE_hex_Ntwin]) !< twin systems for hex, order follows Prof. Tom Bieler's scheme; but numbering in data was restarted from 1
|
||||||
|
|
||||||
|
character(len=*), dimension(4), parameter, public :: LATTICE_HEX_TWINFAMILY_NAME = &
|
||||||
|
['<-1 0 . 1>{1 0 . 2} ', &
|
||||||
|
'<1 1 . 6>{-1 -1 . 1}', &
|
||||||
|
'<1 0 . -2>{1 0 . 1} ', &
|
||||||
|
'<1 1 . -3>{1 1 . 2} ']
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_hex_Ntwin), parameter, private :: &
|
integer(pInt), dimension(LATTICE_hex_Ntwin), parameter, private :: &
|
||||||
LATTICE_hex_shearTwin = reshape(int( [& ! indicator to formula further below
|
LATTICE_hex_shearTwin = reshape(int( [& ! indicator to formula further below
|
||||||
1, & ! <-10.1>{10.2}
|
1, & ! <-10.1>{10.2}
|
||||||
|
@ -926,6 +953,21 @@ module lattice
|
||||||
1, 1, 1, 1,-2, 1 &
|
1, 1, 1, 1,-2, 1 &
|
||||||
],pReal),[ 3_pInt + 3_pInt,LATTICE_bct_Nslip]) !< slip systems for bct sorted by Bieler
|
],pReal),[ 3_pInt + 3_pInt,LATTICE_bct_Nslip]) !< slip systems for bct sorted by Bieler
|
||||||
|
|
||||||
|
character(len=*), dimension(13), parameter, public :: LATTICE_BCT_SLIPFAMILY_NAME = &
|
||||||
|
['{1 0 0)<0 0 1] ', &
|
||||||
|
'{1 1 0)<0 0 1] ', &
|
||||||
|
'{1 0 0)<0 1 0] ', &
|
||||||
|
'{1 1 0)<1 -1 1]', &
|
||||||
|
'{1 1 0)<1 -1 0]', &
|
||||||
|
'{1 0 0)<0 1 1] ', &
|
||||||
|
'{0 0 1)<0 1 0] ', &
|
||||||
|
'{0 0 1)<1 1 0] ', &
|
||||||
|
'{0 1 1)<0 1 -1]', &
|
||||||
|
'{0 1 1)<1 -1 1]', &
|
||||||
|
'{0 1 1)<1 0 0] ', &
|
||||||
|
'{2 1 1)<0 1 -1]', &
|
||||||
|
'{2 1 1)<-1 1 1]']
|
||||||
|
|
||||||
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
|
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
|
||||||
LATTICE_bct_interactionSlipSlip = reshape(int( [&
|
LATTICE_bct_interactionSlipSlip = reshape(int( [&
|
||||||
1, 2, 3, 3, 7, 7, 13, 13, 13, 13, 21, 21, 31, 31, 31, 31, 43, 43, 57, 57, 73, 73, 73, 73, 91, 91, 91, 91, 91, 91, 91, 91, 111, 111, 111, 111, 133,133,133,133,133,133,133,133, 157,157,157,157,157,157,157,157, &
|
1, 2, 3, 3, 7, 7, 13, 13, 13, 13, 21, 21, 31, 31, 31, 31, 43, 43, 57, 57, 73, 73, 73, 73, 91, 91, 91, 91, 91, 91, 91, 91, 111, 111, 111, 111, 133,133,133,133,133,133,133,133, 157,157,157,157,157,157,157,157, &
|
||||||
|
|
|
@ -360,8 +360,7 @@ subroutine material_init()
|
||||||
homogenization_name, &
|
homogenization_name, &
|
||||||
microstructure_name, &
|
microstructure_name, &
|
||||||
phase_name, &
|
phase_name, &
|
||||||
texture_name, &
|
texture_name
|
||||||
config_deallocate
|
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_maxNips, &
|
mesh_maxNips, &
|
||||||
mesh_NcpElems, &
|
mesh_NcpElems, &
|
||||||
|
@ -370,7 +369,7 @@ subroutine material_init()
|
||||||
FE_geomtype
|
FE_geomtype
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt), parameter :: FILEUNIT = 210_pInt
|
||||||
integer(pInt) :: m,c,h, myDebug, myPhase, myHomog
|
integer(pInt) :: m,c,h, myDebug, myPhase, myHomog
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
g, & !< grain number
|
g, & !< grain number
|
||||||
|
@ -469,7 +468,6 @@ subroutine material_init()
|
||||||
endif debugOut
|
endif debugOut
|
||||||
|
|
||||||
call material_populateGrains
|
call material_populateGrains
|
||||||
call config_deallocate('material.config/microstructure')
|
|
||||||
|
|
||||||
allocate(phaseAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(phaseAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
allocate(phasememberAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(phasememberAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
|
@ -921,8 +919,8 @@ subroutine material_parseTexture
|
||||||
IO_floatValue, &
|
IO_floatValue, &
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_texture, &
|
config_deallocate, &
|
||||||
config_deallocate
|
config_texture
|
||||||
use math, only: &
|
use math, only: &
|
||||||
inRad, &
|
inRad, &
|
||||||
math_sampleRandomOri, &
|
math_sampleRandomOri, &
|
||||||
|
@ -1093,6 +1091,7 @@ subroutine material_populateGrains
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_homogenization, &
|
config_homogenization, &
|
||||||
config_microstructure, &
|
config_microstructure, &
|
||||||
|
config_deallocate, &
|
||||||
homogenization_name, &
|
homogenization_name, &
|
||||||
microstructure_name
|
microstructure_name
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
|
@ -1429,6 +1428,7 @@ subroutine material_populateGrains
|
||||||
deallocate(texture_transformation)
|
deallocate(texture_transformation)
|
||||||
deallocate(Nelems)
|
deallocate(Nelems)
|
||||||
deallocate(elemsOfHomogMicro)
|
deallocate(elemsOfHomogMicro)
|
||||||
|
call config_deallocate('material.config/microstructure')
|
||||||
|
|
||||||
end subroutine material_populateGrains
|
end subroutine material_populateGrains
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@ module math
|
||||||
|
|
||||||
real(pReal), dimension(6), parameter, private :: &
|
real(pReal), dimension(6), parameter, private :: &
|
||||||
nrmMandel = [&
|
nrmMandel = [&
|
||||||
1.0_pReal, 1.0_pReal, 1.0_pReal,&
|
1.0_pReal, 1.0_pReal, 1.0_pReal, &
|
||||||
1.414213562373095_pReal, 1.414213562373095_pReal, 1.414213562373095_pReal ] !< weighting for Mandel notation (forward)
|
sqrt(2.0_pReal), sqrt(2.0_pReal), sqrt(2.0_pReal) ] !< weighting for Mandel notation (forward)
|
||||||
|
|
||||||
real(pReal), dimension(6), parameter , public :: &
|
real(pReal), dimension(6), parameter , public :: &
|
||||||
invnrmMandel = [&
|
invnrmMandel = [&
|
||||||
1.0_pReal, 1.0_pReal, 1.0_pReal,&
|
1.0_pReal, 1.0_pReal, 1.0_pReal, &
|
||||||
0.7071067811865476_pReal, 0.7071067811865476_pReal, 0.7071067811865476_pReal ] !< weighting for Mandel notation (backward)
|
1.0_pReal/sqrt(2.0_pReal), 1.0_pReal/sqrt(2.0_pReal), 1.0_pReal/sqrt(2.0_pReal) ] !< weighting for Mandel notation (backward)
|
||||||
|
|
||||||
integer(pInt), dimension (2,6), parameter, private :: &
|
integer(pInt), dimension (2,6), parameter, private :: &
|
||||||
mapVoigt = reshape([&
|
mapVoigt = reshape([&
|
||||||
|
|
|
@ -241,29 +241,29 @@ subroutine plastic_phenopowerlaw_init
|
||||||
select case(outputs(i))
|
select case(outputs(i))
|
||||||
case ('resistance_slip')
|
case ('resistance_slip')
|
||||||
outputID = resistance_slip_ID
|
outputID = resistance_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
case ('accumulatedshear_slip')
|
case ('accumulatedshear_slip')
|
||||||
outputID = accumulatedshear_slip_ID
|
outputID = accumulatedshear_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
case ('shearrate_slip')
|
case ('shearrate_slip')
|
||||||
outputID = shearrate_slip_ID
|
outputID = shearrate_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
case ('resolvedstress_slip')
|
case ('resolvedstress_slip')
|
||||||
outputID = resolvedstress_slip_ID
|
outputID = resolvedstress_slip_ID
|
||||||
outputSize = sum(prm%Nslip)
|
outputSize = prm%totalNslip
|
||||||
|
|
||||||
case ('resistance_twin')
|
case ('resistance_twin')
|
||||||
outputID = resistance_twin_ID
|
outputID = resistance_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
case ('accumulatedshear_twin')
|
case ('accumulatedshear_twin')
|
||||||
outputID = accumulatedshear_twin_ID
|
outputID = accumulatedshear_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
case ('shearrate_twin')
|
case ('shearrate_twin')
|
||||||
outputID = shearrate_twin_ID
|
outputID = shearrate_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
case ('resolvedstress_twin')
|
case ('resolvedstress_twin')
|
||||||
outputID = resolvedstress_twin_ID
|
outputID = resolvedstress_twin_ID
|
||||||
outputSize = sum(prm%Ntwin)
|
outputSize = prm%totalNtwin
|
||||||
|
|
||||||
case ('totalvolfrac_twin')
|
case ('totalvolfrac_twin')
|
||||||
outputID = totalvolfrac_twin_ID
|
outputID = totalvolfrac_twin_ID
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
!> @brief setting precision for real and int type
|
!> @brief setting precision for real and int type
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module prec
|
module prec
|
||||||
|
! ToDo: use, intrinsic :: iso_fortran_env, only : I8 => int64, WP => real64
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
#if (FLOAT==8)
|
#if (FLOAT==8)
|
||||||
|
@ -23,6 +24,7 @@ module prec
|
||||||
NO SUITABLE PRECISION FOR INTEGER SELECTED, STOPPING COMPILATION
|
NO SUITABLE PRECISION FOR INTEGER SELECTED, STOPPING COMPILATION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
integer, parameter, public :: pStringLen = 256 !< default string lenth
|
||||||
integer, parameter, public :: pLongInt = 8 !< integer representation 64 bit (was selected_int_kind(12), number with at least up to +- 1e12)
|
integer, parameter, public :: pLongInt = 8 !< integer representation 64 bit (was selected_int_kind(12), number with at least up to +- 1e12)
|
||||||
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal !< tolerance for internal math self-checks (rotation)
|
real(pReal), parameter, public :: tol_math_check = 1.0e-8_pReal !< tolerance for internal math self-checks (rotation)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue