Compiling error in SGI workstation

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

Compiling error in SGI workstation

#1 Unread post by zhouwei »

Hi ,I am a new user of ROMS .
Today I was trying to run the upwelling test case.I have modified the Linux-ifort.mk and makefile to define the netcdf lib and include
When I try compiling the model on a SGI workstation with Linux-ifort.
I get the following errors:

zw@a330:~/roms> make
make: svnversion: Command not found
/bin/sh: line 1: ROMS/Bin/cpp_clean: Permission denied
cp -f /lun/home/zw/netcdf/include /netcdf.mod Build
cp: omitting directory `/lun/home/zw/netcdf/include'
cp: cannot stat `/netcdf.mod': No such file or directory
make: *** [Build/netcdf.mod] Error 1

The SGI workstation's Operating System is SUSE 9.0 which hasn't installed subversion.It has included GNU make 3.8 and perl, v5.8.3 built for ia64-linux-thread-multi.

I don't know how to solve this problem .
Any information is greatly appreciated.

jcwarner
Posts: 1172
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#2 Unread post by jcwarner »

looks like there could be a few different problems here.
1) cpp_clean permission denied:
you may need to try:
cd ROMS/Bin
chmod +x cpp_clean

or
is this a perl thing?
2) roms now needs f90 interface in netcdf files. These f90 interface requires the netcdf.mod and typesizes.mod files.

zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

#3 Unread post by zhouwei »

Hi jcwarner
Thanks for your reply.
After trying ' chmod +x cpp_clean ' and modifying the lib and include of netcdf,I run 'make' again.

I get the following errors:


zw@a330:~/roms> make
make: svnversion: Command not found
: No such file or directory
cp -f /lun/home/zw/netcdf/include/netcdf.mod Build
cp -f /lun/home/zw/netcdf/include/typesizes.mod Build
./ROMS/Bin/sfmakedepend --cpp --fext=f90 --file=- --objdir=Build -DROMS_HEADER="upwelling.h" -I ROMS/Include -I ROMS/Nonlinear -I ROMS/SeaIce -I ROMS/Utility -I ROMS/Drivers -I ROMS/Functionals -I Master --silent --moddir Build ROMS/Nonlinear/bbl.F ROMS/Nonlinear/bc_2d.F ROMS/Nonlinear/bc_3d.F ROMS/Nonlinear/biology.F ROMS/Nonlinear/bulk_flux.F ROMS/Nonlinear/bvf_mix.F ROMS/Nonlinear/conv_2d.F ROMS/Nonlinear/conv_3d.F ROMS/Nonlinear/diag.F ROMS/Nonlinear/exchange_2d.F ROMS/Nonlinear/exchange_3d.F ROMS/Nonlinear/forcing.F ROMS/Nonlinear/get_data.F ROMS/Nonlinear/get_idata.F ROMS/Nonlinear/gls_corstep.F ROMS/Nonlinear/gls_prestep.F ROMS/Nonlinear/ini_fields.F ROMS/Nonlinear/initial.F ROMS/Nonlinear/interp_floats.F ROMS/Nonlinear/lmd_bkpp.F ROMS/Nonlinear/lmd_skpp.F ROMS/Nonlinear/lmd_swfrac.F ROMS/Nonlinear/lmd_vmix.F ROMS/Nonlinear/main2d.F ROMS/Nonlinear/main3d.F ROMS/Nonlinear/mpdata_adiff.F ROMS/Nonlinear/my25_corstep.F ROMS/Nonlinear/my25_prestep.F ROMS/Nonlinear/obc_volcons.F ROMS/Nonlinear/omega.F ROMS/Nonlinear/output.F ROMS/Nonlinear/pre_step3d.F ROMS/Nonlinear/prsgrd.F ROMS/Nonlinear/radiation_stress.F ROMS/Nonlinear/rho_eos.F ROMS/Nonlinear/rhs3d.F ROMS/Nonlinear/sediment.F ROMS/Nonlinear/set_avg.F ROMS/Nonlinear/set_data.F ROMS/Nonlinear/set_depth.F ROMS/Nonlinear/set_massflux.F ROMS/Nonlinear/set_tides.F ROMS/Nonlinear/set_vbc.F ROMS/Nonlinear/set_zeta.F ROMS/Nonlinear/step2d.F ROMS/Nonlinear/step3d_t.F ROMS/Nonlinear/step3d_uv.F ROMS/Nonlinear/step_floats.F ROMS/Nonlinear/t3dbc_im.F ROMS/Nonlinear/t3dmix.F ROMS/Nonlinear/tkebc_im.F ROMS/Nonlinear/u2dbc_im.F ROMS/Nonlinear/u3dbc_im.F ROMS/Nonlinear/uv3dmix.F ROMS/Nonlinear/v2dbc_im.F ROMS/Nonlinear/v3dbc_im.F ROMS/Nonlinear/wvelocity.F ROMS/Nonlinear/zetabc.F ROMS/Functionals/analytical.F ROMS/SeaIce/seaice.F ROMS/Utility/back_cost.F ROMS/Utility/back_cov.F ROMS/Utility/back_step.F ROMS/Utility/cgradient.F ROMS/Utility/checkdefs.F ROMS/Utility/checkvars.F ROMS/Utility/close_io.F ROMS/Utility/congrad.F ROMS/Utility/cost_grad.F ROMS/Utility/cost_norm.F ROMS/Utility/def_avg.F ROMS/Utility/def_diags.F ROMS/Utility/def_floats.F ROMS/Utility/def_gst.F ROMS/Utility/def_hessian.F ROMS/Utility/def_his.F ROMS/Utility/def_impulse.F ROMS/Utility/def_info.F ROMS/Utility/def_ini.F ROMS/Utility/def_mod.F ROMS/Utility/def_norm.F ROMS/Utility/def_rst.F ROMS/Utility/def_station.F ROMS/Utility/def_var.F ROMS/Utility/descent.F ROMS/Utility/distribute.F ROMS/Utility/dotproduct.F ROMS/Utility/downhill.F ROMS/Utility/extract_obs.F ROMS/Utility/extract_sta.F ROMS/Utility/gasdev.F ROMS/Utility/get_2dfld.F ROMS/Utility/get_2dfldr.F ROMS/Utility/get_3dfld.F ROMS/Utility/get_3dfldr.F ROMS/Utility/get_bounds.F ROMS/Utility/get_cycle.F ROMS/Utility/get_date.F ROMS/Utility/get_grid.F ROMS/Utility/get_gst.F ROMS/Utility/get_ngfld.F ROMS/Utility/get_ngfldr.F ROMS/Utility/get_state.F ROMS/Utility/get_varcoords.F ROMS/Utility/grid_coords.F ROMS/Utility/impulse.F ROMS/Utility/ini_adjust.F ROMS/Utility/inp_par.F ROMS/Utility/interpolate.F ROMS/Utility/metrics.F ROMS/Utility/mp_exchange.F ROMS/Utility/mp_routines.F ROMS/Utility/nf_fread2d.F ROMS/Utility/nf_fread3d.F ROMS/Utility/nf_fread4d.F ROMS/Utility/nf_fwrite2d.F ROMS/Utility/nf_fwrite3d.F ROMS/Utility/nf_fwrite4d.F ROMS/Utility/normalization.F ROMS/Utility/nrutil.F ROMS/Utility/obs_cost.F ROMS/Utility/obs_depth.F ROMS/Utility/obs_initial.F ROMS/Utility/obs_read.F ROMS/Utility/obs_scale.F ROMS/Utility/obs_write.F ROMS/Utility/oi_update.F ROMS/Utility/opencdf.F ROMS/Utility/packing.F ROMS/Utility/ran1.F ROMS/Utility/ran_state.F ROMS/Utility/regrid.F ROMS/Utility/set_2dfld.F ROMS/Utility/set_2dfldr.F ROMS/Utility/set_3dfld.F ROMS/Utility/set_3dfldr.F ROMS/Utility/set_diags.F ROMS/Utility/set_ngfld.F ROMS/Utility/set_ngfldr.F ROMS/Utility/set_scoord.F ROMS/Utility/set_weights.F ROMS/Utility/shapiro.F ROMS/Utility/state_addition.F ROMS/Utility/state_copy.F ROMS/Utility/state_dotprod.F ROMS/Utility/state_initialize.F ROMS/Utility/state_scale.F ROMS/Utility/stats_modobs.F ROMS/Utility/stiffness.F ROMS/Utility/timers.F ROMS/Utility/utility.F ROMS/Utility/white_noise.F ROMS/Utility/wpoints.F ROMS/Utility/wrt_avg.F ROMS/Utility/wrt_diags.F ROMS/Utility/wrt_floats.F ROMS/Utility/wrt_gst.F ROMS/Utility/wrt_hessian.F ROMS/Utility/wrt_his.F ROMS/Utility/wrt_info.F ROMS/Utility/wrt_ini.F ROMS/Utility/wrt_rst.F ROMS/Utility/wrt_station.F ROMS/Modules/mod_arrays.F ROMS/Modules/mod_average.F ROMS/Modules/mod_bbl.F ROMS/Modules/mod_biology.F ROMS/Modules/mod_boundary.F ROMS/Modules/mod_clima.F ROMS/Modules/mod_coupling.F ROMS/Modules/mod_diags.F ROMS/Modules/mod_eclight.F ROMS/Modules/mod_eoscoef.F ROMS/Modules/mod_floats.F ROMS/Modules/mod_forces.F ROMS/Modules/mod_fourdvar.F ROMS/Modules/mod_grid.F ROMS/Modules/mod_iounits.F ROMS/Modules/mod_kinds.F ROMS/Modules/mod_mixing.F ROMS/Modules/mod_ncparam.F ROMS/Modules/mod_netcdf.F ROMS/Modules/mod_obs.F ROMS/Modules/mod_ocean.F ROMS/Modules/mod_parallel.F ROMS/Modules/mod_param.F ROMS/Modules/mod_scalars.F ROMS/Modules/mod_sediment.F ROMS/Modules/mod_sources.F ROMS/Modules/mod_stepping.F ROMS/Modules/mod_storage.F ROMS/Modules/mod_strings.F ROMS/Modules/mod_tides.F Master/master.F Master/ocean_control.F Master/ocean_coupler.F Master/propagator.F > Build/MakeDepend
/bin/sh: line 1: ./ROMS/Bin/sfmakedepend: Permission denied
make: *** [Build/MakeDepend] Error 126


After running ' chmod +x ROMS/Bin/sfmakedepend',and I get the following errors:

zw@a330:~/roms> make
make: svnversion: Command not found
: No such file or directory
cd Build; ifort -c -ip -O3 bc_2d.f90
fortcom: Error: bc_2d.f90, line 908: Error in opening the Library module file. [MOD_PARAM]
USE mod_param
----------^
fortcom: Error: bc_2d.f90, line 912: Error in opening the Library module file. [EXCHANGE_2D_MOD]
USE exchange_2d_mod, ONLY : exchange_r2d_tile
----------^
fortcom: Error: bc_2d.f90, line 921: A kind type parameter must be a compile-time constant. [R8]
real(r8), intent(inout) :: A(LBi:,LBj:)
-----------^
fortcom: Error: bc_2d.f90, line 1024: Error in opening the Library module file. [MOD_PARAM]
USE mod_param
----------^
fortcom: Error: bc_2d.f90, line 1025: Error in opening the Library module file. [MOD_GRID]
USE mod_grid
----------^
fortcom: Error: bc_2d.f90, line 1026: Error in opening the Library module file. [MOD_SCALARS]
USE mod_scalars
----------^
fortcom: Error: bc_2d.f90, line 1030: Error in opening the Library module file. [EXCHANGE_2D_MOD]
USE exchange_2d_mod, ONLY : exchange_u2d_tile
----------^
fortcom: Error: bc_2d.f90, line 1039: A kind type parameter must be a compile-time constant. [R8]
real(r8), intent(inout) :: A(LBi:,LBj:)
-----------^
fortcom: Error: bc_2d.f90, line 1146: Error in opening the Library module file. [MOD_PARAM]
USE mod_param
----------^
fortcom: Error: bc_2d.f90, line 1147: Error in opening the Library module file. [MOD_GRID]
USE mod_grid
----------^
fortcom: Error: bc_2d.f90, line 1148: Error in opening the Library module file. [MOD_SCALARS]
USE mod_scalars
----------^
fortcom: Error: bc_2d.f90, line 1152: Error in opening the Library module file. [EXCHANGE_2D_MOD]
USE exchange_2d_mod, ONLY : exchange_v2d_tile
----------^
fortcom: Error: bc_2d.f90, line 1161: A kind type parameter must be a compile-time constant. [R8]
real(r8), intent(inout) :: A(LBi:,LBj:)
-----------^
fortcom: Error: bc_2d.f90, line 952: This name does not have a type, and must have an explicit type. [LM]
IF (Iend.eq.Lm(ng)) THEN
------------------^
fortcom: Error: bc_2d.f90, line 973: This name does not have a type, and must have an explicit type. [MM]
IF (Jend.eq.Mm(ng)) THEN
------------------^
fortcom: Error: bc_2d.f90, line 1009: Conflicting attributes or multiple declaration of name. [EXCHANGE_R2D_TILE]
CALL exchange_r2d_tile (ng, Istr, Iend, Jstr, Jend, &
-----------^
fortcom: Error: bc_2d.f90, line 912: Name in only-list does not exist. [EXCHANGE_R2D_TILE]
USE exchange_2d_mod, ONLY : exchange_r2d_tile
----------------------------------^
fortcom: Error: bc_2d.f90, line 1070: This name does not have a type, and must have an explicit type. [LM]
IF (Iend.eq.Lm(ng)) THEN
------------------^
fortcom: Error: bc_2d.f90, line 1091: This name does not have a type, and must have an explicit type. [MM]
IF (Jend.eq.Mm(ng)) THEN
------------------^
fortcom: Error: bc_2d.f90, line 1131: Conflicting attributes or multiple declaration of name. [EXCHANGE_U2D_TILE]
CALL exchange_u2d_tile (ng, Istr, Iend, Jstr, Jend, &
-----------^
fortcom: Error: bc_2d.f90, line 1030: Name in only-list does not exist. [EXCHANGE_U2D_TILE]
USE exchange_2d_mod, ONLY : exchange_u2d_tile
----------------------------------^
fortcom: Error: bc_2d.f90, line 1192: This name does not have a type, and must have an explicit type. [LM]
IF (Iend.eq.Lm(ng)) THEN
------------------^
fortcom: Error: bc_2d.f90, line 1213: This name does not have a type, and must have an explicit type. [MM]
IF (Jend.eq.Mm(ng)) THEN
------------------^
fortcom: Error: bc_2d.f90, line 1257: Conflicting attributes or multiple declaration of name. [EXCHANGE_V2D_TILE]
CALL exchange_v2d_tile (ng, Istr, Iend, Jstr, Jend, &
-----------^
fortcom: Error: bc_2d.f90, line 1152: Name in only-list does not exist. [EXCHANGE_V2D_TILE]
USE exchange_2d_mod, ONLY : exchange_v2d_tile
----------------------------------^
compilation aborted for bc_2d.f90 (code 1)
make: *** [Build/bc_2d.o] Error 1

what should I do to get rid of this problem? Thank you .

jcwarner
Posts: 1172
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#4 Unread post by jcwarner »

try
make clean
make
and see how that goes.

gerardo
Posts: 12
Joined: Wed Sep 27, 2006 7:23 pm
Location: SGI

#5 Unread post by gerardo »

Zhouwei,

Judging from your post, it looks like you're using an Altix 330
server. I will assume you are using Intel Fortran 9.x compilers.
I use a modified Linux-ifort.mk file. The differences are the
following (Linux-ifort8.mk is the original Linux-ifort.mk file;
Linux-ifort9.mk is mine):

nuke[104] diff Linux-ifort8.mk Linux-ifort9.mk
31c31
< LDFLAGS := -Vaxlib
---
> LDFLAGS :=
50,51c50,51
< NETCDF_INCDIR ?= /opt/intelsoft/netcdf/include
< NETCDF_LIBDIR ?= /opt/intelsoft/netcdf/lib
---
> NETCDF_INCDIR ?= /sw/sdev/netcdf/3.6.1/ia64/include
> NETCDF_LIBDIR ?= /sw/sdev/netcdf/3.6.1/ia64/lib
66c66
< CPPFLAGS += -DMPI
---
> CPPFLAGS += -DMPI -I//sw/sdev/mpt-ia64/1.15/include
72c72
< LIBS += -lfmpi-pgi -lmpi-pgi
---
> LIBS += -L/sw/sdev/mpt-ia64/1.15/lib -lmpi
84c84
< FFLAGS += -ip -O3
---
> FFLAGS += -ip -O3 -IPF-fp-relaxed -ftz -fno-alias

In addition, I changed all instances of "-nofree" to "-fixed on
lines 115 through 132.

For your system, you would need to change the two instances of
/sw/sdev/netcdf/3.6.1/ia64 to the path for the directory containing
your NetCDF libraries and headers directories, and the two instances
of /sw/sdev/mpt-ia64/1.15 to the directory containing the SGI MPT
libraries and headers directories (usually /usr, in which case the
corresponding -I and -L options could be omitted altogether).

Saludos,

Gerardo

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

#6 Unread post by linzhenhua »

Hello,Zhou
I have access to the same SGI as you. I just try ROMS on it. At first I'm lazy to compile the netcdf library myself and download the binary version from unidata, I meet with similiar fortcom problems as you, but with a different fortran 90 file. Then I compile the netcdf library from source code and now it works ok.

gerardo
Posts: 12
Joined: Wed Sep 27, 2006 7:23 pm
Location: SGI

#7 Unread post by gerardo »

linzhenhua wrote:
> I have access to the same SGI as you.I just try ROMS on it.
> At first I'm lazy to compile the netcdf library myself and
> download the binary version from unidata,I meet with similiar
> fortcom problems as you,but with a different fortran 90 file.
> Then I compile the netcdf library from source code and now
> it works ok.

That's a very good point. Note also that there is now version
3.6.2 of NetCDF, which according to the developers provides
"as much as 22% speedup for applications accessing floats or
ints on little-endian platforms".
(http://www.unidata.ucar.edu/software/ne ... s/faq.html)

To build and install this version on the Itanium-based Altix:

cd <working-directory>
wget http://www.unidata.ucar.edu/downloads/n ... cdf.tar.gz
tar zxvf netcdf.tar.gz
cd netcdf-3.6.2
./configure CC=icc CXX=icpc FC=ifort F90=ifort FFLAGS="-O3 -g" \
FCFLAGS="-O3 -g"
make check > & make.check.log
make install prefix=/<path-to>/netcdf-3.6.2

Look at make.check.log to verify that all tests pass.

zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

#8 Unread post by zhouwei »

Thanks to jcwarner ,gerardo and LIn, I have got rid of this problem at last .
It is caused by the netcdf . Thanks again for all your support. :D

Post Reply