Can anyone help with CYGWIN and build.bash??

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
hclarke
Posts: 22
Joined: Sun Dec 04, 2016 1:03 am
Location: UTAS

Can anyone help with CYGWIN and build.bash??

#1 Unread post by hclarke »

I'm stuck compiling the upwelling case. I have attached my build.bash file and here is the error message. Could someone please help who has experience with roms via CYGWIN?

User@User-PC ~/roms/Projects/Upwelling
$ ./build9.bash
rm -f -r core *.ipo /home/User/roms/projects/upwelling/Build /home/User/make_mac ros.mk
makefile:239: INCLUDING FILE /home/User/make_macros.mk WHICH CONTAINS APPLICATIO N-DEPENDENT MAKE DEFINITIONS
which: no gfortran-4 in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files/Commo n Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Fil es/Microsoft Shared/Windows Live:/cygdrive/c/ProgramData/Oracle/Java/javapath:/c ygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem :/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files ( x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/b in:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/bin/win32:/cygdrive/c/P rogram Files (x86)/Skype/Phone:/cygdrive/c/cygwin64:/usr/bin:/usr/openwin/bin)
/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 /usr/include/netcdf.mod /home/User/roms/projects/upwelling/Build
cp -f /usr/include/typesizes.mod /home/User/roms/projects/upwelling/Build
./ROMS/Bin/sfmakedepend --cpp --fext=f90 --file=- --objdir=/home/User/roms/proje cts/upwelling/Build -DROMS_HEADER="upwelling.h" -I ROMS/Include -I /home/User/ro ms/projects/upwelling -I ROMS/Nonlinear -I ROMS/Nonlinear/Biology -I ROMS/Nonlin ear/Sediment -I ROMS/Utility -I ROMS/Drivers -I ROMS/Functionals -I /home/User/r oms/projects/upwelling -I Master -I Compilers --silent --moddir /home/User/roms/ projects/upwelling/Build ROMS/Nonlinear/mpdata_adiff.F ROMS/Nonlinear/vwalk_flo ats.F ROMS/Nonlinear/pre_step3d.F ROMS/Nonlinear/ini_fields.F ROMS/Nonlinear/wet dry.F ROMS/Nonlinear/v3dbc_im.F ROMS/Nonlinear/obc_adjust.F ROMS/Nonlinear/get_i data.F ROMS/Nonlinear/set_data.F ROMS/Nonlinear/rhs3d.F ROMS/Nonlinear/forcing.F ROMS/Nonlinear/radiation_stress.F ROMS/Nonlinear/t3dmix.F ROMS/Nonlinear/diag.F ROMS/Nonlinear/set_zeta.F ROMS/Nonlinear/rho_eos.F ROMS/Nonlinear/obc_volcons.F ROMS/Nonlinear/nesting.F ROMS/Nonlinear/get_data.F ROMS/Nonlinear/initial.F ROM S/Nonlinear/set_avg.F ROMS/Nonlinear/step3d_uv.F ROMS/Nonlinear/set_tides.F ROMS /Nonlinear/exchange_2d.F ROMS/Nonlinear/bvf_mix.F ROMS/Nonlinear/set_massflux.F ROMS/Nonlinear/omega.F ROMS/Nonlinear/t3dbc_im.F ROMS/Nonlinear/output.F ROMS/No nlinear/step2d.F ROMS/Nonlinear/u3dbc_im.F ROMS/Nonlinear/hmixing.F ROMS/Nonline ar/main3d.F ROMS/Nonlinear/conv_bry2d.F ROMS/Nonlinear/conv_bry3d.F ROMS/Nonline ar/my25_corstep.F ROMS/Nonlinear/zetabc.F ROMS/Nonlinear/exchange_3d.F ROMS/Nonl inear/bulk_flux.F ROMS/Nonlinear/set_depth.F ROMS/Nonlinear/tkebc_im.F ROMS/Nonl inear/prsgrd.F ROMS/Nonlinear/step_floats.F ROMS/Nonlinear/bbl.F ROMS/Nonlinear/ bc_bry3d.F ROMS/Nonlinear/frc_adjust.F ROMS/Nonlinear/lmd_vmix.F ROMS/Nonlinear/ v2dbc_im.F ROMS/Nonlinear/u2dbc_im.F ROMS/Nonlinear/bc_bry2d.F ROMS/Nonlinear/co nv_2d.F ROMS/Nonlinear/lmd_swfrac.F ROMS/Nonlinear/uv3dmix.F ROMS/Nonlinear/my25 _prestep.F ROMS/Nonlinear/lmd_skpp.F ROMS/Nonlinear/wvelocity.F ROMS/Nonlinear/l md_bkpp.F ROMS/Nonlinear/conv_3d.F ROMS/Nonlinear/bc_2d.F ROMS/Nonlinear/gls_pre step.F ROMS/Nonlinear/main2d.F ROMS/Nonlinear/interp_floats.F ROMS/Nonlinear/ste p3d_t.F ROMS/Nonlinear/set_vbc.F ROMS/Nonlinear/bc_3d.F ROMS/Nonlinear/gls_corst ep.F ROMS/Nonlinear/Biology/biology_floats.F ROMS/Nonlinear/Biology/biology.F RO MS/Nonlinear/Sediment/sed_bed.F ROMS/Nonlinear/Sediment/sed_settling.F ROMS/Nonl inear/Sediment/sed_surface.F ROMS/Nonlinear/Sediment/sed_fluxes.F ROMS/Nonlinear /Sediment/sed_bedload.F ROMS/Nonlinear/Sediment/sediment.F ROMS/Functionals/anal ytical.F ROMS/Utility/def_diags.F ROMS/Utility/read_fltbiopar.F ROMS/Utility/get _2dfld.F ROMS/Utility/convolve.F ROMS/Utility/nf_fread3d.F ROMS/Utility/state_ad dition.F ROMS/Utility/wrt_his.F ROMS/Utility/nf_fread3d_bry.F ROMS/Utility/nruti l.F ROMS/Utility/state_initialize.F ROMS/Utility/get_wetdry.F ROMS/Utility/read_ asspar.F ROMS/Utility/def_hessian.F ROMS/Utility/inner2state.F ROMS/Utility/cong rad.F ROMS/Utility/read_phypar.F ROMS/Utility/set_contact.F ROMS/Utility/ludcmp. F ROMS/Utility/ini_lanczos.F ROMS/Utility/abort.F ROMS/Utility/def_ini.F ROMS/Ut ility/obs_read.F ROMS/Utility/state_product.F ROMS/Utility/read_biopar.F ROMS/Ut ility/back_cost.F ROMS/Utility/checkadj.F ROMS/Utility/stats_modobs.F ROMS/Utili ty/get_cycle.F ROMS/Utility/nf_fread4d.F ROMS/Utility/wrt_diags.F ROMS/Utility/o bs_k2z.F ROMS/Utility/lubksb.F ROMS/Utility/wrt_floats.F ROMS/Utility/extract_st a.F ROMS/Utility/wrt_info.F ROMS/Utility/set_weights.F ROMS/Utility/def_lanczos. F ROMS/Utility/regrid.F ROMS/Utility/nf_fwrite3d.F ROMS/Utility/packing.F ROMS/U tility/def_gst.F ROMS/Utility/def_mod.F ROMS/Utility/nf_fwrite3d_bry.F ROMS/Util ity/read_sedpar.F ROMS/Utility/read_fltpar.F ROMS/Utility/get_bounds.F ROMS/Util ity/wrt_hessian.F ROMS/Utility/wrt_gst.F ROMS/Utility/comp_Jb0.F ROMS/Utility/ch eckdefs.F ROMS/Utility/wpoints.F ROMS/Utility/sqlq.F ROMS/Utility/def_tides.F RO MS/Utility/zeta_balance.F ROMS/Utility/set_3dfld.F ROMS/Utility/normalization.F ROMS/Utility/posterior.F ROMS/Utility/set_2dfldr.F ROMS/Utility/wrt_aug_imp.F RO MS/Utility/obs_cost.F ROMS/Utility/checkerror.F ROMS/Utility/obs_depth.F ROMS/Ut ility/nf_fread2d.F ROMS/Utility/set_2dfld.F ROMS/Utility/nf_fread2d_bry.F ROMS/U tility/wrt_station.F ROMS/Utility/posterior_var.F ROMS/Utility/distribute.F ROMS /Utility/state_dotprod.F ROMS/Utility/wrt_dai.F ROMS/Utility/get_ngfld.F ROMS/Ut ility/rep_matrix.F ROMS/Utility/frc_weak.F ROMS/Utility/vorticity.F ROMS/Utility /cost_grad.F ROMS/Utility/get_nudgcoef.F ROMS/Utility/def_error.F ROMS/Utility/d ef_dai.F ROMS/Utility/lanc_resid.F ROMS/Utility/mp_exchange.F ROMS/Utility/def_a vg.F ROMS/Utility/ini_adjust.F ROMS/Utility/set_ngfldr.F ROMS/Utility/check_mult ifile.F ROMS/Utility/timers.F ROMS/Utility/ini_hmixcoef.F ROMS/Utility/gasdev.F ROMS/Utility/ran1.F ROMS/Utility/array_modes.F ROMS/Utility/sum_imp.F ROMS/Utili ty/interpolate.F ROMS/Utility/stiffness.F ROMS/Utility/get_state.F ROMS/Utility/ dotproduct.F ROMS/Utility/ntimestep.F ROMS/Utility/get_3dfld.F ROMS/Utility/clos e_io.F ROMS/Utility/wrt_ini.F ROMS/Utility/extract_obs.F ROMS/Utility/get_grid.F ROMS/Utility/wrt_tides.F ROMS/Utility/get_2dfldr.F ROMS/Utility/nf_fwrite2d.F R OMS/Utility/shapiro.F ROMS/Utility/nf_fwrite2d_bry.F ROMS/Utility/def_quick.F RO MS/Utility/get_ngfldr.F ROMS/Utility/checkvars.F ROMS/Utility/set_masks.F ROMS/U tility/get_varcoords.F ROMS/Utility/def_impulse.F ROMS/Utility/def_dim.F ROMS/Ut ility/read_stapar.F ROMS/Utility/def_var.F ROMS/Utility/inquire.F ROMS/Utility/t ime_corr.F ROMS/Utility/wrt_error.F ROMS/Utility/get_date.F ROMS/Utility/wrt_avg .F ROMS/Utility/def_rst.F ROMS/Utility/white_noise.F ROMS/Utility/def_norm.F ROM S/Utility/mp_routines.F ROMS/Utility/def_info.F ROMS/Utility/lbc.F ROMS/Utility/ def_his.F ROMS/Utility/random_ic.F ROMS/Utility/def_floats.F ROMS/Utility/state_ copy.F ROMS/Utility/cgradient.F ROMS/Utility/state_scale.F ROMS/Utility/erf.F RO MS/Utility/get_gst.F ROMS/Utility/ran_state.F ROMS/Utility/strings.F ROMS/Utilit y/set_scoord.F ROMS/Utility/sum_grad.F ROMS/Utility/metrics.F ROMS/Utility/wrt_q uick.F ROMS/Utility/nf_fwrite4d.F ROMS/Utility/uv_rotate.F ROMS/Utility/read_cou plepar.F ROMS/Utility/set_3dfldr.F ROMS/Utility/wrt_impulse.F ROMS/Utility/set_d iags.F ROMS/Utility/wrt_evolved.F ROMS/Utility/obs_initial.F ROMS/Utility/def_st ation.F ROMS/Utility/set_ngfld.F ROMS/Utility/inp_par.F ROMS/Utility/rpcg_lanczo s.F ROMS/Utility/get_3dfldr.F ROMS/Utility/grid_coords.F ROMS/Utility/wrt_rst.F ROMS/Utility/obs_write.F ROMS/Modules/mod_coupling.F ROMS/Modules/mod_floats.F R OMS/Modules/mod_clima.F ROMS/Modules/mod_netcdf.F ROMS/Modules/mod_coupler.F ROM S/Modules/mod_param.F ROMS/Modules/mod_iounits.F ROMS/Modules/mod_diags.F ROMS/M odules/mod_biology.F ROMS/Modules/mod_stepping.F ROMS/Modules/mod_kinds.F ROMS/M odules/mod_bbl.F ROMS/Modules/mod_behavior.F ROMS/Modules/mod_eoscoef.F ROMS/Mod ules/mod_forces.F ROMS/Modules/mod_average.F ROMS/Modules/mod_nesting.F ROMS/Mod ules/mod_ncparam.F ROMS/Modules/mod_ocean.F ROMS/Modules/mod_parallel.F ROMS/Mod ules/mod_sediment.F ROMS/Modules/mod_boundary.F ROMS/Modules/mod_grid.F ROMS/Mod ules/mod_tides.F ROMS/Modules/mod_strings.F ROMS/Modules/mod_eclight.F ROMS/Modu les/mod_arrays.F ROMS/Modules/mod_fourdvar.F ROMS/Modules/mod_scalars.F ROMS/Mod ules/mod_sources.F ROMS/Modules/mod_storage.F ROMS/Modules/mod_sedbed.F ROMS/Mod ules/mod_mixing.F Master/ocean_control.F Master/esmf_roms.F Master/ocean_coupler .F Master/roms_export.F Master/master.F Master/propagator.F Master/roms_import.F > /home/User/roms/projects/upwelling/Build/MakeDepend
cp -p /home/User/make_macros.mk /home/User/roms/projects/upwelling/Build
makefile:235: INCLUDING FILE /home/User/roms/projects/upwelling/Build/make_macro s.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
which: no gfortran-4 in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files/Commo n Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Fil es/Microsoft Shared/Windows Live:/cygdrive/c/ProgramData/Oracle/Java/javapath:/c ygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem :/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files ( x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/b in:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/bin/win32:/cygdrive/c/P rogram Files (x86)/Skype/Phone:/cygdrive/c/cygwin64:/usr/bin:/usr/openwin/bin)
/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
/usr/bin/cpp -P -traditional -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/ roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/rom s/projects/upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/ roms/projects/upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Inclu de -I/home/User/roms/projects/upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biolog y -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/ home/User/roms/projects/upwelling -IMaster -ICompilers -D'HEADER_DIR="/home/User /roms/projects/upwelling"' ROMS/Utility/def_diags.F > /home/User/roms/projects/ upwelling/Build/def_diags.f90
ROMS/Bin/cpp_clean /home/User/roms/projects/upwelling/Build/def_diags.f90
/usr/bin/cpp -P -traditional -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/ roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/rom s/projects/upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/ roms/projects/upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Inclu de -I/home/User/roms/projects/upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biolog y -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/ home/User/roms/projects/upwelling -IMaster -ICompilers -D'HEADER_DIR="/home/User /roms/projects/upwelling"' ROMS/Utility/def_var.F > /home/User/roms/projects/up welling/Build/def_var.f90
ROMS/Bin/cpp_clean /home/User/roms/projects/upwelling/Build/def_var.f90
/usr/bin/cpp -P -traditional -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/ roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/rom s/projects/upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/ roms/projects/upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Inclu de -I/home/User/roms/projects/upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biolog y -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/ home/User/roms/projects/upwelling -IMaster -ICompilers -D'HEADER_DIR="/home/User /roms/projects/upwelling"' ROMS/Utility/distribute.F > /home/User/roms/projects /upwelling/Build/distribute.f90
ROMS/Bin/cpp_clean /home/User/roms/projects/upwelling/Build/distribute.f90
/usr/bin/cpp -P -traditional -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/ roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/rom s/projects/upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/ roms/projects/upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Inclu de -I/home/User/roms/projects/upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biolog y -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/ home/User/roms/projects/upwelling -IMaster -ICompilers -D'HEADER_DIR="/home/User /roms/projects/upwelling"' ROMS/Modules/mod_iounits.F > /home/User/roms/project s/upwelling/Build/mod_iounits.f90
ROMS/Bin/cpp_clean /home/User/roms/projects/upwelling/Build/mod_iounits.f90
/usr/bin/cpp -P -traditional -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/ roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/rom s/projects/upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/ roms/projects/upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Inclu de -I/home/User/roms/projects/upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biolog y -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/ home/User/roms/projects/upwelling -IMaster -ICompilers -D'HEADER_DIR="/home/User /roms/projects/upwelling"' ROMS/Modules/mod_param.F > /home/User/roms/projects/ upwelling/Build/mod_param.f90
ROMS/Bin/cpp_clean /home/User/roms/projects/upwelling/Build/mod_param.f90
/usr/bin/cpp -P -traditional -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/ roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/rom s/projects/upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/ roms/projects/upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Inclu de -I/home/User/roms/projects/upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biolog y -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/ home/User/roms/projects/upwelling -IMaster -ICompilers -D'HEADER_DIR="/home/User /roms/projects/upwelling"' ROMS/Modules/mod_kinds.F > /home/User/roms/projects/ upwelling/Build/mod_kinds.f90
ROMS/Bin/cpp_clean /home/User/roms/projects/upwelling/Build/mod_kinds.f90
cd /home/User/roms/projects/upwelling/Build; -c -frepack-arrays -O3 -ffast-math -fno-bounds-check mod_kinds.f90
/bin/sh: -c: command not found
make: *** [ROMS/Modules/Module.mk:15: /home/User/roms/projects/upwelling/Build/m od_kinds.o] Error 127
Attachments
build9.bash
(16.7 KiB) Downloaded 334 times

User avatar
ngarg
Posts: 19
Joined: Fri Jul 12, 2013 5:46 pm
Location: NTU

Re: Can anyone help with CYGWIN and build.bash??

#2 Unread post by ngarg »

firstly, i dont think fortran compiler is called gfortran-4, it should just be
gfortran

In your build.bash script, have you tried just compiling in serial mode, I mean just disable mpi and see if it compiles. I guess, you can comment out

export USE_MPIF90=on
export which_MPI=openmpi


whether you have openmpi available

export PATH=/opt/gfortransoft/openmpi/bin:$PATH

If it compiles fine in serial mode, then you can just make sure the path to mpi library is correctly set.

hclarke
Posts: 22
Joined: Sun Dec 04, 2016 1:03 am
Location: UTAS

Re: Can anyone help with CYGWIN and build.bash??

#3 Unread post by hclarke »

Thanks for your reply!

Yes, I was just following instructions from the tutorial to edit my CYGWIN-gfortran.mk file to have the line:

FC := gfortran-4

...as opposed to:

FC := gfortran.

The latter works and the former does not. Not sure if the FAQ has been updated, but I now have the oceanS.exe, so success on compiling!

Now I have an error on the run:
**************************************************************************************************************
User@User-PC ~/roms/Projects/Upwelling
$ ./oceanS < ocean_upwelling.in

Model Input Parameters: ROMS/TOMS version 3.7
Tuesday - February 21, 2017 - 1:15:29 AM
-----------------------------------------------------------------------------

MOD_NCPARAM - Unable to open variable information file:
/home/hclarke/roms/trunk/ROMS/External/varinfo.dat
Default file is located in source directory.
***************************************************************************************************************


I don't know how the system "reads" the path in linux for the file "varinfo.dat", but the "Windows" location is:

C:\cygwin\home\User\roms\trunk\ROMS\External

Thanks!

Post Reply