Skip to content

Commit

Permalink
Merge branch 'dev' into fix-coarsens
Browse files Browse the repository at this point in the history
  • Loading branch information
lkotipal committed Nov 12, 2024
2 parents 825d8ea + bcb8ec4 commit 7602ea8
Show file tree
Hide file tree
Showing 39 changed files with 705 additions and 408 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate-reference-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: ursg/gcc-problem-matcher@master
- name: Compile vlasiator (Testpackage build)
run: |
srun -M carrington --job-name CI_ref_tp_compile --interactive --nodes=1 -n 1 -c 16 --mem=40G -p short -t 0:10:0 bash -c 'module purge; module load GCC/11.2.0; module load OpenMPI/4.1.1-GCC-11.2.0 ; module load PMIx/4.1.0-GCCcore-11.2.0; module load PAPI/6.0.0.1-GCCcore-11.2.0; export VLASIATOR_ARCH=carrington_gcc_openmpi; make -j 16 testpackage; sleep 10s'
srun -M carrington --job-name CI_ref_tp_compile --interactive --nodes=1 -n 1 -c 16 --mem=40G -p short -t 0:10:0 bash -c 'module purge; module load GCC/13.2.0; module load OpenMPI/4.1.6-GCC-13.2.0 ; module load PMIx/4.2.6-GCCcore-13.2.0; module load PAPI/7.1.0-GCCcore-13.2.0; export VLASIATOR_ARCH=carrington_gcc_openmpi; make -j 16 testpackage; sleep 10s'
- name: Make sure the output binary is visible in lustre
uses: nick-fields/retry@v3
with:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
submodules: false
- name: Download testpackage binary
uses: actions/download-artifact@v4
with:
Expand Down
68 changes: 63 additions & 5 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# Build libraries for the current version of the docker image
# (to be used in any subsequent compilation and run jobs on said image)
runs-on: ubuntu-latest
container: ursg/vlasiator_ci:20240131_1
container: ursg/vlasiator_ci:20241101_1

steps:
- name: Checkout source
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
build_production:
# Build Vlasiator with production flags
runs-on: ubuntu-latest
container: ursg/vlasiator_ci:20240131_1
container: ursg/vlasiator_ci:20241101_1
needs: build_libraries

steps:
Expand All @@ -124,6 +124,64 @@ jobs:
path: vlasiator
if-no-files-found: error

build_production_1st_order_time:
# Build Vlasiator with production flags
runs-on: ubuntu-latest
container: ursg/vlasiator_ci:20241101_1
needs: build_libraries

steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
- name: Download libraries
uses: actions/download-artifact@v4
with:
name: libraries
- name: Unpack libraries
run: tar --zstd -xvf libraries.tar.zstd
- uses: ursg/gcc-problem-matcher@master
- name: Compile vlasiator (Release build)
run: |
VLASIATOR_ARCH=github_actions make clean
VLASIATOR_ARCH=github_actions COMPFLAGS="-DFS_1ST_ORDER_TIME " make -j 3
- name: Upload release binary
uses: actions/upload-artifact@v4
with:
name: vlasiator-1st_order_time
path: vlasiator
if-no-files-found: error

build_production_1st_order_space:
# Build Vlasiator with production flags
runs-on: ubuntu-latest
container: ursg/vlasiator_ci:20241101_1
needs: build_libraries

steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
- name: Download libraries
uses: actions/download-artifact@v4
with:
name: libraries
- name: Unpack libraries
run: tar --zstd -xvf libraries.tar.zstd
- uses: ursg/gcc-problem-matcher@master
- name: Compile vlasiator (Release build)
run: |
VLASIATOR_ARCH=github_actions make clean
VLASIATOR_ARCH=github_actions COMPFLAGS="-DFS_1ST_ORDER_SPACE " make -j 3
- name: Upload release binary
uses: actions/upload-artifact@v4
with:
name: vlasiator-1st_order_space
path: vlasiator
if-no-files-found: error


build_testpackage:
# Build Vlasiator with testpackage flags, on the carrington cluster
Expand Down Expand Up @@ -339,7 +397,7 @@ jobs:
build_ionosphereTests:
# Build IonosphereSolverTests miniApp
runs-on: ubuntu-latest
container: ursg/vlasiator_ci:20240131_1
container: ursg/vlasiator_ci:20241101_1
needs: build_libraries
steps:
- name: Checkout source
Expand Down Expand Up @@ -375,7 +433,7 @@ jobs:

run_ionosphere_LFMtest:
runs-on: ubuntu-latest
container: ursg/vlasiator_ci:20240131_1
container: ursg/vlasiator_ci:20241101_1
needs: build_ionosphereTests
steps:
- name: Checkout source
Expand Down Expand Up @@ -420,7 +478,7 @@ jobs:

check_cfg_files:
runs-on: ubuntu-latest
container: ursg/vlasiator_ci:20240131_1
container: ursg/vlasiator_ci:20241101_1
needs: [build_libraries, build_production]
steps:
- name: Checkout source
Expand Down
2 changes: 1 addition & 1 deletion build_libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if [[ $PLATFORM != "-arriesgado" && $PLATFORM != "-appleM1" ]]; then # This fai
fi

# Build jemalloc
wget https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2
curl -O -L https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2
tar xjf jemalloc-5.3.0.tar.bz2
cd jemalloc-5.3.0
./configure --prefix=$WORKSPACE/libraries${PLATFORM} --with-jemalloc-prefix=je_ && make -j 4 && make install
Expand Down
31 changes: 30 additions & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,27 @@ namespace CellParams {
P_11, /*!< Pressure P_xx component, computed by Vlasov propagator. */
P_22, /*!< Pressure P_yy component, computed by Vlasov propagator. */
P_33, /*!< Pressure P_zz component, computed by Vlasov propagator. */
P_23, /*!< Pressure P_yz component, computed by Vlasov propagator. */
P_13, /*!< Pressure P_xz component, computed by Vlasov propagator. */
P_12, /*!< Pressure P_xy component, computed by Vlasov propagator. */
P_11_DT2, /*!< Intermediate step value for RK2 time stepping in field solver. Computed from P_11_R and P_11_V. */
P_22_DT2, /*!< Intermediate step value for RK2 time stepping in field solver. Computed from P_22_R and P_22_V. */
P_33_DT2, /*!< Intermediate step value for RK2 time stepping in field solver. Computed from P_33_R and P_33_V. */
P_23_DT2, /*!< Intermediate step value for RK2 time stepping in field solver. Computed from P_23_R and P_23_V. */
P_13_DT2, /*!< Intermediate step value for RK2 time stepping in field solver. Computed from P_13_R and P_13_V. */
P_12_DT2, /*!< Intermediate step value for RK2 time stepping in field solver. Computed from P_12_R and P_12_V. */
P_11_R, /*!< P_xx component after propagation in ordinary space */
P_22_R, /*!< P_yy component after propagation in ordinary space */
P_33_R, /*!< P_zz component after propagation in ordinary space */
P_23_R, /*!< P_yz component after propagation in ordinary space */
P_13_R, /*!< P_xz component after propagation in ordinary space */
P_12_R, /*!< P_xy component after propagation in ordinary space */
P_11_V, /*!< P_xx component after propagation in velocity space */
P_22_V, /*!< P_yy component after propagation in velocity space */
P_33_V, /*!< P_zz component after propagation in velocity space */
P_23_V, /*!< P_yz component after propagation in velocity space */
P_12_V, /*!< P_xy component after propagation in velocity space */
P_13_V, /*!< P_xz component after propagation in velocity space */
EXVOL, /*!< Volume electric field averaged over spatial cell, x-component.*/
EYVOL, /*!< Volume electric field averaged over spatial cell, y-component.*/
EZVOL, /*!< Volume electric field averaged over spatial cell, z-component.*/
Expand Down Expand Up @@ -209,11 +221,12 @@ namespace CellParams {
AMR_DB,
AMR_ALPHA1,
AMR_ALPHA2,
P_ANISOTROPY,
AMR_VORTICITY,
RECENTLY_REFINED,
BULKV_FORCING_X, /*! Externally forced drift velocity (ex. from the ionosphere) */
BULKV_FORCING_Y, /*! Externally forced drift velocity (ex. from the ionosphere) */
BULKV_FORCING_Z, /*! Externally forced drift velocity (ex. from the ionosphere) */
FORCING_CELL_NUM, /*! Number of boundary cells that have forced a bulkv here */
N_SPATIAL_CELL_PARAMS
};
}
Expand All @@ -236,6 +249,22 @@ namespace bvolderivatives {
};
}

namespace vderivatives {
// Essentially a copy from dmoments
enum {
dVxdx, /*!< Derivative of volume-averaged Vx to x-direction. */
dVxdy, /*!< Derivative of volume-averaged Vx to y-direction. */
dVxdz, /*!< Derivative of volume-averaged Vx to z-direction. */
dVydx, /*!< Derivative of volume-averaged Vy to x-direction. */
dVydy, /*!< Derivative of volume-averaged Vy to y-direction. */
dVydz, /*!< Derivative of volume-averaged Vy to z-direction. */
dVzdx, /*!< Derivative of volume-averaged Vz to x-direction. */
dVzdy, /*!< Derivative of volume-averaged Vz to y-direction. */
dVzdz, /*!< Derivative of volume-averaged Vz to z-direction. */
N_V_DERIVATIVES
};
}

// FsGrid< std::array<Real, fsgrids::bfield::N_BFIELD>, FS_STENCIL_WIDTH> & perBGrid,
// FsGrid< std::array<Real, fsgrids::bfield::N_BFIELD>, FS_STENCIL_WIDTH> & perBDt2Grid,
// FsGrid< std::array<Real, fsgrids::efield::N_EFIELD>, FS_STENCIL_WIDTH> & EGrid,
Expand Down
16 changes: 15 additions & 1 deletion datareduction/datareducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2962,7 +2962,21 @@ void initializeDataReducers(DataReducer * outputReducer, DataReducer * diagnosti
}
if(P::systemWriteAllDROs || lowercase == "vg_amr_alpha2") {
outputReducer->addOperator(new DRO::DataReductionOperatorCellParams("vg_amr_alpha2",CellParams::AMR_ALPHA2,1));
outputReducer->addMetadata(outputReducer->size()-1,"","","$\\alpha_2","");
outputReducer->addMetadata(outputReducer->size()-1,"","","$\\alpha_2$","");
if(!P::systemWriteAllDROs) {
continue;
}
}
if(P::systemWriteAllDROs || lowercase == "vg_pressure_anisotropy") {
outputReducer->addOperator(new DRO::DataReductionOperatorCellParams("vg_pressure_anisotropy",CellParams::P_ANISOTROPY,1));
outputReducer->addMetadata(outputReducer->size()-1,"","","$P_\\perp / P_\\parallel$","");
if(!P::systemWriteAllDROs) {
continue;
}
}
if(P::systemWriteAllDROs || lowercase == "vg_amr_vorticity") {
outputReducer->addOperator(new DRO::DataReductionOperatorCellParams("vg_amr_vorticity",CellParams::AMR_VORTICITY,1));
outputReducer->addMetadata(outputReducer->size()-1,"","","Vorticity","");
if(!P::systemWriteAllDROs) {
continue;
}
Expand Down
Loading

0 comments on commit 7602ea8

Please sign in to comment.