Closed mnagaso closed 4 months ago
Thanks for raising this @mnagaso, I swapped the names of two command line parameters init
and setup
to be more inline with their actual functionality in this big PR (https://github.com/adjtomo/seisflows/pull/181), but did not update the examples or the documentation to match. I think what is needed here is just a simple update to the namespace in the example. I can have a look at this real quick and see if the fix is that simple.
Thank you very much @bch0w !
Yes I tried to just replace the setup
and init
as my last commit by following your guide, then it worked like a charm!
In the later part of this example (seisflows examples run 1
), I got the error below. It seems that data/001 directory is not created.
I am checking this on my side for understanding seisflows, but it would be great if you could give me any idea on this error?
================================================================================
COMPLETE EXAMPLE SETUP
================================================================================
================================================================================
RUNNING SEISFLOWS EXAMPLE WORKFLOW
================================================================================
2024-02-22 20:41:39 [INFO] | setup Inversion workflow
2024-02-22 20:41:48 [DEBU] | running setup for module 'system.Workstation'
2024-02-22 20:41:51 [DEBU] | running setup for module 'solver.Specfem2D'
2024-02-22 20:41:51 [INFO] | initializing 1 solver directories
2024-02-22 20:41:51 [DEBU] | mkdir 001
2024-02-22 20:41:55 [DEBU] | linking source '001' as 'mainsolver'
2024-02-22 20:41:57 [DEBU] | running setup for module 'preprocess.Default'
2024-02-22 20:41:57 [DEBU] | running setup for module 'optimize.Gradient'
2024-02-22 20:41:59 [INFO] | no optimization checkpoint found, assuming first run
2024-02-22 20:42:01 [INFO] |
////////////////////////////////////////////////////////////////////////////////
RUNNING ITERATION 01
////////////////////////////////////////////////////////////////////////////////
2024-02-22 20:42:01 [INFO] |
================================================================================
RUNNING INVERSION WORKFLOW
================================================================================
2024-02-22 20:42:01 [INFO] |
////////////////////////////////////////////////////////////////////////////////
EVALUATING MISFIT FOR INITIAL MODEL
////////////////////////////////////////////////////////////////////////////////
2024-02-22 20:42:01 [INFO] | evaluating misfit for model in `path_model_init`
2024-02-22 20:42:01 [INFO] | checking model parameters:
2024-02-22 20:42:01 [INFO] | vp: min=5800.000; mean=5800.000; max=5800.000
2024-02-22 20:42:01 [INFO] | vs: min=3500.000; mean=3500.000; max=3500.000
2024-02-22 20:42:01 [INFO] | preparing observation data for source 001
2024-02-22 20:42:01 [DEBU] | looking for data in: '/home/mnagaso/workspace/MINES/seisflows_projects/test/data/001/*'
2024-02-22 20:42:01 [CRIT] |
================================================================================
DATA IMPORT ERROR
/////////////////
001 found no `obs` data with wildcard:
'/home/mnagaso/workspace/MINES/seisflows_projects/test/data/001/*'. Please check
`path_data` or manually import data and re-submit
================================================================================
================================================================================
EXAMPLE FAILED
Command 'seisflows submit' returned non-zero exit status 255.
================================================================================
I close this PR because there is a dedicated development on the branch https://github.com/adjtomo/seisflows/tree/bugfix-example_namspace_change
Thanks @mnagaso, yes I started working on that branch last week but did not have time to finish. There are a few critical changes I had made that need to be fixed before the example can run, should hopefully PR that early this week!
Hi @bch0w, Thanks you very much for this mention and updating the example class! It will be helpful for me to understand the structure of seisflow.
Hi,
I found that there is a missing information for new users to run the first example, which is for creation of parameters.yaml.
It should be done with
seisflows init
(but notseisflows setup
with current devel), but I could not find an instruction for this step (sorry if I have just been missing it).So I put some line to create a default parameter file automatically if it does not exist, when the
setup
function is called. I added some parameters to allowseisflows check
to work.Please let me know if it would be ok, or would be better to add more parameters in the default file e.g.
Because I think that it would be useful if the first examples can be run with the out-of-box state, otherwise new users resign to use the library instead of digging around the correct way to do.