MPI and MrBayes

Hi there,
ive been trailing through this forum and many other looking for a guide to compiling an MPI version of MrBayes on a dual quad core Mac Pro.
I have tried to install Lam/mpi; MPICH and OpenMPI. lam seem to be the only one i could installl however when i went to compile mrbayes with MPI=yes, i get errors about undefined terms (or something) all in reference to lam_mpi.
I new to compiling programs and any advise would be grateful.
should i be using OpenMPI? how do i use it to compile mrBayes
Thanks for any help you can offer

Pete

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi Pete, Can you post the

Hi Pete,
Can you post the errors you get?
I've compiled mrbayes on my mac (10.6.2) and it builds out of the box (as openmpi is included in standard OS X distribution).

d

PS
Don't forget to apply the patch for 64 bit support listed here:

http://sites.google.com/site/davidecittaro/patches

as it has not yet included in standard distribution:

d

/*
Davide Cittaro
NGS data analysis

IFOM - Istituto FIRC di Oncologia Molecolare
via adamello, 16
20139 Milano
Italy
*/

Tried with openmpi....

Hi Davide
thank you for your quick reply.
i didnt know that openmpi came with snowleopard.
I started from scratch again, just downloaded a fresh copy of mrbayes and configured it with --enable-mpi, which was fine:
petermacpro:mrbayes petercowman$ ./configure --enable-mpi
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for exp in -lm... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for mpicc... yes
checking for readline in -lreadline... yes
checking for rl_completion_matches function... yes
checking for 32 or 64 bits cpu... 64
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h

then when i use make, got this error (first time ive seen this one):

petermacpro:mrbayes petercowman$ make
mpicc -O3 -ffast-math -Wall -DNDEBUG -DUSECONFIG_H -c -o bayes.o bayes.c
In file included from mb.h:84,
from bayes.c:43:
/usr/local/include/mpi.h:439: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ARGS’
/usr/local/include/mpi.h:441: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ARGS’
/usr/local/include/mpi.h:443: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ARGS’
....
....
/usr/local/include/mpi.h:1095: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ARGS’
/usr/local/include/mpi.h:1096: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ARGS’
bayes.c: In function ‘main’:
bayes.c:184: warning: implicit declaration of function ‘MPI_Init’
bayes.c:190: warning: implicit declaration of function ‘MPI_Comm_size’
bayes.c:196: warning: implicit declaration of function ‘MPI_Comm_rank’
bayes.c:224: warning: implicit declaration of function ‘MPI_Finalize’
bayes.c: In function ‘CommandLine’:
bayes.c:311: warning: implicit declaration of function ‘MPI_Bcast’
bayes.c:371: warning: implicit declaration of function ‘MPI_Barrier’
make: *** [bayes.o] Error 1
petermacpro:mrbayes petercowman$

I have just downloaded the patch you posted, but not sure what to do with it. will this solve the error or is there something else going wrong.
thanks for your help

Pete