Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Compiler option for OpenMP parallelization

Kengo Miyamoto

New member
Hello,

When a source program file A includes OpenMP directives, would it be difficult for all source program files that refer to objects in A to be compiled using OpenMP options?

Specifically, if test1.f90 and test.f90 are compiled with OpenMP options because they include OpenMP directives, it follows that test2.f90 should be compiled with an OpenMP option if it is called by a subroutine in test.f90 that is parallelized with OpenMP.

We don’t anticipate any issues if test2.f90 is also to be compiled with an OpenMP option, even if it is called by a non-parallelized subroutine in test.f90.

< $FC $OMP -c test1.f90
< $FC -c test2.f90
< $FC $OMP test1.o test2.o test.f90 -o test.out
---
> $FC $OMP -c test1.f90
> $FC $OMP -c test2.f90
> $FC $OMP test1.o test2.o test.f90 -o test.out


However, WRF 4.4.2 specifies some files to be compiled without OpenMP options in arch/noopt_eception_f file, which causes issues for Fujitsu Fortran when building WRF 4.4.2 load module files.

Would it be possible to compile all source program files that refer to the objects with OpenMP directives using OpenMP options in the future versions of WRF? This would be very helpful for us.

Sincerely
 
Hi,
I want to let you know we haven't forgotten about you. Neither of the primary admins of the WRF questions are software engineers, so we've reached out to a software engineer that may have a better idea about this. Either they will respond, or I'll respond if I hear from them. Thank you for your patience!
 
Apologies for the delayed reply! Having taken a quick look, I don't think it would be problematic if we added the OpenMP flags to the compilation of all files if an 'smpar' or 'sm+dm' configuration option were selected.

@Kengo Miyamoto Would you or someone from your group be interested in submitting a GitHub Pull Request (PR) to make the necessary changes for this? I don't believe anyone in our group has regular access to the Fujitsu compilers, so although we could make the changes, it would be difficult for us to verify that they work for anything besides the GNU, Intel, NVHPC, and Cray compilers.
 
Hello
I am using wrf 4.4.2 on a PREDATOR HELIOS 300 computer with linux mint 20.3. I compiled the wrf with option 33(smpar) to use OpenMP but it can't run with all the processors on my computer.
That is, I manage to compile the wrf well and make it run but it only works with 1 processor. Could someone help me with this?. I want to work with OpenMP and all the processors I have (12)
 
Hello
I am using wrf 4.4.2 on a PREDATOR HELIOS 300 computer with linux mint 20.3. I compiled the wrf with option 33(smpar) to use OpenMP but it can't run with all the processors on my computer.
That is, I manage to compile the wrf well and make it run but it only works with 1 processor. Could someone help me with this?. I want to work with OpenMP and all the processors I have (12)
Best to put this into a new thread.

But I do believe dmpar is the recommend configuration based on this.

 
Top