Page 1 of 1

Parallel version slower than the serial one

Posted: February 14th, 2020, 5:54 am
by Fabio.Dioguardi
Hi,

I am facing this issue with the parallel version.
I have compiled it with mpich by amending the Makefile.inc file, and it successfully generated the parallel executable (hycm_std). I am now running a test case both with the serial code (as usual) and parallel. The serial code took less than 8 seconds, the parallel one 58 seconds.
I have launched the parallel version with this command:

time sh ../../../../../hysplit.v4.2.0/exec/run_mpi.sh 10 hycm_std

after amending run_mpi.sh to point at the location of mpich executables and HYSPLIT executables (see attached). Note that the output files from each processor (MESSAGE, VMSDIST) have been generated, and I also cross-checked it was actually using 10 processors during runtime.

I have noticed that other people experienced the same issue; I also raised this point some time ago (with no answers so far), but I hoped to solve this with the installation of the latest version.
Is there anything else I need to do to make the parallel version really efficient?

Thanks
Regards
Fabio

Re: Parallel version slower than the serial one

Posted: February 14th, 2020, 1:20 pm
by ariel.stein
Can you please try to modify the CONTROL file to run with only 1 species?

Re: Parallel version slower than the serial one

Posted: February 18th, 2020, 6:02 am
by Fabio.Dioguardi
Hi,

with 1 pollutant the serial case took 1.412 secs while the parallel one (with 10 cores) took 1.564 secs.

Thanks
Fabio

Re: Parallel version slower than the serial one

Posted: February 18th, 2020, 2:54 pm
by ariel.stein
OK, that is pretty fast. I would suggest you increase the duration of the runs and see if you notice any difference.
Since the parallelization is done over the number of particles, you will not notice any difference with runs that take such a short time. In your runs most of the time is spent reading the meteorological data.

Re: Parallel version slower than the serial one

Posted: February 19th, 2020, 5:54 am
by Fabio.Dioguardi
Hi,

OK I have increased the release time to 6 hours (so three times longer) and in fact the parallel version is much faster than the serial one, but only if I use one pollutant. With multiple pollutants the serial version is still significantly faster even with a longer emission time. And for my routine activities I need multiple pollutants...

Thanks
Fabio

Re: Parallel version slower than the serial one

Posted: February 21st, 2020, 9:52 am
by ariel.stein
You could do separate runs for each size.

Re: Parallel version slower than the serial one

Posted: February 25th, 2020, 5:20 am
by Fabio.Dioguardi
Hi,

OK thank you very much!

Fabio

Re: Parallel version slower than the serial one

Posted: February 28th, 2020, 3:27 pm
by McP82
Thanks for the explanation, I thought it was normal and that there was no way to circumvent this issue... but now I can work faster, thanks again!