| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,9 +3,12 @@ on: | |||
| 3 | 3 | workflow_dispatch: | |
| 4 | 4 | push: | |
| 5 | 5 | branches: | |
| 6 | - - main | ||
| 6 | + - master | ||
| 7 | 7 | pull_request: | |
| 8 | 8 | ||
| 9 | + env: | ||
| 10 | + TEST_OPTIONS: -DKokkos_ENABLE_CUDA=ON | ||
| 11 | + | ||
| 9 | 12 | jobs: | |
| 10 | 13 | Linter: | |
| 11 | 14 | # Don't do this in forks | |
@@ -17,7 +20,9 @@ jobs: | |||
| 17 | 20 | with: | |
| 18 | 21 | lfs: false | |
| 19 | 22 | - run: pre-commit install | |
| 20 | - - run: pre-commit run --all-files | ||
| 23 | + - name: Run linter | ||
| 24 | + id: linter | ||
| 25 | + run: pre-commit run --all-files | ||
| 21 | 26 | ||
| 22 | 27 | Hydrodynamics: | |
| 23 | 28 | needs: Linter | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,75 +8,77 @@ workflow: | |||
| 8 | 8 | - if: $CI_PIPELINE_SOURCE == 'web' # execute jobs when created by using Run pipeline button in the GitLab UI, from the project’s CI/CD > Pipelines section. | |
| 9 | 9 | ||
| 10 | 10 | stages: | |
| 11 | - - checks | ||
| 12 | - - deploy | ||
| 11 | + - linter | ||
| 12 | + - base_checks | ||
| 13 | + - advanced_checks | ||
| 14 | + - documentation | ||
| 13 | 15 | ||
| 14 | 16 | lint: | |
| 15 | - stage: checks | ||
| 17 | + stage: linter | ||
| 16 | 18 | image: lesurg/idefix:latest | |
| 17 | 19 | script: | |
| 18 | 20 | - pre-commit install | |
| 19 | 21 | - pre-commit run --all-files | |
| 20 | 22 | ||
| 21 | 23 | HD tests: | |
| 22 | - stage: checks | ||
| 24 | + stage: base_checks | ||
| 23 | 25 | image: lesurg/idefix:latest | |
| 24 | 26 | script: | |
| 25 | 27 | - cd test | |
| 26 | 28 | - ./checks_hydro.sh $TEST_OPTIONS | |
| 27 | 29 | ||
| 28 | 30 | MHD tests: | |
| 29 | - stage: checks | ||
| 31 | + stage: base_checks | ||
| 30 | 32 | image: lesurg/idefix:latest | |
| 31 | 33 | script: | |
| 32 | 34 | - cd test | |
| 33 | 35 | - ./checks_mhd.sh $TEST_OPTIONS | |
| 34 | 36 | ||
| 35 | - Vector potential tests: | ||
| 36 | - stage: checks | ||
| 37 | + MPI tests: | ||
| 38 | + stage: base_checks | ||
| 37 | 39 | image: lesurg/idefix:latest | |
| 38 | 40 | script: | |
| 39 | 41 | - cd test | |
| 40 | - - ./checks_vector_potential.sh $TEST_OPTIONS | ||
| 42 | + - ./checks_mpi.sh $TEST_OPTIONS | ||
| 41 | 43 | ||
| 42 | - MPI tests: | ||
| 43 | - stage: checks | ||
| 44 | + Vector potential tests: | ||
| 45 | + stage: base_checks | ||
| 44 | 46 | image: lesurg/idefix:latest | |
| 45 | 47 | script: | |
| 46 | 48 | - cd test | |
| 47 | - - ./checks_mpi.sh $TEST_OPTIONS | ||
| 49 | + - ./checks_vector_potential.sh $TEST_OPTIONS | ||
| 48 | 50 | ||
| 49 | 51 | HighOrder tests: | |
| 50 | - stage: checks | ||
| 52 | + stage: advanced_checks | ||
| 51 | 53 | image: lesurg/idefix:latest | |
| 52 | 54 | script: | |
| 53 | 55 | - cd test | |
| 54 | 56 | - ./checks_highorder.sh $TEST_OPTIONS | |
| 55 | 57 | ||
| 56 | 58 | SinglePrecision tests: | |
| 57 | - stage: checks | ||
| 59 | + stage: advanced_checks | ||
| 58 | 60 | image: lesurg/idefix:latest | |
| 59 | 61 | script: | |
| 60 | 62 | - cd test | |
| 61 | 63 | - ./checks_singleprecision.sh $TEST_OPTIONS | |
| 62 | 64 | ||
| 63 | 65 | Examples tests: | |
| 64 | - stage: checks | ||
| 66 | + stage: advanced_checks | ||
| 65 | 67 | image: lesurg/idefix:latest | |
| 66 | 68 | script: | |
| 67 | 69 | - cd test | |
| 68 | 70 | - ./checks_examples.sh $TEST_OPTIONS | |
| 69 | 71 | ||
| 70 | 72 | Utils tests: | |
| 71 | - stage: checks | ||
| 73 | + stage: advanced_checks | ||
| 72 | 74 | image: lesurg/idefix:latest | |
| 73 | 75 | script: | |
| 74 | 76 | - cd test | |
| 75 | 77 | - ./checks_utils.sh $TEST_OPTIONS | |
| 76 | 78 | ||
| 77 | 79 | pages: | |
| 78 | 80 | image: lesurg/idefix-documentation:latest | |
| 79 | - stage: deploy | ||
| 81 | + stage: documentation | ||
| 80 | 82 | script: | |
| 81 | 83 | - dir="public" | |
| 82 | 84 | - rm -rf $dir | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ void Analysis(DataBlock & data) { | |||
| 19 | 19 | }, Kokkos::Sum<double>(etot)); | |
| 20 | 20 | ||
| 21 | 21 | #ifdef WITH_MPI | |
| 22 | - MPI_Reduce(MPI_IN_LACE, &etot, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); | ||
| 22 | + MPI_Reduce(MPI_IN_PLACE, &etot, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); | ||
| 23 | 23 | #endif | |
| 24 | 24 | ||
| 25 | 25 | if(idfx::prank == 0) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,32 +35,45 @@ echo $IDEFIX_DIR | |||
| 35 | 35 | set -e | |
| 36 | 36 | options=$@ | |
| 37 | 37 | ||
| 38 | - # HD tests | ||
| 38 | + | ||
| 39 | + TMP_DIR="$(mktemp -d)" | ||
| 40 | + function finish () | ||
| 41 | + { | ||
| 42 | + echo $1 | ||
| 43 | + echo "Cleaning directory $TMP_DIR" | ||
| 44 | + cd $TEST_DIR | ||
| 45 | + rm -rf $TMP_DIR | ||
| 46 | + exit 1 | ||
| 47 | + } | ||
| 48 | + | ||
| 39 | 49 | for rep in $rep_example_list; do | |
| 40 | - TMP_DIR="$(mktemp -d)" | ||
| 50 | + | ||
| 41 | 51 | cp -R $TEST_DIR/$rep/* $TMP_DIR | |
| 42 | 52 | cd $TMP_DIR | |
| 43 | 53 | echo "***********************************************" | |
| 44 | 54 | echo "Configuring $rep" | |
| 45 | 55 | echo "Using $TMP_DIR as working directory" | |
| 46 | 56 | echo "***********************************************" | |
| 47 | - rm -f CMakeCache.txt | ||
| 48 | 57 | ||
| 49 | - cmake $IDEFIX_DIR $options || { echo "!!!! Example $rep failed during configuration"; exit 1; } | ||
| 58 | + cmake $IDEFIX_DIR $options || finish "!!!! Example $rep failed during configuration" | ||
| 50 | 59 | echo "***********************************************" | |
| 51 | 60 | echo "Making $rep" | |
| 52 | 61 | echo "***********************************************" | |
| 53 | - make clean; make -j 10 || { echo "!!!! Example $rep failed during compilation"; exit 1; } | ||
| 62 | + make -j 8 || finish "!!!! Example $rep failed during compilation" | ||
| 54 | 63 | ||
| 55 | 64 | ||
| 56 | 65 | echo "***********************************************" | |
| 57 | 66 | echo "Running $rep" | |
| 58 | 67 | echo "***********************************************" | |
| 59 | - ./idefix -maxcycles 10 -nowrite -Werror || { echo "!!!! Example $rep failed running"; exit 1; } | ||
| 68 | + ./idefix -maxcycles 10 -nowrite -Werror || finish "!!!! Example $rep failed running" | ||
| 60 | 69 | ||
| 61 | 70 | echo "***********************************************" | |
| 62 | 71 | echo "Cleaning $rep in $TMP_DIR" | |
| 63 | 72 | echo "***********************************************" | |
| 64 | - rm -rf $TMP_DIR | ||
| 73 | + rm -rf *.vtk *.dbl *.dmp *.ini python CMakeLists.txt | ||
| 65 | 74 | ||
| 66 | 75 | done | |
| 76 | + | ||
| 77 | + echo "Test was successfull" | ||
| 78 | + cd $TEST_DIR | ||
| 79 | + rm -rf $TMP_DIR | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,88 +30,96 @@ if [ -z ${var+IDEFIX_DIR} ] & [ -d "$IDEFIX_DIR" ] ; then | |||
| 30 | 30 | fi | |
| 31 | 31 | ||
| 32 | 32 | export IDEFIX_DIR=$target_dir | |
| 33 | - echo $IDEFIX_DIR | ||
| 34 | 33 | ||
| 35 | 34 | set -e | |
| 36 | 35 | options=$@ | |
| 37 | 36 | ||
| 37 | + TMP_DIR="$(mktemp -d)" | ||
| 38 | + function finish () | ||
| 39 | + { | ||
| 40 | + echo $1 | ||
| 41 | + echo "Cleaning directory $TMP_DIR" | ||
| 42 | + cd $TEST_DIR | ||
| 43 | + rm -rf $TMP_DIR | ||
| 44 | + exit 1 | ||
| 45 | + } | ||
| 46 | + | ||
| 38 | 47 | # High order tests | |
| 39 | 48 | for rep in $rep_list; do | |
| 40 | - TMP_DIR="$(mktemp -d)" | ||
| 41 | 49 | cp -R $TEST_DIR/$rep/* $TMP_DIR | |
| 42 | 50 | cd $TMP_DIR | |
| 43 | 51 | echo "***********************************************" | |
| 44 | 52 | echo "Configuring $rep" | |
| 45 | 53 | echo "Using $TMP_DIR as working directory" | |
| 46 | 54 | echo "***********************************************" | |
| 47 | - rm -f CMakeCache.txt | ||
| 48 | 55 | for order in $order_list; do | |
| 49 | 56 | ||
| 50 | - cmake $IDEFIX_DIR $options -DIdefix_RECONSTRUCTION=$order || { echo "!!!!$rep with $order failed during configuration"; exit 1; } | ||
| 57 | + cmake $IDEFIX_DIR $options -DIdefix_RECONSTRUCTION=$order || finish "!!!!$rep with $order failed during configuration" | ||
| 51 | 58 | echo "***********************************************" | |
| 52 | 59 | echo "Making $rep with $order" | |
| 53 | 60 | echo "***********************************************" | |
| 54 | - make clean; make -j 10 || { echo "!!!! $rep with $order failed during compilation with"; exit 1; } | ||
| 61 | + make -j 8 || finish "!!!! $rep with $order failed during compilation" | ||
| 55 | 62 | ||
| 56 | 63 | ini_files=$(ls *.ini) | |
| 57 | 64 | for ini in $ini_files; do | |
| 58 | 65 | echo "***********************************************" | |
| 59 | 66 | echo "Running $rep with $order and $ini" | |
| 60 | 67 | echo "***********************************************" | |
| 61 | - ./idefix -i $ini -nolog || { echo "!!!! $rep with $order failed running with $ini"; exit 1; } | ||
| 68 | + ./idefix -i $ini -nolog || finish "!!!! $rep with $order failed running with $ini" | ||
| 62 | 69 | ||
| 63 | 70 | cd python | |
| 64 | 71 | echo "***********************************************" | |
| 65 | 72 | echo "Testing $rep with $order and $ini" | |
| 66 | 73 | echo "***********************************************" | |
| 67 | - python3 testidefix.py -noplot || { echo "!!!! $rep with $order failed validation with $ini"; exit 1; } | ||
| 74 | + python3 testidefix.py -noplot || finish "!!!! $rep with $order failed validation with $ini" | ||
| 68 | 75 | cd .. | |
| 69 | 76 | done | |
| 70 | - make clean | ||
| 71 | 77 | rm -f *.vtk *.dbl *.dmp | |
| 72 | 78 | done | |
| 73 | 79 | echo "***********************************************" | |
| 74 | 80 | echo "Cleaning $rep in $TMP_DIR" | |
| 75 | 81 | echo "***********************************************" | |
| 76 | - rm -rf $TMP_DIR | ||
| 82 | + rm -rf *.vtk *.dbl *.dmp *.ini python CMakeLists.txt | ||
| 77 | 83 | done | |
| 78 | 84 | ||
| 79 | 85 | #do it with MPI (only the default .ini files though) | |
| 80 | 86 | # High order tests | |
| 81 | 87 | for rep in $rep_MPI_list; do | |
| 82 | - TMP_DIR="$(mktemp -d)" | ||
| 83 | 88 | cp -R $TEST_DIR/$rep/* $TMP_DIR | |
| 84 | 89 | cd $TMP_DIR | |
| 85 | 90 | echo "***********************************************" | |
| 86 | 91 | echo "Configuring $rep" | |
| 87 | 92 | echo "Using $TMP_DIR as working directory" | |
| 88 | 93 | echo "***********************************************" | |
| 89 | - rm -f CMakeCache.txt | ||
| 94 | + | ||
| 90 | 95 | for order in $order_list; do | |
| 91 | 96 | ||
| 92 | - cmake $IDEFIX_DIR $options -DIdefix_RECONSTRUCTION=$order -DIdefix_MPI=ON || { echo "!!!!$rep with $order failed during configuration"; exit 1; } | ||
| 97 | + cmake $IDEFIX_DIR $options -DIdefix_RECONSTRUCTION=$order -DIdefix_MPI=ON || finish "!!!!$rep with $order failed during configuration" | ||
| 93 | 98 | echo "***********************************************" | |
| 94 | 99 | echo "Making $rep with $order" | |
| 95 | 100 | echo "***********************************************" | |
| 96 | - make clean; make -j 10 || { echo "!!!! $rep with $order and MPI failed during compilation with"; exit 1; } | ||
| 101 | + make -j 8 || finish "!!!! $rep with $order and MPI failed during compilation with" | ||
| 97 | 102 | ||
| 98 | 103 | echo "***********************************************" | |
| 99 | 104 | echo "Running $rep with $order and MPI" | |
| 100 | 105 | echo "***********************************************" | |
| 101 | - mpirun -np 4 ./idefix || { echo "!!!! $rep with $order and MPI failed running "; exit 1; } | ||
| 106 | + mpirun -np 4 ./idefix || finish "!!!! $rep with $order and MPI failed running " | ||
| 102 | 107 | ||
| 103 | 108 | cd python | |
| 104 | 109 | echo "***********************************************" | |
| 105 | 110 | echo "Testing $rep with $order and MPI" | |
| 106 | 111 | echo "***********************************************" | |
| 107 | - python3 testidefix.py -noplot || { echo "!!!! $rep with $order and MPI failed validation"; exit 1; } | ||
| 112 | + python3 testidefix.py -noplot || finish "!!!! $rep with $order and MPI failed validation" | ||
| 108 | 113 | cd .. | |
| 109 | 114 | ||
| 110 | - make clean | ||
| 111 | 115 | rm -f *.vtk *.dbl *.dmp | |
| 112 | 116 | done | |
| 113 | 117 | echo "***********************************************" | |
| 114 | 118 | echo "Cleaning $rep in $TMP_DIR" | |
| 115 | 119 | echo "***********************************************" | |
| 116 | - rm -rf $TMP_DIR | ||
| 120 | + rm -rf *.vtk *.dbl *.dmp *.ini python CMakeLists.txt | ||
| 117 | 121 | done | |
| 122 | + | ||
| 123 | + echo "Test was successfull" | ||
| 124 | + cd $TEST_DIR | ||
| 125 | + rm -rf $TMP_DIR | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,43 +33,53 @@ set -e | |||
| 33 | 33 | options=$@ | |
| 34 | 34 | ||
| 35 | 35 | # HD tests | |
| 36 | + TMP_DIR="$(mktemp -d)" | ||
| 37 | + function finish () | ||
| 38 | + { | ||
| 39 | + echo $1 | ||
| 40 | + echo "Cleaning directory $TMP_DIR" | ||
| 41 | + cd $TEST_DIR | ||
| 42 | + rm -rf $TMP_DIR | ||
| 43 | + exit 1 | ||
| 44 | + } | ||
| 45 | + | ||
| 36 | 46 | for rep in $rep_HD_list; do | |
| 37 | - TMP_DIR="$(mktemp -d)" | ||
| 38 | 47 | cp -R $TEST_DIR/HD/$rep/* $TMP_DIR | |
| 39 | 48 | cd $TMP_DIR | |
| 40 | 49 | echo "***********************************************" | |
| 41 | 50 | echo "Configuring $rep" | |
| 42 | 51 | echo "Using $TMP_DIR as working directory" | |
| 43 | 52 | echo "***********************************************" | |
| 44 | - rm -f CMakeCache.txt | ||
| 45 | 53 | def_files=$(ls definitions*.hpp) | |
| 46 | 54 | for def in $def_files; do | |
| 47 | 55 | ||
| 48 | - cmake $IDEFIX_DIR $options -DIdefix_DEFS=$def|| { echo "!!!! HD $rep failed during configuration"; exit 1; } | ||
| 56 | + cmake $IDEFIX_DIR $options -DIdefix_DEFS=$def|| finish "!!!! HD $rep failed during configuration" | ||
| 49 | 57 | echo "***********************************************" | |
| 50 | 58 | echo "Making $rep with $def" | |
| 51 | 59 | echo "***********************************************" | |
| 52 | - make clean; make -j 10 || { echo "!!!! HD $rep failed during compilation with $def"; exit 1; } | ||
| 60 | + make -j 8 || finish "!!!! HD $rep failed during compilation with $def" | ||
| 53 | 61 | ||
| 54 | 62 | ini_files=$(ls *.ini) | |
| 55 | 63 | for ini in $ini_files; do | |
| 56 | 64 | echo "***********************************************" | |
| 57 | 65 | echo "Running $rep with $ini" | |
| 58 | 66 | echo "***********************************************" | |
| 59 | - ./idefix -i $ini -nolog || { echo "!!!! HD $rep failed running with $def and $ini"; exit 1; } | ||
| 67 | + ./idefix -i $ini -nolog || finish "!!!! HD $rep failed running with $def and $ini" | ||
| 60 | 68 | ||
| 61 | 69 | cd python | |
| 62 | 70 | echo "***********************************************" | |
| 63 | 71 | echo "Testing $rep with $ini and $def" | |
| 64 | 72 | echo "***********************************************" | |
| 65 | - python3 testidefix.py -noplot || { echo "!!!! HD $rep failed validation with $def and $ini"; exit 1; } | ||
| 73 | + python3 testidefix.py -noplot || finish "!!!! HD $rep failed validation with $def and $ini" | ||
| 66 | 74 | cd .. | |
| 67 | 75 | done | |
| 68 | - make clean | ||
| 69 | 76 | rm -f *.vtk *.dbl *.dmp | |
| 70 | 77 | done | |
| 71 | 78 | echo "***********************************************" | |
| 72 | 79 | echo "Cleaning $rep in $TMP_DIR" | |
| 73 | 80 | echo "***********************************************" | |
| 74 | - rm -rf $TMP_DIR | ||
| 81 | + rm -rf *.vtk *.dbl *.dmp *.ini python CMakeLists.txt | ||
| 75 | 82 | done | |
| 83 | + echo "Test was successfull" | ||
| 84 | + cd $TEST_DIR | ||
| 85 | + rm -rf $TMP_DIR | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments