Giter VIP home page Giter VIP logo

entity-toolkit / entity Goto Github PK

View Code? Open in Web Editor NEW
22.0 5.0 2.0 46.89 MB

New generation astrophysical plasma simulation code with CPU/GPU portability

Home Page: https://entity-toolkit.github.io/wiki/

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.16% Python 4.38% C++ 82.30% C 8.62% Dockerfile 0.11% CMake 3.43%
astrophysics gpu kokkos particle-in-cell plasma pppl princeton simulation

entity's Introduction

Entity a.k.a. ntt

One particle-in-cell code to rule them all. Find our detailed documentation here.

License

Dev team (alphabetical)

๐Ÿต Benjamin Crinquand {@bcrinquand: GRPIC, cubed-sphere}

๐Ÿง‹ Alisa Galishnikova {@alisagk: GRPIC}

โ˜• Hayk Hakobyan {@haykh: framework, PIC, GRPIC, cubed-sphere}

๐Ÿฅ” Jens Mahlmann {@jmahlmann: framework, MPI, cubed-sphere}

๐Ÿฌ Sasha Philippov {@sashaph: all-around}

๐Ÿคท Arno Vanthieghem {@vanthieg: framework, PIC}

๐Ÿ˜บ Muni Zhou {@munizhou: PIC}

State of things

  • Framework

    • Metrics
      • Minkowski (SR)
      • Spherical/Qspherical (SR)
      • Kerr-Schild/QKerr-Schild, zero-mass Kerr-Schild (GR)
      • virtual inheritance of metric classes
    • Output
      • Fields/currents (SR/GR)
      • Moments (SR)
      • Moments (GR)
      • Particles (SR/GR)
      • Energy distributions (SR/GR)
      • Particle tracking (SR/GR)
    • Extra physics
      • Radiation (synchrotron/IC)
      • QED
    • MPI
      • restructure meshblocks
      • rewrite fieldsolvers (addressing + ranges)
  • SR (minkowski)

    • fieldsolver (1D/2D/3D)
    • pusher (1D/2D/3D)
    • deposit (1D/2D/3D)
    • filtering (1D/2D/3D)
  • SR (spherical)

    • fieldsolver (2D)
    • pusher (2D)
    • deposit (2D)
    • filtering (2D)
  • GR (spherical)

    • fieldsolver (2D)
    • pusher (2D)
    • deposit (2D)
    • filtering (2D)

Known bugs / minor issues to fix

...

To keep the code clean, readable and easy to debug we employ some of the c++ best practices described in details in the following online manual. Basically, if there is any ambiguity on how to implement something, it's a good start to first look if there is any "best practice" solution offered in that manual.

Unit testing

A limited number of unit tests are now available. To compile/run them:

cmake -B build -D TESTS=ON
cd build
make -j
cd tests && ctest -j

Tests are automatically run when on pull requests to the master branch.

Third-party libraries

  1. Kokkos: for CPU/GPU portability
  2. adios2: for output
  3. fmt: for string formatting

Dependencies

While we try to keep the code as compatible as possible, there are certain stringent requirements we impose.

  1. cmake>=3.16: for configuration (verify: cmake --version);
  2. icx>=19.1 or gcc>=8.3.1 with c++17 support (verify: [icx|gcc] -std=c++17 -v; optionally nvcc compilers: nvcc --version).

entity's People

Contributors

haykh avatar jmahlmann avatar vanthieg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

entity's Issues

GR | version 0.9

  • Fieldsolver
    • added (compiles)
    • tested
  • Particle pusher
    • added (compiles)
    • tested
  • Current deposit
    • added (compiles)
    • tested
  • Output
    • added (compiles)
    • tested

Segmentation fault

I'm testing the code using weibel.toml file as input
code build with
" cmake ../ -B build -D output=ON -D pgen=weibel -D engine=pic -D precision=double -DKokkos_ENABLE_OPENMP=ON"
In the file weibel.toml, when resolution = [512, 512] or larger than 512
I got error:
/tmp/slurmd/job29753857/slurm_script: line 17: 771687 Segmentation fault (core dumped) ./build/src/entity.xc -input ./weibel.toml

All the maxnparts are set to 1e6 to reduce running time, others remained as defaults.

compile with clang 13.0.0

1.In the file entity/framework/utils/qmath.h: line 58 & line 78:
Clang can't find matched template for the two instantiations and gives out errors. Removing the key word "Inline" solves the issue. While gcc is not having any problem compiling this.

2.In the file entity/framework/meshblock/meshblock.cpp: line 128:
if ((field == FieldID::Charge) && AlmostEqual(charge, ZERO)) {
Variable "charge" is float while "ZERO" is double when double_precision is defined.
This raises an ambiguity when using AlmostEqual() because only pure float and pure double versions are defined.
Clang don't like this and gives out an error while gcc only gives out an warning.
I changed it to:
if ((field == FieldID::Charge) && AlmostEqual(charge, static_cast(ZERO))) {

Clean up GR branches

@alisagk @bcrinquand could you guys clean up the GR branches and merge into one? ideally, a working version would be merged into dev/latest. Also, we'll need to remove the output files from the commits (see data/)

compile error

Error occurs when building with GPU codes
when only built with openmp, it works fine, also works for gpu on other computers, I don't get it

ibentity-framework.a(output_flds.cpp.o): In function ntt::OutputField::initialize(ntt::SimulationEngine const&)': tmpxft_001fda24_00000000-6_output_flds.cudafe1.cpp:(.text+0x74): multiple definition of ntt::OutputField::initialize(ntt::SimulationEngine const&)'
libentity-framework.a(engines.cpp.o):tmpxft_001fd9e9_00000000-6_engines.cudafe1.cpp:(.text+0x92): first defined here
libentity-framework.a(output_flds.cpp.o): In function ntt::OutputField::name[abi:cxx11](int const&) const': tmpxft_001fda24_00000000-6_output_flds.cudafe1.cpp:(.text+0x14c0): multiple definition of ntt::OutputField::name[abi:cxx11](int const&) const'
libentity-framework.a(engines.cpp.o):tmpxft_001fd9e9_00000000-6_engines.cudafe1.cpp:(.text+0x14de): first defined here
libentity-framework.a(fields.cpp.o): In function ntt::Fields<(ntt::Dimension)1, (ntt::SimulationEngine)2>::Fields(std::vector<unsigned int, std::allocator<unsigned int> >)': tmpxft_001fd9b6_00000000-6_fields.cudafe1.cpp:(.text+0x92): multiple definition of ntt::Fields<(ntt::Dimension)1, (ntt::SimulationEngine)2>::Fields(std::vector<unsigned int, std::allocator >)'
libentity-framework.a(engines.cpp.o):tmpxft_001fd9e9_00000000-6_engines.cudafe1.cpp:(.text+0x16e4): first defined here
libentity-framework.a(fields.cpp.o): In function ntt::Fields<(ntt::Dimension)1, (ntt::SimulationEngine)2>::Fields(std::vector<unsigned int, std::allocator<unsigned int> >)': tmpxft_001fd9b6_00000000-6_fields.cudafe1.cpp:(.text+0x92): multiple definition of ntt::Fields<(ntt::Dimension)1, (ntt::SimulationEngine)2>::Fields(std::vector<unsigned int, std::allocator >)'
libentity-framework.a(engines.cpp.o):tmpxft_001fd9e9_00000000-6_engines.cudafe1.cpp:(.text+0x16e4): first defined here
libentity-framework.a(fields.cpp.o): In function `ntt::Fields<(ntt::Dimension)2, (ntt::SimulationEngine)2>::Fields(std::vector<unsigned int, std::allocator >)':

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.