Skip to content

AMPT-FHMPF is a framework that attempts to utilize modern computing power to get more statistics from the heavy-ion collision generator called A Multi Phase Transport (AMPT) model.

License

Notifications You must be signed in to change notification settings

Lolle2001/AMPT-FHMPF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMPT-FHMPF

Important

This code was developed for my thesis. If you use/fork this code, please use the following citation in your work:

L. J. Huisman, File handling and multiprocessing framework for AMPT, version 1.0.0 (2024). https://github.com/Lolle2001/AMPT-Processing

In addition, AMPT must also be cited, because AMPT source code comes with this repository1.

🚀 About

This repositery contains code for running the single-threaded AMPT model (A Multi-Phase Transport model) on multiple cores1. It includes:

  • Compilation of different versions
  • File handling of results
  • Generation of input files

🔧 Installation

Dependencies

Installation of fmt can be done in two ways:

sudo add-apt-repository universe
sudo apt update
sudo apt install libfmt-dev

or

git clone https://github.com/fmtlib/fmt.git
cd fmt
mkdir build
cd build
cmake ..
make
sudo make install

Installation of argparse can be done in the following way:

git clone https://github.com/p-ranav/argparse.git
cd argparse
cd build
cmake ..
make -j 4
sudo make install

Note

Make sure that installation with git clone is done in for example downloads or another directory. In addition, make sure that the libraries are correctly added to the path. On Ubuntu this is done automatically.

Compilation

The program is called ampt-mp and needs to be compiled with C++17. In addition the fmt, argparse and OMP libraries were used. OMP is part of most compilers (see list here) and does not have to be installed. The program is compiled as follows,

bash compile-ampt-mp.sh

📚 Documentation

Running AMPT

Using multiple bash scripts does not allow for a good readable code and can cause problems when it comes to file handling. For that reason a C++ version was developed, which handles the running and compilation. Additional advantages are that command line parsing is easy to setup and that extra functionality was added with respect to the previous method.

By default it is assumed that all input files are in the directory ./input, the source is in ./src/original and the data is stored in ./data. A compiled program will give the following structure to the program folder:

AMPT
├── bin
│   ├── ampt-1
│   ├── ampt-2
│   ├── ...
│   ├── ampt-n
│   ├── anim-1
│   └── ...
├── input
│   └── *.par
├── data
│   ├── run-1
│   ├── run-2
│   └── ...
├── src
│   ├── original
│   ├── animation
│   ├── hijing-only
│   └── ...
└── ampt-mp

At first use, the following commands can be ran in the terminal.

./ampt-mp -h # See options for compiling AMPT
./ampt-mp -h # See options for running AMPT

./ampt-mp compiler -b 1 12 # Compiles every bin with the given source code
./ampt-mp -o test -b 1 12 # Runs AMPT in every bin and stores the data in ./data/test

Warning

The program has problems with racing conditions, causing a spread in the runtime of seperate instances even when they run the exact same simulation.

Versions

By default this framework uses the original AMPT code of version v1.26t9b-v2.26t9b1. Various modifications have been made in this code. All the frotran files are stored in subfolders of the src directory. These are the current options:

  • original: Contains the original AMPT code (v1.26t9b-v2.26t9b).
  • animation: Contains a modified version, where animation output is enabled.
  • hijing-only: Contains a modified version, where all components except for hijing have been disabled to obtain geometrical information faster.

Input generation

A python script has been created to generate input files. It is located in the utils folder. It allows for modification of the desired parameters and gives the option to generate multiple files for multiple centrality bins by using a table. The created parameter file contains the corresponding variable names and their original descriptions.

Footnotes

  1. Z. W. Lin, C. M. Ko, B. A. Li, B. Zhang and S. Pal, A Multi-phase transport model for relativistic heavy ion collisions. Phys. Rev. C 72, 064901 (2005). https://doi.org/10.1103/PhysRevC.72.064901 2 3

About

AMPT-FHMPF is a framework that attempts to utilize modern computing power to get more statistics from the heavy-ion collision generator called A Multi Phase Transport (AMPT) model.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published