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

Problem building WPS, no ungrib.exe

ffrntic

New member
Hello,


I am currently working with WRF version 4.4 and WPS version 4.4 on an Ubuntu 22.04.3 LTS system running on an x86_64 architecture.

The system has an Intel Xeon CPU with 72 cores available and 187 GB of RAM. I have set up a Conda environment named wrf_gcc11_env with GCC 11.4.0 and GFortran 11.4.0. NetCDF libraries for both C and Fortran are installed inside this Conda environment located at /..../miniconda3/envs/wrf_gcc11_env. Other necessary libraries such as libjpeg, libpng, jasper, and zlib are also installed through Conda and verified to be present along with their header files. Although OpenMPI is installed, I am currently building WPS in serial mode.

During the build process, the geogrid.exe and metgrid.exe components compile and link successfully without any errors. However, the compilation of ungrib.exe fails at the linker stage with errors related to undefined references, particularly referencing the function jpc_decode. These errors suggest conflicts or version mismatches between libjasper and libjpeg in the Conda environment. I have observed warnings indicating that libjpeg.so.9, which is required by libjasper.so, may conflict with libjpeg.so.8. Despite multiple attempts to address this by setting environment variables and patching configure.wps to ensure the proper order of library linking, the linker errors for ungrib.exe persist. I have manually checked that the necessary libraries and headers exist in the Conda environment directories and that the build is using the Conda gfortran compiler. I have also ensured that ./clean -a and ./configure steps are performed fresh before rebuilding.

So far, I have tried verifying and correcting the NetCDF and other library paths, modifying configure.wps for the compression libraries and includes, and making sure environment variables such as NETCDF, JASPERLIB, JASPERINC, LD_LIBRARY_PATH, and PATH point correctly to the Conda environment. I have run the build inside a screen session to avoid connection issues and checked for mismatched libjpeg versions, attempting to align them using Conda.

I am reaching out to see if anyone else has encountered similar linker errors with ungrib.exe involving libjasper and libjpeg conflicts. I would appreciate guidance on best practices for resolving these version conflicts without having to reinstall system libraries. Additionally, I am interested in any known workarounds or patches for WPS 4.4 that address linker issues with ungrib.exe in Conda-managed environments. If building g2clib or jasper from source outside Conda might help, I would welcome any recommendations on versions or approaches.

Also, compile.log is enclosed (I have tried at least 50 compilations).


Thank you very much for your help!
 

Attachments

  • compile.log
    109.7 KB · Views: 3
Hi,
Have you tried configuring with the option to build the grib2 libraries internally? Follow the instructions mentioned in this section of the Users' Guide and see if that's helpful to get ungrib installed.

Thank you for you answer. I rebuilt WRF and WPS and it finally worked. Just one thing bothers me a bit. Compile.log for WPS finishes rather abruptly with a loop and with no indications that metgrid.exe and ungrib.exe are produced. But I have them in WPS folder and everything seems to be working fine ( I ran a test case). Is that possible? That compile.log just finishes without signalling that executables are produced and yet everything is working normal? Or is there some possible deeper error?
 
Hi,
Yes, unfortunately the compile log for WPS does not have any "success" message. The only indication of a problem is when there are errors in the log. If your executables are there and you were able to run the case, you're good to go!
 
Top