require netcdf for 64-bit platform!

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
FengZhou
Posts: 52
Joined: Wed Apr 07, 2004 10:48 pm
Location: 2nd Institute of Oceanography,SOA

require netcdf for 64-bit platform!

#1 Unread post by FengZhou »

Hi,

Has anyone tried to run roms on 64-bit platform. Usually it works under 32-bit platform with intel ifort compiler. Now I am trying to move them on the 64-bit platform, which is a supercomputer: NEC with redhat linux system. I can't make them compile because I haven't got a netcdf library of 64-bit platform. Compiling errors like following:

ld: fort-attio.o: linking 64-bit files with 32-bit files
Bad value: failed to merge target specific data of file ./netcdf_ifc/libnetcdf.a(fort-attio.o)
ld: fort-control.o: linking 64-bit files with 32-bit files
Bad value: failed to merge target specific data of file ./netcdf_ifc/libnetcdf.a(fort-control.o)

I'm not a root. so has anyone has compiled that library? wanna share?

btw, what confused me is netcdf.inc works well :(

many thanks

ZHOU

scully_ROMS
Posts: 3
Joined: Tue Jan 03, 2006 3:51 pm
Location: Woods Hole Oceanographic Inst.

#2 Unread post by scully_ROMS »

I was able to install the 64-bit netcdf libraries for the mac os x using absoft fortran 9.2. With this installed, I successfully compiled and ran the upwelling test case.

To install the netcdf libraries, I used the script provided by John Tanski at:

http://www.unidata.ucar.edu/software/ne ... tml#absoft

When compiling ROMS, I had to remove -YEXT_NAMES=LCS -YEXT_SFX=_ -YCFRL=1 from FFLAGS. I used FFLAGS := -N11 -m64 -w and it seemed to work. Hope that helps.

- Malcolm

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#3 Unread post by kate »

netcdf.inc is a text file, completely portable. The library is binary and needs to be recompiled for each architecture. You can compile it and put it in your own directories and you don't need to be root to do it.

User avatar
susonic
Posts: 170
Joined: Tue Aug 21, 2007 5:44 pm
Location: UST21 / Korea
Contact:

Re: require netcdf for 64-bit platform!

#4 Unread post by susonic »

Dera user,

I'm trying to install ROMS in NEC-SX system.
Is there a person who uses this system?
If so, would you show me a complie sctipt(sxf90 compiler)?

Please help me out.
Thanks in advance,

-Peter,

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: require netcdf for 64-bit platform!

#5 Unread post by kate »

I used to have access to such a system, but I can't now find any of the Makefiles I had for it then (before the Compilers directory update). I do recall that it gave more warnings than any other compiler I've ever seen and some were useful. I also recall that it took so long to compile that we got a cross-compiler running on some other system. For your needs, find out the compile command, look at the existing files in the Compilers directory, and give it a try. Let us know if you run into specific issues.

crode1968
Posts: 13
Joined: Thu Oct 28, 2004 6:58 pm
Location: Danish Meteorological Institute

Re: require netcdf for 64-bit platform!

#6 Unread post by crode1968 »

This is my Linux-necsx.mk File for a NEC SX-6 at the DKRZ, Germany.

We use a cross compiler environment on a Linux-driven front end causing the file name to be Linux-necsx.mk. This file is based on the Linux-ifort.mk file. If you have a similar setup, copy the file into the directory Compilers and adjust the FORT variable in your Makefile.

I have not started to explore further optimization switches, because the model was sufficiently fast. Its parallelizations percentage was about 97% and vector length of some 124. Since I have not used the SWAN component, the corresponding FFLAGS at the end might need some adjustments if you want to use SWAN.

Please check the library's paths before using it. Hope it helps.

Code: Select all

# svn $Id: Linux-necsx.mk 76 2007-06-11 22:52:45Z arango $
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Copyright (c) 2002-2007 The ROMS/TOMS Group                           :::
#   Licensed under a MIT/X style license                                :::
#   See License_ROMS.txt                                                :::
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# Include file for NEC cross compiler on Linux
# -------------------------------------------------------------------------
#
# ARPACK_LIBDIR  ARPACK libary directory
# FC             Name of the fortran compiler to use
# FFLAGS         Flags to the fortran compiler
# CPP            Name of the C-preprocessor
# CPPFLAGS       Flags to the C-preprocessor
# CLEAN          Name of cleaning executable after C-preprocessing
# NETCDF_INCDIR  NetCDF include directory
# NETCDF_LIBDIR  NetCDF libary directory
# LD             Program to load the objects into an executable
# LDFLAGS        Flags to the loader
# RANLIB         Name of ranlib command
# MDEPFLAGS      Flags for sfmakedepend  (-s if you keep .f files)
#
# First the defaults
#
               FC := sxmpif90
           FFLAGS :=
              CPP := /usr/bin/cpp
         CPPFLAGS :=
               LD := $(FC)
          LDFLAGS :=
               AR := sxar
          ARFLAGS := rv
            MKDIR := mkdir -p
               RM := rm -f
           RANLIB := sxar -tv
             PERL := perl
             TEST := test

        MDEPFLAGS := --cpp --fext=f90 --file=- --objdir=$(SCRATCH_DIR)

#
# Library locations, can be overridden by environment variables.
#

       MCT_INCDIR ?= /usr/local/mct/include
       MCT_LIBDIR ?= /usr/local/mct/lib
    NETCDF_INCDIR ?= /pool/SX-6/netcdf/netcdf-3.6.0-p1/include
    NETCDF_LIBDIR ?= /pool/SX-6/netcdf/netcdf-3.6.0-p1/lib

         CPPFLAGS += -I$(NETCDF_INCDIR)
             LIBS := -L$(NETCDF_LIBDIR) -lnetcdf

ifdef USE_ARPACK
 ifdef USE_MPI
   PARPACK_LIBDIR ?= /opt/intelsoft/PARPACK
             LIBS += -L$(PARPACK_LIBDIR) -lparpack
 endif
    ARPACK_LIBDIR ?= /opt/intelsoft/PARPACK
             LIBS += -L$(ARPACK_LIBDIR) -larpack
endif

ifdef USE_MPI
         CPPFLAGS += -DMPI
 ifdef USE_MPIF90
               FC := /opt/intelsoft/mpich/bin/mpif90
#              FC := /opt/intelsoft/mpich2/bin/mpif90
               LD := $(FC)
 else
             LIBS += -lfmpi     -lmpi
 endif
endif

ifdef USE_OpenMP
         CPPFLAGS += -D_OPENMP
           FFLAGS += -openmp -fpp
endif

ifdef USE_DEBUG
# -e C  : runtime array bounds checking
# -e D  : compilation of debug statements
           FFLAGS += -g -Cdebug -C e
else
# -C debug  : no Optimization, enable debugging
# -C ssafe  : safe scalar optimization
# -C vsafe  : safe vector optimization
# -C sopt   : standard scalar optimization
# -C vopt   : standard vector optimization
# -C hopt   : Aggressive scalar and vector optimization
#           FFLAGS += -Cvopt  -Csopt -sx6
#           FFLAGS += -Cvopt -Cssafe -sx6
           FFLAGS += -Chopt -sx6
endif

ifdef SWAN_COUPLE
           FFLAGS += -I$(MCT_INCDIR)
             LIBS += -L$(MCT_LIBDIR) -lmct -lmpeu
endif

       clean_list += ifc* work.pc*

#
# Set free form format in source files to allow long string for
# local directory and compilation flags inside the code.
#

$(SCRATCH_DIR)/mod_ncparam.o: FFLAGS += -f4
$(SCRATCH_DIR)/mod_strings.o: FFLAGS += -f4

#
# Supress free format in SWAN source files since there are comments
# beyond column 72.
#

ifdef SWAN_COUPLE

$(SCRATCH_DIR)/ocpcre.o: FFLAGS += -nofree
$(SCRATCH_DIR)/ocpids.o: FFLAGS += -nofree
$(SCRATCH_DIR)/ocpmix.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom3.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom4.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swancom5.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanmain.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanout1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanout2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanparll.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanpre1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanpre2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swanser.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swmod1.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swmod2.o: FFLAGS += -nofree
$(SCRATCH_DIR)/swmod3.o: FFLAGS += -nofree

endif


User avatar
susonic
Posts: 170
Joined: Tue Aug 21, 2007 5:44 pm
Location: UST21 / Korea
Contact:

Re: require netcdf for 64-bit platform!

#7 Unread post by susonic »

Thank you for your reply, crode and kate.
I'm going to try it again based on your information and will report the result here.

Best,

-Peter

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: require netcdf for 64-bit platform!

#8 Unread post by arango »

I :arrow: added the above make configuration file Linux-necsx.mk to the Compilers directory. Thank you Christian for contributing this file.

Post Reply