Skip to content

LeCAD-PEG/hexapic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heterogenous EXAscale Particle-In-Cell

CPU OpenMPI version with parallel I/O through openPMD with ADIOS2 backend.

Feature: 3D visualisation with pyqtgraph.

Dependency installation

See source/compile_HPCFS.sh or source/compile_VEGA.sh for the required modules before the installation of libraries on different HPCs.

ADIOS2

cd ~/
git clone https://github.com/ornladios/ADIOS2.git ADIOS2
cd ADIOS2
mkdir adios2-build
cd adios2-build
cmake ../ -DADIOS2_USE_MPI=ON -DADIOS2_USE_HDF5=OFF -DADIOS2_USE_Python=ON -DADIOS2_USE_SST=ON -DADIOS2_USE_BZip2=ON -DCMAKE_INSTALL_PREFIX=~/adios2/ # optional: -DBUILD_TESTING=ON
make -j8
# optional: ctest
make install

openPMD

cd ~/
git clone https://github.com/openPMD/openPMD-api.git
cd openPMD-api
mkdir openPMD-api-build
cd openPMD-api-build
cmake ../ -DopenPMD_USE_MPI=ON -DopenPMD_USE_HDF5=OFF -DopenPMD_USE_ADIOS2=ON -DopenPMD_USE_PYTHON=ON -DCMAKE_INSTALL_PREFIX=~/openpmd/ -DADIOS2_DIR=~/adios2/lib/cmake/adios2/ # optional: -DPYTHON_EXECUTABLE=/software/Python/3.11.3-GCCcore-12.3.0/bin/python -DPYTHON_INCLUDE_DIRS=/software/Python/3.11.3-GCCcore-12.3.0/include/python3.11
cmake --build .
# optional: ctest
cmake --build . --target install

Python modules

pip install numpy
pip install scipy
pip install pyqtgraph
pip install picmistandard

Compilation

HPCFS

cd source
source compile_HPCFS.sh
cd ../

VEGA

cd source
source compile_VEGA.sh
cd ../

Usage

Run the executable:

# optional: cp picmi/input_file.inp test/
mpiexec -n 4 source/HEXAPIC test/input_file.inp -steps Nsteps -dsteps Nskip
  • If -steps Nsteps is not provided, the simulation will run for 100 steps.
  • Create and save diagnostics output every Nskip steps. Default is 1.

Visualisation

Custom Python script

cd test/
python ../vis/vis3D-class.py input_file.inp.bp4

ParaView (version >= 5.13)

  1. Open ParaView
  2. Open > select .bp4 output.
  3. On dialog Open Data With... select ADIOS2CoreImageReader and press OK.
  4. On the lfet side, under Proeperties where arrays are located, select the arrays to plot. Do not mix cell-centered meshes (n, T, v) with node-centered meshes (V).
  5. Under Properties, on Image Dimension select one of your selected arrays.
  6. On Time step array select /data/meshes/time.
  7. Press Apply and wait for the data to load.
  8. Change Solid Color to any of the desired loaded arrays.
  9. Change Outline to Surface.
  10. Optional: press the play button to see the time evolution of the simulation.

Documentation

Documentation is available at: https://lecad-peg.github.io/hexapic/

About

Heterogeneous EXAscale Particle-In-Cell code for plasma simulations

Resources

License

Stars

Watchers

Forks

Packages

No packages published