PrincetonUniversity / athena

Athena++ radiation GRMHD code and adaptive mesh refinement (AMR) framework
https://www.athena-astro.app
BSD 3-Clause "New" or "Revised" License
239 stars 129 forks source link

Fixing a linking error for chemistry with no network #612

Closed tomidakn closed 3 months ago

tomidakn commented 3 months ago

The original code caused a linking error of outputs.cpp and history.cpp with icpc when compiled with -O0 (configure with --cxx icpc -d) because ChemNetwork::species_names (a static const member) was declared but not set. The error did not appear with -O3, possibly because it was optimized out. (I do not know why gcc has no problem with this.)

This fix adds none.cpp for an empty chemical network and initialize species_names.

Prerequisite checklist