compiling the coupled case: /bin/sh: -c: command not found

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
zangzhipeng
Posts: 12
Joined: Wed Dec 10, 2008 10:15 pm
Location: The University of Western Australia

compiling the coupled case: /bin/sh: -c: command not found

#1 Unread post by zangzhipeng »

Hello, everyone,
When I building the executable oceanM for the coupled ROMS-SWAN Inlet_test case , I come across a problem as below:

ROMS/Bin/cpp_clean /home/zang/roms/Projects/Inlet/Build/mod_param.f90
/usr/bin/cpp -P -traditional -DMPI -DLINUX -DI686 -DGFORTRAN -D'ROOT_DIR="/home/zang/roms/trunk"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/zang/roms/Projects/Inlet/inlet_test.h"' -DNestedGrids=1 -D'ANALYTICAL_DIR="/home/zang/roms/Projects/Inlet"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="323M"' -IROMS/Include -I/home/zang/roms/Projects/Inlet -IROMS/Nonlinear -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/zang/roms/Projects/Inlet -IWaves/SWAN/Src -IMaster -ICompilers -D'HEADER_DIR="/home/zang/roms/Projects/Inlet"' ROMS/Modules/mod_kinds.F > /home/zang/roms/Projects/Inlet/Build/mod_kinds.f90
ROMS/Bin/cpp_clean /home/zang/roms/Projects/Inlet/Build/mod_kinds.f90
cd /home/zang/roms/Projects/Inlet/Build; -c -frepack-arrays -g -fbounds-check -I/usr/local/include mod_kinds.f90
/bin/sh: -c: command not found
make: *** [/home/zang/roms/Projects/Inlet/Build/mod_kinds.o] Error 127

I am not sure what happened. Could anyone kindly give me some advice?

Thanks very much!

Zhipeng

jcwarner
Posts: 1188
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: compiling the coupled case: /bin/sh: -c: command not found

#2 Unread post by jcwarner »

The line:

cd /home/zang/roms/Projects/Inlet/Build; -c -frepack-arrays -g -fbounds-check

should be something like

cd /home/zang/roms/Projects/Inlet/Build; gfortran -c -frepack-arrays -g -fbounds-check

Notice the 'gfortran' is missing in your line. Look in the build.bash or makefile or whatever you use, and make sure you set
FC := gfortran
(or whatever it needs ot be).

zangzhipeng
Posts: 12
Joined: Wed Dec 10, 2008 10:15 pm
Location: The University of Western Australia

Re: compiling the coupled case: /bin/sh: -c: command not found

#3 Unread post by zangzhipeng »

hi, thanks , :D
I have set the FC=gfortran in the linux-gfortran.mk file, then the compiling went on, but it stoped again when set the OBCs in the analytical.f90:

ROMS/Bin/cpp_clean /home/zang/roms/Projects/Inlet/Build/mod_netcdf.f90
cd /home/zang/roms/Projects/Inlet/Build; /usr/bin/gfortran -c -frepack-arrays -g -fbounds-check -I/usr/local/include -ffree-form -ffree-line-length-none mod_netcdf.f90
cd /home/zang/roms/Projects/Inlet/Build; /usr/bin/gfortran -c -frepack-arrays -g -fbounds-check -I/usr/local/include -ffree-form -ffree-line-length-none mod_sources.f90
cd /home/zang/roms/Projects/Inlet/Build; /usr/bin/gfortran -c -frepack-arrays -g -fbounds-check -I/usr/local/include -ffree-form -ffree-line-length-none analytical.f90
analytical.f90:573.32:

BOUNDARY(ng)%ubar_east(j)=0.0_r8
1
de

BOUNDARY(ng)%vbar_east(j)=0.0_r8
1
Error: 'vbar_east' at (1) is not a member of the 't_boundary' structure
analytical.f90:581.32:

BOUNDARY(ng)%ubar_west(j)=0.0_r8
1
Error: 'ubar_west' at (1) is not a member of the 't_boundary' structure
analytical.f90:584.32:

BOUNDARY(ng)%vbar_west(j)=0.0_r8
1
Error: 'vbar_west' at (1) is not a member of the 't_boundary' structure
analytical.f90:589.33:

BOUNDARY(ng)%ubar_south(i)=0.0_r8
1
Error: 'ubar_south' at (1) is not a member of the 't_boundary' structure
analytical.f90:592.33:

BOUNDARY(ng)%vbar_south(i)=0.0_r8
1
Error: 'vbar_south' at (1) is not a member of the 't_boundary' structure
analytical.f90:597.33:

BOUNDARY(ng)%ubar_north(i)=0.0_r8
1
Error: 'ubar_north' at (1) is not a member of the 't_boundary' structure
analytical.f90:600.33:

BOUNDARY(ng)%vbar_north(i)=0.0_r8
1
Error: 'vbar_north' at (1) is not a member of the 't_boundary' structure
make: *** [/home/zang/roms/Projects/Inlet/Build/analytical.o] Error 1

How should I do? Thanks

jcwarner
Posts: 1188
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: compiling the coupled case: /bin/sh: -c: command not found

#4 Unread post by jcwarner »

well, i just did an svn update on the trunk and the INLET_TEST compiles fine for me. So i assume you are trying to use your own application here.
You may need to define
#define ANA_FSOBC
#define ANA_M2OBC
depending on your application and other flags that are set.

rgon
Posts: 12
Joined: Thu Jan 29, 2009 4:00 pm
Location: University of Plymouth

Re: compiling the coupled case: /bin/sh: -c: command not found

#5 Unread post by rgon »

Hello,
I am trying to run the inlet_test case, I've updated the roms model with the svn: $Id: Version 464 2010-05-27 17:54:56Z arango $
I am compiling in a cluster. my problem is when compiling and this appears:

Code: Select all

cd /home/primare/pl/raulg/roms/Projects/inlet/Build; /cvos/shared/apps/mpich/ge/intel/64/1.2.7/bin/mpif90 -c -heap-arrays -fp-model precise -ip -O3 -xW -I/home/primare/pl/raulg/roms/trunk/Lib/MCT/include mod_sedbed.f90
mod_sedbed.f90(168): error #6460: This is not a field name that is defined in the encompassing structure.   [AVGBEDLDU]
                SEDBED(ng) % avgbedldu(i,j,itrc) = IniVal
-----------------------------^
mod_sedbed.f90(168): error #6158: The structure-name is invalid or is missing.   [SEDBED]
                SEDBED(ng) % avgbedldu(i,j,itrc) = IniVal
----------------^
mod_sedbed.f90(177): error #6460: This is not a field name that is defined in the encompassing structure.   [AVGBEDLDV]
                SEDBED(ng) % avgbedldv(i,j,itrc) = IniVal
-----------------------------^
mod_sedbed.f90(177): error #6158: The structure-name is invalid or is missing.   [SEDBED]
                SEDBED(ng) % avgbedldv(i,j,itrc) = IniVal
----------------^
compilation aborted for mod_sedbed.f90 (code 1)
make: *** [/home/primare/pl/raulg/roms/Projects/inlet/Build/mod_sedbed.o] Error 1
make: *** Waiting for unfinished jobs....
the inlet_test.h is this one:

Code: Select all

/*
** svn $Id: inlet_test.h 170 2008-04-01 18:31:49Z arango $
*******************************************************************************
** Copyright (c) 2002-2008 The ROMS/TOMS Group                               **
**   Licensed under a MIT/X style license                                    **
**   See License_ROMS.txt                                                    **
*******************************************************************************
**
** Options for Inlet Test Case, waves-ocean (SWAN/ROMS) two-way coupling.
**
** Application flag:   INLET_TEST
** Input script:       ocean_inlet_test.in
**                     coupling_inlet_test.in
**                     sediment_inlet_test.in
*/

#define UV_VIS2
#define MIX_S_UV
#undef  ANA_GRID
#define MASKING
#define UV_ADV
#undef  UV_COR
#define TS_MPDATA
#define DJ_GRADPS
#define SOUTHERN_WALL
#define FSOBC_REDUCED
#define NORTH_FSGRADIENT
#define NORTH_M2REDUCED
#define NORTH_M3GRADIENT
#define WEST_FSGRADIENT
#define WEST_M2GRADIENT
#define WEST_M3GRADIENT
#define EAST_FSGRADIENT
#define EAST_M2GRADIENT
#define EAST_M3GRADIENT
#define SOLVE3D
#define SPLINES
#define SWAN_COUPLING
#define NEARSHORE_MELLOR
#define ANA_INITIAL
#define ANA_SMFLUX
#define ANA_FSOBC
#define ANA_M2OBC

#ifdef SWAN_COUPLING
# define MCT_LIB
#endif

/* define only one of the following 5 */
#undef  UV_LOGDRAG
#undef  UV_QDRAG
#undef  MB_BBL
#undef  SG_BBL
#define SSW_BBL
#ifdef SSW_BBL
# define SSW_CALC_ZNOT
#endif

#ifdef SOLVE3D
# define GLS_MIXING
# ifdef GLS_MIXING
#  define KANTHA_CLAYSON
#  define N2S2_HORAVG
# endif
# define SEDIMENT
# ifdef SEDIMENT
#  define SUSPLOAD
#  undef  BEDLOAD_SOULSBY
#  undef  BEDLOAD_MPM
#  define SED_MORPH
# endif
# if defined SEDIMENT || defined SG_BBL || defined MB_BBL || defined SSW_BBL
#  define ANA_SEDIMENT
# endif
# define ANA_STFLUX
# define ANA_SSFLUX
# define ANA_BPFLUX
# define ANA_BTFLUX
# define ANA_BSFLUX
# define ANA_SPFLUX
# define ANA_SRFLUX
#endif

I've been checking the sedbed_mod file (.../Nonlinear/Sediment/) but without success
Any clue?
Thanks.

jcwarner
Posts: 1188
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: compiling the coupled case: /bin/sh: -c: command not found

#6 Unread post by jcwarner »

i just did an svn update the inlet_test compiled and ran fine for me.
It will be difficult to diagnose your problem. Did you define any averages ? are you building the correct set of code?

rgon
Posts: 12
Joined: Thu Jan 29, 2009 4:00 pm
Location: University of Plymouth

Re: compiling the coupled case: /bin/sh: -c: command not found

#7 Unread post by rgon »

Dear Dr. Warner,
I did an svn update, as suggested, and all the systems and both models are running very good. :)
Personal note: Do not mix other versions with the working one.
Thanks.

Post Reply