Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions unit_test/burn_cell_primordial_chem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ target_include_directories(test_burn_cell_primordial_chem PUBLIC ${CMAKE_CURRENT
#below line will add NAUX_NET and STRANG compiler flags
#these are needed for preprocessor variables
target_compile_definitions(test_burn_cell_primordial_chem PUBLIC NAUX_NET STRANG)
target_link_libraries(test_burn_cell_primordial_chem PRIVATE Threads::Threads)


if(AMReX_GPU_BACKEND MATCHES "CUDA")
Expand Down
11 changes: 6 additions & 5 deletions unit_test/burn_cell_primordial_chem/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ PRECISION = DOUBLE
PROFILE = FALSE

# Set DEBUG to TRUE if debugging
DEBUG = TRUE
DEBUG = FALSE

DIM = 1

COMP = gnu
COMP = llvm

USE_MPI = FALSE
USE_OMP = FALSE
#set USE_CUDA to TRUE to compile and run on GPUs
USE_CUDA = FALSE
USE_CUDA =TRUE
CUDA_ARCH =90
USE_REACT = TRUE

# Set USE_MICROPHYSICS_DEBUG to TRUE if debugging
USE_MICROPHYSICS_DEBUG = TRUE
USE_MICROPHYSICS_DEBUG = FALSE

EBASE = main

Expand All @@ -30,7 +31,7 @@ NETWORK_DIR := primordial_chem

CONDUCTIVITY_DIR := stellar

INTEGRATOR_DIR = VODE
INTEGRATOR_DIR = Rosenbrock

EXTERN_SEARCH += .

Expand Down
11 changes: 8 additions & 3 deletions unit_test/burn_cell_primordial_chem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

# burn_cell_primordial_chem

`burn_cell_primordial_chem` integrates a primordial ISM chemistry network
for a single set of initial conditions. The density, temperature, and composition
are set in the inputs file, as well as the maximum time to integrate.
`burn_cell_primordial_chem` integrates a primordial ISM chemistry network
for a cubic grid of cells initialized from a single set of initial conditions.
The number of cells in each direction is set by `unit_test.ncell` in the inputs
file, or overridden on the command line. For CPU builds, `unit_test.nthreads`
controls the number of worker threads; a value of 0 selects the hardware
concurrency. The density, temperature, and
composition are set in the inputs file, as well as the maximum time to
integrate.

Upon completion, the new state is printed to the screen.

Expand Down
6 changes: 6 additions & 0 deletions unit_test/burn_cell_primordial_chem/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ tfirst real 0.0
# number of steps for the single zone burn
nsteps int 1000

# number of cells in each direction for the cubic grid
ncell int 1

# number of CPU threads to use; 0 means use hardware_concurrency()
nthreads int 0

# initial temperature
temperature real 1e2

Expand Down
3 changes: 3 additions & 0 deletions unit_test/burn_cell_primordial_chem/benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

time ./main1d.llvm.CUDA.ex inputs_primordial_chem unit_test.ncell=32
Loading
Loading