Compile issues on CentOS 5.8

Post any questions or comments regarding the LINUX version of HYSPLIT. This includes the model execution, GUIs, results, or graphics. Be sure to mention the version of LINUX you are using.
Post Reply
krice67
Posts: 1
Joined: January 16th, 2013, 9:56 am
Registered HYSPLIT User: No

Compile issues on CentOS 5.8

Post by krice67 » January 16th, 2013, 11:59 am

Hi
I'm trying to install hysplit on one of our servers for one of our scientists but I am running into compilation error. I'm trying to run the compile.sh script in the hysplit/trunk directory. The script starts to work but then bombs out when it is building the WRF-ARW decoder. It complains that it requires NetCDF, but all the available NetCDF distro packages are installed. Any advice or help would be appreciated.

dos2unix: converting file utils.c to UNIX format ...
dos2unix: converting file Makefile to UNIX format ...
Building fcsubs library
Building hysplit source library
lBuilding exec directory programs
Building the ascii2shp converter
Building the dbf editor
Building the WRF-ARW decoder (requires NetCDF)
ERROR
[root@aeronet trunk]# host 118.91.160.226
Host 226.160.91.118.in-addr.arpa. not found: 3(NXDOMAIN)
[root@aeronet trunk]# cat /etc/redhat-release
CentOS release 5.8 (Final)
[root@aeronet trunk]# pwd
/root/duild/hysplit/hysplit/trunk
[root@aeronet trunk]# yum list installed | grep -i netcdf
netcdf.i386 3.6.2-7.el5 installed
netcdf.x86_64 3.6.2-7.el5 installed
netcdf-decoders.x86_64 5.0.0-1.el5 installed
netcdf-devel.i386 3.6.2-7.el5 installed
netcdf-devel.x86_64 3.6.2-7.el5 installed
netcdf-static.x86_64 3.6.2-7.el5 installed
[root@aeronet trunk]#

Thanks
Keith

FCrt85
Posts: 2
Joined: January 23rd, 2013, 11:09 am
Registered HYSPLIT User: Yes

Re: Compile issues on CentOS 5.8

Post by FCrt85 » January 23rd, 2013, 11:25 am

Hi,

I'm having a similar issue for a local installation on an Ubuntu 12.10 x64 system. I have installed the netcdf packets via Ubuntu repositories, but, still, building the WRF-ARW decoder generates an error.
My NetCDF .so libraries are under usr/lib, while the headers and .inc file under usr/include (which are the same paths already set in the decoder's Makefile). The decoder is set as gfortran (FC=gfortran).

Is there something I'm doing wrong?

Thanks,

Federico

FCrt85
Posts: 2
Joined: January 23rd, 2013, 11:09 am
Registered HYSPLIT User: Yes

Re: Compile issues on CentOS 5.8

Post by FCrt85 » January 31st, 2013, 9:18 am

I am having issues with the compiler, but the solution to the previous problem may be to add the flag -lnetcdff in the makefile...

dgiles
Posts: 1
Joined: March 1st, 2013, 10:40 am
Registered HYSPLIT User: Yes

Re: Compile issues on CentOS 5.8

Post by dgiles » March 1st, 2013, 11:15 am

On CentOS 5.8, I compiled the Hysplit model software and interface on my local directory to avoid any incompatibility with system installed packages and to make sure packages were built with the same compilers. First, I needed to install netcdf 4.2.1.1 and then install the netcdf-fortran 4.2 to create libnetcdff. Next, I installed IOAPI 3.1 to create libioapi.a and make available the necessary includes. I made modifications to the hysplit make files and compiled hysplit (compile.sh). It was useful to run the make files within /data2arl/arw2arl and /cmaq directories to correctly assign the include and lib locations for the dependent packages before hysplit compilation. I still received an error on the cmaq makefile but after running compile.sh in the trunk (which must have cleaned the makes), it ran through the hysplit compilation without error. All of the packages appeared to be compiled with either gcc or gfortran. I ran the Hysplit test script (testing/xrun.scr) and the trajectory output matched the expected results output, while the dispersion results slightly varied which can be expected due to differences in random number generation on various hardware/software platforms.

Many thanks to Roland for his help and FCrt85's comment regarding libnetcdff (which needed to be modified from libnetcdf in the Hysplit make files).

chron
Posts: 9
Joined: February 4th, 2013, 7:32 pm
Registered HYSPLIT User: Yes

Re: Compile issues on CentOS 5.8

Post by chron » April 3rd, 2013, 10:42 am

I've previously encountered issues using some hysplit programs with recent netcdf libraries (>4.1). Installing netcdf 3.6.3 in addition to 4.2, and linking to that in the Makefiles, may solve your problems.

Also, as mentioned above some versions of netcdf build the fortran and c libraries separately in which case you need to use the -lnetcdff flag. Check the include and lib directories to see if libnetcdff.so is there in addition to libnetcdf.so. On the cluster I use, 3.6.3 does not compile them separately, whereas 4.2 does. Here's the relevant portion of my Makefile:

Code: Select all

NETLIB = /n/sw/netcdf-3.6.3_gnu/lib
NETINC = /n/sw/netcdf-3.6.3_gnu/include
#Update to 4.2: uncomment if you *really* need netcdf4 and can handle a few things breaking                                                                    
#NETLIB = /n/sw/netcdf-4.2_full/lib                                                 
#NETINC = /n/sw/netcdf-4.2_full/include                                             
HLIB = ../../library
#Use just -lnetcdf if compiling with netcdf-3.6.3, otherwise use -lnetcdff -lnetcdf:                                                                                   
LINKS = -L$(NETLIB) -lnetcdf -L$(HLIB) -lhysplit

jhumeau
Posts: 3
Joined: April 25th, 2014, 11:14 am
Registered HYSPLIT User: No

Re: Compile issues on CentOS 5.8

Post by jhumeau » April 25th, 2014, 11:47 am

hi,
I am sysadmin, I try to install hysplit for a user, on a cluster on CentOs5.

netcdf 3.6 is installed
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)

I have the same problem.

I edit "[hysplit_PATH]/trunk/data2arl/arw2arl/Makefile" :

Code: Select all

NETLIB = /usr/lib
NETINC = /usr/include/netcdf-3
LINKS = -L$(NETLIB) -lnetcdf -L../../library -lhysplit
But I have the an error (at the end of this post).
I maybe forgot something? How can I solve this problem?

Else, the user needs to do "backward/archive trajectory analysis".
What are executables or scripts for this task and where are they located in the trunk?

Another question. Is it possible to parallelize computation on multiple nodes?

Thanks.
Best Regards,
J.Humeau.

ERROR:
make[1]: Leaving directory `/share/apps/hysplit/trunk/data2arl/arw2arl'
gfortran -o ../../exec/arw2arl -O2 -fconvert=big-endian -frecord-marker=4 -ffree-form -I/usr/include/netcdf-3 arw2arl.f libarw.a -L/usr/lib64 -lnetcdf -L../../library -lhysplit
/tmp/cczuqaPF.o: In function `MAIN__':
arw2arl.f:(.text+0x713): undefined reference to `nf_open_'
arw2arl.f:(.text+0x1409): undefined reference to `nf_get_var_real_'
arw2arl.f:(.text+0x5384): undefined reference to `nf_close_'
arw2arl.f:(.text+0x89f5): undefined reference to `nf_strerror_'
libarw.a(get1dv.o): In function `get1dv_':
get1dv.f:(.text+0xb1): undefined reference to `nf_get_var_text_'
get1dv.f:(.text+0x1e7): undefined reference to `nf_strerror_'
libarw.a(get2dv.o): In function `get2dv_':
get2dv.f:(.text+0xa5): undefined reference to `nf_get_var_real_'
get2dv.f:(.text+0x1b9): undefined reference to `nf_strerror_'
libarw.a(get3dv.o): In function `get3dv_':
get3dv.f:(.text+0x161): undefined reference to `nf_get_vara_real_'
get3dv.f:(.text+0x2d7): undefined reference to `nf_strerror_'
libarw.a(get4dv.o): In function `get4dv_':
get4dv.f:(.text+0x18b): undefined reference to `nf_get_vara_real_'
get4dv.f:(.text+0x328): undefined reference to `nf_strerror_'
libarw.a(getdim.o): In function `getdim_':
getdim.f:(.text+0x7f): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0xb0): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x116): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x14c): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x1b2): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x1e5): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x249): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x27a): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x2de): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x30f): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x458): undefined reference to `nf_strerror_'
getdim.f:(.text+0x542): undefined reference to `nf_strerror_'
getdim.f:(.text+0x5ce): undefined reference to `nf_strerror_'
getdim.f:(.text+0x65b): undefined reference to `nf_strerror_'
getdim.f:(.text+0x6eb): undefined reference to `nf_strerror_'
libarw.a(setmap.o): In function `setmap_':
setmap.f:(.text+0x79): undefined reference to `nf_get_att_int_'
setmap.f:(.text+0xef): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x167): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x1df): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x257): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x2e9): undefined reference to `nf_get_att_real_'
libarw.a(setmap.o):setmap.f:(.text+0x379): more undefined references to `nf_get_att_real_' follow
libarw.a(setmap.o): In function `setmap_':
setmap.f:(.text+0xa7b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xb0b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xb9b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xc2b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xcbb): undefined reference to `nf_strerror_'
libarw.a(setmap.o):setmap.f:(.text+0xd4b): more undefined references to `nf_strerror_' follow
libarw.a(setvar.o): In function `setvar_':
setvar.f:(.text+0xa5): undefined reference to `nf_inq_varid_'
setvar.f:(.text+0xdc): undefined reference to `nf_inq_varndims_'
setvar.f:(.text+0x110): undefined reference to `nf_inq_vardimid_'
setvar.f:(.text+0x197): undefined reference to `nf_inq_dimlen_'
setvar.f:(.text+0x1f5): undefined reference to `nf_strerror_'
setvar.f:(.text+0x295): undefined reference to `nf_strerror_'
setvar.f:(.text+0x3b8): undefined reference to `nf_get_att_int_'
setvar.f:(.text+0x403): undefined reference to `nf_get_att_real_'
setvar.f:(.text+0x495): undefined reference to `nf_strerror_'
setvar.f:(.text+0x568): undefined reference to `nf_strerror_'
setvar.f:(.text+0x86a): undefined reference to `nf_strerror_'
setvar.f:(.text+0x8f3): undefined reference to `nf_strerror_'
collect2: ld returned 1 exit status
make: *** [arw2arl] Error 1

jhumeau
Posts: 3
Joined: April 25th, 2014, 11:14 am
Registered HYSPLIT User: No

Re: Compile issues on CentOS 5.8

Post by jhumeau » April 25th, 2014, 12:00 pm

Hi,

I try to install hysplit on a cluster on CentOS.
I have the same problem with netcdf3.6.
So I edit hysplit_PATH/trunk/data2arl/arw2arl/Makefile:

Code: Select all

/NETLIB = /usr/lib
NETINC = /usr/include/netcdf-3
LINKS = -L$(NETLIB) -lnetcdf -L../../library -lhysplit
And I have an error (at the end of this post)
I maybe forgot something? How can I solve this error?

Else, the user wants to do "backward/archive trajectory analysis".
What are executables or scripts needed to do this and where are they located on the trunk?

Thanks.

Regards,
J.humeau

ERROR:
make[1]: Leaving directory `/share/apps/hysplit/trunk/data2arl/arw2arl'
gfortran -o ../../exec/arw2arl -O2 -fconvert=big-endian -frecord-marker=4 -ffree-form -I/usr/include/netcdf-3 arw2arl.f libarw.a -L/usr/lib -lnetcdf -L../../library -lhysplit
/tmp/cczuqaPF.o: In function `MAIN__':
arw2arl.f:(.text+0x713): undefined reference to `nf_open_'
arw2arl.f:(.text+0x1409): undefined reference to `nf_get_var_real_'
arw2arl.f:(.text+0x5384): undefined reference to `nf_close_'
arw2arl.f:(.text+0x89f5): undefined reference to `nf_strerror_'
libarw.a(get1dv.o): In function `get1dv_':
get1dv.f:(.text+0xb1): undefined reference to `nf_get_var_text_'
get1dv.f:(.text+0x1e7): undefined reference to `nf_strerror_'
libarw.a(get2dv.o): In function `get2dv_':
get2dv.f:(.text+0xa5): undefined reference to `nf_get_var_real_'
get2dv.f:(.text+0x1b9): undefined reference to `nf_strerror_'
libarw.a(get3dv.o): In function `get3dv_':
get3dv.f:(.text+0x161): undefined reference to `nf_get_vara_real_'
get3dv.f:(.text+0x2d7): undefined reference to `nf_strerror_'
libarw.a(get4dv.o): In function `get4dv_':
get4dv.f:(.text+0x18b): undefined reference to `nf_get_vara_real_'
get4dv.f:(.text+0x328): undefined reference to `nf_strerror_'
libarw.a(getdim.o): In function `getdim_':
getdim.f:(.text+0x7f): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0xb0): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x116): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x14c): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x1b2): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x1e5): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x249): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x27a): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x2de): undefined reference to `nf_inq_dimid_'
getdim.f:(.text+0x30f): undefined reference to `nf_inq_dimlen_'
getdim.f:(.text+0x458): undefined reference to `nf_strerror_'
getdim.f:(.text+0x542): undefined reference to `nf_strerror_'
getdim.f:(.text+0x5ce): undefined reference to `nf_strerror_'
getdim.f:(.text+0x65b): undefined reference to `nf_strerror_'
getdim.f:(.text+0x6eb): undefined reference to `nf_strerror_'
libarw.a(setmap.o): In function `setmap_':
setmap.f:(.text+0x79): undefined reference to `nf_get_att_int_'
setmap.f:(.text+0xef): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x167): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x1df): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x257): undefined reference to `nf_get_att_real_'
setmap.f:(.text+0x2e9): undefined reference to `nf_get_att_real_'
libarw.a(setmap.o):setmap.f:(.text+0x379): more undefined references to `nf_get_att_real_' follow
libarw.a(setmap.o): In function `setmap_':
setmap.f:(.text+0xa7b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xb0b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xb9b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xc2b): undefined reference to `nf_strerror_'
setmap.f:(.text+0xcbb): undefined reference to `nf_strerror_'
libarw.a(setmap.o):setmap.f:(.text+0xd4b): more undefined references to `nf_strerror_' follow
libarw.a(setvar.o): In function `setvar_':
setvar.f:(.text+0xa5): undefined reference to `nf_inq_varid_'
setvar.f:(.text+0xdc): undefined reference to `nf_inq_varndims_'
setvar.f:(.text+0x110): undefined reference to `nf_inq_vardimid_'
setvar.f:(.text+0x197): undefined reference to `nf_inq_dimlen_'
setvar.f:(.text+0x1f5): undefined reference to `nf_strerror_'
setvar.f:(.text+0x295): undefined reference to `nf_strerror_'
setvar.f:(.text+0x3b8): undefined reference to `nf_get_att_int_'
setvar.f:(.text+0x403): undefined reference to `nf_get_att_real_'
setvar.f:(.text+0x495): undefined reference to `nf_strerror_'
setvar.f:(.text+0x568): undefined reference to `nf_strerror_'
setvar.f:(.text+0x86a): undefined reference to `nf_strerror_'
setvar.f:(.text+0x8f3): undefined reference to `nf_strerror_'
collect2: ld returned 1 exit status
make: *** [arw2arl] Error 1

ariel.stein
Posts: 617
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes
Contact:

Re: Compile issues on CentOS 5.8

Post by ariel.stein » April 29th, 2014, 9:35 am

Are you compiling the NetCDF libraries with the same compiler as the hysplit libraries?

jhumeau
Posts: 3
Joined: April 25th, 2014, 11:14 am
Registered HYSPLIT User: No

Re: Compile issues on CentOS 5.8

Post by jhumeau » April 30th, 2014, 4:01 am

Hi,
I solve the compilation problems by installing netCDF4

I don't install IOAPI so the installation failed now on cmaq.
Did we need it for backward trajectory analysis ?

I find an example script "autotraj.sh" which just use "hyts_std" and "trajplot"

So we tried to write the "CONTROL" like in "autotraj.sh" :

Code: Select all

09 04 12
1
50.31 2.81 500
-120
0
10000.0
5
/home/aude.pascaud/meteo_hysplit/
gdas1.apr09.w2
./
tdump
Then we run the exec hycs_std but we had the following error:

Code: Select all

 HYSPLIT4 - Initialization 
 Last Changed Rev: 590
 Last Changed Date: 2014-04-24 21:15:13 +0200 (Thu, 24 Apr 2014)
 
At line 301 of file runset.f
Fortran runtime error: End of file
How we have to write this "CONTROL" file?

Thx.

ariel.stein
Posts: 617
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes
Contact:

Re: Compile issues on CentOS 5.8

Post by ariel.stein » May 1st, 2014, 1:57 pm

please check the following link:
www.hysplit.com

Post Reply