================================================================================
SEISFLOWS EXAMPLE 1
///////////////////
This is a [SPECFEM2D] [WORKSTATION] example, which will run an inversion to
assess misfit between two homogeneous halfspace models with slightly different
velocities. [1 events, 1 station, 1 iterations]. The tasks involved include:
(optional) Download, configure, compile SPECFEM2D
[Setup] a SPECFEM2D working directory
[Setup] starting model from 'Tape2007' example
[Setup] target model w/ perturbed starting model
[Setup] a SeisFlows working directory
[Run] the inversion workflow
================================================================================
EXAMPLE SETUP
Configuring SPECFEM2D with command: ./configure
configure: WARNING: required lex library not found; giving up on flex
fatal: No names found, cannot describe anything.
Making SPECFEM2D binaries with command: make all
================================================================================
GENERATING INITIAL MODEL
Setting the SPECFEM2D Par_file for SeisFlows compatiblility
NPROC: 1 -> 1
setup_with_binary_database: 0 -> 1
SAVE_MODEL: default -> binary
save_ASCII_kernels: .true. -> .false.
Running SPECFEM2D with command: ./bin/xmeshfem2D > OUTPUT_FILES/mesher.log.txt
Running SPECFEM2D with command: ./bin/xspecfem2D > OUTPUT_FILES/solver.log.txt
Cleaning up after xspecfem2d, setting up for new run
================================================================================
GENERATING TRUE/TARGET MODEL
Updating initial homogeneous velocity model values
VELOCITY_MODEL:
================================================================================
2024-04-29 07:02:25 [INFO] |
////////////////////////////////////////////////////////////////////////////////
GENERATE SYNTHETIC DATA
////////////////////////////////////////////////////////////////////////////////
2024-04-29 07:02:25 [INFO] | checking true/target model parameters:
2024-04-29 07:02:25 [INFO] | vp: min=5900.000; mean=5900.000; max=5900.000
2024-04-29 07:02:25 [INFO] | vs: min=3550.000; mean=3550.000; max=3550.000
2024-04-29 07:02:25 [INFO] | evaluating objective function for source 001
2024-04-29 07:02:25 [DEBU] | running forward simulation with 'Specfem2D'
2024-04-29 07:02:25 [DEBU] | running executable with cmd: 'bin/xmeshfem2D'
2024-04-29 07:02:25 [DEBU] | running executable with cmd: 'bin/xspecfem2D'
2024-04-29 07:02:34 [DEBU] | checkpointing workflow to seisflows state file
Traceback (most recent call last):
File "/home/zhangchang/miniconda3/envs/seisflows/bin/seisflows", line 8, in
sys.exit(main())
^^^^^^
File "/home/zhangchang/seisflows/seisflows/seisflows.py", line 1431, in main
sf()
File "/home/zhangchang/seisflows/seisflows/seisflows.py", line 451, in call
getattr(self, self._args.command)(vars(self._args))
File "/home/zhangchang/seisflows/seisflows/seisflows.py", line 804, in submit
system.submit(workdir=self._args.workdir,
File "/home/zhangchang/seisflows/seisflows/system/workstation.py", line 211, in submit
workflow.run()
File "/home/zhangchang/seisflows/seisflows/workflow/inversion.py", line 197, in run
super().run() # Runs task list
^^^^^^^^^^^^^
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 283, in run
func()
File "/home/zhangchang/seisflows/seisflows/workflow/inversion.py", line 239, in generate_synthetic_data
super().generate_synthetic_data(kwargs)
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 315, in generate_synthetic_data
self.system.run([self._generate_synthetic_data_single], kwargs)
File "/home/zhangchang/seisflows/seisflows/system/workstation.py", line 250, in run
func(kwargs)
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 346, in _generate_synthetic_data_single
self.run_forward_simulations(
File "/home/zhangchang/seisflows/seisflows/workflow/inversion.py", line 419, in run_forward_simulations
super().run_forward_simulations(path_model, save_traces=save_traces,
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 582, in run_forward_simulations
self.solver.forward_simulation(save_traces=save_traces,
File "/home/zhangchang/seisflows/seisflows/solver/specfem.py", line 634, in forward_simulation
if self.prune_scratch:
^^^^^^^^^^^^^^^^^^
AttributeError: 'Specfem2D' object has no attribute 'prune_scratch'
================================================================================
EXAMPLE FAILED
Command 'seisflows submit' returned non-zero exit status 1.
I install seisflows with this.
Installing the devel branch gives errors, the master branch is fine. So the devel branch may have some bugs
I met this priblem below:
(seisflows) [zhangchang@gpu01 example1]$ seisflows examples run 1
================================================================================ SEISFLOWS EXAMPLE 1 /////////////////// This is a [SPECFEM2D] [WORKSTATION] example, which will run an inversion to assess misfit between two homogeneous halfspace models with slightly different velocities. [1 events, 1 station, 1 iterations]. The tasks involved include:
[Run] the inversion workflow
================================================================================ EXAMPLE SETUP
Configuring SPECFEM2D with command: ./configure configure: WARNING: required lex library not found; giving up on flex fatal: No names found, cannot describe anything. Making SPECFEM2D binaries with command: make all
================================================================================ GENERATING INITIAL MODEL
================================================================================ GENERATING TRUE/TARGET MODEL
1 1 2600.d0 5800.d0 3500.0d0 0 0 10.d0 10.d0 0 0 0 0 0 0 -> 1 1 2600.d0 5900.d0 3550.0d0 0 0 10.d0 10.d0 0 0 0 0 0 0 Running SPECFEM2D with command: ./bin/xmeshfem2D > OUTPUT_FILES/mesher.log.txt Running SPECFEM2D with command: ./bin/xspecfem2D > OUTPUT_FILES/solver.log.txt
================================================================================ COMPLETE EXAMPLE SETUP
================================================================================ RUNNING SEISFLOWS EXAMPLE WORKFLOW
2024-04-29 07:01:56 [INFO] | running setup for all modules 2024-04-29 07:01:56 [DEBU] | workflow.Inversion 2024-04-29 07:02:07 [DEBU] | system.Workstation 2024-04-29 07:02:09 [DEBU] | solver.Specfem2D 2024-04-29 07:02:11 [INFO] | initializing 1 solver directories 2024-04-29 07:02:12 [DEBU] | source 0: 001 2024-04-29 07:02:17 [DEBU] | linking source '001' as 'mainsolver' 2024-04-29 07:02:18 [DEBU] | preprocess.Default 2024-04-29 07:02:19 [DEBU] | optimize.Gradient 2024-04-29 07:02:21 [INFO] | no optimization checkpoint file, assume 1st iteration 2024-04-29 07:02:25 [INFO] |
================================================================================ 2024-04-29 07:02:25 [INFO] | //////////////////////////////////////////////////////////////////////////////// GENERATE SYNTHETIC DATA //////////////////////////////////////////////////////////////////////////////// 2024-04-29 07:02:25 [INFO] | checking true/target model parameters: 2024-04-29 07:02:25 [INFO] | vp: min=5900.000; mean=5900.000; max=5900.000 2024-04-29 07:02:25 [INFO] | vs: min=3550.000; mean=3550.000; max=3550.000 2024-04-29 07:02:25 [INFO] | evaluating objective function for source 001 2024-04-29 07:02:25 [DEBU] | running forward simulation with 'Specfem2D' 2024-04-29 07:02:25 [DEBU] | running executable with cmd: 'bin/xmeshfem2D' 2024-04-29 07:02:25 [DEBU] | running executable with cmd: 'bin/xspecfem2D' 2024-04-29 07:02:34 [DEBU] | checkpointing workflow to seisflows state file Traceback (most recent call last): File "/home/zhangchang/miniconda3/envs/seisflows/bin/seisflows", line 8, in
sys.exit(main())
^^^^^^
File "/home/zhangchang/seisflows/seisflows/seisflows.py", line 1431, in main
sf()
File "/home/zhangchang/seisflows/seisflows/seisflows.py", line 451, in call
getattr(self, self._args.command)(vars(self._args))
File "/home/zhangchang/seisflows/seisflows/seisflows.py", line 804, in submit
system.submit(workdir=self._args.workdir,
File "/home/zhangchang/seisflows/seisflows/system/workstation.py", line 211, in submit
workflow.run()
File "/home/zhangchang/seisflows/seisflows/workflow/inversion.py", line 197, in run
super().run() # Runs task list
^^^^^^^^^^^^^
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 283, in run
func()
File "/home/zhangchang/seisflows/seisflows/workflow/inversion.py", line 239, in generate_synthetic_data
super().generate_synthetic_data(kwargs)
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 315, in generate_synthetic_data
self.system.run([self._generate_synthetic_data_single], kwargs)
File "/home/zhangchang/seisflows/seisflows/system/workstation.py", line 250, in run
func(kwargs)
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 346, in _generate_synthetic_data_single
self.run_forward_simulations(
File "/home/zhangchang/seisflows/seisflows/workflow/inversion.py", line 419, in run_forward_simulations
super().run_forward_simulations(path_model, save_traces=save_traces,
File "/home/zhangchang/seisflows/seisflows/workflow/forward.py", line 582, in run_forward_simulations
self.solver.forward_simulation(save_traces=save_traces,
File "/home/zhangchang/seisflows/seisflows/solver/specfem.py", line 634, in forward_simulation
if self.prune_scratch:
^^^^^^^^^^^^^^^^^^
AttributeError: 'Specfem2D' object has no attribute 'prune_scratch'
================================================================================ EXAMPLE FAILED
Command 'seisflows submit' returned non-zero exit status 1.