-
Notifications
You must be signed in to change notification settings - Fork 30
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
tune the output information in ASDFDataSet.process() method #8
Comments
I'll work on improving the error reporting and handling! |
Great. This is the output using multiprocessing. What I am going to using mpi in the future :) I think for mpi case, it is probably hard to output this kind of things, right? Can we have something like:
Very primitive thoughts...Ignore me if it doesn't make sense. |
Sure. Already at it. Should be done in the next half hour :-) |
This took a bit longer but I also wrote some more documentation: http://seismicdata.github.io/pyasdf/parallel_processing.html The latest master has much better output and error reporting when run with multiprocessing. Additionally you can now set the number of processors and the length of the printed traceback for the multiprocessing processing function. I think this solves your problem :-) $ python process_test.py
Launching processing using multiprocessing on 8 cores ...
-> Processing approximately task 0 of 107 ...
-> Processing approximately task 8 of 107 ...
-> Processing approximately task 16 of 107 ...
-> Processing approximately task 24 of 107 ...
-> Processing approximately task 32 of 107 ...
-> Processing approximately task 40 of 107 ...
Error during the processing of station 'IC.LSA' and tag 'synthetic' on CPU 2:
Traceback (At max 3 levels - most recent call last):
File "/Users/lion/.miniconda3/envs/obspy_py34/lib/python3.4/threading.py", line 888, in _bootstrap
self._bootstrap_inner()
File "/Users/lion/.miniconda3/envs/obspy_py34/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/Users/lion/workspace/code/pyasdf/pyasdf/asdf_data_set.py", line 1785, in run
output_stream = self.processing_function(stream, inv)
File "process_test.py", line 9, in process
raise ValueError("Something went wrong!!!")
ValueError: Something went wrong!!!
-> Processing approximately task 48 of 107 ...
-> Processing approximately task 56 of 107 ...
-> Processing approximately task 64 of 107 ...
-> Processing approximately task 72 of 107 ...
Error during the processing of station 'IU.DAV' and tag 'synthetic' on CPU 0:
Traceback (At max 3 levels - most recent call last):
File "/Users/lion/.miniconda3/envs/obspy_py34/lib/python3.4/threading.py", line 888, in _bootstrap
self._bootstrap_inner()
File "/Users/lion/.miniconda3/envs/obspy_py34/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/Users/lion/workspace/code/pyasdf/pyasdf/asdf_data_set.py", line 1785, in run
output_stream = self.processing_function(stream, inv)
File "process_test.py", line 9, in process
raise ValueError("Something went wrong!!!")
ValueError: Something went wrong!!!
-> Processing approximately task 80 of 107 ...
-> Processing approximately task 88 of 107 ...
-> Processing approximately task 96 of 107 ...
-> Processing approximately task 104 of 107 ...
Finished processing in 3.13 seconds (0.029 sec/station). |
👍 Thanks, Lion. That is great! |
c75d65b does the same for the MPI based processing so it should be much easier to diagnose problems now. |
Hi Lion,
I am currently using this to process asdf file and I found the output information is limited. For example, in the following output, the interpolation method raise a ValueError but I don't know what stream(or trace) is that. I think knowing the stream.id is very helpful so I can go into the hdf5 file and see what is wrong with that trace.
Do you have specific reasons to do so(simple terminal output)?
Terminal Output:
The text was updated successfully, but these errors were encountered: