-
Notifications
You must be signed in to change notification settings - Fork 9
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
Define runtime parameters in Python #332
base: devel
Are you sure you want to change the base?
Conversation
Define runtime parameters in Python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. However, there is some seg fault in the tests.
#endif | ||
#else // SPECFEMPP_BINDING_PYTHON | ||
|
||
int main(int argc, char **argv) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, just for me to understand this. We compile specfem2d twice, once further up in the CMakeLists.txt without ENABLE_PYTHON, and then one time with to enable calling the executable directly and then once again with ENABLE_PYTHON to enable binding with python, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but only specfem2d.cpp is compiled twice
src/parameter_parser/setup.cpp
Outdated
@@ -22,11 +22,13 @@ void create_folder_if_not_exists(const std::string &folder_name) { | |||
|
|||
specfem::runtime_configuration::setup::setup(const std::string ¶meter_file, | |||
const std::string &default_file) { | |||
YAML::Node parameter_yaml = YAML::LoadFile(parameter_file); | |||
YAML::Node default_yaml = YAML::LoadFile(default_file); | |||
setup(YAML::LoadFile(parameter_file), YAML::LoadFile(default_file)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The segfault has been addressed in the anisotropy branch Should I merge the PR to that branch instead? |
I guess wait for anisotropy branch to be merged into devel then. Does this need to be merged urgently? |
No, we can wait. |
Description
Please describe the changes/features in this pull request.
Issue Number
If there is an issue created for these changes, link it here
Checklist
Please make sure to check developer documentation on specfem docs.
[] I ran the code through pre-commit to check style
[] My code passes all the integration tests
[] I have added sufficient unittests to test my changes
[] I have added/updated documentation for the changes I am proposing
[] I have updated CMakeLists to ensure my code builds
[] My code builds across all platforms