Merge branch 'marc2021.2' into 'development'
support for MSC.Marc 2021.1 via patches See merge request damask/DAMASK!411
This commit is contained in:
commit
ac4dcd1952
|
@ -12,9 +12,9 @@
|
|||
*.pbz2 binary
|
||||
|
||||
# ignore files from MSC.Marc in language statistics
|
||||
installation/MarcMentat/** linguist-vendored
|
||||
install/MarcMentat/** linguist-vendored
|
||||
src/Marc/include/* linguist-vendored
|
||||
installation/MarcMentat/apply_DAMASK_modifications.py linguist-vendored=false
|
||||
install/MarcMentat/apply_DAMASK_modifications.py linguist-vendored=false
|
||||
|
||||
# ignore reference files for tests in language statistics
|
||||
python/tests/reference/** linguist-vendored
|
||||
|
|
|
@ -64,9 +64,9 @@ variables:
|
|||
PETSc_Intel: "$PETSc3_14_2IMPI2020Intel19_1"
|
||||
PETSc_GNU: "$PETSc3_14_2OMPI4_0GNU10"
|
||||
# ++++++++++++ commercial FEM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
MSC2020: "FEM/MSC/2020"
|
||||
MSC2021: "FEM/MSC/2021.2"
|
||||
# ------------ Defaults ----------------------------------------------
|
||||
MSC: "$MSC2020"
|
||||
MSC: "$MSC2021"
|
||||
IntelMarc: "$IntelCompiler19_1"
|
||||
HDF5Marc: "HDF5/1.12.0/Intel-19.1.2"
|
||||
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
+++
|
||||
@@ -6,18 +6,27 @@
|
||||
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.f on host `hostname`"
|
||||
+echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
echo "program: $program"
|
||||
- $FORTRAN $user.f || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
- userobj=$user.o
|
||||
+ userobj=$usernoext.o
|
||||
|
||||
|
||||
$LOAD ${program} $DIR/lib/main.o\
|
||||
@@ -33,9 +42,12 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $BLAS \
|
||||
$SYSLIBS || \
|
||||
{
|
||||
- echo "$0: link failed for $user.o on host `hostname`"
|
||||
+ echo "$0: link failed for $usernoext.o on host `hostname`"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $userobj
|
||||
+ /bin/rm $DIRJOB/*.mod
|
||||
+ /bin/rm $DIRJOB/*.smod
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
+++
|
||||
@@ -6,18 +6,27 @@
|
||||
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.f on host `hostname`"
|
||||
+echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
echo "program: $program"
|
||||
- $FORTRAN $user.f || \
|
||||
+ $DFORTRANLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
- userobj=$user.o
|
||||
+ userobj=$usernoext.o
|
||||
|
||||
|
||||
$LOAD ${program} $DIR/lib/main.o\
|
||||
@@ -33,9 +42,12 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $BLAS \
|
||||
$SYSLIBS || \
|
||||
{
|
||||
- echo "$0: link failed for $user.o on host `hostname`"
|
||||
+ echo "$0: link failed for $usernoext.o on host `hostname`"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $userobj
|
||||
+ /bin/rm $DIRJOB/*.mod
|
||||
+ /bin/rm $DIRJOB/*.smod
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
+++
|
||||
@@ -6,18 +6,27 @@
|
||||
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.f on host `hostname`"
|
||||
+echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
echo "program: $program"
|
||||
- $FORTRAN $user.f || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
- userobj=$user.o
|
||||
+ userobj=$usernoext.o
|
||||
|
||||
|
||||
$LOAD ${program} $DIR/lib/main.o\
|
||||
@@ -33,9 +42,12 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $BLAS \
|
||||
$SYSLIBS || \
|
||||
{
|
||||
- echo "$0: link failed for $user.o on host `hostname`"
|
||||
+ echo "$0: link failed for $usernoext.o on host `hostname`"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $userobj
|
||||
+ /bin/rm $DIRJOB/*.mod
|
||||
+ /bin/rm $DIRJOB/*.smod
|
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
+++
|
||||
@@ -95,6 +95,11 @@
|
||||
else
|
||||
FCOMPROOT=
|
||||
fi
|
||||
+
|
||||
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
|
||||
+H5FC="$(h5fc -shlib -show)"
|
||||
+HDF5_LIB=${H5FC//ifort/}
|
||||
+FCOMP="$H5FC -DDAMASK_HDF5"
|
||||
|
||||
# AEM
|
||||
if test "$MARCDLLOUTDIR" = ""; then
|
||||
@@ -390,8 +395,8 @@
|
||||
I8DEFINES=
|
||||
I8CDEFINES=
|
||||
else
|
||||
- I8FFLAGS="-i8"
|
||||
- I8DEFINES="-DI64"
|
||||
+ I8FFLAGS="-i8 -integer-size 64"
|
||||
+ I8DEFINES="-DI64 -DINT=8"
|
||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
||||
fi
|
||||
|
||||
@@ -498,7 +503,7 @@
|
||||
PROFILE=" $PROFILE -pg"
|
||||
fi
|
||||
|
||||
-FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB -fp-model source"
|
||||
+FORT_OPT="-c -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB -fp-model source"
|
||||
if test "$MTHREAD" = "OPENMP"
|
||||
then
|
||||
FORT_OPT=" $FORT_OPT -qopenmp"
|
||||
@@ -511,7 +516,7 @@
|
||||
FORT_OPT=" $FORT_OPT -save -zero"
|
||||
fi
|
||||
if test "$MARCHDF_HDF" = "HDF"; then
|
||||
- FORT_OPT="$FORT_OPT -DMARCHDF_HDF=$MARCHDF_HDF $HDF_INCLUDE"
|
||||
+ FORT_OPT="$FORT_OPT -DMARCHDF=$MARCHDF_HDF"
|
||||
fi
|
||||
|
||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
@@ -524,6 +529,30 @@
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
||||
# for compiling free form f90 files. high opt, integer(4)
|
||||
FORTF90="$FCOMP -c -O3"
|
||||
+
|
||||
+# determine DAMASK version
|
||||
+if test -n "$DAMASK_USER"; then
|
||||
+ DAMASKROOT=`dirname $DAMASK_USER`/..
|
||||
+ read DAMASKVERSION < $DAMASKROOT/VERSION
|
||||
+ DAMASKVERSION="'"$DAMASKVERSION"'"
|
||||
+else
|
||||
+ DAMASKVERSION="'N/A'"
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
||||
+DFORTLOWMP="$FCOMP -c -O0 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
+ -qopenmp -qopenmp-threadprivate=compat\
|
||||
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
+DFORTRANMP="$FCOMP -c -O1 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
+ -qopenmp -qopenmp-threadprivate=compat\
|
||||
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
+DFORTHIGHMP="$FCOMP -c -O3 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
+ -qopenmp -qopenmp-threadprivate=compat\
|
||||
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
@@ -697,16 +726,16 @@
|
||||
fi
|
||||
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
- MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
-else
|
||||
- MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
+ MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
+else
|
||||
+ MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
fi
|
||||
|
||||
SECLIBS="-L$MARC_LIB -llapi"
|
||||
|
||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
|
||||
$MKLLIB -L$MARC_MKL -liomp5 \
|
||||
- $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $HDF_LIBS $SOLVER2LIBS"
|
||||
+ $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $HDF5_LIB $SOLVER2LIBS"
|
||||
|
||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
||||
if test "$AEM_DLL" -eq 1
|
||||
@@ -734,7 +763,7 @@
|
||||
OPENSSL=NONE
|
||||
fi
|
||||
|
||||
-SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
|
||||
+SYSLIBS=" $OPENMP -lpthread -cxxlib"
|
||||
|
||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
||||
# if test $MPITYPE = intelmpi
|
||||
@@ -744,7 +773,7 @@
|
||||
# fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
- SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -shared-intel -cxxlib"
|
||||
+ SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -cxxlib"
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1,662 @@
|
|||
---
|
||||
+++
|
||||
@@ -298,7 +298,23 @@
|
||||
|
||||
. "$DIR/getarch"
|
||||
|
||||
+
|
||||
+# getting user subroutine file name
|
||||
+found=0
|
||||
+for i in "$@"; do
|
||||
+ if test $found = 1; then
|
||||
+ DAMASK_USER=$i
|
||||
+ found=0
|
||||
+ fi
|
||||
+ case $i in
|
||||
+ -u* | -U*)
|
||||
+ found=1
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+# sourcing include_linux64 (needs DAMASK_USER to be set)
|
||||
. $MARC_INCLUDE
|
||||
+
|
||||
#
|
||||
|
||||
#
|
||||
@@ -399,7 +415,7 @@
|
||||
did=
|
||||
vid=
|
||||
user=
|
||||
-usersubname=
|
||||
+usernoext=
|
||||
objs=
|
||||
qid=background
|
||||
cpu=
|
||||
@@ -568,7 +584,7 @@
|
||||
justlist=yes
|
||||
;;
|
||||
-fe* | -FE*)
|
||||
- feature=$value
|
||||
+ feature=$value
|
||||
|
||||
;;
|
||||
-pr* | -PR*)
|
||||
@@ -664,50 +680,19 @@
|
||||
esac
|
||||
;;
|
||||
-u* | -U*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
\/*)
|
||||
;;
|
||||
*)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
;;
|
||||
esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ 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`
|
||||
;;
|
||||
-obj | -OBJ)
|
||||
objs="$value"
|
||||
@@ -1188,12 +1173,12 @@
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
- if test "$usersubname"
|
||||
+ if test "$user"
|
||||
then
|
||||
- if test ! -f $usersubname
|
||||
+ if test ! -f $user
|
||||
then
|
||||
error="$error
|
||||
-user subroutine file $usersubname not accessible"
|
||||
+user subroutine file $user not accessible"
|
||||
fi
|
||||
fi
|
||||
if test "$objs"
|
||||
@@ -1367,7 +1352,7 @@
|
||||
else
|
||||
error="$error
|
||||
job id required"
|
||||
- fi
|
||||
+fi
|
||||
fi
|
||||
|
||||
case $qid in
|
||||
@@ -1508,7 +1493,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1540,7 +1525,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1663,7 +1648,7 @@
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
|
||||
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
|
||||
read value
|
||||
if test "$value"
|
||||
then
|
||||
@@ -1672,50 +1657,19 @@
|
||||
user=
|
||||
;;
|
||||
*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
- \/*)
|
||||
- ;;
|
||||
- *)
|
||||
+ \/*)
|
||||
+ ;;
|
||||
+ *)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
- ;;
|
||||
- esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ 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`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -2256,11 +2210,12 @@
|
||||
#
|
||||
# user subroutine used
|
||||
#
|
||||
+# add DAMASK options for linking
|
||||
+ DAMASK="-lstdc++"
|
||||
|
||||
if test "$user"
|
||||
then
|
||||
-# program=$user.marc
|
||||
- program=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ program=$usernoext.marc
|
||||
case $program in
|
||||
\/* | \.\/*)
|
||||
bd=
|
||||
@@ -2373,7 +2328,7 @@
|
||||
fi
|
||||
if test "$user"
|
||||
then
|
||||
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ execpath=$usernoext.marc
|
||||
usersub=1
|
||||
fi
|
||||
export execpath
|
||||
@@ -3256,44 +3211,27 @@
|
||||
echo
|
||||
if test "$user"
|
||||
then
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
-
|
||||
+ userobj=$usermoext.o
|
||||
fi
|
||||
cat > $jid.runmarcscript << END4
|
||||
if test "$user"
|
||||
then
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- fi
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTHIGHMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3313,7 +3251,8 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
$SECLIBS || \
|
||||
@@ -3326,6 +3265,8 @@
|
||||
prgsav=yes
|
||||
fi
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3372,7 +3313,7 @@
|
||||
fi
|
||||
else
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes
|
||||
@@ -3538,7 +3479,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3551,21 +3492,21 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3575,39 +3516,27 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTHIGHMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3627,7 +3556,8 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
$SECLIBS || \
|
||||
@@ -3668,6 +3598,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3726,42 +3658,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
||||
@@ -3886,7 +3818,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3899,20 +3831,20 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3922,37 +3854,25 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTHIGHMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3972,6 +3892,7 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $DAMASK \
|
||||
$SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
@@ -4012,7 +3933,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
-
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
# done if no job id given
|
||||
if test -z "$jid"
|
||||
then
|
||||
@@ -4052,7 +3974,7 @@
|
||||
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
|
||||
fi
|
||||
|
||||
-$RUN_JOB
|
||||
+ $RUN_JOB
|
||||
|
||||
if test $nprocd -gt 1
|
||||
then
|
||||
@@ -4096,42 +4018,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
|
@ -0,0 +1,662 @@
|
|||
---
|
||||
+++
|
||||
@@ -298,7 +298,23 @@
|
||||
|
||||
. "$DIR/getarch"
|
||||
|
||||
+
|
||||
+# getting user subroutine file name
|
||||
+found=0
|
||||
+for i in "$@"; do
|
||||
+ if test $found = 1; then
|
||||
+ DAMASK_USER=$i
|
||||
+ found=0
|
||||
+ fi
|
||||
+ case $i in
|
||||
+ -u* | -U*)
|
||||
+ found=1
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+# sourcing include_linux64 (needs DAMASK_USER to be set)
|
||||
. $MARC_INCLUDE
|
||||
+
|
||||
#
|
||||
|
||||
#
|
||||
@@ -399,7 +415,7 @@
|
||||
did=
|
||||
vid=
|
||||
user=
|
||||
-usersubname=
|
||||
+usernoext=
|
||||
objs=
|
||||
qid=background
|
||||
cpu=
|
||||
@@ -568,7 +584,7 @@
|
||||
justlist=yes
|
||||
;;
|
||||
-fe* | -FE*)
|
||||
- feature=$value
|
||||
+ feature=$value
|
||||
|
||||
;;
|
||||
-pr* | -PR*)
|
||||
@@ -664,50 +680,19 @@
|
||||
esac
|
||||
;;
|
||||
-u* | -U*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
\/*)
|
||||
;;
|
||||
*)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
;;
|
||||
esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ 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`
|
||||
;;
|
||||
-obj | -OBJ)
|
||||
objs="$value"
|
||||
@@ -1188,12 +1173,12 @@
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
- if test "$usersubname"
|
||||
+ if test "$user"
|
||||
then
|
||||
- if test ! -f $usersubname
|
||||
+ if test ! -f $user
|
||||
then
|
||||
error="$error
|
||||
-user subroutine file $usersubname not accessible"
|
||||
+user subroutine file $user not accessible"
|
||||
fi
|
||||
fi
|
||||
if test "$objs"
|
||||
@@ -1367,7 +1352,7 @@
|
||||
else
|
||||
error="$error
|
||||
job id required"
|
||||
- fi
|
||||
+fi
|
||||
fi
|
||||
|
||||
case $qid in
|
||||
@@ -1508,7 +1493,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1540,7 +1525,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1663,7 +1648,7 @@
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
|
||||
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
|
||||
read value
|
||||
if test "$value"
|
||||
then
|
||||
@@ -1672,50 +1657,19 @@
|
||||
user=
|
||||
;;
|
||||
*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
- \/*)
|
||||
- ;;
|
||||
- *)
|
||||
+ \/*)
|
||||
+ ;;
|
||||
+ *)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
- ;;
|
||||
- esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ 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`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -2256,11 +2210,12 @@
|
||||
#
|
||||
# user subroutine used
|
||||
#
|
||||
+# add DAMASK options for linking
|
||||
+ DAMASK="-lstdc++"
|
||||
|
||||
if test "$user"
|
||||
then
|
||||
-# program=$user.marc
|
||||
- program=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ program=$usernoext.marc
|
||||
case $program in
|
||||
\/* | \.\/*)
|
||||
bd=
|
||||
@@ -2373,7 +2328,7 @@
|
||||
fi
|
||||
if test "$user"
|
||||
then
|
||||
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ execpath=$usernoext.marc
|
||||
usersub=1
|
||||
fi
|
||||
export execpath
|
||||
@@ -3256,44 +3211,27 @@
|
||||
echo
|
||||
if test "$user"
|
||||
then
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
-
|
||||
+ userobj=$usermoext.o
|
||||
fi
|
||||
cat > $jid.runmarcscript << END4
|
||||
if test "$user"
|
||||
then
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- fi
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTLOWMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3313,7 +3251,8 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
$SECLIBS || \
|
||||
@@ -3326,6 +3265,8 @@
|
||||
prgsav=yes
|
||||
fi
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3372,7 +3313,7 @@
|
||||
fi
|
||||
else
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes
|
||||
@@ -3538,7 +3479,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3551,21 +3492,21 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3575,39 +3516,27 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTLOWMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3627,7 +3556,8 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
$SECLIBS || \
|
||||
@@ -3668,6 +3598,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3726,42 +3658,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
||||
@@ -3886,7 +3818,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3899,20 +3831,20 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3922,37 +3854,25 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTLOWMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3972,6 +3892,7 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $DAMASK \
|
||||
$SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
@@ -4012,7 +3933,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
-
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
# done if no job id given
|
||||
if test -z "$jid"
|
||||
then
|
||||
@@ -4052,7 +3974,7 @@
|
||||
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
|
||||
fi
|
||||
|
||||
-$RUN_JOB
|
||||
+ $RUN_JOB
|
||||
|
||||
if test $nprocd -gt 1
|
||||
then
|
||||
@@ -4096,42 +4018,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
|
@ -0,0 +1,662 @@
|
|||
---
|
||||
+++
|
||||
@@ -298,7 +298,23 @@
|
||||
|
||||
. "$DIR/getarch"
|
||||
|
||||
+
|
||||
+# getting user subroutine file name
|
||||
+found=0
|
||||
+for i in "$@"; do
|
||||
+ if test $found = 1; then
|
||||
+ DAMASK_USER=$i
|
||||
+ found=0
|
||||
+ fi
|
||||
+ case $i in
|
||||
+ -u* | -U*)
|
||||
+ found=1
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+# sourcing include_linux64 (needs DAMASK_USER to be set)
|
||||
. $MARC_INCLUDE
|
||||
+
|
||||
#
|
||||
|
||||
#
|
||||
@@ -399,7 +415,7 @@
|
||||
did=
|
||||
vid=
|
||||
user=
|
||||
-usersubname=
|
||||
+usernoext=
|
||||
objs=
|
||||
qid=background
|
||||
cpu=
|
||||
@@ -568,7 +584,7 @@
|
||||
justlist=yes
|
||||
;;
|
||||
-fe* | -FE*)
|
||||
- feature=$value
|
||||
+ feature=$value
|
||||
|
||||
;;
|
||||
-pr* | -PR*)
|
||||
@@ -664,50 +680,19 @@
|
||||
esac
|
||||
;;
|
||||
-u* | -U*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
\/*)
|
||||
;;
|
||||
*)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
;;
|
||||
esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ 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`
|
||||
;;
|
||||
-obj | -OBJ)
|
||||
objs="$value"
|
||||
@@ -1188,12 +1173,12 @@
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
- if test "$usersubname"
|
||||
+ if test "$user"
|
||||
then
|
||||
- if test ! -f $usersubname
|
||||
+ if test ! -f $user
|
||||
then
|
||||
error="$error
|
||||
-user subroutine file $usersubname not accessible"
|
||||
+user subroutine file $user not accessible"
|
||||
fi
|
||||
fi
|
||||
if test "$objs"
|
||||
@@ -1367,7 +1352,7 @@
|
||||
else
|
||||
error="$error
|
||||
job id required"
|
||||
- fi
|
||||
+fi
|
||||
fi
|
||||
|
||||
case $qid in
|
||||
@@ -1508,7 +1493,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1540,7 +1525,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1663,7 +1648,7 @@
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
|
||||
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
|
||||
read value
|
||||
if test "$value"
|
||||
then
|
||||
@@ -1672,50 +1657,19 @@
|
||||
user=
|
||||
;;
|
||||
*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
- \/*)
|
||||
- ;;
|
||||
- *)
|
||||
+ \/*)
|
||||
+ ;;
|
||||
+ *)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
- ;;
|
||||
- esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ 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`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -2256,11 +2210,12 @@
|
||||
#
|
||||
# user subroutine used
|
||||
#
|
||||
+# add DAMASK options for linking
|
||||
+ DAMASK="-lstdc++"
|
||||
|
||||
if test "$user"
|
||||
then
|
||||
-# program=$user.marc
|
||||
- program=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ program=$usernoext.marc
|
||||
case $program in
|
||||
\/* | \.\/*)
|
||||
bd=
|
||||
@@ -2373,7 +2328,7 @@
|
||||
fi
|
||||
if test "$user"
|
||||
then
|
||||
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ execpath=$usernoext.marc
|
||||
usersub=1
|
||||
fi
|
||||
export execpath
|
||||
@@ -3256,44 +3211,27 @@
|
||||
echo
|
||||
if test "$user"
|
||||
then
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
-
|
||||
+ userobj=$usermoext.o
|
||||
fi
|
||||
cat > $jid.runmarcscript << END4
|
||||
if test "$user"
|
||||
then
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- fi
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTRANMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3313,7 +3251,8 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
$SECLIBS || \
|
||||
@@ -3326,6 +3265,8 @@
|
||||
prgsav=yes
|
||||
fi
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3372,7 +3313,7 @@
|
||||
fi
|
||||
else
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes
|
||||
@@ -3538,7 +3479,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3551,21 +3492,21 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3575,39 +3516,27 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTRANMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3627,7 +3556,8 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
$SECLIBS || \
|
||||
@@ -3668,6 +3598,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3726,42 +3658,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
||||
@@ -3886,7 +3818,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3899,20 +3831,20 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3922,37 +3854,25 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTRANMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3972,6 +3892,7 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $DAMASK \
|
||||
$SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
@@ -4012,7 +3933,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
-
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
# done if no job id given
|
||||
if test -z "$jid"
|
||||
then
|
||||
@@ -4052,7 +3974,7 @@
|
||||
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
|
||||
fi
|
||||
|
||||
-$RUN_JOB
|
||||
+ $RUN_JOB
|
||||
|
||||
if test $nprocd -gt 1
|
||||
then
|
||||
@@ -4096,42 +4018,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
+++
|
||||
@@ -1,18 +1,5 @@
|
||||
#!/bin/sh
|
||||
-# This script opens a window running an editor. The default window is an
|
||||
-# xterm, and the default editor is vi. These may be customized.
|
||||
+# This script opens a window running an editor.
|
||||
+# The command to invoke the editor is specified during DAMASK installation
|
||||
|
||||
-dir=
|
||||
-for d in /usr/bin /usr/bin/X11; do
|
||||
- if test -x "$d/xterm"; then
|
||||
- dir="$d"
|
||||
- break
|
||||
- fi
|
||||
-done
|
||||
-
|
||||
-if test -z "$dir"; then
|
||||
- echo "$0: Could not find xterm"
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
-"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $*
|
||||
+%EDITOR% $*
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
+++
|
||||
@@ -4,7 +4,8 @@
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
-DIR=/tmp/msc/marc2020
|
||||
+DIR=%INSTALLDIR%/marc2020
|
||||
+
|
||||
if test $MARCDIR1
|
||||
then
|
||||
DIR=$MARCDIR1
|
||||
@@ -59,10 +60,10 @@
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
-if [ "$slv" == "marc" ]; then
|
||||
+if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
-if [ "$slv" == "datfit" ]; then
|
||||
+if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
fi
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
srcfile="-u $srcfile -save y"
|
||||
;;
|
||||
runsaved)
|
||||
+ srcfile=${srcfile%.*}".marc"
|
||||
srcfile="-prog $srcfile"
|
||||
;;
|
||||
esac
|
||||
@@ -181,7 +183,7 @@
|
||||
unset PYTHONHOME
|
||||
unset PYTHONPATH
|
||||
|
||||
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
+"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
+++
|
||||
@@ -4,7 +4,8 @@
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
-DIR=/tmp/msc/marc2020
|
||||
+DIR=%INSTALLDIR%/marc2020
|
||||
+
|
||||
if test $MARCDIR1
|
||||
then
|
||||
DIR=$MARCDIR1
|
||||
@@ -59,10 +60,10 @@
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
-if [ "$slv" == "marc" ]; then
|
||||
+if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
-if [ "$slv" == "datfit" ]; then
|
||||
+if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
fi
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
srcfile="-u $srcfile -save y"
|
||||
;;
|
||||
runsaved)
|
||||
+ srcfile=${srcfile%.*}".marc"
|
||||
srcfile="-prog $srcfile"
|
||||
;;
|
||||
esac
|
||||
@@ -181,7 +183,7 @@
|
||||
unset PYTHONHOME
|
||||
unset PYTHONPATH
|
||||
|
||||
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
+"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
+++
|
||||
@@ -4,7 +4,8 @@
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
-DIR=/tmp/msc/marc2020
|
||||
+DIR=%INSTALLDIR%/marc2020
|
||||
+
|
||||
if test $MARCDIR1
|
||||
then
|
||||
DIR=$MARCDIR1
|
||||
@@ -59,10 +60,10 @@
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
-if [ "$slv" == "marc" ]; then
|
||||
+if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
-if [ "$slv" == "datfit" ]; then
|
||||
+if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
fi
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
srcfile="-u $srcfile -save y"
|
||||
;;
|
||||
runsaved)
|
||||
+ srcfile=${srcfile%.*}".marc"
|
||||
srcfile="-prog $srcfile"
|
||||
;;
|
||||
esac
|
||||
@@ -181,7 +183,7 @@
|
||||
unset PYTHONHOME
|
||||
unset PYTHONPATH
|
||||
|
||||
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
+"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
@ -0,0 +1,156 @@
|
|||
---
|
||||
+++
|
||||
@@ -260,10 +260,17 @@
|
||||
}
|
||||
button {
|
||||
position +25 =
|
||||
- size 25 4
|
||||
+ size 18 4
|
||||
text "ADVANCED JOB SUBMISSION"
|
||||
help "job_run#Job Submission And Control"
|
||||
popmenu job_submit_adv_pm
|
||||
+ }
|
||||
+ button {
|
||||
+ position +18 =
|
||||
+ size 7 4
|
||||
+ text "DAMASK"
|
||||
+ help "damask_run#Job Submission And Control"
|
||||
+ popmenu damask
|
||||
}
|
||||
button {
|
||||
position 0 +4
|
||||
@@ -1123,6 +1130,134 @@
|
||||
mode permanent
|
||||
}
|
||||
|
||||
+#--------------------------------------------------------------------------------------------------
|
||||
+popmenu damask {
|
||||
+
|
||||
+#ifdef QT_MENTAT
|
||||
+ text "DAMASK.MPIE.DE"
|
||||
+#endif
|
||||
+
|
||||
+ group {
|
||||
+#ifndef QT_MENTAT
|
||||
+ label {
|
||||
+ position 0 0
|
||||
+ size 50 4
|
||||
+ text "DAMASK.MPIE.DE"
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ label {
|
||||
+ position 1 6
|
||||
+ size 13 6
|
||||
+ text "Optimzation"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position +13 =
|
||||
+ size 20 6
|
||||
+ text "write Input"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position +18 =
|
||||
+ size 30 6
|
||||
+ text "do not write Inp."
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position -32 +6
|
||||
+ size 12 6
|
||||
+ text "O2 / OpenMP"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +12 =
|
||||
+ size 20 6
|
||||
+ text "Submit"
|
||||
+ command "*submit_job 4 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +20 =
|
||||
+ size 20 6
|
||||
+ text "Execute"
|
||||
+ command "*execute_job 4 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position -32 +6
|
||||
+ size 12 6
|
||||
+ text "O1 / OpenMP"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +12 =
|
||||
+ size 20 6
|
||||
+ text "Submit"
|
||||
+ command "*submit_job 5 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +20 =
|
||||
+ size 20 6
|
||||
+ text "Execute"
|
||||
+ command "*execute_job 5 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position -32 +6
|
||||
+ size 12 6
|
||||
+ text "O0 / OpenMP"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +12 =
|
||||
+ size 20 6
|
||||
+ text "Submit"
|
||||
+ command "*submit_job 6 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +20 =
|
||||
+ size 20 6
|
||||
+ text "Execute"
|
||||
+ command "*execute_job 6 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position 19 +8
|
||||
+ size 12 8
|
||||
+ text "CANCEL"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+ window {
|
||||
+ parent mentat
|
||||
+ origin 38 8
|
||||
+#ifdef DCOM
|
||||
+ size 50 100
|
||||
+#else
|
||||
+ size 50 94
|
||||
+#endif
|
||||
+ background_color body
|
||||
+ border_width 1
|
||||
+ border_color border
|
||||
+ buffering single
|
||||
+ }
|
||||
+ mode permanent
|
||||
+}
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
popmenu job_exit_msg_pm {
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
+++
|
||||
@@ -6,18 +6,27 @@
|
||||
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.f on host `hostname`"
|
||||
+echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
echo "program: $program"
|
||||
- $FORTRAN $user.f || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
- userobj=$user.o
|
||||
+ userobj=$usernoext.o
|
||||
|
||||
|
||||
$LOAD ${program} $DIR/lib/main.o\
|
||||
@@ -33,9 +42,12 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $BLAS \
|
||||
$SYSLIBS || \
|
||||
{
|
||||
- echo "$0: link failed for $user.o on host `hostname`"
|
||||
+ echo "$0: link failed for $usernoext.o on host `hostname`"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $userobj
|
||||
+ /bin/rm $DIRJOB/*.mod
|
||||
+ /bin/rm $DIRJOB/*.smod
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
+++
|
||||
@@ -6,18 +6,27 @@
|
||||
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.f on host `hostname`"
|
||||
+echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
echo "program: $program"
|
||||
- $FORTRAN $user.f || \
|
||||
+ $DFORTRANLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
- userobj=$user.o
|
||||
+ userobj=$usernoext.o
|
||||
|
||||
|
||||
$LOAD ${program} $DIR/lib/main.o\
|
||||
@@ -33,9 +42,12 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $BLAS \
|
||||
$SYSLIBS || \
|
||||
{
|
||||
- echo "$0: link failed for $user.o on host `hostname`"
|
||||
+ echo "$0: link failed for $usernoext.o on host `hostname`"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $userobj
|
||||
+ /bin/rm $DIRJOB/*.mod
|
||||
+ /bin/rm $DIRJOB/*.smod
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
+++
|
||||
@@ -6,18 +6,27 @@
|
||||
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.f on host `hostname`"
|
||||
+echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
echo "program: $program"
|
||||
- $FORTRAN $user.f || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
- userobj=$user.o
|
||||
+ userobj=$usernoext.o
|
||||
|
||||
|
||||
$LOAD ${program} $DIR/lib/main.o\
|
||||
@@ -33,9 +42,12 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $BLAS \
|
||||
$SYSLIBS || \
|
||||
{
|
||||
- echo "$0: link failed for $user.o on host `hostname`"
|
||||
+ echo "$0: link failed for $usernoext.o on host `hostname`"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $userobj
|
||||
+ /bin/rm $DIRJOB/*.mod
|
||||
+ /bin/rm $DIRJOB/*.smod
|
|
@ -0,0 +1,101 @@
|
|||
---
|
||||
+++
|
||||
@@ -118,6 +118,11 @@
|
||||
if test "$MSCCOSIM_VERSION" = ""; then
|
||||
MSCCOSIM_VERSION="2020"
|
||||
fi
|
||||
+
|
||||
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
|
||||
+H5FC="$(h5fc -shlib -show)"
|
||||
+HDF5_LIB=${H5FC//ifort/}
|
||||
+FCOMP="$H5FC -DDAMASK_HDF5"
|
||||
|
||||
# AEM
|
||||
if test "$MARCDLLOUTDIR" = ""; then
|
||||
@@ -439,8 +444,8 @@
|
||||
I8DEFINES=
|
||||
I8CDEFINES=
|
||||
else
|
||||
- I8FFLAGS="-i8"
|
||||
- I8DEFINES="-DI64"
|
||||
+ I8FFLAGS="-i8 -integer-size 64"
|
||||
+ I8DEFINES="-DI64 -DINT=8"
|
||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
||||
fi
|
||||
|
||||
@@ -556,7 +561,7 @@
|
||||
PROFILE=" $PROFILE -pg"
|
||||
fi
|
||||
|
||||
-FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB -fp-model source"
|
||||
+FORT_OPT="-c -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB -fp-model source"
|
||||
if test "$MTHREAD" = "OPENMP"
|
||||
then
|
||||
FORT_OPT=" $FORT_OPT -qopenmp"
|
||||
@@ -569,7 +574,7 @@
|
||||
FORT_OPT=" $FORT_OPT -save -zero"
|
||||
fi
|
||||
if test "$MARCHDF_HDF" = "HDF"; then
|
||||
- FORT_OPT="$FORT_OPT -DMARCHDF_HDF=$MARCHDF_HDF $HDF_INCLUDE"
|
||||
+ FORT_OPT="$FORT_OPT -DMARCHDF=$MARCHDF_HDF"
|
||||
fi
|
||||
|
||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
@@ -582,6 +587,30 @@
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
||||
# for compiling free form f90 files. high opt, integer(4)
|
||||
FORTF90="$FCOMP -c -O3"
|
||||
+
|
||||
+# determine DAMASK version
|
||||
+if test -n "$DAMASK_USER"; then
|
||||
+ DAMASKROOT=`dirname $DAMASK_USER`/..
|
||||
+ read DAMASKVERSION < $DAMASKROOT/VERSION
|
||||
+ DAMASKVERSION="'"$DAMASKVERSION"'"
|
||||
+else
|
||||
+ DAMASKVERSION="'N/A'"
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+# DAMASK compiler calls
|
||||
+DFORTLOWMP="$FCOMP -c -O0 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
+ -qopenmp -qopenmp-threadprivate=compat\
|
||||
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
|
||||
+DFORTRANMP="$FCOMP -c -O1 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
+ -qopenmp -qopenmp-threadprivate=compat\
|
||||
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
|
||||
+DFORTHIGHMP="$FCOMP -c -O3 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
+ -qopenmp -qopenmp-threadprivate=compat\
|
||||
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
@@ -739,7 +768,7 @@
|
||||
|
||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
|
||||
-L$MARC_MKL \
|
||||
- $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $MARC_LIB/libtetmeshinterface.a $MARC_LIB/libcaefatigueinterface.a -L$MARC_LIB -lmkl_blacs_intelmpi_ilp64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -ltetmesh -lmeshgems -lmg-tetra -lmeshgems_stubs $HDF_LIBS $SOLVER2LIBS"
|
||||
+ $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $MARC_LIB/libtetmeshinterface.a $MARC_LIB/libcaefatigueinterface.a -L$MARC_LIB -lmkl_blacs_intelmpi_ilp64 -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -ltetmesh -lmeshgems -lmg-tetra -lmeshgems_stubs $HDF5_LIB $SOLVER2LIBS"
|
||||
|
||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
||||
if test "$AEM_DLL" -eq 1
|
||||
@@ -762,7 +791,7 @@
|
||||
OPENSSL=NONE
|
||||
fi
|
||||
|
||||
-SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
|
||||
+SYSLIBS=" $OPENMP -lpthread -cxxlib"
|
||||
|
||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
||||
# if test $MPITYPE = intelmpi
|
||||
@@ -772,7 +801,7 @@
|
||||
# fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
- SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -shared-intel -cxxlib"
|
||||
+ SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -cxxlib"
|
||||
fi
|
||||
|
||||
if test "$ZLIB" = "ZLIB"; then
|
|
@ -0,0 +1,708 @@
|
|||
---
|
||||
+++
|
||||
@@ -302,7 +302,23 @@
|
||||
|
||||
. "$DIR/getarch"
|
||||
|
||||
+
|
||||
+# getting user subroutine file name
|
||||
+found=0
|
||||
+for i in "$@"; do
|
||||
+ if test $found = 1; then
|
||||
+ DAMASK_USER=$i
|
||||
+ found=0
|
||||
+ fi
|
||||
+ case $i in
|
||||
+ -u* | -U*)
|
||||
+ found=1
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+# sourcing include_linux64 (needs DAMASK_USER to be set)
|
||||
. $MARC_INCLUDE
|
||||
+
|
||||
#
|
||||
|
||||
#
|
||||
@@ -403,7 +419,7 @@
|
||||
did=
|
||||
vid=
|
||||
user=
|
||||
-usersubname=
|
||||
+usernoext=
|
||||
objs=
|
||||
qid=background
|
||||
cpu=
|
||||
@@ -571,7 +587,7 @@
|
||||
justlist=yes
|
||||
;;
|
||||
-fe* | -FE*)
|
||||
- feature=$value
|
||||
+ feature=$value
|
||||
|
||||
;;
|
||||
-pr* | -PR*)
|
||||
@@ -667,50 +683,19 @@
|
||||
esac
|
||||
;;
|
||||
-u* | -U*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
\/*)
|
||||
;;
|
||||
*)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
;;
|
||||
esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ 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`
|
||||
;;
|
||||
-obj | -OBJ)
|
||||
objs="$value"
|
||||
@@ -730,19 +715,19 @@
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
- -dl | -DL)
|
||||
- case $value in
|
||||
- y* | Y*)
|
||||
- deletelog=yes
|
||||
- ;;
|
||||
- n* | N*)
|
||||
- deletelog=no
|
||||
- ;;
|
||||
- *)
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
- ;;
|
||||
+ -dl | -DL)
|
||||
+ case $value in
|
||||
+ y* | Y*)
|
||||
+ deletelog=yes
|
||||
+ ;;
|
||||
+ n* | N*)
|
||||
+ deletelog=no
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ ;;
|
||||
-at | -AT)
|
||||
att=$value
|
||||
;;
|
||||
@@ -1190,12 +1175,12 @@
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
- if test "$usersubname"
|
||||
+ if test "$user"
|
||||
then
|
||||
- if test ! -f $usersubname
|
||||
+ if test ! -f $user
|
||||
then
|
||||
error="$error
|
||||
-user subroutine file $usersubname not accessible"
|
||||
+user subroutine file $user not accessible"
|
||||
fi
|
||||
fi
|
||||
if test "$objs"
|
||||
@@ -1369,7 +1354,7 @@
|
||||
else
|
||||
error="$error
|
||||
job id required"
|
||||
- fi
|
||||
+fi
|
||||
fi
|
||||
|
||||
case $qid in
|
||||
@@ -1514,7 +1499,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid$extra_job_info
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1545,7 +1530,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid$extra_job_info
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1668,7 +1653,7 @@
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
|
||||
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
|
||||
read value
|
||||
if test "$value"
|
||||
then
|
||||
@@ -1677,50 +1662,19 @@
|
||||
user=
|
||||
;;
|
||||
*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
- \/*)
|
||||
- ;;
|
||||
- *)
|
||||
+ \/*)
|
||||
+ ;;
|
||||
+ *)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
- ;;
|
||||
- esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ 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`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -2255,11 +2209,12 @@
|
||||
#
|
||||
# user subroutine used
|
||||
#
|
||||
+# add DAMASK options for linking
|
||||
+ DAMASK="-lstdc++"
|
||||
|
||||
if test "$user"
|
||||
then
|
||||
-# program=$user.marc
|
||||
- program=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ program=$usernoext.marc
|
||||
case $program in
|
||||
\/* | \.\/*)
|
||||
bd=
|
||||
@@ -2372,7 +2327,7 @@
|
||||
fi
|
||||
if test "$user"
|
||||
then
|
||||
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ execpath=$usernoext.marc
|
||||
usersub=1
|
||||
fi
|
||||
export execpath
|
||||
@@ -3255,44 +3210,27 @@
|
||||
echo
|
||||
if test "$user"
|
||||
then
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
-
|
||||
+ userobj=$usermoext.o
|
||||
fi
|
||||
cat > $jid.runmarcscript << END4
|
||||
if test "$user"
|
||||
then
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- fi
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTHIGHMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3312,10 +3250,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
exit 1
|
||||
@@ -3325,6 +3264,8 @@
|
||||
prgsav=yes
|
||||
fi
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3371,7 +3312,7 @@
|
||||
fi
|
||||
else
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes
|
||||
@@ -3537,7 +3478,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3550,21 +3491,21 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3574,39 +3515,27 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTHIGHMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3626,10 +3555,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
@@ -3667,6 +3597,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3725,42 +3657,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
||||
@@ -3885,7 +3817,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3898,20 +3830,20 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3921,37 +3853,25 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTHIGHMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTHIGHMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3971,10 +3891,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $DAMASK \
|
||||
$SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
exit 1
|
||||
@@ -4011,7 +3932,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
-
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
# done if no job id given
|
||||
if test -z "$jid"
|
||||
then
|
||||
@@ -4051,7 +3973,7 @@
|
||||
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
|
||||
fi
|
||||
|
||||
-$RUN_JOB
|
||||
+ $RUN_JOB
|
||||
|
||||
if test $nprocd -gt 1
|
||||
then
|
||||
@@ -4095,42 +4017,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
|
@ -0,0 +1,708 @@
|
|||
---
|
||||
+++
|
||||
@@ -302,7 +302,23 @@
|
||||
|
||||
. "$DIR/getarch"
|
||||
|
||||
+
|
||||
+# getting user subroutine file name
|
||||
+found=0
|
||||
+for i in "$@"; do
|
||||
+ if test $found = 1; then
|
||||
+ DAMASK_USER=$i
|
||||
+ found=0
|
||||
+ fi
|
||||
+ case $i in
|
||||
+ -u* | -U*)
|
||||
+ found=1
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+# sourcing include_linux64 (needs DAMASK_USER to be set)
|
||||
. $MARC_INCLUDE
|
||||
+
|
||||
#
|
||||
|
||||
#
|
||||
@@ -403,7 +419,7 @@
|
||||
did=
|
||||
vid=
|
||||
user=
|
||||
-usersubname=
|
||||
+usernoext=
|
||||
objs=
|
||||
qid=background
|
||||
cpu=
|
||||
@@ -571,7 +587,7 @@
|
||||
justlist=yes
|
||||
;;
|
||||
-fe* | -FE*)
|
||||
- feature=$value
|
||||
+ feature=$value
|
||||
|
||||
;;
|
||||
-pr* | -PR*)
|
||||
@@ -667,50 +683,19 @@
|
||||
esac
|
||||
;;
|
||||
-u* | -U*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
\/*)
|
||||
;;
|
||||
*)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
;;
|
||||
esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ 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`
|
||||
;;
|
||||
-obj | -OBJ)
|
||||
objs="$value"
|
||||
@@ -730,19 +715,19 @@
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
- -dl | -DL)
|
||||
- case $value in
|
||||
- y* | Y*)
|
||||
- deletelog=yes
|
||||
- ;;
|
||||
- n* | N*)
|
||||
- deletelog=no
|
||||
- ;;
|
||||
- *)
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
- ;;
|
||||
+ -dl | -DL)
|
||||
+ case $value in
|
||||
+ y* | Y*)
|
||||
+ deletelog=yes
|
||||
+ ;;
|
||||
+ n* | N*)
|
||||
+ deletelog=no
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ ;;
|
||||
-at | -AT)
|
||||
att=$value
|
||||
;;
|
||||
@@ -1190,12 +1175,12 @@
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
- if test "$usersubname"
|
||||
+ if test "$user"
|
||||
then
|
||||
- if test ! -f $usersubname
|
||||
+ if test ! -f $user
|
||||
then
|
||||
error="$error
|
||||
-user subroutine file $usersubname not accessible"
|
||||
+user subroutine file $user not accessible"
|
||||
fi
|
||||
fi
|
||||
if test "$objs"
|
||||
@@ -1369,7 +1354,7 @@
|
||||
else
|
||||
error="$error
|
||||
job id required"
|
||||
- fi
|
||||
+fi
|
||||
fi
|
||||
|
||||
case $qid in
|
||||
@@ -1514,7 +1499,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid$extra_job_info
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1545,7 +1530,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid$extra_job_info
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1668,7 +1653,7 @@
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
|
||||
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
|
||||
read value
|
||||
if test "$value"
|
||||
then
|
||||
@@ -1677,50 +1662,19 @@
|
||||
user=
|
||||
;;
|
||||
*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
- \/*)
|
||||
- ;;
|
||||
- *)
|
||||
+ \/*)
|
||||
+ ;;
|
||||
+ *)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
- ;;
|
||||
- esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ 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`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -2255,11 +2209,12 @@
|
||||
#
|
||||
# user subroutine used
|
||||
#
|
||||
+# add DAMASK options for linking
|
||||
+ DAMASK="-lstdc++"
|
||||
|
||||
if test "$user"
|
||||
then
|
||||
-# program=$user.marc
|
||||
- program=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ program=$usernoext.marc
|
||||
case $program in
|
||||
\/* | \.\/*)
|
||||
bd=
|
||||
@@ -2372,7 +2327,7 @@
|
||||
fi
|
||||
if test "$user"
|
||||
then
|
||||
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ execpath=$usernoext.marc
|
||||
usersub=1
|
||||
fi
|
||||
export execpath
|
||||
@@ -3255,44 +3210,27 @@
|
||||
echo
|
||||
if test "$user"
|
||||
then
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
-
|
||||
+ userobj=$usermoext.o
|
||||
fi
|
||||
cat > $jid.runmarcscript << END4
|
||||
if test "$user"
|
||||
then
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- fi
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTLOWMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3312,10 +3250,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
exit 1
|
||||
@@ -3325,6 +3264,8 @@
|
||||
prgsav=yes
|
||||
fi
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3371,7 +3312,7 @@
|
||||
fi
|
||||
else
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes
|
||||
@@ -3537,7 +3478,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3550,21 +3491,21 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3574,39 +3515,27 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTLOWMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3626,10 +3555,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
@@ -3667,6 +3597,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3725,42 +3657,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
||||
@@ -3885,7 +3817,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3898,20 +3830,20 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3921,37 +3853,25 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTLOWMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTLOWMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3971,10 +3891,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $DAMASK \
|
||||
$SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
exit 1
|
||||
@@ -4011,7 +3932,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
-
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
# done if no job id given
|
||||
if test -z "$jid"
|
||||
then
|
||||
@@ -4051,7 +3973,7 @@
|
||||
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
|
||||
fi
|
||||
|
||||
-$RUN_JOB
|
||||
+ $RUN_JOB
|
||||
|
||||
if test $nprocd -gt 1
|
||||
then
|
||||
@@ -4095,42 +4017,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
|
@ -0,0 +1,708 @@
|
|||
---
|
||||
+++
|
||||
@@ -302,7 +302,23 @@
|
||||
|
||||
. "$DIR/getarch"
|
||||
|
||||
+
|
||||
+# getting user subroutine file name
|
||||
+found=0
|
||||
+for i in "$@"; do
|
||||
+ if test $found = 1; then
|
||||
+ DAMASK_USER=$i
|
||||
+ found=0
|
||||
+ fi
|
||||
+ case $i in
|
||||
+ -u* | -U*)
|
||||
+ found=1
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+# sourcing include_linux64 (needs DAMASK_USER to be set)
|
||||
. $MARC_INCLUDE
|
||||
+
|
||||
#
|
||||
|
||||
#
|
||||
@@ -403,7 +419,7 @@
|
||||
did=
|
||||
vid=
|
||||
user=
|
||||
-usersubname=
|
||||
+usernoext=
|
||||
objs=
|
||||
qid=background
|
||||
cpu=
|
||||
@@ -571,7 +587,7 @@
|
||||
justlist=yes
|
||||
;;
|
||||
-fe* | -FE*)
|
||||
- feature=$value
|
||||
+ feature=$value
|
||||
|
||||
;;
|
||||
-pr* | -PR*)
|
||||
@@ -667,50 +683,19 @@
|
||||
esac
|
||||
;;
|
||||
-u* | -U*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
\/*)
|
||||
;;
|
||||
*)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
;;
|
||||
esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ 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`
|
||||
;;
|
||||
-obj | -OBJ)
|
||||
objs="$value"
|
||||
@@ -730,19 +715,19 @@
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
- -dl | -DL)
|
||||
- case $value in
|
||||
- y* | Y*)
|
||||
- deletelog=yes
|
||||
- ;;
|
||||
- n* | N*)
|
||||
- deletelog=no
|
||||
- ;;
|
||||
- *)
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
- ;;
|
||||
+ -dl | -DL)
|
||||
+ case $value in
|
||||
+ y* | Y*)
|
||||
+ deletelog=yes
|
||||
+ ;;
|
||||
+ n* | N*)
|
||||
+ deletelog=no
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ ;;
|
||||
-at | -AT)
|
||||
att=$value
|
||||
;;
|
||||
@@ -1190,12 +1175,12 @@
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
- if test "$usersubname"
|
||||
+ if test "$user"
|
||||
then
|
||||
- if test ! -f $usersubname
|
||||
+ if test ! -f $user
|
||||
then
|
||||
error="$error
|
||||
-user subroutine file $usersubname not accessible"
|
||||
+user subroutine file $user not accessible"
|
||||
fi
|
||||
fi
|
||||
if test "$objs"
|
||||
@@ -1369,7 +1354,7 @@
|
||||
else
|
||||
error="$error
|
||||
job id required"
|
||||
- fi
|
||||
+fi
|
||||
fi
|
||||
|
||||
case $qid in
|
||||
@@ -1514,7 +1499,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid$extra_job_info
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1545,7 +1530,7 @@
|
||||
Marc shared lib : $progdll
|
||||
Version type : $mode
|
||||
Job ID : $DIRJID/$jid$extra_job_info
|
||||
-User subroutine name : $usersubname
|
||||
+User subroutine name : $user
|
||||
User objects/libs : $objs
|
||||
Restart file job ID : $rid
|
||||
Substructure file ID : $sid
|
||||
@@ -1668,7 +1653,7 @@
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
- $ECHO "User subroutine name ($usersubname)? $ECHOTXT"
|
||||
+ $ECHO "User subroutine name ($user)? $ECHOTXT"
|
||||
read value
|
||||
if test "$value"
|
||||
then
|
||||
@@ -1677,50 +1662,19 @@
|
||||
user=
|
||||
;;
|
||||
*)
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user
|
||||
- basefile=`$BASENAME $value`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f`
|
||||
- usersubname=$user.f
|
||||
- elif test ${basefile##*.} = F
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F`
|
||||
- usersubname=$user.F
|
||||
- elif test ${basefile##*.} = f90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .f90`
|
||||
- usersubname=$user.f90
|
||||
- elif test ${basefile##*.} = F90
|
||||
- then
|
||||
- user=`dirname $value`/`$BASENAME $value .F90`
|
||||
- usersubname=$user.F90
|
||||
- fi
|
||||
+ user=$value
|
||||
case $user in
|
||||
- \/*)
|
||||
- ;;
|
||||
- *)
|
||||
+ \/*)
|
||||
+ ;;
|
||||
+ *)
|
||||
user=`pwd`/$user
|
||||
- usersubname=`pwd`/$usersubname
|
||||
- ;;
|
||||
- esac
|
||||
- if test ! -f $usersubname
|
||||
- then
|
||||
- if test -f $usersubname.f
|
||||
- then
|
||||
- usersubname=$usersubname.f
|
||||
- elif test -f $usersubname.F
|
||||
- then
|
||||
- usersubname=$usersubname.F
|
||||
- elif test -f $usersubname.f90
|
||||
- then
|
||||
- usersubname=$usersubname.f90
|
||||
- elif test -f $usersubname.F90
|
||||
- then
|
||||
- usersubname=$usersubname.F90
|
||||
- fi
|
||||
- fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ 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`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -2255,11 +2209,12 @@
|
||||
#
|
||||
# user subroutine used
|
||||
#
|
||||
+# add DAMASK options for linking
|
||||
+ DAMASK="-lstdc++"
|
||||
|
||||
if test "$user"
|
||||
then
|
||||
-# program=$user.marc
|
||||
- program=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ program=$usernoext.marc
|
||||
case $program in
|
||||
\/* | \.\/*)
|
||||
bd=
|
||||
@@ -2372,7 +2327,7 @@
|
||||
fi
|
||||
if test "$user"
|
||||
then
|
||||
- execpath=$DIRJOB/`$BASENAME $user .f`.marc
|
||||
+ execpath=$usernoext.marc
|
||||
usersub=1
|
||||
fi
|
||||
export execpath
|
||||
@@ -3255,44 +3210,27 @@
|
||||
echo
|
||||
if test "$user"
|
||||
then
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
-
|
||||
+ userobj=$usermoext.o
|
||||
fi
|
||||
cat > $jid.runmarcscript << END4
|
||||
if test "$user"
|
||||
then
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- fi
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTRANMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3312,10 +3250,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
exit 1
|
||||
@@ -3325,6 +3264,8 @@
|
||||
prgsav=yes
|
||||
fi
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3371,7 +3312,7 @@
|
||||
fi
|
||||
else
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes
|
||||
@@ -3537,7 +3478,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3550,21 +3491,21 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3574,39 +3515,27 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTRANMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3626,10 +3555,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
- $SFLIB \
|
||||
+ $DAMASK \
|
||||
+ $SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
echo " $PRODUCT Exit number 3"
|
||||
@@ -3667,6 +3597,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
|
||||
#
|
||||
# run marc
|
||||
@@ -3725,42 +3657,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
||||
@@ -3885,7 +3817,7 @@
|
||||
# first copy over the user sub if local directories
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RCP $user.f $i:$DIR1/
|
||||
+ $RCP $user $i:$DIR1/
|
||||
fi
|
||||
# do the compilation on the other machine
|
||||
if test ${dirstatus[$counter]} = "shared"
|
||||
@@ -3898,20 +3830,20 @@
|
||||
remoteuser=$DIR1/`$BASENAME $user`
|
||||
$RSH $i /bin/rm $remoteprog 2> /dev/null
|
||||
echo
|
||||
- $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
+ $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog
|
||||
# check if successful, the new executable should be there
|
||||
line=`$RSH $i /bin/ls $remoteprog 2> /dev/null`
|
||||
if test "$line"
|
||||
then
|
||||
echo compilation and linking successful on host $i
|
||||
else
|
||||
- echo "$0: compile failed for $user.f on host $i"
|
||||
+ echo "$0: compile failed for $user on host $i"
|
||||
exit 1
|
||||
fi
|
||||
# remove the user subroutine on remote machine
|
||||
if test ${dirstatus[$counter]} = "local"
|
||||
then
|
||||
- $RSH $i /bin/rm $remoteuser.f 2> /dev/null
|
||||
+ $RSH $i /bin/rm $remoteuser 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -3921,37 +3853,25 @@
|
||||
if test "$userhost"
|
||||
then
|
||||
echo
|
||||
- echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
+ echo "Compiling and linking user subroutine $user on host `hostname`"
|
||||
fi
|
||||
- userobj=$DIRJOB/`$BASENAME $user .f`.o
|
||||
- basefile=`$BASENAME $usersubname`
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- usersub=$DIRJOB/`$BASENAME $user .f`.F
|
||||
- ln -sf "$user.f" "$usersub"
|
||||
- else
|
||||
- usersub=$usersubname
|
||||
- fi
|
||||
+ userobj=$usernoext.o
|
||||
if test $MACHINENAME = "CRAY"
|
||||
then
|
||||
- $FORTRAN $usersub || \
|
||||
+ $DFORTRANMP $user || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
else
|
||||
- $FORTRAN $usersub -o $userobj || \
|
||||
+ $DFORTRANMP $user -o $userobj || \
|
||||
{
|
||||
- echo "$0: compile failed for $user.f"
|
||||
+ echo "$0: compile failed for $user"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
fi
|
||||
- if test ${basefile##*.} = f
|
||||
- then
|
||||
- /bin/rm -f "$usersub"
|
||||
- fi
|
||||
fi # if test $user
|
||||
|
||||
|
||||
@@ -3971,10 +3891,11 @@
|
||||
$TKLIBS \
|
||||
$MRCLIBS \
|
||||
$METISLIBS \
|
||||
+ $DAMASK \
|
||||
$SFLIB \
|
||||
$OPENSSL_LIB \
|
||||
$SYSLIBS \
|
||||
- $SECLIBS || \
|
||||
+ $SECLIBS || \
|
||||
{
|
||||
echo "$0: link failed for ${user:+$userobj }$objs"
|
||||
exit 1
|
||||
@@ -4011,7 +3932,8 @@
|
||||
prgsav=yes
|
||||
fi # if test $link
|
||||
/bin/rm $userobj 2>/dev/null
|
||||
-
|
||||
+/bin/rm $DIRJOB/*.mod 2>/dev/null
|
||||
+/bin/rm $DIRJOB/*.smod 2>/dev/null
|
||||
# done if no job id given
|
||||
if test -z "$jid"
|
||||
then
|
||||
@@ -4051,7 +3973,7 @@
|
||||
RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc "
|
||||
fi
|
||||
|
||||
-$RUN_JOB
|
||||
+ $RUN_JOB
|
||||
|
||||
if test $nprocd -gt 1
|
||||
then
|
||||
@@ -4095,42 +4017,42 @@
|
||||
counter=0
|
||||
if test -f "$host_filt"
|
||||
then
|
||||
- for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
- do
|
||||
- ibase=${i%%.*}
|
||||
- if test $ibase != $thishost
|
||||
+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt`
|
||||
+ do
|
||||
+ ibase=${i%%.*}
|
||||
+ if test $ibase != $thishost
|
||||
+ then
|
||||
+ counter=$((counter+1))
|
||||
+ DIR1=$DIRJOB
|
||||
+ line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
+ workdir=`echo $line | $AWK '{print $3}'`
|
||||
+ if test -n "$workdir"
|
||||
then
|
||||
- counter=$((counter+1))
|
||||
- DIR1=$DIRJOB
|
||||
- line=`grep -v '^#' $userhost | grep "^$ibase "`
|
||||
- workdir=`echo $line | $AWK '{print $3}'`
|
||||
- if test -n "$workdir"
|
||||
- then
|
||||
- DIR1=$workdir
|
||||
- fi
|
||||
- # if an incompatible host uses shared directory,
|
||||
- # then the root machine deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
- then
|
||||
- hname=_$ibase
|
||||
- /bin/rm ${execname}$hname
|
||||
- fi
|
||||
- # if local directory used, the remote machine
|
||||
- # deletes the executable
|
||||
- if test ${dirstatus[$counter]} = "local"
|
||||
- then
|
||||
- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
- fi
|
||||
+ DIR1=$workdir
|
||||
fi
|
||||
- done
|
||||
- fi
|
||||
+ # if an incompatible host uses shared directory,
|
||||
+ # then the root machine deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no"
|
||||
+ then
|
||||
+ hname=_$ibase
|
||||
+ /bin/rm ${execname}$hname
|
||||
+ fi
|
||||
+ # if local directory used, the remote machine
|
||||
+ # deletes the executable
|
||||
+ if test ${dirstatus[$counter]} = "local"
|
||||
+ then
|
||||
+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
fi
|
||||
fi
|
||||
+fi
|
||||
fi
|
||||
else
|
||||
#dllrun >0
|
||||
if test $cpdll = yes; then
|
||||
- filename=`basename $usersubname .f`
|
||||
+ filename=$usernoext
|
||||
/bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null
|
||||
fi
|
||||
if test $rmdll = yes;then
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
+++
|
||||
@@ -1,18 +1,5 @@
|
||||
#!/bin/sh
|
||||
-# This script opens a window running an editor. The default window is an
|
||||
-# xterm, and the default editor is vi. These may be customized.
|
||||
+# This script opens a window running an editor.
|
||||
+# The command to invoke the editor is specified during DAMASK installation
|
||||
|
||||
-dir=
|
||||
-for d in /usr/bin /usr/bin/X11; do
|
||||
- if test -x "$d/xterm"; then
|
||||
- dir="$d"
|
||||
- break
|
||||
- fi
|
||||
-done
|
||||
-
|
||||
-if test -z "$dir"; then
|
||||
- echo "$0: Could not find xterm"
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
-"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $*
|
||||
+%EDITOR% $*
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
+++
|
||||
@@ -4,7 +4,8 @@
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
-DIR=/nethome/f.roters/temp/msc/Marc2021.2/marc2021.2
|
||||
+DIR=%INSTALLDIR%/marc2021.2
|
||||
+
|
||||
if test $MARCDIR1
|
||||
then
|
||||
DIR=$MARCDIR1
|
||||
@@ -59,10 +60,10 @@
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
-if [ "$slv" == "marc" ]; then
|
||||
+if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
-if [ "$slv" == "datfit" ]; then
|
||||
+if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
fi
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
srcfile="-u $srcfile -save y"
|
||||
;;
|
||||
runsaved)
|
||||
+ srcfile=${srcfile%.*}".marc"
|
||||
srcfile="-prog $srcfile"
|
||||
;;
|
||||
esac
|
||||
@@ -181,7 +183,7 @@
|
||||
unset PYTHONHOME
|
||||
unset PYTHONPATH
|
||||
|
||||
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
+"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
+++
|
||||
@@ -4,7 +4,8 @@
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
-DIR=/nethome/f.roters/temp/msc/Marc2021.2/marc2021.2
|
||||
+DIR=%INSTALLDIR%/marc2021.2
|
||||
+
|
||||
if test $MARCDIR1
|
||||
then
|
||||
DIR=$MARCDIR1
|
||||
@@ -59,10 +60,10 @@
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
-if [ "$slv" == "marc" ]; then
|
||||
+if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
-if [ "$slv" == "datfit" ]; then
|
||||
+if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
fi
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
srcfile="-u $srcfile -save y"
|
||||
;;
|
||||
runsaved)
|
||||
+ srcfile=${srcfile%.*}".marc"
|
||||
srcfile="-prog $srcfile"
|
||||
;;
|
||||
esac
|
||||
@@ -181,7 +183,7 @@
|
||||
unset PYTHONHOME
|
||||
unset PYTHONPATH
|
||||
|
||||
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
+"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
+++
|
||||
@@ -4,7 +4,8 @@
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
-DIR=/nethome/f.roters/temp/msc/Marc2021.2/marc2021.2
|
||||
+DIR=%INSTALLDIR%/marc2021.2
|
||||
+
|
||||
if test $MARCDIR1
|
||||
then
|
||||
DIR=$MARCDIR1
|
||||
@@ -59,10 +60,10 @@
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
-if [ "$slv" == "marc" ]; then
|
||||
+if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
-if [ "$slv" == "datfit" ]; then
|
||||
+if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
fi
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
srcfile="-u $srcfile -save y"
|
||||
;;
|
||||
runsaved)
|
||||
+ srcfile=${srcfile%.*}".marc"
|
||||
srcfile="-prog $srcfile"
|
||||
;;
|
||||
esac
|
||||
@@ -181,7 +183,7 @@
|
||||
unset PYTHONHOME
|
||||
unset PYTHONPATH
|
||||
|
||||
-"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
+"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$srcfile $restart $postfile $viewfactorsfile $hostfile \
|
||||
$compat $copy_datfile $copy_postfile $scr_dir $dcoup \
|
||||
$assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1
|
|
@ -0,0 +1,157 @@
|
|||
---
|
||||
+++
|
||||
@@ -260,10 +260,17 @@
|
||||
}
|
||||
button {
|
||||
position +25 =
|
||||
- size 25 4
|
||||
+ size 18 4
|
||||
text "ADVANCED JOB SUBMISSION"
|
||||
help "job_run#Job Submission And Control"
|
||||
popmenu job_submit_adv_pm
|
||||
+ }
|
||||
+ button {
|
||||
+ position +18 =
|
||||
+ size 7 4
|
||||
+ text "DAMASK"
|
||||
+ help "damask_run#Job Submission And Control"
|
||||
+ popmenu damask
|
||||
}
|
||||
button {
|
||||
position 0 +4
|
||||
@@ -1129,6 +1136,135 @@
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
+popmenu damask {
|
||||
+
|
||||
+#ifdef QT_MENTAT
|
||||
+ text "DAMASK.MPIE.DE"
|
||||
+#endif
|
||||
+
|
||||
+ group {
|
||||
+#ifndef QT_MENTAT
|
||||
+ label {
|
||||
+ position 0 0
|
||||
+ size 50 4
|
||||
+ text "DAMASK.MPIE.DE"
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ label {
|
||||
+ position 1 6
|
||||
+ size 13 6
|
||||
+ text "Optimzation"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position +13 =
|
||||
+ size 20 6
|
||||
+ text "write Input"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position +18 =
|
||||
+ size 30 6
|
||||
+ text "do not write Inp."
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position -32 +6
|
||||
+ size 12 6
|
||||
+ text "O2 / OpenMP"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +12 =
|
||||
+ size 20 6
|
||||
+ text "Submit"
|
||||
+ command "*submit_job 4 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +20 =
|
||||
+ size 20 6
|
||||
+ text "Execute"
|
||||
+ command "*execute_job 4 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position -32 +6
|
||||
+ size 12 6
|
||||
+ text "O1 / OpenMP"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +12 =
|
||||
+ size 20 6
|
||||
+ text "Submit"
|
||||
+ command "*submit_job 5 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +20 =
|
||||
+ size 20 6
|
||||
+ text "Execute"
|
||||
+ command "*execute_job 5 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ label {
|
||||
+ position -32 +6
|
||||
+ size 12 6
|
||||
+ text "O0 / OpenMP"
|
||||
+ border_width 1
|
||||
+ border_color black
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +12 =
|
||||
+ size 20 6
|
||||
+ text "Submit"
|
||||
+ command "*submit_job 6 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position +20 =
|
||||
+ size 20 6
|
||||
+ text "Execute"
|
||||
+ command "*execute_job 6 *monitor_job"
|
||||
+ }
|
||||
+
|
||||
+ popdown {
|
||||
+ position 19 +8
|
||||
+ size 12 8
|
||||
+ text "CANCEL"
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+ window {
|
||||
+ parent mentat
|
||||
+ origin 38 8
|
||||
+#ifdef DCOM
|
||||
+ size 50 100
|
||||
+#else
|
||||
+ size 50 94
|
||||
+#endif
|
||||
+ background_color body
|
||||
+ border_width 1
|
||||
+ border_color border
|
||||
+ buffering single
|
||||
+ }
|
||||
+ mode permanent
|
||||
+}
|
||||
+
|
||||
+#--------------------------------------------------------------------------------------------------
|
||||
popmenu job_exit_msg_pm {
|
||||
|
||||
text "EXIT MESSAGE"
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import glob
|
||||
import argparse
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
import damask
|
||||
|
||||
def copy_and_patch(patch,orig,msc_root,editor):
|
||||
try:
|
||||
shutil.copyfile(orig,orig.parent/patch.stem)
|
||||
except shutil.SameFileError:
|
||||
pass
|
||||
damask.execute(f'patch {orig.parent/patch.stem} {patch} -b')
|
||||
with open(orig.parent/patch.stem) as f_in:
|
||||
content = f_in.read()
|
||||
with open(orig.parent/patch.stem,'w') as f_out:
|
||||
f_out.write(content.replace('%INSTALLDIR%',msc_root).replace('%EDITOR%',editor))
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Apply DAMASK modification to MSC.Marc/Mentat',
|
||||
prog = Path(__file__).name,
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
|
||||
parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
|
||||
help='Name of the editor for MSC.Mentat (executable)')
|
||||
parser.add_argument('--msc-root', dest='msc_root', metavar='string',
|
||||
default=damask.solver._marc._msc_root,
|
||||
help='MSC.Marc/Mentat root directory')
|
||||
parser.add_argument('--msc-version', dest='msc_version', type=float, metavar='float',
|
||||
default=damask.solver._marc._msc_version,
|
||||
help='MSC.Marc/Mentat version')
|
||||
parser.add_argument('--damask-root', dest='damask_root', metavar = 'string',
|
||||
default=damask.solver._marc._damask_root,
|
||||
help='DAMASK root directory')
|
||||
|
||||
args = parser.parse_args()
|
||||
msc_root = Path(args.msc_root).expanduser()
|
||||
damask_root = Path(args.damask_root).expanduser()
|
||||
msc_version = int(args.msc_version) if str(args.msc_version).split('.')[1] == '0' else \
|
||||
args.msc_version
|
||||
|
||||
matches = {'Marc_tools': [['comp_user','comp_damask_*mp'],
|
||||
['run_marc','run_damask_*mp'],
|
||||
['include_linux64','include_linux64']],
|
||||
'Mentat_bin': [['edit_window','edit_window'],
|
||||
['submit1','submit?'],
|
||||
['kill1','kill?']],
|
||||
'Mentat_menus':[['job_run.ms','job_run.ms']]}
|
||||
|
||||
|
||||
print('patching files...\n')
|
||||
|
||||
for directory in glob.glob(str(damask_root/f'install/MarcMentat/{msc_version}/*')):
|
||||
for orig, mods in matches[Path(directory).name]:
|
||||
product,subfolder = (msc_root/Path(directory)).name.split('_')
|
||||
orig = msc_root/f'{product.lower()}{msc_version}/{subfolder}/{orig}'
|
||||
for patch in glob.glob(f'{directory}/{mods}.patch'):
|
||||
copy_and_patch(Path(patch),orig,msc_root,args.editor)
|
||||
|
||||
print('compiling Mentat menu binaries...')
|
||||
|
||||
executable = msc_root/f'mentat{msc_version}/bin/mentat'
|
||||
menu_file = msc_root/f'mentat{msc_version}/menus/linux64/main.msb'
|
||||
os.system(f'xvfb-run -a {executable} -compile {menu_file}')
|
|
@ -0,0 +1,14 @@
|
|||
Install DAMASK modifications to use DAMASK_marc
|
||||
This is for the Linux64 version of Marc/Mentat
|
||||
|
||||
Refer to http://damask.mpie.de for complete installation instructions.
|
||||
|
||||
Usually you will need to be root for this to work!
|
||||
|
||||
See Marc and Mentat Release Guide for List of Build and Supported Platforms.
|
||||
|
||||
The Intel Fortran compiler needs to be installed.
|
||||
|
||||
1) Install Marc, Mentat and Documentation as usual
|
||||
Run the test example including subroutines to confirm that the installation of both Marc/Mentat and the Intel Fortran Compiler is ok.
|
||||
2) Run the apply_DAMASK_modifications.py script from this directory.
|
|
@ -1,53 +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"
|
||||
$DFORTHIGHMP $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
|
||||
/bin/rm $DIRJOB/*.smod
|
|
@ -1,53 +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"
|
||||
$DFORTRANLOWMP $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
|
||||
/bin/rm $DIRJOB/*.smod
|
|
@ -1,53 +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"
|
||||
$DFORTRANMP $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
|
||||
/bin/rm $DIRJOB/*.smod
|
|
@ -1,41 +0,0 @@
|
|||
#!/bin/ksh
|
||||
# 1st arg: $DIR
|
||||
# 2nd arg: $DIRJOB
|
||||
# 3rd arg: $user
|
||||
# 4th arg: $program
|
||||
DIR=$1
|
||||
user=$3
|
||||
program=$4
|
||||
. $DIR/tools/include
|
||||
DIRJOB=$2
|
||||
cd $DIRJOB
|
||||
echo "Compiling and linking user subroutine $user.f on host `hostname`"
|
||||
echo "program: $program"
|
||||
$FORTRAN $user.f || \
|
||||
{
|
||||
echo "$0: compile failed for $user.f"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $program 2>/dev/null
|
||||
userobj=$user.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 \
|
||||
$SYSLIBS || \
|
||||
{
|
||||
echo "$0: link failed for $user.o on host `hostname`"
|
||||
exit 1
|
||||
}
|
||||
/bin/rm $userobj
|
|
@ -1,814 +0,0 @@
|
|||
#
|
||||
# General definitions for the Marc 2020 version
|
||||
#
|
||||
# EM64T
|
||||
#
|
||||
# Linux RedHat 7.3 / SuSE 12 SP1
|
||||
#
|
||||
# 64 bit MPI version
|
||||
#
|
||||
# Intel(R) Fortran Intel(R) 64 Compiler XE for applications
|
||||
# running on Intel(R) 64, Version 19.0.4.243 Build 20190416
|
||||
#
|
||||
# Intel(R) C Intel(R) 64 Compiler XE for applications
|
||||
# running on Intel(R) 64, Version 19.0.4.243 Build 20190416
|
||||
#
|
||||
# To check the O/S level, type:
|
||||
# uname -a
|
||||
#
|
||||
# Distributed parallel MPI libraries:
|
||||
# Intel MPI 2019 Update 4
|
||||
# To check the mpi version, type:
|
||||
# mpiexec.hydra -version
|
||||
#
|
||||
# To check the Compiler level, type using the compiler
|
||||
# installation path:
|
||||
# ifort -V
|
||||
# icc -V
|
||||
#
|
||||
# REMARKS : This file contains the definitions of variables used during
|
||||
# compilation loading and use of the MARC programmes . The
|
||||
# current machine type is identified by means of the variable
|
||||
# MACHINE , defined below.
|
||||
#
|
||||
#
|
||||
# MPI_ROOT: root directory in which mpi shared libraries, etc. are located
|
||||
# DIRJOB : directory in which spawned jobs should look for Marc input
|
||||
# MPI_ARCH: system architecture
|
||||
# MPI_EPATH: path where executable resides
|
||||
#
|
||||
REVISION="VERSION, BUILD"
|
||||
HOSTNAME=`hostname`
|
||||
|
||||
# find available memory in Mbyte on the machine
|
||||
# can be set explicitly
|
||||
MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'`
|
||||
|
||||
# set _OEM_NASTRAN to 1 for MD Nastran build
|
||||
# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable
|
||||
_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}"
|
||||
|
||||
# uncomment the following line for an autoforge build
|
||||
#AUTOFORGE=1
|
||||
AUTOFORGE=0
|
||||
export AUTOFORGE
|
||||
|
||||
# integer size
|
||||
if test "$MARC_INTEGER_SIZE" = "" ; then
|
||||
INTEGER_PATH=
|
||||
else
|
||||
INTEGER_PATH=/$MARC_INTEGER_SIZE
|
||||
fi
|
||||
|
||||
FCOMP=ifort
|
||||
INTELPATH="/opt/intel/compilers_and_libraries_2019/linux"
|
||||
|
||||
# find the root directory of the compiler installation:
|
||||
# - if ifort is found in $PATH, then the root directory is derived
|
||||
# from the path to ifort
|
||||
# - if ifort is not found in $PATH, the root directory is assumed
|
||||
# to be $INTELPATH and the directory in which ifort is found is
|
||||
# added to $PATH
|
||||
FCOMPPATH=`which "$FCOMP" 2>/dev/null`
|
||||
if test -n "$FCOMPPATH"; then
|
||||
# derive the root directory from $FCOMPPATH
|
||||
FCOMPROOT="${FCOMPPATH%/bin/intel64/$FCOMP}"
|
||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
||||
FCOMPROOT="${FCOMPPATH%/bin/$FCOMP}"
|
||||
fi
|
||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
||||
FCOMPROOT=
|
||||
fi
|
||||
elif test -d "$INTELPATH"; then
|
||||
# check for compiler in $INTELPATH
|
||||
if test -d "$INTELPATH/bin/intel64" -a \
|
||||
-x "$INTELPATH/bin/intel64/$FCOMP" ; then
|
||||
FCOMPROOT="$INTELPATH"
|
||||
PATH="$INTELPATH/bin/intel64:$PATH"
|
||||
elif test -d "$INTELPATH/bin" -a \
|
||||
-x "$INTELPATH/bin/$FCOMP"; then
|
||||
FCOMPROOT="$INTELPATH"
|
||||
PATH="$INTELPATH/bin:$PATH"
|
||||
else
|
||||
FCOMPROOT=
|
||||
fi
|
||||
else
|
||||
FCOMPROOT=
|
||||
fi
|
||||
|
||||
# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
|
||||
H5FC="$(h5fc -shlib -show)"
|
||||
HDF5_LIB=${H5FC//ifort/}
|
||||
FCOMP="$H5FC -DDAMASK_HDF5"
|
||||
|
||||
# AEM
|
||||
if test "$MARCDLLOUTDIR" = ""; then
|
||||
DLLOUTDIR="$MARC_LIB"
|
||||
else
|
||||
DLLOUTDIR="$MARCDLLOUTDIR"
|
||||
fi
|
||||
|
||||
# settings for MKL
|
||||
if test "$IMKLDIR" = ""; then
|
||||
MARC_MKL="$FCOMPROOT/mkl/lib/intel64"
|
||||
else
|
||||
MARC_MKL=$IMKLDIR/lib/intel64
|
||||
fi
|
||||
|
||||
#
|
||||
# settings for Metis
|
||||
#
|
||||
METIS="-I$METIS_SOURCE/include"
|
||||
METISLIBS="$METISLIB_DIR/libmarcddm.a $METISLIB_DIR/libmarcmetis.a "
|
||||
|
||||
#
|
||||
# settings for MPI
|
||||
#
|
||||
# RCP and RSH are used for parallel network runs
|
||||
# replace with similar commands like rsh if needed
|
||||
RCP=/usr/bin/scp
|
||||
RSH=/usr/bin/ssh
|
||||
#
|
||||
|
||||
|
||||
MPI_DEFAULT=intelmpi
|
||||
MPI_OTHER=
|
||||
|
||||
MPITYPE=$MPI_DEFAULT
|
||||
|
||||
if test $AUTOFORGE
|
||||
then
|
||||
if test $AUTOFORGE = 1
|
||||
then
|
||||
MPITYPE=none
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# overrule MPITYPE setting with environmental variable MARC_MPITYPE
|
||||
if test $MARC_MPITYPE
|
||||
then
|
||||
MPITYPE=$MARC_MPITYPE
|
||||
fi
|
||||
|
||||
# always set MPITYPE to none for MD Nastran
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
MPITYPE=none
|
||||
fi
|
||||
|
||||
# Edit following lines to build with GPGPU version of BCS Solver for
|
||||
# NVIDIA platforms
|
||||
#BCSGPUSOLVER=NONE
|
||||
BCSGPUSOLVER=BCSGPU
|
||||
|
||||
# Edit following lines to build solver 2 with GPU support
|
||||
SOLVER2GPU=GPU
|
||||
#SOLVER2GPU=NONE
|
||||
|
||||
# Edit following lines to set the openssl library
|
||||
if test "$OPENSSL" != "NONE"
|
||||
then
|
||||
OPENSSL_LIB="$MARC_LIB/libcrypto.a"
|
||||
fi
|
||||
OPENSSL_INCLUDE=-I"$MARC_OPENSSL/include/"
|
||||
|
||||
MARCHDF_HDF=HDF
|
||||
#MARCHDF_HDF=NONE
|
||||
|
||||
# activate contact component build if flagged
|
||||
AEM_DLL=0
|
||||
if test "$AEM_BUILD" = "ON" ; then
|
||||
AEM_DLL=1
|
||||
LINK_MARC_DLL="-shared -fPIC"
|
||||
EXT_DLL="so"
|
||||
MPITYPE=none
|
||||
MPI_OTHER=
|
||||
MARCHDF_HDF=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
MUMPSSOLVER=NONE
|
||||
CASISOLVER=NONE
|
||||
fi
|
||||
|
||||
if test "$MARCHDF_HDF" = "HDF"; then
|
||||
HDF_INCLUDE="-I$MARC_HDF/include"
|
||||
HDF_LIBS="$MARC_LIB/libhdf5_fortran.so.100 $MARC_LIB/libhdf5.so.103"
|
||||
fi
|
||||
|
||||
SOLVERFLAGS=
|
||||
if test "$BCSGPUSOLVER" = BCSGPU
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA"
|
||||
BCS_DIR=bcsgpusolver
|
||||
else
|
||||
BCS_DIR=bcssolver
|
||||
fi
|
||||
#
|
||||
# settings for MPI
|
||||
#
|
||||
DDM=
|
||||
if test $MPITYPE != none
|
||||
then
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
INTELMPI_VERSION=HYDRA
|
||||
FCOMPMPI=mpiifort
|
||||
if test -n "$MARC_INTELMPI" ; then
|
||||
MPI_ROOT=$MARC_INTELMPI
|
||||
else
|
||||
MPI_ROOT=/opt/intel/compilers_and_libraries_2019/linux/mpi/intel64
|
||||
MARC_INTELMPI=$MPI_ROOT
|
||||
fi
|
||||
DDM="-I${MPI_ROOT}/include -DDDM"
|
||||
PATH=$MPI_ROOT/bin:$PATH
|
||||
export PATH
|
||||
LD_LIBRARY_PATH=$MPI_ROOT/lib:$MPI_ROOT/lib/release:$MPI_ROOT/libfabric/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
if test $INTELMPI_VERSION = HYDRA
|
||||
then
|
||||
RUN_JOB1="${MPI_ROOT}/bin/mpiexec.hydra -genvall -n "
|
||||
RUN_JOB2="${MPI_ROOT}/bin/mpiexec.hydra -genvall"
|
||||
else
|
||||
RUN_JOB1="${MPI_ROOT}/bin/mpiexec -n "
|
||||
RUN_JOB2="${MPI_ROOT}/bin/mpiexec -configfile "
|
||||
fi
|
||||
RUN_JOB0=
|
||||
MPI_CLEAN=
|
||||
MPI_EPATH=$MARC_BIN
|
||||
MPIR_HOME=$MPI_ROOT
|
||||
MPICH_F77=$FCOMP
|
||||
MPICH_F77LINKER=$FCOMP
|
||||
export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER
|
||||
FI_PROVIDER_PATH=$MPI_ROOT/libfabric/lib/prov
|
||||
export FI_PROVIDER_PATH
|
||||
fi
|
||||
else
|
||||
MPI_ROOT=$MARC_DUMMYMPI
|
||||
export MPI_ROOT=$MARC_DUMMYMPI
|
||||
DDM="-I$MPI_ROOT/include"
|
||||
fi
|
||||
|
||||
#
|
||||
# variables for the "maintain" script
|
||||
#
|
||||
|
||||
MACHINENAME=LINUX
|
||||
MACHINE64BIT=yes
|
||||
MACHINE=Linux_EM64T
|
||||
DEV=/dev/tape
|
||||
GETLOG="whoami"
|
||||
CLEAR="clear"
|
||||
MY_UNAME=`uname -a`
|
||||
|
||||
# Edit following 2 lines to build with VKI Solver
|
||||
#VKISOLVER=VKI
|
||||
VKISOLVER=NONE
|
||||
|
||||
# Edit following 2 lines to build with CASI Solver
|
||||
CASISOLVER=CASI
|
||||
if test "$MARC_CASISOLVER" = "NONE" ; then
|
||||
CASISOLVER=NONE
|
||||
fi
|
||||
#CASISOLVER=NONE
|
||||
|
||||
# Edit following 2 lines to build with MF2 Solver
|
||||
MF2SOLVER=NONE
|
||||
#MF2SOLVER=SERIAL
|
||||
#MF2SOLVER=MF2PARALLEL
|
||||
|
||||
# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO)
|
||||
#INTELSOLVER=NONE
|
||||
INTELSOLVER=PARDISO
|
||||
|
||||
# Edit following lines to build with MUMPS
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
#MUMPSSOLVER=NONE
|
||||
MUMPSSOLVER=MUMPS
|
||||
else
|
||||
#MUMPSSOLVER=NONE
|
||||
MUMPSSOLVER=MUMPS
|
||||
fi
|
||||
|
||||
# Edit following 2 lines to build MARC dynamic shared library
|
||||
MARC_DLL=MARC_DLL
|
||||
MARC_DLL=NONE
|
||||
|
||||
# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
VKISOLVER=NONE
|
||||
CASISOLVER=NONE
|
||||
MF2SOLVER=NONE
|
||||
INTELSOLVER=NONE
|
||||
MUMPSSOLVER=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
MARC_DLL=NONE
|
||||
fi
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
VKISOLVER=NONE
|
||||
CASISOLVER=NONE
|
||||
MF2SOLVER=NONE
|
||||
INTELSOLVER=NONE
|
||||
MUMPSSOLVER=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
fi
|
||||
|
||||
#
|
||||
# define Fortran and C compile syntax
|
||||
#
|
||||
if test "$VKISOLVER" = VKI
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DVKI"
|
||||
fi
|
||||
|
||||
if test "$CASISOLVER" = CASI
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DCASI"
|
||||
fi
|
||||
|
||||
if test "$MF2SOLVER" = MF2PARALLEL
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL"
|
||||
fi
|
||||
if test "$MF2SOLVER" = MF2SERIAL
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL"
|
||||
fi
|
||||
|
||||
if test "$INTELSOLVER" = PARDISO
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DPARDISO"
|
||||
fi
|
||||
|
||||
if test "$MUMPSSOLVER" = MUMPS
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMUMPS"
|
||||
fi
|
||||
|
||||
|
||||
if test "$MARC_DLL" = MARC_DLL
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL"
|
||||
fi
|
||||
|
||||
if test "$SOLVER2GPU" = GPU
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DSOLVER2GPU"
|
||||
fi
|
||||
|
||||
LINK_OPT=
|
||||
DEBUG_OPT=
|
||||
C_DEBUG_OPT=
|
||||
|
||||
#Uncomment following line to build Marc in debuggable mode
|
||||
MARCDEBUG=
|
||||
#MARCDEBUG="ON"
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
LINK_OPT="-debug -traceback"
|
||||
DEBUG_OPT="-debug -traceback"
|
||||
C_DEBUG_OPT="-debug -traceback"
|
||||
fi
|
||||
|
||||
|
||||
MARCCHECK=
|
||||
#MARCCHECK="ON"
|
||||
if test "$MARCCHECK" = "ON"
|
||||
then
|
||||
DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv "
|
||||
C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv "
|
||||
fi
|
||||
|
||||
MARCCODECOV=
|
||||
#MARCCODECOV="ON"
|
||||
|
||||
MARCCODEPROF=
|
||||
#MARCCODEPROF="ON"
|
||||
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
I8FFLAGS=
|
||||
I8DEFINES=
|
||||
I8CDEFINES=
|
||||
else
|
||||
I8FFLAGS="-i8 -integer-size 64"
|
||||
I8DEFINES="-DI64 -DINT=8"
|
||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
||||
fi
|
||||
|
||||
MTHREAD=OPENMP
|
||||
if test "$MARC_OPENMP" = "NONE" ; then
|
||||
MTHREAD=NONE
|
||||
fi
|
||||
#MTHREAD=NONE
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
MTHREAD=NONE
|
||||
fi
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
MTHREAD=NONE
|
||||
CASISOLVER=NONE
|
||||
VKISOLVER=NONE
|
||||
MF2SOLVER=NONE
|
||||
INTELSOLVER=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
OPENSSL_LIB=
|
||||
MARC_DLL=NONE
|
||||
METISLIBS=
|
||||
fi
|
||||
|
||||
OMP_COMPAT=NO
|
||||
OMP_COMPAT=YES
|
||||
if test "$MTHREAD" = "NONE"
|
||||
then
|
||||
OMP_COMPAT=NO
|
||||
fi
|
||||
|
||||
CDEFINES=
|
||||
FDEFINES=
|
||||
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
CDEFINES="$CDEFINES -D_OEM_NASTRAN"
|
||||
FDEFINES="$FDEFINES -D_OEM_NASTRAN"
|
||||
fi
|
||||
|
||||
FDEFINES="$FDEFINES -D_IMPLICITNONE"
|
||||
|
||||
if test "$_OEM_NASTRAN" -eq 0
|
||||
then
|
||||
FDEFINES="$FDEFINES -DMKL -DOPENMP"
|
||||
fi
|
||||
|
||||
if test "$OMP_COMPAT" = "YES"
|
||||
then
|
||||
FDEFINES="$FDEFINES -DOMP_COMPAT"
|
||||
fi
|
||||
|
||||
# -D_MSCMARC
|
||||
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT $MARC_SIMUFACT"
|
||||
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
FDEFINES="$FDEFINES -D_AEMNL -DAAA"
|
||||
CDEFINES="$CDEFINES -D_AEMNL -DAAA"
|
||||
fi
|
||||
|
||||
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS -I$LAPI_IMPORTS/common/include"
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
CINCL="$CINCL -I../../include"
|
||||
fi
|
||||
|
||||
CC_OPT=
|
||||
if test "$MTHREAD" = "OPENMP"
|
||||
then
|
||||
CC_OPT=" $CC_OPT -qopenmp"
|
||||
fi
|
||||
|
||||
CC="icc -c $CC_OPT -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCLOW="icc -c $CC_OPT -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCHIGH="icc -c $CC_OPT -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
CC="icc -c $CC_OPT -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCLOW="icc $CC_OPT -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCHIGH="icc $CC_OPT -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
fi
|
||||
|
||||
LOAD_CC="icc $CC_OPT -O1 -DLinux -DLINUX -DLinux_intel"
|
||||
CCT="$CC"
|
||||
CCTLOW="$CCLOW"
|
||||
CCTHIGH="$CCHIGH"
|
||||
|
||||
#PROFILE="-Mprof=func"
|
||||
#PROFILE="-Mprof=lines"
|
||||
#PROFILE="-Mprof=func,mpi"
|
||||
PROFILE=
|
||||
#PROFILE="-init=snan,arrays -CB -traceback -fpe0 -fp-stack-check -check all -check uninit -ftrapuv"
|
||||
if test "$MARCCODECOV" = "ON"
|
||||
then
|
||||
PROFILE="-prof-gen=srcpos"
|
||||
fi
|
||||
if test "$MARCCODEPROF" = "ON"
|
||||
then
|
||||
PROFILE=" $PROFILE -pg"
|
||||
fi
|
||||
|
||||
FORT_OPT="-c -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB -fp-model source"
|
||||
if test "$MTHREAD" = "OPENMP"
|
||||
then
|
||||
FORT_OPT=" $FORT_OPT -qopenmp"
|
||||
if test "$OMP_COMPAT" = "YES"
|
||||
then
|
||||
FORT_OPT=" $FORT_OPT -qopenmp-threadprivate=compat"
|
||||
fi
|
||||
else
|
||||
# FORT_OPT=" $FORT_OPT -auto "
|
||||
FORT_OPT=" $FORT_OPT -save -zero"
|
||||
fi
|
||||
if test "$MARCHDF_HDF" = "HDF"; then
|
||||
FORT_OPT="$FORT_OPT -DMARCHDF=$MARCHDF_HDF"
|
||||
fi
|
||||
|
||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
||||
# for compiling free form f90 files. high opt, integer(4)
|
||||
FORTF90="$FCOMP -c -O3"
|
||||
|
||||
# determine DAMASK version
|
||||
if test -n "$DAMASK_USER"; then
|
||||
DAMASKROOT=`dirname $DAMASK_USER`/..
|
||||
read DAMASKVERSION < $DAMASKROOT/VERSION
|
||||
DAMASKVERSION="'"$DAMASKVERSION"'"
|
||||
else
|
||||
DAMASKVERSION="'N/A'"
|
||||
fi
|
||||
|
||||
|
||||
# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3
|
||||
DFORTLOWMP="$FCOMP -c -O0 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
-qopenmp -qopenmp-threadprivate=compat\
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
DFORTRANMP="$FCOMP -c -O1 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
-qopenmp -qopenmp-threadprivate=compat\
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
DFORTHIGHMP="$FCOMP -c -O3 -qno-offload -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
-fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2020 -DDAMASKVERSION=$DAMASKVERSION \
|
||||
-qopenmp -qopenmp-threadprivate=compat\
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
||||
fi
|
||||
|
||||
FORTLOWT="$FORTLOW"
|
||||
FORTRANT="$FORTRAN"
|
||||
FORTHIGHT="$FORTHIGH"
|
||||
|
||||
FORTRANMNF="$FCOMP -c $FDEFINES "
|
||||
CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE"
|
||||
|
||||
if test $MPITYPE != none
|
||||
then
|
||||
if test $MPITYPE = hpmpi
|
||||
then
|
||||
LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
||||
LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
||||
fi
|
||||
# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines
|
||||
# if test $MPITYPE = intelmpi
|
||||
# then
|
||||
# INCLUDEMPI="-I$MPI_ROOT/include -I$VT_ROOT/include"
|
||||
# LOAD="$MPI_ROOT/bin/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
||||
# LOADT="$MPI_ROOT/bin/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
||||
# fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
LOAD="ifort $PROFILE $LINK_OPT -o "
|
||||
LOADT="ifort $PROFILE $LINK_OPT -o "
|
||||
fi
|
||||
else
|
||||
LOAD="$FCOMP $LINK_OPT -o "
|
||||
LOADT="$FCOMP $LINK_OPT -o "
|
||||
fi
|
||||
|
||||
if test "$MARC_DLL" = MARC_DLL
|
||||
then
|
||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
||||
CC="$CC -fPIC"
|
||||
CCMNF="$CCMNF -fPIC"
|
||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread"
|
||||
LINK_MARC_DLL="-shared -fPIC"
|
||||
LOAD_DLL=$LOAD
|
||||
LOADT_DLL=$LOADT
|
||||
EXT_DLL="so"
|
||||
fi
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
||||
CC="$CC -fPIC"
|
||||
CCMNF="$CCMNF -fPIC"
|
||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide"
|
||||
LINK_MARC_DLL="-shared -fPIC"
|
||||
LOAD_DLL=$LOAD
|
||||
LOADT_DLL=$LOADT
|
||||
EXT_DLL="so"
|
||||
fi
|
||||
|
||||
|
||||
XLIBS="-L/usr/X11/lib -lX11 "
|
||||
|
||||
#
|
||||
# define archive and ranlib syntax
|
||||
#
|
||||
|
||||
ARC="ar rvl"
|
||||
ARD="ar dvl"
|
||||
ARX="ar xl"
|
||||
RAN=""
|
||||
|
||||
#
|
||||
# choose which libraries you want to use ( e.g. blas )
|
||||
#
|
||||
|
||||
if test "$VKISOLVER" = VKI
|
||||
then
|
||||
VKISOLVERLIBS="$MARC_LIB/vkisolver.a"
|
||||
else
|
||||
VKISOLVERLIBS=
|
||||
fi
|
||||
|
||||
if test "$CASISOLVER" = CASI
|
||||
then
|
||||
CASISOLVERLIBS="$CASILIB_DIR/libmarccasi.a $CASILIB_DIR/libcasi.a"
|
||||
else
|
||||
CASISOLVERLIBS=
|
||||
fi
|
||||
|
||||
MF2SOLVERLIBS=
|
||||
if test "$MF2SOLVER" = MF2PARALLEL
|
||||
then
|
||||
MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \
|
||||
$MARC_LIB/mf2parallel/libsym.a \
|
||||
$MARC_LIB/mf2parallel/libmet.a \
|
||||
$MARC_LIB/mf2parallel/libmf2.a \
|
||||
$MARC_LIB/mf2parallel/libgauss.a \
|
||||
$MARC_LIB/mf2parallel/libmf2.a \
|
||||
$MARC_LIB/mf2parallel/libgauss.a \
|
||||
$MARC_LIB/mf2parallel/libnum.a \
|
||||
$MARC_LIB/mf2parallel/libutl.a \
|
||||
$MARC_LIB/mf2parallel/libr8.a \
|
||||
$MARC_LIB/mf2parallel/libz.a "
|
||||
fi
|
||||
|
||||
if test "$MUMPSSOLVER" = MUMPS
|
||||
then
|
||||
MUMPSSOLVERLIBS="$MUMPSLIB_DIR/libmumps.a"
|
||||
if test $MPITYPE = none
|
||||
then
|
||||
MUMPSSOLVERLIBS2=
|
||||
echo hello > /dev/null
|
||||
fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
MUMPSSOLVERLIBS="$MUMPSLIB_DIR/libmumps_intelmpi.a"
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a "
|
||||
else
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a "
|
||||
fi
|
||||
fi
|
||||
if test $MPITYPE = hpmpi
|
||||
then
|
||||
MUMPSSOLVERLIBS="$MUMPSLIB_DIR/libmumps_hpmpi.a"
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a"
|
||||
else
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
MUMPSSOLVERLIBS=
|
||||
MUMPSSOLVERLIBS2=
|
||||
fi
|
||||
|
||||
if test "$BCSGPUSOLVER" = BCSGPU
|
||||
then
|
||||
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a "
|
||||
MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda "
|
||||
MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda "
|
||||
MARCCUDALIBS=$MARCCUDALIBS1
|
||||
else
|
||||
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
|
||||
fi
|
||||
|
||||
SOLVER2LIBS=
|
||||
if test "$SOLVER2GPU" = GPU
|
||||
then
|
||||
SOLVER2LIBS="-L$MARC_LIB/cuda_dummy -lsolver2gpu"
|
||||
fi
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
BCSSOLVERLIBS=
|
||||
fi
|
||||
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
else
|
||||
MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
fi
|
||||
|
||||
SECLIBS="-L$MARC_LIB -llapi"
|
||||
|
||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
|
||||
$MKLLIB -L$MARC_MKL -liomp5 \
|
||||
$MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $HDF5_LIB $SOLVER2LIBS"
|
||||
|
||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
SOLVERLIBS_DLL="$MKLLIB -L$MARC_MKL -liomp5 $MARC_LIB/blas_src.a"
|
||||
fi
|
||||
MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}"
|
||||
MRCLIBSPAR="$MARC_LIB/clib.a"
|
||||
STUBS="$MARC_LIB/stubs.a "
|
||||
MNFLIBS="$MARC_LIB/libmnf.a"
|
||||
MDUSER="$MARC_LIB/md_user.a"
|
||||
if test "X$MARC_SIMUFACT" != "X"
|
||||
then
|
||||
SFLIB="-L$SFMATDIR -lMBA_Grain"
|
||||
else
|
||||
SFLIB=" "
|
||||
fi
|
||||
OPENMP="-qopenmp"
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
LOAD_DLL=$LOAD
|
||||
OPENMP=
|
||||
LIBMNF=
|
||||
OPENSSL=NONE
|
||||
fi
|
||||
|
||||
SYSLIBS=" $OPENMP -lpthread -cxxlib"
|
||||
|
||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
||||
# if test $MPITYPE = intelmpi
|
||||
# then
|
||||
# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \
|
||||
# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt"
|
||||
# fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -cxxlib"
|
||||
fi
|
||||
|
||||
|
||||
SYSLIBSPAR=" "
|
||||
|
||||
MARC_DLL_CODES="runmarc.f"
|
||||
|
||||
|
||||
BLAS_SRC="dzero.f icopy.f izero.f"
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f"
|
||||
else
|
||||
BLAS_SRC="ALL"
|
||||
fi
|
||||
fi
|
||||
|
||||
LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \
|
||||
omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \
|
||||
elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \
|
||||
cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \
|
||||
inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f"
|
||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
||||
LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f"
|
||||
fi
|
||||
|
||||
HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \
|
||||
dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \
|
||||
dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f \
|
||||
prei11.f prei12.f prei31.f prei32.f prei41.f prei42.f prei61.f prei62.f \
|
||||
prei1n.f prei2n.f cgfullnts1.f cgfullnts2.f cg1n.f cg2n.f cg3n.f \
|
||||
cg4n.f cg5n.f cg6n.f cgnn.f sortab.f sortab1.f triann1.f preinv_nts.f \
|
||||
cn_sur_patchl.f cn_quad_3e.f"
|
||||
|
||||
|
||||
|
||||
MAXNUM=1000000
|
|
@ -1,785 +0,0 @@
|
|||
#
|
||||
# General definitions for the Marc 2020 version
|
||||
#
|
||||
# EM64T
|
||||
#
|
||||
# Linux RedHat 7.3 / SuSE 12 SP1
|
||||
#
|
||||
# 64 bit MPI version
|
||||
#
|
||||
# Intel(R) Fortran Intel(R) 64 Compiler XE for applications
|
||||
# running on Intel(R) 64, Version 19.0.4.243 Build 20190416
|
||||
#
|
||||
# Intel(R) C Intel(R) 64 Compiler XE for applications
|
||||
# running on Intel(R) 64, Version 19.0.4.243 Build 20190416
|
||||
#
|
||||
# To check the O/S level, type:
|
||||
# uname -a
|
||||
#
|
||||
# Distributed parallel MPI libraries:
|
||||
# Intel MPI 2019 Update 4
|
||||
# To check the mpi version, type:
|
||||
# mpiexec.hydra -version
|
||||
#
|
||||
# To check the Compiler level, type using the compiler
|
||||
# installation path:
|
||||
# ifort -V
|
||||
# icc -V
|
||||
#
|
||||
# REMARKS : This file contains the definitions of variables used during
|
||||
# compilation loading and use of the MARC programmes . The
|
||||
# current machine type is identified by means of the variable
|
||||
# MACHINE , defined below.
|
||||
#
|
||||
#
|
||||
# MPI_ROOT: root directory in which mpi shared libraries, etc. are located
|
||||
# DIRJOB : directory in which spawned jobs should look for Marc input
|
||||
# MPI_ARCH: system architecture
|
||||
# MPI_EPATH: path where executable resides
|
||||
#
|
||||
REVISION="VERSION, BUILD"
|
||||
HOSTNAME=`hostname`
|
||||
|
||||
# find available memory in Mbyte on the machine
|
||||
# can be set explicitly
|
||||
MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'`
|
||||
|
||||
# set _OEM_NASTRAN to 1 for MD Nastran build
|
||||
# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable
|
||||
_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}"
|
||||
|
||||
# uncomment the following line for an autoforge build
|
||||
#AUTOFORGE=1
|
||||
AUTOFORGE=0
|
||||
export AUTOFORGE
|
||||
|
||||
# integer size
|
||||
if test "$MARC_INTEGER_SIZE" = "" ; then
|
||||
INTEGER_PATH=
|
||||
else
|
||||
INTEGER_PATH=/$MARC_INTEGER_SIZE
|
||||
fi
|
||||
|
||||
FCOMP=ifort
|
||||
INTELPATH="/opt/intel/compilers_and_libraries_2019/linux"
|
||||
|
||||
# find the root directory of the compiler installation:
|
||||
# - if ifort is found in $PATH, then the root directory is derived
|
||||
# from the path to ifort
|
||||
# - if ifort is not found in $PATH, the root directory is assumed
|
||||
# to be $INTELPATH and the directory in which ifort is found is
|
||||
# added to $PATH
|
||||
FCOMPPATH=`which "$FCOMP" 2>/dev/null`
|
||||
if test -n "$FCOMPPATH"; then
|
||||
# derive the root directory from $FCOMPPATH
|
||||
FCOMPROOT="${FCOMPPATH%/bin/intel64/$FCOMP}"
|
||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
||||
FCOMPROOT="${FCOMPPATH%/bin/$FCOMP}"
|
||||
fi
|
||||
if test "$FCOMPROOT" = "$FCOMPPATH"; then
|
||||
FCOMPROOT=
|
||||
fi
|
||||
elif test -d "$INTELPATH"; then
|
||||
# check for compiler in $INTELPATH
|
||||
if test -d "$INTELPATH/bin/intel64" -a \
|
||||
-x "$INTELPATH/bin/intel64/$FCOMP" ; then
|
||||
FCOMPROOT="$INTELPATH"
|
||||
PATH="$INTELPATH/bin/intel64:$PATH"
|
||||
elif test -d "$INTELPATH/bin" -a \
|
||||
-x "$INTELPATH/bin/$FCOMP"; then
|
||||
FCOMPROOT="$INTELPATH"
|
||||
PATH="$INTELPATH/bin:$PATH"
|
||||
else
|
||||
FCOMPROOT=
|
||||
fi
|
||||
else
|
||||
FCOMPROOT=
|
||||
fi
|
||||
|
||||
# AEM
|
||||
if test "$MARCDLLOUTDIR" = ""; then
|
||||
DLLOUTDIR="$MARC_LIB"
|
||||
else
|
||||
DLLOUTDIR="$MARCDLLOUTDIR"
|
||||
fi
|
||||
|
||||
# settings for MKL
|
||||
if test "$IMKLDIR" = ""; then
|
||||
MARC_MKL="$FCOMPROOT/mkl/lib/intel64"
|
||||
else
|
||||
MARC_MKL=$IMKLDIR/lib/intel64
|
||||
fi
|
||||
|
||||
#
|
||||
# settings for Metis
|
||||
#
|
||||
METIS="-I$METIS_SOURCE/include"
|
||||
METISLIBS="$METISLIB_DIR/libmarcddm.a $METISLIB_DIR/libmarcmetis.a "
|
||||
|
||||
#
|
||||
# settings for MPI
|
||||
#
|
||||
# RCP and RSH are used for parallel network runs
|
||||
# replace with similar commands like rsh if needed
|
||||
RCP=/usr/bin/scp
|
||||
RSH=/usr/bin/ssh
|
||||
#
|
||||
|
||||
|
||||
MPI_DEFAULT=intelmpi
|
||||
MPI_OTHER=
|
||||
|
||||
MPITYPE=$MPI_DEFAULT
|
||||
|
||||
if test $AUTOFORGE
|
||||
then
|
||||
if test $AUTOFORGE = 1
|
||||
then
|
||||
MPITYPE=none
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# overrule MPITYPE setting with environmental variable MARC_MPITYPE
|
||||
if test $MARC_MPITYPE
|
||||
then
|
||||
MPITYPE=$MARC_MPITYPE
|
||||
fi
|
||||
|
||||
# always set MPITYPE to none for MD Nastran
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
MPITYPE=none
|
||||
fi
|
||||
|
||||
# Edit following lines to build with GPGPU version of BCS Solver for
|
||||
# NVIDIA platforms
|
||||
#BCSGPUSOLVER=NONE
|
||||
BCSGPUSOLVER=BCSGPU
|
||||
|
||||
# Edit following lines to build solver 2 with GPU support
|
||||
SOLVER2GPU=GPU
|
||||
#SOLVER2GPU=NONE
|
||||
|
||||
# Edit following lines to set the openssl library
|
||||
if test "$OPENSSL" != "NONE"
|
||||
then
|
||||
OPENSSL_LIB="$MARC_LIB/libcrypto.a"
|
||||
fi
|
||||
OPENSSL_INCLUDE=-I"$MARC_OPENSSL/include/"
|
||||
|
||||
MARCHDF_HDF=HDF
|
||||
#MARCHDF_HDF=NONE
|
||||
|
||||
# activate contact component build if flagged
|
||||
AEM_DLL=0
|
||||
if test "$AEM_BUILD" = "ON" ; then
|
||||
AEM_DLL=1
|
||||
LINK_MARC_DLL="-shared -fPIC"
|
||||
EXT_DLL="so"
|
||||
MPITYPE=none
|
||||
MPI_OTHER=
|
||||
MARCHDF_HDF=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
MUMPSSOLVER=NONE
|
||||
CASISOLVER=NONE
|
||||
fi
|
||||
|
||||
if test "$MARCHDF_HDF" = "HDF"; then
|
||||
HDF_INCLUDE="-I$MARC_HDF/include"
|
||||
HDF_LIBS="$MARC_LIB/libhdf5_fortran.so.100 $MARC_LIB/libhdf5.so.103"
|
||||
fi
|
||||
|
||||
SOLVERFLAGS=
|
||||
if test "$BCSGPUSOLVER" = BCSGPU
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA"
|
||||
BCS_DIR=bcsgpusolver
|
||||
else
|
||||
BCS_DIR=bcssolver
|
||||
fi
|
||||
#
|
||||
# settings for MPI
|
||||
#
|
||||
DDM=
|
||||
if test $MPITYPE != none
|
||||
then
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
INTELMPI_VERSION=HYDRA
|
||||
FCOMPMPI=mpiifort
|
||||
if test -n "$MARC_INTELMPI" ; then
|
||||
MPI_ROOT=$MARC_INTELMPI
|
||||
else
|
||||
MPI_ROOT=/opt/intel/compilers_and_libraries_2019/linux/mpi/intel64
|
||||
MARC_INTELMPI=$MPI_ROOT
|
||||
fi
|
||||
DDM="-I${MPI_ROOT}/include -DDDM"
|
||||
PATH=$MPI_ROOT/bin:$PATH
|
||||
export PATH
|
||||
LD_LIBRARY_PATH=$MPI_ROOT/lib:$MPI_ROOT/lib/release:$MPI_ROOT/libfabric/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
if test $INTELMPI_VERSION = HYDRA
|
||||
then
|
||||
RUN_JOB1="${MPI_ROOT}/bin/mpiexec.hydra -genvall -n "
|
||||
RUN_JOB2="${MPI_ROOT}/bin/mpiexec.hydra -genvall"
|
||||
else
|
||||
RUN_JOB1="${MPI_ROOT}/bin/mpiexec -n "
|
||||
RUN_JOB2="${MPI_ROOT}/bin/mpiexec -configfile "
|
||||
fi
|
||||
RUN_JOB0=
|
||||
MPI_CLEAN=
|
||||
MPI_EPATH=$MARC_BIN
|
||||
MPIR_HOME=$MPI_ROOT
|
||||
MPICH_F77=$FCOMP
|
||||
MPICH_F77LINKER=$FCOMP
|
||||
export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER
|
||||
FI_PROVIDER_PATH=$MPI_ROOT/libfabric/lib/prov
|
||||
export FI_PROVIDER_PATH
|
||||
fi
|
||||
else
|
||||
MPI_ROOT=$MARC_DUMMYMPI
|
||||
export MPI_ROOT=$MARC_DUMMYMPI
|
||||
DDM="-I$MPI_ROOT/include"
|
||||
fi
|
||||
|
||||
#
|
||||
# variables for the "maintain" script
|
||||
#
|
||||
|
||||
MACHINENAME=LINUX
|
||||
MACHINE64BIT=yes
|
||||
MACHINE=Linux_EM64T
|
||||
DEV=/dev/tape
|
||||
GETLOG="whoami"
|
||||
CLEAR="clear"
|
||||
MY_UNAME=`uname -a`
|
||||
|
||||
# Edit following 2 lines to build with VKI Solver
|
||||
#VKISOLVER=VKI
|
||||
VKISOLVER=NONE
|
||||
|
||||
# Edit following 2 lines to build with CASI Solver
|
||||
CASISOLVER=CASI
|
||||
if test "$MARC_CASISOLVER" = "NONE" ; then
|
||||
CASISOLVER=NONE
|
||||
fi
|
||||
#CASISOLVER=NONE
|
||||
|
||||
# Edit following 2 lines to build with MF2 Solver
|
||||
MF2SOLVER=NONE
|
||||
#MF2SOLVER=SERIAL
|
||||
#MF2SOLVER=MF2PARALLEL
|
||||
|
||||
# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO)
|
||||
#INTELSOLVER=NONE
|
||||
INTELSOLVER=PARDISO
|
||||
|
||||
# Edit following lines to build with MUMPS
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
#MUMPSSOLVER=NONE
|
||||
MUMPSSOLVER=MUMPS
|
||||
else
|
||||
#MUMPSSOLVER=NONE
|
||||
MUMPSSOLVER=MUMPS
|
||||
fi
|
||||
|
||||
# Edit following 2 lines to build MARC dynamic shared library
|
||||
MARC_DLL=MARC_DLL
|
||||
MARC_DLL=NONE
|
||||
|
||||
# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
VKISOLVER=NONE
|
||||
CASISOLVER=NONE
|
||||
MF2SOLVER=NONE
|
||||
INTELSOLVER=NONE
|
||||
MUMPSSOLVER=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
MARC_DLL=NONE
|
||||
fi
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
VKISOLVER=NONE
|
||||
CASISOLVER=NONE
|
||||
MF2SOLVER=NONE
|
||||
INTELSOLVER=NONE
|
||||
MUMPSSOLVER=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
fi
|
||||
|
||||
#
|
||||
# define Fortran and C compile syntax
|
||||
#
|
||||
if test "$VKISOLVER" = VKI
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DVKI"
|
||||
fi
|
||||
|
||||
if test "$CASISOLVER" = CASI
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DCASI"
|
||||
fi
|
||||
|
||||
if test "$MF2SOLVER" = MF2PARALLEL
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL"
|
||||
fi
|
||||
if test "$MF2SOLVER" = MF2SERIAL
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL"
|
||||
fi
|
||||
|
||||
if test "$INTELSOLVER" = PARDISO
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DPARDISO"
|
||||
fi
|
||||
|
||||
if test "$MUMPSSOLVER" = MUMPS
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMUMPS"
|
||||
fi
|
||||
|
||||
|
||||
if test "$MARC_DLL" = MARC_DLL
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL"
|
||||
fi
|
||||
|
||||
if test "$SOLVER2GPU" = GPU
|
||||
then
|
||||
SOLVERFLAGS="$SOLVERFLAGS -DSOLVER2GPU"
|
||||
fi
|
||||
|
||||
LINK_OPT=
|
||||
DEBUG_OPT=
|
||||
C_DEBUG_OPT=
|
||||
|
||||
#Uncomment following line to build Marc in debuggable mode
|
||||
MARCDEBUG=
|
||||
#MARCDEBUG="ON"
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
LINK_OPT="-debug -traceback"
|
||||
DEBUG_OPT="-debug -traceback"
|
||||
C_DEBUG_OPT="-debug -traceback"
|
||||
fi
|
||||
|
||||
|
||||
MARCCHECK=
|
||||
#MARCCHECK="ON"
|
||||
if test "$MARCCHECK" = "ON"
|
||||
then
|
||||
DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv "
|
||||
C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv "
|
||||
fi
|
||||
|
||||
MARCCODECOV=
|
||||
#MARCCODECOV="ON"
|
||||
|
||||
MARCCODEPROF=
|
||||
#MARCCODEPROF="ON"
|
||||
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
I8FFLAGS=
|
||||
I8DEFINES=
|
||||
I8CDEFINES=
|
||||
else
|
||||
I8FFLAGS="-i8"
|
||||
I8DEFINES="-DI64"
|
||||
I8CDEFINES="-U_DOUBLE -D_SINGLE"
|
||||
fi
|
||||
|
||||
MTHREAD=OPENMP
|
||||
if test "$MARC_OPENMP" = "NONE" ; then
|
||||
MTHREAD=NONE
|
||||
fi
|
||||
#MTHREAD=NONE
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
MTHREAD=NONE
|
||||
fi
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
MTHREAD=NONE
|
||||
CASISOLVER=NONE
|
||||
VKISOLVER=NONE
|
||||
MF2SOLVER=NONE
|
||||
INTELSOLVER=NONE
|
||||
BCSGPUSOLVER=NONE
|
||||
SOLVER2GPU=NONE
|
||||
OPENSSL_LIB=
|
||||
MARC_DLL=NONE
|
||||
METISLIBS=
|
||||
fi
|
||||
|
||||
OMP_COMPAT=NO
|
||||
OMP_COMPAT=YES
|
||||
if test "$MTHREAD" = "NONE"
|
||||
then
|
||||
OMP_COMPAT=NO
|
||||
fi
|
||||
|
||||
CDEFINES=
|
||||
FDEFINES=
|
||||
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
CDEFINES="$CDEFINES -D_OEM_NASTRAN"
|
||||
FDEFINES="$FDEFINES -D_OEM_NASTRAN"
|
||||
fi
|
||||
|
||||
FDEFINES="$FDEFINES -D_IMPLICITNONE"
|
||||
|
||||
if test "$_OEM_NASTRAN" -eq 0
|
||||
then
|
||||
FDEFINES="$FDEFINES -DMKL -DOPENMP"
|
||||
fi
|
||||
|
||||
if test "$OMP_COMPAT" = "YES"
|
||||
then
|
||||
FDEFINES="$FDEFINES -DOMP_COMPAT"
|
||||
fi
|
||||
|
||||
# -D_MSCMARC
|
||||
FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT $MARC_SIMUFACT"
|
||||
CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES"
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
FDEFINES="$FDEFINES -D_AEMNL -DAAA"
|
||||
CDEFINES="$CDEFINES -D_AEMNL -DAAA"
|
||||
fi
|
||||
|
||||
CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS -I$LAPI_IMPORTS/common/include"
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
CINCL="$CINCL -I../../include"
|
||||
fi
|
||||
|
||||
CC_OPT=
|
||||
if test "$MTHREAD" = "OPENMP"
|
||||
then
|
||||
CC_OPT=" $CC_OPT -qopenmp"
|
||||
fi
|
||||
|
||||
CC="icc -c $CC_OPT -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCLOW="icc -c $CC_OPT -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCHIGH="icc -c $CC_OPT -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
CC="icc -c $CC_OPT -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCLOW="icc $CC_OPT -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
CCHIGH="icc $CC_OPT -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS $OPENSSL_INCLUDE "
|
||||
fi
|
||||
|
||||
LOAD_CC="icc $CC_OPT -O1 -DLinux -DLINUX -DLinux_intel"
|
||||
CCT="$CC"
|
||||
CCTLOW="$CCLOW"
|
||||
CCTHIGH="$CCHIGH"
|
||||
|
||||
#PROFILE="-Mprof=func"
|
||||
#PROFILE="-Mprof=lines"
|
||||
#PROFILE="-Mprof=func,mpi"
|
||||
PROFILE=
|
||||
#PROFILE="-init=snan,arrays -CB -traceback -fpe0 -fp-stack-check -check all -check uninit -ftrapuv"
|
||||
if test "$MARCCODECOV" = "ON"
|
||||
then
|
||||
PROFILE="-prof-gen=srcpos"
|
||||
fi
|
||||
if test "$MARCCODEPROF" = "ON"
|
||||
then
|
||||
PROFILE=" $PROFILE -pg"
|
||||
fi
|
||||
|
||||
FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB -fp-model source"
|
||||
if test "$MTHREAD" = "OPENMP"
|
||||
then
|
||||
FORT_OPT=" $FORT_OPT -qopenmp"
|
||||
if test "$OMP_COMPAT" = "YES"
|
||||
then
|
||||
FORT_OPT=" $FORT_OPT -qopenmp-threadprivate=compat"
|
||||
fi
|
||||
else
|
||||
# FORT_OPT=" $FORT_OPT -auto "
|
||||
FORT_OPT=" $FORT_OPT -save -zero"
|
||||
fi
|
||||
if test "$MARCHDF_HDF" = "HDF"; then
|
||||
FORT_OPT="$FORT_OPT -DMARCHDF_HDF=$MARCHDF_HDF $HDF_INCLUDE"
|
||||
fi
|
||||
|
||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
||||
# for compiling free form f90 files. high opt, integer(4)
|
||||
FORTF90="$FCOMP -c -O3"
|
||||
|
||||
if test "$MARCDEBUG" = "ON"
|
||||
then
|
||||
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD"
|
||||
FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \
|
||||
$MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM"
|
||||
fi
|
||||
|
||||
FORTLOWT="$FORTLOW"
|
||||
FORTRANT="$FORTRAN"
|
||||
FORTHIGHT="$FORTHIGH"
|
||||
|
||||
FORTRANMNF="$FCOMP -c $FDEFINES "
|
||||
CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE"
|
||||
|
||||
if test $MPITYPE != none
|
||||
then
|
||||
if test $MPITYPE = hpmpi
|
||||
then
|
||||
LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
||||
LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o "
|
||||
fi
|
||||
# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines
|
||||
# if test $MPITYPE = intelmpi
|
||||
# then
|
||||
# INCLUDEMPI="-I$MPI_ROOT/include -I$VT_ROOT/include"
|
||||
# LOAD="$MPI_ROOT/bin/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
||||
# LOADT="$MPI_ROOT/bin/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o "
|
||||
# fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
LOAD="ifort $PROFILE $LINK_OPT -o "
|
||||
LOADT="ifort $PROFILE $LINK_OPT -o "
|
||||
fi
|
||||
else
|
||||
LOAD="$FCOMP $LINK_OPT -o "
|
||||
LOADT="$FCOMP $LINK_OPT -o "
|
||||
fi
|
||||
|
||||
if test "$MARC_DLL" = MARC_DLL
|
||||
then
|
||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
||||
CC="$CC -fPIC"
|
||||
CCMNF="$CCMNF -fPIC"
|
||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread"
|
||||
LINK_MARC_DLL="-shared -fPIC"
|
||||
LOAD_DLL=$LOAD
|
||||
LOADT_DLL=$LOADT
|
||||
EXT_DLL="so"
|
||||
fi
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
FORTLOW="$FORTLOW -fpp -fPIC"
|
||||
FORTRAN="$FORTRAN -fpp -fPIC"
|
||||
FORTHIGH="$FORTHIGH -fpp -fPIC"
|
||||
FORTRANMNF="$FORTRANMNF -fpp -fPIC"
|
||||
CC="$CC -fPIC"
|
||||
CCMNF="$CCMNF -fPIC"
|
||||
LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide"
|
||||
LINK_MARC_DLL="-shared -fPIC"
|
||||
LOAD_DLL=$LOAD
|
||||
LOADT_DLL=$LOADT
|
||||
EXT_DLL="so"
|
||||
fi
|
||||
|
||||
|
||||
XLIBS="-L/usr/X11/lib -lX11 "
|
||||
|
||||
#
|
||||
# define archive and ranlib syntax
|
||||
#
|
||||
|
||||
ARC="ar rvl"
|
||||
ARD="ar dvl"
|
||||
ARX="ar xl"
|
||||
RAN=""
|
||||
|
||||
#
|
||||
# choose which libraries you want to use ( e.g. blas )
|
||||
#
|
||||
|
||||
if test "$VKISOLVER" = VKI
|
||||
then
|
||||
VKISOLVERLIBS="$MARC_LIB/vkisolver.a"
|
||||
else
|
||||
VKISOLVERLIBS=
|
||||
fi
|
||||
|
||||
if test "$CASISOLVER" = CASI
|
||||
then
|
||||
CASISOLVERLIBS="$CASILIB_DIR/libmarccasi.a $CASILIB_DIR/libcasi.a"
|
||||
else
|
||||
CASISOLVERLIBS=
|
||||
fi
|
||||
|
||||
MF2SOLVERLIBS=
|
||||
if test "$MF2SOLVER" = MF2PARALLEL
|
||||
then
|
||||
MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \
|
||||
$MARC_LIB/mf2parallel/libsym.a \
|
||||
$MARC_LIB/mf2parallel/libmet.a \
|
||||
$MARC_LIB/mf2parallel/libmf2.a \
|
||||
$MARC_LIB/mf2parallel/libgauss.a \
|
||||
$MARC_LIB/mf2parallel/libmf2.a \
|
||||
$MARC_LIB/mf2parallel/libgauss.a \
|
||||
$MARC_LIB/mf2parallel/libnum.a \
|
||||
$MARC_LIB/mf2parallel/libutl.a \
|
||||
$MARC_LIB/mf2parallel/libr8.a \
|
||||
$MARC_LIB/mf2parallel/libz.a "
|
||||
fi
|
||||
|
||||
if test "$MUMPSSOLVER" = MUMPS
|
||||
then
|
||||
MUMPSSOLVERLIBS="$MUMPSLIB_DIR/libmumps.a"
|
||||
if test $MPITYPE = none
|
||||
then
|
||||
MUMPSSOLVERLIBS2=
|
||||
echo hello > /dev/null
|
||||
fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
MUMPSSOLVERLIBS="$MUMPSLIB_DIR/libmumps_intelmpi.a"
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a "
|
||||
else
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a "
|
||||
fi
|
||||
fi
|
||||
if test $MPITYPE = hpmpi
|
||||
then
|
||||
MUMPSSOLVERLIBS="$MUMPSLIB_DIR/libmumps_hpmpi.a"
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a"
|
||||
else
|
||||
MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
MUMPSSOLVERLIBS=
|
||||
MUMPSSOLVERLIBS2=
|
||||
fi
|
||||
|
||||
if test "$BCSGPUSOLVER" = BCSGPU
|
||||
then
|
||||
BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a "
|
||||
MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda "
|
||||
MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda "
|
||||
MARCCUDALIBS=$MARCCUDALIBS1
|
||||
else
|
||||
BCSSOLVERLIBS="${MARC_LIB}/bcslib.a "
|
||||
fi
|
||||
|
||||
SOLVER2LIBS=
|
||||
if test "$SOLVER2GPU" = GPU
|
||||
then
|
||||
SOLVER2LIBS="-L$MARC_LIB/cuda_dummy -lsolver2gpu"
|
||||
fi
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
BCSSOLVERLIBS=
|
||||
fi
|
||||
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
else
|
||||
MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a $MUMPSSOLVERLIBS2 -Wl,--end-group"
|
||||
fi
|
||||
|
||||
SECLIBS="-L$MARC_LIB -llapi"
|
||||
|
||||
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
|
||||
$MKLLIB -L$MARC_MKL -liomp5 \
|
||||
$MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a $KDTREE2_LIB/libkdtree2.a $HDF_LIBS $SOLVER2LIBS"
|
||||
|
||||
SOLVERLIBS_DLL=${SOLVERLIBS}
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
SOLVERLIBS_DLL="$MKLLIB -L$MARC_MKL -liomp5 $MARC_LIB/blas_src.a"
|
||||
fi
|
||||
MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}"
|
||||
MRCLIBSPAR="$MARC_LIB/clib.a"
|
||||
STUBS="$MARC_LIB/stubs.a "
|
||||
MNFLIBS="$MARC_LIB/libmnf.a"
|
||||
MDUSER="$MARC_LIB/md_user.a"
|
||||
if test "X$MARC_SIMUFACT" != "X"
|
||||
then
|
||||
SFLIB="-L$SFMATDIR -lMBA_Grain"
|
||||
else
|
||||
SFLIB=" "
|
||||
fi
|
||||
OPENMP="-qopenmp"
|
||||
|
||||
if test "$AEM_DLL" -eq 1
|
||||
then
|
||||
LOAD_DLL=$LOAD
|
||||
OPENMP=
|
||||
LIBMNF=
|
||||
OPENSSL=NONE
|
||||
fi
|
||||
|
||||
SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
|
||||
|
||||
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
|
||||
# if test $MPITYPE = intelmpi
|
||||
# then
|
||||
# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \
|
||||
# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt"
|
||||
# fi
|
||||
if test $MPITYPE = intelmpi
|
||||
then
|
||||
SYSLIBS="-L${MPI_ROOT}/lib/release -lmpi -L${MPI_ROOT}/lib -lmpifort -lrt $OPENMP -threads -lpthread -shared-intel -cxxlib"
|
||||
fi
|
||||
|
||||
|
||||
SYSLIBSPAR=" "
|
||||
|
||||
MARC_DLL_CODES="runmarc.f"
|
||||
|
||||
|
||||
BLAS_SRC="dzero.f icopy.f izero.f"
|
||||
if test "$_OEM_NASTRAN" -ne 0
|
||||
then
|
||||
if test "$MARC_INTEGER_SIZE" = "i4" ; then
|
||||
BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f"
|
||||
else
|
||||
BLAS_SRC="ALL"
|
||||
fi
|
||||
fi
|
||||
|
||||
LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \
|
||||
omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \
|
||||
elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \
|
||||
cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \
|
||||
inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f"
|
||||
if test "$MARC_INTEGER_SIZE" = "i8" ; then
|
||||
LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f"
|
||||
fi
|
||||
|
||||
HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \
|
||||
dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \
|
||||
dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f \
|
||||
prei11.f prei12.f prei31.f prei32.f prei41.f prei42.f prei61.f prei62.f \
|
||||
prei1n.f prei2n.f cgfullnts1.f cgfullnts2.f cg1n.f cg2n.f cg3n.f \
|
||||
cg4n.f cg5n.f cg6n.f cgnn.f sortab.f sortab1.f triann1.f preinv_nts.f \
|
||||
cn_sur_patchl.f cn_quad_3e.f"
|
||||
|
||||
|
||||
|
||||
MAXNUM=1000000
|
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
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
# This script opens a window running an editor.
|
||||
# The command to invoke the editor is specified during DAMASK installation
|
||||
|
||||
%EDITOR% $*
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
# This script opens a window running an editor. The default window is an
|
||||
# xterm, and the default editor is vi. These may be customized.
|
||||
|
||||
dir=
|
||||
for d in /usr/bin /usr/bin/X11; do
|
||||
if test -x "$d/xterm"; then
|
||||
dir="$d"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "$dir"; then
|
||||
echo "$0: Could not find xterm"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $*
|
|
@ -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,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo "usage: $0 job_name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo STOP > $1.cnt
|
|
@ -1,189 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# The exit status of this script is read by Mentat.
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
DIR=/tmp/msc/marc2020
|
||||
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
|
||||
copy_datfile="-ci $4"
|
||||
copy_postfile="-cr $5"
|
||||
scr_dir=$6
|
||||
dcoup=$7
|
||||
assem_recov_nthread=$8
|
||||
nthread=$9
|
||||
shift 9 # cannot use $10, $11, ...
|
||||
nsolver=$1
|
||||
mode=$2
|
||||
gpu=$3
|
||||
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
if [ "$slv" == "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
if [ "$slv" == "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
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="-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_marc" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$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,191 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# The exit status of this script is read by Mentat.
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
DIR=%INSTALLDIR%/marc2020
|
||||
|
||||
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
|
||||
copy_datfile="-ci $4"
|
||||
copy_postfile="-cr $5"
|
||||
scr_dir=$6
|
||||
dcoup=$7
|
||||
assem_recov_nthread=$8
|
||||
nthread=$9
|
||||
shift 9 # cannot use $10, $11, ...
|
||||
nsolver=$1
|
||||
mode=$2
|
||||
gpu=$3
|
||||
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
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_hmp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$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,191 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# The exit status of this script is read by Mentat.
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
DIR=%INSTALLDIR%/marc2020
|
||||
|
||||
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
|
||||
copy_datfile="-ci $4"
|
||||
copy_postfile="-cr $5"
|
||||
scr_dir=$6
|
||||
dcoup=$7
|
||||
assem_recov_nthread=$8
|
||||
nthread=$9
|
||||
shift 9 # cannot use $10, $11, ...
|
||||
nsolver=$1
|
||||
mode=$2
|
||||
gpu=$3
|
||||
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
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_mp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$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,191 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# The exit status of this script is read by Mentat.
|
||||
# Normal exit status is 0.
|
||||
#
|
||||
|
||||
DIR=%INSTALLDIR%/marc2020
|
||||
|
||||
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
|
||||
copy_datfile="-ci $4"
|
||||
copy_postfile="-cr $5"
|
||||
scr_dir=$6
|
||||
dcoup=$7
|
||||
assem_recov_nthread=$8
|
||||
nthread=$9
|
||||
shift 9 # cannot use $10, $11, ...
|
||||
nsolver=$1
|
||||
mode=$2
|
||||
gpu=$3
|
||||
|
||||
if [ "$slv" != "" -a "$slv" != "marc" -a "$slv" != "datfit" ]; then
|
||||
slv="-iam sfm"
|
||||
fi
|
||||
if [ "$slv" = "marc" ]; then
|
||||
slv=""
|
||||
fi
|
||||
if [ "$slv" = "datfit" ]; then
|
||||
slv="-iam datfit"
|
||||
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_lmp" $slv -j $job -v n -b y $nprocds $nprocd \
|
||||
$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
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,72 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import glob
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
import damask
|
||||
|
||||
def copy_and_replace(in_file,dst,msc_root,editor):
|
||||
with open(in_file) as f_in, open(dst/Path(in_file).name,'w') as f_out:
|
||||
f_out.write(f_in.read().replace('%INSTALLDIR%',msc_root).replace('%EDITOR%',editor))
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Apply DAMASK modification to MSC.Marc/Mentat',
|
||||
prog = Path(__file__).name,
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
|
||||
parser.add_argument('--editor', dest='editor', metavar='string', default='vi',
|
||||
help='Name of the editor for MSC.Mentat (executable)')
|
||||
parser.add_argument('--msc-root', dest='msc_root', metavar='string',
|
||||
default=damask.solver._marc._msc_root,
|
||||
help='MSC.Marc/Mentat root directory')
|
||||
parser.add_argument('--msc-version', dest='msc_version', type=float, metavar='float',
|
||||
default=damask.solver._marc._msc_version,
|
||||
help='MSC.Marc/Mentat version')
|
||||
parser.add_argument('--damask-root', dest='damask_root', metavar = 'string',
|
||||
default=damask.solver._marc._damask_root,
|
||||
help='DAMASK root directory')
|
||||
|
||||
args = parser.parse_args()
|
||||
msc_root = Path(args.msc_root)
|
||||
damask_root = Path(args.damask_root)
|
||||
msc_version = args.msc_version
|
||||
|
||||
|
||||
print('adapting Marc tools...\n')
|
||||
|
||||
src = damask_root/f'installation/mods_MarcMentat/{msc_version}/Marc_tools'
|
||||
dst = msc_root/f'marc{msc_version}/tools'
|
||||
for in_file in glob.glob(str(src/'*damask*')) + [str(src/'include_linux64')]:
|
||||
copy_and_replace(in_file,dst,args.msc_root,args.editor)
|
||||
|
||||
|
||||
print('adapting Mentat scripts and menus...\n')
|
||||
|
||||
src = damask_root/f'installation/mods_MarcMentat/{msc_version}/Mentat_bin'
|
||||
dst = msc_root/f'mentat{msc_version}/bin'
|
||||
for in_file in glob.glob(str(src/'*[!.original]')):
|
||||
copy_and_replace(in_file,dst,args.msc_root,args.editor)
|
||||
|
||||
src = damask_root/f'installation/mods_MarcMentat/{msc_version}/Mentat_menus'
|
||||
dst = msc_root/f'mentat{msc_version}/menus'
|
||||
for in_file in glob.glob(str(src/'job_run.ms')):
|
||||
copy_and_replace(in_file,dst,args.msc_root,args.editor)
|
||||
|
||||
|
||||
print('compiling Mentat menu binaries...')
|
||||
|
||||
executable = msc_root/f'mentat{msc_version}/bin/mentat'
|
||||
menu_file = msc_root/f'mentat{msc_version}/menus/linux64/main.msb'
|
||||
os.system(f'xvfb-run {executable} -compile {menu_file}')
|
||||
|
||||
|
||||
print('setting file access rights...\n')
|
||||
|
||||
for pattern in [msc_root/f'marc{msc_version}/tools/*damask*',
|
||||
msc_root/f'mentat{msc_version}/bin/submit?',
|
||||
msc_root/f'mentat{msc_version}/bin/kill?']:
|
||||
for f in glob.glob(str(pattern)):
|
||||
os.chmod(f,0o755)
|
|
@ -1,42 +0,0 @@
|
|||
Install DAMASK modifications to use DAMASK_marc
|
||||
This is for the Linux64 version of Marc/Mentat
|
||||
|
||||
Refer to http://damask.mpie.de for complete installation instructions.
|
||||
|
||||
Usually you will need to be root for this to work!
|
||||
|
||||
See Marc and Mentat Release Guide for List of Build and Supported Platforms!
|
||||
|
||||
The Intel Fortran compiler needs to be installed.
|
||||
|
||||
1) Install Marc, Mentat and Documentation as usual
|
||||
Run the test example including subroutines to confirm that the installation of both Marc/Mentat and the Intel Fortran Compiler is ok!
|
||||
2) Run the apply_DAMASK_modifications.py script from this directory.
|
||||
|
||||
|
||||
APPENDIX:
|
||||
|
||||
The structure of this directory should be (VERSION = 20XX or 20XX.Y)
|
||||
|
||||
./VERSION/Marc_tools/comp_user.original original file from installation
|
||||
./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_hmp modified version using -O2 optimization and OpenMP
|
||||
./VERSION/Marc_tools/run_marc.original original file from installation
|
||||
./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_hmp modified version using -O2 optimization and OpenMP
|
||||
./VERSION/Marc_tools/include_linux64.original original file from installation
|
||||
./VERSION/Marc_tools/include_linux64 modified version defining DAMASK compiler calls
|
||||
./VERSION/Mentat_bin/edit_window.original original file from installation
|
||||
./VERSION/Mentat_bin/edit_window modified version calling editor of your chcoice
|
||||
./VERSION/Mentat_bin/submit1.original original file from installation
|
||||
./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/submit6 modified version of original calling run_l_marc
|
||||
./VERSION/Mentat_bin/kill1.original original file from installation
|
||||
./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/kill6 kill file for submit6, identical to original kill1
|
||||
./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
|
|
@ -3,7 +3,7 @@ import shlex
|
|||
import re
|
||||
from pathlib import Path
|
||||
|
||||
_msc_version = 2020
|
||||
_msc_version = 2021.2
|
||||
_msc_root = '/opt/msc'
|
||||
_damask_root = str(Path(__file__).parents[3])
|
||||
|
||||
|
|
|
@ -0,0 +1,447 @@
|
|||
! common block definition file taken from respective MSC.Marc release and reformated to free format
|
||||
!***********************************************************************
|
||||
!
|
||||
! File: concom.cmn
|
||||
!
|
||||
! MSC.Marc include file
|
||||
!
|
||||
integer &
|
||||
iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,&
|
||||
ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,&
|
||||
ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,&
|
||||
ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,&
|
||||
itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,&
|
||||
lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,&
|
||||
icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,&
|
||||
isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,&
|
||||
ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,&
|
||||
ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,&
|
||||
ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,&
|
||||
imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,&
|
||||
kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,&
|
||||
iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,&
|
||||
ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,&
|
||||
iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,&
|
||||
iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,&
|
||||
magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,&
|
||||
iaem, icosim, inodels, nlharm, iampini, iphasetr, inonlcl, inonlct, iforminp,ispecerror,&
|
||||
icsprg, imol, imolt, idatafit,iharmpar, inclcase, imultifreq,init_elas, ifatig, iftgmat,&
|
||||
nchybrid
|
||||
dimension :: ideva(60)
|
||||
integer num_concom
|
||||
parameter(num_concom=261)
|
||||
common/marc_concom/&
|
||||
iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,&
|
||||
ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,&
|
||||
ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,&
|
||||
ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,&
|
||||
itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,&
|
||||
lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,&
|
||||
icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,&
|
||||
isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,&
|
||||
ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,&
|
||||
ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,&
|
||||
ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,&
|
||||
imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,&
|
||||
kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,&
|
||||
iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,&
|
||||
ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,&
|
||||
iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,&
|
||||
iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,&
|
||||
magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,&
|
||||
iaem, icosim, inodels, nlharm, iampini, iphasetr, inonlcl, inonlct, iforminp,ispecerror,&
|
||||
icsprg, imol, imolt, idatafit,iharmpar, inclcase, imultifreq,init_elas, ifatig, iftgmat,&
|
||||
nchybrid
|
||||
!
|
||||
! comments of variables:
|
||||
!
|
||||
! iacous Control flag for acoustic analysis. Input data.
|
||||
! iacous=1 modal acoustic analysis.
|
||||
! iacous=2 harmonic acoustic-structural analysis.
|
||||
! iasmbl Control flag to indicate that operator matrix should be
|
||||
! recalculated.
|
||||
! iautth Control flag for AUTO THERM option.
|
||||
! ibear Control flag for bearing analysis. Input data.
|
||||
! icompl Control variable to indicate that a complex analysis is
|
||||
! being performed. Either a Harmonic analysis with damping,
|
||||
! or a harmonic electro-magnetic analysis. Input data.
|
||||
! iconj Flag for EBE conjugate gradient solver (=solver 1, retired)
|
||||
! Also used for VKI iterative solver.
|
||||
! icreep Control flag for creep analysis. Input data.
|
||||
! ideva(60) - debug print out flag
|
||||
! 1 print element stiffness matrices, mass matrix
|
||||
! 2 output matrices used in tying
|
||||
! 3 force the solution of a nonpositive definite matrix
|
||||
! 4 print info of connections to each node
|
||||
! 5 info of gap convergence, internal heat generated, contact
|
||||
! touching and separation
|
||||
! 6 nodal value array during rezoning
|
||||
! 7 tying info in CONRAD GAP option, fluid element numbers in
|
||||
! CHANNEL option
|
||||
! 8 output incremental displacements in local coord. system
|
||||
! 9 latent heat output
|
||||
! 10 stress-strain in local coord. system
|
||||
! 11 additional info on interlaminar stress
|
||||
! 12 output right hand side and solution vector
|
||||
! 13 info of CPU resources used and memory available on NT
|
||||
! 14 info of mesh adaption process, 2D outline information
|
||||
! info of penetration checking for remeshing
|
||||
! save .fem files after afmesh3d meshing
|
||||
! 15 surface energy balance flag
|
||||
! 16 print info regarding pyrolysis
|
||||
! 17 print info of "streamline topology"
|
||||
! 18 print mesh data changes after remeshing
|
||||
! 19 print material flow stress data read in from *.mat file
|
||||
! if unit flag is on, print out flow stress after conversion
|
||||
! 20 print information on table input
|
||||
! 21 print out information regarding kinematic boundary conditions
|
||||
! 22 print out information regarding dist loads, point loads, film
|
||||
! and foundations
|
||||
! 23 print out information about automatic domain decomposition
|
||||
! 24 print out iteration information in SuperForm status report file
|
||||
! 25 print out information for ablation
|
||||
! 26 print out information for films - Table input
|
||||
! 27 print out the tying forces
|
||||
! 28 print out for CASI solver, convection,
|
||||
! 29 DDM single file debug printout
|
||||
! 30 print out cavity debug info
|
||||
! 31 print out welding related info
|
||||
! 32 prints categorized DDM memory usage
|
||||
! 33 print out the cutting info regarding machining feature
|
||||
! 34 print out the list of quantities which can be defined via a table
|
||||
! and for each quantity the supported independent variables
|
||||
! 35 print out detailed coupling region info
|
||||
! 36 print out solver debug info level 1 (Least Detailed)
|
||||
! 37 print out solver debug info level 1 (Medium Detailed)
|
||||
! 38 print out solver debug info level 1 (Very Detailed)
|
||||
! 39 print detailed memory allocation info
|
||||
! 40 print out marc-adams debug info
|
||||
! 41 output rezone mapping post file for debugging
|
||||
! 42 output post file after calling oprofos() for debugging
|
||||
! 43 debug printout for vcct
|
||||
! 44 debug printout for progressive failure
|
||||
! 45 print out automatically generated midside node coordinates (arecrd)
|
||||
! 46 print out message about routine and location, where the ibort is raised (ibort_inc)
|
||||
! 47 print out summary message of element variables on a
|
||||
! group-basis after all the automatic changes have been
|
||||
! made (em_ellibp)
|
||||
! 48 Automatically generate check results based on max and min vals.
|
||||
! These vals are stored in the checkr file, which is inserted
|
||||
! into the *dat file by the generate_check_results script from /marc/tools
|
||||
! 49 Automatically generate check results based on the real calculated values
|
||||
! at the sppecified check result locations.
|
||||
! These vals are stored in the checkr file, which is inserted
|
||||
! into the *dat file by the update_check_results script from /marc/tools
|
||||
! 50 generate a file containing the resistance or capacity matrix;
|
||||
! this file can be used to compare results with a reference file
|
||||
! 51 print out detailed information for segment-to-segment contact
|
||||
! 52 print out detailed relative displacement information
|
||||
! for uniaxial sliding contact
|
||||
! 53 print out detailed sliding direction information for
|
||||
! uniaxial sliding contact
|
||||
! 54 print out detailed information for edges attached to a curve
|
||||
! 55 print information related to viscoelasticity calculations
|
||||
! 56 print out detailed information for element coloring for multithreading
|
||||
! 57 print out extra overheads due to multi-threading.
|
||||
! These overhead includes (i) time and (ii) memory.
|
||||
! The memory report will be summed over all the children.
|
||||
!
|
||||
!
|
||||
! 58 debug output for ELSTO usage
|
||||
!
|
||||
! idyn Control flag for dynamics. Input data.
|
||||
! 1 = eigenvalue extraction and / or modal superposition
|
||||
! 2 = Newmark Beta and Single Step Houbolt (ssh with idynme=1)
|
||||
! 3 = Houbolt
|
||||
! 4 = Central difference
|
||||
! 5 = Newer central difference
|
||||
! idynt Copy of idyn at begining of increment
|
||||
! ielas Control flag for ELASTIC analysis. Input data.
|
||||
! Set by user or automatically turned on by Fourier option.
|
||||
! Implies that each load case is treated separately.
|
||||
! In Adaptive meshing analysis , forces re-analysis until
|
||||
! convergence obtained.
|
||||
! Also seriously misused to indicate no convergence.
|
||||
! = 1 elastic option with fourier analysis
|
||||
! = 2 elastic option without fourier analysis
|
||||
! =-1 no convergence in recycles or max # increments reached
|
||||
! Set to 1 if ELASTIC or SUBSTRUC parameter cards are used,
|
||||
! or if fourier option is used.
|
||||
! Then set to 2 if not fourier analysis.
|
||||
! ielcma Control flag for electromagnetic analysis. Input data.
|
||||
! ielcma = 1 Harmonic formulation
|
||||
! ielcma = 2 Transient formulation
|
||||
! ielect Control flag for electrostatic option. Input data.
|
||||
! iform Control flag indicating that contact will be performed.
|
||||
! ifour Control flag for Fourier analysis.
|
||||
! 0 = Odd and even terms.
|
||||
! 1 = symmetric (cosine) terms
|
||||
! 2 = antisymmetric (sine) terms.
|
||||
! iharm Control flag to indicate that a harmonic analysis will
|
||||
! be performed. May change between passes.
|
||||
! ihcps Control flag for coupled thermal - stress analysis.
|
||||
! iheat Control flag for heat transfer analysis. Input data.
|
||||
! iheatt Permanent control flag for heat transfer analysis.
|
||||
! Note in coupled analysis iheatt will remain as one,
|
||||
! but iheat will be zero in stress pass.
|
||||
! ihresp Control flag to indicate to perform a harmonic subincrement.
|
||||
! ijoule Control flag for Joule heating.
|
||||
! ilem Control flag to determin which vector is to be transformed.
|
||||
! Control flag to see where one is:
|
||||
! ilem = 1 - elem.f
|
||||
! ilem = 2 - initst.f
|
||||
! ilem = 3 - pressr.f
|
||||
! ilem = 3 - fstif.f
|
||||
! ilem = 4 - jflux.f
|
||||
! ilem = 4 - strass.f
|
||||
! ilem = 5 - mass.f
|
||||
! ilem = 5 - osolty.f
|
||||
! ilnmom Control flag for soil - pore pressure calculation. Input data.
|
||||
! ilnmom = 0 - perform only pore pressure calculation.
|
||||
! = 1 - couples pore pressure - displacement analysis
|
||||
! iloren Control flag for DeLorenzi J-Integral evaluation. Input data.
|
||||
! inc Increment number.
|
||||
! incext Control flag indicating that currently working on a
|
||||
! subincrement.
|
||||
! Could be due to harmonics , damping component (bearing),
|
||||
! stiffness component (bearing), auto therm creep or
|
||||
! old viscoplaticity
|
||||
! incsub Sub-increment number.
|
||||
! ipass Control flag for which part of coupled analysis.
|
||||
! ipass = -1 - reset to base values
|
||||
! ipass = 0 - do nothing
|
||||
! ipass = 1 - stress part
|
||||
! ipass = 2 - heat transfer part
|
||||
! iplres Flag indicating that either second matrix is stored.
|
||||
! dynamic analysis - mass matrix
|
||||
! heat transfer - specific heat matrix
|
||||
! buckle - initial stress stiffness
|
||||
! ipois Control flag indicating Poisson type analysis
|
||||
! ipois = 1 for heat transfer
|
||||
! = 1 for heat transfer part of coupled
|
||||
! = 1 for bearing
|
||||
! = 1 for electrostatic
|
||||
! = 1 for magnetostatic
|
||||
! ipoist Permanent copy of ipois. In coupled analysis , ipois = 0
|
||||
! in stress portion, yet ipoist will still =1.
|
||||
! irpflo global flag for rigid plastic flow analysis
|
||||
! = 1 eularian formulation
|
||||
! = 2 regular formulation; rigid material present in the analysis
|
||||
|
||||
! ismall control flag to indicate small displacement analysis. input data.
|
||||
! ismall = 0 - large disp included.
|
||||
! ismall = 1 - small displacement.
|
||||
! the flag is changing between passes.
|
||||
! ismalt permanent copy of ismall . in heat transfer portion of
|
||||
! coupled analysis ismall =0 , but ismalt remains the same.
|
||||
! isoil control flag indicating that soil / pore pressure
|
||||
! calculation . input data.
|
||||
! ispect control flag for response spectrum calculation. input data.
|
||||
! ispnow control flag to indicate to perform a spectrum response
|
||||
! calculation now.
|
||||
! istore store stresses flag.
|
||||
! istore = 0 in elem.f and if first pass of creep
|
||||
! convergence checking in ogetst.f
|
||||
! or harmonic analysis or thruc.f if not
|
||||
! converged.
|
||||
! iswep control flag for eigenvalue analysis.
|
||||
! iswep=1 - go do extraction process
|
||||
! ithcrp control flag for auto therm creep option. input data.
|
||||
! itherm control flag for either temperature dependent material
|
||||
! properties and/or thermal loads.
|
||||
! iupblg control flag for follower force option. input data.
|
||||
! iupdat control flag for update lagrange option for current element.
|
||||
! jacflg control flag for lanczos iteration method. input data.
|
||||
! jel control flag indicating that total load applied in
|
||||
! increment, ignore previous solution.
|
||||
! jel = 1 in increment 0
|
||||
! = 1 if elastic or fourier
|
||||
! = 1 in subincrements with elastic and adaptive
|
||||
! jparks control flag for j integral by parks method. input data.
|
||||
! largst control flag for finite strain plasticity. input data.
|
||||
! lfond control variable that indicates if doing elastic
|
||||
! foundation or film calculation. influences whether
|
||||
! this is volumetric or surface integration.
|
||||
! loadup control flag that indicates that nonlinearity occurred
|
||||
! during previous increment.
|
||||
! loaduq control flag that indicates that nonlinearity occurred.
|
||||
! lodcor control flag for switching on the residual load correction.
|
||||
! notice in input stage lodcor=0 means no loadcor,
|
||||
! after omarc lodcor=1 means no loadcor
|
||||
! lovl control flag for determining which "overlay" is to
|
||||
! be called from ellib.
|
||||
! lovl = 1 omarc
|
||||
! = 2 oaread
|
||||
! = 3 opress
|
||||
! = 4 oasemb
|
||||
! = 5 osolty
|
||||
! = 6 ogetst
|
||||
! = 7 oscinc
|
||||
! = 8 odynam
|
||||
! = 9 opmesh
|
||||
! = 10 omesh2
|
||||
! = 11 osetz
|
||||
! = 12 oass
|
||||
! = 13 oincdt
|
||||
! = 14 oasmas
|
||||
! = 15 ofluas
|
||||
! = 16 ofluso
|
||||
! = 17 oshtra
|
||||
! = 18 ocass
|
||||
! = 19 osoltc
|
||||
! = 20 orezon
|
||||
! = 21 otest
|
||||
! = 22 oeigen
|
||||
! lsub control variable to determine which part of element
|
||||
! assembly function is being done.
|
||||
! lsub = 1 - no longer used
|
||||
! = 2 - beta*
|
||||
! = 3 - cons*
|
||||
! = 4 - ldef*
|
||||
! = 5 - posw*
|
||||
! = 6 - theta*
|
||||
! = 7 - tmarx*
|
||||
! = 8 - geom*
|
||||
! magnet control flag for magnetostatic analysis. input data.
|
||||
! ncycle cycle number. accumulated in osolty.f
|
||||
! note first time through oasemb.f , ncycle = 0.
|
||||
! newtnt control flag for permanent copy of newton.
|
||||
! newton iteration type. input data.
|
||||
! newton : = 1 full newton raphson
|
||||
! 2 modified newton raphson
|
||||
! 3 newton raphson with strain correct.
|
||||
! 4 direct substitution
|
||||
! 5 direct substitution followed by n.r.
|
||||
! 6 direct substitution with line search
|
||||
! 7 full newton raphson with secant initial stress
|
||||
! 8 secant method
|
||||
! 9 full newton raphson with line search
|
||||
! noshr control flag for calculation interlaminar shears for
|
||||
! elements 22,45, and 75. input data.
|
||||
!ees
|
||||
!
|
||||
! jactch = 1 or 2 if elements are activated or deactivated
|
||||
! = 3 if elements are adaptively remeshed or rezoned
|
||||
! = 0 normally / reset to 0 when assembly is done
|
||||
! ifricsh = 0 call to fricsh in otest not needed
|
||||
! = 1 call to fricsh (nodal friction) in otest needed
|
||||
! iremkin = 0 remove deactivated kinematic boundary conditions
|
||||
! immediately - only in new input format (this is default)
|
||||
! = 1 remove deactivated kinematic boundary conditions
|
||||
! gradually - only in new input format
|
||||
! iremfor = 0 remove force boundary conditions immediately -
|
||||
! only in new input format (this is default)
|
||||
! = 1 remove force boundary conditions gradually -
|
||||
! only in new input format (this is default)
|
||||
! ishearp set to 1 if shear panel elements are present in the model
|
||||
!
|
||||
! jspf = 0 not in spf loadcase
|
||||
! > 0 in spf loadcase (jspf=1 during first increment)
|
||||
! machining = 1 if the metal cutting feature is used, for memory allocation purpose
|
||||
! = 0 (default) if no metal cutting feature required
|
||||
!
|
||||
! jlshell = 1 if there is a shell element in the mesh
|
||||
! icompsol = 1 if there is a composite solid element in the mesh
|
||||
! iupblgfo = 1 if follower force for point loads
|
||||
! jcondir = 1 if contact priority option is used
|
||||
! nstcrp = 0 (default) steady state creep flag (undocumented feature.
|
||||
! if not 0, turns off special ncycle = 0 code in radial.f)
|
||||
! nactive = number of active passes, if =1 then it's not a coupled analysis
|
||||
! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref
|
||||
! icheckmpc = value of mpc-check parameter option
|
||||
! noline = set to 1 in osolty if no line seacrh should be done in ogetst
|
||||
! icuring = set to 1 if the curing is included for the heat transfer analysis.
|
||||
! ishrink = set to 1 if shrinkage strain is included for mechancial analysis.
|
||||
! ioffsflg = 1 for small displacement beam/shell offsets
|
||||
! = 2 for large displacement beam/shell offsets
|
||||
! isetoff = 0 - do not apply beam/shell offsets
|
||||
! = 1 - apply beam/shell offsets
|
||||
! ioffsetm = min. value of offset flag
|
||||
! iharmt = 1 global flag if a coupled analysis contains an harmonic pass
|
||||
! inc_incdat = flag to record increment number of a new loadcase in incdat.f
|
||||
! iautspc = flag for AutoSPC option
|
||||
! ibrake = brake squeal in this increment
|
||||
! icbush = set to 1 if cbush elements present in model
|
||||
! istream_input = set to 1 for streaming input calling Marc as library
|
||||
! iprsinp = set to 1 if pressure input, introduced so other variables
|
||||
! such as h could be a function of pressure
|
||||
! ivlsinp = set to 1 if velocity input, introduced so other variables
|
||||
! such as h could be a function of velocity
|
||||
! ipin_m = # of beam element with PIN flag
|
||||
! jgnstr_glb = global control over pre or fast integrated composite shells
|
||||
! imarc_return = Marc return flag for streaming input control
|
||||
! iqvcimp = if non-zero, then the number of QVECT boundary conditions
|
||||
! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered
|
||||
! istpnx = 1 if to stop at end of increment
|
||||
! imicro1 = 1 if micro1 interface is used
|
||||
! iaxisymm = set to 1 if axisymmetric analysis
|
||||
! jbreakglue = set to 1 if breaking glued option is used
|
||||
! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9)
|
||||
! jfastasm = 1 do fast assembly using SuperForm code
|
||||
! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated
|
||||
! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation
|
||||
! imixmeth = set=1 then use nonlinear mixture material - allocate memory
|
||||
! ielcmadyn = flag for magnetodynamics
|
||||
! 0 - electromagnetics using newmark beta
|
||||
! 1 - transient magnetics using backward euler
|
||||
! idinout = flag to control if inside out elements should be deactivated
|
||||
! igena_meth = 0 - generalized alpha parameters depend on whether or not contact
|
||||
! is flagged (dynamic,7)
|
||||
! 10 - generalized alpha parameters are optimized for a contact
|
||||
! analysis (dynamic,8)
|
||||
! 11 - generalized alpha parameters are optimized for an analysis
|
||||
! without contact (dynamic,8)
|
||||
! magf_meth = - Method to compute force in magnetostatic - structural
|
||||
! = 1 - Virtual work method based on finite difference for the force computation
|
||||
! = 2 - Maxwell stress tensor
|
||||
! = 3 - Virtual work method based on local derivative for the force computation
|
||||
! non_assumed = 1 no assumed strain formulation (forced)
|
||||
! iredoboudry set to 1 if contact boundary needs to be recalculated
|
||||
! ioffsz0 = 1 if composite are used with reference position.ne.0
|
||||
! icomplt = 1 global flag if a coupled analysis contains an complex pass
|
||||
! mesh_dual = 1 two independent meshes are used in magnetodynamic/thermal/structural
|
||||
! one for magnetodynamic and the other for the remaining passes
|
||||
! iactrp = 1 in an analysis with global remeshing, include inactive
|
||||
! rigid bodies on post file
|
||||
! mgnewton = 1 Use full Newton Raphson iteration for magnetostatic pass
|
||||
!
|
||||
! iusedens > 0 if mass density is used in the analysis (dynamics, mass dependent loading)
|
||||
! igsigd0 = 1 set varselem(igsigd) to zero in next oasemb
|
||||
! iaem = 1 if marc is called from aem (0 - off - default)
|
||||
! icosim = 1 if marc is used in co-simulation software (ADAMS-MARC)
|
||||
! inodels = 1 nodal integration elements 239/240/241 present
|
||||
! nlharm = 0 harmonic subincrements are linear
|
||||
! = 1 harmonic subincrements are nonlinear
|
||||
! iampini = 0 amplitude of previous harmonic subinc is initial estimate (default)
|
||||
! = 1 zero amplitude is initial estimate
|
||||
! iphasetr = 1 phase transformation material model is used
|
||||
! iforminp flag indicating that contact is switched on via the CONTACT
|
||||
! option in the input file (as opposed to the case that contact
|
||||
! is switched on internally due to cyclic symmetry or model
|
||||
! section creation)
|
||||
! ispecerror = a+10*b (only for spectrum response analysis with missing mass option)
|
||||
! a=0 or a=1 (modal shape with non-zero shift)
|
||||
! b=0 or b=1 (recover with new assembly of stiffness matrix)
|
||||
! icsprg = set to 1 if spring elements present in model
|
||||
! imol Control flag for molecualr diffusion pass
|
||||
! imolt Permanent control flag for molecualr diffusion pass
|
||||
! Note in coupled analysis imolt will remain as one,
|
||||
! but imol will be zero in stress pass or thermal pass.
|
||||
! idatafit = run Marc to fit parameters
|
||||
! iharmpar = 1 if harmonic parameter option is used
|
||||
! inclcase load case increment use for cyclic plasticity data fitting
|
||||
! imultifreq flag to indicate how many harmonic magnetodynamic passes are computed in coupled
|
||||
! magnetodynamic/thermal(/structural) analyses.
|
||||
! 0 or 1 one pass 2 two passes 3 or more is not supported
|
||||
! init_elas use elastic stress-strain law as the material tangent for
|
||||
! the first cycle of an increment
|
||||
! ifatig = 1 stress-life fatigue
|
||||
! = 2 strain-life fatigue
|
||||
! iftgmat = 0 no fatigue material properties in the dat file
|
||||
! = 1 fatigue material properties in the dat file
|
||||
! nchybrid cycle count used for hybrid contact; meant to force an extra iteration
|
||||
! if the overlap for a node in hybrid contact is too large
|
||||
!
|
||||
!***********************************************************************
|
||||
!$omp threadprivate(/marc_concom/)
|
||||
!!
|
|
@ -0,0 +1,66 @@
|
|||
! common block definition file taken from respective MSC.Marc release and reformated to free format
|
||||
!***********************************************************************
|
||||
!
|
||||
! File: creeps.cmn
|
||||
!
|
||||
! MSC.Marc include file
|
||||
!
|
||||
real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b
|
||||
integer icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,&
|
||||
icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa
|
||||
real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst
|
||||
real(pReal) fraction_donn,timinc_ol2
|
||||
!
|
||||
integer num_creepsr,num_creepsi,num_creeps2r
|
||||
parameter(num_creepsr=7)
|
||||
parameter(num_creepsi=17)
|
||||
parameter(num_creeps2r=6)
|
||||
common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,icfte,icfst,&
|
||||
icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa
|
||||
common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst,fraction_donn,timinc_ol2
|
||||
!
|
||||
! cptim Total time at begining of increment.
|
||||
! timinc Incremental time for this step.
|
||||
! icfte Local copy number of slopes of creep strain rate function
|
||||
! versus temperature. Is -1 if exponent law used.
|
||||
! icfst Local copy number of slopes of creep strain rate function
|
||||
! versus equivalent stress. Is -1 if exponent law used.
|
||||
! icfeq Local copy number of slopes of creep strain rate function
|
||||
! versus equivalent strain. Is -1 if exponent law used.
|
||||
! icftm Local copy number of slopes of creep strain rate function
|
||||
! versus time. Is -1 if exponent law used.
|
||||
! icetem Element number that needs to be checked for creep convergence
|
||||
! or, if negative, the number of elements that need to
|
||||
! be checked. In the latter case the elements to check
|
||||
! are stored in ielcp.
|
||||
! mcreep Maximum nuber of iterations for explicit creep.
|
||||
! jcreep Counter of number of iterations for explicit creep
|
||||
! procedure. jcreep must be .le. mcreep
|
||||
! icpa Pointer to constant in creep strain rate expression.
|
||||
! icftmp Pointer to temperature dependent creep strain rate data.
|
||||
! icfstr Pointer to equivalent stress dependent creep strain rate data.
|
||||
! icfqcp Pointer to equivalent creep strain dependent creep strain
|
||||
! rate data.
|
||||
! icfcpm Pointer to equivalent creep strain rate dependent
|
||||
! creep strain rate data.
|
||||
! icrppr Permanent copy of icreep
|
||||
! icrcha Control flag for creep convergence checking , if set to
|
||||
! 1 then testing on absolute change in stress and creep
|
||||
! strain, not relative testing. Input data.
|
||||
! icpb Pointer to storage of material id cross reference numbers.
|
||||
! iicpmt
|
||||
! iicpa Pointer to constant in creep strain rate expression
|
||||
!
|
||||
! time_beg_lcase time at the beginning of the current load case
|
||||
! time_beg_inc time at the beginning of the current increment
|
||||
! fractol fraction of loadcase or increment time when we
|
||||
! consider it to be finished
|
||||
! time_beg_pst time corresponding to first increment to be
|
||||
! read in from thermal post file for auto step
|
||||
!
|
||||
! timinc_old Time step of the previous increment
|
||||
!
|
||||
!***********************************************************************
|
||||
!!$omp threadprivate(/marc_creeps/)
|
||||
!!$omp threadprivate(/marc_creeps2/)
|
||||
!!
|
Loading…
Reference in New Issue