Hi users,
I installed cygwin_NT-6.1 with netcdf-4.3 in my laptop and dowloaded ROMS code using the svn checkout option.
I tried the example project upwelling (wikiroms) but it gives error like this
./build.bash: line 40: $'\r': command not found
./build.bash: line 43: $'\r': command not found
./build.bash: line 46: syntax error near unexpected token `$'in\r''
'/build.bash: line 46: ` case "$1" in
I am herewith attaching my build.bash file (Project/Upwelling directory).
I am herewith attaching my build.bash file for your reference
Please help me to resolve the problem.
Have a good day
krish
Error in running ROMS (test case)
-
- Posts: 2
- Joined: Tue Nov 17, 2015 8:49 pm
- Location: AU
Error in running ROMS (test case)
- Attachments
-
- build.bash
- Bash file
- (17.4 KiB) Downloaded 304 times
Re: Error in running ROMS (test case)
This question has been asked before and can be solved by a google search, finding things like:
Also, prior posts have said that you would be better served by running the svn download in Cygwin, not in the Windows side.When all else fails in Cygwin...
Try running the dos2unix command on the file in question.
It might help when you see error messages like this:
-bash: '\r': command not found
-
- Posts: 2
- Joined: Tue Nov 17, 2015 8:49 pm
- Location: AU
Re: Error in running ROMS (test case)
Dear Madam,
I am on leave from 3 Dec 2015 to 14 Dec 2015.
Just now I checked my mails.
I tried dos2unix but still it gives like this
---------------------------------
oh@ohm-PC ~/roms/Projects/Upwelling
$ dos2unix build.bash
dos2unix: converting file build.bash to Unix format...
oh@ohm-PC ~/roms/Projects/Upwelling
$ ./build.bash
rm -f -r core *.ipo /home/oh/roms/Projects/Upwelling/Build /home/oh/make_macros.mk
makefile:238: INCLUDING FILE /home/oh/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
make: /opt/gfortransoft/serial/netcdf4/bin/nc-config: Command not found
which: no mpif90 in (/opt/gfortransoft/openmpi/bin:/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/DLLShared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/OEM/12.0/DLLShared:/cygdrive/c/Program Files (x86)/Roxio/OEM/AudioCore:/cygdrive/c/MSDEV/BIN:/usr/bin:/cygdrive/c/programs/gmt5/bin:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/usr/lib/lapack)
/bin/sh: --: invalid option
Usage: /bin/sh [GNU long option] [option] ...
/bin/sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
cp -f /opt/gfortransoft/serial/netcdf4/include/netcdf.mod /home/oh/roms/Projects/Upwelling/Build
cp: cannot stat ‘/opt/gfortransoft/serial/netcdf4/include/netcdf.mod’: No such file or directory
make: *** No rule to make target '/home/oh/roms/Projects/Upwelling/Build/netcdf.mod', needed by '/home/oh/roms/Projects/Upwelling/Build/MakeDepend'. Stop.
-------------------------------------------------------------------------------------
Please show me the path to run the model without errors.
have a nice day
With regards
Krish
I am on leave from 3 Dec 2015 to 14 Dec 2015.
Just now I checked my mails.
I tried dos2unix but still it gives like this
---------------------------------
oh@ohm-PC ~/roms/Projects/Upwelling
$ dos2unix build.bash
dos2unix: converting file build.bash to Unix format...
oh@ohm-PC ~/roms/Projects/Upwelling
$ ./build.bash
rm -f -r core *.ipo /home/oh/roms/Projects/Upwelling/Build /home/oh/make_macros.mk
makefile:238: INCLUDING FILE /home/oh/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
make: /opt/gfortransoft/serial/netcdf4/bin/nc-config: Command not found
which: no mpif90 in (/opt/gfortransoft/openmpi/bin:/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/DLLShared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared:/cygdrive/c/Program Files (x86)/Common Files/Roxio Shared/OEM/12.0/DLLShared:/cygdrive/c/Program Files (x86)/Roxio/OEM/AudioCore:/cygdrive/c/MSDEV/BIN:/usr/bin:/cygdrive/c/programs/gmt5/bin:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/usr/lib/lapack)
/bin/sh: --: invalid option
Usage: /bin/sh [GNU long option] [option] ...
/bin/sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
cp -f /opt/gfortransoft/serial/netcdf4/include/netcdf.mod /home/oh/roms/Projects/Upwelling/Build
cp: cannot stat ‘/opt/gfortransoft/serial/netcdf4/include/netcdf.mod’: No such file or directory
make: *** No rule to make target '/home/oh/roms/Projects/Upwelling/Build/netcdf.mod', needed by '/home/oh/roms/Projects/Upwelling/Build/MakeDepend'. Stop.
-------------------------------------------------------------------------------------
Please show me the path to run the model without errors.
have a nice day
With regards
Krish
Re: Error in running ROMS (test case)
You have at least two problems here. First:
Second:
Have you installed modern netcdf and netcdf-fortran libraries? They come with the nc-config executable. Perhaps you have it in a different location?make: /opt/gfortransoft/serial/netcdf4/bin/nc-config: Command not found
Second:
That first directory in your path looks like a good place for mpif90, yet you don't have it. You need to investigate more - do you have that directory? What's in it? Do you have a working gfortran? (which would get called by mpif90.)which: no mpif90 in (/opt/gfortransoft/openmpi/bin:/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: Error in running ROMS (test case)
You should try (and you should be able to) install all the software components you need as Cygwin packages. This includes svn, gfortran, openmpi, netcdf and the miscellanous development tools: make, perl, etc. There are various things that suggest you haven't done this...
If you used Cygwin svn to check out ROMS, then you shouldn't need to post-process with dos2unix.
Why is nc-config in /opt/gfortransoft/serial/netcdf4/bin/? On my system it's in /usr/bin. And mpif90 should be there also, provided you have installed all the necessary packages.
That said, there are quite a few packages to install, including various "devel" packages and libraries.
Can one of the ROMS gurus comment: is there a list of all the Cygwin packages needed to build and run ROMS anywhere? If not I guess I will have to produce one.
If you used Cygwin svn to check out ROMS, then you shouldn't need to post-process with dos2unix.
Why is nc-config in /opt/gfortransoft/serial/netcdf4/bin/? On my system it's in /usr/bin. And mpif90 should be there also, provided you have installed all the necessary packages.
That said, there are quite a few packages to install, including various "devel" packages and libraries.
Can one of the ROMS gurus comment: is there a list of all the Cygwin packages needed to build and run ROMS anywhere? If not I guess I will have to produce one.