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

runtime error of real.exe

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.


New member
Dear all

Because of your valuable advices my problem in WPS/metgrid.exe was solved.
However, real.exe shows error messages as follows;
"real.exe: symbol lookup error: real.exe: undefined symbol: netcdf_".

Compiling WRF seems to be completed and there are real.exe and wrf.exe which size is not zero.
I could not find the answer in FAQ. I will appreciate it if you could give me any advices.

Thank you very much.

I would like to attach some files.


    20.2 KB · Views: 53
  • env.dat
    2.8 KB · Views: 51
  • size.dat
    270 bytes · Views: 53
  • log.compile_201811.19.dat
    759.1 KB · Views: 53

You are using the Portland compiler. Your "configure.wrf" isn't configured perfectly for that.

Try running "ldd" on your "real.exe" file. You'll probably see no library files for "netcdf"
libraries, but files listed for others libraries.

You have multiple optons to fix:

(1) In your NETCDF library directory, there should be files with ".so" and ".a" in them. It is
the ".so" files that causing the problem. Move them to a different place and rebuild. If
there are files that end in .la (I think that is the name), move them too before rebuilding.

Files with .so in them are shared library files that must be available at runtime. File with .a
in them are static archive files. Their code is build into the binary at link time.

(2) Modify the environmental variable LD_LIBRARY_PATH to include the path to your
NETCDF library directory. No recompile is necessary.

(3) Modify "configure.wrf" to use your library files. Look for the "LIB_EXTERNAL" line. Add
a "-Rsomething" where "something" is exactly the same as listed for "-L". No space
between "-R" and "something"! Rebuild.

In all rebuild cases, no "clean -a" is necessary. Just build.

I have encountered this exact error when running real.exe:
./real.exe: symbol lookup error: /share/apps/netcdf/ undefined symbol: ncopts

But here is the situation. I am running this on a supercomputer with loadable modules (including NetCDF) and have the same setup in my own account and have done successful runs. I am now trying to get everything set up in a colleague's account but have run into this error. Everything up to this point went smoothly (compiling WRF, generating wrf.exe, real.exe, compiling WPS, generating geogrid, ungrib, and metgrid).

This is WRF, compiler option 15 and WPS 3.9.1 compiler option 17. It does look like the NetCDF libraries are recognized, and are version 4.1.3, the identical libraries as the ones I use in my own setup.

I am at a loss to explain the different behavior. The grib files are different than mine, and so the met*.nc files are different, but briefly viewing them in ncview makes it seem like they're fine. Both are GFS analyses on a 0.5° grid, but from different years.

Any clues of what to try would be appreciated, but the ones suggested earlier in this thread were not necessary in my own setup.

Thank you,

P.S. When I issue "ldd real.exe" here is the output: => (0x00007fff613c8000) => /usr/lib64/ (0x00007f3023cde000) => /share/opt/MATLAB/R2017a/bin/glnxa64/ (0x00007f3020990000) => /share/opt/intel/impi/ (0x00007f3020760000) => /share/opt/intel/impi/ (0x00007f30200ff000) => /share/sys65/root/lib64/ (0x00000038d1c00000) => /share/sys65/root/lib64/ (0x00000038d2000000) => /share/sys65/root/lib64/ (0x00000038d1800000) => /share/sys65/root/lib64/ (0x00000038d2400000) => /share/sys65/root/lib64/ (0x00000038d1400000) => /share/sys65/root/lib64/ (0x00000038d6800000) => /usr/lib64/ (0x00000038d7400000) => /usr/lib64/ (0x00000038d7000000) => /usr/lib64/ (0x00007f301fb14000) => /usr/lib64/ (0x0000003786e00000) => /usr/lib64/ (0x00007f301f822000) => /share/sys65/root/lib64/ (0x00000038d1000000) => /share/opt/MATLAB/R2017a/bin/glnxa64/ (0x00007f301f5b0000) => /share/opt/MATLAB/R2017a/bin/glnxa64/ (0x00007f301f169000) => /share/opt/MATLAB/R2017a/bin/glnxa64/ (0x00007f301ef38000) => /share/opt/MATLAB/R2017a/bin/glnxa64/ (0x00007f301eaa7000)
/lib64/ (0x0000003296400000) => /share/sys65/root/lib64/ (0x00000038de000000) => /usr/lib64/ (0x0000003786600000) => /share/sys65/root/lib64/ (0x0000003b36600000) => /share/sys65/root/lib64/ (0x0000003b36e00000) => /share/sys65/root/lib64/ (0x0000003289e00000) => /share/sys65/root/lib64/ (0x0000003b36a00000) => /usr/lib64/ (0x0000003784e00000) => /usr/lib64/ (0x0000003785600000) => /usr/lib64/ (0x0000003783e00000) => /usr/lib64/ (0x0000003783a00000) => /usr/lib64/ (0x0000003783600000) => /usr/lib64/ (0x0000003784600000) => /usr/lib64/ (0x0000003784200000) => /usr/lib64/ (0x0000003b6dc00000) => /usr/lib64/ (0x0000003786200000) => /share/sys65/root/lib64/ (0x00000038d3000000) => /usr/lib64/ (0x0000003785e00000) => /share/sys65/root/lib64/ (0x0000003289200000) => /share/sys65/root/lib64/ (0x0000003289a00000) => /usr/lib64/ (0x0000003b6d400000) => /usr/lib64/ (0x0000003b6d000000) => /share/sys65/root/lib64/ (0x00000038d5400000) => /share/sys65/root/lib64/ (0x0000003286200000) => /usr/lib64/ (0x0000003782e00000)
I believe I found the culprit. Although this issue might be very sensitive to the exact setup on a given machine, I'll post it here just in case anyone else runs into it. The colleague I am helping had a Matlab module "loaded", and I did not. So I tried unloading it, running real.exe again, and it worked. So there was a conflict that Matlab introduced with the NetCDF libraries.

Anyway, glad it was something so simple, but also had nothing to do with WRF!

Dear kwthomas

I have tried many things for this ten days.
I found that your (2) option is effective and real.exe run.
However using all (1),(2) and (3) was not effective.

Moreover, real.exe run by using (2), but there is some other problem.
Later I may ask in the forum.

Anyway, kwthomas, I appreciate your valuable comments.