From bedc17b1c67c99ad33de2367e65188dcabf0ad84 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 12 Jun 2018 14:33:08 -0400 Subject: [PATCH 1/9] nicer formatting --- src/plastic_kinematichardening.f90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plastic_kinematichardening.f90 b/src/plastic_kinematichardening.f90 index c33a14db6..434495043 100644 --- a/src/plastic_kinematichardening.f90 +++ b/src/plastic_kinematichardening.f90 @@ -360,11 +360,11 @@ subroutine plastic_kinehardening_init(fileUnit) !-------------------------------------------------------------------------------------------------- ! sanity checks - if (any(plastic_kinehardening_Nslip(1:nSlipFamilies,instance) > 0_pInt & - .and. param(instance)%crss0(1:nSlipFamilies) < 0.0_pReal)) extmsg = trim(extmsg)//' crss0' - if (any(plastic_kinehardening_Nslip(1:nSlipFamilies,instance) > 0_pInt & - .and. param(instance)%tau1(1:nSlipFamilies) <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1' - if (any(plastic_kinehardening_Nslip(1:nSlipFamilies,instance) > 0_pInt & + if (any(plastic_kinehardening_Nslip (1:nSlipFamilies,instance) > 0_pInt & + .and. param(instance)%crss0 (1:nSlipFamilies) < 0.0_pReal)) extmsg = trim(extmsg)//' crss0' + if (any(plastic_kinehardening_Nslip (1:nSlipFamilies,instance) > 0_pInt & + .and. param(instance)%tau1 (1:nSlipFamilies) <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1' + if (any(plastic_kinehardening_Nslip (1:nSlipFamilies,instance) > 0_pInt & .and. param(instance)%tau1_b(1:nSlipFamilies) < 0.0_pReal)) extmsg = trim(extmsg)//' tau1_b' if (param(instance)%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0' if (param(instance)%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip' From f225591ccc1c624c800c8bdb230c26056a869d8f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 19 Jun 2018 12:54:43 +0200 Subject: [PATCH 2/9] transition compatibility not needed anymore, more verbose --- env/DAMASK.sh | 8 ++------ env/DAMASK.zsh | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/env/DAMASK.sh b/env/DAMASK.sh index 021603b57..509f5f1b7 100644 --- a/env/DAMASK.sh +++ b/env/DAMASK.sh @@ -2,7 +2,7 @@ # usage: source DAMASK.sh function canonicalPath { - python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $1 + python -c "import os,sys; print(os.path.normpath(os.path.realpath(os.path.expanduser(sys.argv[1]))))" $1 } function blink { @@ -17,12 +17,8 @@ else DAMASK_ROOT=${STAT##* } fi -# transition compatibility (renamed $DAMASK_ROOT/DAMASK_env.sh to $DAMASK_ROOT/env/DAMASK.sh) -if [ ${BASH_SOURCE##*/} == "DAMASK.sh" ]; then - DAMASK_ROOT="$DAMASK_ROOT/.." -fi +DAMASK_ROOT=$(canonicalPath "$DAMASK_ROOT/../") -DAMASK_ROOT=$(canonicalPath $DAMASK_ROOT) # shorthand command to change to DAMASK_ROOT directory eval "function DAMASK_root() { cd $DAMASK_ROOT; }" diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index 2d2bc9aa0..4638ae734 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -2,15 +2,14 @@ # usage: source DAMASK.zsh function canonicalPath { - python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $1 + python -c "import os,sys; print(os.path.normpath(os.path.realpath(os.path.expanduser(sys.argv[1]))))" $1 } -# transition compatibility (renamed $DAMASK_ROOT/DAMASK_env.zsh to $DAMASK_ROOT/env/DAMASK.zsh) -if [ ${0:t:r} = 'DAMASK' ]; then - DAMASK_ROOT=${0:a:h}'/..' -else - DAMASK_ROOT=${0:a:h} -fi +function blink { + echo -e "\033[2;5m$1\033[0m" +} + +DAMASK_ROOT=$(canonicalPath "${0:a:h}'/..") # shorthand command to change to DAMASK_ROOT directory eval "function DAMASK_root() { cd $DAMASK_ROOT; }" @@ -26,10 +25,10 @@ unset -f set [ "x$DAMASK_BIN != x" ] && PATH=$DAMASK_BIN:$PATH SOLVER=$(type -p DAMASK_spectral || true 2>/dev/null) -[ "x$SOLVER == x" ] && SOLVER='Not found!' +[ "x$SOLVER == x" ] && SOLVER=$(blink 'Not found!') PROCESSING=$(type -p postResults || true 2>/dev/null) -[ "x$PROCESSING == x" ] && PROCESSING='Not found!' +[ "x$PROCESSING == x" ] && PROCESSING=$(blink 'Not found!') [ "x$DAMASK_NUM_THREADS == x" ] && DAMASK_NUM_THREADS=1 @@ -52,16 +51,18 @@ if [ ! -z "$PS1" ]; then echo "DAMASK $DAMASK_ROOT" echo "Spectral Solver $SOLVER" echo "Post Processing $PROCESSING" - echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS" if [ "x$PETSC_DIR" != "x" ]; then - echo "PETSc location $PETSC_DIR" + echo -n "PETSc location " + [ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR [[ $(canonicalPath "$PETSC_DIR") == $PETSC_DIR ]] \ || echo " ~~> "$(canonicalPath "$PETSC_DIR") fi [[ "x$PETSC_ARCH" == "x" ]] \ || echo "PETSc architecture $PETSC_ARCH" - echo "MSC.Marc/Mentat $MSC_ROOT" + echo -n "MSC.Marc/Mentat " + [ -d $MSC_ROOT ] && echo $MSC_ROOT || blink $MSC_ROOT echo + echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS" echo -n "heap size " [[ "$(ulimit -d)" == "unlimited" ]] \ && echo "unlimited" \ From 28b82fe511a0c9a21ca2ee9a2b42066725386d3b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 21 Jun 2018 21:50:11 +0200 Subject: [PATCH 3/9] bugfixes type on zsh gives information in prefix, = comparison operator should not be in in string --- env/DAMASK.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index 4638ae734..3ceeb116a 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -24,13 +24,13 @@ unset -f set # add DAMASK_BIN if present [ "x$DAMASK_BIN != x" ] && PATH=$DAMASK_BIN:$PATH -SOLVER=$(type -p DAMASK_spectral || true 2>/dev/null) -[ "x$SOLVER == x" ] && SOLVER=$(blink 'Not found!') +SOLVER=$(which DAMASK_spectral || true 2>/dev/null) +[ "x$SOLVER" = "x" ] && SOLVER=$(blink 'Not found!') -PROCESSING=$(type -p postResults || true 2>/dev/null) -[ "x$PROCESSING == x" ] && PROCESSING=$(blink 'Not found!') +PROCESSING=$(which postResults || true 2>/dev/null) +[ "x$PROCESSING" = "x" ] && PROCESSING=$(blink 'Not found!') -[ "x$DAMASK_NUM_THREADS == x" ] && DAMASK_NUM_THREADS=1 +[ "x$DAMASK_NUM_THREADS" = "x" ] && DAMASK_NUM_THREADS=1 # currently, there is no information that unlimited causes problems # still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it From 910aad1094e23ceba41bc6dbddfd456479ac83ea Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 21 Jun 2018 21:54:07 +0200 Subject: [PATCH 4/9] Marc 2014 requires old compiler not supported any more --- .gitlab-ci.yml | 20 -------------------- src/DAMASK_marc2014.2.f90 | 1 - src/DAMASK_marc2014.f90 | 1 - 3 files changed, 22 deletions(-) delete mode 120000 src/DAMASK_marc2014.2.f90 delete mode 120000 src/DAMASK_marc2014.f90 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 169deca26..9a80c5e34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -331,26 +331,6 @@ TextureComponents: - master - release -################################################################################################### -Marc_compileIfort2014: - stage: compileMarc2014 - script: - - module load $IntelCompiler16_0 $MSC2014 - - Marc_compileIfort/test.py -m 2014 - except: - - master - - release - -################################################################################################### -Marc_compileIfort2014.2: - stage: compileMarc2014.2 - script: - - module load $IntelCompiler16_0 $MSC2014_2 - - Marc_compileIfort/test.py -m 2014.2 - except: - - master - - release - ################################################################################################### Marc_compileIfort2015: stage: compileMarc2015 diff --git a/src/DAMASK_marc2014.2.f90 b/src/DAMASK_marc2014.2.f90 deleted file mode 120000 index 2c5bec706..000000000 --- a/src/DAMASK_marc2014.2.f90 +++ /dev/null @@ -1 +0,0 @@ -DAMASK_marc.f90 \ No newline at end of file diff --git a/src/DAMASK_marc2014.f90 b/src/DAMASK_marc2014.f90 deleted file mode 120000 index 2c5bec706..000000000 --- a/src/DAMASK_marc2014.f90 +++ /dev/null @@ -1 +0,0 @@ -DAMASK_marc.f90 \ No newline at end of file From 2bee95bfee00d48615462b2aa2d76954a2055adf Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 27 Jun 2018 18:04:06 +0200 Subject: [PATCH 5/9] argument for checking expected shape in the future --- src/config.f90 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/config.f90 b/src/config.f90 index d87bb754d..9d2ddde4c 100644 --- a/src/config.f90 +++ b/src/config.f90 @@ -531,7 +531,7 @@ end function getString !> @details for cumulative keys, "()", values from all occurrences are return. Otherwise only all !! values from the last occurrence. If key is not found exits with error unless default is given. !-------------------------------------------------------------------------------------------------- -function getFloats(this,key,defaultVal) +function getFloats(this,key,defaultVal,requiredShape) use IO, only: & IO_error, & IO_stringValue, & @@ -542,6 +542,7 @@ function getFloats(this,key,defaultVal) class(tPartitionedStringList), intent(in) :: this character(len=*), intent(in) :: key real(pReal), dimension(:), intent(in), optional :: defaultVal + integer(pInt), dimension(:), intent(in), optional :: requiredShape type(tPartitionedStringList), pointer :: item integer(pInt) :: i logical :: found, & @@ -577,7 +578,7 @@ end function getFloats !> @details for cumulative keys, "()", values from all occurrences are return. Otherwise only all !! values from the last occurrence. If key is not found exits with error unless default is given. !-------------------------------------------------------------------------------------------------- -function getInts(this,key,defaultVal) +function getInts(this,key,defaultVal,requiredShape) use IO, only: & IO_error, & IO_stringValue, & @@ -587,7 +588,8 @@ function getInts(this,key,defaultVal) integer(pInt), dimension(:), allocatable :: getInts class(tPartitionedStringList), intent(in) :: this character(len=*), intent(in) :: key - integer(pInt), dimension(:), intent(in), optional :: defaultVal + integer(pInt), dimension(:), intent(in), optional :: defaultVal, & + requiredShape type(tPartitionedStringList), pointer :: item integer(pInt) :: i logical :: found, & @@ -624,7 +626,7 @@ end function getInts !! values from the last occurrence. If key is not found exits with error unless default is given. !! If raw is true, the the complete string is returned, otherwise the individual chunks are returned !-------------------------------------------------------------------------------------------------- -function getStrings(this,key,defaultVal,raw) +function getStrings(this,key,defaultVal,requiredShape,raw) use IO, only: & IO_error, & IO_StringValue @@ -634,6 +636,7 @@ function getStrings(this,key,defaultVal,raw) class(tPartitionedStringList), intent(in) :: this character(len=*), intent(in) :: key character(len=65536),dimension(:), intent(in), optional :: defaultVal + integer(pInt), dimension(:), intent(in), optional :: requiredShape logical, intent(in), optional :: raw type(tPartitionedStringList), pointer :: item character(len=65536) :: str From 7e0aca6a459ff5acb6c380479f50fb0c9bb0ea17 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 27 Jun 2018 21:42:12 +0200 Subject: [PATCH 6/9] Don't know which compiler is needed for Marc 2015 --- .gitlab-ci.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a80c5e34..5907ee672 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,8 +7,6 @@ stages: - compileSpectralGNU - prepareSpectral - spectral - - compileMarc2014 - - compileMarc2014.2 - compileMarc2015 - compileMarc2016 - marc @@ -331,15 +329,6 @@ TextureComponents: - master - release -################################################################################################### -Marc_compileIfort2015: - stage: compileMarc2015 - script: - - module load $IntelCompiler16_0 $MSC2015 - - Marc_compileIfort/test.py -m 2015 - except: - - master - - release ################################################################################################### Marc_compileIfort2016: From 1ae9f79ab411d53cbc4035c0b675a33ff8af7828 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 27 Jun 2018 21:45:29 +0200 Subject: [PATCH 7/9] forgot to remove stage --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5907ee672..d0c1f7100 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,6 @@ stages: - compileSpectralGNU - prepareSpectral - spectral - - compileMarc2015 - compileMarc2016 - marc - compileAbaqus2016 From 9101af84c66944d001d4b8733f24da4854c79291 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 28 Jun 2018 06:47:22 +0200 Subject: [PATCH 8/9] only testing Marc 2017 Using Intel 17 Compiler even though recommended Compiler is 16.0.2 We only have 16.0.0 and that gives random segmenation faults --- .gitlab-ci.yml | 25 +++++++++++-------------- CONFIG | 2 +- lib/damask/solver/marc.py | 4 +--- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0c1f7100..829020e0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: - compileSpectralGNU - prepareSpectral - spectral - - compileMarc2016 + - compileMarc2017 - marc - compileAbaqus2016 - compileAbaqus2017 @@ -69,13 +69,10 @@ variables: # ++++++++++++ FEM +++++++++++++++++++++++++++++++++++++++++++++++++++ Abaqus2016: "FEM/Abaqus/2016" Abaqus2017: "FEM/Abaqus/2017" - MSC2014: "FEM/MSC/2014" - MSC2014_2: "FEM/MSC/2014.2" - MSC2015: "FEM/MSC/2015" - MSC2016: "FEM/MSC/2016" + MSC2017: "FEM/MSC/2017" # ------------ Defaults ---------------------------------------------- Abaqus: "$Abaqus2017" - MSC: "$MSC2016" + MSC: "$MSC2017" # ++++++++++++ Documentation +++++++++++++++++++++++++++++++++++++++++ Doxygen1_8_13: "Documentation/Doxygen/1.8.13" # ------------ Defaults ---------------------------------------------- @@ -330,11 +327,11 @@ TextureComponents: ################################################################################################### -Marc_compileIfort2016: - stage: compileMarc2016 +Marc_compileIfort2017: + stage: compileMarc2017 script: - - module load $IntelCompiler16_0 $MSC2016 - - Marc_compileIfort/test.py -m 2016 + - module load $IntelCompiler17_0 $MSC2017 + - Marc_compileIfort/test.py -m 2017 except: - master - release @@ -343,7 +340,7 @@ Marc_compileIfort2016: Hex_elastic: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - Hex_elastic/test.py except: - master @@ -352,7 +349,7 @@ Hex_elastic: CubicFCC_elastic: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - CubicFCC_elastic/test.py except: - master @@ -361,7 +358,7 @@ CubicFCC_elastic: CubicBCC_elastic: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - CubicBCC_elastic/test.py except: - master @@ -370,7 +367,7 @@ CubicBCC_elastic: J2_plasticBehavior: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - J2_plasticBehavior/test.py except: - master diff --git a/CONFIG b/CONFIG index db75fa811..459216375 100644 --- a/CONFIG +++ b/CONFIG @@ -6,6 +6,6 @@ set DAMASK_BIN = ${DAMASK_ROOT}/bin set DAMASK_NUM_THREADS = 4 set MSC_ROOT = /opt/msc -set MARC_VERSION = 2016 +set MARC_VERSION = 2017 set ABAQUS_VERSION = 2017 diff --git a/lib/damask/solver/marc.py b/lib/damask/solver/marc.py index 16f3c8451..59feb3325 100644 --- a/lib/damask/solver/marc.py +++ b/lib/damask/solver/marc.py @@ -9,10 +9,8 @@ class Marc(Solver): def __init__(self): self.solver = 'Marc' self.releases = { \ + '2017': ['linux64',''], '2016': ['linux64',''], - '2015': ['linux64',''], - '2014.2':['linux64',''], - '2014' :['linux64',''], } From b3862ef800ba300bf872f817118330ce9092d51e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 28 Jun 2018 07:22:32 +0200 Subject: [PATCH 9/9] enough to support 3 versions (2018 should be out already/soon) --- src/DAMASK_marc2015.f90 | 1 - 1 file changed, 1 deletion(-) delete mode 120000 src/DAMASK_marc2015.f90 diff --git a/src/DAMASK_marc2015.f90 b/src/DAMASK_marc2015.f90 deleted file mode 120000 index 2c5bec706..000000000 --- a/src/DAMASK_marc2015.f90 +++ /dev/null @@ -1 +0,0 @@ -DAMASK_marc.f90 \ No newline at end of file