recompile with -fPIC

Paul Van Allsburg vanallsburg at hope.edu
Tue Aug 7 11:28:16 EDT 2007


Chris Samuel wrote:

>On Thu, 2 Aug 2007, Paul Van Allsburg wrote:
>
>  
>
>>I know this problem does not directly relate to mpiexec so please forgive
>>the posting intrusion, but if anyone can suggest how I can solve this issue
>>I'd be grateful!
>>    
>>
>
>I don't have a clue I'm afraid, but you may get an answer via the Beowulf list 
>at:  http://www.beowulf.org/mailman/listinfo/beowulf
>
>There's a bunch of very smart folks on there (not that the people here 
>aren't!) who may well have stumbled over this before.
>
>cheers!
>Chris
>  
>
Success! Just a final note to close this thread-
I found the problem in an earlier install(2006) of lam-mpi had placed 
mpi.h files in /usr/include that caused the Parallel::MPI install script 
to fail.  I changed a few lines in Makefile.PL for parallel:MPI from:
$MPIDIR = "/usr/local/mpich/include";
foreach (qw(/usr/mpich/include /usr/local/mpich/include
           /usr/include/mpi /usr/local/include/mpi
           /usr/lib/mpich/include /usr/local/lib/mpich/include))
to:
$MPIDIR = "/usr/local/mpich/include";
foreach (qw(/usr/local/mpich/include))

In brief- I did this:

- INSTALL MPICH
  get MPICH current release (1.2.7p1)  from 
http://www-unix.mcs.anl.gov/mpi/mpich1/download.html

wget http://www-unix.mcs.anl.gov/mpi/mpich1/downloads/mpich.tar.gz
gunzip mpich.tar.gz
tar -xf mpich.tar
cd /home/vanallp/mpich-1.2.7p1
make clean

CFLAGS="-fPIC";export CFLAGS
./configure --with-device=ch_p4 --prefix=/usr/local/mpich 
--enable-sharedlib | tee config.out
make  | tee make.out
su - root
cd /home/vanallp/mpich-1.2.7p1
make install  |  tee make-install.out

- now get the correct mpicc in my path

PATH="/usr/local/mpich/bin:$PATH";export PATH

- INSTALL MPIEXEC

PATH="/usr/local/mpich/bin:$PATH";export PATH
wget http://www.osc.edu/%7Epw/mpiexec/mpiexec-0.82.tgz
gunzip  mpiexec-0.82.tgz
tar -xf  mpiexec-0.82.tar
cd /home/vanallp/mpiexec-0.82
make clean
rm test*
CFLAGS="-fPIC";export CFLAGS
./configure --with-pbs=/usr/local --with-default-comm=mpich-p4  
--disable-p4-shmem --prefix=/usr/local/osc | tee config.out
make  | tee make.out
make hello   | tee make-hello.out
./runtests.pl
su - root
cd /home/vanallp/mpiexec-0.82
make install  | tee make-install.out

- TESTING  Parallel - Mendelbrot - Master / Slave:
   test mpich & mpiexec with an example in c

cp -R /usr/local/lam-7.1.3/examples/mandelbrot .
cd  mandelbrot
mpicc -o master master.c
mpicc -o slave slave.c

 - my PBS ms.sh script:

#!/bin/sh
#PBS -N ms
#PBS -l nodes=4
#PBS -j oe
PATH="/usr/local/mpich/bin:$PATH";export PATH
alias mpiexec='/usr/local/osc/bin/mpiexec -verbose'
mpiexec -config /home/vanallp/mpi/mpich/ms.config


  - my mpiexec config file: ms.config
-n 1   : /home/vanallp/mpi/mpich/mandelbrot/master
curie* : /home/vanallp/mpi/mpich/mandelbrot/slave

- submit job to cluster:
qsub ms.sh
produces --> /home/vanallp/mandel.out   Sun rasterfile formatted file. 
Try viewing it with eog or xloadimage:

start Xming or CygwinXsvr on windows desktop,
$ eog
$ xloadimage mandel.out


- INSTALL Perl Parallel::MPI module

wget 
http://search.cpan.org/CPAN/authors/id/J/JO/JOSH/Parallel-MPI-0.03.tar.gz
tar -zxf Parallel-MPI-0.03.tar.gz
cd Parallel-MPI-0.03
perl Makecurie.PL | tee makecurie.out  <-THIS IS THE MODIFIED Makefile.PL
make  |  tee make.out
make test | tee make-test.out
su - root
cd /home/vanallp/Parallel-MPI-0.03
make install | tee make-install.out

I also came across a perl parallel example for this specific port by 
Josh Wilmes and Chris Stevens,
https://bioinformatics.ccr.buffalo.edu/workshop/bioinformatics/Powerpoint/All/Intro_MPI.ppt 

that runs successfully.

Thanks!


-- 
Paul Van Allsburg       
Computational Science & Modeling Facilitator
Natural Sciences Division,  Hope College
35 East 12th Street
Holland, Michigan 49423
616-395-7292 
http://www.hope.edu/academic/csm/




More information about the mpiexec mailing list