Skip to content

Commit 8e0d208

Browse files
committed
Merge branch 'support-Marc2024.2' into 'development'
[skip ci] patch files for Marc2024.2 See merge request damask/DAMASK!1036
2 parents efccc2a + c670719 commit 8e0d208

15 files changed

+1895
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
+++
3+
@@ -6,18 +6,27 @@
4+
DIR=$1
5+
user=$3
6+
program=$4
7+
+usernoext=$user
8+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
9+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
10+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
11+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
12+
+
13+
+# add BLAS options for linking
14+
+ BLAS="%BLAS%"
15+
+
16+
. $DIR/tools/include
17+
DIRJOB=$2
18+
cd $DIRJOB
19+
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
20+
+echo "Compiling and linking user subroutine $user on host `hostname`"
21+
echo "program: $program"
22+
- $FORTRAN $user.f || \
23+
+ $DFORTHIGHMP $user || \
24+
{
25+
- echo "$0: compile failed for $user.f"
26+
+ echo "$0: compile failed for $user"
27+
exit 1
28+
}
29+
/bin/rm $program 2>/dev/null
30+
- userobj=$user.o
31+
+ userobj=$usernoext.o
32+
33+
34+
$LOAD ${program} $DIR/lib/main.o\
35+
@@ -33,9 +42,13 @@
36+
$TKLIBS \
37+
$MRCLIBS \
38+
$METISLIBS \
39+
+ $BLAS \
40+
$SYSLIBS || \
41+
{
42+
- echo "$0: link failed for $user.o on host `hostname`"
43+
+ echo "$0: link failed for $usernoext.o on host `hostname`"
44+
exit 1
45+
}
46+
/bin/rm $userobj
47+
+ /bin/rm $DIRJOB/*.mod
48+
+ /bin/rm $DIRJOB/*.smod
49+
+ /bin/rm $DIRJOB/*_genmod.f90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
+++
3+
@@ -6,18 +6,27 @@
4+
DIR=$1
5+
user=$3
6+
program=$4
7+
+usernoext=$user
8+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
9+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
10+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
11+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
12+
+
13+
+# add BLAS options for linking
14+
+ BLAS="%BLAS%"
15+
+
16+
. $DIR/tools/include
17+
DIRJOB=$2
18+
cd $DIRJOB
19+
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
20+
+echo "Compiling and linking user subroutine $user on host `hostname`"
21+
echo "program: $program"
22+
- $FORTRAN $user.f || \
23+
+ $DFORTRANLOWMP $user || \
24+
{
25+
- echo "$0: compile failed for $user.f"
26+
+ echo "$0: compile failed for $user"
27+
exit 1
28+
}
29+
/bin/rm $program 2>/dev/null
30+
- userobj=$user.o
31+
+ userobj=$usernoext.o
32+
33+
34+
$LOAD ${program} $DIR/lib/main.o\
35+
@@ -33,9 +42,13 @@
36+
$TKLIBS \
37+
$MRCLIBS \
38+
$METISLIBS \
39+
+ $BLAS \
40+
$SYSLIBS || \
41+
{
42+
- echo "$0: link failed for $user.o on host `hostname`"
43+
+ echo "$0: link failed for $usernoext.o on host `hostname`"
44+
exit 1
45+
}
46+
/bin/rm $userobj
47+
+ /bin/rm $DIRJOB/*.mod
48+
+ /bin/rm $DIRJOB/*.smod
49+
+ /bin/rm $DIRJOB/*_genmod.f90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
+++
3+
@@ -6,18 +6,27 @@
4+
DIR=$1
5+
user=$3
6+
program=$4
7+
+usernoext=$user
8+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f`
9+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F`
10+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for`
11+
+usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90`
12+
+
13+
+# add BLAS options for linking
14+
+ BLAS="%BLAS%"
15+
+
16+
. $DIR/tools/include
17+
DIRJOB=$2
18+
cd $DIRJOB
19+
-echo "Compiling and linking user subroutine $user.f on host `hostname`"
20+
+echo "Compiling and linking user subroutine $user on host `hostname`"
21+
echo "program: $program"
22+
- $FORTRAN $user.f || \
23+
+ $DFORTRANMP $user || \
24+
{
25+
- echo "$0: compile failed for $user.f"
26+
+ echo "$0: compile failed for $user"
27+
exit 1
28+
}
29+
/bin/rm $program 2>/dev/null
30+
- userobj=$user.o
31+
+ userobj=$usernoext.o
32+
33+
34+
$LOAD ${program} $DIR/lib/main.o\
35+
@@ -33,9 +42,13 @@
36+
$TKLIBS \
37+
$MRCLIBS \
38+
$METISLIBS \
39+
+ $BLAS \
40+
$SYSLIBS || \
41+
{
42+
- echo "$0: link failed for $user.o on host `hostname`"
43+
+ echo "$0: link failed for $usernoext.o on host `hostname`"
44+
exit 1
45+
}
46+
/bin/rm $userobj
47+
+ /bin/rm $DIRJOB/*.mod
48+
+ /bin/rm $DIRJOB/*.smod
49+
+ /bin/rm $DIRJOB/*_genmod.f90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
+++
3+
@@ -212,6 +212,15 @@
4+
MARC_COSIM_LIB="$MSCCOSIM_HOME/CoSim$MSCCOSIM_VERSION/Dcosim$MSCCOSIM_VERSION/lib"
5+
fi
6+
7+
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
8+
+H5FC=$(h5fc -shlib -show)
9+
+if [[ "$H5FC" == *"$dir is"* ]]; then
10+
+ H5FC=$(echo $(echo "$H5FC" | tail -n1) | sed -e "s/\-shlib/-fPIC -qopenmp/g")
11+
+ H5FC=${H5FC%-lmpifort*}
12+
+fi
13+
+HDF5_LIB=${H5FC//*ifort/}
14+
+FCOMP="$H5FC"
15+
+
16+
# AEM
17+
if test "$MARCDLLOUTDIR" = ""; then
18+
DLLOUTDIR="$MARC_LIB"
19+
@@ -688,7 +697,7 @@
20+
PROFILE=" $PROFILE -pg"
21+
fi
22+
23+
-FORT_OPT="-c -assume byterecl -safe-cray-ptr -mp1 -WB -fp-model source"
24+
+FORT_OPT="-c -implicitnone -stand f18 -standard-semantics -assume nostd_mod_proc_name -safe-cray-ptr -mp1 -WB -fp-model source"
25+
# FORT_OPT="-c -assume byterecl -safe-cray-ptr -mp1 -WB "
26+
if test "$MTHREAD" = "OPENMP"
27+
then
28+
@@ -702,7 +711,7 @@
29+
FORT_OPT=" $FORT_OPT -save -zero"
30+
fi
31+
if test "$MARCHDF_HDF" = "HDF"; then
32+
- FORT_OPT="$FORT_OPT -DMARCHDF_HDF=$MARCHDF_HDF $HDF_INCLUDE"
33+
+ FORT_OPT="$FORT_OPT -DMARCHDF=$MARCHDF_HDF"
34+
fi
35+
if test "$NASTRAN_LIB" = "on" ; then
36+
FORT_OPT="$FORT_OPT -fPIC "
37+
@@ -719,6 +728,41 @@
38+
# for compiling free form f90 files. high opt, integer(4)
39+
FORTF90="$FCOMP -c -O3"
40+
41+
+# determine DAMASK version
42+
+if test -n "$DAMASK_USER"; then
43+
+ DAMASKROOT=`dirname $DAMASK_USER`/../..
44+
+ read DAMASK_VERSION < $DAMASKROOT/VERSION
45+
+ DAMASK_VERSION_MAJOR="'`echo $DAMASK_VERSION | cut -d. -f1`'"
46+
+ DAMASK_VERSION_MINOR="'`echo $DAMASK_VERSION | cut -d. -f2`'"
47+
+ DAMASK_VERSION_PATCH=`echo $DAMASK_VERSION | cut -d. -f3`
48+
+ if [[ $DAMASK_VERSION_PATCH == *"-"* ]]; then
49+
+ DAMASK_VERSION_HASH="'`echo $DAMASK_VERSION_PATCH | cut -d- -f3`'"
50+
+ fi
51+
+ DAMASK_VERSION_PATCH="'`echo $DAMASK_VERSION_PATCH | cut -d- -f1`'"
52+
+ DAMASK_VERSION="'"$DAMASK_VERSION"'"
53+
+else
54+
+ DAMASK_VERSION="'N/A'"
55+
+fi
56+
+if [[ -n $DAMASK_VERSION_HASH ]]; then
57+
+ DAMASK_INFO="-DDAMASKVERSION=$DAMASK_VERSION -DDAMASK_VERSION_MAJOR=$DAMASK_VERSION_MAJOR -DDAMASK_VERSION_MINOR=$DAMASK_VERSION_MINOR -DDAMASK_VERSION_PATCH=$DAMASK_VERSION_PATCH -DDAMASK_VERSION_HASH=$DAMASK_VERSION_HASH"
58+
+else
59+
+ DAMASK_INFO="-DDAMASKVERSION=$DAMASK_VERSION -DDAMASK_VERSION_MAJOR=$DAMASK_VERSION_MAJOR -DDAMASK_VERSION_MINOR=$DAMASK_VERSION_MINOR -DDAMASK_VERSION_PATCH=$DAMASK_VERSION_PATCH"
60+
+fi
61+
+
62+
+# DAMASK compiler calls
63+
+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 \
64+
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMARC_SOURCE=$MARC_SOURCE $DAMASK_INFO \
65+
+ -qopenmp -qopenmp-threadprivate=compat\
66+
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
67+
+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 \
68+
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMARC_SOURCE=$MARC_SOURCE $DAMASK_INFO \
69+
+ -qopenmp -qopenmp-threadprivate=compat\
70+
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
71+
+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 \
72+
+ -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMARC_SOURCE=$MARC_SOURCE $DAMASK_INFO \
73+
+ -qopenmp -qopenmp-threadprivate=compat\
74+
+ $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD"
75+
+
76+
if test "$MARCDEBUG" = "ON"
77+
then
78+
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
79+
@@ -885,7 +929,7 @@
80+
81+
SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${MF2SOLVERLIBS} \
82+
-L$MARC_MKL \
83+
- $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 -ltetadapt -lmeshgems -lmg-tetra -lmeshgems_stubs -lCATMshMesherCore -lmg-hybrid -lmg-cadsurf -lmg-hexa $HDF_LIBS $SOLVER2LIBS $RTREE_LIB/librtree_lib.a $SFGEO_LIB/libgeo_lib.a"
84+
+ $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 -ltetadapt -lmeshgems -lmg-tetra -lmeshgems_stubs -lCATMshMesherCore -lmg-hybrid -lmg-cadsurf -lmg-hexa $HDF5_LIB $SOLVER2LIBS $RTREE_LIB/librtree_lib.a $SFGEO_LIB/libgeo_lib.a"
85+
86+
SOLVERLIBS_DLL=${SOLVERLIBS}
87+
if test "$AEM_DLL" -eq 1

0 commit comments

Comments
 (0)