Compiling and using -> roms_to_vis5d

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
roms-idemoc

Compiling and using -> roms_to_vis5d

#1 Post by roms-idemoc » Sat Dec 16, 2006 12:15 pm

Hi,

We are using Romstools with ROMS_Agrif v1.2 Beta. ROMS has compiled well for intel fortran compilers (v9.1).

Now, we are proving to turn the output of roms to vis5d ( http://marine.rutgers.edu/po/tools/plot.html ). Apparently roms_to_vis5d has compiled well, but when we executed -> ./roms_to_v5d < roms_to_v5d.in
pedro@afrodita:~/climate/roms-2.2/vis5d/roms_to_v5d$ ./roms_to_v5d < roms_to_v5d.in
dx = 9.9999998E-03 9.9999998E-03
x = 74.80000 74.80000
x = 73.26000 73.26000
y = 40.00000 37.49000
y = 40.00000 37.49000
in get_h
/home/pedro/climate/roms-2.2/vis5d/roms_to_v5d/roms_grd.nc

Reading: spherical
Reading: xl
Reading: el
Reading: h
Reading: f
Reading: pm
Reading: pn
Reading: lon_rho
Reading: lat_rho
Reading: angle
Reading: mask_rho
Reading: time_step
Reading: scrum_time
Reading: zeta

GET_SCOORD - unable to find grid variable: Cs_w
in grid NetCDF file: /home/pedro/climate/roms-2.2/vis5d/roms_to_v5d/roms_his.nc
GET_SCOORD
We have modified the archives roms_to_v5d.in and gridparam.h .
/home/pedro/climate/roms-2.2/vis5d/roms_to_v5d/roms_his.nc
/home/pedro/climate/roms-2.2/vis5d/roms_to_v5d/roms_grd.nc
leo.v5d
155 252 30

-1.0000000 -0.9666667 -0.9333333 -0.9000000 -0.8666667 -0.8333333 -0.8000000 -0.7666667 -0.7333333 -0.7000000 -0.6666667
-0.6333333 -0.6000000 -0.5666667 -0.5333333 -0.5000000 -0.4666667 -0.4333333 -0.4000000 -0.3666667 -0.3333333 -0.3000000
-0.2666667 -0.2333333 -0.2000000 -0.1666667 -0.1333333 -0.1000000 -0.0666667 -0.0333333 0.0000000

1
40. 74.8 .01 .01 0 0 0 0 0 0
1
integer L, M, N
parameter ( L=155 , M=252 , N=30 )
integer Lm, Lp, Mm, Mp, Np
parameter ( Lm=L-1, Lp=L+1, Mm=M-1, Mp=M+1, Np=N+1 )
integer isalt, itemp
parameter ( itemp=1, isalt=2 )
integer NT
parameter ( NT=2 )
It is possible that the version roms_to_vis5d isn`t prepared for ROMS_agrif and only work for ROMS Rutgers IMCS ??. What can be happening?. Must we rename some variable ?.

Thanks.

George
Posts: 9
Joined: Mon Jun 26, 2006 1:15 pm
Location: International Arctic Research Center

#2 Post by George » Mon Dec 18, 2006 11:25 pm

Have you checked the source code for consistency with your netcdf file?
I recently used roms_to_vis5d with ROMS v3 and I had to edit get_scoord.F
to change s_r to s_rho to reflect a variable name change in the newer versions of ROMS. This is probably a good place to start looking.
Good Luck

User avatar
lmkli
Posts: 23
Joined: Wed Aug 02, 2006 1:21 pm
Location: TAMU

compiling the roms_to_v5d

#3 Post by lmkli » Mon Jan 07, 2008 7:52 pm

Hi roms-idemoc,

I am a beginner of ROMS and Vis5d, and I encountered some problems on compiling roms_to_v5d.

Here is the compiling environment:
system: RedHat Enterprise Linux, 64-bit
compiler: ifort
netcdf version: 3.6.1

It seems something wrong with compiling options such like "-lnetcdf" when I use the intel fortran (ifort).
Could you please send a copy of your makefile for linux/ifort to me as a reference? I'll appreciate it very much!

My email: mingkui_li@ncsu.edu

User avatar
lmkli
Posts: 23
Joined: Wed Aug 02, 2006 1:21 pm
Location: TAMU

compiling the roms_to_v5d

#4 Post by lmkli » Mon Jan 07, 2008 8:01 pm

another question:

Do I need ncargf90 or NCARG?

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

#5 Post by kate » Tue Jan 08, 2008 7:36 pm

You just need ncargf77 unless it is using a different compiler than you are. Can you please show the exact errors? It's hard for us to say what's wrong from your description. Include a compile line too, like this, so we can see all your options:

Code: Select all

cc -g -c -DNO_BORDERS -DSINGLE_TASK -DOPENGL -I/usr/local/include -DUNDERSCORE  -c -o v5d.o v5d.c
cpp -P -I/usr/local/include -DUNDERSCORE <wvelocity> wvelocity.f
pgf90 -c -O3 -Mfree wvelocity.f
ncargf77 -o roms_to_v5d  -O3 -Mfree binio.o blkdat.o curv_to_cart.o def_v5d.o get_date.o get_h.o get_initial.o get_scoord.o lenstr.o main.o opencdf.o roms_v5d.o start_plot.o vminmax.o wind_times.o wrt_v5d.o v5d.o wvelocity.o -L/usr/local/lib -lnetcdf -lnsl
pgf90 -O -o roms_to_v5d -O3 -Mfree binio.o blkdat.o curv_to_cart.o def_v5d.o get_date.o get_h.o get_initial.o get_scoord.o lenstr.o main.o opencdf.o roms_v5d.o start_plot.o vminmax.o wind_times.o wrt_v5d.o v5d.o wvelocity.o -L/usr/local/lib -lnetcdf -lnsl -L/usr/local/pkg/ncar/ncarg-4.4.1.pgi/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11

User avatar
lmkli
Posts: 23
Joined: Wed Aug 02, 2006 1:21 pm
Location: TAMU

error report

#6 Post by lmkli » Fri Jan 11, 2008 1:02 am

something like this?

cc -O -I/usr/local/include -c -o binio.o binio.c
cpp -P -I/usr/local/include <blkdat> blkdat.f
ifort -c -fast -O3 -align -free blkdat.f
cpp -P -I/usr/local/include <curv_to_cart> curv_to_cart.f
cpp -P -I/usr/local/include <roms_v5d> roms_v5d.f
ifort -c -fast -O3 -align -free roms_v5d.f
ifort -c -fast -O3 -align -free curv_to_cart.f
cpp -P -I/usr/local/include <def_v5d> def_v5d.f
ifort -c -fast -O3 -align -free def_v5d.f
cpp -P -I/usr/local/include <get_date> get_date.f
ifort -c -fast -O3 -align -free get_date.f
cpp -P -I/usr/local/include <get_h> get_h.f
ifort -c -fast -O3 -align -free get_h.f
cpp -P -I/usr/local/include <get_initial> get_initial.f
ifort -c -fast -O3 -align -free get_initial.f
cpp -P -I/usr/local/include <get_scoord> get_scoord.f
ifort -c -fast -O3 -align -free get_scoord.f
cpp -P -I/usr/local/include <lenstr> lenstr.f
ifort -c -fast -O3 -align -free lenstr.f
cpp -P -I/usr/local/include <main> main.f
ifort -c -fast -O3 -align -free main.f
cpp -P -I/usr/local/include <opencdf> opencdf.f
ifort -c -fast -O3 -align -free opencdf.f
cpp -P -I/usr/local/include <start_plot> start_plot.f
ifort -c -fast -O3 -align -free start_plot.f
cpp -P -I/usr/local/include <vminmax> vminmax.f
ifort -c -fast -O3 -align -free vminmax.f
cpp -P -I/usr/local/include <wrt_v5d> wrt_v5d.f
ifort -c -fast -O3 -align -free wrt_v5d.f
cpp -P -I/usr/local/include <wvelocity> wvelocity.f
ifort -c -fast -O3 -align -free wvelocity.f
cc -O -I/usr/local/include -c -o v5d.o v5d.c
ifort -o roms_to_v5d -fnonstd -fast -O3 -align -free binio.o blkdat.o curv_to_cart.o def_v5d.o get_date.o get_h.o get_initial.o get_scoord.o lenstr.o main.o opencdf.o roms_v5d.o start_plot.o vminmax.o wrt_v5d.o wvelocity.o v5d.o -L/opt/intelsoft/lib -lnetcdf -lnsl
ifort: Command line warning: ignoring unknown option '-fnonstd'
IPO: WARNING: no IR in object file binio.o; was the source file compiled with -ipo?
IPO: WARNING: no IR in object file v5d.o; was the source file compiled with -ipo?
IPO Error: unresolved : v5dcreate_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : v5dsetlowlev_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : mapstc_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : maproj_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : mapset_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : mapint_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : maptrn_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : v5dclose_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : gdawk_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : gclwk_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : gclks_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : gopks_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : gopwk_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : gacwk_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : pcseti_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : v5dwrite_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO Error: unresolved : av2_
Referenced in /tmp/ipo_ifortOLEIP4.o
IPO: performing multi-file optimizations
IPO: generating object file /tmp/ipo_ifortOLEIP4.o
main.f(645) : (col. 9) remark: LOOP WAS VECTORIZED.
main.f(695) : (col. 8) remark: LOOP WAS VECTORIZED.
main.f(696) : (col. 8) remark: LOOP WAS VECTORIZED.
main.f(697) : (col. 8) remark: LOOP WAS VECTORIZED.
main.f(698) : (col. 8) remark: LOOP WAS VECTORIZED.
main.f(700) : (col. 11) remark: LOOP WAS VECTORIZED.
main.f(689) : (col. 11) remark: LOOP WAS VECTORIZED.
main.f(715) : (col. 11) remark: LOOP WAS VECTORIZED.
main.f(717) : (col. 6) remark: LOOP WAS VECTORIZED.
wrt_v5d.f(1760) : (col. 11) remark: LOOP WAS VECTORIZED.
wrt_v5d.f(1763) : (col. 11) remark: LOOP WAS VECTORIZED.
curv_to_cart.f(1527) : (col. 6) remark: LOOP WAS VECTORIZED.
curv_to_cart.f(1010) : (col. 6) remark: LOOP WAS VECTORIZED.
def_v5d.f(2133) : (col. 6) remark: BLOCK WAS VECTORIZED.
def_v5d.f(2133) : (col. 6) remark: LOOP WAS VECTORIZED.
def_v5d.f(2134) : (col. 6) remark: LOOP WAS VECTORIZED.
def_v5d.f(2145) : (col. 7) remark: LOOP WAS VECTORIZED.
curv_to_cart.f(2019) : (col. 6) remark: LOOP WAS VECTORIZED.
vminmax.f(8) : (col. 10) remark: LOOP WAS VECTORIZED.
vminmax.f(22) : (col. 10) remark: LOOP WAS VECTORIZED.
wvelocity.f(535) : (col. 7) remark: LOOP WAS VECTORIZED.
roms_v5d.f(98) : (col. 6) remark: LOOP WAS VECTORIZED.
roms_v5d.f(99) : (col. 6) remark: LOOP WAS VECTORIZED.
roms_v5d.f(100) : (col. 6) remark: LOOP WAS VECTORIZED.
roms_v5d.f(142) : (col. 11) remark: LOOP WAS VECTORIZED.
roms_v5d.f(131) : (col. 11) remark: LOOP WAS VECTORIZED.
roms_v5d.f(120) : (col. 11) remark: LOOP WAS VECTORIZED.
roms_v5d.f(109) : (col. 11) remark: LOOP WAS VECTORIZED.
get_initial.f(2031) : (col. 13) remark: LOOP WAS VECTORIZED.
get_initial.f(2066) : (col. 13) remark: LOOP WAS VECTORIZED.
get_initial.f(2072) : (col. 11) remark: LOOP WAS VECTORIZED.
get_initial.f(2082) : (col. 11) remark: LOOP WAS VECTORIZED.
get_initial.f(2134) : (col. 11) remark: LOOP WAS VECTORIZED.
get_initial.f(2164) : (col. 11) remark: LOOP WAS VECTORIZED.
get_initial.f(2196) : (col. 11) remark: LOOP WAS VECTORIZED.
get_initial.f(2200) : (col. 9) remark: LOOP WAS VECTORIZED.
get_initial.f(2206) : (col. 11) remark: LOOP WAS VECTORIZED.
curv_to_cart.f(512) : (col. 6) remark: LOOP WAS VECTORIZED.
/opt/intel/fce/9.0/lib/libifcore.a(for_open_proc.o)(.text+0xc0b): In function `for__compute_filename':
: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/opt/intel/fce/9.0/lib/libifcore.a(for_open_proc.o)(.text+0xd3c): In function `for__compute_filename':
: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/ipo_ifortOLEIP4.o(.text+0x4b2): In function `MAIN__':
: undefined reference to `mapstc_'
/tmp/ipo_ifortOLEIP4.o(.text+0x50e): In function `MAIN__':
: undefined reference to `maproj_'
/tmp/ipo_ifortOLEIP4.o(.text+0x589): In function `MAIN__':
: undefined reference to `mapset_'
/tmp/ipo_ifortOLEIP4.o(.text+0x590): In function `MAIN__':
: undefined reference to `mapint_'
/tmp/ipo_ifortOLEIP4.o(.text+0x5e5): In function `MAIN__':
: undefined reference to `maptrn_'
/tmp/ipo_ifortOLEIP4.o(.text+0x63a): In function `MAIN__':
: undefined reference to `maptrn_'
/tmp/ipo_ifortOLEIP4.o(.text+0x7b3): In function `MAIN__':
: undefined reference to `maptrn_'
/tmp/ipo_ifortOLEIP4.o(.text+0x7e3): In function `MAIN__':
: undefined reference to `maptrn_'
/tmp/ipo_ifortOLEIP4.o(.text+0x1065): In function `MAIN__':
: undefined reference to `v5dclose_'
/tmp/ipo_ifortOLEIP4.o(.text+0x1124): In function `MAIN__':
: undefined reference to `maproj_'
/tmp/ipo_ifortOLEIP4.o(.text+0x1166): In function `MAIN__':
: undefined reference to `maproj_'
/tmp/ipo_ifortOLEIP4.o(.text+0x148f): In function `wrt_v5d_':
: undefined reference to `v5dwrite_'
/tmp/ipo_ifortOLEIP4.o(.text+0x14b5): In function `wrt_v5d_':
: undefined reference to `v5dwrite_'
/tmp/ipo_ifortOLEIP4.o(.text+0x14db): In function `wrt_v5d_':
: undefined reference to `v5dwrite_'
/tmp/ipo_ifortOLEIP4.o(.text+0x1b33): In function `wrt_v5d_':
: undefined reference to `v5dwrite_'
/tmp/ipo_ifortOLEIP4.o(.text+0x210a): In function `wrt_v5d_':
: undefined reference to `v5dwrite_'
/tmp/ipo_ifortOLEIP4.o(.text+0x2130): more undefined references to `v5dwrite_' follow
/tmp/ipo_ifortOLEIP4.o(.text+0x6b24): In function `start_plot_':
: undefined reference to `gopks_'
/tmp/ipo_ifortOLEIP4.o(.text+0x6b3a): In function `start_plot_':
: undefined reference to `gopwk_'
/tmp/ipo_ifortOLEIP4.o(.text+0x6b46): In function `start_plot_':
: undefined reference to `gacwk_'
/tmp/ipo_ifortOLEIP4.o(.text+0x6b5c): In function `start_plot_':
: undefined reference to `pcseti_'
/tmp/ipo_ifortOLEIP4.o(.text+0x6b6b): In function `end_plot_':
: undefined reference to `gdawk_'
/tmp/ipo_ifortOLEIP4.o(.text+0x6b77): In function `end_plot_':
: undefined reference to `gclwk_'
/tmp/ipo_ifortOLEIP4.o(.text+0x6b7e): In function `end_plot_':
: undefined reference to `gclks_'
/tmp/ipo_ifortOLEIP4.o(.text+0x82a2): In function `def_v5d_':
: undefined reference to `v5dcreate_'
/tmp/ipo_ifortOLEIP4.o(.text+0x82ba): In function `def_v5d_':
: undefined reference to `v5dsetlowlev_'
/tmp/ipo_ifortOLEIP4.o(.text+0x97e5): In function `wvelocity_':
: undefined reference to `av2_'
/tmp/ipo_ifortOLEIP4.o(.text+0x9800): In function `wvelocity_':
: undefined reference to `av2_'
/tmp/ipo_ifortOLEIP4.o(.text+0x988e): In function `wvelocity_':
: undefined reference to `av2_'
/tmp/ipo_ifortOLEIP4.o(.text+0x98a9): In function `wvelocity_':
: undefined reference to `av2_'
make: *** [roms_to_v5d] Error 1

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

#7 Post by kate » Fri Jan 11, 2008 2:07 am

Yes, exactly. There are three things going on here:

1. You need to add -DUNDERSCORE to the compilation of v5d.c.

2. You need to use ncarg77 when linking to pick up the NCARG functions.

3. You need to check wvelocity for av2:

Code: Select all

     real &
     &        a1, a2, av2
      av2(a1,a2)=p5*(a1+a2)
This is a statement function so the last of these lines goes between the variable declarations and the start of the code that does work.

User avatar
lmkli
Posts: 23
Joined: Wed Aug 02, 2006 1:21 pm
Location: TAMU

thank you!

#8 Post by lmkli » Fri Jan 11, 2008 5:43 pm

thank you very much!

Post Reply