[Pympi-users] Re: pyMPI problem
Status: Alpha
Brought to you by:
patmiller
From: Nils W. <nw...@me...> - 2004-12-09 16:04:42
|
Patrick Miller wrote: >Short answer: Try % env CC=mpicc ./configure > >Often, the simplest way to get pyMPI to work is to find the right >version of mpicc. MPICH and LAM and other MPI libraries often >define this script as a way to simplify the often complex set of >library and include files needed to link. > >The name is typically something like mpicc mpcc mpigcc mpiicc or >you can use a MPI C++ compiler like mpiCC mpiiCC. > >First use this test program to make sure it works right... > >% cat test.c >#include <mpi.h> >#include <stdio.h> > >int main(int argc, char** argv) { > int rank; > MPI_Init(&argc,&argv); > MPI_Comm_rank(MPI_COMM_WORLD,&rank); > printf("I am rank %d\n",rank); > MPI_Finalize(); > return 0; >} > >% mpicc test.c >% mpirun -np 4 a.out >I am rank 3 >I am rank 1 >I am rank 0 >I am rank 2 > >Once you have verified a working MPI C compiler, just tell >the configure script. An easy way to do that is to set >an environment variable. > >% env CC=mpicc ./configure --prefix=$HOME/pub > >Cheers, > >Pat > > > > > > Your test works fine for me /home/nwagner> mpicc mpi_test.c /home/nwagner> mpirun -np 2 a.out Password: I am rank 0 I am rank 1 /home/nwagner> but /home/nwagner> mpirun -v -np 2 pyMPI running /home/nwagner/pyMPI on 2 LINUX ch_p4 processors Created /home/nwagner/PI29497 Password: Python 2.3+ (pyMPI 2.0b0) on linux2 Type "help", "copyright", "credits" or "license" for more information. get stuck without a prompt. For what reason ?? Nils |