DAMASK_EICMD/.gitlab-ci.yml

428 lines
13 KiB
YAML
Raw Normal View History

2017-05-17 13:45:30 +05:30
---
2017-04-12 16:46:27 +05:30
stages:
- prepareAll
- python
2020-11-24 17:54:53 +05:30
- deprecated
- compile
2019-03-26 13:57:55 +05:30
- grid
- marc
2017-05-09 03:22:07 +05:30
- performance
- createPackage
2017-04-12 16:46:27 +05:30
- createDocumentation
- saveDocumentation
- updateMaster
- clean
- releaseLock
2017-04-12 16:46:27 +05:30
###################################################################################################
before_script:
2020-11-01 15:22:43 +05:30
- if [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue)x == 'x' ];
then echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue;
2017-05-17 13:45:30 +05:30
fi
2020-11-01 15:22:43 +05:30
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
do sleep 5m;
2020-11-01 15:22:43 +05:30
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
2017-05-17 13:45:30 +05:30
done
2017-05-20 19:06:56 +05:30
- source $DAMASKROOT/env/DAMASK.sh
2017-04-12 16:46:27 +05:30
- cd $DAMASKROOT/PRIVATE/testing
- echo Job start:" $(date)"
2017-04-12 16:46:27 +05:30
###################################################################################################
after_script:
- echo Job end:" $(date)"
2017-04-12 16:46:27 +05:30
###################################################################################################
variables:
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2017-04-12 16:46:27 +05:30
# GitLab Settings
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2017-04-12 16:46:27 +05:30
GIT_SUBMODULE_STRATEGY: none
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2017-04-12 16:46:27 +05:30
# Shortcut names
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2020-11-01 15:22:43 +05:30
DAMASKROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/DAMASK"
2020-11-01 17:28:41 +05:30
TESTROOT: "$LOCAL_HOME/GitLabCI_Pipeline_$CI_PIPELINE_ID/tests"
2017-04-12 16:46:27 +05:30
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2017-04-12 16:46:27 +05:30
# Names of module files to load
2017-05-17 13:45:30 +05:30
# ===============================================================================================
2019-03-09 22:00:29 +05:30
# ++++++++++++ Compiler +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2020-11-26 12:42:35 +05:30
IntelCompiler19_1: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
GNUCompiler10: "Compiler/GNU/10"
2017-04-12 16:46:27 +05:30
# ------------ Defaults ----------------------------------------------
2020-11-26 12:42:35 +05:30
IntelCompiler: "$IntelCompiler19_1"
GNUCompiler: "$GNUCompiler10"
2019-03-09 22:00:29 +05:30
# ++++++++++++ MPI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2020-11-26 12:42:35 +05:30
IMPI2020Intel19_1: "MPI/Intel/19.1/IntelMPI/2020"
OMPI4_0GNU10: "MPI/GNU/10/OpenMPI/4.0.5"
2017-04-12 16:46:27 +05:30
# ------------ Defaults ----------------------------------------------
2020-11-26 12:42:35 +05:30
MPI_Intel: "$IMPI2020Intel19_1"
MPI_GNU: "$OMPI4_0GNU10"
2019-03-09 22:00:29 +05:30
# ++++++++++++ PETSc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2020-11-26 12:42:35 +05:30
PETSc3_14_0IMPI2020Intel19_1: "Libraries/PETSc/3.14.0/Intel-19.1-IntelMPI-2020"
PETSc3_14_0OMPI4_0GNU10: "Libraries/PETSc/3.14.0/GNU-10-OpenMPI-4.0.5"
2017-04-12 16:46:27 +05:30
# ------------ Defaults ----------------------------------------------
2020-11-26 12:42:35 +05:30
PETSc_MPICH_Intel: "$PETSc3_14_0IMPI2020Intel19_1"
PETSc_MPICH_GNU: "$PETSc3_14_0OMPI4_0GNU10"
2019-03-09 22:00:29 +05:30
# ++++++++++++ commercial FEM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2020-11-26 12:42:35 +05:30
MSC2020: "FEM/MSC/2020"
2017-04-12 16:46:27 +05:30
# ------------ Defaults ----------------------------------------------
2020-11-26 12:42:35 +05:30
MSC: "$MSC2020"
IntelMarc: "$IntelCompiler19_1"
HDF5Marc: "HDF5/1.12.0/Intel-19.1.2"
2017-04-12 16:46:27 +05:30
###################################################################################################
2017-05-17 13:45:30 +05:30
checkout:
2017-04-12 16:46:27 +05:30
stage: prepareAll
2017-05-17 13:45:30 +05:30
before_script:
2020-11-01 15:22:43 +05:30
- echo $CI_PIPELINE_ID >> $LOCAL_HOME/GitLabCI.queue
- while [ $(awk "/$CI_PIPELINE_ID/{print NR}" $LOCAL_HOME/GitLabCI.queue) != 1 ];
do sleep 5m;
2020-11-01 15:22:43 +05:30
echo -e "Currently queued pipelines:\n$(cat $LOCAL_HOME/GitLabCI.queue)\n";
2017-05-17 13:45:30 +05:30
done
2017-04-12 16:46:27 +05:30
script:
2017-04-12 17:58:42 +05:30
- mkdir -p $DAMASKROOT
2020-11-01 17:28:41 +05:30
- mkdir -p $TESTROOT
2017-04-13 11:25:37 +05:30
- cd $DAMASKROOT
- git clone -q git@magit1.mpie.de:damask/DAMASK.git .
2017-04-13 11:25:37 +05:30
- git checkout $CI_COMMIT_SHA
2017-04-15 16:28:13 +05:30
- git submodule update --init
2017-05-20 19:06:56 +05:30
- source env/DAMASK.sh
2017-04-18 08:59:00 +05:30
- make processing
except:
- master
- release
2017-04-12 16:46:27 +05:30
###################################################################################################
Pytest_python:
stage: python
script:
- cd $DAMASKROOT/python
2020-11-01 17:28:41 +05:30
- pytest --basetemp=${TESTROOT}/python -v
except:
- master
- release
2017-04-12 16:46:27 +05:30
###################################################################################################
Pre_SeedGeneration:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: PreProcessing_SeedGeneration/test.py
except:
- master
- release
Pre_GeomGeneration:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: PreProcessing_GeomGeneration/test.py
except:
- master
- release
Pre_GeomModification:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: PreProcessing_GeomModification/test.py
except:
- master
- release
Pre_General:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: PreProcessing/test.py
except:
- master
- release
Post_General:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: PostProcessing/test.py
except:
- master
- release
Post_GeometryReconstruction:
2020-11-24 17:54:53 +05:30
stage: deprecated
2019-03-26 13:57:55 +05:30
script: spectral_geometryReconstruction/test.py
except:
- master
- release
Post_addCurl:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: addCurl/test.py
except:
- master
- release
Post_addDivergence:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: addDivergence/test.py
except:
- master
- release
Post_addGradient:
2020-11-24 17:54:53 +05:30
stage: deprecated
script: addGradient/test.py
except:
- master
- release
Post_OrientationAverageMisorientation:
2020-11-24 17:54:53 +05:30
stage: deprecated
script:
- OrientationAverageMisorientation/test.py
except:
- master
- release
###################################################################################################
compile_grid_Intel:
stage: compile
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
2020-10-05 22:36:19 +05:30
- cd pytest
2020-11-01 17:28:41 +05:30
- pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_Intel
except:
- master
- release
compile_mesh_Intel:
stage: compile
2018-08-20 12:43:20 +05:30
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
2020-10-05 22:36:19 +05:30
- cd pytest
2020-11-01 17:28:41 +05:30
- pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_Intel
2018-08-20 12:43:20 +05:30
except:
- master
- release
compile_grid_GNU:
stage: compile
script:
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
2020-10-05 22:36:19 +05:30
- cd pytest
2020-11-01 17:28:41 +05:30
- pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_GNU
except:
- master
- release
compile_mesh_GNU:
stage: compile
2018-08-20 12:43:20 +05:30
script:
- module load $GNUCompiler $MPICH_GNU $PETSc_MPICH_GNU
2020-10-05 22:36:19 +05:30
- cd pytest
2020-11-01 17:28:41 +05:30
- pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_GNU
2018-08-20 12:43:20 +05:30
except:
- master
- release
compile_MARC:
stage: compile
script:
- module load $IntelMarc $HDF5Marc $MSC
- cd pytest
- pytest -k 'compile and Marc' --basetemp=${TESTROOT}/compile_Marc
except:
- master
- release
setup_grid:
stage: compile
2017-04-19 14:20:07 +05:30
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
2020-11-24 19:26:08 +05:30
- BUILD_DIR=$(mktemp -d)
- cd ${BUILD_DIR}
2020-11-24 19:26:08 +05:30
- cmake -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
- make -j2 all install
except:
- master
- release
setup_mesh:
stage: compile
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
2020-11-24 23:21:19 +05:30
- BUILD_DIR=$(mktemp -d)
- cd ${BUILD_DIR}
2020-11-24 19:26:08 +05:30
- cmake -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
- make -j2 all install
except:
- master
- release
2017-05-17 13:45:30 +05:30
###################################################################################################
2020-09-25 11:45:22 +05:30
Pytest_grid:
stage: grid
script:
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- cd pytest
2020-11-01 17:28:41 +05:30
- pytest -k 'not compile' --basetemp=${TESTROOT}/fortran -v
2020-09-25 11:45:22 +05:30
except:
- master
- release
Thermal:
2019-03-26 13:57:55 +05:30
stage: grid
script: Thermal/test.py
except:
- master
- release
Nonlocal_Damage_DetectChanges:
2019-03-26 13:57:55 +05:30
stage: grid
script: Nonlocal_Damage_DetectChanges/test.py
except:
- master
- release
Plasticity_DetectChanges:
2019-03-26 13:57:55 +05:30
stage: grid
script: Plasticity_DetectChanges/test.py
except:
- master
- release
Phenopowerlaw_singleSlip:
2019-03-26 13:57:55 +05:30
stage: grid
script: Phenopowerlaw_singleSlip/test.py
except:
- master
- release
2019-09-19 23:23:52 +05:30
###################################################################################################
Hex_elastic:
stage: marc
script:
2019-03-09 22:00:29 +05:30
- module load $IntelMarc $HDF5Marc $MSC
- Hex_elastic/test.py
except:
- master
- release
CubicFCC_elastic:
stage: marc
script:
2019-03-09 22:00:29 +05:30
- module load $IntelMarc $HDF5Marc $MSC
- CubicFCC_elastic/test.py
except:
- master
- release
CubicBCC_elastic:
stage: marc
script:
2019-03-09 22:00:29 +05:30
- module load $IntelMarc $HDF5Marc $MSC
- CubicBCC_elastic/test.py
except:
- master
- release
J2_plasticBehavior:
stage: marc
script:
2019-03-09 22:00:29 +05:30
- 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
2017-05-09 03:22:07 +05:30
###################################################################################################
SpectralRuntime:
stage: performance
2017-04-12 16:46:27 +05:30
script:
2017-05-09 03:22:07 +05:30
- module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel
- cd $DAMASKROOT
2019-03-26 13:57:55 +05:30
- make clean grid processing OPTIMIZATION=AGGRESSIVE
2020-11-01 15:22:43 +05:30
- cd $LOCAL_HOME/performance # location of old results
- git checkout . # undo any changes (i.e. run time data from non-development branch)
2017-05-09 03:22:07 +05:30
- cd $DAMASKROOT/PRIVATE/testing
2020-11-01 15:22:43 +05:30
- SpectralAll_runtime/test.py -d $LOCAL_HOME/performance
2017-05-09 03:22:07 +05:30
except:
- master
- release
2017-05-17 13:45:30 +05:30
###################################################################################################
createTar:
stage: createPackage
script:
- cd $(mktemp -d)
- $DAMASKROOT/PRIVATE/releasing/deployMe.sh $CI_COMMIT_SHA
2018-08-06 02:20:43 +05:30
except:
- master
- release
2017-04-12 16:46:27 +05:30
###################################################################################################
2020-11-01 15:20:03 +05:30
Python:
2017-04-12 16:46:27 +05:30
stage: createDocumentation
script:
2020-11-01 15:20:03 +05:30
- echo 'tbd one matesting1'
2019-02-17 12:30:26 +05:30
except:
- master
- release
##################################################################################################
2017-05-17 13:45:30 +05:30
backupData:
stage: saveDocumentation
script:
2020-11-01 15:22:43 +05:30
- 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}
2020-11-01 15:22:43 +05:30
- 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
2017-05-09 03:22:07 +05:30
##################################################################################################
2017-05-17 13:45:30 +05:30
mergeIntoMaster:
2017-05-09 03:22:07 +05:30
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:
2020-09-12 18:55:37 +05:30
- echo "Removing data and lock of pipeline $CI_PIPELINE_ID"
script:
2020-11-01 15:22:43 +05:30
- 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
###################################################################################################
2017-05-17 13:45:30 +05:30
removeLock:
stage: releaseLock
2017-05-17 13:45:30 +05:30
before_script:
2020-09-12 18:55:37 +05:30
- echo "Removing lock of pipeline $CI_PIPELINE_ID"
when: always
2020-11-01 15:22:43 +05:30
script: sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue
except:
- master
- release