New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
WorkingGroups/TAM/InstallationsMacInstosh/InstallMacIntelFortran – NEMO
wiki:WorkingGroups/TAM/InstallationsMacInstosh/InstallMacIntelFortran

Version 10 (modified by chauvin, 15 years ago) (diff)

--

Installation with Intel Fortran

Generic information for compiling with FCM

Edit 
$basepath/nemo/fcmconfig/bld/$compil_target/nemo.cfg
and 
$basepath/nemovar/fcmconfig/bld/$compil_target/nemo.cfg
according to your compiler and the path to netcdf,
then 
$ cd $chemin/nemovar/build
$ ./fcmvmake.ksh -t $basepath -c $compil_target 
Generating static libraries with ifort

The actual version of ifort (11.1) contains a bug when compiled on Mac OS: The linker (ranlib) does not find the objects associated to parameters defined in some modules of NEMO. These particular modules contains only parameters, and no CONTAINS section (ie no subroutines). The temporary solution is to add the option -c to ranlib.

Yet no flags ranlib are available in fcm 1.3 . The idea is then to put in your nemo.cfg

bld::tool::ar ar_mac
bld::tool::arflags 

and create a script ar_mac

#!/bin/sh
ar rs $@ || exit 1
ranlib -c $1 || exit 1

Generating NETCDF modules and library

The following script is executed in the directory netcdf-3.6.1/src The compilers come from the intel web site, and installed on a Mac OS X 10.5.8 (Leopard). Flags avoid conflicts between C and Fortran during the library compilation.

#!/bin/sh

export FC=ifort
export F90=ifort
export F77=ifort

export CFLAGS='-O3'
export CC=icc
export CXX=icpc
export CPPFLAGS=' -DNDEBUG -DpgiFortran'

./configure --prefix=/usr/local/netcdf-3.6.1/intel

If problems persists: useful tips on the unidata server, known problems

Miscellaneous useful informations