DAMASK_EICMD/install/MarcMentat/2021.3.1/Marc_tools/include_linux64.patch

105 lines
4.8 KiB
Diff
Raw Normal View History

2021-11-25 22:00:22 +05:30
---
+++
@@ -119,6 +119,15 @@ if test "$MSCCOSIM_VERSION" = ""; then
2021-11-25 22:00:22 +05:30
MSCCOSIM_VERSION="2020"
fi
2021-11-25 22:00:22 +05:30
+# DAMASK uses the HDF5 compiler wrapper around the Intel compiler
+H5FC=$(h5fc -shlib -show)
+if [[ "$H5FC" == *"$dir is"* ]]; then
+ H5FC=$(echo $(echo "$H5FC" | tail -n1) | sed -e "s/\-shlib/-fPIC -integer-size 64 -real-size 64 -qopenmp/g")
+ H5FC=${H5FC%-lmpifort*}
+fi
+HDF5_LIB=${H5FC//*"ifort"/}
2022-03-24 03:03:04 +05:30
+FCOMP="$H5FC"
2021-11-25 22:00:22 +05:30
+
# AEM
if test "$MARCDLLOUTDIR" = ""; then
DLLOUTDIR="$MARC_LIB"
@@ -439,7 +448,7 @@ if test "$MARC_INTEGER_SIZE" = "i4" ; then
2021-11-25 22:00:22 +05:30
I8DEFINES=
I8CDEFINES=
else
- I8FFLAGS="-i8"
+ I8FFLAGS="-i8 -integer-size 64"
I8DEFINES="-DI64"
2021-11-25 22:00:22 +05:30
I8CDEFINES="-U_DOUBLE -D_SINGLE"
fi
@@ -556,7 +565,7 @@ then
2021-11-25 22:00:22 +05:30
PROFILE=" $PROFILE -pg"
fi
2021-11-25 22:00:22 +05:30
-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 +578,7 @@ else
2021-11-25 22:00:22 +05:30
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
2021-11-25 22:00:22 +05:30
FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \
@@ -583,6 +592,30 @@ FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \
2021-11-25 22:00:22 +05:30
# for compiling free form f90 files. high opt, integer(4)
FORTF90="$FCOMP -c -O3"
2021-11-25 22:00:22 +05:30
+# determine DAMASK version
+if test -n "$DAMASK_USER"; then
2022-11-17 12:42:27 +05:30
+ DAMASKROOT=`dirname $DAMASK_USER`/../..
2021-11-25 22:00:22 +05:30
+ 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=2021.3.1 -DDAMASKVERSION=$DAMASKVERSION \
2021-11-25 22:00:22 +05:30
+ -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=2021.3.1 -DDAMASKVERSION=$DAMASKVERSION \
2021-11-25 22:00:22 +05:30
+ -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=2021.3.1 -DDAMASKVERSION=$DAMASKVERSION \
2021-11-25 22:00:22 +05:30
+ -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
FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \
@@ -739,7 +772,7 @@ SECLIBS="-L$MARC_LIB -llapi"
2021-11-25 22:00:22 +05:30
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"
2021-11-25 22:00:22 +05:30
SOLVERLIBS_DLL=${SOLVERLIBS}
if test "$AEM_DLL" -eq 1
@@ -762,7 +795,7 @@ then
2021-11-25 22:00:22 +05:30
OPENSSL=NONE
fi
2021-11-25 22:00:22 +05:30
-SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
+SYSLIBS=" $OPENMP -lpthread -cxxlib"
2021-11-25 22:00:22 +05:30
# Uncomment the following lines to turn on the trace and comment out the next 4 lines
# if test $MPITYPE = intelmpi
@@ -772,7 +805,7 @@ SYSLIBS=" $OPENMP -lpthread -shared-intel -cxxlib"
2021-11-25 22:00:22 +05:30
# 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
2021-11-25 22:00:22 +05:30
if test "$ZLIB" = "ZLIB"; then