Error installing mpi on cygwin

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
antoinemarie

Error installing mpi on cygwin

#1 Unread post by antoinemarie »

Hi roms users,

I want to use the coupling model ROMS-SWAN, so I need to use mpi compiler. But I don't manage to install this compiler. It seems OK when I type $./configure, but when I type $make all install, I have the following errors:


Making all in mca/installdirs/windows
make[2]: Entering directory `/home/AMarie/software/openmpi-1.5.3/opal/mca/instal
ldirs/windows'
CC opal_installdirs_windows.lo
opal_installdirs_windows.c: In function 'installdirs_windows_open':
opal_installdirs_windows.c:72: error: 'HKEY' undeclared (first use in this funct
ion)
opal_installdirs_windows.c:72: error: (Each undeclared identifier is reported on
ly once
opal_installdirs_windows.c:72: error: for each function it appears in.)
opal_installdirs_windows.c:72: error: expected ';' before 'ompi_key'
opal_installdirs_windows.c:82: error: 'ERROR_SUCCESS' undeclared (first use in t
his function)
opal_installdirs_windows.c:82: error: 'HKEY_LOCAL_MACHINE' undeclared (first use
in this function)
opal_installdirs_windows.c:82: error: 'KEY_READ' undeclared (first use in this f
unction)
opal_installdirs_windows.c:82: error: 'ompi_key' undeclared (first use in this f
unction)
opal_installdirs_windows.c:88: error: 'DWORD' undeclared (first use in this func
tion)
opal_installdirs_windows.c:88: error: expected ';' before 'cbData'
opal_installdirs_windows.c:88: error: 'valueLength' undeclared (first use in thi
s function)
opal_installdirs_windows.c:88: error: 'cbData' undeclared (first use in this fun
ction)
opal_installdirs_windows.c:88: error: 'keyType' undeclared (first use in this fu
nction)
opal_installdirs_windows.c:88: error: 'LPBYTE' undeclared (first use in this fun
ction)
opal_installdirs_windows.c:88: error: expected ')' before 'vData'
opal_installdirs_windows.c:88: error: 'REG_EXPAND_SZ' undeclared (first use in t
his function)
opal_installdirs_windows.c:88: error: 'REG_SZ' undeclared (first use in this fun
ction)
opal_installdirs_windows.c:89: error: expected ';' before 'cbData'
opal_installdirs_windows.c:89: error: expected ')' before 'vData'
opal_installdirs_windows.c:90: error: expected ';' before 'cbData'
opal_installdirs_windows.c:90: error: expected ')' before 'vData'
opal_installdirs_windows.c:91: error: expected ';' before 'cbData'
opal_installdirs_windows.c:91: error: expected ')' before 'vData'
opal_installdirs_windows.c:92: error: expected ';' before 'cbData'
opal_installdirs_windows.c:92: error: expected ')' before 'vData'
opal_installdirs_windows.c:93: error: expected ';' before 'cbData'
opal_installdirs_windows.c:93: error: expected ')' before 'vData'
opal_installdirs_windows.c:94: error: expected ';' before 'cbData'
opal_installdirs_windows.c:94: error: expected ')' before 'vData'
opal_installdirs_windows.c:95: error: expected ';' before 'cbData'
opal_installdirs_windows.c:95: error: expected ')' before 'vData'
opal_installdirs_windows.c:96: error: expected ';' before 'cbData'
opal_installdirs_windows.c:96: error: expected ')' before 'vData'
opal_installdirs_windows.c:97: error: expected ';' before 'cbData'
opal_installdirs_windows.c:97: error: expected ')' before 'vData'
opal_installdirs_windows.c:98: error: expected ';' before 'cbData'
opal_installdirs_windows.c:98: error: expected ')' before 'vData'
opal_installdirs_windows.c:99: error: expected ';' before 'cbData'
opal_installdirs_windows.c:99: error: expected ')' before 'vData'
opal_installdirs_windows.c:100: error: expected ';' before 'cbData'
opal_installdirs_windows.c:100: error: expected ')' before 'vData'
opal_installdirs_windows.c:101: error: expected ';' before 'cbData'
opal_installdirs_windows.c:101: error: expected ')' before 'vData'
opal_installdirs_windows.c:102: error: expected ';' before 'cbData'
opal_installdirs_windows.c:102: error: expected ')' before 'vData'
opal_installdirs_windows.c:103: error: expected ';' before 'cbData'
opal_installdirs_windows.c:103: error: expected ')' before 'vData'
opal_installdirs_windows.c:104: error: expected ';' before 'cbData'
opal_installdirs_windows.c:104: error: expected ')' before 'vData'
make[2]: *** [opal_installdirs_windows.lo] Error 1
make[2]: Leaving directory `/home/AMarie/software/openmpi-1.5.3/opal/mca/install
dirs/windows'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/AMarie/software/openmpi-1.5.3/opal'
make: *** [all-recursive] Error 1



So, if someone knows how to solve this problem, please help me.

Thanks in advance.

Antoine

simion1232006
Posts: 60
Joined: Tue Sep 29, 2009 3:50 pm
Location: School of Environment System Engineering,UWA

Re: Error installing mpi on cygwin

#2 Unread post by simion1232006 »

I tried to use cygwin long time ago and found it is really tricky and also not efficient to run.
I have a suggestion you can install a software called virtulbox, and install a ubuntu OS in the virtualbox.
Then you can run this linux system within the virtualbox under you host computer. All the other setting are exactly the
same as on linux. I use mpich2 with 4 core on my i7 cpu and it is very fast with no problem. this is suitable for small testing case
and debugging.
Overall it is much better than cygwin as you can define the number of core and memory in the virtualbox.Also as along as you set up the system, you can copy it to other people and they can use it without repeating the setting.
Good luck.

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

Re: Error installing mpi on cygwin

#3 Unread post by m.hadfield »

I use Cygwin on my Windows desktop PC a lot and am happy with it, within limits. It's my preferred platform for testing, because I control it, I have fast access to local files and I can manage & edit files with Windows tools that I like. I do the serious work on Unix hosts.

I have not had much luck with MPI under Cygwin. It was working for a while, but now it's broken. This is not surprising as Cygwin's support for some Unix process-management features is somewhat broken.

So, my advice as a Cygwin user: use Linux.

simion1232006
Posts: 60
Joined: Tue Sep 29, 2009 3:50 pm
Location: School of Environment System Engineering,UWA

Re: Error installing mpi on cygwin

#4 Unread post by simion1232006 »

I agree with that. As long as you do not bother the multi processors, cygwin is enough to use. Virtualbox things is actually running a real linux system within window . So if you have a workstation with more than 8 core. you definitely can run the real simulation.
Another thing: I am ubuntu fan~~~ :lol:

antoinemarie

Re: Error installing mpi on cygwin

#5 Unread post by antoinemarie »

Thanks for replying.

I have installed virtualbox. If I understand, now I need CD of UBUNTU installation?
Is it free? And is there an other way that the CD to install UBUNTU?

simion1232006
Posts: 60
Joined: Tue Sep 29, 2009 3:50 pm
Location: School of Environment System Engineering,UWA

Re: Error installing mpi on cygwin

#6 Unread post by simion1232006 »

Download it from the official website ,then use virtualbox to install it.You do not need a real CD, a ISO file is fine.
See this: http://www.ubuntu.com/download. Also Linux system is free of charge. 8)

antoinemarie

Re: Error installing mpi on cygwin

#7 Unread post by antoinemarie »

It's OK I have Ubuntu!!

Now, I have some problem, when I try to compile build.bash for the first time I have the following error:

/bin/sh: -c: not found
make: *** [/home/antoine/Projects/Upwelling/Build/mod_kinds.o] Erreur 127


I have checked in /bin, and sh exists, so I don't understand why I have this error.

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

Re: Error installing mpi on cygwin

#8 Unread post by m.hadfield »

antoinemarie wrote:It's OK I have Ubuntu!!

Now, I have some problem, when I try to compile build.bash for the first time I have the following error:

/bin/sh: -c: not found
make: *** [/home/antoine/Projects/Upwelling/Build/mod_kinds.o] Erreur 127


I have checked in /bin, and sh exists, so I don't understand why I have this error.
It's not /bin/sh that is not being found, it's the command that /bin/sh was called (by make) to invoke. Given that the target that make is attempting to build is mod_kinds.o, it must be your Fortran compiler. What compiler are you trying to use? Gfortran? It's part of the GCC system but the Ubuntu installation program may not have installed it by default.

Or perhaps it's something else entirely. This advice is worth every cent you paid for it. :wink:

PS: And, of course, you'll need netCDF, including the Fortran 90 interface, built with your Fortran compiler.

simion1232006
Posts: 60
Joined: Tue Sep 29, 2009 3:50 pm
Location: School of Environment System Engineering,UWA

Re: Error installing mpi on cygwin

#9 Unread post by simion1232006 »

You need install gfortran gcc g++ first in ubuntu using synaptic package manager(fantastic feature in ubuntu).
Then you probably need to install netcdf and mpich2 library. For this part you really need to figure it out by yourself
as it is worth a exploration. Be careful about the flag as all the library need to be installed with the same compiler and
to fit different machine .

For mpich2, if you use shared memory machine you might need this setting (I also got help from other good guys)

1. Download MPICH2, unzip, ... on your desktop PC


2. if you run ./configure, you have to pass two additional arguments
they are:


./configure ... --with-device=ch3:shm --with-pm=gforker ...


the --with-device=ch3:shm option tells MPI to run on a shared
memory system
the --with-pm=gforker option is a simple process manager that
runs on single nodes


3. after make and make install, everything is done


4. put the /mpich_install_dir/bin /lib /include into your PATH, if
not done


I hope this would help.Good luck.

Post Reply