From 5c2cc1d91dae7bd56745d4198a5436673f0decb4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 20 Jul 2023 21:13:57 +0200 Subject: [PATCH 01/37] include Fortran test suite --- .gitlab-ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25ffbc0f1..abfd3e1cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,6 +85,37 @@ mypy: ################################################################################################### +unittest_GNU_DEBUG: + stage: compile + script: + - module load ${COMPILER_GNU} ${MPI_GNU} ${PETSC_GNU} + - TMPDIR=$(mktemp -d) + - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=RELEASE + - cmake --build ${TMPDIR} --target install + - cd ${TMPDIR} + - ./bin/DAMASK_test + +unittest_GNU_RELEASE: + stage: compile + script: + - module load ${COMPILER_GNU} ${MPI_GNU} ${PETSC_GNU} + - TMPDIR=$(mktemp -d) + - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=RELEASE + - cmake --build ${TMPDIR} --target install + - cd ${TMPDIR} + - ./bin/DAMASK_test + +unittest_GNU_PERFORMANCE: + stage: compile + script: + - module load ${COMPILER_GNU} ${MPI_GNU} ${PETSC_GNU} + - TMPDIR=$(mktemp -d) + - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=PERFORMANCE + - cmake --build ${TMPDIR} --target install + - cd ${TMPDIR} + - ./bin/DAMASK_test + + grid_GNU: stage: compile script: From 8da3736d42a78080f0be559236703ca16abe9ae7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 20 Jul 2023 21:16:31 +0200 Subject: [PATCH 02/37] extending test suite --- src/crystal.f90 | 7 ++++--- src/tables.f90 | 9 +++++---- src/test/DAMASK_test.f90 | 19 +++++++++++++++++-- src/test/test_HDF5_utilities.f90 | 14 ++++++-------- src/test/test_crystal.f90 | 17 +++++++++++++++++ src/test/test_prec.f90 | 8 +++----- src/test/test_tables.f90 | 17 +++++++++++++++++ 7 files changed, 69 insertions(+), 22 deletions(-) create mode 100644 src/test/test_crystal.f90 create mode 100644 src/test/test_tables.f90 diff --git a/src/crystal.f90 b/src/crystal.f90 index 724949180..ae460a811 100644 --- a/src/crystal.f90 +++ b/src/crystal.f90 @@ -377,6 +377,7 @@ module crystal public :: & crystal_init, & + crystal_selfTest, & crystal_isotropic_nu, & crystal_isotropic_mu, & crystal_symmetrize_33, & @@ -412,7 +413,7 @@ subroutine crystal_init() print'(/,1x,a)', '<<<+- crystal init -+>>>'; flush(IO_STDOUT) - call selfTest() + call crystal_selfTest() end subroutine crystal_init @@ -2226,7 +2227,7 @@ end function crystal_isotropic_mu !-------------------------------------------------------------------------------------------------- !> @brief Check correctness of some crystal functions. !-------------------------------------------------------------------------------------------------- -subroutine selfTest +subroutine crystal_selfTest real(pREAL), dimension(:,:,:), allocatable :: CoSy real(pREAL), dimension(:,:), allocatable :: system @@ -2333,6 +2334,6 @@ subroutine selfTest if (dNeq(crystal_isotropic_nu(C,'isostress','cF'), crystal_isotropic_nu(C,'isostress'), 1.0e-12_pREAL)) & error stop 'isotropic_nu/isostress/cF-tI' -end subroutine selfTest +end subroutine crystal_selfTest end module crystal diff --git a/src/tables.f90 b/src/tables.f90 index 65bd7e514..c067492d3 100644 --- a/src/tables.f90 +++ b/src/tables.f90 @@ -25,7 +25,8 @@ module tables public :: & table, & - tables_init + tables_init, & + tables_selfTest contains @@ -37,7 +38,7 @@ subroutine tables_init() print'(/,1x,a)', '<<<+- tables init -+>>>'; flush(IO_STDOUT) - call selfTest() + call tables_selfTest() end subroutine tables_init @@ -106,7 +107,7 @@ end function eval !-------------------------------------------------------------------------------------------------- !> @brief Check correctness of table functionality. !-------------------------------------------------------------------------------------------------- -subroutine selfTest() +subroutine tables_selfTest() type(tTable) :: t real(pREAL), dimension(*), parameter :: & @@ -140,6 +141,6 @@ subroutine selfTest() if (dNeq(y_true(i),t%at(x_eval(i)))) error stop 'table eval/dict' end do -end subroutine selfTest +end subroutine tables_selfTest end module tables diff --git a/src/test/DAMASK_test.f90 b/src/test/DAMASK_test.f90 index 34c1dc88a..8460a9fab 100644 --- a/src/test/DAMASK_test.f90 +++ b/src/test/DAMASK_test.f90 @@ -1,15 +1,30 @@ program DAMASK_test + use parallelization use HDF5_utilities use test_prec + use test_tables + use test_crystal use test_HDF5_utilities - call prec_test() + print('(/,a)'), 'begin test prec' + call test_prec_run() + print('(a)'), 'begin test prec' + + print('(/,a)'), 'begin test tables' + call test_tables_run() + print('(a)'), 'end test tables' + + print('(/,a)'), 'begin test crystal' + call test_crystal_run() + print('(a)'), 'end test crystal' call parallelization_init() call HDF5_utilities_init() - call HDF5_utilities_test() + print('(/,a)'), 'begin test HDF5_utilities' + call test_HDF5_utilities_run() + print('(a)'), 'begin test HDF5_utilities' end program DAMASK_test diff --git a/src/test/test_HDF5_utilities.f90 b/src/test/test_HDF5_utilities.f90 index 94e4175ce..fb43de8e2 100644 --- a/src/test/test_HDF5_utilities.f90 +++ b/src/test/test_HDF5_utilities.f90 @@ -6,20 +6,18 @@ module test_HDF5_utilities implicit none(type,external) private - public :: HDF5_utilities_test + public :: test_HDF5_utilities_run contains -subroutine HDF5_utilities_test() +subroutine test_HDF5_utilities_run() - print*, 'begin test HDF5_utilities' - call test_read_write() - print*, 'end test HDF5_utilities' + call read_write() -end subroutine HDF5_utilities_test +end subroutine test_HDF5_utilities_run -subroutine test_read_write() +subroutine read_write() integer(HID_T) :: f real(pREAL), dimension(3) :: d_in,d_out @@ -34,6 +32,6 @@ subroutine test_read_write() if (any(d_in /= d_out)) error stop 'test_read_write' -end subroutine test_read_write +end subroutine read_write end module test_HDF5_utilities diff --git a/src/test/test_crystal.f90 b/src/test/test_crystal.f90 new file mode 100644 index 000000000..4bb4d8a1e --- /dev/null +++ b/src/test/test_crystal.f90 @@ -0,0 +1,17 @@ +module test_crystal + use crystal + + implicit none(type,external) + + private + public :: test_crystal_run + + contains + +subroutine test_crystal_run() + + call crystal_selfTest() + +end subroutine test_crystal_run + +end module test_crystal diff --git a/src/test/test_prec.f90 b/src/test/test_prec.f90 index fa18d01a1..8aab59817 100644 --- a/src/test/test_prec.f90 +++ b/src/test/test_prec.f90 @@ -4,16 +4,14 @@ module test_prec implicit none(type,external) private - public :: prec_test + public :: test_prec_run contains -subroutine prec_test() +subroutine test_prec_run() - print*, 'begin test prec' call prec_selfTest() - print*, 'end test prec' -end subroutine prec_test +end subroutine test_prec_run end module test_prec diff --git a/src/test/test_tables.f90 b/src/test/test_tables.f90 new file mode 100644 index 000000000..5a66c23d0 --- /dev/null +++ b/src/test/test_tables.f90 @@ -0,0 +1,17 @@ +module test_tables + use tables + + implicit none(type,external) + + private + public :: test_tables_run + + contains + +subroutine test_tables_run() + + call tables_selfTest() + +end subroutine test_tables_run + +end module test_tables From 289dceb5842a4663f4041b5035a7fea7d862b96b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 21 Jul 2023 11:46:21 +0200 Subject: [PATCH 03/37] simple coverage report --- .gitlab-ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abfd3e1cf..5a1b0e700 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -90,30 +90,33 @@ unittest_GNU_DEBUG: script: - module load ${COMPILER_GNU} ${MPI_GNU} ${PETSC_GNU} - TMPDIR=$(mktemp -d) - - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=RELEASE + - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=RELEASE -DBUILDCMD_POST=-coverage - cmake --build ${TMPDIR} --target install - cd ${TMPDIR} - ./bin/DAMASK_test + - find -name \*.gcda | xargs gcov unittest_GNU_RELEASE: stage: compile script: - module load ${COMPILER_GNU} ${MPI_GNU} ${PETSC_GNU} - TMPDIR=$(mktemp -d) - - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=RELEASE + - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=RELEASE -DBUILDCMD_POST=-coverage - cmake --build ${TMPDIR} --target install - cd ${TMPDIR} - ./bin/DAMASK_test + - find -name \*.gcda | xargs gcov unittest_GNU_PERFORMANCE: stage: compile script: - module load ${COMPILER_GNU} ${MPI_GNU} ${PETSC_GNU} - TMPDIR=$(mktemp -d) - - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=PERFORMANCE + - cmake -B ${TMPDIR} -DDAMASK_SOLVER=test -DCMAKE_INSTALL_PREFIX=${TMPDIR} -DCMAKE_BUILD_TYPE=PERFORMANCE -DBUILDCMD_POST=-coverage - cmake --build ${TMPDIR} --target install - cd ${TMPDIR} - ./bin/DAMASK_test + - find -name \*.gcda | xargs gcov grid_GNU: From 96871350e49d99c755ae0129db2f36ae7d3bc2a0 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Mon, 24 Jul 2023 09:34:11 +0200 Subject: [PATCH 04/37] add files to support Marc2023.1 --- .../2023.1/Marc_tools/comp_damask_hmp.patch | 49 ++ .../2023.1/Marc_tools/comp_damask_lmp.patch | 49 ++ .../2023.1/Marc_tools/comp_damask_mp.patch | 49 ++ .../2023.1/Marc_tools/include_linux64.patch | 75 +++ .../2023.1/Marc_tools/run_damask_hmp.patch | 517 ++++++++++++++++++ .../2023.1/Marc_tools/run_damask_lmp.patch | 517 ++++++++++++++++++ .../2023.1/Marc_tools/run_damask_mp.patch | 517 ++++++++++++++++++ .../2023.1/Mentat_bin/edit_window.patch | 24 + .../MarcMentat/2023.1/Mentat_bin/kill4.patch | 0 .../MarcMentat/2023.1/Mentat_bin/kill5.patch | 0 .../MarcMentat/2023.1/Mentat_bin/kill6.patch | 0 .../2023.1/Mentat_bin/submit4.patch | 38 ++ .../2023.1/Mentat_bin/submit5.patch | 38 ++ .../2023.1/Mentat_bin/submit6.patch | 38 ++ .../2023.1/Mentat_menus/job_run.ms.patch | 158 ++++++ src/Marc/include/concom2023.1 | 471 ++++++++++++++++ src/Marc/include/creeps2023.1 | 73 +++ 17 files changed, 2613 insertions(+) create mode 100644 install/MarcMentat/2023.1/Marc_tools/comp_damask_hmp.patch create mode 100644 install/MarcMentat/2023.1/Marc_tools/comp_damask_lmp.patch create mode 100644 install/MarcMentat/2023.1/Marc_tools/comp_damask_mp.patch create mode 100644 install/MarcMentat/2023.1/Marc_tools/include_linux64.patch create mode 100644 install/MarcMentat/2023.1/Marc_tools/run_damask_hmp.patch create mode 100644 install/MarcMentat/2023.1/Marc_tools/run_damask_lmp.patch create mode 100644 install/MarcMentat/2023.1/Marc_tools/run_damask_mp.patch create mode 100644 install/MarcMentat/2023.1/Mentat_bin/edit_window.patch create mode 100644 install/MarcMentat/2023.1/Mentat_bin/kill4.patch create mode 100644 install/MarcMentat/2023.1/Mentat_bin/kill5.patch create mode 100644 install/MarcMentat/2023.1/Mentat_bin/kill6.patch create mode 100644 install/MarcMentat/2023.1/Mentat_bin/submit4.patch create mode 100644 install/MarcMentat/2023.1/Mentat_bin/submit5.patch create mode 100644 install/MarcMentat/2023.1/Mentat_bin/submit6.patch create mode 100644 install/MarcMentat/2023.1/Mentat_menus/job_run.ms.patch create mode 100644 src/Marc/include/concom2023.1 create mode 100644 src/Marc/include/creeps2023.1 diff --git a/install/MarcMentat/2023.1/Marc_tools/comp_damask_hmp.patch b/install/MarcMentat/2023.1/Marc_tools/comp_damask_hmp.patch new file mode 100644 index 000000000..886ebf008 --- /dev/null +++ b/install/MarcMentat/2023.1/Marc_tools/comp_damask_hmp.patch @@ -0,0 +1,49 @@ +--- ++++ +@@ -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,13 @@ + $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 ++ /bin/rm $DIRJOB/*_genmod.f90 diff --git a/install/MarcMentat/2023.1/Marc_tools/comp_damask_lmp.patch b/install/MarcMentat/2023.1/Marc_tools/comp_damask_lmp.patch new file mode 100644 index 000000000..191cb1a53 --- /dev/null +++ b/install/MarcMentat/2023.1/Marc_tools/comp_damask_lmp.patch @@ -0,0 +1,49 @@ +--- ++++ +@@ -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,13 @@ + $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 ++ /bin/rm $DIRJOB/*_genmod.f90 diff --git a/install/MarcMentat/2023.1/Marc_tools/comp_damask_mp.patch b/install/MarcMentat/2023.1/Marc_tools/comp_damask_mp.patch new file mode 100644 index 000000000..7c9cf7ba7 --- /dev/null +++ b/install/MarcMentat/2023.1/Marc_tools/comp_damask_mp.patch @@ -0,0 +1,49 @@ +--- ++++ +@@ -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,13 @@ + $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 ++ /bin/rm $DIRJOB/*_genmod.f90 diff --git a/install/MarcMentat/2023.1/Marc_tools/include_linux64.patch b/install/MarcMentat/2023.1/Marc_tools/include_linux64.patch new file mode 100644 index 000000000..adea45976 --- /dev/null +++ b/install/MarcMentat/2023.1/Marc_tools/include_linux64.patch @@ -0,0 +1,75 @@ +--- ++++ +@@ -172,6 +178,15 @@ + MARC_COSIM_LIB="$MSCCOSIM_HOME/CoSim$MSCCOSIM_VERSION/Dcosim$MSCCOSIM_VERSION/lib" + fi + ++# 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 -qopenmp/g") ++ H5FC=${H5FC%-lmpifort*} ++fi ++HDF5_LIB=${H5FC//*ifort/} ++FCOMP="$H5FC" ++ + # AEM + if test "$MARCDLLOUTDIR" = ""; then + DLLOUTDIR="$MARC_LIB" +@@ -604,7 +613,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" +@@ -617,7 +626,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 \ +@@ -631,6 +640,29 @@ + # 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=2023.1 -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=2023.1 -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=2023.1 -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 + FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ +@@ -788,7 +820,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 -lmg-hybrid -lmg-cadsurf -lmg-hexa $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 -lmg-hybrid -lmg-cadsurf -lmg-hexa $HDF5_LIB $SOLVER2LIBS" + + SOLVERLIBS_DLL=${SOLVERLIBS} + if test "$AEM_DLL" -eq 1 diff --git a/install/MarcMentat/2023.1/Marc_tools/run_damask_hmp.patch b/install/MarcMentat/2023.1/Marc_tools/run_damask_hmp.patch new file mode 100644 index 000000000..7deb005f8 --- /dev/null +++ b/install/MarcMentat/2023.1/Marc_tools/run_damask_hmp.patch @@ -0,0 +1,517 @@ +--- ++++ +@@ -136,6 +136,11 @@ + # is created. For job running in the background, the log # + # file is always created. Default is "yes" # + ############################################################################## ++# remove all Mentat paths from LD_LIBRARY_PATH ++LD_LIBRARY_PATH=:$LD_LIBRARY_PATH: ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2023.1+([!(:)])/:} ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:} ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:} + # set DIR to the directory in which this script is + REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" + DIR=`dirname $REALCOM` +@@ -302,7 +307,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 ++ + # + + # +@@ -405,7 +426,7 @@ + did= + vid= + user= +-usersubname= ++usernoext= + objs= + qid=background + cpu= +@@ -676,50 +697,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" +@@ -1207,12 +1197,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" +@@ -1531,7 +1521,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 +@@ -1564,7 +1554,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 +@@ -1687,7 +1677,7 @@ + ;; + esac + fi +- $ECHO "User subroutine name ($usersubname)? $ECHOTXT" ++ $ECHO "User subroutine name ($user)? $ECHOTXT" + read value + if test "$value" + then +@@ -1696,50 +1686,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 ++ 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 +@@ -2274,11 +2233,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= +@@ -2391,7 +2351,7 @@ + fi + if test "$user" + then +- execpath=$DIRJOB/`$BASENAME $user .f`.marc ++ execpath=$usernoext.marc + usersub=1 + fi + export execpath +@@ -3274,44 +3234,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=$usernoext.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 + + +@@ -3330,6 +3273,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -3343,6 +3287,9 @@ + prgsav=yes + fi + /bin/rm $userobj 2>/dev/null ++/bin/rm $DIRJOB/*.mod 2>/dev/null ++/bin/rm $DIRJOB/*.smod 2>/dev/null ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + + # + # run marc +@@ -3389,7 +3336,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 +@@ -3555,7 +3502,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" +@@ -3568,21 +3515,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 +@@ -3592,39 +3539,27 @@ + if test "$userhost" + then + echo +- echo "Compiling and linking user subroutine $user.f 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 ++ echo "Compiling and linking user subroutine $user on host `hostname`" + 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 + + +@@ -3643,6 +3578,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -3684,6 +3620,9 @@ + 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 ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + + # + # run marc +@@ -3777,7 +3716,7 @@ + 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 +@@ -3902,7 +3841,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" +@@ -3915,20 +3854,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 +@@ -3938,37 +3877,25 @@ + if test "$userhost" + then + echo +- echo "Compiling and linking user subroutine $user.f 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 ++ echo "Compiling and linking user subroutine $user on host `hostname`" + 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 + + +@@ -3987,6 +3914,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -4027,7 +3955,9 @@ + 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 ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + # done if no job id given + if test -z "$jid" + then +@@ -4146,7 +4076,7 @@ + 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 diff --git a/install/MarcMentat/2023.1/Marc_tools/run_damask_lmp.patch b/install/MarcMentat/2023.1/Marc_tools/run_damask_lmp.patch new file mode 100644 index 000000000..4f95e6241 --- /dev/null +++ b/install/MarcMentat/2023.1/Marc_tools/run_damask_lmp.patch @@ -0,0 +1,517 @@ +--- ++++ +@@ -136,6 +136,11 @@ + # is created. For job running in the background, the log # + # file is always created. Default is "yes" # + ############################################################################## ++# remove all Mentat paths from LD_LIBRARY_PATH ++LD_LIBRARY_PATH=:$LD_LIBRARY_PATH: ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2023.1+([!(:)])/:} ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:} ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:} + # set DIR to the directory in which this script is + REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" + DIR=`dirname $REALCOM` +@@ -302,7 +307,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 ++ + # + + # +@@ -405,7 +426,7 @@ + did= + vid= + user= +-usersubname= ++usernoext= + objs= + qid=background + cpu= +@@ -676,50 +697,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" +@@ -1207,12 +1197,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" +@@ -1531,7 +1521,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 +@@ -1564,7 +1554,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 +@@ -1687,7 +1677,7 @@ + ;; + esac + fi +- $ECHO "User subroutine name ($usersubname)? $ECHOTXT" ++ $ECHO "User subroutine name ($user)? $ECHOTXT" + read value + if test "$value" + then +@@ -1696,50 +1686,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 ++ 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 +@@ -2274,11 +2233,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= +@@ -2391,7 +2351,7 @@ + fi + if test "$user" + then +- execpath=$DIRJOB/`$BASENAME $user .f`.marc ++ execpath=$usernoext.marc + usersub=1 + fi + export execpath +@@ -3274,44 +3234,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=$usernoext.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 + + +@@ -3330,6 +3273,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -3343,6 +3287,9 @@ + prgsav=yes + fi + /bin/rm $userobj 2>/dev/null ++/bin/rm $DIRJOB/*.mod 2>/dev/null ++/bin/rm $DIRJOB/*.smod 2>/dev/null ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + + # + # run marc +@@ -3389,7 +3336,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 +@@ -3555,7 +3502,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" +@@ -3568,21 +3515,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 +@@ -3592,39 +3539,27 @@ + if test "$userhost" + then + echo +- echo "Compiling and linking user subroutine $user.f 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 ++ echo "Compiling and linking user subroutine $user on host `hostname`" + 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 + + +@@ -3643,6 +3578,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -3684,6 +3620,9 @@ + 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 ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + + # + # run marc +@@ -3777,7 +3716,7 @@ + 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 +@@ -3902,7 +3841,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" +@@ -3915,20 +3854,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 +@@ -3938,37 +3877,25 @@ + if test "$userhost" + then + echo +- echo "Compiling and linking user subroutine $user.f 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 ++ echo "Compiling and linking user subroutine $user on host `hostname`" + 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 + + +@@ -3987,6 +3914,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -4027,7 +3955,9 @@ + 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 ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + # done if no job id given + if test -z "$jid" + then +@@ -4146,7 +4076,7 @@ + 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 diff --git a/install/MarcMentat/2023.1/Marc_tools/run_damask_mp.patch b/install/MarcMentat/2023.1/Marc_tools/run_damask_mp.patch new file mode 100644 index 000000000..0faf3a042 --- /dev/null +++ b/install/MarcMentat/2023.1/Marc_tools/run_damask_mp.patch @@ -0,0 +1,517 @@ +--- ++++ +@@ -136,6 +136,11 @@ + # is created. For job running in the background, the log # + # file is always created. Default is "yes" # + ############################################################################## ++# remove all Mentat paths from LD_LIBRARY_PATH ++LD_LIBRARY_PATH=:$LD_LIBRARY_PATH: ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([!(:)])mentat2023.1+([!(:)])/:} ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH//+([(:)])/:} ++LD_LIBRARY_PATH=${LD_LIBRARY_PATH#:}; LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:} + # set DIR to the directory in which this script is + REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" + DIR=`dirname $REALCOM` +@@ -302,7 +307,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 ++ + # + + # +@@ -405,7 +426,7 @@ + did= + vid= + user= +-usersubname= ++usernoext= + objs= + qid=background + cpu= +@@ -676,50 +697,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" +@@ -1207,12 +1197,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" +@@ -1531,7 +1521,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 +@@ -1564,7 +1554,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 +@@ -1687,7 +1677,7 @@ + ;; + esac + fi +- $ECHO "User subroutine name ($usersubname)? $ECHOTXT" ++ $ECHO "User subroutine name ($user)? $ECHOTXT" + read value + if test "$value" + then +@@ -1696,50 +1686,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 ++ 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 +@@ -2274,11 +2233,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= +@@ -2391,7 +2351,7 @@ + fi + if test "$user" + then +- execpath=$DIRJOB/`$BASENAME $user .f`.marc ++ execpath=$usernoext.marc + usersub=1 + fi + export execpath +@@ -3274,44 +3234,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=$usernoext.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 + + +@@ -3330,6 +3273,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -3343,6 +3287,9 @@ + prgsav=yes + fi + /bin/rm $userobj 2>/dev/null ++/bin/rm $DIRJOB/*.mod 2>/dev/null ++/bin/rm $DIRJOB/*.smod 2>/dev/null ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + + # + # run marc +@@ -3389,7 +3336,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 +@@ -3555,7 +3502,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" +@@ -3568,21 +3515,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 +@@ -3592,39 +3539,27 @@ + if test "$userhost" + then + echo +- echo "Compiling and linking user subroutine $user.f 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 ++ echo "Compiling and linking user subroutine $user on host `hostname`" + 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 + + +@@ -3643,6 +3578,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -3684,6 +3620,9 @@ + 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 ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + + # + # run marc +@@ -3777,7 +3716,7 @@ + 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 +@@ -3902,7 +3841,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" +@@ -3915,20 +3854,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 +@@ -3938,37 +3877,25 @@ + if test "$userhost" + then + echo +- echo "Compiling and linking user subroutine $user.f 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 ++ echo "Compiling and linking user subroutine $user on host `hostname`" + 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 + + +@@ -3987,6 +3914,7 @@ + $TKLIBS \ + $MRCLIBS \ + $METISLIBS \ ++ $DAMASK \ + $SFLIB \ + $OPENSSL_LIB \ + $SYSLIBS \ +@@ -4027,7 +3955,9 @@ + 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 ++/bin/rm $DIRJOB/*_genmod.f90 2>/dev/null + # done if no job id given + if test -z "$jid" + then +@@ -4146,7 +4076,7 @@ + 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 diff --git a/install/MarcMentat/2023.1/Mentat_bin/edit_window.patch b/install/MarcMentat/2023.1/Mentat_bin/edit_window.patch new file mode 100644 index 000000000..915af9bf6 --- /dev/null +++ b/install/MarcMentat/2023.1/Mentat_bin/edit_window.patch @@ -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% $* diff --git a/install/MarcMentat/2023.1/Mentat_bin/kill4.patch b/install/MarcMentat/2023.1/Mentat_bin/kill4.patch new file mode 100644 index 000000000..e69de29bb diff --git a/install/MarcMentat/2023.1/Mentat_bin/kill5.patch b/install/MarcMentat/2023.1/Mentat_bin/kill5.patch new file mode 100644 index 000000000..e69de29bb diff --git a/install/MarcMentat/2023.1/Mentat_bin/kill6.patch b/install/MarcMentat/2023.1/Mentat_bin/kill6.patch new file mode 100644 index 000000000..e69de29bb diff --git a/install/MarcMentat/2023.1/Mentat_bin/submit4.patch b/install/MarcMentat/2023.1/Mentat_bin/submit4.patch new file mode 100644 index 000000000..98c51e76d --- /dev/null +++ b/install/MarcMentat/2023.1/Mentat_bin/submit4.patch @@ -0,0 +1,38 @@ +--- ++++ +@@ -63,10 +63,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 + +@@ -91,6 +91,7 @@ + srcfile="-u $srcfile -save y" + ;; + runsaved) ++ srcfile=${srcfile%.*}".marc" + srcfile="-prog $srcfile" + ;; + esac +@@ -189,12 +190,12 @@ + unset PYTHONPATH + + if [ "$doe_first" = "-" ]; then # submit of regular Marc job +- "${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 + else # submit of a DoE Marc job +- "${DIR}/tools/run_marc" $slv -j $job -v n -b n $nprocds $nprocd \ ++ "${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b n $nprocds $nprocd \ + $srcfile $restart $postfile $viewfactorsfile $hostfile \ + $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ + $assem_recov_nthread $nthread $nsolver $mode $gpu diff --git a/install/MarcMentat/2023.1/Mentat_bin/submit5.patch b/install/MarcMentat/2023.1/Mentat_bin/submit5.patch new file mode 100644 index 000000000..ab32b1058 --- /dev/null +++ b/install/MarcMentat/2023.1/Mentat_bin/submit5.patch @@ -0,0 +1,38 @@ +--- ++++ +@@ -63,10 +63,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 + +@@ -91,6 +91,7 @@ + srcfile="-u $srcfile -save y" + ;; + runsaved) ++ srcfile=${srcfile%.*}".marc" + srcfile="-prog $srcfile" + ;; + esac +@@ -189,12 +190,12 @@ + unset PYTHONPATH + + if [ "$doe_first" = "-" ]; then # submit of regular Marc job +- "${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 + else # submit of a DoE Marc job +- "${DIR}/tools/run_marc" $slv -j $job -v n -b n $nprocds $nprocd \ ++ "${DIR}/tools/run_damask_mp" $slv -j $job -v n -b n $nprocds $nprocd \ + $srcfile $restart $postfile $viewfactorsfile $hostfile \ + $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ + $assem_recov_nthread $nthread $nsolver $mode $gpu diff --git a/install/MarcMentat/2023.1/Mentat_bin/submit6.patch b/install/MarcMentat/2023.1/Mentat_bin/submit6.patch new file mode 100644 index 000000000..d5ea3cfde --- /dev/null +++ b/install/MarcMentat/2023.1/Mentat_bin/submit6.patch @@ -0,0 +1,38 @@ +--- ++++ +@@ -63,10 +63,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 + +@@ -91,6 +91,7 @@ + srcfile="-u $srcfile -save y" + ;; + runsaved) ++ srcfile=${srcfile%.*}".marc" + srcfile="-prog $srcfile" + ;; + esac +@@ -189,12 +190,12 @@ + unset PYTHONPATH + + if [ "$doe_first" = "-" ]; then # submit of regular Marc job +- "${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 + else # submit of a DoE Marc job +- "${DIR}/tools/run_marc" $slv -j $job -v n -b n $nprocds $nprocd \ ++ "${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b n $nprocds $nprocd \ + $srcfile $restart $postfile $viewfactorsfile $hostfile \ + $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ + $assem_recov_nthread $nthread $nsolver $mode $gpu diff --git a/install/MarcMentat/2023.1/Mentat_menus/job_run.ms.patch b/install/MarcMentat/2023.1/Mentat_menus/job_run.ms.patch new file mode 100644 index 000000000..be961cc46 --- /dev/null +++ b/install/MarcMentat/2023.1/Mentat_menus/job_run.ms.patch @@ -0,0 +1,158 @@ +--- ++++ +@@ -362,11 +362,18 @@ + } + 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 + size 16 4 +@@ -1303,6 +1310,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 "O3 / 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 { + diff --git a/src/Marc/include/concom2023.1 b/src/Marc/include/concom2023.1 new file mode 100644 index 000000000..3d31760ba --- /dev/null +++ b/src/Marc/include/concom2023.1 @@ -0,0 +1,471 @@ +! 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, ibuckle, iexpande, matfor +dimension :: ideva(60) +integer num_concom +parameter(num_concom=264) +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, ibuckle, iexpande, matfor +! +! 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 +! print local adaptivity info +! 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 +! 59 print out contact body forces and nodes in contact +! +! 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. +! inonlcl control flag for nonlocal pass +! inonlct permanent control flag for nonlocal pass +! 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 +! 3 - fluid pass +! 4 - joule heating pass +! 5 - pore pressure pass +! 6 - electrostatic pass +! 7 - magnetostatic pass +! 8 - electromagnetic pass +! 9 - diffusion pass +! ipass = 10 - nonlocal 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 +! = 1 for nonlocal part +! 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 analysis with ADAMS using the CosimEngine +! = 2 if marc is used in co-simulation analysis with ADAMS using the ACSI interface +! = 3 if marc is used in co-simulation analysis with scFLOW using the CosimEngine +! = 4 if marc is used in co-simulation analysis with scFLOW and ADAMS using the CosimEngine +! 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 packed integer telling which fatigue mode is active +! 1 = elastomer +! 10 = stress-life +! 100 = strain-life +! = 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 +! ibuckle buckle parameter option is active +! iexpande set to 1 if expanded elements (248, 249, 250 or 251) are +! present, 0 otherwise +! matfor flag for material forces computation +! 0: Eshleby stress and material force vector not requested +! 1: output Eshelby stress tensor, but no material force vector +! 2: output material force vector, but no Eshelby stress tensor +! 3: output Eshelby stress tensor and material force vector +! +!*********************************************************************** +!$omp threadprivate(/marc_concom/) +!! diff --git a/src/Marc/include/creeps2023.1 b/src/Marc/include/creeps2023.1 new file mode 100644 index 000000000..b35d2b6bf --- /dev/null +++ b/src/Marc/include/creeps2023.1 @@ -0,0 +1,73 @@ +! 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,ncrp_arry +parameter(num_creepsr=7) +parameter(num_creepsi=17) +parameter(num_creeps2r=6) +parameter(ncrp_arry=7) +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(1-6) Pointer to constants 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(1-4) Pointer to storage of material id cross reference numbers. +! iicpmt creep law type ID +! =1 - power law +! =2 - solder +! =3 - steady-creep +! =4 - hyperbolic steady-creep +! iicpa Pointer to table IDs for constants 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/) +!! From d8a1d287975d5f23739da3bd03cdf699defdd3b6 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Mon, 24 Jul 2023 17:06:07 +0200 Subject: [PATCH 05/37] actually use new version --- .gitlab-ci.yml | 2 +- python/damask/solver/_marc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f270450fb..9c04c7b1d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ variables: PETSC_INTELLLVM: "Libraries/PETSc/3.16.3/oneAPI-2022.0.1-IntelMPI-2021.5.0" PETSC_INTEL: "Libraries/PETSc/3.16.5/Intel-2022.0.1-IntelMPI-2021.5.0" # ++++++++++++ MSC Marc +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - MSC: "FEM/MSC/2022.4" + MSC: "FEM/MSC/2023.1" IntelMarc: "Compiler/Intel/19.1.2 Libraries/IMKL/2020" HDF5Marc: "HDF5/1.12.2/Intel-19.1.2" diff --git a/python/damask/solver/_marc.py b/python/damask/solver/_marc.py index 18bd56e49..c07876c93 100644 --- a/python/damask/solver/_marc.py +++ b/python/damask/solver/_marc.py @@ -4,7 +4,7 @@ import re from pathlib import Path from typing import Literal -_marc_version = '2022.4' +_marc_version = '2023.1' _marc_root = '/opt/msc' _damask_root = str(Path(__file__).parents[3]) From 94cd462c84e9470552712a13ace4342d87e3447c Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Tue, 25 Jul 2023 10:42:35 +0200 Subject: [PATCH 06/37] safe_cray_pointer is deprecheated --- .../MarcMentat/2023.1/Marc_tools/include_linux64.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/MarcMentat/2023.1/Marc_tools/include_linux64.patch b/install/MarcMentat/2023.1/Marc_tools/include_linux64.patch index adea45976..7ef6f3d66 100644 --- a/install/MarcMentat/2023.1/Marc_tools/include_linux64.patch +++ b/install/MarcMentat/2023.1/Marc_tools/include_linux64.patch @@ -21,7 +21,7 @@ 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" ++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" @@ -48,15 +48,15 @@ +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 \ ++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=2023.1 -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 \ ++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=2023.1 -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 \ ++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=2023.1 -DDAMASKVERSION=$DAMASKVERSION \ + -qopenmp -qopenmp-threadprivate=compat\ + $MUMPS_INCLUDE $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS -I$KDTREE2_MOD -I$MARC_MOD" From dbad2a7413380a0cc4d53dd7d7ceaa176e67d1e7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 30 Jul 2023 23:17:21 +0200 Subject: [PATCH 07/37] hints from gfortran --- src/YAML_parse.f90 | 4 ++-- src/grid/grid_mech_spectral_basic.f90 | 6 ------ src/grid/grid_mech_spectral_polarization.f90 | 6 ------ src/grid/grid_thermal_spectral.f90 | 1 - 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/YAML_parse.f90 b/src/YAML_parse.f90 index 556b8fe96..527a9b3fc 100644 --- a/src/YAML_parse.f90 +++ b/src/YAML_parse.f90 @@ -162,7 +162,7 @@ end function parse_flow !> @brief Find location of chunk end: ',' '}', or ']'. !> @details leaves nested lists ( '[...]' and dicts '{...}') intact !-------------------------------------------------------------------------------------------------- -integer function find_end(str,e_char) +integer(pI64) function find_end(str,e_char) character(len=*), intent(in) :: str !< chunk of YAML flow string character, intent(in) :: e_char !< end of list/dict ( '}' or ']') @@ -456,7 +456,7 @@ end subroutine remove_line_break !-------------------------------------------------------------------------------------------------- subroutine list_item_inline(blck,s_blck,inline,offset) - character(len=*), intent(in) :: blck !< YAML in mixed style + character(len=*), intent(in) :: blck !< YAML in mixed style integer, intent(inout) :: s_blck character(len=:), allocatable, intent(out) :: inline integer, intent(inout) :: offset diff --git a/src/grid/grid_mech_spectral_basic.f90 b/src/grid/grid_mech_spectral_basic.f90 index ed1ff1e2f..5bcfec438 100644 --- a/src/grid/grid_mech_spectral_basic.f90 +++ b/src/grid/grid_mech_spectral_basic.f90 @@ -82,12 +82,6 @@ module grid_mechanical_spectral_basic err_BC, & !< deviation from stress BC err_div !< RMS of div of P -#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>14) && !defined(PETSC_HAVE_MPI_F90MODULE_VISIBILITY) - type(MPI_Status) :: status -#else - integer, dimension(MPI_STATUS_SIZE) :: status -#endif - integer :: & totalIter = 0 !< total iteration in current increment diff --git a/src/grid/grid_mech_spectral_polarization.f90 b/src/grid/grid_mech_spectral_polarization.f90 index c6c7c2fd5..efa1a64a9 100644 --- a/src/grid/grid_mech_spectral_polarization.f90 +++ b/src/grid/grid_mech_spectral_polarization.f90 @@ -94,12 +94,6 @@ module grid_mechanical_spectral_polarization err_curl, & !< RMS of curl of F err_div !< RMS of div of P -#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>14) && !defined(PETSC_HAVE_MPI_F90MODULE_VISIBILITY) - type(MPI_Status) :: status -#else - integer, dimension(MPI_STATUS_SIZE) :: status -#endif - integer :: & totalIter = 0 !< total iteration in current increment diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index 86d8e04f3..c178c5810 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -189,7 +189,6 @@ function grid_thermal_spectral_solution(Delta_t) result(solution) real(pREAL), intent(in) :: & Delta_t !< increment in time for current solution - integer :: i, j, k, ce type(tSolutionState) :: solution PetscInt :: devNull PetscReal :: T_min, T_max, stagNorm From efeed13d8fe958dad376a3d292986ec1601d53ed Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 31 Jul 2023 11:04:58 +0200 Subject: [PATCH 08/37] include more unit tests for Fortran --- src/IO.f90 | 7 ++++--- src/misc.f90 | 1 + src/rotations.f90 | 9 +++++---- src/test/DAMASK_test.f90 | 24 ++++++++++++++++++++++-- src/test/test_IO.f90 | 17 +++++++++++++++++ src/test/test_misc.f90 | 17 +++++++++++++++++ src/test/test_rotations.f90 | 17 +++++++++++++++++ 7 files changed, 83 insertions(+), 9 deletions(-) create mode 100644 src/test/test_IO.f90 create mode 100644 src/test/test_misc.f90 create mode 100644 src/test/test_rotations.f90 diff --git a/src/IO.f90 b/src/IO.f90 index 9e0b4c40d..6f34d1b7f 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -26,6 +26,7 @@ module IO public :: & IO_init, & + IO_selfTest, & IO_read, & IO_readlines, & IO_isBlank, & @@ -55,7 +56,7 @@ subroutine IO_init() print'(/,1x,a)', '<<<+- IO init -+>>>'; flush(IO_STDOUT) - call selfTest() + call IO_selfTest() end subroutine IO_init @@ -763,7 +764,7 @@ end subroutine panel !-------------------------------------------------------------------------------------------------- !> @brief Check correctness of some IO functions. !-------------------------------------------------------------------------------------------------- -subroutine selfTest() +subroutine IO_selfTest() integer, dimension(:), allocatable :: chunkPos character(len=:), allocatable :: str,out @@ -846,6 +847,6 @@ subroutine selfTest() if ('abc,'//IO_EOL//'xxdefg,'//IO_EOL//'xxhij' /= IO_wrapLines('abc,defg, hij',filler='xx',length=4)) & error stop 'IO_wrapLines/7' -end subroutine selfTest +end subroutine IO_selfTest end module IO diff --git a/src/misc.f90 b/src/misc.f90 index 47c23757f..902a5b731 100644 --- a/src/misc.f90 +++ b/src/misc.f90 @@ -19,6 +19,7 @@ module misc public :: & misc_init, & + misc_selfTest, & misc_optional, & misc_prefixOptions diff --git a/src/rotations.f90 b/src/rotations.f90 index 58aa87ee0..fa0da2b0a 100644 --- a/src/rotations.f90 +++ b/src/rotations.f90 @@ -92,6 +92,7 @@ module rotations public :: & rotations_init, & + rotations_selfTest, & eu2om contains @@ -99,14 +100,14 @@ contains !-------------------------------------------------------------------------------------------------- !> @brief Do self test. !-------------------------------------------------------------------------------------------------- -subroutine rotations_init +subroutine rotations_init() print'(/,1x,a)', '<<<+- rotations init -+>>>'; flush(IO_STDOUT) print'(/,1x,a)', 'D. Rowenhorst et al., Modelling and Simulation in Materials Science and Engineering 23:083501, 2015' print'( 1x,a)', 'https://doi.org/10.1088/0965-0393/23/8/083501' - call selfTest() + call rotations_selfTest() end subroutine rotations_init @@ -757,7 +758,7 @@ end function conjugateQuaternion !-------------------------------------------------------------------------------------------------- !> @brief Check correctness of some rotations functions. !-------------------------------------------------------------------------------------------------- -subroutine selfTest() +subroutine rotations_selfTest() type(tRotation) :: R real(pREAL), dimension(4) :: qu @@ -841,7 +842,7 @@ subroutine selfTest() end function quaternion_equal -end subroutine selfTest +end subroutine rotations_selfTest end module rotations diff --git a/src/test/DAMASK_test.f90 b/src/test/DAMASK_test.f90 index 8460a9fab..0904b71a0 100644 --- a/src/test/DAMASK_test.f90 +++ b/src/test/DAMASK_test.f90 @@ -4,10 +4,17 @@ program DAMASK_test use HDF5_utilities use test_prec - use test_tables use test_crystal + use test_IO + use test_rotations + use test_misc + use test_tables use test_HDF5_utilities + external :: quit + + call parallelization_init() + print('(/,a)'), 'begin test prec' call test_prec_run() print('(a)'), 'begin test prec' @@ -20,11 +27,24 @@ program DAMASK_test call test_crystal_run() print('(a)'), 'end test crystal' - call parallelization_init() + print('(/,a)'), 'begin test rotations' + call test_rotations_run() + print('(a)'), 'end test rotations' + + print('(/,a)'), 'begin test IO' + call test_IO_run() + print('(a)'), 'end test IO' + + print('(/,a)'), 'begin test misc' + call test_misc_run() + print('(a)'), 'end test misc' + call HDF5_utilities_init() print('(/,a)'), 'begin test HDF5_utilities' call test_HDF5_utilities_run() print('(a)'), 'begin test HDF5_utilities' + call quit(0) + end program DAMASK_test diff --git a/src/test/test_IO.f90 b/src/test/test_IO.f90 new file mode 100644 index 000000000..cae7f76c4 --- /dev/null +++ b/src/test/test_IO.f90 @@ -0,0 +1,17 @@ +module test_IO + use IO + + implicit none(type,external) + + private + public :: test_IO_run + + contains + +subroutine test_IO_run() + + call IO_selfTest() + +end subroutine test_IO_run + +end module test_IO diff --git a/src/test/test_misc.f90 b/src/test/test_misc.f90 new file mode 100644 index 000000000..3fcdf19b1 --- /dev/null +++ b/src/test/test_misc.f90 @@ -0,0 +1,17 @@ +module test_misc + use misc + + implicit none(type,external) + + private + public :: test_misc_run + + contains + +subroutine test_misc_run() + + call misc_selfTest() + +end subroutine test_misc_run + +end module test_misc diff --git a/src/test/test_rotations.f90 b/src/test/test_rotations.f90 new file mode 100644 index 000000000..9cf9b7ffd --- /dev/null +++ b/src/test/test_rotations.f90 @@ -0,0 +1,17 @@ +module test_rotations + use rotations + + implicit none(type,external) + + private + public :: test_rotations_run + + contains + +subroutine test_rotations_run() + + call rotations_selfTest() + +end subroutine test_rotations_run + +end module test_rotations From 1b5f4000bd123a09f03c2ec3d9d55a427cbcb420 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 31 Jul 2023 15:05:14 +0200 Subject: [PATCH 09/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-702-g39f4bc44e --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 328a7839f..33510fc94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-696-gd2e279da1 +3.0.0-alpha7-702-g39f4bc44e From 4d03d1ab89063ec8dac3eabf53af8515ad18b846 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 31 Jul 2023 17:54:55 +0200 Subject: [PATCH 10/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-706-g43b58c93e --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 328a7839f..a1fca3533 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-696-gd2e279da1 +3.0.0-alpha7-706-g43b58c93e From 72845dce07997fbd1e4049ecb1bf379b5ba01254 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 1 Aug 2023 22:30:08 +0200 Subject: [PATCH 11/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-713-gd73f76901 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a1fca3533..936f2efa1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-706-g43b58c93e +3.0.0-alpha7-713-gd73f76901 From e25db6830f3a01e3322b31c0535681d157466b75 Mon Sep 17 00:00:00 2001 From: Test User Date: Wed, 2 Aug 2023 18:31:49 +0200 Subject: [PATCH 12/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-716-g23cd3fc1f --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 936f2efa1..84cae21df 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-713-gd73f76901 +3.0.0-alpha7-716-g23cd3fc1f From 1d0cd6826e80e9be38f958310e717b0f66e5d879 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Thu, 3 Aug 2023 14:35:07 +0200 Subject: [PATCH 13/37] during update revision update development first then master to minimize critical time frame --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50c239f65..dde542a6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -284,6 +284,6 @@ update_revision: - > git diff-index --quiet HEAD || git commit VERSION -m "[skip ci] updated version information after successful test of $VERSION" - - if [ ${CI_COMMIT_SHA} == $(git rev-parse HEAD^) ]; then git push origin HEAD:master HEAD:development; fi + - if [ ${CI_COMMIT_SHA} == $(git rev-parse HEAD^) ]; then git push origin HEAD:development HEAD:master; fi only: - development From ab2711390b888e8a0da65a5dbd1814441679367c Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 3 Aug 2023 16:44:57 +0200 Subject: [PATCH 14/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-721-g1d0cd6826 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 84cae21df..70ac65c95 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-716-g23cd3fc1f +3.0.0-alpha7-721-g1d0cd6826 From fe3b58e5017d360b31aa6f69f3e78831fd4e026a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 4 Aug 2023 09:54:59 +0200 Subject: [PATCH 15/37] avoid race conditions --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dde542a6c..e988f6cf9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -284,6 +284,6 @@ update_revision: - > git diff-index --quiet HEAD || git commit VERSION -m "[skip ci] updated version information after successful test of $VERSION" - - if [ ${CI_COMMIT_SHA} == $(git rev-parse HEAD^) ]; then git push origin HEAD:development HEAD:master; fi + - if [ ${CI_COMMIT_SHA} == $(git rev-parse HEAD^) ]; then git push --atomic --no-verify origin HEAD:development HEAD:master; fi only: - development From d428024d4dcde4b1caca4fab20c54a793019f2d7 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 4 Aug 2023 17:56:57 +0200 Subject: [PATCH 16/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-724-ga2c9cfbbe --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 70ac65c95..deab02c80 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-721-g1d0cd6826 +3.0.0-alpha7-724-ga2c9cfbbe From ffdf478b62fd26afcf026ef1af39e2d7c9f2fc3d Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Fri, 4 Aug 2023 12:43:56 -0400 Subject: [PATCH 17/37] all parameters as slip family-dependent --- PRIVATE | 2 +- .../plastic/phenopowerlaw_AA6022-T4.yaml | 8 +- .../mechanical/plastic/phenopowerlaw_Al.yaml | 8 +- .../mechanical/plastic/phenopowerlaw_Au.yaml | 8 +- .../mechanical/plastic/phenopowerlaw_Cu.yaml | 8 +- .../phenopowerlaw_DP-steel-ferrite.yaml | 8 +- .../mechanical/plastic/phenopowerlaw_Mg.yaml | 18 +-- .../plastic/phenopowerlaw_Pt-5%Cu.yaml | 12 +- .../plastic/phenopowerlaw_Sn-beta.yaml | 8 +- .../mechanical/plastic/phenopowerlaw_Ti.yaml | 12 +- .../phenopowerlaw_bcc_martensite.yaml} | 14 +- examples/grid/material.yaml | 8 +- ...phase_mechanical_plastic_phenopowerlaw.f90 | 131 ++++++++++-------- 13 files changed, 131 insertions(+), 114 deletions(-) rename examples/config/{Phase_Phenopowerlaw_BCC-Martensite.yaml => phase/mechanical/plastic/phenopowerlaw_bcc_martensite.yaml} (78%) diff --git a/PRIVATE b/PRIVATE index 8c05965ef..4e1957339 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 8c05965ef4437598898f467a213ffa88938e860a +Subproject commit 4e195733964bfa36de70abb768a65a7216180d0f diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_AA6022-T4.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_AA6022-T4.yaml index 36e1a1cc8..9dc5b08ad 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_AA6022-T4.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_AA6022-T4.yaml @@ -10,10 +10,10 @@ output: [xi_sl, gamma_sl] N_sl: [12] -n_sl: 20 -a_sl: 3.7 -h_0_sl-sl: 1.02e+9 +dot_gamma_0_sl: [0.001] +n_sl: [20] +a_sl: [3.7] xi_0_sl: [76.e+6] xi_inf_sl: [266.e+6] +h_0_sl-sl: [1.02e+9] h_sl-sl: [1, 1, 5.123, 0.574, 1.123, 1.123, 1] -dot_gamma_0_sl: 0.001 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Al.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Al.yaml index 76194d700..ab2ac4730 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Al.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Al.yaml @@ -10,10 +10,10 @@ output: [xi_sl, gamma_sl] N_sl: [12] -n_sl: 20 -a_sl: 5.4 -h_0_sl-sl: 281.5e+6 +dot_gamma_0_sl: [7.5e-5] +n_sl: [20] +a_sl: [5.4] xi_0_sl: [2.69e+6] xi_inf_sl: [67.5e+6] +h_0_sl-sl: [0.2815e+9] h_sl-sl: [1, 1, 5.123, 0.574, 1.123, 1.123, 1] -dot_gamma_0_sl: 7.5e-5 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Au.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Au.yaml index 3eaed00c4..54515a6f7 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Au.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Au.yaml @@ -15,10 +15,10 @@ output: [xi_sl, gamma_sl] N_sl: [12] -n_sl: 83.3 -a_sl: 1.0 -h_0_sl-sl: 75.0e+6 +dot_gamma_0_sl: [0.001] +n_sl: [83.3] +a_sl: [1.0] xi_0_sl: [26.25e+6] xi_inf_sl: [53.0e+6] +h_0_sl-sl: [75.0e+6] h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4] -dot_gamma_0_sl: 0.001 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Cu.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Cu.yaml index 08f366b15..5b132453b 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Cu.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Cu.yaml @@ -10,10 +10,10 @@ output: [xi_sl, gamma_sl] N_sl: [12] -n_sl: 20 -a_sl: 0.6 -h_0_sl-sl: 3.5e+8 +dot_gamma_0_sl: [3.e-3] +n_sl: [20] +a_sl: [0.6] xi_0_sl: [1.6e+6] xi_inf_sl: [96.4e+6] +h_0_sl-sl: [0.35e+9] h_sl-sl: [1, 1, 5.123, 0.574, 1.123, 1.123, 1] -dot_gamma_0_sl: 3.e-3 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_DP-steel-ferrite.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_DP-steel-ferrite.yaml index 023159bb2..0587e222d 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_DP-steel-ferrite.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_DP-steel-ferrite.yaml @@ -12,10 +12,10 @@ output: [xi_sl, gamma_sl] N_sl: [12, 12] -n_sl: 20 -a_sl: 2.25 -h_0_sl-sl: 1.0e+9 +dot_gamma_0_sl: [0.001, 0.001] +n_sl: [20, 20] +a_sl: [2.25, 2.25] xi_0_sl: [95.e+6, 96.e+6] xi_inf_sl: [222.e+6, 412.e+6] +h_0_sl-sl: [1.0e+9, 1.0e+9] h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] -dot_gamma_0_sl: 0.001 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml index 9ccc0ab3c..9f9e5fbdf 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Mg.yaml @@ -14,16 +14,16 @@ xi_0_sl: [10.e+6, 55.e+6, 60.e+6, 0., 60.e+6] xi_inf_sl: [40.e+6, 135.e+6, 150.e+6, 0., 150.e+6] xi_0_tw: [40.e+6, 0., 60.e+6] -a_sl: 2.25 -dot_gamma_0_sl: 0.001 -dot_gamma_0_tw: 0.001 -n_sl: 20 -n_tw: 20 -f_sat_sl-tw: 10.0 +a_sl: [2.25, 2.25, 2.25, 1, 2.25] +dot_gamma_0_sl: [0.001, 0.001, 0.001, 0, 0.001] +dot_gamma_0_tw: [0.001, 0, 0.001] +n_sl: [20, 20, 20, 1, 20] +n_tw: [20, 1, 20] +f_sat_sl-tw: [10.0, 10.0, 10.0, 0, 10.0] -h_0_sl-sl: 500.0e+6 -h_0_tw-tw: 50.0e+6 -h_0_tw-sl: 150.0e+6 +h_0_sl-sl: [0.5e+9, 0.5e+9, 0.5e+9, 0, 0.5e+9] +h_0_tw-tw: [50.0e+6, 0, 50.0e+6] +h_0_tw-sl: [0.15e+9, 0, 0.15e+9] h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, +1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Pt-5%Cu.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Pt-5%Cu.yaml index 59b58cdb1..500bb1ca6 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Pt-5%Cu.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Pt-5%Cu.yaml @@ -10,10 +10,10 @@ output: [xi_sl, gamma_sl] N_sl: [12] -n_sl: 20 -a_sl: 0.9 -h_0_sl-sl: 781.2e+6 -xi_0_sl: [114.e+6] -xi_inf_sl: [207.e+6] +dot_gamma_0_sl: [0.001] +n_sl: [20] +a_sl: [0.9] +xi_0_sl: [0.114e+9] +xi_inf_sl: [0.207e+9] +h_0_sl-sl: [0.7812e+9] h_sl-sl: [1, 1, 5.123, 0.574, 1.123, 1.123, 1] -dot_gamma_0_sl: 0.001 diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Sn-beta.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Sn-beta.yaml index 6877fe229..d8608b0cb 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Sn-beta.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Sn-beta.yaml @@ -9,9 +9,9 @@ output: [xi_sl, gamma_sl] N_sl: [2, 2, 2, 4, 2, 4, 2, 2, 4, 0, 0, 8] -n_sl: 6.0 -a_sl: 2.0 -h_0_sl-sl: 20.0e+6 +n_sl: [6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 1, 1, 6.0] +a_sl: [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 2.0] +h_0_sl-sl: [20e+6, 20e+6, 20e+6, 20e+6, 20e+6, 20e+6, 20e+6, 20e+6, 20e+6, 0.0, 0.0, 20e+6] xi_0_sl: [8.5e+6, 4.3e+6, 10.4e+6, 4.5e+6, 5.6e+6, 5.1e+6, 7.4e+6, 15.0e+6, 6.6e+6, 0.0, 0.0, 12.0e+6] xi_inf_sl: [11.0e+6, 9.0e+6, 11.0e+6, 9.0e+6, 10.0e+6, 10.0e+6, 10.0e+6, 10.0e+6, 9.0e+6, 0.0, 0.0, 13.0e+6] h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, @@ -30,4 +30,4 @@ h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, +1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, # 150 +1.0, 1.0, 1.0, 1.0, 1.0, 1.0] # unused entries are indicated by -1.0 -dot_gamma_0_sl: 2.6e-8 +dot_gamma_0_sl: [2.6e-8, 2.6e-8, 2.6e-8, 2.6e-8, 2.6e-8, 2.6e-8, 2.6e-8, 2.6e-8, 2.6e-8, 1.0, 1.0, 2.6e-8] diff --git a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml index 2dbf81ddc..5da7e2e31 100644 --- a/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_Ti.yaml @@ -12,17 +12,17 @@ output: [gamma_sl] N_sl: [3, 3, 0, 12] # basal, prism, -, 1. pyr -n_sl: 20 -a_sl: 2.0 -dot_gamma_0_sl: 0.001 -h_0_sl-sl: 200.e+6 +dot_gamma_0_sl: [0.001, 0.001, 0.0, 0.001] +n_sl: [20, 20, 1, 20] +a_sl: [2.0, 2.0, 1.0, 2.0] # C. Zambaldi et al.: -xi_0_sl: [349.e+6, 150.e+6, 0.0, 1107.e+6] -xi_inf_sl: [568.e+6, 150.e+7, 0.0, 3420.e+6] +xi_0_sl: [0.349e+9, 0.15e+9, 0.0, 1.107e+9] +xi_inf_sl: [0.568e+9, 1.50e+9, 0.0, 3.420e+9] # L. Wang et al. : # xi_0_sl: [127.e+6, 96.e+6, 0.0, 240.e+6] +h_0_sl-sl: [0.2e+9, 0.2e+9, 0.0, 0.2e+9] h_sl-sl: [+1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, +1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, diff --git a/examples/config/Phase_Phenopowerlaw_BCC-Martensite.yaml b/examples/config/phase/mechanical/plastic/phenopowerlaw_bcc_martensite.yaml similarity index 78% rename from examples/config/Phase_Phenopowerlaw_BCC-Martensite.yaml rename to examples/config/phase/mechanical/plastic/phenopowerlaw_bcc_martensite.yaml index f2066b373..739302fc3 100644 --- a/examples/config/Phase_Phenopowerlaw_BCC-Martensite.yaml +++ b/examples/config/phase/mechanical/plastic/phenopowerlaw_bcc_martensite.yaml @@ -1,12 +1,14 @@ # Tasan et.al. 2015 Acta Materalia # Tasan et.al. 2015 International Journal of Plasticity # Diehl et.al. 2015 Meccanica -N_sl: [12, 12] -a_sl: 2.0 -dot_gamma_0_sl: 0.001 -h_0_sl-sl: 563.0e+9 -h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] -n_sl: 20 type: phenopowerlaw + +N_sl: [12, 12] + +dot_gamma_0_sl: [0.001, 0.001] +n_sl: [20, 20] +a_sl: [2.0, 2.0] xi_0_sl: [405.8e+6, 456.7e+6] xi_inf_sl: [872.9e+6, 971.2e+6] +h_0_sl-sl: [563.0e+9, 563.0e+9] +h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] diff --git a/examples/grid/material.yaml b/examples/grid/material.yaml index a89068e1b..f5216be96 100644 --- a/examples/grid/material.yaml +++ b/examples/grid/material.yaml @@ -13,12 +13,12 @@ phase: plastic: type: phenopowerlaw N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75.e+6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75.e+6] h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] xi_0_sl: [31.e+6] xi_inf_sl: [63.e+6] diff --git a/src/phase_mechanical_plastic_phenopowerlaw.f90 b/src/phase_mechanical_plastic_phenopowerlaw.f90 index e9e28658b..95a16e450 100644 --- a/src/phase_mechanical_plastic_phenopowerlaw.f90 +++ b/src/phase_mechanical_plastic_phenopowerlaw.f90 @@ -7,23 +7,21 @@ submodule(phase:plastic) phenopowerlaw type :: tParameters - real(pREAL) :: & - dot_gamma_0_sl = 1.0_pREAL, & !< reference shear strain rate for slip - dot_gamma_0_tw = 1.0_pREAL, & !< reference shear strain rate for twin - n_sl = 1.0_pREAL, & !< stress exponent for slip - n_tw = 1.0_pREAL, & !< stress exponent for twin - f_sat_sl_tw = 1.0_pREAL, & !< push-up factor for slip saturation due to twinning - c_1 = 1.0_pREAL, & - c_2 = 1.0_pREAL, & - c_3 = 1.0_pREAL, & - c_4 = 1.0_pREAL, & - h_0_sl_sl = 1.0_pREAL, & !< reference hardening slip - slip - h_0_tw_sl = 1.0_pREAL, & !< reference hardening twin - slip - h_0_tw_tw = 1.0_pREAL, & !< reference hardening twin - twin - a_sl = 1.0_pREAL real(pREAL), allocatable, dimension(:) :: & + dot_gamma_0_sl, & !< reference shear strain rate for slip + dot_gamma_0_tw, & !< reference shear strain rate for twin + a_sl, & + n_sl, & !< stress exponent for slip + n_tw, & !< stress exponent for twin xi_inf_sl, & !< maximum critical shear stress for slip - h_int, & !< per family hardening activity (optional) + f_sat_sl_tw, & !< push-up factor for slip saturation due to twinning + c_1, & + c_2, & + c_3, & + c_4, & + h_0_sl_sl, & !< reference hardening slip - slip + h_0_tw_sl, & !< reference hardening twin - slip + h_0_tw_tw, & !< reference hardening twin - twin gamma_char !< characteristic shear for twins real(pREAL), allocatable, dimension(:,:) :: & h_sl_sl, & !< slip resistance from slip activity @@ -40,7 +38,7 @@ submodule(phase:plastic) phenopowerlaw sum_N_tw !< total number of active twin systems logical :: & nonSchmidActive = .false. - character(len=pSTRLEN), allocatable, dimension(:) :: & + character(len=pSTRLEN), allocatable, dimension(:) :: & output character(len=:), allocatable, dimension(:) :: & systems_sl, & @@ -81,6 +79,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & ph, i, & + N_fam, & Nmembers, & sizeState, sizeDotState, & startIndex, endIndex @@ -90,7 +89,8 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) real(pREAL), dimension(:), allocatable :: & xi_0_sl, & !< initial critical shear stress for slip xi_0_tw, & !< initial critical shear stress for twin - a !< non-Schmid coefficients + a, & !< non-Schmid coefficients + ones character(len=:), allocatable :: & refs, & extmsg @@ -134,20 +134,26 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) prm%output = pl%get_as1dStr('output',defaultVal=emptyStrArray) #endif + + N_sl = pl%get_as1dInt('N_sl',defaultVal=emptyIntArray) + N_tw = pl%get_as1dInt('N_tw',defaultVal=emptyIntArray) + prm%sum_N_sl = sum(abs(N_sl)) + prm%sum_N_tw = sum(abs(N_tw)) + !-------------------------------------------------------------------------------------------------- ! slip related parameters - N_sl = pl%get_as1dInt('N_sl',defaultVal=emptyIntArray) - prm%sum_N_sl = sum(abs(N_sl)) slipActive: if (prm%sum_N_sl > 0) then - prm%dot_gamma_0_sl = pl%get_asReal('dot_gamma_0_sl') - prm%n_sl = pl%get_asReal('n_sl') - prm%a_sl = pl%get_asReal('a_sl') - prm%h_0_sl_sl = pl%get_asReal('h_0_sl-sl') - - xi_0_sl = math_expand(pl%get_as1dReal('xi_0_sl', requiredSize=size(N_sl)),N_sl) - prm%xi_inf_sl = math_expand(pl%get_as1dReal('xi_inf_sl', requiredSize=size(N_sl)),N_sl) - prm%h_int = math_expand(pl%get_as1dReal('h_int', requiredSize=size(N_sl), & - defaultVal=[(0.0_pREAL,i=1,size(N_sl))]),N_sl) + N_fam = size(N_sl) + ones = [(1.0_pREAL,i=1,N_fam)] + prm%dot_gamma_0_sl = math_expand(pl%get_as1dReal('dot_gamma_0_sl',requiredSize=N_fam,defaultVal= ones), N_sl) + prm%n_sl = math_expand(pl%get_as1dReal('n_sl', requiredSize=N_fam,defaultVal= ones), N_sl) + prm%a_sl = math_expand(pl%get_as1dReal('a_sl', requiredSize=N_fam,defaultVal= ones), N_sl) + prm%h_0_sl_sl = math_expand(pl%get_as1dReal('h_0_sl-sl', requiredSize=N_fam,defaultVal=0.0_pREAL*ones), N_sl) + prm%c_1 = math_expand(pl%get_as1dReal('c_1', requiredSize=N_fam,defaultVal=0.0_pREAL*ones), N_sl) + prm%c_2 = math_expand(pl%get_as1dReal('c_2', requiredSize=N_fam,defaultVal= ones), N_sl) + xi_0_sl = math_expand(pl%get_as1dReal('xi_0_sl', requiredSize=N_fam), N_sl) + prm%xi_inf_sl = math_expand(pl%get_as1dReal('xi_inf_sl', requiredSize=N_fam), N_sl) + prm%f_sat_sl_tw = math_expand(pl%get_as1dReal('f_sat_sl-tw',requiredSize=N_fam,defaultVal=0.0_pREAL*ones), N_sl) prm%h_sl_sl = crystal_interaction_SlipBySlip(N_sl,pl%get_as1dReal('h_sl-sl'),phase_lattice(ph)) @@ -166,35 +172,37 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) prm%systems_sl = crystal_labels_slip(N_sl,phase_lattice(ph)) ! sanity checks - if ( prm%dot_gamma_0_sl <= 0.0_pREAL) extmsg = trim(extmsg)//' dot_gamma_0_sl' - if ( prm%a_sl <= 0.0_pREAL) extmsg = trim(extmsg)//' a_sl' - if ( prm%n_sl <= 0.0_pREAL) extmsg = trim(extmsg)//' n_sl' + if (any(prm%dot_gamma_0_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' dot_gamma_0_sl' + if (any(prm%a_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' a_sl' + if (any(prm%n_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' n_sl' if (any(xi_0_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' xi_0_sl' if (any(prm%xi_inf_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' xi_inf_sl' else slipActive xi_0_sl = emptyRealArray - allocate(prm%xi_inf_sl, & - prm%h_int, & + allocate(prm%dot_gamma_0_sl, & !< reference shear strain rate for slip + prm%a_sl, & + prm%n_sl, & !< stress exponent for slip + prm%xi_inf_sl, & !< maximum critical shear stress for slip + prm%f_sat_sl_tw, & !< push-up factor for slip saturation due to twinning + prm%c_1, & + prm%c_2, & + prm%h_0_sl_sl, & !< reference hardening slip - slip source=emptyRealArray) allocate(prm%h_sl_sl(0,0)) end if slipActive !-------------------------------------------------------------------------------------------------- ! twin related parameters - N_tw = pl%get_as1dInt('N_tw', defaultVal=emptyIntArray) - prm%sum_N_tw = sum(abs(N_tw)) twinActive: if (prm%sum_N_tw > 0) then - prm%c_1 = pl%get_asReal('c_1',defaultVal=0.0_pREAL) - prm%c_2 = pl%get_asReal('c_2',defaultVal=1.0_pREAL) - prm%c_3 = pl%get_asReal('c_3',defaultVal=0.0_pREAL) - prm%c_4 = pl%get_asReal('c_4',defaultVal=0.0_pREAL) - prm%dot_gamma_0_tw = pl%get_asReal('dot_gamma_0_tw') - prm%n_tw = pl%get_asReal('n_tw') - prm%f_sat_sl_tw = pl%get_asReal('f_sat_sl-tw') - prm%h_0_tw_tw = pl%get_asReal('h_0_tw-tw') - - xi_0_tw = math_expand(pl%get_as1dReal('xi_0_tw',requiredSize=size(N_tw)),N_tw) + N_fam = size(N_tw) + ones = [(1.0_pREAL,i=1,N_fam)] + prm%dot_gamma_0_tw = math_expand(pl%get_as1dReal('dot_gamma_0_tw', requiredSize=N_fam,defaultVal=ones), N_tw) + prm%n_tw = math_expand(pl%get_as1dReal('n_tw', requiredSize=N_fam,defaultVal= ones), N_tw) + prm%c_3 = math_expand(pl%get_as1dReal('c_3', requiredSize=N_fam,defaultVal=0.0_pREAL*ones), N_tw) + prm%c_4 = math_expand(pl%get_as1dReal('c_4', requiredSize=N_fam,defaultVal=0.0_pREAL*ones), N_tw) + prm%h_0_tw_tw = math_expand(pl%get_as1dReal('h_0_tw-tw', requiredSize=N_fam,defaultVal=0.0_pReal*ones), N_tw) + xi_0_tw = math_expand(pl%get_as1dReal('xi_0_tw', requiredSize=N_fam), N_tw) prm%gamma_char = crystal_characteristicShear_twin(N_tw,phase_lattice(ph),phase_cOverA(ph)) prm%h_tw_tw = crystal_interaction_TwinByTwin(N_tw,pl%get_as1dReal('h_tw-tw'),phase_lattice(ph)) @@ -203,27 +211,33 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) prm%systems_tw = crystal_labels_twin(N_tw,phase_lattice(ph)) ! sanity checks - if (prm%dot_gamma_0_tw <= 0.0_pREAL) extmsg = trim(extmsg)//' dot_gamma_0_tw' - if (prm%n_tw <= 0.0_pREAL) extmsg = trim(extmsg)//' n_tw' + if (any(prm%dot_gamma_0_tw <= 0.0_pREAL)) extmsg = trim(extmsg)//' dot_gamma_0_tw' + if (any(prm%n_tw <= 0.0_pREAL)) extmsg = trim(extmsg)//' n_tw' + if (any(xi_0_tw <= 0.0_pREAL)) extmsg = trim(extmsg)//' xi_0_tw' else twinActive xi_0_tw = emptyRealArray - allocate(prm%gamma_char,source=emptyRealArray) + allocate(prm%dot_gamma_0_tw, & !< reference shear strain rate for twin + prm%n_tw, & !< stress exponent for twin + prm%c_3, & + prm%c_4, & + prm%gamma_char, & !< characteristic shear for twins + prm%h_0_tw_sl, & !< reference hardening twin - slip + prm%h_0_tw_tw, & !< reference hardening twin - twin + source=emptyRealArray) allocate(prm%h_tw_tw(0,0)) end if twinActive !-------------------------------------------------------------------------------------------------- ! slip-twin related parameters slipAndTwinActive: if (prm%sum_N_sl > 0 .and. prm%sum_N_tw > 0) then - prm%h_0_tw_sl = pl%get_asReal('h_0_tw-sl') - prm%h_sl_tw = crystal_interaction_SlipByTwin(N_sl,N_tw,pl%get_as1dReal('h_sl-tw'), & - phase_lattice(ph)) - prm%h_tw_sl = crystal_interaction_TwinBySlip(N_tw,N_sl,pl%get_as1dReal('h_tw-sl'), & - phase_lattice(ph)) + prm%h_0_tw_sl = math_expand(pl%get_as1dReal('h_0_tw-sl',requiredSize=N_fam,defaultVal=0.0_pReal*ones), N_tw) + prm%h_sl_tw = crystal_interaction_SlipByTwin(N_sl,N_tw,pl%get_as1dReal('h_sl-tw'),phase_lattice(ph)) + prm%h_tw_sl = crystal_interaction_TwinBySlip(N_tw,N_sl,pl%get_as1dReal('h_tw-sl'),phase_lattice(ph)) else slipAndTwinActive allocate(prm%h_sl_tw(prm%sum_N_sl,prm%sum_N_tw)) ! at least one dimension is 0 allocate(prm%h_tw_sl(prm%sum_N_tw,prm%sum_N_sl)) ! at least one dimension is 0 - prm%h_0_tw_sl = 0.0_pREAL + prm%h_0_tw_sl = [(0.0_pREAL,i=1,size(N_tw))] end if slipAndTwinActive !-------------------------------------------------------------------------------------------------- @@ -242,7 +256,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) endIndex = prm%sum_N_sl idx_dot%xi_sl = [startIndex,endIndex] stt%xi_sl => plasticState(ph)%state(startIndex:endIndex,:) - stt%xi_sl = spread(xi_0_sl, 2, Nmembers) + stt%xi_sl = spread(xi_0_sl, 2, Nmembers) plasticState(ph)%atol(startIndex:endIndex) = pl%get_asReal('atol_xi',defaultVal=1.0_pREAL) if (any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pREAL)) extmsg = trim(extmsg)//' atol_xi' @@ -250,7 +264,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) endIndex = endIndex + prm%sum_N_tw idx_dot%xi_tw = [startIndex,endIndex] stt%xi_tw => plasticState(ph)%state(startIndex:endIndex,:) - stt%xi_tw = spread(xi_0_tw, 2, Nmembers) + stt%xi_tw = spread(xi_0_tw, 2, Nmembers) plasticState(ph)%atol(startIndex:endIndex) = pl%get_asReal('atol_xi',defaultVal=1.0_pREAL) startIndex = endIndex + 1 @@ -344,10 +358,10 @@ module function phenopowerlaw_dotState(Mp,ph,en) result(dotState) dotState real(pREAL) :: & - xi_sl_sat_offset,& sumF real(pREAL), dimension(param(ph)%sum_N_sl) :: & dot_gamma_sl_pos,dot_gamma_sl_neg, & + xi_sl_sat_offset, & left_SlipSlip associate(prm => param(ph), stt => state(ph), & @@ -362,10 +376,11 @@ module function phenopowerlaw_dotState(Mp,ph,en) result(dotState) sumF = sum(stt%gamma_tw(:,en)/prm%gamma_char) xi_sl_sat_offset = prm%f_sat_sl_tw*sqrt(sumF) + left_SlipSlip = sign(abs(1.0_pREAL-stt%xi_sl(:,en) / (prm%xi_inf_sl+xi_sl_sat_offset))**prm%a_sl, & 1.0_pREAL-stt%xi_sl(:,en) / (prm%xi_inf_sl+xi_sl_sat_offset)) - dot_xi_sl = prm%h_0_sl_sl * (1.0_pREAL + prm%c_1 * sumF**prm%c_2) * (1.0_pREAL + prm%h_int) & + dot_xi_sl = prm%h_0_sl_sl * (1.0_pREAL + prm%c_1 * sumF**prm%c_2) & * left_SlipSlip * matmul(prm%h_sl_sl,dot_gamma_sl) & + matmul(prm%h_sl_tw,dot_gamma_tw) From cc77d5c69b1661d3a20d8ea6c4f642d1c5c8df7c Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Fri, 4 Aug 2023 14:42:51 +0200 Subject: [PATCH 18/37] interfaces are not included in petsc version<=3.16.x yet --- src/mesh/discretization_mesh.f90 | 2 +- src/mesh/mesh_mech_FEM.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesh/discretization_mesh.f90 b/src/mesh/discretization_mesh.f90 index 5cd12549e..3f5811a5c 100644 --- a/src/mesh/discretization_mesh.f90 +++ b/src/mesh/discretization_mesh.f90 @@ -56,7 +56,7 @@ module discretization_mesh real(pREAL), dimension(:,:,:), allocatable :: & mesh_ipCoordinates !< IP x,y,z coordinates (after deformation!) -#ifdef PETSC_USE_64BIT_INDICES +#if defined(PETSC_USE_64BIT_INDICES) || PETSC_VERSION_MINOR < 17 external :: & DMDestroy #endif diff --git a/src/mesh/mesh_mech_FEM.f90 b/src/mesh/mesh_mech_FEM.f90 index 43a1b0579..d08906439 100644 --- a/src/mesh/mesh_mech_FEM.f90 +++ b/src/mesh/mesh_mech_FEM.f90 @@ -72,7 +72,7 @@ module mesh_mechanical_FEM real(pREAL), parameter :: eps = 1.0e-18_pREAL external :: & ! ToDo: write interfaces -#ifdef PETSC_USE_64BIT_INDICES +#if defined(PETSC_USE_64BIT_INDICES) || PETSC_VERSION_MINOR < 17 ISDestroy, & #endif PetscSectionGetNumFields, & From 57b2816d3199c606473f4e3138e72ff2382e7f13 Mon Sep 17 00:00:00 2001 From: Test User Date: Sat, 5 Aug 2023 00:15:11 +0200 Subject: [PATCH 19/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-727-g7d1adebde --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index deab02c80..942733d9c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-724-ga2c9cfbbe +3.0.0-alpha7-727-g7d1adebde From 81d0002a49a2b03f0b184130d3909b4bcb60a8a7 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Sat, 5 Aug 2023 11:50:03 -0400 Subject: [PATCH 20/37] corrected remaining instances of phenopowerlaw configuration --- PRIVATE | 2 +- examples/Marc/material.yaml | 8 ++++---- examples/mesh/material.yaml | 8 ++++---- .../resources/Result/12grains6x7x8.material.yaml | 16 ++++++++-------- .../resources/Result/4grains2x4x3.material.yaml | 16 ++++++++-------- .../6grains6x7x8_single_phase.material.yaml | 8 ++++---- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/PRIVATE b/PRIVATE index 4e1957339..671e09508 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 4e195733964bfa36de70abb768a65a7216180d0f +Subproject commit 671e09508137c7041f272009db654e46b9c0dcdc diff --git a/examples/Marc/material.yaml b/examples/Marc/material.yaml index c0a7be647..be915189a 100644 --- a/examples/Marc/material.yaml +++ b/examples/Marc/material.yaml @@ -13,12 +13,12 @@ phase: plastic: type: phenopowerlaw N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75.e+6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75.e+6] h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] xi_0_sl: [31.e+6] xi_inf_sl: [63.e+6] diff --git a/examples/mesh/material.yaml b/examples/mesh/material.yaml index 94bbaa98f..cfa4b4464 100644 --- a/examples/mesh/material.yaml +++ b/examples/mesh/material.yaml @@ -12,12 +12,12 @@ phase: plastic: type: phenopowerlaw N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75.e+6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75.e+6] h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] xi_0_sl: [31.e+6] xi_inf_sl: [63.e+6] diff --git a/python/tests/resources/Result/12grains6x7x8.material.yaml b/python/tests/resources/Result/12grains6x7x8.material.yaml index a74e266c3..06045a746 100644 --- a/python/tests/resources/Result/12grains6x7x8.material.yaml +++ b/python/tests/resources/Result/12grains6x7x8.material.yaml @@ -12,12 +12,12 @@ phase: elastic: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: Hooke} plastic: N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75e6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75e6] h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] type: phenopowerlaw xi_0_sl: [31e6] @@ -29,12 +29,12 @@ phase: elastic: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: Hooke} plastic: N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75e6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75e6] h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] type: phenopowerlaw xi_0_sl: [31e6] diff --git a/python/tests/resources/Result/4grains2x4x3.material.yaml b/python/tests/resources/Result/4grains2x4x3.material.yaml index 96be5f483..642b7843b 100644 --- a/python/tests/resources/Result/4grains2x4x3.material.yaml +++ b/python/tests/resources/Result/4grains2x4x3.material.yaml @@ -644,12 +644,12 @@ phase: elastic: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: Hooke} plastic: N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75e6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75e6] h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] type: phenopowerlaw xi_0_sl: [31e6] @@ -661,12 +661,12 @@ phase: elastic: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: Hooke} plastic: N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75e6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75e6] h_sl-sl: [1, 1.4, 1, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] type: phenopowerlaw xi_0_sl: [31e6] diff --git a/python/tests/resources/Result/6grains6x7x8_single_phase.material.yaml b/python/tests/resources/Result/6grains6x7x8_single_phase.material.yaml index 0f7bf5450..f820e1011 100644 --- a/python/tests/resources/Result/6grains6x7x8_single_phase.material.yaml +++ b/python/tests/resources/Result/6grains6x7x8_single_phase.material.yaml @@ -12,12 +12,12 @@ phase: elastic: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: Hooke} plastic: N_sl: [12] - a_sl: 2.25 + a_sl: [2.25] atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl-sl: 75e6 + dot_gamma_0_sl: [0.001] + h_0_sl-sl: [75e6] h_sl-sl: [1, 1, 1.4, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 + n_sl: [20] output: [xi_sl] type: phenopowerlaw xi_0_sl: [31e6] From 9d3de05816cb0fda3889e55849fae801942d9cf5 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Sat, 5 Aug 2023 14:56:02 -0400 Subject: [PATCH 21/37] corrected test resource; more informative error --- PRIVATE | 2 +- src/YAML_types.f90 | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/PRIVATE b/PRIVATE index 671e09508..16585289f 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 671e09508137c7041f272009db654e46b9c0dcdc +Subproject commit 16585289fdbe5d835da61a8e7736e372024a06d8 diff --git a/src/YAML_types.f90 b/src/YAML_types.f90 index 6a56d1dbc..5d7411dd3 100644 --- a/src/YAML_types.f90 +++ b/src/YAML_types.f90 @@ -1166,7 +1166,10 @@ function tDict_get_as1dReal(self,k,defaultVal,requiredSize) result(nodeAs1dReal) end if if (present(requiredSize)) then - if (requiredSize /= size(nodeAs1dReal)) call IO_error(146,ext_msg=k) + if (requiredSize /= size(nodeAs1dReal)) & + call IO_error(146,ext_msg=k, & + label1='actual',ID1=size(nodeAs1dReal), & + label2='required',ID2=requiredSize) end if end function tDict_get_as1dReal @@ -1251,7 +1254,10 @@ function tDict_get_as1dInt(self,k,defaultVal,requiredSize) result(nodeAs1dInt) end if if (present(requiredSize)) then - if (requiredSize /= size(nodeAs1dInt)) call IO_error(146,ext_msg=k) + if (requiredSize /= size(nodeAs1dInt)) & + call IO_error(146,ext_msg=k, & + label1='actual',ID1=size(nodeAs1dInt), & + label2='required',ID2=requiredSize) end if end function tDict_get_as1dInt From 2e27236d352f4e3c12df00fcc52a410d98e3c32b Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Sat, 5 Aug 2023 22:30:17 -0400 Subject: [PATCH 22/37] use updated PRIVATE --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 16585289f..beee59326 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 16585289fdbe5d835da61a8e7736e372024a06d8 +Subproject commit beee5932664a055dbb8d9e8d67c437d2dd2f699e From aa2a20ba1d334a6fb92e43e7bb718d0635632ff6 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 7 Aug 2023 14:08:07 +0000 Subject: [PATCH 23/37] DAMASK_test output polish --- src/test/DAMASK_test.f90 | 60 ++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/test/DAMASK_test.f90 b/src/test/DAMASK_test.f90 index 0904b71a0..8c1d92c1a 100644 --- a/src/test/DAMASK_test.f90 +++ b/src/test/DAMASK_test.f90 @@ -2,6 +2,7 @@ program DAMASK_test use parallelization use HDF5_utilities + use IO use test_prec use test_crystal @@ -13,37 +14,42 @@ program DAMASK_test external :: quit + character(len=*), parameter :: & + tab = '19', & + ok = achar(27)//'[32mok'//achar(27)//'[0m' + call parallelization_init() - - print('(/,a)'), 'begin test prec' - call test_prec_run() - print('(a)'), 'begin test prec' - - print('(/,a)'), 'begin test tables' - call test_tables_run() - print('(a)'), 'end test tables' - - print('(/,a)'), 'begin test crystal' - call test_crystal_run() - print('(a)'), 'end test crystal' - - print('(/,a)'), 'begin test rotations' - call test_rotations_run() - print('(a)'), 'end test rotations' - - print('(/,a)'), 'begin test IO' - call test_IO_run() - print('(a)'), 'end test IO' - - print('(/,a)'), 'begin test misc' - call test_misc_run() - print('(a)'), 'end test misc' - call HDF5_utilities_init() - print('(/,a)'), 'begin test HDF5_utilities' + write(IO_STDOUT,fmt='(/,1x,a,/)') achar(27)//'[1m'//'testing'//achar(27)//'[0m' + + write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'prec','...' + call test_prec_run() + write(IO_STDOUT,fmt='(1x,a)') ok + + write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'tables','...' + call test_tables_run() + write(IO_STDOUT,fmt='(1x,a)') ok + + write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'crystal','...' + call test_crystal_run() + write(IO_STDOUT,fmt='(1x,a)') ok + + write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'rotations','...' + call test_rotations_run() + write(IO_STDOUT,fmt='(1x,a)') ok + + write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'IO','...' + call test_IO_run() + write(IO_STDOUT,fmt='(1x,a)') ok + + write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'misc','...' + call test_misc_run() + write(IO_STDOUT,fmt='(1x,a)') ok + + write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'HDF5_utilities','...' call test_HDF5_utilities_run() - print('(a)'), 'begin test HDF5_utilities' + write(IO_STDOUT,fmt='(1x,a)') ok call quit(0) From 05e7ca3ebe86f4b6683c8813abe15a43612f3a79 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 7 Aug 2023 18:14:58 +0200 Subject: [PATCH 24/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-730-g0e7b05799 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 942733d9c..2f545c7ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-727-g7d1adebde +3.0.0-alpha7-730-g0e7b05799 From 98fe38a505a2a9dc01976878fc19633e65f0ce13 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 8 Aug 2023 07:19:03 +0200 Subject: [PATCH 25/37] avoid issues with long lines line length <= 132 is already enforced in pre-receive hook --- cmake/Compiler-GNU.cmake | 4 ++-- cmake/Compiler-Intel.cmake | 2 +- cmake/Compiler-IntelLLVM.cmake | 2 +- src/CMakeLists.txt | 15 --------------- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/cmake/Compiler-GNU.cmake b/cmake/Compiler-GNU.cmake index 397d1277b..d024bdc0a 100644 --- a/cmake/Compiler-GNU.cmake +++ b/cmake/Compiler-GNU.cmake @@ -29,8 +29,8 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -cpp") set (COMPILE_FLAGS "${COMPILE_FLAGS} -fPIE") # position independent code -set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-132") -# restrict line length to the standard 132 characters (lattice.f90 require more characters) +set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-none") +# PETSc macros are long, line length is enforced in pre-receive hook set (COMPILE_FLAGS "${COMPILE_FLAGS} -fimplicit-none") # assume "implicit none" even if not present in source diff --git a/cmake/Compiler-Intel.cmake b/cmake/Compiler-Intel.cmake index d68eac50b..19e75a9fa 100644 --- a/cmake/Compiler-Intel.cmake +++ b/cmake/Compiler-Intel.cmake @@ -35,7 +35,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz") set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable") # disables warnings ... set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268") -# ... the text exceeds right hand column allowed on the line (we have only comments there) +# ... the text exceeds right hand column allowed on the line (enforced by pre-receive hook) set (COMPILE_FLAGS "${COMPILE_FLAGS},7624") # ... about deprecated forall (has nice syntax and most likely a performance advantage) diff --git a/cmake/Compiler-IntelLLVM.cmake b/cmake/Compiler-IntelLLVM.cmake index f2fb8bce9..86c9d380c 100644 --- a/cmake/Compiler-IntelLLVM.cmake +++ b/cmake/Compiler-IntelLLVM.cmake @@ -37,7 +37,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -no-ftz") set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable") # disables warnings ... set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268") -# ... the text exceeds right hand column allowed on the line (we have only comments there) +# ... the text exceeds right hand column allowed on the line (enforced by pre-receive hook) set (COMPILE_FLAGS "${COMPILE_FLAGS},7624") # ... about deprecated forall (has nice syntax and most likely a performance advantage) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc9217f31..4d0d8cef0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,10 +1,3 @@ -# special flags for some files -if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") - # long lines for interaction matrix - set_source_files_properties("crystal.f90" PROPERTIES COMPILE_FLAGS "-ffree-line-length-240") - set_source_files_properties("parallelization.f90" PROPERTIES COMPILE_FLAGS "-ffree-line-length-none") -endif() - file(GLOB damask-sources CONFIGURE_DEPENDS *.f90 *.c) if(PROJECT_NAME STREQUAL "damask-grid") @@ -18,14 +11,6 @@ elseif(PROJECT_NAME STREQUAL "damask-test") file(GLOB solver-sources CONFIGURE_DEPENDS test/*.f90) endif() -foreach(solver-source ${solver-sources}) - file(READ ${solver-source} content) - string(FIND "${content}" "CHKERR" found) - if((NOT ${found} EQUAL -1) AND (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")) - set_source_files_properties(${solver-source} PROPERTIES COMPILE_FLAGS "-ffree-line-length-none") - endif() -endforeach() - if(NOT CMAKE_BUILD_TYPE STREQUAL "SYNTAXONLY") add_executable(${executable-name} ${damask-sources} ${solver-sources}) From 26ad83a29b616c43d9f006089ea363e33d54e838 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 8 Aug 2023 09:22:07 +0200 Subject: [PATCH 26/37] unused --- src/grid/DAMASK_grid.f90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 3cf378d7c..cd6a60abe 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -111,8 +111,6 @@ program DAMASK_grid num_solver, & num_grid, & solver - type(tList), pointer :: & - load_steps character(len=:), allocatable :: & fileContent, fname From 651d0d989b735c4ebd0aed1c47d7b6e7296dc8de Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 10 Aug 2023 18:24:08 +0200 Subject: [PATCH 27/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-736-g91bb315d3 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2f545c7ca..7a95c7c04 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-730-g0e7b05799 +3.0.0-alpha7-736-g91bb315d3 From 82a55ee28d9fc4820177ff33d1821196f105ee7f Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Thu, 10 Aug 2023 12:52:27 -0400 Subject: [PATCH 28/37] report optional numerics config file --- src/CLI.f90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CLI.f90 b/src/CLI.f90 index ed7fbcd5e..905b1c9f5 100644 --- a/src/CLI.f90 +++ b/src/CLI.f90 @@ -210,6 +210,8 @@ subroutine CLI_init() print'(1x,a)', 'Geometry: '//IO_glueDiffering(CLI_geomFile,geomArg) print'(1x,a)', 'Load case: '//IO_glueDiffering(CLI_loadFile,loadArg) print'(1x,a)', 'Material config: '//IO_glueDiffering(CLI_materialFile,materialArg) + if (allocated(numericsArg)) & + print'(1x,a)', 'Numerics config: '//IO_glueDiffering(CLI_numericsFile,numericsArg) print'(1x,a)', 'Solver job name: '//getSolverJobname() if (CLI_restartInc > 0) & print'(1x,a,i6.6)', 'Restart from increment: ', CLI_restartInc From fe2cf94d704c4ee72602eee3f0f31b0eb1c4b187 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 10 Aug 2023 23:06:31 +0200 Subject: [PATCH 29/37] use central functionality --- src/CLI.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CLI.f90 b/src/CLI.f90 index ed7fbcd5e..a3503bd43 100644 --- a/src/CLI.f90 +++ b/src/CLI.f90 @@ -178,7 +178,7 @@ subroutine CLI_init() case ('-r', '--rs', '--restart') if (.not. hasArg) call IO_error(610,ext_msg='--jobname') arg = getArg(i+1) - read(arg,*,iostat=stat) CLI_restartInc + CLI_restartInc = IO_strAsInt(arg) if (CLI_restartInc < 0 .or. stat /= 0) call IO_error(611,ext_msg=arg) end select end do From 7d08286192d2fb4297aa312be53bf4773f172125 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 10 Aug 2023 23:08:58 +0200 Subject: [PATCH 30/37] clearer error message --- src/HDF5_utilities.f90 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HDF5_utilities.f90 b/src/HDF5_utilities.f90 index b87dbad3d..77b87c7ed 100644 --- a/src/HDF5_utilities.f90 +++ b/src/HDF5_utilities.f90 @@ -6,6 +6,7 @@ !> @author Philip Eisenlohr, Michigan State University !-------------------------------------------------------------------------------------------------- module HDF5_utilities + use IO use HDF5 #ifdef PETSC #include @@ -190,6 +191,7 @@ integer(HID_T) function HDF5_openFile(fileName,mode,parallel) character :: m integer(HID_T) :: plist_id integer :: hdferr + logical :: exist m = misc_optional(mode,'r') @@ -214,6 +216,8 @@ integer(HID_T) function HDF5_openFile(fileName,mode,parallel) call H5Fopen_f(fileName,H5F_ACC_RDWR_F,HDF5_openFile,hdferr,access_prp = plist_id) call HDF5_chkerr(hdferr) elseif (m == 'r') then + inquire(file=fileName,exist=exist) + if (.not. exist) call IO_error(100,trim(fileName)) call H5Fopen_f(fileName,H5F_ACC_RDONLY_F,HDF5_openFile,hdferr,access_prp = plist_id) call HDF5_chkerr(hdferr) else From 5cff94c3705d6ec512435195eb1c83d2cab76e76 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 11 Aug 2023 00:54:06 +0200 Subject: [PATCH 31/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-739-g81066f22c --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7a95c7c04..112833618 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-736-g91bb315d3 +3.0.0-alpha7-739-g81066f22c From a1eb7829ee13478873604efd69fc27dc48cb4519 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 11 Aug 2023 08:01:55 +0000 Subject: [PATCH 32/37] Math improvements --- src/math.f90 | 28 +++++++++---------- src/test/DAMASK_test.f90 | 59 ++++++++++++++++++++++------------------ src/test/test_math.f90 | 17 ++++++++++++ 3 files changed, 63 insertions(+), 41 deletions(-) create mode 100644 src/test/test_math.f90 diff --git a/src/math.f90 b/src/math.f90 index 4a1ffb707..4122f5170 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -27,8 +27,10 @@ module math #if __INTEL_COMPILER >= 1900 ! do not make use of associated entities available to other modules private :: & + misc, & IO, & - config + config, & + parallelization #endif real(pREAL), parameter :: & @@ -38,11 +40,11 @@ module math INRAD = TAU/360.0_pREAL !< conversion from degree to radian real(pREAL), dimension(3,3), parameter :: & - math_I3 = reshape([& - 1.0_pREAL,0.0_pREAL,0.0_pREAL, & - 0.0_pREAL,1.0_pREAL,0.0_pREAL, & - 0.0_pREAL,0.0_pREAL,1.0_pREAL & - ],shape(math_I3)) !< 3x3 Identity + math_I3 = real(reshape([& + 1, 0, 0, & + 0, 1, 0, & + 0, 0, 1 & + ],shape(math_I3)),pREAL) !< 3x3 Identity real(pREAL), dimension(*), parameter, private :: & NRMMANDEL = [1.0_pREAL, 1.0_pREAL,1.0_pREAL, sqrt(2.0_pREAL), sqrt(2.0_pREAL), sqrt(2.0_pREAL)] !< forward weighting for Mandel notation @@ -83,9 +85,6 @@ module math 3,3 & ],shape(MAPPLAIN)) !< arrangement in Plain notation -!--------------------------------------------------------------------------------------------------- - private :: & - selfTest contains @@ -109,20 +108,21 @@ subroutine math_init() allocate(seed(randSize)) if (num_generic%contains('random_seed')) then - seed = num_generic%get_as1dInt('random_seed',requiredSize=randSize) + seed = num_generic%get_as1dInt('random_seed',requiredSize=randSize) & + + worldrank*42_MPI_INTEGER_KIND else call random_seed() call random_seed(get = seed) end if - call random_seed(put = seed + worldrank*42_MPI_INTEGER_KIND) + call random_seed(put = seed) call random_number(randTest) print'(/,a,i2)', ' size of random seed: ', randSize print*, 'value of random seed: ', seed print'( a,4(/,26x,f17.14))', ' start of random sequence: ', randTest - call selfTest() + call math_selfTest() end subroutine math_init @@ -1275,7 +1275,7 @@ end function math_clip !-------------------------------------------------------------------------------------------------- !> @brief Check correctness of some math functions. !-------------------------------------------------------------------------------------------------- -subroutine selfTest() +subroutine math_selfTest() integer, dimension(2,4) :: & sort_in_ = reshape([+1,+5, +5,+6, -1,-1, +3,-2],[2,4]) @@ -1447,6 +1447,6 @@ subroutine selfTest() error stop 'math_normal(sigma)' end block normal_distribution -end subroutine selfTest +end subroutine math_selfTest end module math diff --git a/src/test/DAMASK_test.f90 b/src/test/DAMASK_test.f90 index 8c1d92c1a..ae7a714b8 100644 --- a/src/test/DAMASK_test.f90 +++ b/src/test/DAMASK_test.f90 @@ -5,51 +5,56 @@ program DAMASK_test use IO use test_prec - use test_crystal - use test_IO - use test_rotations use test_misc + use test_math use test_tables + use test_crystal + use test_rotations + use test_IO use test_HDF5_utilities external :: quit character(len=*), parameter :: & - tab = '19', & - ok = achar(27)//'[32mok'//achar(27)//'[0m' + ok = achar(27)//'[32mok'//achar(27)//'[0m', & + fmt = '(3x,a,T19,a,1x)' call parallelization_init() call HDF5_utilities_init() write(IO_STDOUT,fmt='(/,1x,a,/)') achar(27)//'[1m'//'testing'//achar(27)//'[0m' - write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'prec','...' + write(IO_STDOUT,fmt=fmt, advance='no') 'prec','...' call test_prec_run() - write(IO_STDOUT,fmt='(1x,a)') ok + write(IO_STDOUT,fmt='(a)') ok - write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'tables','...' - call test_tables_run() - write(IO_STDOUT,fmt='(1x,a)') ok - - write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'crystal','...' - call test_crystal_run() - write(IO_STDOUT,fmt='(1x,a)') ok - - write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'rotations','...' - call test_rotations_run() - write(IO_STDOUT,fmt='(1x,a)') ok - - write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'IO','...' - call test_IO_run() - write(IO_STDOUT,fmt='(1x,a)') ok - - write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'misc','...' + write(IO_STDOUT,fmt=fmt, advance='no') 'misc','...' call test_misc_run() - write(IO_STDOUT,fmt='(1x,a)') ok + write(IO_STDOUT,fmt='(a)') ok - write(IO_STDOUT,fmt='(3x,a,T'//tab//',a)', advance='no') 'HDF5_utilities','...' + write(IO_STDOUT,fmt=fmt, advance='no') 'math','...' + call test_math_run() + write(IO_STDOUT,fmt='(a)') ok + + write(IO_STDOUT,fmt=fmt, advance='no') 'tables','...' + call test_tables_run() + write(IO_STDOUT,fmt='(a)') ok + + write(IO_STDOUT,fmt=fmt, advance='no') 'crystal','...' + call test_crystal_run() + write(IO_STDOUT,fmt='(a)') ok + + write(IO_STDOUT,fmt=fmt, advance='no') 'rotations','...' + call test_rotations_run() + write(IO_STDOUT,fmt='(a)') ok + + write(IO_STDOUT,fmt=fmt, advance='no') 'IO','...' + call test_IO_run() + write(IO_STDOUT,fmt='(a)') ok + + write(IO_STDOUT,fmt=fmt, advance='no') 'HDF5_utilities','...' call test_HDF5_utilities_run() - write(IO_STDOUT,fmt='(1x,a)') ok + write(IO_STDOUT,fmt='(a)') ok call quit(0) diff --git a/src/test/test_math.f90 b/src/test/test_math.f90 new file mode 100644 index 000000000..e5c013fba --- /dev/null +++ b/src/test/test_math.f90 @@ -0,0 +1,17 @@ +module test_math + use math + + implicit none(type,external) + + private + public :: test_math_run + + contains + +subroutine test_math_run() + + call math_selfTest() + +end subroutine test_math_run + +end module test_math From 0bd826bf4db970b0473e12284dde32c0a7975029 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 11 Aug 2023 12:09:01 +0200 Subject: [PATCH 33/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-742-ge8534d6ff --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 112833618..31ab75d8a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-739-g81066f22c +3.0.0-alpha7-742-ge8534d6ff From e161ef40b3db2b74936ff8870dbbe4000e705c3e Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Fri, 11 Aug 2023 10:36:03 -0400 Subject: [PATCH 34/37] per-family parameters for kinehardening --- PRIVATE | 2 +- .../plastic/kinehardening_317L.yaml | 4 +-- ...phase_mechanical_plastic_kinehardening.f90 | 35 ++++++++++--------- ...phase_mechanical_plastic_phenopowerlaw.f90 | 2 +- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/PRIVATE b/PRIVATE index beee59326..ac2758719 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit beee5932664a055dbb8d9e8d67c437d2dd2f699e +Subproject commit ac27587199340ac1ec7a5c4e1ccd92dbf1299742 diff --git a/examples/config/phase/mechanical/plastic/kinehardening_317L.yaml b/examples/config/phase/mechanical/plastic/kinehardening_317L.yaml index 423b504b4..a3a7dfe30 100644 --- a/examples/config/phase/mechanical/plastic/kinehardening_317L.yaml +++ b/examples/config/phase/mechanical/plastic/kinehardening_317L.yaml @@ -18,6 +18,6 @@ chi_inf: [0.027e+9] # τ_1,bs h_0_chi: [55e+9] # θ_0,bs h_inf_chi: [1.3e+9] # θ_1,bs -n: 20 # not mentioned in the reference -dot_gamma_0: 1e-4 # not mentioned in the reference +n: [20] # not mentioned in the reference +dot_gamma_0: [1e-4] # not mentioned in the reference h_sl-sl: [1, 1, 1, 1, 1, 1, 1] diff --git a/src/phase_mechanical_plastic_kinehardening.f90 b/src/phase_mechanical_plastic_kinehardening.f90 index 153dc03d5..2ce34cd95 100644 --- a/src/phase_mechanical_plastic_kinehardening.f90 +++ b/src/phase_mechanical_plastic_kinehardening.f90 @@ -8,10 +8,9 @@ submodule(phase:plastic) kinehardening type :: tParameters - real(pREAL) :: & - n = 1.0_pREAL, & !< stress exponent for slip - dot_gamma_0 = 1.0_pREAL !< reference shear strain rate for slip real(pREAL), allocatable, dimension(:) :: & + dot_gamma_0, & !< reference shear strain rate for slip + n, & !< stress exponent for slip h_0_xi, & !< initial hardening rate of forest stress per slip family !! θ_0,for h_0_chi, & !< initial hardening rate of back stress per slip family @@ -77,6 +76,7 @@ module function plastic_kinehardening_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & ph, o, & + N_fam, & Nmembers, & sizeState, sizeDeltaState, sizeDotState, & startIndex, endIndex @@ -139,6 +139,7 @@ module function plastic_kinehardening_init() result(myPlasticity) N_sl = pl%get_as1dInt('N_sl',defaultVal=emptyIntArray) prm%sum_N_sl = sum(abs(N_sl)) slipActive: if (prm%sum_N_sl > 0) then + N_fam = size(N_sl) prm%systems_sl = crystal_labels_slip(N_sl,phase_lattice(ph)) prm%P = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph)) @@ -152,32 +153,32 @@ module function plastic_kinehardening_init() result(myPlasticity) prm%P_nS_neg = prm%P end if - prm%dot_gamma_0 = pl%get_asReal('dot_gamma_0') - prm%n = pl%get_asReal('n') - prm%h_sl_sl = crystal_interaction_SlipBySlip(N_sl,pl%get_as1dReal('h_sl-sl'), & phase_lattice(ph)) - xi_0 = math_expand(pl%get_as1dReal('xi_0', requiredSize=size(N_sl)),N_sl) - prm%xi_inf = math_expand(pl%get_as1dReal('xi_inf', requiredSize=size(N_sl)),N_sl) - prm%chi_inf = math_expand(pl%get_as1dReal('chi_inf', requiredSize=size(N_sl)),N_sl) - prm%h_0_xi = math_expand(pl%get_as1dReal('h_0_xi', requiredSize=size(N_sl)),N_sl) - prm%h_0_chi = math_expand(pl%get_as1dReal('h_0_chi', requiredSize=size(N_sl)),N_sl) - prm%h_inf_xi = math_expand(pl%get_as1dReal('h_inf_xi', requiredSize=size(N_sl)),N_sl) - prm%h_inf_chi = math_expand(pl%get_as1dReal('h_inf_chi', requiredSize=size(N_sl)),N_sl) - + xi_0 = math_expand(pl%get_as1dReal('xi_0', requiredSize=N_fam),N_sl) + prm%dot_gamma_0 = math_expand(pl%get_as1dReal('dot_gamma_0', requiredSize=N_fam),N_sl) + prm%n = math_expand(pl%get_as1dReal('n', requiredSize=N_fam),N_sl) + prm%xi_inf = math_expand(pl%get_as1dReal('xi_inf', requiredSize=N_fam),N_sl) + prm%chi_inf = math_expand(pl%get_as1dReal('chi_inf', requiredSize=N_fam),N_sl) + prm%h_0_xi = math_expand(pl%get_as1dReal('h_0_xi', requiredSize=N_fam),N_sl) + prm%h_0_chi = math_expand(pl%get_as1dReal('h_0_chi', requiredSize=N_fam),N_sl) + prm%h_inf_xi = math_expand(pl%get_as1dReal('h_inf_xi', requiredSize=N_fam),N_sl) + prm%h_inf_chi = math_expand(pl%get_as1dReal('h_inf_chi', requiredSize=N_fam),N_sl) !-------------------------------------------------------------------------------------------------- ! sanity checks - if ( prm%dot_gamma_0 <= 0.0_pREAL) extmsg = trim(extmsg)//' dot_gamma_0' - if ( prm%n <= 0.0_pREAL) extmsg = trim(extmsg)//' n' + if (any(prm%dot_gamma_0 <= 0.0_pREAL)) extmsg = trim(extmsg)//' dot_gamma_0' + if (any(prm%n <= 0.0_pREAL)) extmsg = trim(extmsg)//' n' if (any(xi_0 <= 0.0_pREAL)) extmsg = trim(extmsg)//' xi_0' if (any(prm%xi_inf <= 0.0_pREAL)) extmsg = trim(extmsg)//' xi_inf' if (any(prm%chi_inf <= 0.0_pREAL)) extmsg = trim(extmsg)//' chi_inf' else slipActive xi_0 = emptyRealArray - allocate(prm%xi_inf, & + allocate(prm%dot_gamma_0, & + prm%n, & + prm%xi_inf, & prm%chi_inf, & prm%h_0_xi, & prm%h_0_chi, & diff --git a/src/phase_mechanical_plastic_phenopowerlaw.f90 b/src/phase_mechanical_plastic_phenopowerlaw.f90 index 95a16e450..8a8018892 100644 --- a/src/phase_mechanical_plastic_phenopowerlaw.f90 +++ b/src/phase_mechanical_plastic_phenopowerlaw.f90 @@ -173,8 +173,8 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) ! sanity checks if (any(prm%dot_gamma_0_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' dot_gamma_0_sl' - if (any(prm%a_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' a_sl' if (any(prm%n_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' n_sl' + if (any(prm%a_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' a_sl' if (any(xi_0_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' xi_0_sl' if (any(prm%xi_inf_sl <= 0.0_pREAL)) extmsg = trim(extmsg)//' xi_inf_sl' From fc3c4c0be7eaed566a9a49e079958c4460096f00 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 11 Aug 2023 17:48:55 +0200 Subject: [PATCH 35/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-746-gc93309ed0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 31ab75d8a..a04647d4c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-742-ge8534d6ff +3.0.0-alpha7-746-gc93309ed0 From 214376c10200d7be3709397961405aab1e9b2adb Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 14 Aug 2023 13:49:15 +0200 Subject: [PATCH 36/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-749-g92a500797 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a04647d4c..3052186b3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-746-gc93309ed0 +3.0.0-alpha7-749-g92a500797 From 71b5b954508a5be053a98aef27ceca5647900702 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 14 Aug 2023 21:18:44 +0200 Subject: [PATCH 37/37] [skip ci] updated version information after successful test of v3.0.0-alpha7-753-gaa28fe677 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3052186b3..2b4efa3f2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0-alpha7-749-g92a500797 +3.0.0-alpha7-753-gaa28fe677