Giter Site home page Giter Site logo

arcaneframework / framework Goto Github PK

View Code? Open in Web Editor NEW
27.0 5.0 13.0 27.71 MB

The Arcane Framework for HPC codes

Home Page: https://arcaneframework.github.io/arcane/userdoc/html/index.html

License: Apache License 2.0

CMake 3.20% C++ 87.46% C 0.60% C# 5.78% Arc 2.06% SWIG 0.49% Shell 0.06% Makefile 0.02% Python 0.10% GLSL 0.03% Cuda 0.11% Assembly 0.01% Fortran 0.06% Perl 0.01% Dockerfile 0.01%
hpc cpp parallel-computing

framework's Introduction

Written by CEA/IFPEN and Contributors

(C) Copyright 2000-2024 CEA/IFPEN. All rights reserved.

All content is the property of the respective authors or their employers.

For more information regarding authorship of content, please consult the listed source code repository logs.


Arcane Framework

Development platform for unstructured 2D or 3D parallel computing codes.

GitHub GitHub all releases GitHub commit activity GitHub code size in bytes Codecov Codacy grade Coverity Scan

Arcane is a development environment for parallel numerical calculation codes. It supports the architectural aspects of a calculation code, such as data structures for meshing and parallelism, as well as more environment-related aspects such as dataset configuration.


Table of Contents:

Documentation

The documentation is available online and is generated and stored in this GitHub repository.

User documentation

This documentation is intended for Arcane users.

Developer documentation

This documentation is intended for Arcane developers.

Alien documentation

This documentation is intended for Alien users and developers.

Changelog

The changelog is available in the documentation or in this repository.

Key features

Massively parallel
  • Work on simple laptop or on a supercomputer (run case on more than 100k CPU core)
  • Domain partitioning with message-passing (MPI, Shared Memory or hydrid MPI/Shared Memory)
  • Unified Accelerator API (experimental)
    • CUDA
    • ROCM
    • SYCL (experimental)
    • oneTBB (experimental)
  • Basic support for explicit vectorization
  • Automatic Load Balancing with cell migration with several mesh partitioner
    • ParMetis
    • PTScotch
    • Zoltan
I/O
  • Supported input mesh file type:
    • VTK Legacy (2.0 and 4.2)
    • VTK VTU
    • Lima
    • MED
    • xmf
    • Gmsh (4.1)
  • Post-processing with the following supported output file type:
    • VTKHDF (V1 and V2)
    • Ensight7Gold
  • Time history curves
  • Support for checkpoint/restarting for long simulation
Mesh entities
  • Multiple mesh entities (items) are usable in Arcane:
    • Node (0D), Edge (1D), Face and Cells
    • Particle
    • DoF (Degree of freedom)
  • Full Connectivities between items (cell to node, node to edge, ...)
  • Support for user connectivities
  • Easy-to-use Arcane mesh variables on any kind of item
    • double, Int32, Int64, ..
    • Scalar, 1D, 2D or multi-dim
    • and many more...
  • Several kind of meshes are supported (1D, 2D and 3D)
    • unstructured
    • unstructured with adaptative refinement
    • cartesian (experimental)
    • cartesian with patch refinement (AMR) (experimental)
    • polyedral mesh (any number of edges/faces per cell)
  • Meshes are fully dynamic (adding/removing cells)
  • All the connectivities and variables are usable on accelerators
Multi-constituents support
  • Two levels of constituents (environment and materials)
  • Any cell variable may have values par constituant
Performance and Verification and Validation
  • Bit-to-bit comparison for Arcane variables
  • Between-synchronizations comparing
  • Unit test system integration
  • Automatic profiling of loops using accelerator API
  • Automatic profiling with sampling using Papi library or signal using SIGPROF
  • Automatic use of CUDA CUPTI library to track unified memory (USM) moves between host and device
Decoupled and extensible framework
  • Handling of case options via a descriptor file based on XML (axl files)
  • Automatic generation of documentation
  • Notion of Service (plugin) with separated interface/implementation to extend functionalities
  • Notion of independant Modules to enable modularity
  • Limited usage of C++ templates to make extensibility easier
Extensions to other langages
  • Most of the classes are available in C#
  • Python wrapping (work in progress, available at end of 2024)
Algebraic manipulation
  • Use of Alien library to handle linear systems
  • Coupling with several linear solver libraries
    • Hypre
    • Trilinos
    • PETSc
Other functionalities
  • Standalone mode to use only some functionalities of Arcane
    • mesh connectivities
    • accelerator API
  • Handling of time loop with automatic support to go back to a previous iteration

Getting started

Compiling and/or installing Arcane

To compile the Arcane Framework, you need an x86 or ARM64 CPU, Linux OS or Windows OS and a C++ compiler with a version that supports C++20 or higher.

For all other dependencies and more information, check out the Compiling/Installing guide.

Click here if the documentation is not available

To prepare your computer :

To build and install Arcane:

Docker images

Docker images with the Arcane framework installed are available in this GitHub repository. More information here.

Spack

Spack recipes for Arcane are available here.

Examples of how to use the Arcane Framework

An introductory chapter with the construction of a Hello world is available here.

Examples of applications using Arcane are available on GitHub. Here is a non-exhaustive list:

A set of mini-applications to evaluate Arcane functionalities. These are a good basis for getting started with Arcane.

Arcane-based application for solving different geosciences problems.

Very simple codes to test Finite Element Methods using Arcane.

TODO

Rencontres Arcanes

The next Rencontres Arcane are scheduled for 2025.

Arcane Framework

Les Rencontres Arcane on April 17th 2023.

The previous presentations are stored here.

Screenshots

Transient elastodynamics

Transient elastodynamics with ArcaneFEM

More Screenshots from ArcaneFEM

Aerodynamics

Aerodynamics

Bilaplacian

Bilaplacian

Linear elasticity

Linear elasticity

Electrostatics

Electrostatics

Solving Fourier equation

Solving Fourier equation

Solving Laplace equation with ArcaneFEM

Solving Laplace equation

Solving Poisson equation with ArcaneFEM

Solving Poisson equation

t=28

Water concentration in a porous material with Sharc

More Screenshots from Sharc

t=34 t=40

Evolution of water concentration over time in a porous material

framework's People

Contributors

grospelliergilles avatar stdcm avatar alexlher avatar cedricchevalier19 avatar gratienj avatar cedricga91 avatar francois-letierce avatar guignont avatar hmt23 avatar nathaliemoller avatar sdesrozis avatar jeromeduboispro avatar tuncx avatar nathmoller avatar mohd-afeef-badri avatar lelandaisb avatar daviddureau avatar hpwxf avatar raphman007 avatar loiclepareur avatar mstauffe avatar

Stargazers

Marie S. avatar Kerian Allaire avatar  avatar Mongi Ben Gaid avatar lydie avatar  avatar Gabriel Dos Santos avatar  avatar  avatar  avatar BATTISTON Ugo avatar Benjamin Fovet avatar  avatar Mathys Jam avatar  avatar Jeff Hammond avatar Maël MARTIN avatar  avatar nicolas le goff avatar  avatar Yongpeng Zhang avatar ali_robot avatar Pierre Kestener avatar  avatar  avatar  avatar  avatar

Watchers

franck.ledoux avatar  avatar  avatar Marc Perache avatar  avatar

framework's Issues

Improve MicroHydro bench

The script extras/benchs/bench_microhydro.py allows to execute the MicroHydro module in arcane_tests_exec.
We need to do the following tasks:

  • Move the source code outside of 'src/arcan/tests'. This way we will be able to launch this test outside of Arcane build.
  • Simulate more variables for load-balancing to have more realistic messages.
  • Simulate imbalance in some part to test mesh partitioning algorithms.

Separate data allocation from metadata in Array classes.

In the class Arccore::AbstractArray, there is only one allocation which contains both data and metadata (size, capacity, ...). There metadata are in the class ArrayImplBase.

We need to separate these two parts if we want to be able to use specific memory for the data.

Add support for node duplication in AMR

Currently when we refine a cell we only create nodes if needed.
This issue is to implement a mode where we can duplicate nodes.

Duplication allows numerical schemes to have different values for nodes or faces of different levels.

For example, at the moment, if we have a cell like this at level 0

Level 0
0---------1                
|         |
|         |
|         |
3---------2

Without duplication

Level 1

0----4----1                
|    |    |
7----8----5
|    |    |
3----6----2

With duplication

Level 1

9----4----10                
|    |    |
7----8----5
|    |    |
12---6----11

Support for creating Faces and/or Edges during mesh allocation

Currently IPrimaryMesh::allocateCells() does not allow to specify Face or Edge. These items are implicy created when we allocate cells. It works well but it has one drawback: we need to add a pass to renumber uniqueId() for these items. With big meshes (100 million+ cells) that phase may take a long time.

At the moment big meshes are always cartesian meshes. It is easy for the CartesianMeshGenerator to generate uniqueId() for faces or edges. Using IMeshModifier::addFaces() or IMeshModifier::addEdges() for example it should be possible to create faces or edges at the same time than cells.

Add CUDA platforms and tests to CI

The tool circle-ci(https://app.circleci.com) is currently used for ubuntu 20.04 compilation and check. CI runners with CUDA are available. We may use them to do our GPU test. If there are not free, we need to have runners somewhere to do this task (maybe at CEA?)

Remove unused parts of Arccon

It seems some parts of Arccon are no longer used. It may be useful to delete them.

I identified the following directories but there may be others:

  • build-system/csharp
  • build-system/dynamicloading
  • build-system/languages
  • build-system/bin
  • some commands in build-system/commands

These parts are not used at CEA. @stdcm and @gratienj you may know if there are still used at IFPEN

Add more compilers and platforms for CI

At the moment, we have tests only for GCC 8, GCC 9 on Linux. At the minimum we need to add these configurations:

  • GCC 11 with C++17 and C++20
  • Clang 13 with C++17 and C++20

_clang_format is not valid

Clion inspection tool check _clang_format syntax against a schema validation and several statements do not match requirements.

Might be dependent of clang-format version used.

Improve MPI implementation of serialisation to handle unreliable machines

The current MPI implementation of serialize message does the following this:

  • send the message in one MPI call if its size is small (by defaut 5000 ko)
  • send the message in two MPI calls if it's not the case. The first message contains the total size and the second message is the full message.

Some MPI implementation may have (temporary?) problems when there are too many or too big messages.

To solve this problem, we can try several fix:

  • send the message with multiple packets whose size is fixed
  • do not send the full message if the corresponding receive message is not posted.

Evaluate circleci for CI

For open source and public github repo, CircleCI provide virtual machine with up to 16 CPU, aarch64 and NVIDIA GPU.
The goal is to develop a CI workflow for this tool.

[arccore] Cleanup array view classes and update to C++17

Refactor ArrayView, ConstArrayView and Span:

  • Use common implementation for functions like subArrayInterval() or dumpArray().
  • Use constexpr and noexcept if possible
  • Add constructor or converter from std::array
  • Add tests for subViewInterval()

Remove direct creation of Array and Array2

There are still parts of code where we directly build instance of Array or Array2:

  • in Array::clone()
  • in Array2::clone()
  • in CaseOptionMultiSimpleT because we derive from ArrayView<Array<T>>.
  • in constructors of Array2 which are public.
  • change the return type of the generated get* functions in axl header.

These methods has to be removed.

Remove support for Glib2 version older than 2.32

Arcane no longer support Linux distributions using versions of Glib2 older than 2.32.
Removing this support allows to remove deprecated symbols concerning thread usage in Glib2 (thread, mutex, cond, ...)

Artifacts for new versions

Spack recipes for Arcane, Arccon, Arccore and Axlstar (https://https://github.com/arcaneframework/spack_recipes) require that released version tarballs are properly available.

That is not currently the case.
#51 was an attempt to automatically do this, but it seems the feature is already present but has not been used yet. So, please, when upgrading any version files, also upload artifacts, and if possible update spack recipes.

Not knowing new releases of Arccon and Arccore is also annoying for Alien, that should embed the last released versions of Arccon and Arccore.

Arcane does not compile with glibc >= 2.34 (Ubuntu 21.10)

__malloc_hooks have been deprecated for a long time and are now not explicitly available in malloc.h.

__malloc_hook = old_malloc_hook;

From glibc 2.34 changelog:

  • The deprecated memory allocation hooks __malloc_hook, __realloc_hook,
    __memalign_hook and __free_hook are now removed from the API. Compatibility
    symbols are present to support legacy programs but new applications can no
    longer link to these symbols. These hooks no longer have any effect on glibc
    functionality. The malloc debugging DSO libc_malloc_debug.so currently
    supports hooks and can be preloaded to get this functionality back for older
    programs. However this is a transitional measure and may be removed in a
    future release of the GNU C Library. Users may port away from these hooks by
    writing and preloading their own malloc interposition library.

Improve support for mesh services

To help users switch to mesh services instead of legacy mesh handling, we need to :

  • make a documentation of the new usage
  • add an implementation of IMeshBuilder for Lima reader
  • add an implementation of IMeshBuilder for GMSH reader
  • add a converter from legacy mesh building to new usage
  • handle meshes partitioned with an external tool (files with pattern CPU*)

Add helper class to generate mesh

This class will manage parts which are common to several mesh builder. For example:

  • handle node coordinates
  • simplify adding cell

This class will also add the possibility to directly create edges and faces if the mesh builder can specify theirs uniqueId().

May use #91

[arcane] Upgrade to CMake version 3.21

For windows build, we need recent versions of CMake:

  • 3.20 to allow CMake configure_file() command to use source permission
  • 3.21 to have TARGET_RUNTIME_DLLS generator expression needed to copy used DLLs in the same directory than Arcane libraries are installed

This task will be done in two phases:

  • Upgrade to 3.18 on Unix and 3.21 on Windows (#40). This is needed because some Linux platforms used by Arcane do not yet have version 3.21 of CMake.
  • Upgrade to 3.21 everywhere

Add support to run tests in parallel

To optimize ressources, we should be able to run multiple sequential tests at the same time using option -j from cmake.
Need to do the following tasks:

  • ensure each test runs in a separate directory.

Add workflow in CI to check file encoding and header

We need to check every C++ file has:

  • the correct encoding (UTF-8)
  • the correct BOM
  • the correct header with licence and emacs variables (-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --)

Add more statistics during load balancing

To help debugging some cases, it may be useful to have some statistics during load balancing. For example:

  • Memory usage
  • Number of items and variables to transfer

Remove memory allocation for Item->Node connectivity with legacy connectivities

Currently ItemSharedInfo always allocate memory for nodes based on ItemTypeInfo::nbLocalNode(). These connectivities are no longer used so we can remove them. But doing that with the current version of Arcane implies incompatibilities with checkpoints:

  • The last version of Arcane add version information in checkpoint (done in 20b603c)
  • When everybody will use that version, remove node connectivity allocation.

Upgrade to '.Net 6'

Net6 is the new LTS version of .Net. The current LTS version is .Net 3.1 and its End Of Life is december 2022.

Add MSH reader in library 'arcane_std'

At the moment the MSH reader is in the library 'arcane_ios' which is not in the default library set loaded by Arcane.
We want to move the reader and the writer in arcane/std directory.

Add Array implementation with stack allocation

For temporary and small array, it may be useful to allocate them on the stack instead of using the heap.

Add a StackArray class which used Array implementation with a specific allocator to use the stack if the size of the array is less than a specified size.

Need #45

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.