Parallelization of pre-processing?

New ideas for code development
Post Reply
KHK
Posts: 20
Joined: Fri Nov 06, 2020 6:04 pm
Security question 1: No
Security question 2: 7

Parallelization of pre-processing?

Post by KHK » Fri Jun 04, 2021 1:42 pm

In my experience, Serpent spends a lot of time on tasks like these, before beginning to run any cycles:
Adding nuclides in material structural_material...

Nuclide 13027.82c -- aluminum 27 at 900K (Al-27)
Nuclide 14028.82c -- silicon 28 at 900K (Si-28)
Nuclide 14029.82c -- silicon 29 at 900K (Si-29)
Nuclide 14030.82c -- silicon 30 at 900K (Si-30)

...

Running Doppler-broadening preprocessor:

Adjusting nuclide 6000.82c temperature from 900K to 950K...
Adjusting nuclide 5010.82c temperature from 900K to 950K...
Adjusting nuclide 11023.82c temperature from 900K to 950K...

...

Generating unionize energy grids...

Adding points:

1001.82c -- Points added in neutron grid: 592
1001.80c -- Points added in neutron grid: 0
1002.82c -- Points added in neutron grid: 115
1002.80c -- Points added in neutron grid: 0
5010.82c -- Points added in neutron grid: 363

...

Processing cross sections and ENDF reaction laws...

Nuclide 1001.82c -- hydrogen at 950K (H-1)
Nuclide 1001.80c -- hydrogen at 294K (H-1)
Nuclide 1002.82c -- deuterium at 950K (H-2)
Nuclide 1002.80c -- deuterium at 294K (H-2)
As far as I can tell from the CPU usage, this is single threaded, but in my experience it often ends up taking more wall time than running the actual cycles which are parallelized.

But since the above is done for each isotope one at a time, couldn't it be threaded? It think it would vastly reduce the wall time usage of my jobs.

User avatar
Jaakko Leppänen
Site Admin
Posts: 2446
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Parallelization of pre-processing?

Post by Jaakko Leppänen » Mon Jun 07, 2021 8:55 am

The problem is that many of the pre-processing routines need to allocate more memory for the processed data. Memory management is not easy to do in an OpenMP parallel loop. Most of the time-consuming subroutines that only process data (such as the Doppler pre-processor) are already parallelized.
- Jaakko

Post Reply