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

Define runtime parameters in Python #332

Open
wants to merge 8 commits into
base: devel
Choose a base branch
from
Open

Define runtime parameters in Python #332

wants to merge 8 commits into from

Conversation

icui
Copy link
Collaborator

@icui icui commented Dec 19, 2024

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

Copy link
Collaborator

@Rohit-Kakodkar Rohit-Kakodkar left a 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) {
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@@ -22,11 +22,13 @@ void create_folder_if_not_exists(const std::string &folder_name) {

specfem::runtime_configuration::setup::setup(const std::string &parameter_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));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice overload.

Copy link
Collaborator

@lsawade lsawade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@icui
Copy link
Collaborator Author

icui commented Dec 30, 2024

Looks good. However, there is some seg fault in the tests.

The segfault has been addressed in the anisotropy branch Should I merge the PR to that branch instead?

@Rohit-Kakodkar
Copy link
Collaborator

Looks good. However, there is some seg fault in the tests.

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?

@icui
Copy link
Collaborator Author

icui commented Dec 30, 2024

Looks good. However, there is some seg fault in the tests.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants