[Mesa-users] Opacity hook in parallel

Buchele, Lynn lmbuchele at shockers.wichita.edu
Wed Jul 15 17:57:42 EDT 2020


I have, and it does show in output of the terminal that OPM_NUM_THREADS is set to 8. After doing a bit of poking around, it looks like MESA is running in parallel, but one thread is getting assigned all of the zones that call the external code. (Since this is a low-T code, it ends up getting called only for the outer layer of the star). Is there an easy way to change how those loops are allocated to each thread?

Lynn


Pronouns: They/Them
Some people identify with or use pronouns that may not be obvious based on their appearance. By stating mine clearly I hope to encourage others to share theirs. Please help make our culture more inclusive, safe, and comfortable for everyone.
________________________________
From: Aaron Dotter <aaron.dotter at gmail.com>
Sent: Tuesday, July 14, 2020 4:28 PM
To: Buchele, Lynn <lmbuchele at shockers.wichita.edu>
Cc: mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
Subject: Re: [Mesa-users] Opacity hook in parallel

Hi Lynn,

Have you set OMP_NUM_THREADS to a number greater than 1 before you run MESA?

The code that calls the opacity routine, whether the standard or the other version, is wrapped in an OMP PARALLEL loop.  You can find examples of this in star/private/micro.f90 (look for do_kap_for_cell and routines that call it).

Aaron



On Tue, Jul 14, 2020 at 4:56 PM Buchele, Lynn via Mesa-users <mesa-users at lists.mesastar.org<mailto:mesa-users at lists.mesastar.org>> wrote:
Hi all,
I am working on plugging an external opacity code into MESA. I have the code compiling and running, however when I use the other kap hook in run_star_extras.f, MESA seems to only be running one thread.  When getting the external opacity code to run in parallel on its own, I did so by using a parallel do loop over the set of temperature and density points, but it seems like the other kap hook is only called for one zone at a time. My question is, can MESA call the other kap routine in parallel, or do I need to set up the kap routine to be parallelized internally?

Some more details that might be important: I'm working with version 12778, and the most recent release of the SDK.
Thanks for the help,
Lynn Buchele


Pronouns: They/Them
Some people identify with or use pronouns that may not be obvious based on their appearance. By stating mine clearly I hope to encourage others to share theirs. Please help make our culture more inclusive, safe, and comfortable for everyone.
_______________________________________________
mesa-users at lists.mesastar.org<mailto:mesa-users at lists.mesastar.org>
https://lists.mesastar.org/mailman/listinfo/mesa-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20200715/8e580ca4/attachment.htm>


More information about the Mesa-users mailing list