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

compilation error when I compile WRF with OpenMP (smpar)

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

nate-vnp

New member
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

  • compilation.log
    32.4 KB · Views: 65
  • configure.wrf
    21.2 KB · Views: 72
  • module_tiles.F
    16.2 KB · Views: 54
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!
 
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 ?
 
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.2 KB · Views: 61
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.
 
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.
 
Top