Opened 13 years ago

Closed 13 years ago

#55 closed request (Done)

Suggestion for 30% faster compiles of forward model

Reported by: rsignell Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.1
Component: Nonlinear Version: 3.1
Keywords: Cc:


I've been experimenting with cygwin/gfortran, an environment where my build time for ROMS 3.0 is 9.5 minutes. Since I'm only interested at this point in building the forward (nonlinear) model, I found that by NOT compiling TANGENT, REPRESENTER and ADJOINT, my compile time drops to just over 6.5 minutes, a savings of nearly 30%.

I think a nice feature would be adding a Makefile option of only building the forward model (or making just the forward build the default and adding an option to build all the other stuff).

On my sytem, I modified the ROMS 3.0 makefile thusly:

  modules   :=	ROMS/Nonlinear \
		ROMS/Functionals \
		ROMS/SeaIce \
		ROMS/Utility \
  modules   :=	ROMS/Adjoint \
		ROMS/Representer \
		ROMS/Tangent \
		ROMS/Nonlinear \
		ROMS/Functionals \
		ROMS/SeaIce \
		ROMS/Utility \

and then set

 export         BUILD_FORWARD_ONLY=on

in my build.bash script.

(p.s. someone should run "dos2unix" on the build.bash script in the distribution so that I don't have to do that every time myself after updating)

Change History (1)

comment:1 Changed 13 years ago by arango

  • Resolution set to Done
  • Status changed from new to closed

Well, there is a better way to do this. I added a new file Compilers/make_macros.h that is c-preprocessed with cppdefs.h to generate This configuration file is then included in the makefile with internal macro definitions that it is used to select the files to compile and additional libraries to link. Notice that we not longer need the definition SWAN_COUPLE and similar in the makefile. The SWAN model is added if activated in the application header file that it is included in cppdefs.h.

Notice that this makes the coupling to other models more friendly. It also selects internally the coupling library (MCT and/or ESMF).

The script file build.bash is fine. Notice that it has the svn attribute

svn:eol-style set to native

This automatically select the end-of-line of your computer. Therefore, this is something that you do to your copy of your file. This can be easily done with SVN GUIs.

Note: See TracTickets for help on using tickets.