[mpich-discuss] mpich2-1.2.1 on Cygwin/Vista
Jayesh Krishna
jayesh at mcs.anl.gov
Mon Jan 4 10:12:36 CST 2010
Hi,
Let me take a look at this and get back to you.
Meanwhile, if you are planning to work with C/C++ MPI programs (not fortran MPI programs) you can install MPICH2 on windows and use the gcc libs (you can even compile/link directly with the windows mpi libraries with gcc) provided with the installation.
(PS: To install MPICH2 on Vista/windows_7 type "msiexec /i mpich2-1.2.1-win-ia32.msi" from an administrator command prompt. Right-click on the command prompt icon and select "Run as administrator" to run a command prompt with admin privileges. Similarly to uninstall MPICH2 type "msiexec /x mpich2-1.2.1-win-ia32.msi".)
Regards,
Jayesh
----- Original Message -----
From: "gustav" <gustav at indiana.edu>
To: mpich-discuss at mcs.anl.gov
Sent: Thursday, December 24, 2009 7:54:06 AM GMT -06:00 US/Canada Central
Subject: [mpich-discuss] mpich2-1.2.1 on Cygwin/Vista
Well, it works. Finally. But with one little snag--see below.
System: Windows Longhorn/Vista (not yet supported!) Ver 6.0 Build 6002 Service Pack 2
uname: CYGWIN_NT-6.0-WOW64 Crawley 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
CPU: AMD Phenom X4 9550
gcc: gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
MPI: mpich2-1.2.1
config: ./configure --prefix=/home/gustav/mpich2-1.2.1 --disable-sharedlibs --enable-timer-type=gettimeofday --with-device=ch3:ssm --with-thread-package=pthreads
An important step that must be emphasized for Cygwin users is that to
enable XSI IPCs (this activates shared memory too) Cygserver must be
run on the machine. See /usr/share/doc/Cygwin/cygserver.README for
more info. Also, the CYGWIN environmental variable must be set to
"server". This is described in the doc, as well.
With all this done and MPI compiled and installed, it works for a user
with admin privileges. Here's a brief demo:
root at Crawley 515 # echo $CYGWIN
server
root at Crawley 516 # which mpdboot
/home/gustav/mpich2-1.2.1/bin/mpdboot
root at Crawley 517 # mpdboot --ncpus=4 --verbose
running mpdallexit on Crawley
LAUNCHED mpd on Crawley via
RUNNING: mpd on Crawley
root at Crawley 518 # mpirun -np 4 hostname
Crawley
Crawley
Crawley
Crawley
root at Crawley 519 # mpirun -np 4 /home/gustav/src/MPI-tests/hellow2.exe
Crawley: hello world from process 0 of 4
Crawley: hello world from process 1 of 4
Crawley: hello world from process 2 of 4
Crawley: hello world from process 3 of 4
root at Crawley 520 # mpdallexit
root at Crawley 521 #
Alas, there is a little snag. User "root" has admin privileges. User
"gustav" does not. And here is what happens when this hapless
individual attempts the same:
gustav at Crawley 556 $ echo $CYGWIN
server
gustav at Crawley 557 $ mpdboot --ncpus=4 --verbose
running mpdallexit on Crawley
LAUNCHED mpd on Crawley via
RUNNING: mpd on Crawley
gustav at Crawley 558 $ mpirun -np 4 hostname
Crawley
Crawley
Crawley
Crawley
gustav at Crawley 559 $ mpirun -np 4 /home/gustav/src/MPI-tests/hellow2.exe
Assertion failed in file mpidi_pg.c at line 277: ((pg)->ref_count) == 0
internal ABORT - process 0
[cli_0]: aborting job:
internal ABORT - process 0
rank 0 in job 2 Crawley_50796 caused collective abort of all ranks
exit status of rank 0: killed by signal 9
gustav at Crawley 560 $ mpdallexit
gustav at Crawley 561 $
On the other hand, this little non-MPI program that tests shared memory
stuff still works for the non-admin user:
gustav at Crawley 563 $ cat shm.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int main(int argc, char *argv[])
{
int shmid;
if((shmid = shmget(IPC_PRIVATE, 1, IPC_CREAT)) == -1){
perror("shmget");
}
shmctl(shmid, IPC_RMID, NULL);
}
gustav at Crawley 564 $ cc -o shm shm.c
gustav at Crawley 565 $ ./shm
gustav at Crawley 566 $ echo $?
0
gustav at Crawley 567 $
Question: Why can't the non-admin user execute the MPI program?
Greetings to all,
--
Zdzislaw (Gustav) Meglicki, Office of the Vice President for Information
Technology, Indiana University, 601 E. Kirkwood Ave., Room 116,
Bloomington, IN 47405-1223, USA, http://perth.ovpit.indiana.edu/gustav,
Ph: 812-856-5597 (o), 812-345-3284 (m), Fax: 812-855-3310/812-856-3147,
_______________________________________________
mpich-discuss mailing list
mpich-discuss at mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
More information about the mpich-discuss
mailing list