Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] openmpi-1.9a1r27674 on Cygwin-1.7.17
From: Siegmar Gross (Siegmar.Gross_at_[hidden])
Date: 2012-12-18 03:04:00


I tried to install openmpi-1.9a1r27674 on Cygwin-1.7.17 and
got the following error (gcc-4.5.3).

  CC path.lo
../../../openmpi-1.9a1r27668/opal/util/path.c: In function
../../../openmpi-1.9a1r27668/opal/util/path.c:578:18: error:
  'buf' undeclared (first use in this function)
../../../openmpi-1.9a1r27668/opal/util/path.c:578:18: note:
  each undeclared identifier is reported only once for each
  function it appears in
Makefile:1669: recipe for target `path.lo' failed
make[3]: *** [path.lo] Error 1

The reason is that "buf" is only declared for some operating
systems. I added "defined(__CYGWIN__)" in some places and
was able to compile "path.c".

hermes util 41 diff path.c path.c.orig
< #elif defined(__linux__) || defined(__CYGWIN__) ||
  defined (__BSD) || (defined(__APPLE__) && defined(__MACH__))

> #elif defined(__linux__) || defined (__BSD) ||
  (defined(__APPLE__) && defined(__MACH__))
< #elif defined(__linux__) || defined(__CYGWIN__) ||
  defined (__BSD) || (defined(__APPLE__) && defined(__MACH__))
> #elif defined(__linux__) || defined (__BSD) ||
  (defined(__APPLE__) && defined(__MACH__))
< #elif defined(__linux__) || defined(__CYGWIN__)
> #elif defined(__linux__)
< #elif defined(__linux__) || defined(__CYGWIN__) ||
  defined (__BSD) || \
> #elif defined(__linux__) || defined (__BSD) ||            \
< #elif defined(__linux__) || defined (__CYGWIN__) ||
  defined (__BSD) ||       \
> #elif defined(__linux__) || defined (__BSD) ||            \
hermes util 42 
Searching for "__linux__" delivered some more files which
must possibly be adapted.
I assume that the following files do not need any changes
because they are special for Linux or for features which
are not important/available for Cygwin.
configure:    { $as_echo "$as_me:${as_lineno-$LINENO}:
  checking __linux__" >&5
configure:$as_echo_n "checking __linux__... " >&6; }
configure:#ifndef __linux__
configure:      error: this isnt __linux__
opal/asm/base/MIPS.asm:#ifdef __linux__
opal/asm/generated/atomic-mips64el.s:#ifdef __linux__
opal/asm/generated/atomic-mips64-linux.s:#ifdef __linux__
opal/asm/generated/atomic-mips-irix.s:#ifdef __linux__
opal/asm/generated/atomic-mips-linux.s:#ifdef __linux__
ompi/mca/common/verbs/common_verbs_basics.c:#if defined(__linux__)
opal/include/opal/sys/cma.h:#ifdef __linux__
opal/mca/memory/linux/arena.c:#ifdef __linux__
ompi/mca/io/romio/romio/configure:        #ifdef __linux__
ompi/mca/io/romio/romio/        #ifdef __linux__
opal/include/opal/sys/mips/atomic.h:#ifdef __linux__
opal/include/opal/sys/mips/atomic.h:#ifdef __linux__
opal/include/opal/sys/mips/atomic.h:#ifdef __linux__
opal/mca/event/libevent2019/libevent/arc4random.c:#ifdef __linux__
ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre.h:#ifdef __linux__
ompi/mca/io/romio/romio/adio/ad_lustre/ad_lustre.h:#endif /* __linux__ */
Can somebody add __Cygwin__ to all necessary files? Now I get
the following error.
Making all in mca/if/windows
make[2]: Entering directory
  CC       opal_if_windows.lo
  In function 'if_windows_open':
  error: 'SOCKET' undeclared (first use in this function)
  note: each undeclared identifier is reported only once for each function
  it appears in
Is it necessary to use windows sockets directly or is it possible
to use something similar to Linux sockets? Cygwin supports sockets
(based on Windows sockets as far as I know) and very often uses
similar interfaces as Linux. Which file is responsible for the
selection of "opal_if_windows.c"?
I added the following constants to /usr/include/cygwin/shm.h before
I started to build openmpi-1.9a1r27674.
diff /usr/include/cygwin/shm.h /usr/include/cygwin/shm.h.orig
< /* Permission definitions                   */
< #define SHM_R   0400    /* read permission  */
< #define SHM_W   0200    /* write permission */
I used the following commands to configure Open MPI.
"/usr/local/jdk1.7.0" is a link to my Java installation
on Windows 7.
cd /usr/local
ln -s /cygdrive/c/Program\ Files\ \(x86\)/jdk1.7.0 jdk1.7.0
../openmpi-1.9a1r27674/configure --prefix=/usr/local/openmpi-1.9 \
  --with-jdk-bindir=/usr/local/jdk1.7.0/bin \
  --with-jdk-headers=/usr/local/jdk1.7.0/include \
  JAVA_HOME=/usr/local/jdk1.7.0 \
  LDFLAGS="-m32 -Wl,--export-all-symbols -no-undefined" \
  CC="gcc" CXX="g++" FC="gfortran" \
  CFLAGS="-m32" CXXFLAGS="-m32" FCFLAGS="-m32" \
  CPP="cpp" CXXCPP="cpp" \
  --enable-cxx-exceptions \
  --enable-mpi-java \
  --enable-heterogeneous \
  --enable-opal-multi-threads \
  --enable-mpi-thread-multiple \
  --with-threads=posix \
  --with-hwloc=internal \
  --without-verbs \
  --without-udapl \
  --without-sctp \
  --with-wrapper-cflags=-m32 \
  --enable-debug \
  --disable-mca-dso \
  --without-cs-fs \
  --enable-contrib-no-build=vt,libompitrace \
  --enable-mca-no-build=memory_mallopt,paffinity,installdirs-windows,timer-windows \
  |& tee log.configure.$SYSTEM_ENV.$MACHINE_ENV
It would be great, if I could get a working Open MPI version with
Java interface on Cygwin. Thank you very much for any help in advance.
Kind regards