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

Parallelize StreamInterface #64

Merged
merged 3 commits into from
Apr 30, 2022
Merged

Parallelize StreamInterface #64

merged 3 commits into from
Apr 30, 2022

Conversation

apeck12
Copy link
Collaborator

@apeck12 apeck12 commented Apr 29, 2022

The StreamInterface class has been parallelized so that the input stream files (prior to merging) for a given sample (indicated by tag) are distributed across the available nodes during file reading. The contents of all the stream files are merged into the self variable stream_data, and the contents can be visualized in a peakogram or cell_explorer style plot. The latter can be generated as follows, for instance:

mpirun -n 3 python stream_interface.py -i="/cds/data/psdm/mfx/mfxlv4920/scratch/apeck/index/*stream" -o . --cell_only  

Omitting the --cell_only flag will cause the peakogram to be generated as well.

A task has been added that can be run from the command line for example as follows:
$ . elog_submit.sh -c ../tutorial/mfxlv4920.yaml -t analyze_sample -n 3
and the mfxlv4920.yaml has been updated accordingly.

@apeck12 apeck12 added this to the SFX demo milestone Apr 29, 2022
@fredericpoitevin fredericpoitevin mentioned this pull request Apr 30, 2022
6 tasks
Copy link
Collaborator

@fredericpoitevin fredericpoitevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastics, thanks!

scripts/tasks.py Outdated
@@ -90,3 +91,18 @@ def index(config):
logger.debug(f'Generating indexing executable for run {setup.run} of {setup.exp}...')
indexer_obj.write_exe()
logger.info(f'Executable written to {indexer_obj.tmp_exe}')

def analyze_sample(config):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something more specific, like stream_analysis?

@@ -39,3 +39,5 @@ index:
multi: True
profile: True

analyze_sample:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@apeck12
Copy link
Collaborator Author

apeck12 commented Apr 30, 2022

Thanks for the suggested nomenclature! In addition to renaming analyze_sample to stream_analysis, I changed make_powder to run_analysis since the task is actually more generic, producing both the powders and trajectory plots, and will be used for both Ag behenate and sample runs. Merging now, though happy to alter the nomenclature again in another PR if you'd prefer something else.

@apeck12 apeck12 merged commit 8c1fa8c into main Apr 30, 2022
@apeck12 apeck12 deleted the parallel_stream branch April 30, 2022 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants