ROMS on mac: mpif90 error

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
rmueller
Posts: 26
Joined: Thu May 04, 2006 4:15 am
Location: Earth & Space Research

ROMS on mac: mpif90 error

#1 Unread post by rmueller »

I am getting the following error when I try to run the UPWELLING test case on a current download of ROMS that I am configuring on my mac:

Code: Select all

ROMS/Bin/cpp_clean /Users/rmueller/ROMS-3/Projects/upwelling/Build/mod_kinds.f90
cd /Users/rmueller/ROMS-3/Projects/upwelling/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math mod_kinds.f90
--------------------------------------------------------------------------
Unfortunately, this installation of Open MPI was not compiled with
Fortran 90 support.  As such, the mpif90 compiler is non-functional.

--------------------------------------------------------------------------
make: *** [/Users/rmueller/ROMS-3/Projects/upwelling/Build/mod_kinds.o] Error 1
The strange bit is that I have turned off the use of MPI. My makefile looks like:

Code: Select all

#  If parallel applications, use at most one of these definitions
#  (leave both definitions blank in serial applications):

     USE_MPI ?=
  USE_OpenMP ?=

#  If distributed-memory, turn on compilation via the script "mpif90".
#  This is needed in some Linux operating systems. In some systems with
#  native MPI libraries the compilation does not require MPICH type
#  scripts. This macro is also convient when there are several fortran
#  compiliers (ifort, pgf90, pathf90) in the system that use mpif90.
#  In this, case the user need to select the desired compiler below and
#  turn on both USE_MPI and USE_MPIF90 macros.

  USE_MPIF90 ?=

Build.bash looks like:

Code: Select all

 export           USE_MPI=off
 export        USE_MPIF90=off
 export              FORT=gfortran

#export        USE_OpenMP=off

#export         USE_DEBUG=on
 export         USE_LARGE=off
#export       USE_NETCDF4=off
As you may have already noticed, I am using gfortran.

Can anyone give me a tip as to what I may be missing or overlooking. This SVN version of ROMS is new to me.

Thanks!

robertson
Site Admin
Posts: 219
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: ROMS on mac: mpif90 error

#2 Unread post by robertson »

As noted in the build.bash file just above the the lines you have pasted:
Any string value (including off) will evaluate to TRUE in conditional if-stamentents.
You must either comment out the USE_MPI and USE_MPIF90 lines or remove the word "off" on those lines.

rmueller
Posts: 26
Joined: Thu May 04, 2006 4:15 am
Location: Earth & Space Research

Re: ROMS on mac: mpif90 error

#3 Unread post by rmueller »

I repeated what I did on Monday and the code seems to be running fine! In all likelihood this means that I wasn't strictly repeating myself :wink:; unfortunately, since I don't know what I am doing differently, I don't have any wisdom to impart. Hopefully, no one else will be able to replicate what I can't. In the off chance that someone does, here are the steps that I took this morning before my successful run. (If this gives some meaningful insight to someone out there, please let me know!)

The steps that I took today before the model started to run was to double check my makefile and Darwin-gfortran.mk files to see that they were configured properly (which they were) and then to explicitly turn off the MPI statements:

Code: Select all

USE_MPI ?= off
USE_MPIF90 ?= off
This didn't work for me. Switching to "off" seemed to activate rather than turn off these two switches, and I got an error about using them in tandem. I returned to leaving them blank:

Code: Select all

USE_MPI ?= 
USE_MPIF90 ?=
Then I switched debug on:

Code: Select all

USE_DEBUG ?= on
This time, when I ran make, I received a series of warnings that seemed to go on forever and that looked like:

Code: Select all

/usr/local/bin/gfortran -frepack-arrays -g -fbounds-check  Build/esmf_roms.o Build/master.o Build/ocean_control.o Build/ocean_coupler.o Build/propagator.o Build/roms_export.o Build/roms_import.o -o oceanG  Build/libNLM.a Build/libANA.a Build/libUTIL.a Build/libMODS.a -L/opt/netcdf3/gfortran/lib -lnetcdf
ld warning: can't find atom for N_GSYM stabs dcrit:G(0,3)=ar(0,2);0;0;(0,4)=r(0,2);8;0; in Build/libMODS.a(mod_scalars.o)
ld warning: can't find atom for N_GSYM stabs akt_bak:G(0,5)=xsarray2_real8: in Build/libMODS.a(mod_scalars.o)
In spite of these warnings, the code ran without errors.

I then proceeded to test the non-debug version that was failing me on Monday by taking out the debug statement ("USE_DEBUG ?= ") and re-compiling. This time, I got the following "errors" that I don't recall having had on Monday.

Code: Select all

ROMS/Bin/cpp_clean Build/mod_nesting.f90
cd Build; /usr/local/bin/gfortran -c -frepack-arrays -O3 -ffast-math mod_nesting.f90
ar -r Build/libMODS.a Build/mod_arrays.o Build/mod_average.o Build/mod_bbl.o Build/mod_biology.o Build/mod_boundary.o Build/mod_clima.o Build/mod_coupler.o Build/mod_coupling.o Build/mod_diags.o Build/mod_eclight.o Build/mod_eoscoef.o Build/mod_floats.o Build/mod_forces.o Build/mod_fourdvar.o Build/mod_grid.o Build/mod_iounits.o Build/mod_kinds.o Build/mod_mixing.o Build/mod_ncparam.o Build/mod_nesting.o Build/mod_netcdf.o Build/mod_obs.o Build/mod_ocean.o Build/mod_parallel.o Build/mod_param.o Build/mod_scalars.o Build/mod_sediment.o Build/mod_sources.o Build/mod_stepping.o Build/mod_storage.o Build/mod_strings.o Build/mod_tides.o
ar: creating archive Build/libMODS.a
ranlib: file: Build/libMODS.a(mod_bbl.o) has no symbols
ranlib: file: Build/libMODS.a(mod_biology.o) has no symbols
ranlib: file: Build/libMODS.a(mod_boundary.o) has no symbols
ranlib: file: Build/libMODS.a(mod_clima.o) has no symbols
...
Once again--and in spite of these complaints--the code ran.

Is there a moral to this story? I don't know. Perhaps it's just an alignment of "M's" Mondays + modelling = madness.

Once again, I'm open to comments or suggestions.

Thanks!

rmueller
Posts: 26
Joined: Thu May 04, 2006 4:15 am
Location: Earth & Space Research

Re: ROMS on mac: mpif90 error

#4 Unread post by rmueller »

Thanks for the tip (a.k.a. read the comments, dummy!). I can't imagine anything more frustrating from a developer standpoint than providing the information and having it ignored. My apologies. You can commiserate with my husband about how terrible I am about reading directions. At the very least, I hope my post will inspire others to do what I failed to do. Back to "reading those directions"!
-Rachael

Post Reply