Help on installing NETCDF/HDF5/ROMS

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
lalvarez
Posts: 104
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Help on installing NETCDF/HDF5/ROMS

#1 Unread post by lalvarez »

Hello to all

I'm installing ROMS once again on a new computer, but many things have change and i need some help.
Can anyone give me a hand on how to do it?

All the stuff, NETCDF for C & fortran, CPPFLAGS for C & Fortran, HDF5, etc

I'm working on linux with a 64 bit machine

Thanks in advance

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Help on installing NETCDF/HDF5/ROMS

#2 Unread post by kate »

These things should be getting easier to install, reading the instructions. You just have to do them in the right order, HDF5 first, netcdf second, netcdf-fortran third, ROMS last. Let us know the specifics if you run into trouble.

lalvarez
Posts: 104
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Re: Help on installing NETCDF/HDF5/ROMS

#3 Unread post by lalvarez »

Hello Kate

Thanks a lot, i'll follow that order

Have a nice day


lalvarez
Posts: 104
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Re: Help on installing NETCDF/HDF5/ROMS

#5 Unread post by lalvarez »

Hi Shchepet

Thanks a lot for the guidance

Today i´m going to install all the stuff

Have a nice day

lalvarez
Posts: 104
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Re: Help on installing NETCDF/HDF5/ROMS

#6 Unread post by lalvarez »

Hello Shchepet

I have follow the directions in the http://....README.compiling_sequence, but when i got to the udunits installation I got this error

lab-ocean@labocean-OptiPlex-740-Enhanced ~/netcdf/udunits-2.2.20 $ sudo ./configure --prefix=/opt/netcdf-4.4.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for library containing dirname... none required
checking for library containing log10... -lm
checking for library containing XML_StopParser... no
configure: error: cannot find EXPAT function XML_StopParser


Can You give a clue about it

Have a nice day

User avatar
shchepet
Posts: 188
Joined: Fri Nov 14, 2003 4:57 pm

Re: Help on installing NETCDF/HDF5/ROMS

#7 Unread post by shchepet »

This means that XML packages from Linux distribution are not installed.
Type (assuming that you have rpm-based Linux; Debian uses different command)

Code: Select all

rpm -qa | grep XML 
you should get something like this

Code: Select all

perl-XML-SAX-0.990.0-7.mga5
perl-XML-SAX-Base-1.80.0-5.mga5
perl-XML-NamespaceSupport-1.110.0-7.mga5
perl-XML-Twig-3.480.0-4.mga5
perl-XML-Parser-2.410.0-9.mga5
perl-XML-LibXML-2.12.100-1.mga5
perl-XML-XPath-1.130.0-6.mga5
Clearly it shows ML-Parser-2.410.0-9 among other things installed on my machine.
If it is missing on yours, you should install it using rpm or urpmi or yum command,
whichever is applicable for your version of Linux.


For lowercase xlm

Code: Select all

rpm -qa | grep xml 
I get

Code: Select all

python-qt4-xml-4.11.3-1.mga5
libxml2-utils-2.9.4-1.1.mga5
lib64xml2_2-2.9.4-1.1.mga5
lib64ixml2-1.6.19-4.1.mga5
libxml2-python-2.9.4-1.1.mga5
lib64qtxmlpatterns4-4.8.6-9.mga5
lib64xml2-gir2.0-1.42.0-3.mga5
lib64xml++2.6_2-2.36.0-5.mga5
lib64akonadi-xml4-4.14.5-1.mga5
lib64tinyxml0-2.6.2-7.mga5
python-lxml-3.3.6-4.mga5
lib64pugixml1-1.7-1.mga5
lib64xml2-devel-2.9.4-1.1.mga5
lib64kxmlrpcclient4-4.14.5-1.mga5
lib64qtxml4-4.8.6-9.mga5
qt4-xmlpatterns-4.8.6-9.mga5
lib64kolabxml1-1.0.3-1.mga5
lib64qt5xml5-5.4.2-1.1.mga5
libxml2_2-2.9.4-1.1.mga5
python-qt4-xmlpatterns-4.11.3-1.mga5
Which are libraries, and things like lib64xml2-devel are header files *.h
which may be needed if you need to compile c-source code which calls any
of the function from matching libraries. You may need these packages as well.

lalvarez
Posts: 104
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Re: Help on installing NETCDF/HDF5/ROMS

#8 Unread post by lalvarez »

Hello

I did all the stuff and some more and finally i could compile the upwelling case, but when i run it i get the following error:


Model Input Parameters: ROMS/TOMS version 3.7
Friday - September 23, 2016 - 5:29:12 PM
-----------------------------------------------------------------------------

Wind-Driven Upwelling/Downwelling over a Periodic Channel

Operating system : Linux
CPU/hardware : x86_64
Compiler system : gfortran
Compiler command : /usr/bin/gfortran
Compiler flags : -frepack-arrays -fopenmp -O3 -ffast-math -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none

SVN Root URL : https://www.myroms.org/svn/src/trunk
SVN Revision : 820

Local Root : /home/lab-ocean/roms/trunk
Header Dir : /home/lab-ocean/roms/Projects/Upwelling
Header file : upwelling.h
Analytical Dir: /home/lab-ocean/roms/Projects/Upwelling

Resolution, Grid 01: 0041x0080x016, Parallel Threads: 2, Tiling: 001x001

ROMS/TOMS: Wrong choice of domain 001 partition or number of parallel threads.
NtileI*NtileJ must be a positive multiple of the number of threads.
Change number of threads (environment variable) or
change domain partition in input script.

Elapsed CPU time (seconds):


ROMS/TOMS - Output NetCDF summary for Grid 01:

ROMS/TOMS - Partition error ......... exit_flag: 6


ERROR: Illegal domain partition.


Can anyone give a hand on this, i have not got this before

Thanks in advance

User avatar
shchepet
Posts: 188
Joined: Fri Nov 14, 2003 4:57 pm

Re: Help on installing NETCDF/HDF5/ROMS

#9 Unread post by shchepet »

The errors you are reporting are unrelated to netCDF installation.

The error message from your roms model says it all:

Resolution, Grid 01: 0041x0080x016, Parallel Threads: 2, Tiling: 001x001

ROMS/TOMS: Wrong choice of domain 001 partition or number of parallel threads.
NtileI*NtileJ must be a positive multiple of the number of threads. Change number
of threads (environment variable) or change domain partition in input script.
At first, if you type
setenv OMP_NUM_THREADS 1
just before running your executable file, it will
work, but will be running only on a single CPU.



Secondly, edit your ocean.in or ocean.in file
whatever it called and find

Code: Select all

! Domain decomposition parameters for serial, distributed-memory or
! shared-memory configurations used to determine tile horizontal range
! indices (Istr,Iend) and (Jstr,Jend), [1:Ngrids].

      NtileI == 1                               ! I-direction partition
      NtileJ == 1                               ! J-direction partition

and set number of tiles accordingly. Currently you have 1 and 1 and attempting
to execute your code on two threads, hence the error. The number of tiles, NtileI*NtileJ
should be divisible by the number of threads OMP_NUM_THREADS but not
necessarily the same. In fact, in most cases you need more tiles that CPUs/cores you have.

Third, read viewtopic.php?f=17&t=2001&hilit=980x
to get an idea about how to select tiling.

User avatar
shchepet
Posts: 188
Joined: Fri Nov 14, 2003 4:57 pm

Re: Help on installing NETCDF/HDF5/ROMS

#10 Unread post by shchepet »

Another problem I noticed is

Operating system : Linux
CPU/hardware : x86_64
Compiler system : gfortran
Compiler command : /usr/bin/gfortran
Compiler flags : -frepack-arrays -fopenmp -O3 -ffast-math -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none
which means that you use gfortran to compile ROMS.

Did you succeed compiling netCDF packages using Intel Irort compiler?

If the answer is yes, when why are you using gfortran to compile ROMS instead of Ifort,
which makes it faster to run?

If the answer is no (presuming that you compiled netCDF packages using GCC/gfortran),
then the question is why to even compile netCDF? GCC-compiled netCDF packages are
available as precompiled binaries and even RPM-packages for most Linux distributions.

lalvarez
Posts: 104
Joined: Wed Feb 03, 2010 6:59 pm
Location: Universidad Autonoma de Baja California Sur

Re: Help on installing NETCDF/HDF5/ROMS

#11 Unread post by lalvarez »

Hey hello i'm back

Well yes i'm using gfortran to run ROMS, but did not knew that ifort makes ROMS go faster.

My system information is attached in the png file.

I think I successfully install the netCDF packages or at least I guess so.

I have not work on the tilling issue yet.

Thanks in advance & have a nice day
Attachments
System-Info.png

Post Reply