jpvantassel / hvsrpy

A Python package for Horizontal-to-Vertical (H/V, HVSR) Spectral Ratio Processing.
https://pypi.org/project/hvsrpy/
Other
71 stars 29 forks source link

CPU number for processing #22

Closed seguuu91 closed 6 months ago

seguuu91 commented 8 months ago

Hi,

First of all, thanks for your efforts for HVSRpy.

I'm currently exploring the use of multiprocessing with HVSRpy. However, I've noticed that the processing utilizes all available CPU resources extensively. Is there an option to limit the number of CPUs for a single process, similar to the -j option in geopsy?

Thank you, segu

jpvantassel commented 6 months ago

Hi @seguuu91,

The default hvsrpy is single-threaded, and should only be using a single-core on your machine. Multi-processing has been implemented in the CLI (with the --nproc flag). When I did scaling tests (about two years ago now) the scaling was more-or-less linear up to 64 cores. If you are interested in parallel processing I would recommend using the CLI.

All the best, Joe