Problem with compiling build.bash and netcdf on cygwin

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

Problem with compiling build.bash and netcdf on cygwin

#1 Unread post by hclarke »

Hi

I've been attempting to compile my attached build.bash using cygwin with the following error:

$ ./build.bash
rm -f -r core *.ipo /home/User/roms/Projects/Upwelling/Build /home/User/make_macros.mk
makefile:239: INCLUDING FILE /home/User/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
make: /opt/gfortransoft/serial/netcdf4/bin/nc-config: Command not found
cp -f /opt/gfortransoft/serial/netcdf4/include/netcdf.mod /home/User/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/User/roms/Projects/Upwelling/Build/netcdf.mod', needed by '/home/User/roms/Projects/Upwelling/Build/MakeDepend'. Stop.

I've been through so many posts, but haven't found an answer as to where my nc-config and nf-config might be located and where to implement the full path to these files in build.bash.

Thanks
Attachments
build.bash
(16.82 KiB) Downloaded 420 times

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

Re: Problem with compiling build.bash and netcdf on cygwin

#2 Unread post by kate »

It could be that you don't have nc-config or nf-config on your system yet. You need to install the netcdf and netcdf-fortran packages, whether from a package manager or from source.

Once that's done, ideally you'll put them somewhere on your path, you can then set USE_NETCDF4=on and let the build find the one on your path. The build scripts are full of old paths from back in the bad old days, before nf-config. If it were me, I'd just delete the whole pack of them and ask people to use USE_NETCDF4.

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

Re: Problem with compiling build.bash and netcdf on cygwin

#3 Unread post by hclarke »

Thanks for your reply Kate. The nc-config and nf-config files are located in C:\cygwin\bin, so they are installed.

I edited my build.bash in the gfortran section to look like this:
if [ -n "${USE_NETCDF4:+1}" ]; then
if [ -n "${USE_PARALLEL_IO:+1}" ] && [ -n "${USE_MPI:+1}" ]; then
if [ "${which_MPI}" = "mpich2" ]; then
export NC_CONFIG=/usr/local/lib/netcdf-fortran/bin/nf-config
export NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
elif [ "${which_MPI}" = "openmpi" ]; then
export
NC_CONFIG=/usr/local/lib/netcdf-fortran/bin/nf-config
export
NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
fi
else
export
NC_CONFIG=/usr/local/lib/netcdf-fortran/bin/nf-config
export
NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
fi
else
export
NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
export
NETCDF_LIBDIR=/usr/local/lib
fi
;;

esac
fi


Now when I compile, I get this: Is this what I’m supposed to get?
User@User-PC ~/roms/Projects/Upwelling
$ ./build6.bash
declare -x !::
declare -x ALLUSERSPROFILE="C:\\ProgramData"
declare -x APPDATA="C:\\Users\\User\\AppData\\Roaming"
declare -x ARPACK_LIBDIR="/opt/gfortransoft/serial/ARPACK"
declare -x COMMONPROGRAMFILES="C:\\Program Files (x86)\\Common Files"
declare -x COMPILERS="/home/User/roms/trunk/Compilers"
declare -x COMPUTERNAME="USER-PC"
declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
declare -x CommonProgramFiles(x86)
declare -x CommonProgramW6432="C:\\Program Files\\Common Files"
declare -x ESMF_ABI="64"
declare -x ESMF_BOPT="O"
declare -x ESMF_COMM="mpich"
declare -x ESMF_COMPILER="gfortran"
declare -x ESMF_DIR="/opt/gfortransoft/openmpi/esmf"
declare -x ESMF_OS="Linux"
declare -x ESMF_SITE="default"
declare -x EXECIGNORE="*.dll"
declare -x FORT="gfortran"
declare -x FP_NO_HOST_CHECK="NO"
declare -x HOME="/home/User"
declare -x HOMEDRIVE="C:"
declare -x HOMEPATH="\\Users\\User"
declare -x HOSTNAME="User-PC"
declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info"
declare -x LANG="en_US.UTF-8"
declare -x LOCALAPPDATA="C:\\Users\\User\\AppData\\Local"
declare -x LOGONSERVER="\\\\USER-PC"
declare -x MANPATH=":/usr/openwin/man"
declare -x MCT_INCDIR="/opt/gfortransoft/openmpi/mct/include"
declare -x MCT_LIBDIR="/opt/gfortransoft/openmpi/mct/lib"
declare -x MY_PROJECT_DIR="/home/User/roms/Projects/Upwelling"
declare -x MY_ROMS_SRC="/home/User/roms/trunk"
declare -x MY_ROOT_DIR="/home/User/roms"
declare -x NUMBER_OF_PROCESSORS="2"
declare -x OLDPWD
declare -x ORIGINAL_PATH="/cygdrive/c/Program Files/Common Files/Microsoft Share d/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Win dows Live:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Windows/syste m32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/Sy stem32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Windows Live/Share d:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/bin:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/bin/win32:/cygdrive/c/Program Files (x86)/Skyp e/Phone:/cygdrive/c/cygwin64:/usr/bin"
declare -x OS="Windows_NT"
declare -x PARPACK_LIBDIR="/opt/gfortransoft/openmpi/PARPACK"
declare -x PATH="/opt/gfortransoft/openmpi/bin:/usr/local/bin:/usr/bin:/cygdrive /c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/ProgramData/O racle/Java/javapath:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c /Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygd rive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/M ATLAB/R2008b Student/bin:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/b in/win32:/cygdrive/c/Program Files (x86)/Skype/Phone:/cygdrive/c/cygwin64:/usr/b in:/usr/openwin/bin"
declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
declare -x PRINTER="PDFCreator"
declare -x PROCESSOR_ARCHITECTURE="x86"
declare -x PROCESSOR_ARCHITEW6432="AMD64"
declare -x PROCESSOR_IDENTIFIER="Intel64 Family 6 Model 15 Stepping 13, GenuineI ntel"
declare -x PROCESSOR_LEVEL="6"
declare -x PROCESSOR_REVISION="0f0d"
declare -x PROFILEREAD="true"
declare -x PROGRAMFILES="C:\\Program Files (x86)"
declare -x PSModulePath="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules \\"
declare -x PUBLIC="C:\\Users\\Public"
declare -x PWD="/home/User/roms/Projects/Upwelling"
declare -x ProgramData="C:\\ProgramData"
declare -x ProgramFiles(x86)
declare -x ProgramW6432="C:\\Program Files"
declare -x ROMS_APPLICATION="UPWELLING"
declare -x SESSIONNAME="Console"
declare -x SHELL="/bin/bash"
declare -x SHLVL="2"
declare -x SYSTEMDRIVE="C:"
declare -x SYSTEMROOT="C:\\Windows"
declare -x TEMP="/tmp"
declare -x TERM="xterm"
declare -x TMP="/tmp"
declare -x TZ="Australia/Sydney"
declare -x USER="User"
declare -x USERDOMAIN="User-PC"
declare -x USERNAME="User"
declare -x USERPROFILE="C:\\Users\\User"
declare -x USE_LARGE="on"
declare -x USE_MPI="on"
declare -x USE_MPIF90="on"
declare -x USE_MY_LIBS="on"
declare -x USE_NETCDF4="on"
declare -x VBOX_MSI_INSTALL_PATH="C:\\Program Files\\Oracle\\VirtualBox\\"
declare -x WINDIR="C:\\Windows"
declare -x asl.log
declare -x which_MPI="openmpi"
declare -x !::
declare -x ALLUSERSPROFILE="C:\\ProgramData"
declare -x APPDATA="C:\\Users\\User\\AppData\\Roaming"
declare -x ARPACK_LIBDIR="/opt/gfortransoft/serial/ARPACK"
declare -x COMMONPROGRAMFILES="C:\\Program Files (x86)\\Common Files"
declare -x COMPILERS="/home/User/roms/trunk/Compilers"
declare -x COMPUTERNAME="USER-PC"
declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
declare -x CommonProgramFiles(x86)
declare -x CommonProgramW6432="C:\\Program Files\\Common Files"
declare -x ESMF_ABI="64"
declare -x ESMF_BOPT="O"
declare -x ESMF_COMM="mpich"
declare -x ESMF_COMPILER="gfortran"
declare -x ESMF_DIR="/opt/gfortransoft/openmpi/esmf"
declare -x ESMF_OS="Linux"
declare -x ESMF_SITE="default"
declare -x EXECIGNORE="*.dll"
declare -x FORT="gfortran"
declare -x FP_NO_HOST_CHECK="NO"
declare -x HOME="/home/User"
declare -x HOMEDRIVE="C:"
declare -x HOMEPATH="\\Users\\User"
declare -x HOSTNAME="User-PC"
declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info"
declare -x LANG="en_US.UTF-8"
declare -x LOCALAPPDATA="C:\\Users\\User\\AppData\\Local"
declare -x LOGONSERVER="\\\\USER-PC"
declare -x MANPATH=":/usr/openwin/man"
declare -x MCT_INCDIR="/opt/gfortransoft/openmpi/mct/include"
declare -x MCT_LIBDIR="/opt/gfortransoft/openmpi/mct/lib"
declare -x MY_PROJECT_DIR="/home/User/roms/Projects/Upwelling"
declare -x MY_ROMS_SRC="/home/User/roms/trunk"
declare -x MY_ROOT_DIR="/home/User/roms"
declare -x NUMBER_OF_PROCESSORS="2"
declare -x OLDPWD
declare -x ORIGINAL_PATH="/cygdrive/c/Program Files/Common Files/Microsoft Share d/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Win dows Live:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Windows/syste m32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/Sy stem32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Windows Live/Share d:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/bin:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/bin/win32:/cygdrive/c/Program Files (x86)/Skyp e/Phone:/cygdrive/c/cygwin64:/usr/bin"
declare -x OS="Windows_NT"
declare -x PARPACK_LIBDIR="/opt/gfortransoft/openmpi/PARPACK"
declare -x PATH="/opt/gfortransoft/openmpi/bin:/usr/local/bin:/usr/bin:/cygdrive /c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/ProgramData/O racle/Java/javapath:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c /Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygd rive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/M ATLAB/R2008b Student/bin:/cygdrive/c/Program Files (x86)/MATLAB/R2008b Student/b in/win32:/cygdrive/c/Program Files (x86)/Skype/Phone:/cygdrive/c/cygwin64:/usr/b in:/usr/openwin/bin"
declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
declare -x PRINTER="PDFCreator"
declare -x PROCESSOR_ARCHITECTURE="x86"
declare -x PROCESSOR_ARCHITEW6432="AMD64"
declare -x PROCESSOR_IDENTIFIER="Intel64 Family 6 Model 15 Stepping 13, GenuineI ntel"
declare -x PROCESSOR_LEVEL="6"
declare -x PROCESSOR_REVISION="0f0d"
declare -x PROFILEREAD="true"
declare -x PROGRAMFILES="C:\\Program Files (x86)"
declare -x PSModulePath="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules \\"
declare -x PUBLIC="C:\\Users\\Public"
declare -x PWD="/home/User/roms/Projects/Upwelling"
declare -x ProgramData="C:\\ProgramData"
declare -x ProgramFiles(x86)
declare -x ProgramW6432="C:\\Program Files"
declare -x ROMS_APPLICATION="UPWELLING"
declare -x SESSIONNAME="Console"
declare -x SHELL="/bin/bash"
declare -x SHLVL="2"
declare -x SYSTEMDRIVE="C:"
declare -x SYSTEMROOT="C:\\Windows"
declare -x TEMP="/tmp"
declare -x TERM="xterm"
declare -x TMP="/tmp"
declare -x TZ="Australia/Sydney"
declare -x USER="User"
declare -x USERDOMAIN="User-PC"
declare -x USERNAME="User"
declare -x USERPROFILE="C:\\Users\\User"
declare -x USE_LARGE="on"
declare -x USE_MPI="on"
declare -x USE_MPIF90="on"
declare -x USE_MY_LIBS="on"
declare -x USE_NETCDF4="on"
declare -x VBOX_MSI_INSTALL_PATH="C:\\Program Files\\Oracle\\VirtualBox\\"
declare -x WINDIR="C:\\Windows"
declare -x asl.log
declare -x which_MPI="openmpi"
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 APPLICATION-DEPENDENT MAKE DEFINITIONS
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/Projects/Upwelling/Build -DROMS_HEADER="upwelling.h" -I ROMS/Include -I /home/User/roms/Projects/Upwelling -I ROMS/Nonlinear -I ROMS/Nonlinear/Biology -I ROMS/Nonlinear/Sediment -I ROMS/Utility -I ROMS/Drivers -I ROMS/Functionals -I /home/User/roms/Projects/Upwelling -I Master -I Compilers --silent --moddir /home/User/roms/Projects/Upwelling/Build ROMS/Nonlinear/mpdata_adiff.F ROMS/Nonlinear/vwalk_floats.F ROMS/Nonlinear/pre_step3d.F ROMS/Nonlinear/ini_fields.F ROMS/Nonlinear/wetdry.F ROMS/Nonlinear/v3dbc_im.F ROMS/Nonlinear/obc_adjust.F ROMS/Nonlinear/get_idata.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 ROMS/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/Nonlinear/step2d.F ROMS/Nonlinear/u3dbc_im.F ROMS/Nonlinear/hmixing.F ROMS/Nonlinear/main3d.F ROMS/Nonlinear/conv_bry2d.F ROMS/Nonlinear/conv_bry3d.F ROMS/Nonlinear/my25_corstep.F ROMS/Nonlinear/zetabc.F ROMS/Nonlinear/exchange_3d.F ROMS/Nonlinear/bulk_flux.F ROMS/Nonlinear/set_depth.F ROMS/Nonlinear/tkebc_im.F ROMS/Nonlinear/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/conv_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/lmd_bkpp.F ROMS/Nonlinear/conv_3d.F ROMS/Nonlinear/bc_2d.F ROMS/Nonlinear/gls_prestep.F ROMS/Nonlinear/main2d.F ROMS/Nonlinear/interp_floats.F ROMS/Nonlinear/step3d_t.F ROMS/Nonlinear/set_vbc.F ROMS/Nonlinear/bc_3d.F ROMS/Nonlinear/gls_corstep.F ROMS/Nonlinear/Biology/biology_floats.F ROMS/Nonlinear/Biology/biology.F ROMS/Nonlinear/Sediment/sed_bed.F ROMS/Nonlinear/Sediment/sed_settling.F ROMS/Nonlinear/Sediment/sed_surface.F ROMS/Nonlinear/Sediment/sed_fluxes.F ROMS/Nonlinear/Sediment/sed_bedload.F ROMS/Nonlinear/Sediment/sediment.F ROMS/Functionals/analytical.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_addition.F ROMS/Utility/wrt_his.F ROMS/Utility/nf_fread3d_bry.F ROMS/Utility/nrutil.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/congrad.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/Utility/obs_read.F ROMS/Utility/state_product.F ROMS/Utility/read_biopar.F ROMS/Utility/back_cost.F ROMS/Utility/checkadj.F ROMS/Utility/stats_modobs.F ROMS/Utility/get_cycle.F ROMS/Utility/nf_fread4d.F ROMS/Utility/wrt_diags.F ROMS/Utility/obs_k2z.F ROMS/Utility/lubksb.F ROMS/Utility/wrt_floats.F ROMS/Utility/extract_sta.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/Utility/def_gst.F ROMS/Utility/def_mod.F ROMS/Utility/nf_fwrite3d_bry.F ROMS/Utility/read_sedpar.F ROMS/Utility/read_fltpar.F ROMS/Utility/get_bounds.F ROMS/Utility/wrt_hessian.F ROMS/Utility/wrt_gst.F ROMS/Utility/comp_Jb0.F ROMS/Utility/checkdefs.F ROMS/Utility/wpoints.F ROMS/Utility/sqlq.F ROMS/Utility/def_tides.F ROMS/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 ROMS/Utility/obs_cost.F ROMS/Utility/checkerror.F ROMS/Utility/obs_depth.F ROMS/Utility/nf_fread2d.F ROMS/Utility/set_2dfld.F ROMS/Utility/nf_fread2d_bry.F ROMS/Utility/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/Utility/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/def_dai.F ROMS/Utility/lanc_resid.F ROMS/Utility/mp_exchange.F ROMS/Utility/def_avg.F ROMS/Utility/ini_adjust.F ROMS/Utility/set_ngfldr.F ROMS/Utility/check_multifile.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/Utility/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/close_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 ROMS/Utility/shapiro.F ROMS/Utility/nf_fwrite2d_bry.F ROMS/Utility/def_quick.F ROMS/Utility/get_ngfldr.F ROMS/Utility/checkvars.F ROMS/Utility/set_masks.F ROMS/Utility/get_varcoords.F ROMS/Utility/def_impulse.F ROMS/Utility/def_dim.F ROMS/Utility/read_stapar.F ROMS/Utility/def_var.F ROMS/Utility/inquire.F ROMS/Utility/time_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 ROMS/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 ROMS/Utility/get_gst.F ROMS/Utility/ran_state.F ROMS/Utility/strings.F ROMS/Utility/set_scoord.F ROMS/Utility/sum_grad.F ROMS/Utility/metrics.F ROMS/Utility/wrt_quick.F ROMS/Utility/nf_fwrite4d.F ROMS/Utility/uv_rotate.F ROMS/Utility/read_couplepar.F ROMS/Utility/set_3dfldr.F ROMS/Utility/wrt_impulse.F ROMS/Utility/set_diags.F ROMS/Utility/wrt_evolved.F ROMS/Utility/obs_initial.F ROMS/Utility/def_station.F ROMS/Utility/set_ngfld.F ROMS/Utility/inp_par.F ROMS/Utility/rpcg_lanczos.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 ROMS/Modules/mod_clima.F ROMS/Modules/mod_netcdf.F ROMS/Modules/mod_coupler.F ROMS/Modules/mod_param.F ROMS/Modules/mod_iounits.F ROMS/Modules/mod_diags.F ROMS/Modules/mod_biology.F ROMS/Modules/mod_stepping.F ROMS/Modules/mod_kinds.F ROMS/Modules/mod_bbl.F ROMS/Modules/mod_behavior.F ROMS/Modules/mod_eoscoef.F ROMS/Modules/mod_forces.F ROMS/Modules/mod_average.F ROMS/Modules/mod_nesting.F ROMS/Modules/mod_ncparam.F ROMS/Modules/mod_ocean.F ROMS/Modules/mod_parallel.F ROMS/Modules/mod_sediment.F ROMS/Modules/mod_boundary.F ROMS/Modules/mod_grid.F ROMS/Modules/mod_tides.F ROMS/Modules/mod_strings.F ROMS/Modules/mod_eclight.F ROMS/Modules/mod_arrays.F ROMS/Modules/mod_fourdvar.F ROMS/Modules/mod_scalars.F ROMS/Modules/mod_sources.F ROMS/Modules/mod_storage.F ROMS/Modules/mod_sedbed.F ROMS/Modules/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_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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 -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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/Upwelling/Build/def_var.f90
ROMS/Bin/cpp_clean /home/User/roms/Projects/Upwelling/Build/def_var.f90
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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 -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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/Projects/Upwelling/Build/mod_iounits.f90
ROMS/Bin/cpp_clean /home/User/roms/Projects/Upwelling/Build/mod_iounits.f90
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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 -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -fno-bounds-check mod_kinds.f90
cd /home/User/roms/Projects/Upwelling/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -fno-bounds-check mod_param.f90
cd /home/User/roms/Projects/Upwelling/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -fno-bounds-check mod_iounits.f90
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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_ncparam.F > /home/User/roms/Projects/Upwelling/Build/mod_ncparam.f90
ROMS/Bin/cpp_clean /home/User/roms/Projects/Upwelling/Build/mod_ncparam.f90
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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_biology.F > /home/User/roms/Projects/Upwelling/Build/mod_biology.f90
ROMS/Bin/cpp_clean /home/User/roms/Projects/Upwelling/Build/mod_biology.f90
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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_scalars.F > /home/User/roms/Projects/Upwelling/Build/mod_scalars.f90
ROMS/Bin/cpp_clean /home/User/roms/Projects/Upwelling/Build/mod_scalars.f90
cd /home/User/roms/Projects/Upwelling/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -fno-bounds-check -ffree-form -ffree-line-length-none mod_scalars.f90
cd /home/User/roms/Projects/Upwelling/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -fno-bounds-check -ffree-form -ffree-line-length-none mod_biology.f90
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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_parallel.F > /home/User/roms/Projects/Upwelling/Build/mod_parallel.f90
ROMS/Bin/cpp_clean /home/User/roms/Projects/Upwelling/Build/mod_parallel.f90
/usr/bin/cpp -P -traditional -DMPI -DCYGWIN -DI686 -DGFORTRAN -D'ROOT_DIR="/home/User/roms/trunk"' -DUPWELLING -D'HEADER="upwelling.h"' -D'ROMS_HEADER="/home/User/roms/Projects/Upwelling/upwelling.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/User/roms/Projects/Upwelling"' -D'MY_ANALYTICAL="on"' -D'SVN_REV="824M"' -IROMS/Include -I/home/User/roms/Projects/Upwelling -IROMS/Nonlinear -IROMS/Nonlinear/Biology -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"' -DMY_OS='"CYGWIN"' -DMY_CPU='"i686"' -DMY_FORT='"gfortran"' -DMY_FC='"/usr/bin/mpif90"' -DMY_FFLAGS='"-frepack-arrays -O3 -ffast-math -fno-bounds-check -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none"' ROMS/Modules/mod_strings.F > /home/User/roms/Projects/Upwelling/Build/mod_strings.f90
ROMS/Bin/cpp_clean /home/User/roms/Projects/Upwelling/Build/mod_strings.f90
cd /home/User/roms/Projects/Upwelling/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -fno-bounds-check -ffree-form -ffree-line-length-none -ffree-form -ffree-line-length-none mod_strings.f90
cd /home/User/roms/Projects/Upwelling/Build; /usr/bin/mpif90 -c -frepack-arrays -O3 -ffast-math -fno-bounds-check -ffree-form -ffree-line-length-none mod_parallel.f90
mod_parallel.f90:17: Error: Can't open included file 'mpif.h'
make: *** [ROMS/Modules/Module.mk:15: /home/User/roms/Projects/Upwelling/Build/mod_parallel.o] Error 1

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

Re: Problem with compiling build.bash and netcdf on cygwin

#4 Unread post by kate »

That's weird - /usr/bin/mpif90 is supposed to know how to find mpif.h.

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

Re: Problem with compiling build.bash and netcdf on cygwin

#5 Unread post by hclarke »

I'm not sure either...Here are some specifically dumb questions, so apologies!

1. MY_ROOT_DIR=${HOME}/roms
Is this correct, as the windows path to my roms is C:\cygwin\home\User\roms
The Linux path is User@User-PC ~/roms

2. Should I have: USE_MPI=on and USE_MPIF90=on
OR should they be blank: USE_MPI= and USE_MPIF90=

3. Should the following be uncommented:
export which_MPI=openmpi
export USE_LARGE=on
export USE_NETCDF4=on
export USE_MY_LIBS=on

4. The sticking point!...I have the last few lines of the gfortran block as:

export NC_CONFIG=/usr/local/lib/netcdf-fortran/bin/nf-config
export NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
fi
else
export NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
export NETCDF_LIBDIR=/usr/local/lib

or should they be as originally, given my windows location of nc-config and nf-config as C:/cygwin/bin and the location of the netcdf and netcdf-fortran folders as C:\cygwin\usr\share\doc

export NC_CONFIG=/opt/gfortransoft/serial/netcdf4/bin/nc-config
export NETCDF_INCDIR=/opt/gfortransoft/serial/netcdf4/include
fi
else
export NETCDF_INCDIR=/opt/gfortransoft/serial/netcdf3/include
export NETCDF_LIBDIR=/opt/gfortransoft/serial/netcdf3/lib


Thanks!

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

Re: Problem with compiling build.bash and netcdf on cygwin

#6 Unread post by kate »

Given that I use neither the build script nor CYGWIN, perhaps others can add to this.
hclarke wrote:I'm not sure either...Here are some specifically dumb questions, so apologies!

1. MY_ROOT_DIR=${HOME}/roms
Is this correct, as the windows path to my roms is C:\cygwin\home\User\roms
The Linux path is User@User-PC ~/roms
It seems to be finding your source code, so it's probably right.
2. Should I have: USE_MPI=on and USE_MPIF90=on
OR should they be blank: USE_MPI= and USE_MPIF90=
Both on or off. You could try running in serial mode to get *something* running.
3. Should the following be uncommented:
export which_MPI=openmpi
export USE_LARGE=on
export USE_NETCDF4=on
export USE_MY_LIBS=on
I only have USE_NETCDF4=on.
4. The sticking point!...I have the last few lines of the gfortran block as:

export NC_CONFIG=/usr/local/lib/netcdf-fortran/bin/nf-config
export NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
fi
else
export NETCDF_INCDIR=/usr/local/lib/netcdf-fortran/include
export NETCDF_LIBDIR=/usr/local/lib

or should they be as originally, given my windows location of nc-config and nf-config as C:/cygwin/bin and the location of the netcdf and netcdf-fortran folders as C:\cygwin\usr\share\doc

export NC_CONFIG=/opt/gfortransoft/serial/netcdf4/bin/nc-config
export NETCDF_INCDIR=/opt/gfortransoft/serial/netcdf4/include
fi
else
export NETCDF_INCDIR=/opt/gfortransoft/serial/netcdf3/include
export NETCDF_LIBDIR=/opt/gfortransoft/serial/netcdf3/lib

Thanks!
Are you still stuck on the netcdf?

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

Re: Problem with compiling build.bash and netcdf on cygwin

#7 Unread post by hclarke »

yes, still stuck. Here is the error, and attached build.bash

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 430 times

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

Re: Problem with compiling build.bash and netcdf on cygwin

#8 Unread post by kate »

This is a new problem:
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)
Some part of the build process is looking for an executable named gfortran-4. This command is not in your path. Perhaps you have simply gfortran in your path? The build is doing "which xxx" on the executable it's looking for. My Mac has gfortran:
Kates-MacBook-Pro.local % which gfortran
/usr/local/bin/gfortran
Kates-MacBook-Pro.local % ls /usr/local/bin/gfort*
/usr/local/bin/gfortran@ /usr/local/bin/gfortran-5@
which appears to be a link to gfortran-5. I'm not sure where gofrtran-4 is coming from - it's not in my Compilers directory, nor in my build.bash.

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

Re: Problem with compiling build.bash and netcdf on cygwin

#9 Unread post by hclarke »

Oh, via the instructions in the Tutorial: Installing ROMS in Windows XP / Vista / 7 (via Cygwin), it told me to do this:

Customizing the CYGWIN-gfortran.mk file

Gfortran is part of the 4.x line of the GNU Compiler Collection. Cygwin allows both the 3.x and 4.x versions to be installed at the same time. As a result, the gfortran compiler has the non-standard name of gfortran-4. This means that we have to edit the CYGWIN-gfortran.mk file in the ROMS source.

Open ~roms/trunk/Compilers/CYGWIN-gfortran.mk with your preferred text editor (except Notepad).

Find the line following line:

FC := gfortran
and change it to:
FC := gfortran-4

Save and close the CYGWIN-gfortran.mk file.

I'll change it back!

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Problem with compiling build.bash and netcdf on cygwin

#10 Unread post by m.hadfield »

Oops, that advice in the tutorial is about a decade out of date!

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

Re: Problem with compiling build.bash and netcdf on cygwin

#11 Unread post by hclarke »

Ha ha...bloody hell! No that's fine...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. I now have the oceanS.exe, so success on compiling!

However, 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 MY "Windows" location of varinfo.dat is:

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

Thanks and sorry for being such an old newbie!

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Problem with compiling build.bash and netcdf on cygwin

#12 Unread post by m.hadfield »

The oceanS executable gets the location of the varinfo.dat file from the following line in ocean_upwelling.in

Code: Select all

! Input variable information file name.  This file needs to be processed
! first so all information arrays can be initialized properly.

     VARNAME = ROMS/External/varinfo.dat
Your output log suggests that you are in ~/roms/Projects/Upwelling, so I would it expect it to be looking for ~/roms/Projects/Upwelling/ROMS/External/varinfo.dat, but perhaps you have changed ocean_upwelling.in? Whatever, you need to find a copy of varinfo.dat in the ROMS source tree, optionally copy it somewhere, and make sure ocean_upwelling.in points to it.

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

Re: Problem with compiling build.bash and netcdf on cygwin

#13 Unread post by hclarke »

Hi Kate and m.hadfield

Thanks so much for your help. I was able to compile and run Upwelling, obtaining the output files:

ocean_avg.nc
ocean_dia.nc
ocean_his.nc
ocean_rst.nc

I am now attempting to use ROMS plotting package. I have installed it at: home/User/roms/plot and ran the makefile in home/User/roms/plot/src with the following error:

User@User-PC ~/roms/plot/src
$ make
makefile:31: *** This makefile requires one of GNU make version 3.80 3.81 3.82.. Stop.

Is this correct? I'm sure I installed GNU make when I installed CYGWIN. How can I tell, or isn't the makefile pointing to the correct path for GNU make?

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

Re: Problem with compiling build.bash and netcdf on cygwin

#14 Unread post by hclarke »

Hmmm...I have the GNU make version 4.2.1 Would that be the problem?

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

Re: Problem with compiling build.bash and netcdf on cygwin

#15 Unread post by hclarke »

I put in the line in the makefile:

NEED_VERSION := 3.80 3.81 3.82 4.2.1

Now have this error message:

$ make
/bin/sh: -d: 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
Bin/sfmakedepend -I Include -I Utility --silent --moddir Build_plt Utility/what_flds.F Utility/cntcolor.F Utility/viewport.F Utility/vbackground.F Utility/colram.F Utility/cntint.F Utility/checkstrm.F Utility/vecmag.F Utility/get_rig.F Utility/get_ertel.F Utility/get_dpres.F Utility/get_rvor.F Utility/datestr.F Utility/get_isosur.F Utility/get_hslope.F Utility/ertel.F Utility/filter.F Utility/colorbar.F Utility/get_hdiv.F Utility/areafill.F Utility/cpmpxy2d.F Utility/read_fname.F Utility/gksinit.F Utility/get_ncobs.F Utility/get_pltday.F Utility/spline.F Utility/get_nc2pos.F Utility/cntpack.F Utility/cpmpxz2d.F Utility/inside.F Utility/get_jebar.F Utility/get_nc3dat.F Utility/hindices.F Utility/caldate.F Utility/cnt_frame.F Utility/fldnam2id.F Utility/bv_freq.F Utility/get_nc3pos.F Utility/get_pv.F Utility/xsection.F Utility/splint.F Utility/lenstr.F Utility/xhslice.F Utility/vecpack.F Utility/vvtext.F Utility/dateref.F Utility/setcolpal.F Utility/cvector.F Utility/areamask.F Utility/great_int.F Utility/drawcl.F Utility/maptitles.F Utility/streamlines.F Utility/time_indx.F Utility/get_date.F Utility/draw_line.F Utility/clrbox.F Utility/get_ape.F Utility/get_nc2dat.F Utility/stumxy.F Utility/get_scoor.F Utility/dombox.F Utility/velocity.F Utility/curlz.F Utility/box.F Utility/wind_barbs.F Utility/depth_lab.F Utility/vvumxy.F Utility/get_entropy.F Utility/sec_frame.F Utility/readpar.F Utility/datevec.F Utility/vindices.F Utility/zisopyc.F Utility/svel.F Utility/jebar.F Utility/get_2dfld.F Utility/sec_axis.F Utility/get_pig.F Utility/yearday.F Utility/get_bvf.F Utility/readpal.F Utility/draw_user.F Utility/get_3dfld.F Utility/datenum.F Utility/hbackground.F Utility/landmask.F Utility/ri_number.F Utility/get_wcurl.F Utility/hordiv.F Utility/entropy.F Utility/cfield.F Utility/lintrp.F Utility/get_nc1dat.F Utility/barlab.F Utility/stumsl.F Utility/mskscl.F Utility/dens.F Utility/geodesic_dist.F Utility/crash.F Utility/mskerr.F Utility/mapeod.F Utility/cgrid.F Utility/depth_iso.F Utility/sec_rotvec.F Utility/get_bernoulli.F Utility/day_code.F Utility/slevels.F Utility/bcintrp.F Utility/fdiag.F Utility/bernoulli.F Utility/relvor.F Utility/zgrid.F Utility/opencdf.F Drivers/cnt.F Drivers/fieldid.F Drivers/ccnt.F Drivers/sec.F Drivers/csec.F Drivers/Fnames.F > Build_plt/MakeDepend
/bin/sh: Build_plt/MakeDepend: No such file or directory
makefile:244: /home/User/roms/plot/src/Compilers/CYGWIN-gfortran.mk: No such file or directory
make: *** No rule to make target '/home/User/roms/plot/src/Compilers/CYGWIN-gfortran.mk'. Stop.

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

Re: Problem with compiling build.bash and netcdf on cygwin

#16 Unread post by hclarke »

Can anyone help?

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

Re: Problem with compiling build.bash and netcdf on cygwin

#17 Unread post by kate »

/bin/sh: Build_plt/MakeDepend: No such file or directory
This one I'm not sure about.
makefile:244: /home/User/roms/plot/src/Compilers/CYGWIN-gfortran.mk: No such file or directory
This one is pretty clear. The Compilers directory doesn't have a file for your particular OS-compiler pairing. My very old version of this code has CYGWIN-g95.mk in the Compilers directory. I would copy it to CYGWIN-gfortran.mk and edit it, changing g95 to gfortran globally. Then try again.

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

Re: Problem with compiling build.bash and netcdf on cygwin

#18 Unread post by hclarke »

OK, Thanks!

Otherwise, I'll try to view in Matlab...

Post Reply