Error compiling ARWpost Ubuntu

Discussions related to the use of ARWPost

Error compiling ARWpost Ubuntu

Postby chrisc » Sun Jun 05, 2011 1:32 pm

Dear all
I've got a problem that seems similar to other posts here but for the life of me I can't figure out a solution based on previous posts. I have successfully compiled and run WPS and WRF but when it comes to ARWpost I get this error when compiling.

module_interp.f:(.text+0xc429): undefined reference to `nf_inq_varid_'
module_interp.f:(.text+0xc5af): undefined reference to `nf_inq_varid_'
module_interp.f:(.text+0xc67d): undefined reference to `nf_inq_var_'
module_interp.f:(.text+0xc95a): undefined reference to `ncvgt_'
module_interp.f:(.text+0xcca7): undefined reference to `ncvgt_'
module_interp.f:(.text+0xcf87): undefined reference to `ncvgt_'
make: [ARWpost.exe] Error 1 (ignored)

I have tried older versions of netcdf, no luck. I've tried the older version of ARWpost but that doesn't work either. I've tried with gfortran and intel fortran. I am working on Ubuntu 10.10. Please can anyone help, any suggestions welcome :)
best regards
Chris
chrisc
 
Posts: 7
Joined: Tue Mar 17, 2009 10:29 pm

Re: Error compiling ARWpost Ubuntu

Postby chrisc » Tue Jun 07, 2011 6:50 am

This problem seems solved by using the pre-compiled binaries for netcdf:
netcdf-3.6.2.tar.gz - Binary distribution of netcdf-3.6.2 on linux_2.6-x86_64.
Using these the compilation of ARWpost with gfortran successfully produces ARWpost.exe but then I get errors when I try to run ARWpost.
*** glibc detected *** ./ARWpost.exe: malloc(): memory corruption: 0x0000000001354500 ***

HOWEVER re-configuring and compiling ARWpost with intel fortran while continuing to use netcdf-3.6.2 appears to solve this problem. I hope this helps someone.
chrisc
 
Posts: 7
Joined: Tue Mar 17, 2009 10:29 pm

Re: Error compiling ARWpost Ubuntu

Postby jrm16020 » Wed Sep 14, 2011 10:20 am

If necessary, recompile NetCDF, still using NetCDF-4 functionality, but make detailed notes regarding any optimization flags used when NetCDF is compiled, specifically a CPPFLAG that looks like -O2 or -O3. I had the exact same problem with ARWpost, receiving the "undefined reference ..." message, but edited the configure.arwp file to change all of the default -O flags to match the -O2 used by my NetCDF compilation. In addition, I added the CPPFLAG -I/path/to/netcdf/include, and the LDFLAG "-L/path/to/netcdf/lib -lnetcdf -lnetcdff". This may be a little overkill, but it did the trick for me and I now have the ARWpost.exe program in my directory.
jrm16020
 
Posts: 5
Joined: Wed May 04, 2011 12:43 pm

Re: Error compiling ARWpost Ubuntu

Postby jrm16020 » Sun Sep 18, 2011 8:04 pm

It should be noted that you may have to link the NetCDF libraries to the ARWpost, WPS and/or WRF directories for everything to work.
jrm16020
 
Posts: 5
Joined: Wed May 04, 2011 12:43 pm


Return to ARWPost

Who is online

Users browsing this forum: No registered users and 1 guest

cron