-
Notifications
You must be signed in to change notification settings - Fork 8
Instructions for Profiling the Stellar Collapse Reader
Jonah Miller edited this page May 29, 2021
·
3 revisions
The following instructions are for profiling the Stellar Collapse reader. The following worked on a V100 machine.
I used:
gcc/7.4.0
cuda/10.2
- Anaconda python3. Python needs numpy and h5py python modules.
cmake/3.17.3
- hdf5 with HL libraries 1.10.7 (serial or parallel is fine). HDF5 installed via spack
The tables are in HDF5. Python is required to generate the test table.
Clone the repo recursively
git clone --recursive [email protected]:lanl/singularity-eos.git
Make a build directory
mkdir -p singularity-eos/bin
cd singularity-eos/bin
Compile and generate a test table.
cmake -DSINGULARITY_USE_HDF5=ON -DSINGULARITY_USE_KOKKOS=ON -DSINGULARITY_USE_CUDA=ON -DSINGULARITY_BUILD_TESTS=ON -DSINGULARITY_BUILD_MIX=OFF -DSINGULARITY_USE_FORTRAN=OFF -DSINGULARITY_TEST_SESAME=OFF -DSINGULARITY_TEST_STELLAR_COLLAPSE=ON ..
make -j
Run the profiler tool
./test/profile_stellar_collapse stellar_collapse_ideal.h5 1.4 64
The profile_stellar_collapse
program takes three command line arguments:
- A file name for a table to profile
- The adiabatic index used for an ideal gas to compare against. (Note you can profile a non-ideal table, but the diffs will be meaningless.)
- A grid size onto which to interpolate/root find.
The profiler performs two operations:
- First, it interpolates Pressure as a function of density, temperature, and electron fraction. It interpolates onto an NxNxN grid of densities, temperatures, and electron fractions.
- Then, it computes temperature as a function of density, energy, and electron fraction. This is a root find on a table of energy as a function of density, temperature, and electron fraction. Again, it interpolates onto an NxNxN grid, of densities, energies, and electron fractions.
In each case, the profiler runs 10 trials. It profiles the cost per grid point per trial. It also computes the difference between the result and an analytic ideal gas equation of state.