DAMASK_EICMD/.gitlab-ci.yml

587 lines
17 KiB
YAML

---
stages:
- prepareAll
- preprocessing
- postprocessing
- compilePETScIntel
- compilePETScGNU
- prepareSpectral
- spectral
- compileMarc
- marc
- compileAbaqus
- example
- performance
- createPackage
- createDocumentation
- saveDocumentation
- updateMaster
- clean
- releaseLock
###################################################################################################
before_script:
- 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}" $TESTROOT/GitLabCI.queue) != 1 ];
do sleep 5m;
done
- source $DAMASKROOT/env/DAMASK.sh
- cd $DAMASKROOT/PRIVATE/testing
- echo Job start:" $(date)"
###################################################################################################
after_script:
- echo Job end:" $(date)"
###################################################################################################
variables:
# ===============================================================================================
# GitLab Settings
# ===============================================================================================
GIT_SUBMODULE_STRATEGY: none
# ===============================================================================================
# Shortcut names
# ===============================================================================================
DAMASKROOT: "$TESTROOT/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
# ===============================================================================================
# Names of module files to load
# ===============================================================================================
# ++++++++++++ Compiler ++++++++++++++++++++++++++++++++++++++++++++++
IntelCompiler16_4: "Compiler/Intel/16.4 Libraries/IMKL/2016"
IntelCompiler17_8: "Compiler/Intel/17.8 Libraries/IMKL/2017"
IntelCompiler18_4: "Compiler/Intel/18.4 Libraries/IMKL/2018"
GNUCompiler8_2: "Compiler/GNU/8.2"
# ------------ Defaults ----------------------------------------------
IntelCompiler: "$IntelCompiler18_4"
GNUCompiler: "$GNUCompiler8_2"
# ++++++++++++ MPI +++++++++++++++++++++++++++++++++++++++++++++++++++
IMPI2018Intel18_4: "MPI/Intel/18.4/IntelMPI/2018"
MPICH3_3GNU8_2: "MPI/GNU/8.2/MPICH/3.3"
# ------------ Defaults ----------------------------------------------
MPICH_Intel: "$IMPI2018Intel18_4"
MPICH_GNU: "$MPICH3_3GNU8_2"
# ++++++++++++ PETSc +++++++++++++++++++++++++++++++++++++++++++++++++
PETSc3_10_3IMPI2018Intel18_4: "Libraries/PETSc/3.10.3/Intel-18.4-IntelMPI-2018"
PETSc3_10_3MPICH3_3GNU8_2: "Libraries/PETSc/3.10.3/GNU-8.2-MPICH-3.3"
# ------------ Defaults ----------------------------------------------
PETSc_MPICH_Intel: "$PETSc3_10_3IMPI2018Intel18_4"
PETSc_MPICH_GNU: "$PETSc3_10_3MPICH3_3GNU8_2"
# ++++++++++++ FEM +++++++++++++++++++++++++++++++++++++++++++++++++++
Abaqus2019: "FEM/Abaqus/2019"
MSC2018_1: "FEM/MSC/2018.1"
# ------------ Defaults ----------------------------------------------
Abaqus: "$Abaqus2019"
MSC: "$MSC2018_1"
IntelMarc: "$IntelCompiler17_8"
IntelAbaqus: "$IntelCompiler16_4"
# ++++++++++++ Documentation +++++++++++++++++++++++++++++++++++++++++
Doxygen1_8_15: "Documentation/Doxygen/1.8.15"
# ------------ Defaults ----------------------------------------------
Doxygen: "$Doxygen1_8_15"
###################################################################################################
checkout:
stage: prepareAll
before_script:
- echo $CI_PIPELINE_ID >> $TESTROOT/GitLabCI.queue
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $TESTROOT/GitLabCI.queue) != 1 ];
do sleep 5m;
done
script:
- mkdir -p $DAMASKROOT
- cd $DAMASKROOT
- if [ -d DAMASK ]; then rm -rf DAMASK; fi # there might be some leftovers from a failed clone
- git clone -q git@magit1.mpie.de:damask/DAMASK.git .
- git checkout $CI_COMMIT_SHA
- git submodule update --init
- source env/DAMASK.sh
- make processing
except:
- master
- release
###################################################################################################
OrientationRelationship:
stage: preprocessing
script: OrientationRelationship/test.py
except:
- master
- release
Pre_SeedGeneration:
stage: preprocessing
script: PreProcessing_SeedGeneration/test.py
except:
- master
- release
Pre_GeomGeneration:
stage: preprocessing
script: PreProcessing_GeomGeneration/test.py
except:
- master
- release
Pre_GeomModification:
stage: preprocessing
script: PreProcessing_GeomModification/test.py
except:
- master
- release
Pre_General:
stage: preprocessing
script: PreProcessing/test.py
except:
- master
- release
Spectral_geometryPacking:
stage: preprocessing
script: Spectral_geometryPacking/test.py
except:
- master
- release
###################################################################################################
Post_AverageDown:
stage: postprocessing
script: averageDown/test.py
except:
- master
- release
Post_ASCIItable:
stage: postprocessing
script: ASCIItable/test.py
except:
- master
- release
Post_General:
stage: postprocessing
script: PostProcessing/test.py
except:
- master
- release
Post_GeometryReconstruction:
stage: postprocessing
script: Spectral_geometryReconstruction/test.py
except:
- master
- release
Post_addCurl:
stage: postprocessing
script: addCurl/test.py
except:
- master
- release
Post_addDivergence:
stage: postprocessing
script: addDivergence/test.py
except:
- master
- release
Post_addGradient:
stage: postprocessing
script: addGradient/test.py
except:
- master
- release
Post_ParaviewRelated:
stage: postprocessing
script: ParaviewRelated/test.py
except:
- master
- release
Post_OrientationConversion:
stage: postprocessing
script: OrientationConversion/test.py
except:
- master
- release
###################################################################################################
Compile_Spectral_Intel:
stage: compilePETScIntel
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- SpectralAll_compile/test.py
except:
- master
- release
Compile_FEM_Intel:
stage: compilePETScIntel
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- FEM_compile/test.py
except:
- master
- release
###################################################################################################
Compile_Spectral_GNU:
stage: compilePETScGNU
script:
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
- SpectralAll_compile/test.py
except:
- master
- release
Compile_FEM_GNU:
stage: compilePETScGNU
script:
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
- FEM_compile/test.py
except:
- master
- release
###################################################################################################
Compile_Intel_Prepare:
stage: prepareSpectral
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- cd $DAMASKROOT
- make clean spectral processing
except:
- master
- release
###################################################################################################
Thermal:
stage: spectral
script: Thermal/test.py
except:
- master
- release
Spectral_PackedGeometry:
stage: spectral
script: Spectral_PackedGeometry/test.py
except:
- master
- release
Spectral_parsingArguments:
stage: spectral
script: Spectral_parsingArguments/test.py
except:
- master
- release
StateIntegration_compareVariants:
stage: spectral
script: StateIntegration_compareVariants/test.py
except:
- master
- release
nonlocal_densityConservation:
stage: spectral
script: nonlocal_densityConservation/test.py
except:
- master
- release
Spectral_ipNeighborhood:
stage: spectral
script: Spectral_ipNeighborhood/test.py
except:
- master
- release
RGC_DetectChanges:
stage: spectral
script: RGC_DetectChanges/test.py
except:
- master
- release
Nonlocal_Damage_DetectChanges:
stage: spectral
script: Nonlocal_Damage_DetectChanges/test.py
except:
- master
- release
SpectralAll_restart:
stage: spectral
script: SpectralAll_restart/test.py
except:
- master
- release
SpectralAll_parsingLoadCase:
stage: spectral
script: SpectralAll_parsingLoadCase/test.py
except:
- master
- release
SpectralBasic_loadCaseRotation:
stage: spectral
script: SpectralBasic_loadCaseRotation/test.py
except:
- master
- release
Spectral_MPI:
stage: spectral
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- Spectral_MPI/test.py
except:
- master
- release
SpectralAll_restartMPI:
stage: spectral
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- SpectralAll_restartMPI/test.py
except:
- master
- release
Plasticity_DetectChanges:
stage: spectral
script: Plasticity_DetectChanges/test.py
except:
- master
- release
Homogenization:
stage: spectral
script: Homogenization/test.py
except:
- master
- release
Phenopowerlaw_singleSlip:
stage: spectral
script: Phenopowerlaw_singleSlip/test.py
except:
- master
- release
TextureComponents:
stage: spectral
script: TextureComponents/test.py
except:
- master
- release
###################################################################################################
Marc_compileIfort2018_1:
stage: compileMarc
script:
- module load $IntelMarc $MSC
- Marc_compileIfort/test.py -m 2018.1
except:
- master
- release
###################################################################################################
Hex_elastic:
stage: marc
script:
- module load $IntelMarc $MSC
- Hex_elastic/test.py
except:
- master
- release
CubicFCC_elastic:
stage: marc
script:
- module load $IntelMarc $MSC
- CubicFCC_elastic/test.py
except:
- master
- release
CubicBCC_elastic:
stage: marc
script:
- module load $IntelMarc $MSC
- CubicBCC_elastic/test.py
except:
- master
- release
J2_plasticBehavior:
stage: marc
script:
- module load $IntelMarc $MSC
- J2_plasticBehavior/test.py
except:
- master
- release
###################################################################################################
Abaqus_compile:
stage: compileAbaqus
script:
- module load $IntelAbaqus $Abaqus
- Abaqus_compileIfort/test.py
except:
- master
- release
###################################################################################################
SpectralExample:
stage: example
script: SpectralAll_example/test.py
only:
- development
###################################################################################################
SpectralRuntime:
stage: performance
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- cd $DAMASKROOT
- make clean spectral processing OPTIMIZATION=AGGRESSIVE
- cd $TESTROOT/performance # location of old results
- git checkout . # undo any changes (i.e. run time data from non-development branch)
- cd $DAMASKROOT/PRIVATE/testing
- SpectralAll_runtime/test.py -d $TESTROOT/performance
except:
- master
- release
###################################################################################################
createTar:
stage: createPackage
script:
- cd $(mktemp -d)
- $DAMASKROOT/PRIVATE/releasing/deployMe.sh $CI_COMMIT_SHA
except:
- master
- release
###################################################################################################
AbaqusStd:
stage: createDocumentation
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT abaqus
only:
- development
Marc:
stage: createDocumentation
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT marc
only:
- development
Spectral:
stage: createDocumentation
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen
- $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT spectral
only:
- development
Processing:
stage: createDocumentation
script:
- cd $DAMASKROOT/processing/post
- $DAMASKROOT/PRIVATE/documenting/scriptHelpToWiki.py
addAPS34IDEstrainCoords.py
addCauchy.py addCalculation.py addCompatibilityMismatch.py addCumulative.py addCurl.py
addDerivative.py addDeterminant.py addDeviator.py addDisplacement.py addDivergence.py
addEhkl.py addEuclideanDistance.py
addGaussian.py addGradient.py addGrainID.py
addIndexed.py
addInfo.py
addLinked.py
addMises.py
addNorm.py
addPK2.py
addSpectralDecomposition.py addStrainTensors.py
addTable.py
filterTable.py
perceptualUniformColorMap.py
reLabel.py
scaleData.py shiftData.py sortTable.py
viewTable.py > post.html
except:
- master
- 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
###################################################################################################
removeData:
stage: clean
before_script:
- echo 'Do nothing'
script:
- 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:
- master
- release