Cygwin with 2 processors

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
drewa
Posts: 35
Joined: Mon Dec 17, 2007 5:34 pm
Location: SCCWRP, Costa Mesa, CA

Cygwin with 2 processors

#1 Unread post by drewa »

I can't seem to get ROMS run on both processors. It successfully runs on one but I want to use both. I've tried compiling and running both the INLET_TEST and UPWELLING test case with different results.

To compile, I'm using the bash script and have set the parallel flag to 1 in the file. I compile using ./build.bash -j 2

The UPWELLING case will compile but INLET_TEST won't. The error message I get for the INLET_TEST case is:

cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include set_ngfldr.f90
cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include set_weights.f90
cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include wrt_diags.f90
cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include wrt_floats.f90
cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include wrt_hessian.f90
cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include wrt_rst.f90
cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include mod_nesting.f90
cd /ROMS/Projects/inlet_test/Build; g95 -c -fno-second-underscore -O2 -O3 -ffast-math -I/usr/local/mct/include -ffree-form -ffixed-form swmod2.f90
Error: Can't open included file 'mpif.h'
make: *** [/ROMS/Projects/inlet_test/Build/swmod2.o] Error 1
make: *** Waiting for unfinished jobs....

I modified these lined in CYGWIN-g95.mk to try and direct things to MPIF.H

ifdef USE_ARPACK
ifdef USE_MPI
# PARPACK_LIBDIR ?= /usr/local/lib
PARPACK_LIBDIR ?= /ROMS/Lib/ARPACK/PARPACK/EXAMPLES/MPI
LIBS += -L$(PARPACK_LIBDIR) -lparpack
endif
# ARPACK_LIBDIR ?= /usr/local/lib
ARPACK_LIBDIR ?= /ROMS/Lib/ARPACK/PARPACK/EXAMPLES/MPI
LIBS += -L$(ARPACK_LIBDIR) -larpack
endif



when I try to run the compiled UPWELLING, I get:

$ mpirun -np 2 ./oceanM External/ocean_upwelling.in
Process Information:

Process Information:

Thread # 0 (pid= 0) is active.

Model Input Parameters: ROMS/TOMS version 3.0
Tuesday - May 13, 2008 - 2:48:15 PM
-----------------------------------------------------------------------------
Thread # 0 (pid= 0) is active.

Model Input Parameters: ROMS/TOMS version 3.0
Tuesday - May 13, 2008 - 2:48:15 PM
-----------------------------------------------------------------------------

READ_PhyPar - Error while processing line:


Things hang up at that point. A bit more detailed output is:

$ mpirun -np 2 ./oceanM External/ocean_upwelling.in &
[2] 5392

drewa@Drew_Dell /roms/projects/ocean_upwelling
$ mpiexec_Drew_Dell (handle_stdin_input 1067): stdin problem; if pgm is run in background, redirect from /dev/null
mpiexec_Drew_Dell (handle_stdin_input 1068): e.g.: mpiexec -n 4 a.out < /dev/null &
Process Information:

Thread # 0 (pid= 0) is active.

Model Input Parameters: ROMS/TOMS version 3.0
Tuesday - May 13, 2008 - 2:53:17 PM
-----------------------------------------------------------------------------
Process Information:

Thread # 0 (pid= 0) is active.

Model Input Parameters: ROMS/TOMS version 3.0
Tuesday - May 13, 2008 - 2:53:17 PM
-----------------------------------------------------------------------------

READ_PhyPar - Error while processing line:

mpiexec_Drew_Dell (handle_stdin_input 1067): stdin problem; if pgm is run in background, redirect from /dev/null
mpiexec_Drew_Dell (handle_stdin_input 1068): e.g.: mpiexec -n 4 a.out < /dev/null &
mpiexec_Drew_Dell (handle_stdin_input 1067): stdin problem; if pgm is run in background, redirect from /dev/null
mpiexec_Drew_Dell (handle_stdin_input 1068): e.g.: mpiexec -n 4 a.out < /dev/null &


I'm at a loss as to where to look to get things running right.

Thanks for the help
drew

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

#2 Unread post by kate »

Do you know that a simple "hello, world" sort of MPI program runs?

drewa
Posts: 35
Joined: Mon Dec 17, 2007 5:34 pm
Location: SCCWRP, Costa Mesa, CA

#3 Unread post by drewa »

I thought I was good to go with the install but I'll look into it more. Thanks

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

#4 Unread post by m.hadfield »

As far as I know, ROMS with Cygwin g95 has not yet been adapted to support MPI (though I expect it could be, so if you get it working, please contribute the source to the trunk).

Another option for ROMS parallelisation with Cygwin is Gfortran with OpenMP. I have tested this option: the executable builds OK and sometimes runs OK, but other times it hangs for no obvious reason.

Post Reply