Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Compile MPI version on Mac OS X (Read 1582 times)
luobin
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 6
Gender: male
Compile MPI version on Mac OS X
Oct 28th, 2005 at 9:04am
 
HYPHY is great!

I had small problems while compiling HYPHY 0.99beta version on Mac OS X. Even though I made it compile by changing the build.sh file, it will be great if the downloaded build.sh script can handle the problem automatically.

If I type ./build.sh MPI , the first problem the compiler complains is that it can not find mpi.h . By the way, the executable bit is not set for build.sh.

I tried several ways to fix this problem, some of them didn't work:
1. Change COMPILER to mpicxx instead of using the default gcc,g++. CPP files compile fine. Btree.c under SQLite directory doesn't compile because of the forward definition of the following two variables:
static BtOps sqliteBtreeOps;
static BtCursorOps sqliteBtreeCursorOps;

2. Compile CPP files with mpicxx and compile c files under SQLite using mpicc. It doesn't link correctly.

The worked way is:
3. Add an include path "-I/usr/local/mpich-1.2.6/ch_p4/include" to the compiler flags and library path "-L/usr/local/mpich-1.2.6/ch_p4/lib" to the COMPILER_LINKER_FLAGS, and "-lpmpich" to the LINK_FLAGS.

Thanks,
Luobin
Back to top
 
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Compile MPI version on Mac OS X
Reply #1 - Oct 28th, 2005 at 9:30am
 
Dear Luobin,

Thanks for your feedback. The build.sh script is definitely very simple and doesn't handle much more than the typical install. I never actually tried to compile the mpich version under OS X, so these error reports are quite useful.

1). The execute mode on build.sh is not set inentionally; quite a few people do not add ./ to their $PATH variable, so it may be easier to type $sh build.sh from the prompt.

2). I am not sure why mpicc complains about btree.c (gcc doesn't)

3). The problems with link paths and include paths could be addressed by adding mpi paths to systemwide gcc (mpicc) search paths (e.g. LD_LIBRARY_PATH)

Cheers,
Sergei


Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged