420 lines
13 KiB
YAML
420 lines
13 KiB
YAML
---
|
|
stages:
|
|
- prepareAll
|
|
- python
|
|
- preprocessing
|
|
- postprocessing
|
|
- compilePETSc
|
|
- prepareGrid
|
|
- grid
|
|
- compileMarc
|
|
- marc
|
|
- performance
|
|
- createPackage
|
|
- createDocumentation
|
|
- saveDocumentation
|
|
- updateMaster
|
|
- clean
|
|
- releaseLock
|
|
|
|
###################################################################################################
|
|
before_script:
|
|
- if [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue)x == 'x' ];
|
|
then echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue;
|
|
fi
|
|
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
|
|
do sleep 5m;
|
|
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
|
|
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: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
|
|
TESTROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/tests"
|
|
|
|
# ===============================================================================================
|
|
# Names of module files to load
|
|
# ===============================================================================================
|
|
# ++++++++++++ Compiler +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
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"
|
|
# ++++++++++++ commercial FEM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
MSC2019_1: "FEM/MSC/2019.1"
|
|
# ------------ Defaults ----------------------------------------------
|
|
MSC: "$MSC2019_1"
|
|
IntelMarc: "$IntelCompiler17_8"
|
|
HDF5Marc: "HDF5/1.10.5/Intel-17.8"
|
|
|
|
###################################################################################################
|
|
checkout:
|
|
stage: prepareAll
|
|
before_script:
|
|
- echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue
|
|
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
|
|
do sleep 5m;
|
|
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
|
|
done
|
|
script:
|
|
- mkdir -p $DAMASKROOT
|
|
- mkdir -p $TESTROOT
|
|
- cd $DAMASKROOT
|
|
- 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
|
|
|
|
###################################################################################################
|
|
Pytest_python:
|
|
stage: python
|
|
script:
|
|
- cd $DAMASKROOT/python
|
|
- pytest --basetemp=${TESTROOT}/python -v
|
|
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
|
|
|
|
###################################################################################################
|
|
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_OrientationAverageMisorientation:
|
|
stage: postprocessing
|
|
script:
|
|
- OrientationAverageMisorientation/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
grid_mech_compile_Intel:
|
|
stage: compilePETSc
|
|
script:
|
|
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
|
- cd pytest
|
|
- pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_Intel
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Compile_FEM_Intel:
|
|
stage: compilePETSc
|
|
script:
|
|
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
|
- cd pytest
|
|
- pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_Intel
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
grid_mech_compile_GNU:
|
|
stage: compilePETSc
|
|
script:
|
|
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
|
|
- cd pytest
|
|
- pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_GNU
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Compile_FEM_GNU:
|
|
stage: compilePETSc
|
|
script:
|
|
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
|
|
- cd pytest
|
|
- pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_GNU
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Compile_Intel_Prepare:
|
|
stage: prepareGrid
|
|
script:
|
|
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
|
- cd $DAMASKROOT
|
|
- make clean grid processing
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Pytest_grid:
|
|
stage: grid
|
|
script:
|
|
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
|
- cd pytest
|
|
- pytest -k 'not compile' --basetemp=${TESTROOT}/fortran -v
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Thermal:
|
|
stage: grid
|
|
script: Thermal/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Nonlocal_Damage_DetectChanges:
|
|
stage: grid
|
|
script: Nonlocal_Damage_DetectChanges/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Plasticity_DetectChanges:
|
|
stage: grid
|
|
script: Plasticity_DetectChanges/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Phenopowerlaw_singleSlip:
|
|
stage: grid
|
|
script: Phenopowerlaw_singleSlip/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Marc_compileIfort:
|
|
stage: compileMarc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- cd pytest
|
|
- pytest -k 'compile and Marc' --basetemp=${TESTROOT}/compile_Marc
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Hex_elastic:
|
|
stage: marc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- Hex_elastic/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
CubicFCC_elastic:
|
|
stage: marc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- CubicFCC_elastic/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
CubicBCC_elastic:
|
|
stage: marc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- CubicBCC_elastic/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
J2_plasticBehavior:
|
|
stage: marc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- J2_plasticBehavior/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
Marc_elementLib:
|
|
stage: marc
|
|
script:
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
- Marc_elementLib/test.py
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
SpectralRuntime:
|
|
stage: performance
|
|
script:
|
|
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
|
|
- cd $DAMASKROOT
|
|
- make clean grid processing OPTIMIZATION=AGGRESSIVE
|
|
- cd $LOCAL_HOME/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 $LOCAL_HOME/performance
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
createTar:
|
|
stage: createPackage
|
|
script:
|
|
- cd $(mktemp -d)
|
|
- $DAMASKROOT/PRIVATE/releasing/deployMe.sh $CI_COMMIT_SHA
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
Python:
|
|
stage: createDocumentation
|
|
script:
|
|
- echo 'tbd one matesting1'
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
##################################################################################################
|
|
backupData:
|
|
stage: saveDocumentation
|
|
script:
|
|
- cd $LOCAL_HOME/performance # location of new runtime results
|
|
- git commit -am"${CI_PIPELINE_ID}_${CI_COMMIT_SHA}"
|
|
- mkdir $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}
|
|
- mv $LOCAL_HOME/performance/time.png $BACKUP/${CI_PIPELINE_ID}_${CI_COMMIT_SHA}/
|
|
- mv $LOCAL_HOME/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 "Removing data and lock of pipeline $CI_PIPELINE_ID"
|
|
script:
|
|
- rm -rf $LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID
|
|
- sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue # in case pipeline was manually (web GUI) restarted and releaseLock was performed already
|
|
except:
|
|
- master
|
|
- release
|
|
|
|
###################################################################################################
|
|
removeLock:
|
|
stage: releaseLock
|
|
before_script:
|
|
- echo "Removing lock of pipeline $CI_PIPELINE_ID"
|
|
when: always
|
|
script: sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue
|
|
except:
|
|
- master
|
|
- release
|