Giter Club home page Giter Club logo

impact-t's Introduction

IMPACT-T

IMPACT-T is a fully three-dimensional program to track relativistic charged particles taking into account space charge forces, short-range longitudinal and transverse wakefields, coherent synchrotron radiation (CSR) wakefield in accelerators. IMPACT-T code can run on both massive parallel supercomputers and single processor computers such as Windows PC, Mac, and Linux system. It is one of the few codes used in the photoinjector community that has a parallel implementation, making it very useful for high statistics simulations of beam halos and beam diagnostics. It has a comprehensive set of beamline elements, and furthermore allows arbitrary overlap of their fields, which gives the IMPACT-T a capability to model both the standing wave structure and traveling wave structure. It includes mean-field space-charge solvers based on an integrated Green function to efficiently and accurately treat beams with large aspect ratio, and a shifted Green function to efficiently treat image charge effects of a cathode. It is also unique in its inclusion of energy binning in the space-charge calculation to model beams with large energy spread. It also has a direct N-body solver to calculate stochastic space-charge forces. IMPACT-T has a flexible data structure that allows particles to be stored in containers with common characteristics; for photoinjector simulations the containers represent multiple slices, but in other applications they could correspond, e.g., to particles of different species. Together, all these features make IMPACT-T a powerful and versatile tool for modeling beams in photoinjectors and other systems.

Installation using Anaconda

Information about Anaconda, including install instructions, can be found on the Conda Reference website.

IMPACT-T is available through conda-forge and can be installed via:

conda create -n impact
source activate impact # or conda activate impact
# For non-MPI
conda install -c conda-forge impact-t

# For OpenMPI
conda install -c conda-forge impact-t=*=mpi_openmpi*

# For MPICH
conda install -c conda-forge impact-t=*=mpi_mpich*

After these steps, the IMPACT-T executable ImpactTexe or ImpactTexe-mpi, respectively, will be in your PATH environment variable and is thus ready to use like any regular command-line command.

Compiling The Code

If you are new to CMake, this short tutorial from the HEP Software foundation is the perfect place to get started with it.

If you just want to use CMake to build the project, jump into sections 1. Introduction, 2. Building with CMake and 9. Finding Packages.

Unix

Single Processor Code:

# inside the IMPACT-T src/ directory:
cmake -S . -B build
cmake --build build
# the executable in now in build/bin/

# this command needs sudo if you install into system paths:
cmake --build build --target install

If you like to install IMPACT-T into another directory than the default, pass to the cmake -S . -B build line the additional argument -DCMAKE_INSTALL_PREFIX=/your/custom/install/path.

Multi Processor Code:

# inside the IMPACT-T src/ directory:
cmake -S . -B build -DUSE_MPI=ON
cmake --build build
cmake --build build --target install

Windows

For Windows it will be necessary to use NMake to read and execute the generated makefiles.

NMake is command-line tool included with Visual Studio that builds projects based on commands that are contained in a description file.

More information on NMake can be found on the NMAKE Reference website.

Single Processor Code:

cmake -S . -B build -G "NMake Makefiles"
cmake --build build
cmake --build build --target install
cmake --install

Multi Processor Code:

Not Tested

Testing

cd examples
cd Sample1
# Execute non-MPI
ImpactTexe

# Execute MPI
mpirun -n <cores> ImpactTexe-mpi

Using at NERSC

If you decide to use IMPACT-T at NERSC you can do so via Anaconda or building from source. The instructions for Anaconda are the same as above.

Compiling the code

For Haswell

module load openmpi # if using OpenMPI otherwise skip for MPICH
module load cmake
cmake -S . -B build -DUSE_MPI=ON
cmake --build build
# find the executable in build/bin/

For KNL

module swap craype-haswell craype-mic-knl
module load openmpi # if using OpenMPI otherwise skip for MPICH
module load cmake
cmake -S . -B build -DUSE_MPI=ON
cmake --build build
# find the executable in build/bin/

Running at NERSC

There is one caveat with the conda-forge installed MPI version of the code. Instead of running with srun -n <cores> you must use mpirun -n <cores>.

impact-t's People

Contributors

qianglbl avatar hhslepicka avatar mattachu avatar christophermayes avatar franflame avatar ax3l avatar elainejut avatar

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.