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

(SOLVED) WRF v4.1.2 compilation error

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.

chunchih

Member
I am trying to compile WRF v4.1.2 on Linux #1 SMP 3.10.0-1062.12.1.el7.x86_64. I am compiling em_real in WRF using Intel ifort/icc compiler with the dmpar option. My compilation failed when it ran into a problem with "wrf_io.o: In function `ext_ncd_open_for_read_begin_'", with a bunch of error statements indicating undefined reference to 'nf_XXXX', where XXXX is many different variables. I have attached my configure.wrf and compile.log files to this post.

I previously compiled and ran WRF v3.9.1.1 successfully on the same machine with the identical environment settings. However, when I tried to configure WRF v4.1.2, I encountered this error message right off the bat:

************************** W A R N I N G ************************************
NETCDF4 IO features are requested, but this installation of NetCDF
/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/MPI/intel2018.3/openmpi3.1/netcdf-fortan-mpi/4.4.4
DOES NOT support these IO features.

Please make sure NETCDF version is 4.1.3 or later and was built with
--enable-netcdf4

OR set NETCDF_classic variable
bash/ksh : export NETCDF_classic=1
echo csh : setenv NETCDF_classic 1

Then re-run this configure script

!!! configure.wrf has been REMOVED !!!

*****************************************************************************

so I added 'export NETCDF_classic=1' in my .bashrc file according to its suggestion. Doing so avoided the error while configuring the model, but then I encountered the above error while compiling em_real. I am not too sure whether these issues are related.

Any help would be greatly appreciated. Thank you!
 

Attachments

  • compile.log
    99.4 KB · Views: 59
  • configure.wrf
    23.2 KB · Views: 52
Problem solved.

I was trying to compile it on Cedar, one of Compute Canada's HPC machines. It turns out that I still need to load the WRF module on the machine first for it to compile successfully, despite I had copied all of the WRF source codes from the system's software base directory to my working directory and pointed to the required NetCDF library in my environment setup file.

I still don't fully understand the cause of the problem, but it seems like WRF's ./compile program won't be able to find or link to the correct NetCDF library unless I have loaded the correct version of the WRF module on the machine. So it might be a machine-specific issue.
 
Hi,
It shouldn't matter where in the .bashrc you add that line, but you will need to make sure to source the file to ensure the command is incorporated into the environment:
Code:
source .bashrc
You could also just set it in your command line prior to compiling.
 
Top