Install gfortran-4.5.0 & NetCDF-3.6.3 on Snow Leopard 10.6.2

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
jpliu168

Install gfortran-4.5.0 & NetCDF-3.6.3 on Snow Leopard 10.6.2

#1 Post by jpliu168 » Tue Feb 23, 2010 8:18 pm

Install gfortran-4.5.0 and NetCDF-3.6.3 on MAC Snow Leopard OSX10.6.2

1. Following the instructions on https://www.myroms.org/wiki/index.php/ROMS_Mac

2. My MacBook Pro and iMac have been pre-installed Xcode and GNU Make; thus I just downloaded the gfortran-4.2.3.dmg. The installation is successful.

3. But, when I try to compile the NetCDF using gfortran.

$ export FC=gfortran
$ export FFLAGS='-O3'
$ ./configure --prefix=/opt/gfortran/serial/netcdf3

IT FAILED WITH THE FOLLOWING MESSAGE:

checking if Fortran "byte" is C "signed char"... configure: error: Could not link conftestf.o and conftest.o

Both my MacBook Pro and IMac with OSx 10.6.2 show the same error message.

After googling the web, it looks like the problem might be caused by 32-bit vs. 64-bit operating system.

4. Thus, I downloaded the GFORTRAN-4.5.0 from the following website:

gfortran-snwleo-intel-bin.tar.gz, from http://hpc.sourceforge.net/

or: http://prdownloads.sourceforge.net/hpc/ ... z?download

5. Unzip the file, it creates a folder called "usr", go inside, and you have to copy the
folder "local" to your "/usr/", just replace the older "local".

6. Then flowing the instructions on https://www.myroms.org/wiki/index.php/ROMS_Mac
$ export FC=gfortran
$ export FFLAGS='-O3'
$ ./configure --prefix=/opt/gfortransoft/serial/netcdf3

…..
7. After all installations, both the Upwelling and Latte cases have been built and simulated successfully.

8. The the case of "ESTUARY_TEST" works very well under version 342, but under 429 or current 448 it was failed to build up, with the following error message (same message under XP-cygwin+g95 and MacOSX gfortran):

cd /Users/jpliu/roms/projects/estuary/Build; /usr/local/bin/gfortran -c -frepack-arrays -O3 -ffast-math -ffree-form -ffree-line-length-none analytical.f90
analytical.f90:1656.38:

BOUNDARY(ng)%t_east(j,k,idsed(ised))=0.0_r8
1
Error: Function 'idsed' at (1) has no IMPLICIT type
analytical.f90:1667.38:

BOUNDARY(ng)%t_west(j,k,idsed(ised))=0.0_r8
1
Error: Function 'idsed' at (1) has no IMPLICIT type



ANY IDEA?

Post Reply