Merge branch 'development' into IntrinsicNaN

This commit is contained in:
Martin Diehl 2017-05-17 07:36:47 +02:00
commit be62abc2bc
20 changed files with 392 additions and 368 deletions

View File

@ -14,14 +14,17 @@ stages:
- compileAbaqus2016 - compileAbaqus2016
- compileAbaqus2017 - compileAbaqus2017
- example - example
- performance
- createDocumentation - createDocumentation
- saveDocumentation
- updateMaster - updateMaster
- clean - clean
- releaseLock
################################################################################################### ###################################################################################################
before_script: before_script:
- if [ $(awk "/$CI_PIPELINE_ID/{print NR}" $HOME/GitLabCI.queue)x == 'x' ]; then echo $CI_PIPELINE_ID >> $HOME/GitLabCI.queue; fi - if [ $(awk "/$CI_PIPELINE_ID/{print NR}" $TESTROOT/GitLabCI.queue)x == 'x' ]; then echo $CI_PIPELINE_ID >> $TESTROOT/GitLabCI.queue; fi
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $HOME/GitLabCI.queue) -ne 1 ];do sleep 5m; done - while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $TESTROOT/GitLabCI.queue) -ne 1 ];do sleep 5m; done
- source $DAMASKROOT/DAMASK_env.sh - source $DAMASKROOT/DAMASK_env.sh
- cd $DAMASKROOT/PRIVATE/testing - cd $DAMASKROOT/PRIVATE/testing
@ -35,7 +38,7 @@ variables:
#================================================================================================ #================================================================================================
# Shortcut names # Shortcut names
#================================================================================================ #================================================================================================
DAMASKROOT: "$HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK" DAMASKROOT: "$TESTROOT/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
#================================================================================================ #================================================================================================
# Names of module files to load # Names of module files to load
@ -81,8 +84,8 @@ variables:
checkout: checkout:
stage: prepareAll stage: prepareAll
before_script: before_script:
- echo $CI_PIPELINE_ID >> $HOME/GitLabCI.queue - echo $CI_PIPELINE_ID >> $TESTROOT/GitLabCI.queue
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $HOME/GitLabCI.queue) -ne 1 ];do sleep 5m; done - while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $TESTROOT/GitLabCI.queue) -ne 1 ];do sleep 5m; done
script: script:
- mkdir -p $DAMASKROOT - mkdir -p $DAMASKROOT
- cd $DAMASKROOT - cd $DAMASKROOT
@ -425,25 +428,21 @@ AbaqusExample:
only: only:
- development - development
################################################################################################## ###################################################################################################
mergeIntoMaster: SpectralRuntime:
stage: updateMaster stage: performance
script: script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- cd $DAMASKROOT - cd $DAMASKROOT
- export TESTEDREV=$(git describe) # might be detached from development branch - make clean spectral processing OPTIMIZATION=AGGRESSIVE
- echo $TESTEDREV > VERSION - cd $TESTROOT/performance # location of old results
- git commit VERSION -m "[skip ci] updated version information after successful test of $TESTEDREV" - git checkout . # undo any changes (i.e. run time data from non-development branch)
- export UPDATEDREV=$(git describe) # tested state + 1 commit - cd $DAMASKROOT/PRIVATE/testing
- git checkout master - SpectralAll_runtime/test.py -d $TESTROOT/performance
- git merge $UPDATEDREV -s recursive -X ours # conflicts occur only for inconsistent state except:
- git push origin master # master is now tested version and has updated VERSION file - master
- git checkout development - release
- git pull
- git merge master -s recursive -X ours -m "[skip ci] Merge branch 'master' into development" # only possible conflict is in VERSION file
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
only:
- development
################################################################################################### ###################################################################################################
AbaqusExp: AbaqusExp:
stage: createDocumentation stage: createDocumentation
@ -481,13 +480,59 @@ Spectral:
- master - master
- release - release
##################################################################################################
backupData:
stage: saveDocumentation
script:
- cd $TESTROOT/performance # location of new runtime results
- git commit -am"${CI_PIPELINE_ID}_${CI_COMMIT_SHA}"
- mkdir $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}
- cp $TESTROOT/performance/time.txt $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
- mv $TESTROOT/performance/time.png $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
- cp $TESTROOT/performance/memory.txt $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
- mv $TESTROOT/performance/memory.png $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
- mv $DAMASKROOT/PRIVATE/documenting/DAMASK_* $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
only:
- development
##################################################################################################
mergeIntoMaster:
stage: updateMaster
script:
- cd $DAMASKROOT
- export TESTEDREV=$(git describe) # might be detached from development branch
- echo $TESTEDREV > VERSION
- git commit VERSION -m "[skip ci] updated version information after successful test of $TESTEDREV"
- export UPDATEDREV=$(git describe) # tested state + 1 commit
- git checkout master
- git merge $UPDATEDREV -s recursive -X ours # conflicts occur only for inconsistent state
- git push origin master # master is now tested version and has updated VERSION file
- git checkout development
- git pull
- git merge master -s recursive -X ours -m "[skip ci] Merge branch 'master' into development" # only possible conflict is in VERSION file
- git push origin development # development is unchanged (as master is based on it) but has updated VERSION file
only:
- development
################################################################################################### ###################################################################################################
removeLock: removeData:
stage: clean stage: clean
before_script: before_script:
- echo 'Do nothing' - echo 'Do nothing'
when: always script:
script: sed -i "/$CI_PIPELINE_ID/d" $HOME/GitLabCI.queue - rm -rf $TESTROOT/GitLabCI_Pipeline_$CI_PIPELINE_ID
- sed -i "/$CI_PIPELINE_ID/d" $TESTROOT/GitLabCI.queue # in case pipeline was manually (web GUI) restarted and releaseLock was performed already
except:
- master
- release
###################################################################################################
removeLock:
stage: releaseLock
before_script:
- echo 'Do nothing'
when: always
script: sed -i "/$CI_PIPELINE_ID/d" $TESTROOT/GitLabCI.queue
except: except:
- master - master
- release - release

View File

@ -1,65 +0,0 @@
# sets up an environment for DAMASK on tcsh
# usage: source DAMASK_env.csh
set CALLED=($_)
set DIRNAME=`dirname $CALLED[2]`
set DAMASK_ROOT=`python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $DIRNAME`
source $DAMASK_ROOT/CONFIG
# if DAMASK_BIN is present and not in $PATH, add it
if ( $?DAMASK_BIN) then
set MATCH=`echo :${PATH}: | grep ${DAMASK_BIN}:`
if ( "x$MATCH" == "x" ) then
set PATH=${DAMASK_BIN}:${PATH}
endif
endif
set SOLVER=`which DAMASK_spectral`
set PROCESSING=`which postResults`
if ( "x$DAMASK_NUM_THREADS" == "x" ) then
set DAMASK_NUM_THREADS=1
endif
# according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size
if ( `which free` != "free: Command not found." ) then
set freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'`
set heap=` expr $freeMem / 2`
set stack=`expr $freeMem / $DAMASK_NUM_THREADS / 2`
# http://superuser.com/questions/220059/what-parameters-has-ulimit
limit datasize $heap # maximum heap size (kB)
limit stacksize $stack # maximum stack size (kB)
endif
if ( `limit | grep memoryuse` != "" ) then
limit memoryuse unlimited # maximum physical memory size
endif
if ( `limit | grep vmemoryuse` != "" ) then
limit vmemoryuse unlimited # maximum virtual memory size
endif
# disable output in case of scp
if ( $?prompt ) then
echo ''
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf
echo https://damask.mpie.de
echo
echo Using environment with ...
echo "DAMASK $DAMASK_ROOT"
echo "Spectral Solver $SOLVER"
echo "Post Processing $PROCESSING"
echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
if ( $?PETSC_DIR) then
echo "PETSc location $PETSC_DIR"
endif
if ( $?MSC_ROOT) then
echo "MSC.Marc/Mentat $MSC_ROOT"
endif
echo
echo `limit datasize`
echo `limit stacksize`
endif
setenv DAMASK_NUM_THREADS $DAMASK_NUM_THREADS
setenv PYTHONPATH $DAMASK_ROOT/lib:$PYTHONPATH

1
DAMASK_env.csh Symbolic link
View File

@ -0,0 +1 @@
env/DAMASK_env.csh

View File

@ -1,103 +0,0 @@
# sets up an environment for DAMASK on bash
# usage: source DAMASK_env.sh
if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]; then
DAMASK_ROOT=$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$(dirname $BASH_SOURCE)")
else
[[ "${BASH_SOURCE::1}" == "/" ]] && BASE="" || BASE="$(pwd)/"
STAT=$(stat "$(dirname $BASE$BASH_SOURCE)")
DAMASK_ROOT=${STAT##* }
fi
# shorthand command to change to DAMASK_ROOT directory
eval "function damask() { cd $DAMASK_ROOT; }"
# defining set() allows to source the same file for tcsh and bash, with and without space around =
set() {
export $1$2$3
}
source $DAMASK_ROOT/CONFIG
unset -f set
# add DAMASK_BIN if present but not yet in $PATH
if [[ "x$DAMASK_BIN" != "x" && ! $(echo ":$PATH:" | grep $DAMASK_BIN:) ]]; then
export PATH=$DAMASK_BIN:$PATH
fi
SOLVER=$(which DAMASK_spectral || true 2>/dev/null)
if [ "x$SOLVER" == "x" ]; then
SOLVER='Not found!'
fi
PROCESSING=$(which postResults || true 2>/dev/null)
if [ "x$PROCESSING" == "x" ]; then
PROCESSING='Not found!'
fi
if [ "x$DAMASK_NUM_THREADS" == "x" ]; then
DAMASK_NUM_THREADS=1
fi
# according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size
FREE=$(type -p free 2>/dev/null)
if [ "x$FREE" != "x" ]; then
freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}')
# http://superuser.com/questions/220059/what-parameters-has-ulimit
ulimit -d unlimited 2>/dev/null \
|| ulimit -d $(expr $freeMem / 2) 2>/dev/null # maximum heap size (kB)
ulimit -s unlimited 2>/dev/null \
|| echo "cannot unlimit stack..." \
&& ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB)
fi
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
ulimit -m unlimited 2>/dev/null # maximum physical memory size
# disable output in case of scp
if [ ! -z "$PS1" ]; then
echo
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf
echo https://damask.mpie.de
echo
echo Using environment with ...
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"
[[ $(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") == $PETSC_DIR ]] \
|| echo " ~~> "$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR")
fi
echo "MSC.Marc/Mentat $MSC_ROOT"
echo
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -d) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
echo -n "stack size "
[[ "$(ulimit -s)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -s) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
fi
export DAMASK_NUM_THREADS
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN; do
unset "${var}"
done
for var in DAMASK MSC; do
unset "${var}_ROOT"
done
for var in ABAQUS MARC; do
unset "${var}_VERSION"
done

1
DAMASK_env.sh Symbolic link
View File

@ -0,0 +1 @@
env/DAMASK_env.sh

View File

@ -1,88 +0,0 @@
# sets up an environment for DAMASK on zsh
# usage: source DAMASK_env.zsh
DAMASK_ROOT=${0:a:h}
# shorthand command to change to DAMASK_ROOT directory
eval "function damask() { cd $DAMASK_ROOT; }"
# defining set() allows to source the same file for tcsh and zsh, with and without space around =
set() {
export $1$2$3
}
source $DAMASK_ROOT/CONFIG
unset -f set
# add DAMASK_BIN if present but not yet in $PATH
MATCH=`echo ":$PATH:" | grep $DAMASK_BIN:`
if [[ ( "x$DAMASK_BIN" != "x" ) && ( "x$MATCH" = "x" ) ]]; then
export PATH=$DAMASK_BIN:$PATH
fi
SOLVER=`which DAMASK_spectral || True 2>/dev/null`
PROCESSING=`which postResults || True 2>/dev/null`
if [ "x$DAMASK_NUM_THREADS" = "x" ]; then
DAMASK_NUM_THREADS=1
fi
# according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size
if [ "`which free 2>/dev/null`" != "free not found" ]; then
freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'`
# http://superuser.com/questions/220059/what-parameters-has-ulimit
#ulimit -d `expr $freeMem / 2` 2>/dev/null # maximum heap size (kB)
ulimit -s `expr $freeMem / $DAMASK_NUM_THREADS / 2` 2>/dev/null # maximum stack size (kB)
fi
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
ulimit -m unlimited 2>/dev/null # maximum physical memory size
# disable output in case of scp
if [ ! -z "$PS1" ]; then
echo
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf
echo https://damask.mpie.de
echo
echo "Using environment with ..."
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"
[[ $(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") == $PETSC_DIR ]] \
|| echo " ~~> "$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR")
fi
echo "MSC.Marc/Mentat $MSC_ROOT"
echo
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -d) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
echo -n "stack size "
[[ "$(ulimit -s)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -s) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
fi
export DAMASK_NUM_THREADS
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN MATCH; do
unset "${var}"
done
for var in DAMASK MSC; do
unset "${var}_ROOT"
done
for var in ABAQUS MARC; do
unset "${var}_VERSION"
done

1
DAMASK_env.zsh Symbolic link
View File

@ -0,0 +1 @@
env/DAMASK_env.zsh

View File

@ -7,7 +7,7 @@ all: spectral FEM marc processing
.PHONY: spectral .PHONY: spectral
spectral: build/spectral spectral: build/spectral
@(cd build/spectral;make --no-print-directory -ws all install VERBOSE=1;) @(cd build/spectral;make --no-print-directory -ws all install;)
.PHONY: FEM .PHONY: FEM
FEM: build/FEM FEM: build/FEM

@ -1 +1 @@
Subproject commit 02c172417e5f170b8b00b1f4c4b65b7b7aeb310b Subproject commit 19a53f6229603aeafb2466b58679a1cd04fc0142

View File

@ -1 +1 @@
v2.0.1-684-gb7a138e v2.0.1-735-gf52e62e

65
env/DAMASK_env.csh vendored Normal file
View File

@ -0,0 +1,65 @@
# sets up an environment for DAMASK on tcsh
# usage: source DAMASK_env.csh
set CALLED=($_)
set DIRNAME=`dirname $CALLED[2]`
set DAMASK_ROOT=`python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $DIRNAME`
source $DAMASK_ROOT/CONFIG
# if DAMASK_BIN is present and not in $PATH, add it
if ( $?DAMASK_BIN) then
set MATCH=`echo :${PATH}: | grep ${DAMASK_BIN}:`
if ( "x$MATCH" == "x" ) then
set PATH=${DAMASK_BIN}:${PATH}
endif
endif
set SOLVER=`which DAMASK_spectral`
set PROCESSING=`which postResults`
if ( "x$DAMASK_NUM_THREADS" == "x" ) then
set DAMASK_NUM_THREADS=1
endif
# according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size
if ( `which free` != "free: Command not found." ) then
set freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'`
set heap=` expr $freeMem / 2`
set stack=`expr $freeMem / $DAMASK_NUM_THREADS / 2`
# http://superuser.com/questions/220059/what-parameters-has-ulimit
limit datasize $heap # maximum heap size (kB)
limit stacksize $stack # maximum stack size (kB)
endif
if ( `limit | grep memoryuse` != "" ) then
limit memoryuse unlimited # maximum physical memory size
endif
if ( `limit | grep vmemoryuse` != "" ) then
limit vmemoryuse unlimited # maximum virtual memory size
endif
# disable output in case of scp
if ( $?prompt ) then
echo ''
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf
echo https://damask.mpie.de
echo
echo Using environment with ...
echo "DAMASK $DAMASK_ROOT"
echo "Spectral Solver $SOLVER"
echo "Post Processing $PROCESSING"
echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS"
if ( $?PETSC_DIR) then
echo "PETSc location $PETSC_DIR"
endif
if ( $?MSC_ROOT) then
echo "MSC.Marc/Mentat $MSC_ROOT"
endif
echo
echo `limit datasize`
echo `limit stacksize`
endif
setenv DAMASK_NUM_THREADS $DAMASK_NUM_THREADS
setenv PYTHONPATH $DAMASK_ROOT/lib:$PYTHONPATH

102
env/DAMASK_env.sh vendored Normal file
View File

@ -0,0 +1,102 @@
# sets up an environment for DAMASK on bash
# usage: source DAMASK_env.sh
if [ "$OSTYPE" == "linux-gnu" ] || [ "$OSTYPE" == 'linux' ]; then
DAMASK_ROOT=$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$(dirname $BASH_SOURCE)")
else
[[ "${BASH_SOURCE::1}" == "/" ]] && BASE="" || BASE="$(pwd)/"
STAT=$(stat "$(dirname $BASE$BASH_SOURCE)")
DAMASK_ROOT=${STAT##* }
fi
# shorthand command to change to DAMASK_ROOT directory
eval "function damask() { cd $DAMASK_ROOT; }"
# defining set() allows to source the same file for tcsh and bash, with and without space around =
set() {
export $1$2$3
}
source $DAMASK_ROOT/CONFIG
unset -f set
# add DAMASK_BIN if present but not yet in $PATH
if [[ "x$DAMASK_BIN" != "x" && ! $(echo ":$PATH:" | grep $DAMASK_BIN:) ]]; then
export PATH=$DAMASK_BIN:$PATH
fi
SOLVER=$(which DAMASK_spectral || true 2>/dev/null)
if [ "x$SOLVER" == "x" ]; then
SOLVER='Not found!'
fi
PROCESSING=$(which postResults || true 2>/dev/null)
if [ "x$PROCESSING" == "x" ]; then
PROCESSING='Not found!'
fi
if [ "x$DAMASK_NUM_THREADS" == "x" ]; then
DAMASK_NUM_THREADS=1
fi
# according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size
FREE=$(type -p free 2>/dev/null)
if [ "x$FREE" != "x" ]; then
freeMem=$(free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}')
# http://superuser.com/questions/220059/what-parameters-has-ulimit
ulimit -d unlimited 2>/dev/null \
|| ulimit -d $(expr $freeMem / 2) 2>/dev/null # maximum heap size (kB)
ulimit -s unlimited 2>/dev/null \
|| ulimit -s $(expr $freeMem / $DAMASK_NUM_THREADS / 2) 2>/dev/null # maximum stack size (kB)
fi
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
ulimit -m unlimited 2>/dev/null # maximum physical memory size
# disable output in case of scp
if [ ! -z "$PS1" ]; then
echo
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf
echo https://damask.mpie.de
echo
echo Using environment with ...
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"
[[ $(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") == $PETSC_DIR ]] \
|| echo " ~~> "$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR")
fi
echo "MSC.Marc/Mentat $MSC_ROOT"
echo
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -d) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
echo -n "stack size "
[[ "$(ulimit -s)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -s) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
fi
export DAMASK_NUM_THREADS
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN; do
unset "${var}"
done
for var in DAMASK MSC; do
unset "${var}_ROOT"
done
for var in ABAQUS MARC; do
unset "${var}_VERSION"
done

90
env/DAMASK_env.zsh vendored Normal file
View File

@ -0,0 +1,90 @@
# sets up an environment for DAMASK on zsh
# usage: source DAMASK_env.zsh
DAMASK_ROOT=${0:a:h}
# shorthand command to change to DAMASK_ROOT directory
eval "function damask() { cd $DAMASK_ROOT; }"
# defining set() allows to source the same file for tcsh and zsh, with and without space around =
set() {
export $1$2$3
}
source $DAMASK_ROOT/CONFIG
unset -f set
# add DAMASK_BIN if present but not yet in $PATH
MATCH=`echo ":$PATH:" | grep $DAMASK_BIN:`
if [[ ( "x$DAMASK_BIN" != "x" ) && ( "x$MATCH" = "x" ) ]]; then
export PATH=$DAMASK_BIN:$PATH
fi
SOLVER=`which DAMASK_spectral || True 2>/dev/null`
PROCESSING=`which postResults || True 2>/dev/null`
if [ "x$DAMASK_NUM_THREADS" = "x" ]; then
DAMASK_NUM_THREADS=1
fi
# according to http://software.intel.com/en-us/forums/topic/501500
# this seems to make sense for the stack size
if [ "`which free 2>/dev/null`" != "free not found" ]; then
freeMem=`free -k | grep -E '(Mem|Speicher):' | awk '{print $4;}'`
# http://superuser.com/questions/220059/what-parameters-has-ulimit
#ulimit -d `expr $freeMem / 2` 2>/dev/null # maximum heap size (kB)
ulimit -s `expr $freeMem / $DAMASK_NUM_THREADS / 2` 2>/dev/null # maximum stack size (kB)
fi
ulimit -v unlimited 2>/dev/null # maximum virtual memory size
ulimit -m unlimited 2>/dev/null # maximum physical memory size
# disable output in case of scp
if [ ! -z "$PS1" ]; then
echo
echo Düsseldorf Advanced Materials Simulation Kit --- DAMASK
echo Max-Planck-Institut für Eisenforschung GmbH, Düsseldorf
echo https://damask.mpie.de
echo
echo "Using environment with ..."
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"
[[ $(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR") == $PETSC_DIR ]] \
|| echo " ~~> "$(python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" "$PETSC_DIR")
fi
[[ "x$PETSC_ARCH" == "x" ]] \
|| echo "PETSc architecture $PETSC_ARCH"
echo "MSC.Marc/Mentat $MSC_ROOT"
echo
echo -n "heap size "
[[ "$(ulimit -d)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -d) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
echo -n "stack size "
[[ "$(ulimit -s)" == "unlimited" ]] \
&& echo "unlimited" \
|| echo $(python -c \
"import math; \
size=$(( 1024*$(ulimit -s) )); \
print('{:.4g} {}'.format(size / (1 << ((int(math.log(size,2) / 10) if size else 0) * 10)), \
['bytes','KiB','MiB','GiB','TiB','EiB','ZiB'][int(math.log(size,2) / 10) if size else 0]))")
fi
export DAMASK_NUM_THREADS
export PYTHONPATH=$DAMASK_ROOT/lib:$PYTHONPATH
for var in BASE STAT SOLVER PROCESSING FREE DAMASK_BIN MATCH; do
unset "${var}"
done
for var in DAMASK MSC; do
unset "${var}_ROOT"
done
for var in ABAQUS MARC; do
unset "${var}_VERSION"
done

View File

@ -29,21 +29,20 @@ SolidSolutionStrength 0.0 # Strength due to elements in solid solution
#per family #per family
Nslip 12 0 Nslip 12 0
slipburgers 2.72e-10 # Burgers vector of slip system [m] slipburgers 2.72e-10 # Burgers vector of slip system [m]
rhoedge0 1.0e12 # Initial edge dislocation density [m/m**3] 1.0e12 rhoedge0 1.0e12 # Initial edge dislocation density [m/m**3]
rhoedgedip0 1.0 # Initial edged dipole dislocation density [m/m**3] rhoedgedip0 1.0 # Initial edged dipole dislocation density [m/m**3]
Qedge 2.725e-19 # Activation energy for dislocation glide [J] Qedge 2.61154e-19 # Activation energy for dislocation glide [J], 1.63 eV
v0 3693.4 # Initial glide velocity [m/s] 1.0e-4 (kmC 3693.4 ; 755.59) v0 1 # Initial glide velocity [m/s]
p_slip 0.86 # p-exponent in glide velocity p_slip 0.86 # p-exponent in glide velocity
q_slip 1.69 # q-exponent in glide velocity q_slip 1.69 # q-exponent in glide velocity
tau_peierls 2.03e9 # peierls stress [Pa] tau_peierls 2.03e9 # peierls stress [Pa]
#mobility law #mobility law
kink_height 2.567e-10 # kink height sqrt(6)/3*lattice_parameter [m] kink_height 2.567e-10 # kink height sqrt(6)/3*lattice_parameter [m]
omega 9.1e11 # attemp frequency (from kMC paper) [s^(-1)] omega 9.1e11 # attemp frequency (from kMC paper) [s^(-1)]
kink_width 29.95e-10 # kink pair width ~ 11 b (kMC paper) [m] kink_width 29.95e-10 # kink pair width ~ 11 b (kMC paper) [m]
dislolength 78.0e-10 # dislocation length (ideally lambda) [m] initial value 25b dislolength 78e-10 # dislocation length (ideally lambda) [m] initial value 11b
friction_coeff 8.3e-5 # friction coeff. B (kMC) [Pa*s] friction_coeff 8.3e-5 # friction coeff. B [Pa*s]
#
#hardening #hardening
dipoleformationfactor 0 # to have hardening due to dipole formation off dipoleformationfactor 0 # to have hardening due to dipole formation off
@ -52,5 +51,5 @@ D0 4.0e-5 # Vacancy diffusion prefactor [m**2/
Qsd 4.5e-19 # Activation energy for climb [J] Qsd 4.5e-19 # Activation energy for climb [J]
Catomicvolume 1.0 # Adj. parameter controlling the atomic volume [in b] Catomicvolume 1.0 # Adj. parameter controlling the atomic volume [in b]
Cedgedipmindistance 1.0 # Adj. parameter controlling the minimum dipole distance [in b] Cedgedipmindistance 1.0 # Adj. parameter controlling the minimum dipole distance [in b]
interaction_slipslip 0.0625 0.0625 0.72 0.05 0.09 0.06 # Queyreau interaction_slipslip 0.009 0.009 0.72 0.05 009 006
#nonschmid_coefficients 0 0.56 0.75 0 0 0 #?????????????? nonschmid_coefficients 0.938 0.71 4.43 0.0 0.0 0.0

View File

@ -129,7 +129,7 @@ for filename in marc$VERSION/tools/run_damask* \
chmod 755 $INSTALLDIR/${filename} chmod 755 $INSTALLDIR/${filename}
done done
#creating symlinks for run_damask_scripts in /usr/local/bin #creating symlinks for run_damask_scripts
if [ -d "$BIN_DIR" ]; then if [ -d "$BIN_DIR" ]; then
echo '' echo ''
@ -158,11 +158,6 @@ if [ -d "$BIN_DIR" ]; then
esac esac
fi fi
# cloning user subroutine
echo ''
echo 'cloning $VERSION HYPELA2 user subroutine...'
ln -s DAMASK_marc.f90 ${DAMASK_ROOT}/src/DAMASK_marc${VERSION}.f90
# precompiling user subroutine # precompiling user subroutine
echo '' echo ''
echo 'precompiling $VERSION HYPELA2 user subroutine...' echo 'precompiling $VERSION HYPELA2 user subroutine...'

View File

@ -99,7 +99,6 @@ class Test():
self.run(variant) self.run(variant)
self.postprocess(variant) self.postprocess(variant)
self.compare(variant)
if self.options.update: if self.options.update:
if self.update(variant) != 0: logging.critical('update for "{}" failed.'.format(name)) if self.update(variant) != 0: logging.critical('update for "{}" failed.'.format(name))

1
src/.gitignore vendored
View File

@ -1,4 +1,3 @@
DAMASK_marc*.f90
Makefile Makefile
cmake_install.cmake cmake_install.cmake
quit__genmod.f90 quit__genmod.f90

View File

@ -1 +0,0 @@
DAMASK_marc.f90

View File

@ -1 +0,0 @@
DAMASK_marc.f90

View File

@ -1 +0,0 @@
DAMASK_marc.f90

View File

@ -14,10 +14,11 @@ module IO
private private
character(len=5), parameter, public :: & character(len=5), parameter, public :: &
IO_EOF = '#EOF#' !< end of file string IO_EOF = '#EOF#' !< end of file string
character(len=168), parameter, private :: & character(len=207), parameter, private :: &
IO_divider = '───────────────────'//& IO_DIVIDER = '───────────────────'//&
'───────────────────'//& '───────────────────'//&
'──────────────────' '───────────────────'//&
'────────────'
public :: & public :: &
IO_init, & IO_init, &
IO_read, & IO_read, &
@ -1457,11 +1458,11 @@ end function IO_timeStamp
!> @brief write error statements to standard out and terminate the Marc/spectral run with exit #9xxx !> @brief write error statements to standard out and terminate the Marc/spectral run with exit #9xxx
!> in ABAQUS either time step is reduced or execution terminated !> in ABAQUS either time step is reduced or execution terminated
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine IO_error(error_ID,el,ip,g,ext_msg) subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
implicit none implicit none
integer(pInt), intent(in) :: error_ID integer(pInt), intent(in) :: error_ID
integer(pInt), optional, intent(in) :: el,ip,g integer(pInt), optional, intent(in) :: el,ip,g,instance
character(len=*), optional, intent(in) :: ext_msg character(len=*), optional, intent(in) :: ext_msg
external :: quit external :: quit
@ -1672,34 +1673,28 @@ subroutine IO_error(error_ID,el,ip,g,ext_msg)
end select end select
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
write(0,'(/,a)') ' ┌'//IO_divider//'┐' write(0,'(/,a)') ' ┌'//IO_DIVIDER//'┐'
write(0,'(a)') ' │ error │' write(0,'(a,24x,a,40x,a)') ' │','error', '│'
write(0,'(a)') ' ├'//IO_divider//'┤' write(0,'(a,24x,i3,42x,a)') ' │',error_ID, '│'
write(0,'(a,i3,a)') ' │ ',error_ID,' │' write(0,'(a)') ' ├'//IO_DIVIDER//'┤'
write(0,'(a)') ' │ │'
write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len(trim(msg))),',',& write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len(trim(msg))),',',&
max(1,60-len(trim(msg))-5),'x,a)' max(1,72-len(trim(msg))-4),'x,a)'
write(0,formatString) '│ ',trim(msg),'│' write(0,formatString) '│ ',trim(msg), '│'
if (present(ext_msg)) then if (present(ext_msg)) then
write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len(trim(ext_msg))),',',& write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len(trim(ext_msg))),',',&
max(1,60-len(trim(ext_msg))-5),'x,a)' max(1,72-len(trim(ext_msg))-4),'x,a)'
write(0,formatString) '│ ',trim(ext_msg),'│' write(0,formatString) '│ ',trim(ext_msg), '│'
endif endif
if (present(el)) then if (present(el)) &
if (present(ip)) then write(0,'(a19,1x,i9,44x,a3)') ' │ at element ',el, '│'
if (present(g)) then if (present(ip)) &
write(0,'(a13,1x,i9,1x,a2,1x,i2,1x,a5,1x,i4,18x,a1)') ' │ at element',el,'IP',ip,'grain',g,'│' write(0,'(a19,1x,i9,44x,a3)') ' │ at IP ',ip, '│'
else if (present(g)) &
write(0,'(a13,1x,i9,1x,a2,1x,i2,29x,a1)') ' │ at element',el,'IP',ip,'│' write(0,'(a19,1x,i9,44x,a3)') ' │ at constituent',g, '│'
endif if (present(instance)) &
else write(0,'(a19,1x,i9,44x,a3)') ' │ at instance ',instance, '│'
write(0,'(a13,1x,i9,35x,a1)') ' │ at element',el,'│' write(0,'(a,69x,a)') ' │', '│'
endif write(0,'(a)') ' └'//IO_DIVIDER//'┘'
elseif (present(ip)) then ! now having the meaning of "instance"
write(0,'(a14,1x,i9,34x,a1)') ' │ at instance',ip,'│'
endif
write(0,'(a)') ' │ │'
write(0,'(a)') ' └'//IO_divider//'┘'
flush(0) flush(0)
call quit(9000_pInt+error_ID) call quit(9000_pInt+error_ID)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)
@ -1766,30 +1761,26 @@ subroutine IO_warning(warning_ID,el,ip,g,ext_msg)
end select end select
!$OMP CRITICAL (write2out) !$OMP CRITICAL (write2out)
write(6,'(/,a)') ' +--------------------------------------------------------+' write(6,'(/,a)') ' ┌'//IO_DIVIDER//'┐'
write(6,'(a)') ' + warning +' write(6,'(a,24x,a,38x,a)') ' │','warning', '│'
write(6,'(a,i3,a)') ' + ',warning_ID,' +' write(6,'(a,24x,i3,42x,a)') ' │',warning_ID, '│'
write(6,'(a)') ' + +' write(6,'(a)') ' ├'//IO_DIVIDER//'┤'
write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a2,a',max(1,len(trim(msg))),',',& write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len(trim(msg))),',',&
max(1,60-len(trim(msg))-5),'x,a)' max(1,72-len(trim(msg))-4),'x,a)'
write(6,formatString) '+ ', trim(msg),'+' write(6,formatString) '│ ',trim(msg), '│'
if (present(ext_msg)) then if (present(ext_msg)) then
write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a2,a',max(1,len(trim(ext_msg))),',',& write(formatString,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len(trim(ext_msg))),',',&
max(1,60-len(trim(ext_msg))-5),'x,a)' max(1,72-len(trim(ext_msg))-4),'x,a)'
write(6,formatString) '+ ', trim(ext_msg),'+' write(6,formatString) '│ ',trim(ext_msg), '│'
endif endif
if (present(el)) then if (present(el)) &
if (present(ip)) then write(6,'(a19,1x,i9,44x,a3)') ' │ at element ',el, '│'
if (present(g)) then if (present(ip)) &
write(6,'(a13,1x,i9,1x,a2,1x,i2,1x,a5,1x,i4,18x,a1)') ' + at element',el,'IP',ip,'grain',g,'+' write(6,'(a19,1x,i9,44x,a3)') ' │ at IP ',ip, '│'
else if (present(g)) &
write(6,'(a13,1x,i9,1x,a2,1x,i2,29x,a1)') ' + at element',el,'IP',ip,'+' write(6,'(a19,1x,i9,44x,a3)') ' │ at constituent',g, '│'
endif write(6,'(a,69x,a)') ' │', '│'
else write(6,'(a)') ' └'//IO_DIVIDER//'┘'
write(6,'(a13,1x,i9,35x,a1)') ' + at element',el,'+'
endif
endif
write(6,'(a)') ' +--------------------------------------------------------+'
flush(6) flush(6)
!$OMP END CRITICAL (write2out) !$OMP END CRITICAL (write2out)

View File

@ -567,18 +567,13 @@ subroutine plastic_isotropic_dotState(Tstar_v,ipc,ip,el)
if (dEq0(param(instance)%tausat_SinhFitA)) then if (dEq0(param(instance)%tausat_SinhFitA)) then
saturation = param(instance)%tausat saturation = param(instance)%tausat
else else
saturation = ( param(instance)%tausat & saturation = param(instance)%tausat &
+ ( log( ( gamma_dot / param(instance)%tausat_SinhFitA& + asinh( (gamma_dot / param(instance)%tausat_SinhFitA&
)**(1.0_pReal / param(instance)%tausat_SinhFitD)& )**(1.0_pReal / param(instance)%tausat_SinhFitD)&
+ sqrt( ( gamma_dot / param(instance)%tausat_SinhFitA &
)**(2.0_pReal / param(instance)%tausat_SinhFitD) &
+ 1.0_pReal ) &
) & ! asinh(K) = ln(K + sqrt(K^2 +1))
)**(1.0_pReal / param(instance)%tausat_SinhFitC) & )**(1.0_pReal / param(instance)%tausat_SinhFitC) &
/ ( param(instance)%tausat_SinhFitB & / ( param(instance)%tausat_SinhFitB &
* (gamma_dot / param(instance)%gdot0)**(1.0_pReal / param(instance)%n) & * (gamma_dot / param(instance)%gdot0)**(1.0_pReal / param(instance)%n) &
) & )
)
endif endif
hardening = ( param(instance)%h0 + param(instance)%h0_slopeLnRate * log(gamma_dot) ) & hardening = ( param(instance)%h0 + param(instance)%h0_slopeLnRate * log(gamma_dot) ) &
* abs( 1.0_pReal - state(instance)%flowstress(of)/saturation )**param(instance)%a & * abs( 1.0_pReal - state(instance)%flowstress(of)/saturation )**param(instance)%a &