Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Tue Jun 18, 2019 9:05 pm




Post new topic Reply to topic  [ 5 posts ] 

All times are UTC

Author Message
PostPosted: Mon Jan 03, 2011 2:46 pm 
Offline
User avatar

Joined: Tue Aug 21, 2007 5:44 pm
Posts: 158
Location: Jeju National University
Hi all,

I have encountered the compiling error when I tried to use the R4DVAR.

I used build.bash and got below result

Quote:
/opt/mpich2/bin/mpif90 -O3 -tp core2-64 /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/esmf_roms.o /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/master.o /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/ocean_control.o /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/ocean_coupler.o /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/propagator.o /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/roms_export.o /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/roms_import.o -o /home/ocean/model/trunk32/project/WC13/R4DVAR/oceanM /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libADM.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libADM_bio.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libRPM.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libRPM_bio.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libTLM.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libTLM_bio.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libNLM.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libNLM_bio.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libNLM_sed.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libANA.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libUTIL.a /home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libMODS.a -L/usr/local/netcdf/lib -lnetcdf -L/opt/ARPACK -lparpack -L/opt/ARPACK -larpack
/home/ocean/model/trunk32/project/WC13/R4DVAR/Build/libUTIL.a(posterior_var.o): In function `posterior_var_mod_posterior_var_tile_':
/home/ocean/model/trunk32/project/WC13/R4DVAR/Build/./posterior_var.f90:304: undefined reference to `dpotrf_'
/home/ocean/model/trunk32/project/WC13/R4DVAR/Build/./posterior_var.f90:314: undefined reference to `dpotri_'
make: *** [/home/ocean/model/trunk32/project/WC13/R4DVAR/oceanM] Error 2


I got the same result when I tried to compile the PSAS.

I compiled I4DVAR successfully and the model was run without any problem.

Any suggestion would be great.

Regards,

-Peter


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 05, 2011 12:38 pm 
Offline
User avatar

Joined: Tue Aug 21, 2007 5:44 pm
Posts: 158
Location: Jeju National University
I'm back to here to report the solution which I was stuck in before.

I was trying to run the example, WC13 from recent assimilation Workshop.

Thanks to the detailed explanation, I was able to run the I4DVAR.

To run the I4DVAR, one need to compile the ARPACK tools before they run the model.

I compiled the ARPACK. I4DVAR ran without any problem.

However, the problem happened when I was about to run the PSAS or R4DVAR.

Those two model demand dpotrf and dpotri funtion which is in LAPACK tools.

LAPACK can be compiled when one compile ARPACK.

And I didn't realize that my LAPACK is very old one which those two function is not included.

I spent some of my time to find newer LAPACK version and tried to install it on my machine.

I failed to compile the new version of LAPACK.

Later on I finally realize that ARPACK tools which has dpotrf and dpotri function are included in ROMS code (trunk/Lib/ARPACK).

I compiled that one again and run PSAS. It began to run smoothly.


During the compiling the ARPACK from ROMS code, I found that header file(mpif.h) is missing

in both PARPACK/SRC/MPI and PARPACK/UTIL/MPI.

So, I think it needs to be included.


Also, I think it would be nice that the ROMS administrator add a description about the location of ARPACK

as a tip of 4DVAR in order not to happen similar situation of mine.



Lastly, I'm grateful for all the detailed guide of 4DVAR example from wikiROMS to workshop agenda.

Thank you

-JH


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 05, 2011 10:05 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1076
Location: IMCS, Rutgers University
You are using the wrong ARPACK/PARPACK library. You need to use and compile the source code provided in the ROMS repository for these libraries. See trunk sub-directory Lib/ARPACK/LAPACK. You will notice that both dport.f and dpotri.f are located in this directory. Users need to use the ARPACK/PARPACK library provided in the ROMS repository because few changes have been made to these libraries to allow checkpointing in the adjoint-based, GST algorithms. Also we included a additional files needed for matrix inversion in the BLAS and LAPACK sub-directories, see :arrow: ticket 333. The original ARPACK library is distributed with only the files that are needed internally.

You are not compiling the parallel PARPACK library correctly. The file mpif.h is not part of the ARPACK/PARPACK library :!: This is done in the makefile since there are various possibilities for the MPI library (MPICH1, MPICH2, OpenMPI, native). The header file mpif.h is architecture dependent. Notice that ROMS does not have this header file either. This is all managed during compilation.

We will add a more visible documentation in :arrow: WikiROMS for the ARPACK/PARPACK libraries.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 06, 2011 3:52 am 
Offline
User avatar

Joined: Tue Aug 21, 2007 5:44 pm
Posts: 158
Location: Jeju National University
Hi, Dr. Arango. Thank you for your reply.

At first, I used original(wrong) ARPACK but later I used a right one which you are describing above (I wrote about that).


You are right about the mpif.h. It does not exist in the original ARPACK library.


Thank you for your note.

-JH


Top
 Profile  
Reply with quote  
PostPosted: Tue May 21, 2019 7:41 pm 
Offline

Joined: Sun Mar 10, 2019 2:34 pm
Posts: 15
Location: University of Tsukuba
Dear Sir Arango!

When I tried to copile the ARPACK, because of my system I should choose the file ARmake.mpif90-Linux, but options of the file such as

FC = mpif90
FFLAGS = -u -Bstatic -fastsse -Mipa=fast

# Set the parallel fortran compiler

PFC = mpif90
PFFLAGS = -u -Bstatic -fastsse -Mipa=fast

Did not work. I have these error

Makefile:50: warning: overriding recipe for target '.f.o'
../ARmake.inc:91: warning: ignoring old recipe for target '.f.o'
mpif90 -u -Bstatic -fastsse -Mipa=fast -c sgetv0.f
gfortran: error: unrecognized command line option ‘-fastsse’
gfortran: error: unrecognized command line option ‘-Mipa=fast’
Makefile:50: recipe for target 'sgetv0.o' failed

And I realise these setting are same with ARmake.MPI-Linux file.

could you please let me known the right setting of ARmake.mpif90-Linux file?

when I by pass -fastsse -Mipa, the ARPACK can successfully install and linked, but It take me to other error like in this topic notify that I do not have dport.f and dpotri.f when I tried to run buil_roms.bash

Thank you so much for your hard works.

PS. this is my mpif90 version

root@C2:/work/apps/gnu_4.8.5/ROMS/3.0.1/trunk/Lib/ARPACK# mpif90 --version
GNU Fortran (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.




[/quote]
We will add a more visible documentation in :arrow: WikiROMS for the ARPACK/PARPACK libraries.[/quote]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group