Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Construct CoreParams from new problem input in celer-sim #1601

Open
wants to merge 32 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4e3aee1
Don't pass output manager into celer-sim runner
sethrj Jan 4, 2025
3ab6b82
Move validation to main .cc from JSON reading
sethrj Jan 5, 2025
137c2c4
Fix `Overload` to work with references in addition to rvalue refs
sethrj Jan 24, 2025
7f4d804
Move ROOT core output to celeritas
sethrj Jan 24, 2025
3fb329f
Split runner functions
sethrj Jan 24, 2025
540534a
Core params construction compiles
sethrj Jan 15, 2025
e35e7b3
Build Standalone input
sethrj Jan 24, 2025
8c194be
IWYU
sethrj Jan 24, 2025
349babb
Fix some compatibility failures
sethrj Jan 26, 2025
45dc204
Update scoped messages and don't write empty optical loop
sethrj Jan 27, 2025
82930b4
Fix optical photon buffer count
sethrj Jan 27, 2025
1b8e0ab
Make max_events optional
sethrj Jan 27, 2025
c82c9d8
Add note about streams
sethrj Jan 27, 2025
43512d2
REVERTME: unrelated celer-g4 changes
sethrj Jan 29, 2025
c031b40
Add capacity documentation
sethrj Jan 29, 2025
d0c0f1f
Fix build error and capacity size
sethrj Jan 29, 2025
a21b8b2
Add explicit cast for stack factor
sethrj Jan 29, 2025
2d4550d
Fix accidental change to shared params
sethrj Jan 29, 2025
63bf44d
Fix unused warning on clang 18
sethrj Jan 29, 2025
b5c0dc6
Fix crash in celer-g4 when SharedParams construction fails
sethrj Jan 29, 2025
3007998
Use struct to shut clang the hell up
sethrj Jan 29, 2025
06f4ff8
Tidy up the nursery
sethrj Jan 30, 2025
ce17b5e
Untidy to fix it
sethrj Jan 30, 2025
ff4f3bf
Fix device initialization order
sethrj Feb 4, 2025
870a8ec
Output if param initialization goes wrong
sethrj Feb 4, 2025
e8710dd
Merge remote-tracking branch 'upstream/develop' into celer-inp-core
sethrj Feb 5, 2025
3379e1d
Set num threads when running GPU as well
sethrj Feb 5, 2025
a9873ed
Fix/warn about stream sizing
sethrj Feb 5, 2025
2e90f8f
Fix omp pragma
sethrj Feb 5, 2025
404f471
Fucking braces
sethrj Feb 5, 2025
b41023b
Fix unused variable
sethrj Feb 6, 2025
82ee9c6
Merge remote-tracking branch 'upstream/develop' into celer-inp-core
sethrj Feb 6, 2025
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
2 changes: 1 addition & 1 deletion app/celer-g4/RunInput.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ inp::Problem load_problem(RunInput const& ri)

// Control
p.control.capacity = [&ri] {
inp::StateCapacity capacity;
inp::CoreStateCapacity capacity;
capacity.tracks = ri.num_track_slots;
capacity.initializers = ri.initializer_capacity;
capacity.secondaries = static_cast<size_type>(ri.secondary_stack_factor
Expand Down
14 changes: 10 additions & 4 deletions app/celer-g4/celer-g4.cc
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ int main(int argc, char* argv[])
}

// Create params, which need to be shared with detectors as well as
// initialization, and can be written for output
// initialization, and can be written for output (default to stdout)
auto params = std::make_shared<celeritas::SharedParams>();

try
Expand All @@ -286,13 +286,19 @@ int main(int argc, char* argv[])
catch (std::exception const& e)
{
CELER_LOG(critical) << "While running " << argv[1] << ": " << e.what();
auto e_output = std::make_shared<celeritas::ExceptionOutput>(
std::current_exception());
if (*params)
{
params->output_reg()->insert(
std::make_shared<celeritas::ExceptionOutput>(
std::current_exception()));
params->output_reg()->insert(e_output);
params->Finalize();
}
else
{
celeritas::OutputRegistry reg;
reg.insert(e_output);
reg.output(&std::cout);
}
return EXIT_FAILURE;
}

Expand Down
6 changes: 1 addition & 5 deletions app/celer-sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ endif()
if(CELERITAS_USE_OpenMP)
list(APPEND LIBRARIES OpenMP::OpenMP_CXX)
endif()
if(CELERITAS_USE_ROOT)
list(APPEND SOURCES RootOutput.cc)
list(APPEND LIBRARIES ROOT::Core ROOT::Tree)
endif()

# Add the executable
celeritas_add_executable(celer-sim ${SOURCES})
Expand Down Expand Up @@ -82,7 +78,7 @@ function(celer_sim_test test_ext gdml_inp_name hepmc3_inp_name mctruth_name)
"${_driver}" "${_gdml_inp}" "${_hepmc3_inp}" "${_mctruth_out}"
)
set_tests_properties("${_name}" PROPERTIES
ENVIRONMENT "${_env};${CELER_G4ENV}"
ENVIRONMENT "${_env};${CELER_G4ENV};${CELER_OMP_ENV}"
RESOURCE_LOCK gpu
REQUIRED_FILES "${_driver};${_gdml_inp};${_hepmc3_inp}"
LABELS "app;nomemcheck;gpu"
Expand Down
Loading
Loading