2017-05-17 13:45:30 +05:30
|
|
|
---
|
2017-04-12 16:46:27 +05:30
|
|
|
stages:
|
2021-03-26 21:45:56 +05:30
|
|
|
- prepare
|
2019-12-03 21:19:27 +05:30
|
|
|
- python
|
2020-11-24 16:29:40 +05:30
|
|
|
- compile
|
2021-06-15 23:08:01 +05:30
|
|
|
- setup
|
2021-03-26 17:54:11 +05:30
|
|
|
- fortran
|
2017-05-09 03:22:07 +05:30
|
|
|
- performance
|
2021-03-26 21:45:56 +05:30
|
|
|
- deploy
|
|
|
|
- backup
|
|
|
|
- update_master
|
|
|
|
- distclean
|
2017-04-13 03:00:33 +05:30
|
|
|
- clean
|
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 ];
|
2017-05-18 20:37:19 +05:30
|
|
|
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
|
2018-09-06 21:37:40 +05:30
|
|
|
- echo Job start:" $(date)"
|
2017-04-12 16:46:27 +05:30
|
|
|
|
2018-09-06 19:48:06 +05:30
|
|
|
###################################################################################################
|
|
|
|
after_script:
|
2018-09-06 21:37:40 +05:30
|
|
|
- echo Job end:" $(date)"
|
2018-09-06 21:28:12 +05:30
|
|
|
|
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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
2021-10-29 01:06:04 +05:30
|
|
|
IntelCompiler: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
|
|
|
|
GNUCompiler: "Compiler/GNU/10"
|
2019-03-09 22:00:29 +05:30
|
|
|
# ++++++++++++ MPI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
2021-10-29 01:06:04 +05:30
|
|
|
MPI_Intel: "MPI/Intel/19.1.2/IntelMPI/2019"
|
|
|
|
MPI_GNU: "MPI/GNU/10/OpenMPI/4.1.1"
|
2019-03-09 22:00:29 +05:30
|
|
|
# ++++++++++++ PETSc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
2021-10-29 01:06:04 +05:30
|
|
|
PETSc_Intel: "Libraries/PETSc/3.16.0/Intel-19.1.2-IntelMPI-2019"
|
|
|
|
PETSc_GNU: "Libraries/PETSc/3.16.0/GNU-10-OpenMPI-4.1.1"
|
|
|
|
# ++++++++++++ MSC Marc +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
MSC: "FEM/MSC/2021.2"
|
|
|
|
IntelMarc: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
|
|
|
|
HDF5Marc: "HDF5/1.12.1/Intel-19.1.2"
|
2017-04-12 16:46:27 +05:30
|
|
|
|
|
|
|
###################################################################################################
|
2017-05-17 13:45:30 +05:30
|
|
|
checkout:
|
2021-03-26 21:45:56 +05:30
|
|
|
stage: prepare
|
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 ];
|
2017-05-18 20:37:19 +05:30
|
|
|
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
|
2021-07-15 18:59:21 +05:30
|
|
|
- git clone -q git@git.damask.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-13 19:36:35 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
2017-04-12 16:46:27 +05:30
|
|
|
|
2019-12-03 21:19:27 +05:30
|
|
|
###################################################################################################
|
2021-11-01 03:13:06 +05:30
|
|
|
pytest:
|
2019-12-03 21:19:27 +05:30
|
|
|
stage: python
|
|
|
|
script:
|
|
|
|
- cd $DAMASKROOT/python
|
2021-04-04 17:37:50 +05:30
|
|
|
- COLUMNS=256 pytest --basetemp=${TESTROOT}/python -v --cov --cov-report=term
|
2021-03-28 16:16:26 +05:30
|
|
|
- coverage report --fail-under=90
|
2019-12-03 21:19:27 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
2021-11-01 03:13:06 +05:30
|
|
|
mypy:
|
|
|
|
stage: python
|
|
|
|
script:
|
|
|
|
- cd $DAMASKROOT/python
|
2021-11-02 22:31:32 +05:30
|
|
|
- mypy damask/tensor.py damask/mechanics.py damask/seeds.py
|
2021-11-01 03:13:06 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
|
|
|
|
2017-04-13 19:36:35 +05:30
|
|
|
###################################################################################################
|
2020-11-24 16:29:40 +05:30
|
|
|
compile_grid_Intel:
|
|
|
|
stage: compile
|
2017-04-13 19:36:35 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
2020-10-05 22:36:19 +05:30
|
|
|
- cd pytest
|
2021-03-30 23:15:35 +05:30
|
|
|
- COLUMNS=256 pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_Intel
|
2017-04-13 19:36:35 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
2020-11-24 16:29:40 +05:30
|
|
|
compile_mesh_Intel:
|
|
|
|
stage: compile
|
2018-08-20 12:43:20 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
2020-10-05 22:36:19 +05:30
|
|
|
- cd pytest
|
2021-03-30 23:15:35 +05:30
|
|
|
- COLUMNS=256 pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_Intel
|
2018-08-20 12:43:20 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
2020-11-24 16:29:40 +05:30
|
|
|
compile_grid_GNU:
|
|
|
|
stage: compile
|
2017-04-13 19:36:35 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
2020-10-05 22:36:19 +05:30
|
|
|
- cd pytest
|
2021-03-30 23:15:35 +05:30
|
|
|
- COLUMNS=256 pytest -k 'compile and grid' --basetemp=${TESTROOT}/compile_grid_GNU
|
2017-04-13 19:36:35 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
2020-11-24 16:29:40 +05:30
|
|
|
compile_mesh_GNU:
|
|
|
|
stage: compile
|
2018-08-20 12:43:20 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $GNUCompiler $MPI_GNU $PETSc_GNU
|
2020-10-05 22:36:19 +05:30
|
|
|
- cd pytest
|
2021-03-30 23:15:35 +05:30
|
|
|
- COLUMNS=256 pytest -k 'compile and mesh' --basetemp=${TESTROOT}/compile_mesh_GNU
|
2018-08-20 12:43:20 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
2021-03-26 21:45:56 +05:30
|
|
|
compile_Marc:
|
2020-11-24 16:29:40 +05:30
|
|
|
stage: compile
|
|
|
|
script:
|
|
|
|
- module load $IntelMarc $HDF5Marc $MSC
|
|
|
|
- cd pytest
|
2021-03-30 23:15:35 +05:30
|
|
|
- COLUMNS=256 pytest -k 'compile and Marc' --basetemp=${TESTROOT}/compile_Marc
|
2020-11-24 16:29:40 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
2021-06-15 23:08:01 +05:30
|
|
|
|
|
|
|
###################################################################################################
|
2020-11-24 16:29:40 +05:30
|
|
|
setup_grid:
|
2021-06-15 23:08:01 +05:30
|
|
|
stage: setup
|
2017-04-19 14:20:07 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
2020-11-24 19:26:08 +05:30
|
|
|
- BUILD_DIR=$(mktemp -d)
|
2020-11-24 16:29:40 +05:30
|
|
|
- cd ${BUILD_DIR}
|
2020-11-24 19:26:08 +05:30
|
|
|
- cmake -DDAMASK_SOLVER=GRID -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
|
2020-11-24 16:29:40 +05:30
|
|
|
- make -j2 all install
|
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
|
|
|
setup_mesh:
|
2021-06-15 23:08:01 +05:30
|
|
|
stage: setup
|
2020-11-24 16:29:40 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
2020-11-24 23:21:19 +05:30
|
|
|
- BUILD_DIR=$(mktemp -d)
|
2020-11-24 16:29:40 +05:30
|
|
|
- cd ${BUILD_DIR}
|
2020-11-24 19:26:08 +05:30
|
|
|
- cmake -DDAMASK_SOLVER=MESH -DCMAKE_INSTALL_PREFIX=${DAMASKROOT} ${DAMASKROOT}
|
2020-11-24 16:29:40 +05:30
|
|
|
- make -j2 all install
|
2017-04-13 19:36:35 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
2017-05-17 13:45:30 +05:30
|
|
|
|
2017-04-13 19:36:35 +05:30
|
|
|
###################################################################################################
|
2021-03-26 21:45:56 +05:30
|
|
|
core:
|
2021-03-26 17:54:11 +05:30
|
|
|
stage: fortran
|
2020-09-25 11:45:22 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
2020-09-25 11:45:22 +05:30
|
|
|
- cd pytest
|
2021-03-30 23:15:35 +05:30
|
|
|
- COLUMNS=256 pytest -k 'not compile' --basetemp=${TESTROOT}/fortran -v
|
2020-09-25 11:45:22 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
2021-06-22 03:55:27 +05:30
|
|
|
# Needs closer look
|
2021-07-01 17:45:29 +05:30
|
|
|
# Phenopowerlaw_singleSlip:
|
|
|
|
# stage: fortran
|
|
|
|
# script: Phenopowerlaw_singleSlip/test.py
|
|
|
|
# except:
|
|
|
|
# - master
|
|
|
|
# - release
|
2021-06-22 03:55:27 +05:30
|
|
|
|
2017-05-09 03:22:07 +05:30
|
|
|
###################################################################################################
|
|
|
|
SpectralRuntime:
|
|
|
|
stage: performance
|
2017-04-12 16:46:27 +05:30
|
|
|
script:
|
2020-11-28 03:42:54 +05:30
|
|
|
- module load $IntelCompiler $MPI_Intel $PETSc_Intel
|
2017-04-13 03:00:33 +05:30
|
|
|
- cd $DAMASKROOT
|
2021-03-26 17:37:05 +05:30
|
|
|
- make clean grid OPTIMIZATION=AGGRESSIVE
|
2020-11-01 15:22:43 +05:30
|
|
|
- cd $LOCAL_HOME/performance # location of old results
|
2017-05-16 09:58:46 +05:30
|
|
|
- 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
|
2021-08-31 11:54:14 +05:30
|
|
|
- ./runtime.py --results ${LOCAL_HOME}/performance --damask_root ${DAMASKROOT} --tag ${CI_COMMIT_SHA}
|
2017-05-09 03:22:07 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
2017-05-17 13:45:30 +05:30
|
|
|
|
2018-07-10 16:34:32 +05:30
|
|
|
###################################################################################################
|
2021-03-26 21:45:56 +05:30
|
|
|
source_distribution:
|
|
|
|
stage: deploy
|
2018-07-10 16:34:32 +05:30
|
|
|
script:
|
|
|
|
- cd $(mktemp -d)
|
2021-10-07 19:50:25 +05:30
|
|
|
- $DAMASKROOT/PRIVATE/releasing/tar.xz/create.sh $DAMASKROOT $CI_COMMIT_SHA
|
2018-08-06 02:20:43 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
2018-07-10 16:34:32 +05:30
|
|
|
|
2017-05-12 13:09:33 +05:30
|
|
|
##################################################################################################
|
2021-03-26 21:45:56 +05:30
|
|
|
backup_runtime_measurement:
|
|
|
|
stage: backup
|
2017-05-12 13:09:33 +05:30
|
|
|
script:
|
2020-11-01 15:22:43 +05:30
|
|
|
- cd $LOCAL_HOME/performance # location of new runtime results
|
2017-05-16 09:58:46 +05:30
|
|
|
- git commit -am"${CI_PIPELINE_ID}_${CI_COMMIT_SHA}"
|
2021-09-05 12:16:32 +05:30
|
|
|
- git push
|
2017-05-16 06:46:27 +05:30
|
|
|
only:
|
|
|
|
- development
|
2017-05-12 13:09:33 +05:30
|
|
|
|
2017-05-09 03:22:07 +05:30
|
|
|
##################################################################################################
|
2021-03-26 21:45:56 +05:30
|
|
|
merge_into_master:
|
|
|
|
stage: update_master
|
2017-05-09 03:22:07 +05:30
|
|
|
script:
|
|
|
|
- cd $DAMASKROOT
|
|
|
|
- export TESTEDREV=$(git describe) # might be detached from development branch
|
2021-06-24 10:09:27 +05:30
|
|
|
- echo $TESTEDREV > python/damask/VERSION
|
2021-10-07 18:17:38 +05:30
|
|
|
- git add python/damask/VERSION
|
2021-07-01 17:45:29 +05:30
|
|
|
- >
|
|
|
|
git diff-index --quiet HEAD ||
|
2021-10-07 18:17:38 +05:30
|
|
|
git commit -m "[skip ci] updated version information after successful test of $TESTEDREV"
|
2017-05-09 03:22:07 +05:30
|
|
|
- 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
|
|
|
|
|
2017-04-13 03:00:33 +05:30
|
|
|
###################################################################################################
|
2021-03-26 21:45:56 +05:30
|
|
|
remove_data:
|
|
|
|
stage: distclean
|
2017-05-13 19:57:11 +05:30
|
|
|
before_script:
|
2020-09-12 18:55:37 +05:30
|
|
|
- echo "Removing data and lock of pipeline $CI_PIPELINE_ID"
|
2017-05-12 13:09:33 +05:30
|
|
|
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
|
2017-05-12 13:09:33 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|
|
|
|
|
|
|
|
###################################################################################################
|
2021-03-26 21:45:56 +05:30
|
|
|
remove_lock:
|
|
|
|
stage: clean
|
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"
|
2017-04-13 03:00:33 +05:30
|
|
|
when: always
|
2020-11-01 15:22:43 +05:30
|
|
|
script: sed -i "/$CI_PIPELINE_ID/d" $LOCAL_HOME/GitLabCI.queue
|
2017-04-13 19:36:35 +05:30
|
|
|
except:
|
|
|
|
- master
|
|
|
|
- release
|