compiling ROMS

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
rbauer
Posts: 5
Joined: Mon Aug 02, 2010 2:02 pm
Location: Institute for Biosciences

compiling ROMS

#1 Unread post by rbauer »

hey there!
i tried to compile roms but i get the following error message:

makefile:237: INCLUDING FILE Build/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cd Build; -c -O3 mod_kinds.f90
/bin/sh: -c: not found
make: *** [Build/mod_kinds.o] Error 127

beforehand i had to change the path of netcdf within the Linux-g95.mk file.

i appreciate any help!
thanks a lot!

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

Re: compiling ROMS

#2 Unread post by kate »

It doesn't know what Fortran compiler to invoke. Are you telling it:

FORT ?= g95

then in the Linux-g95.mk file,

FC := g95

rbauer
Posts: 5
Joined: Mon Aug 02, 2010 2:02 pm
Location: Institute for Biosciences

Re: compiling ROMS

#3 Unread post by rbauer »

thank you for your response, kate. well, as far as i've understood, there's a list of mk-files which relate to different compilers. i am running linux ubuntu 10.04 64bit and the gfortran compiler is installed. therefore i changed the path of netcdf within the Linux-gfortran.mk file too.
however, i am still getting the same response.
these are the settings within the default section of the Linux-gfortran.mk file:
# First the defaults
#
FC := gfortran
FFLAGS := -frepack-arrays
CPP := /usr/bin/cpp
CPPFLAGS := -P -traditional
LDFLAGS :=
AR := ar
ARFLAGS := -r
MKDIR := mkdir -p
RM := rm -f
RANLIB := ranlib
PERL := perl
TEST := test

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

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

again, thank you for your help!

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

Re: compiling ROMS

#4 Unread post by kate »

Well, you can try something like "make -p | grep FC" to see what it thinks FC is. I get:

Code: Select all

make -f makefile.UP -p | grep FC
FC := /usr/local/pkg/pgi/pgi-9.0.4/linux86-64/9.0-4/bin/pgf90
which reminds me of this little piece of Linux-pgi.mk:

Code: Select all

#
# Use full path of compiler.
#
               FC := $(shell which ${FC})
               LD := $(FC)
Is gfortran in your path?

rbauer
Posts: 5
Joined: Mon Aug 02, 2010 2:02 pm
Location: Institute for Biosciences

Re: compiling ROMS

#5 Unread post by rbauer »

if i run"make -p | grep FC" i get this:

makefile:237: INCLUDING FILE Build/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
/bin/sh: -c: not found
make: *** [Build/mod_kinds.o] Error 127
PREPROCESS.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F
LINK.r = $(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)
COMPILE.f = $(FC) $(FFLAGS) $(TARGET_ARCH) -c
COMPILE.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
PREPROCESS.r = $(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F
cd $$(SCRATCH_DIR); $$(FC) -c $$(FFLAGS) $(notdir $2)
FC :=
F77 = $(FC)
COMPILE.r = $(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c
LINK.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LINK.f = $(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) $(notdir $<)
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) frc_weak.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_dim.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_impulse.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) oi_update.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) back_cost.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_impulse.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ini_hmixcoef.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) distribute.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_kinds.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) stats_modobs.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_nesting.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) zetabc.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) checkerror.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_ngfldr.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) sed_surface.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) bulk_flux.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_coupling.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fread3d_bry.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) shapiro.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_coupler.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) grid_coords.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) u3dbc_im.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) step3d_uv.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_stepping.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_hessian.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fwrite3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) cgradient.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) radiation_stress.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_ocean.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_mod.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_tides.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) main2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) interp_floats.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_2dfld.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_diags.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) frc_adjust.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) bc_bry2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) checkvars.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) sum_grad.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) pre_step3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_eclight.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mp_routines.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) conv_bry2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_parallel.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) metrics.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fread3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) gasdev.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) rep_matrix.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ludcmp.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_data.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wpoints.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) state_initialize.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_3dfld.f90
# CPPFLAGS += -DMY_OS='"$(OS)"' -DMY_CPU='"$(CPU)"' -DMY_FORT='"$(FORT)"' -DMY_FC='"$(FC)"' -DMY_FFLAGS='"$(FFLAGS)"'
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_zeta.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_sediment.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_diags.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) posterior.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) strings.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) bbl.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) stiffness.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) omega.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_mixing.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_fourdvar.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) hmixing.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ocean_coupler.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) prsgrd.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) congrad.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) output.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) packing.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_storage.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) regrid.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_strings.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) lmd_bkpp.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) tkebc_im.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) esmf_roms.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) gls_corstep.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_floats.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ran_state.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) close_io.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) extract_sta.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ran1.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) initial.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_3dfld.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_diags.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) sed_bedload.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_error.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) main3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wetdry.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) sed_bed.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) lmd_vmix.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) conv_2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_station.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_arrays.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_error.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mpdata_adiff.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) state_addition.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) random_ic.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_station.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) step_floats.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_biology.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_bbl.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_info.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_obs.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_hessian.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) rho_eos.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_tides.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_avg.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_3dfldr.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_ngfld.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_state.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_gst.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) obs_cost.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) t3dmix.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_ini.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_2dfld.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) sed_fluxes.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_param.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_gst.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_grid.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) obs_depth.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) lmd_skpp.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) sediment.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_ini.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_sedbed.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fwrite4d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) abort.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_clima.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_his.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_floats.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) interpolate.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_vbc.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) posterior_var.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) bc_bry3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_var.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_idata.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) exchange_2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) conv_bry3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) state_scale.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_his.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_floats.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_info.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) conv_3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) master.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_diags.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) white_noise.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) bc_2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) v2dbc_im.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) obc_volcons.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) obs_read.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) inp_par.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) roms_import.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fread4d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_boundary.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_forces.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) checkadj.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) biology.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) obc_adjust.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) my25_prestep.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_data.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) vwalk_floats.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_depth.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_bounds.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) sed_settling.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) state_dotprod.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_weights.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) step3d_t.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) cost_grad.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_tides.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_scalars.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) checkdefs.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) diag.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ocean_control.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) propagator.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) t3dbc_im.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) extract_obs.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_varcoords.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) step2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_lanczos.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) vorticity.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) lubksb.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) gls_prestep.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_gst.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_ngfldr.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_avg.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_tides.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_avg.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nrutil.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_sources.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wrt_rst.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mp_exchange.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ini_fields.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) rhs3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_average.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) analytical.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_massflux.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fwrite2d_bry.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_rst.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fread2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_cycle.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_2dfldr.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) uv3dmix.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) utility.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) array_modes.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) v3dbc_im.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) zeta_balance.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) exchange_3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) u2dbc_im.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) obs_write.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) state_product.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_scoord.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) def_norm.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) normalization.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) my25_corstep.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_3dfldr.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fread2d_bry.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) set_ngfld.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ini_lanczos.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_eoscoef.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_netcdf.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fwrite2d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_date.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_2dfldr.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_ncparam.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) forcing.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) state_copy.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) timers.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) obs_initial.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) wvelocity.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) ini_adjust.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) bc_3d.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) roms_export.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) get_grid.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) mod_iounits.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) dotproduct.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) bvf_mix.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) nf_fwrite3d_bry.f90
cd $(SCRATCH_DIR); $(FC) -c $(FFLAGS) lmd_swfrac.f90

it seems like i've do define the fortran compiler... . but where?

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

Re: compiling ROMS

#6 Unread post by kate »

Above, you show part of your Linux-gfortran.mk file. Below that in the same file, there should be:

Code: Select all

#
# Use full path of compiler.
#
               FC := $(shell which ${FC})
               LD := $(FC)
This sets FC to be not just gfortran but /some/long/path/to/gfortran assuming it is in your path. What do you get from:

Code: Select all

cygnus.arsc.edu 244% which gfortran
/usr/bin/gfortran
or

Code: Select all

be1005en% which gfortran
gfortran: Command not found.
If make isn't finding it, but you know it's there, you can always just tell it:

Code: Select all

               FC := /some/long/path/to/gfortran
               LD := $(FC)
Of course, put this after the one with "shell which".

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

Re: compiling ROMS

#7 Unread post by robertson »

Sometimes gfortran is not called gfortran, sometimes it's something like gfortran44 for gfortran version 4.4.x. You need to find out what gfortran is actually called on your machine and use that name when making the adjustment Kate mentioned.

rbauer
Posts: 5
Joined: Mon Aug 02, 2010 2:02 pm
Location: Institute for Biosciences

Re: compiling ROMS

#8 Unread post by rbauer »

i specified the gfortran compiler within the makefile and its location as you recommended within the Linux-gfortran.mk file. so i guess i managed the fortran compiler issue.

however, i am still getting the following error message:

robert@bauer:~/ROMS/trunk$ make
makefile:237: INCLUDING FILE Build/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
cd Build; /usr/bin/gfortran -c -frepack-arrays -O3 -ffast-math bc_2d.f90
bc_2d.f90:100.18:

USE mod_grid
1
Fatal Error: Can't open module file 'mod_grid.mod' for reading at (1): No such file or directory
make: *** [Build/bc_2d.o] Error 1

i've put my makefile and Linux-gfortran.mk file on a server:

http://dl.dropbox.com/u/1777473/ROMS/Linux-gfortran.mk
http://dl.dropbox.com/u/1777473/ROMS/makefile

thanks!

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

Re: compiling ROMS

#9 Unread post by kate »

Now you are facing a dependency issue which should be fixed by Build/MakeDepend, one of the first things that gets built by the makefile. If you type:

Code: Select all

make clean
then

Code: Select all

make
what is the first big chunk of output? What does MakeDepend look like?

cebalhos
Posts: 1
Joined: Wed May 30, 2012 5:52 pm
Location: INPE

Re: compiling ROMS

#10 Unread post by cebalhos »

Hello!
I'm finding the same thing.
Someone managed to fix this error?
Thanks

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

Re: compiling ROMS

#11 Unread post by kate »

Exactly which error are you seeing? Have you read this entire thread carefully?

Post Reply