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

seisflows refactor and overhaul (v2.1.0) #139

Merged
merged 207 commits into from
Oct 18, 2022
Merged

seisflows refactor and overhaul (v2.1.0) #139

merged 207 commits into from
Oct 18, 2022

Conversation

bch0w
Copy link
Member

@bch0w bch0w commented Oct 18, 2022

Major package overhaul constituting PRs from #124 to #137. Please see relevant issues and PR's for changes made, but bullet point of the changes involved in devel since PR #124

  • Source code refactor for more Pythonic code flow and easier to edit source code
  • Decoupled all the modules so that they can be imported and used standalone
  • Removed seisflows-super subpackage for simplicity
  • Added a test suite (with pytest) for more stability through the development process
  • Reworked workflow architecture to be less redundant
  • Created a new Model class to handle Python interactions with SPECFEM GLL models
  • Bolstered and optimized command line tool
  • Added SPECFEM2D examples for en-masse forward and small-scale inversion problems
  • Got SeisFlows system modules working on RHEL Chinook and TACC Frontera (both SLURM systems)

Relevant PRs: #124 #125 #126 #127 #128 #129 #130 #131 #132 #133 #134 #135 #137
Relevant Issues: #123 #12 #138

bch0w added 30 commits June 1, 2022 14:43
…t makes more sense to have it be a solver function
…ge. all future development will just take place in seisflows directory to avoid confusion

removed 'edit' command from CLI tool
…voids confusion about having incomplete 'base' modules which aren't useful on their own
…n. no api changes, just more concise source code and functions residing in more logical locations.

Also replaced the Dict object defined in config with a simpler dictionary replacement
…ep things simpler

cleaning up docstrings and code formatting around
Refactors the code for better source code readability. Does not change public api of the codebase.
…ntiated. reworked init statement to avoid this
…rameters, these can just be read from the SPECFEM Par_file which is assumed to be correct. Also removed the checks related to these and adjusted the way misfit is calculated so that it doesnt explicitely need to be passed this information

combined some of the solver parameters which were redundant
optimization rosenbrock test running but not working as intended
…s definitions, which avoids some funky late type conversions in config

defined a seisflows Base object which dictates the structure that all seisflows modules must have. This is intended to replace the individual Base objects defined in each of the sub-modules
old Base modules (preprocess, postprocess) will now be named Default to better signify their role in the workflow (Base felt too abstract)
removed Solver plugins. they weren't being used
Removed error tools as they seemed overly abstract and were only used in one location. Replaced ParameterError with ValueError in the one instance of it
Postprocess.default is now redefined with the new Base class definition, which no longer calls sys modules at the top of the script, removes the required property and defines required in __init__, inherits some properties from Base and explicitely defines super() where functions are being inherited.
…iables housing strings for seisflows_parameters and seisflows_paths
… 1) not explicitely importing opther modules with sys modules during import, but are doing this at run time with the self.par attribute

required paths and parameters are defined in __init__ and the required() attribute is now removed.
We explicitely call inherited functions, even if they are just calling the underlying functions. This will make it easier for new users to track down where functions are coming from.
Child classes which define new methods will make these methods private (leading underscore) so as to not confuse them with inherited or overwritten methods of the base class
also going back to the old method of explicitely stating things (e.g., naming 'scratch' instead of hiding it behind PATH.SCRATCH). This leads to repeated strings, but makes it easier to follow structure
…only a specfem dependent base class, and to remove confusion from core base class
bch0w and others added 27 commits September 9, 2022 16:56
…to flag '--with_mpi' when running example, removed example 4 since we can just run example 3 with MPI which is the same thing
…proc parameters to allow running with mpi directly
feature singularity workflow to deal with Chinook incompatible operating system
…Docker image on Chinook. Removes a lot of the automation of SeisFlows but this first go is for making sure this approach will work for running SeisFlows on Chinook through Singularity
…es, whereas before their logs were sent to the ether

removed check function from singularity because the checks were not working from inside the container
workstation now always checks mpiexec, even if nproc == 1
…y to avoid any confusion and broken symlinks when running out of a container
plot_2d_image adds NaN values to the top edge of the model before
interpolation to the regular grid. In order to, fix the representation
issue with complex topographies.
Plot 2D improvement for models with complex topographies
starting work on optimization of command line tool and package imports for speeduprelated to #138
…ts own tool for faster imports

SeisFlows command line tool moved heavier imports into functions to speed up call times for other functions that don't need it
fixed import statements and all tests pass
…em time to catch up

also fixed bug where job number had new lines in it
removed specfem3d chinook version, not needed anymore
migration has a new exit condition if no misfit kernels are created from the combine/smooth operation
@bch0w bch0w changed the title seisflows overhaul seisflows refactor and overhaul Oct 18, 2022
@bch0w bch0w merged commit 13eb5a0 into master Oct 18, 2022
@bch0w bch0w changed the title seisflows refactor and overhaul seisflows refactor and overhaul (v2.1.0) Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants