compilation error when I compile WRF with OpenMP (smpar)

Topics specifically related to running the model in an HPC environment
Post Reply
nate-vnp
Posts: 14
Joined: Tue Oct 23, 2018 9:32 am

compilation error when I compile WRF with OpenMP (smpar)

Post by nate-vnp » Fri May 24, 2019 5:21 pm

I get this error message when I try to compile WRF version 3 with OpenMP parallelism, at the final linking stage when I link all the executables to create the wrf.exe:


libwrflib.a(module_tiles.o): In function `module_tiles_mp_set_tiles2_':
module_tiles.f90:(.text+0x2532): undefined reference to `omp_get_max_threads_'

Any ideas how to fix this ?

It seems the intel compiler does not want to do any parallelism ...
Attachments
module_tiles.F
file where problem happens
(16.19 KiB) Downloaded 28 times
configure.wrf
configure file
(21.2 KiB) Downloaded 28 times
compilation.log
full compilation listing
(32.37 KiB) Downloaded 29 times

kwerner
Posts: 2251
Joined: Wed Feb 14, 2018 9:21 pm

Re: compilation error when I compile WRF with OpenMP (smpar)

Post by kwerner » Fri May 24, 2019 9:16 pm

Hi,
Can you let me know which version 3 (e.g., 3.8) you are compiling?
Do you know whether the OpenMP library was built with the version of Intel you are using to compile the WRF code?

Thanks!
NCAR/MMM

nate-vnp
Posts: 14
Joined: Tue Oct 23, 2018 9:32 am

Re: compilation error when I compile WRF with OpenMP (smpar)

Post by nate-vnp » Sat May 25, 2019 8:47 am

I do not know for sure.

Intel® Parallel Studio XE was the package I bought. I assumed OpenMP was included in the package.

So do I need to download a separate GNU OpenMP library ?

nate-vnp
Posts: 14
Joined: Tue Oct 23, 2018 9:32 am

Re: compilation error when I compile WRF with OpenMP (smpar)

Post by nate-vnp » Sat May 25, 2019 9:28 am

There is a problem with OpenMP generally in my Intel compiler.

When I run a test program (attached) this is what happens:

+++++++++++++++++++++++++++++++++++++++++++++

gfortran -fopenmp omp_hello.f
[vaughanp@anders-lindroth Desktop]$ ./a.out
Hello World from thread = 1
Hello World from thread = 4
Hello World from thread = 2
Hello World from thread = 3
Hello World from thread = 0
Number of threads = 5
[vaughanp@anders-lindroth Desktop]$ ifort -fopenmp omp_hello.f
[vaughanp@anders-lindroth Desktop]$ ./a.out
./a.out: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory
++++++++++++++++++++++++++++++++++++++++++++++++

So you see there is a problem with the Intel fortran compiler.
Attachments
omp_hello.f
(1.16 KiB) Downloaded 30 times

nate-vnp
Posts: 14
Joined: Tue Oct 23, 2018 9:32 am

Re: compilation error when I compile WRF with OpenMP (smpar)

Post by nate-vnp » Sat May 25, 2019 2:00 pm

I am compiling version 3.1.1 of WRF.

Now I am trying to compile with gfortran instead of the intel compiler in the hope that it works with OpenMP.

nate-vnp
Posts: 14
Joined: Tue Oct 23, 2018 9:32 am

Re: compilation error when I compile WRF with OpenMP (smpar)

Post by nate-vnp » Sat May 25, 2019 6:44 pm

I have found adding a "source" line to my bashrc file fixes the problem.

Now I have the WRF version 3 running with open mp for the Intel compiler. But there are run-time crashes in places like the module_big_step_utilities_em.f90::

-3 85 1 41 -3 85
forrtl: severe (408): fort: (2): Subscript #2 of the array TENDENCY has value 16 which is greater than the upper bound of 1

Image PC Routine Line Source
wrf.exe 0000000002725D73 module_big_step_u 2834 module_big_step_utilities_em.f90
wrf.exe 00000000027EF9A2 module_em_mp_init 1018 module_em.f90
wrf.exe 00000000028BFA75 module_first_rk_s 194 module_first_rk_step_part1.f90
libiomp5.so 00002B31E098CED3 Unknown Unknown Unknown

kwerner
Posts: 2251
Joined: Wed Feb 14, 2018 9:21 pm

Re: compilation error when I compile WRF with OpenMP (smpar)

Post by kwerner » Tue May 28, 2019 3:10 pm

I'm glad you were able to get past the compiling problem. I have copied/moved your most recent post to the 'wrf.exe' section of the forum, as that question is related to running wrf, and not specifically to compiling or HP computing. I updated the post so that the context makes sense as a new post. You can find that here:
viewtopic.php?f=40&t=5461&p=10382#p10382

Someone else in in charge of that topic area right now, but they should hopefully provide a response soon.
NCAR/MMM

Post Reply

Return to “High-performance Computing”