./build.bash error:Can't open tmp file at ROMS/Bin/cpp_clean

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
ssuanda
Posts: 4
Joined: Fri Apr 01, 2016 1:36 am
Location: Scripps Institution of Oceanography

./build.bash error:Can't open tmp file at ROMS/Bin/cpp_clean

#1 Unread post by ssuanda »

Hello,

I am trying to compile the upwelling test case with Cygwin and am coming across an error I have not seen before.

ROMS from a checkout from 2 months ago:
$ svn info
Path: .
Working Copy Root Path: /home/survstu1/ROMS/trunk
URL: https://www.myroms.org/svn/src/trunk
Relative URL: ^/trunk
Repository Root: https://www.myroms.org/svn/src
Repository UUID: f091316a-d328-0410-a40a-876eff57d070
Revision: 912
Node Kind: directory
Schedule: normal
Last Changed Author: arango
Last Changed Rev: 912
Last Changed Date: 2018-06-29 13:34:01 +1200 (Fri, 29 Jun 2018)
Works fine. I get the expected oceanS file after compilation:
$ ./build.bash
rm -f -r core *.ipo /home/survstu1/ROMS/Projects/Upwelling/Build /home/survstu1/make_macros.mk
cp -f /usr/include/netcdf.mod /home/survstu1/ROMS/Projects/Upwelling/Build
cp -f /usr/include/typesizes.mod /home/survstu1/ROMS/Projects/Upwelling/Build
cp -p /home/survstu1/make_macros.mk /home/survstu1/ROMS/Projects/Upwelling/Build
/usr/bin/cpp -P -traditional -DCYGWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/survstu1/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/survstu1/ROMS/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/survstu1/ROMS/Projects/Up welling"

ETC ...
A new checkout:
$ svn info
Path: .
Working Copy Root Path: /home/survstu1/ROMS/trunk
URL: https://www.myroms.org/svn/src/trunk
Relative URL: ^/trunk
Repository Root: https://www.myroms.org/svn/src
Repository UUID: f091316a-d328-0410-a40a-876eff57d070
Revision: 920
Node Kind: directory
Schedule: normal
Last Changed Author: arango
Last Changed Rev: 920
Last Changed Date: 2018-08-25 04:20:22 +1200 (Sat, 25 Aug 2018)
the build attempt gives the following:
$ ./build.bash
rm -f -r core *.ipo /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms /home/survstu1/make_macros.mk
Can't open tmp file at ROMS/Bin/cpp_clean line 29.
cp -f /usr/include/netcdf.mod /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms
cp -f /usr/include/typesizes.mod /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms
cp -p /home/survstu1/make_macros.mk /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms
Can't open tmp file at ROMS/Bin/cpp_clean line 29.
/usr/bin/cpp -P -traditional -DCYGWIN -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/survstu1/ROMS/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/survstu1/ROMS/trunk/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/survstu1/ROMS/trunk/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="920"' -IROMS/Include -I/home/survstu1/ROMS/trunk/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/survstu1/ROMS/trunk/Projects/Upwelling -IMaster -ICompilers -D'HEADER_DIR="/home/survstu1/ROMS/trunk/Projects/Upwelling"' ROMS/Utility/def_diags.F > /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms/def_diags.f90
ROMS/Bin/cpp_clean /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms/def_diags.f90
Can't open tmp file at ROMS/Bin/cpp_clean line 29.
make: *** [ROMS/Utility/Module.mk:16: /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms/def_diags.f90] Error 2
I notice the build directory is now called Build_roms, and I could not decipher the cpp_clean file.
Perhaps I am missing something with the new code? Any help is much appreciated.

Regards,

Ata Suanda

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: ./build.bash error:Can't open tmp file at ROMS/Bin/cpp_c

#2 Unread post by robertson »

Check the permissions on your /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms directory. Your error would indicate that you don't have the proper permissions to write to that directory. However, it is strange that /usr/bin/cpp appears to be able to create the /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms/def_diags.f90 file but ROMS/Bin/cpp_clean can't create a temporary file in the same directory. Can you confirm that the /home/survstu1/ROMS/trunk/Projects/Upwelling/Build_roms/def_diags.f90 file is created?

ssuanda
Posts: 4
Joined: Fri Apr 01, 2016 1:36 am
Location: Scripps Institution of Oceanography

Re: ./build.bash error:Can't open tmp file at ROMS/Bin/cpp_c

#3 Unread post by ssuanda »

Hello,

def_diags.f90 is created, but it is basically empty:
$ ls -l Build_roms/
total 622
-rw-r--r-- 1 survstu1 Domain Users 19516 Sep 4 11:50 def_diags.f90
-rw-r--r-- 1 survstu1 Domain Users 215 Sep 4 11:50 make_macros.mk
-rw-r--r-- 1 survstu1 Domain Users 587217 Sep 4 11:50 MakeDepend
-rw-r--r-- 1 survstu1 Domain Users 22046 Sep 4 11:50 netcdf.mod
-rw-r--r-- 1 survstu1 Domain Users 547 Sep 4 11:50 typesizes.mod
It also appears that I can create other files to this directory without a problem.

Ata

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ./build.bash error:Can't open tmp file at ROMS/Bin/cpp_c

#4 Unread post by wilkin »

Could you have run out of disk space? That might prevent cpp_clean from writing. I doubt the problem is in cpp_clean itself.

Your directory listing of Build_roms shows only 5 files. Is that all there is?
There should be many more files processed before make gets to def_diags.f90.

What release number does svn info show you are at?
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

ssuanda
Posts: 4
Joined: Fri Apr 01, 2016 1:36 am
Location: Scripps Institution of Oceanography

Re: ./build.bash error:Can't open tmp file at ROMS/Bin/cpp_c

#5 Unread post by ssuanda »

Hi John,

Here's svn info:
$ svn info
Path: .
Working Copy Root Path: /home/survstu1/ROMS/trunk
URL: https://www.myroms.org/svn/src/trunk
Relative URL: ^/trunk
Repository Root: https://www.myroms.org/svn/src
Repository UUID: f091316a-d328-0410-a40a-876eff57d070
Revision: 920
Node Kind: directory
Schedule: normal
Last Changed Author: arango
Last Changed Rev: 920
Last Changed Date: 2018-08-25 04:20:22 +1200 (Sat, 25 Aug 2018)
I don't think it is a disk space issue. A build with previous version works ok.

Ata

ssuanda
Posts: 4
Joined: Fri Apr 01, 2016 1:36 am
Location: Scripps Institution of Oceanography

Re: ./build.bash error:Can't open tmp file at ROMS/Bin/cpp_c

#6 Unread post by ssuanda »

This has been resolved.
My Cygwin didn't have a proper Perl. Once Perl(version 5.26.2-1) was correctly added, all went well.

Thanks,

Ata

Post Reply