Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sun Aug 25, 2019 6:55 am




Post new topic Reply to topic  [ 4 posts ] 

All times are UTC

Author Message
PostPosted: Sun May 13, 2007 10:06 pm 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 515
Location: NIWA
Kate & Hernan have done an admirable job of designing the ROMS build process so that all files generated during the build are in a single directory. The name of this directory is specified by the makefile's SCRATCH_DIR variable. By default it is the Build subdirectory, but it can be overridden when make is called, eg, the following would cause ROMS to use a subdirectory specific to the OS and compiler
Code:
export SCRATCH_DIR=build-$(uname -s -m | tr " " "-")-${FORT}
make

I said "all" the files, but there's one exception: the executable, which is create in the master directory (by which I mean the one the makefile is in).

What about creating the executable in the build directory? One would still run it from the master directory, either by specifying its path explicitly
Code:
$SCRATCH_DIR/oceanS < ROMS/External/ocean.in

or with a symbolic link
Code:
ln -s $SCRATCH_DIR/oceanS .
./oceanS < ROMS/External/ocean.in

This would allow one to have different builds on the same system without any interference. Eg, one might have a debug build and an optimised build, or builds with different compilers.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun May 13, 2007 10:24 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1081
Location: IMCS, Rutgers University
The excutable goes to the value of the BINDIR macro in makefile:

Code:
#--------------------------------------------------------------------------
#  Set directory for executable.
#--------------------------------------------------------------------------

      BINDIR ?= .


So you can set this macro to the path that you want to sent the executable. See also the following script ROMS/Bin/build.sh. I have a build.sh script in each of my application directories.

Thank you for your kind remarks :wink:


Last edited by arango on Sun May 13, 2007 10:56 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun May 13, 2007 10:31 pm 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 515
Location: NIWA
Oh yes :oops:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun May 13, 2007 11:17 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1081
Location: IMCS, Rutgers University
Also noticed that I modified the makefile today. The macro MY_HEADER_DIR needs to have the full path of the directory containing the application header file. This allows the user to modify existing ROMS/ test cases outside of ROMS directory tree. Recall that one good way for user to start learning ROMS capabilities is to run any of the test cases and modify them :idea:. We just ask you that you do such modifications outside the ROMS/ directory tree. The new ROMS structure allows such modifications.

We highly recommend the user to not change any of the files in the ROMS/ directory tree to preserve the vadility of the distributed adjoint codes :!: The protocol is for the user to suggest changes to ROMS using the trac website :arrow: Then we will consider the suggestion(s) and update the codes accordingly. Of course, this is subject to our time priorities.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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