Opened 15 years ago

Closed 15 years ago

#332 closed upgrade (Done)

Update to makefile, build and compilation scripts

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

Description

The makefile was updated so the COMPILERS definition may be specified in either the build.sh or build.bach scripts. This allows the user to specify a customized version (different path) of the configuration files (*.mk) that are distributed in Compilers subdirectory. The makefile has now the following statement to facilitate such operation:

  COMPILERS ?= $(CURDIR)/Compilers

MAKE_MACROS := $(COMPILERS)/make_macros.mk

so we can set the COMPILERS definition with an environmental variable in build.sh:

 setenv COMPILERS            ${MY_ROMS_SRC}/Compilers

or you may use a copy of Linux-ifort.mk, for example, in your project directory:

 setenv COMPILERS            ${MY_PROJECT_DIR}

If you are using this strategy, make sure that you keep the make configuration scripts up-to-date.

I also modified Compilers/Linux-ifort.mk and Compilers/Darwin-ifort.mk files to use precise (IEEE) floating-point operations: -fp-model precise

           FFLAGS := -heap-arrays -fp-model precise

I was completely surprised with the -ip option in ifort which triggers a less precise operation to speed the computation during optimization. I even get different results when I ran the same executable again and again. This must be a bug in ifort 11. Also, I was not longer to check for parallel bugs by comparing output NetCDF files in serial and parallel. I have a lot of roundoff in all fields everywhere. This is very annoying...

Change History (1)

comment:1 by arango, 15 years ago

Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.