compiling upwelling

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
wangkai
Posts: 8
Joined: Sun Mar 31, 2019 2:01 pm
Location: Nanjing University of Information Science & Techno

compiling upwelling

#1 Unread post by wangkai »

hello everyone:
i am encountering a problem when i am compiling the case of upwelling, it shows that:
cp -f /home/kzf/softwares/packman.active/include/netcdf.mod /home/kzf/myroms/projects/upwelling/Build_romsG
cp -f /home/kzf/softwares/packman.active/include/typesizes.mod /home/kzf/myroms/projects/upwelling/Build_romsG
:No such file or directory
make: **** no rule to make target...
i guess it is the problems of netcdf,the version of netcdf is 4.1.2

i edit my build_roms.bash like that:

export USE_NETCDF4=on
export USE_MY_LIBS=yes
export NETCDF_INCDIR=/home/kzf/softwares/packman.active/include
export NETCDF_LIBDIR=/home/kzf/softwares/packman.active/lib
export NC_CONFIG=/home/kzf/softwares/packman.active/bin/nc-config
export NF_CONFIG=/home/kzf/softwares/packman.active/bin/nf-config

could you help fix this problems,thanks very much!
by the way ,the netcdf.mod and typesizes.mod do exist in the file of Build_romsG. but the compiling is unsucessful

MIDHILAVARNAV
Posts: 30
Joined: Fri Dec 15, 2017 6:07 pm

Re: compiling upwelling

#2 Unread post by MIDHILAVARNAV »

I suppose that you are trying to compile the test case of upwelling, i too had similiar problems while compiling the test case. Please try to rectify it by changing line 52 of Linux-gfortran.mk as follows ( code from unidata):

Before

LIBS := -L$(NETCDF_LIBDIR) -lnetcdf

After

LIBS := -L$(NETCDF_LIBDIR) -lnetcdf -lnetcdff

Keep a copy of the original or keep a changelog session for future use.

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

Re: compiling upwelling

#3 Unread post by jcwarner »

you might get to a problem with netcdf, and perhaps the -lnetcdff flag is needed, but right now your problem is:

"cp -f /home/kzf/softwares/packman.active/include/netcdf.mod /home/kzf/myroms/projects/upwelling/Build_romsG
cp -f /home/kzf/softwares/packman.active/include/typesizes.mod /home/kzf/myroms/projects/upwelling/Build_romsG
:No such file or directory"

so:
1) does this directory exist: /home/kzf/softwares/packman.active/include/
2) does that directory contain netcdf.mod and typesizes.mod
3) does this directory exist: /home/kzf/myroms/projects/upwelling/Build_romsG

-john

wangkai
Posts: 8
Joined: Sun Mar 31, 2019 2:01 pm
Location: Nanjing University of Information Science & Techno

Re: compiling upwelling

#4 Unread post by wangkai »

MIDHILAVARNAV wrote:I suppose that you are trying to compile the test case of upwelling, i too had similiar problems while compiling the test case. Please try to rectify it by changing line 52 of Linux-gfortran.mk as follows ( code from unidata):

Before

LIBS := -L$(NETCDF_LIBDIR) -lnetcdf

After

LIBS := -L$(NETCDF_LIBDIR) -lnetcdf -lnetcdff

Keep a copy of the original or keep a changelog session for future use.
hi, MIDHILAVARNAV:
i have rectified Linux-gfortran.mk as your said, but the problem is still here.
could you provide me the vsrsion of roms you use and the changes you have made in your compiling in detail?

wangkai
Posts: 8
Joined: Sun Mar 31, 2019 2:01 pm
Location: Nanjing University of Information Science & Techno

Re: compiling upwelling

#5 Unread post by wangkai »

jcwarner wrote:you might get to a problem with netcdf, and perhaps the -lnetcdff flag is needed, but right now your problem is:

"cp -f /home/kzf/softwares/packman.active/include/netcdf.mod /home/kzf/myroms/projects/upwelling/Build_romsG
cp -f /home/kzf/softwares/packman.active/include/typesizes.mod /home/kzf/myroms/projects/upwelling/Build_romsG
:No such file or directory"

so:
1) does this directory exist: /home/kzf/softwares/packman.active/include/
2) does that directory contain netcdf.mod and typesizes.mod
3) does this directory exist: /home/kzf/myroms/projects/upwelling/Build_romsG

-john
hi John,
these three directionies all exist, the netcdf.mod and typesizes.mod have been copied to the directory of Build_romsG. but it still indicates that ":No such file or directory", and the compling interrupt

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

Re: compiling upwelling

#6 Unread post by jcwarner »

so when i build i get something like this:

[jwarner@poseidon-l1 breach338]$ ./coawst.bash

rm -f -r core *.ipo ./Build /vortexfs1/usgs/jwarner/make_macros.mk

makefile:248: INCLUDING FILE /vortexfs1/usgs/jwarner/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS

cp -f /vortexfs1/apps/netcdf-intel/include/netcdf.mod ./Build

cp -f /vortexfs1/apps/netcdf-intel/include/typesizes.mod ./Build

./ROMS/Bin/sfmakedepend --cpp --fext=f90 --file=- --objdir=./Build -DROMS_HEADER="sandy_inwave.h" -I ROMS/Include -I /vortexfs1/usgs/jwarner/Projects/breach_run_files/breach338/Sandy_InWave -I ROMS/Nonlinear -I ROMS/Nonlinear/Biology -I ROMS/Nonlinear/Sediment -I ROMS/Nonlinear/Wec -I ROMS/Nonlinear/Vegetation -I ROMS/Utility -I ROMS/Drivers -I ROMS/Functionals -I /vortexfs1/usgs/jwarner/Projects/breach_run_files/breach338/Sandy_InWave -I SWAN/Src -I Master -I Compilers --silent --moddir ./Build ROMS/Nonlinear/lmd_skpp.F ROMS/Nonlinear/uv3.....


can you post the whole entire build output?
thanks
john

wangkai
Posts: 8
Joined: Sun Mar 31, 2019 2:01 pm
Location: Nanjing University of Information Science & Techno

Re: compiling upwelling

#7 Unread post by wangkai »

jcwarner wrote:so when i build i get something like this:

[jwarner@poseidon-l1 breach338]$ ./coawst.bash

rm -f -r core *.ipo ./Build /vortexfs1/usgs/jwarner/make_macros.mk

makefile:248: INCLUDING FILE /vortexfs1/usgs/jwarner/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS

cp -f /vortexfs1/apps/netcdf-intel/include/netcdf.mod ./Build

cp -f /vortexfs1/apps/netcdf-intel/include/typesizes.mod ./Build

./ROMS/Bin/sfmakedepend --cpp --fext=f90 --file=- --objdir=./Build -DROMS_HEADER="sandy_inwave.h" -I ROMS/Include -I /vortexfs1/usgs/jwarner/Projects/breach_run_files/breach338/Sandy_InWave -I ROMS/Nonlinear -I ROMS/Nonlinear/Biology -I ROMS/Nonlinear/Sediment -I ROMS/Nonlinear/Wec -I ROMS/Nonlinear/Vegetation -I ROMS/Utility -I ROMS/Drivers -I ROMS/Functionals -I /vortexfs1/usgs/jwarner/Projects/breach_run_files/breach338/Sandy_InWave -I SWAN/Src -I Master -I Compilers --silent --moddir ./Build ROMS/Nonlinear/lmd_skpp.F ROMS/Nonlinear/uv3.....


can you post the whole entire build output?
thanks
john
hi,John:
i changed to a older version of ROMS of 514. and now the messages shows like

.
Attachments
微信图片_20190410205632.jpg
微信图片_20190410205610.jpg

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

Re: compiling upwelling

#8 Unread post by jcwarner »

well that looks worse.
can you attach the build.bash. want to make sure you set the compiler.

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

Re: compiling upwelling

#9 Unread post by kate »

It looks like the Perl script sfmakedepend is failing. First you need to check that ./ROMS/Bin/sfmakedepend exists, then look in it to see what the first line is. I expect that you have the sfmakedepend file, but my first line is:

Code: Select all

#!/usr/bin/env perl
so the problem could be either /usr/bin/env or perl.

Code: Select all

chinook01.rcs.alaska.edu 267% ls -l /usr/bin/env
0 lrwxrwxrwx. 1 root root 13 Jul 10  2018 /usr/bin/env -> ../../bin/env*

Code: Select all

chinook01.rcs.alaska.edu 268% which perl
/usr/local/pkg/lang/Perl/5.22.1-foss-2016b/bin/perl

wangkai
Posts: 8
Joined: Sun Mar 31, 2019 2:01 pm
Location: Nanjing University of Information Science & Techno

Re: compiling upwelling

#10 Unread post by wangkai »

thanks everyone, i have saved this problem.
i execute the command sed -i 's/\r$//' to all of the files under Roms
and now i have compiled the case upwelling successfully!
why does this happen? because i download the codes through a svn version of windows?

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

Re: compiling upwelling

#11 Unread post by kate »

Oh that old Windows problem. Exactly.

Post Reply