Closed Zeitsperre closed 7 months ago
@huard
I've spent way too much time on this today. Here's what I've figured out:
cmake
commands directly on the upstream codebase RavenHydroFramework
works fine (so long as the STANDALONE
and COMPILE_EXE
flags are there).RavenMain.cpp
are not being passed to other files. ExitGracefully()
is only found in a .cpp
file and not in a header, and this file isn't included in a bunch of .cpp
files that make references to that function..cpp
files, the ExitGracefully()
error disappears:
#ifdef STANDALONE #include "GracefulEndStandalone.h" #elif BMI_LIBRARY #include "GracefulEndBMI.h" #endif
I've been trying to read up on ways of passing the objects from RavenMain.cpp
to all other files, but I have no idea if that's even what we want. I get the impression that the problem has to do with scopes (perhaps vanilla cmake
is a lot less strict about ensuring that files are included explicitly?).
@analytophile am I on the right track here?
@Zeitsperre
I suspect this is a false lead. Your installation setup works on master, and the code compiles fine using the original cmakelist. I believe there is a quirk related to the source files location introduced in the git fetch mechanism that we need to identify. I'll take a look later this week.
Seems to be working! The only issue I can see is that the model reports a non-fatal error:
3.8.0 w/ netCDF
============== Early Gracefully Exit ==============
Error Statement: Version check
Error Code: 7
---------------------------------------------------
@huard any idea what that could be?
EDIT: It's nothing. Looks like it's simply the exit code for SIMULATION_DONE
:
enum exitcode
{
BAD_DATA, ///< For bad input provided by user (requires immediate exit from program)
BAD_DATA_WARN, ///< For bad input provided by user (requires shutdown prior to simulation)
RUNTIME_ERR, ///< For runtime error (bad programming)
FILE_OPEN_ERR, ///< For bad file open (requires immediate exit)
RAVEN_OPEN_ERR, ///< for bad RavenErrors.txt file open
STUB, ///< Stub function
OUT_OF_MEMORY, ///< When out of memory
SIMULATION_DONE ///< Upon completion of the simulation
};
Needed to set the fetch-depth for setuptools_scm. See: https://github.com/pypa/setuptools_scm/issues/414
Pull Request Checklist:
What kind of change does this PR introduce?
RavenHydroFramework
source files to the official GitHub projecthatch-fancy-pypi-readme
andsetuptools_scm
).scikit-build-core
>=0.8.0Does this PR introduce a breaking change?
Yes. The copied source files have been removed. There is more integration with the actual project source files.