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

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
shiyf
Posts: 51
Joined: Mon Sep 09, 2013 11:09 pm
Location: OUC

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

#1 Unread post by shiyf »

Hello, everyone,
When I first compile build.bash for the ROMS according to the instructions-Installing and Running ROMS for First Time Users , I come across a problem as below:

cd /lustre/home/shiyongfangWKJ/Projects/upwelling/Build; /lustre/inspur/mpi/openmpi-intel/bin/mpif90 -c -heap-arrays -fp-model precise -g -check uninit -ftrapuv -traceback -free analytical.f90
analytical.f90(396): error #5082: Syntax error, found ':' when expecting one of: % . = =>
ana_grid.h: no values provided for Xsize, Esize, depth, f0, beta.
----------------^
analytical.f90(1351): error #5082: Syntax error, found ':' when expecting one of: % . = =>
ana_vmix.h: no values provided for Akv.
----------------^
analytical.f90(1370): error #5082: Syntax error, found ':' when expecting one of: % . = =>
ana_vmix.h: no values provided for Akt.
----------------^
compilation aborted for analytical.f90 (code 1)
make: *** [/lustre/home/shiyongfangWKJ/Projects/upwelling/Build/analytical.o] Error 1



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

Thanks very much!

yf
Last edited by shiyf on Sun Sep 22, 2013 12:08 pm, edited 1 time in total.

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

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

#2 Unread post by kate »

This is very briefly mentioned in the FAQ. I will go beef that up. Basically, which compiler are you using? Is it in your path? Did you ask for USE_MPIF90 and is mpif90 in your path?

shiyf
Posts: 51
Joined: Mon Sep 09, 2013 11:09 pm
Location: OUC

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

#3 Unread post by shiyf »

Thank you for your help, I have added mpif90 path,but it have anther error:
cd /lustre/home/shiyongfangWKJ/Projects/upwelling/Build; /lustre/inspur/mpi/openmpi-intel/bin/mpif90 -c -heap-arrays -fp-model precise -g -check uninit -ftrapuv -traceback -free analytical.f90
analytical.f90(396): error #5082: Syntax error, found ':' when expecting one of: % . = =>
ana_grid.h: no values provided for Xsize, Esize, depth, f0, beta.
----------------^
analytical.f90(1351): error #5082: Syntax error, found ':' when expecting one of: % . = =>
ana_vmix.h: no values provided for Akv.
----------------^
analytical.f90(1370): error #5082: Syntax error, found ':' when expecting one of: % . = =>
ana_vmix.h: no values provided for Akt.

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

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

#4 Unread post by kate »

Are you trying to run the UPWELLING case? There is a line in build.bash:

Code: Select all

export   ROMS_APPLICATION=UPWELLING
Do you have that?

The code you are seeing is from ROMS/Functionals/ana_grid.h. It contains a section setting values for Xsize and the rest for each case, then if no known case is set, it defaults to:

Code: Select all

#elif defined WINDBASIN
      Xsize=2000.0_r8*REAL(Lm(ng),r8)
      Esize=1000.0_r8*REAL(Mm(ng),r8)
      depth=50.0_r8
      f0=1.0E-04_r8
      beta=0.0_r8
#else
      ana_grid.h: no values provided for Xsize, Esize, depth, f0, beta.
#endif
If you are trying to run UPWELLING, it should have picked up the chunk for that case instead of the "else" case. Which case are you hoping to run and how are you setting it?

shiyf
Posts: 51
Joined: Mon Sep 09, 2013 11:09 pm
Location: OUC

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

#5 Unread post by shiyf »

Thank you very much for your help, just contact mode, no experience for errors, please forgive me. the error have solved,but it have anther error:


cd /lustre/home/shiyongfangWKJ/roms/projects/upwelling/Build; /lustre/inspur/mpi/openmpi-intel/bin/mpif90 -c -heap-arrays -fp-model precise -g -check uninit -ftrapuv -traceback ntimestep.f90
ntimestep.f90(79): error #6911: The syntax of this substring is invalid. [COMPOSITEGRID]
IF (ANY(CompositeGrid(:,ng))) THEN
------------------^
compilation aborted for ntimestep.f90 (code 1)
make: *** [/lustre/home/shiyongfangWKJ/roms/projects/upwelling/Build/ntimestep.o] Error 1

I don't know what happened, could you help me?

syf

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

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

#6 Unread post by kate »

Your compiler has said that it doesn't like that code. I'm not sure why. Do you happen to have an old version of the compiler? Which compiler is it and what is the version number? Can you try a different compiler instead?

Post Reply