The bug
setting a directory such as log_directory to /dev/null can cause mesa to fail or output errors when attempting to save to null file.
Reproduce
- use a copy of $MESA_DIR/star/test_suite/make_zams (or most other test_suites)
- add
log_directory='/dev/null' into &controls section of inlist_zams
- clean, make, and run the make_zams test suite
- reach "finished doing relax num steps"
- See errors: "failed to open /dev/null/history.data" and "failed to create zams.mod when running inlist_zams_header"
Expected behavior
MESA exits safely with no fail or error condition. This would be unique to using /dev/null since it is intended for cases where a program is supposed to give an output without issue. Files would not "fail" to be created since /dev/null would allow MESA to think the files were saved. A test_suite like 1M_pre_ms_to_wd would still fail when it attempts to load a .mod file that was never saved.
Versions
- MESA version: r25.12.1
- MESA SDK version: mesasdk-x86_64-linux-25.12.1
- OS: RHEL 9.7 & Fedora Workstation 43
Additional context
This is more of a feature request since it would primarily be used in a debugging or testing phases when a terminal output is enough, but it would helpful to avoid adding a bunch of controls to the inlist to turn off the logs or other directories. Using /dev/null would also be more natural for new MESA users that are already familiar with a UNIX system.
The bug
setting a directory such as log_directory to /dev/null can cause mesa to fail or output errors when attempting to save to null file.
Reproduce
log_directory='/dev/null'into&controlssection of inlist_zamsExpected behavior
MESA exits safely with no fail or error condition. This would be unique to using /dev/null since it is intended for cases where a program is supposed to give an output without issue. Files would not "fail" to be created since /dev/null would allow MESA to think the files were saved. A test_suite like 1M_pre_ms_to_wd would still fail when it attempts to load a .mod file that was never saved.
Versions
Additional context
This is more of a feature request since it would primarily be used in a debugging or testing phases when a terminal output is enough, but it would helpful to avoid adding a bunch of controls to the inlist to turn off the logs or other directories. Using /dev/null would also be more natural for new MESA users that are already familiar with a UNIX system.