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

🐛 [BUG] - Solver silently overrides 'model' parameter #1232

Open
bch0w opened this issue Jun 20, 2024 · 0 comments
Open

🐛 [BUG] - Solver silently overrides 'model' parameter #1232

bch0w opened this issue Jun 20, 2024 · 0 comments
Labels

Comments

@bch0w
Copy link
Contributor

bch0w commented Jun 20, 2024

Description

This issue was brought to my attention through some SeisFlows issues (adjtomo/seisflows#210, adjtomo/seisflows#210) where synthetic data and synthetics were the same despite different starting and target models.

Looks like when external tomography models are used, there is a critical call in the SPECFEM2D solver that silently ignores the Par_file parameter model and hardcodes model = 'tomo'.

Present in both master and devel branches:

It's not totally silent as the logger prints out the new value of Model, but this has some unintended consequences when the User is expecting their model parameter to have a specific value.

I would suggest removing this line and instead throwing a warning to the User if Model != tomo so they know to change it in their Par_file, or throw a system exit. Alternatively we can add an exception for model != default so that other options that do not use this internal model definition are not affected.

I'm happy to implement and PR the change depending on how we decide.

Affected SPECFEM2D version

master (65cb2a4), devel (0e64075)

Your software and hardware environment

Tested on laptop running MacOS

Reproduction steps

1. Set Par_file `MODEL = default` 
2. Set mesh parameter line to tomo format (starting with -1)
3. Run solver

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

OS

Mac

@bch0w bch0w added the bug label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant