Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
i can't compile the mpi version (Read 3434 times)
cd
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 1
i can't compile the mpi version
Nov 29th, 2007 at 5:07pm
 
hi there,

i can't compile the mpi version on a computer with 8-cores. any comments or helps are appreciated informations follow -

[root@pcii HYPHY_MPI]# uname -a
Linux pcii.ioz.ac.cn 2.6.9-55.0.12.ELsmp #1 SMP Fri Nov 2 12:38:56 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

[root@pcii HYPHY_MPI]# ./gtk_build.sh MPI
Linux
Checking for curl
./gtk_build.sh: line 31: mpicc++: command not found
Curl seems to be absent (setting up compiler options skip CURL code)
+-----------------------------------------------------------+
|Building a single-threaded HYPHYKernelMPI for MPI          |
+-----------------------------------------------------------+
COMPILER=mpicc++, gcc
COMPILER_FLAGS= -w -c -O3 -fsigned-char -fpermissive -I/home/members/Desktop/hyphy/HYPHY_MPI/GUI -I/home/members/Desktop/hyphy/HYPHY_MPI/Source -I/home/members/Desktop/hyphy/HYPHY_MPI/Source/SQLite -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include    -D GDK_PIXBUF_ENABLE_BACKEND -D SQLITE_PTR_SIZE=sizeof(long) -D __HYPHY_GTK__  -D__HYPHY_NO_CURL__ -D __HYPHYMPI__
Building baseobj.cpp
./gtk_build.sh: line 158: mpicc++: command not found
Error during compilation
[root@pcii HYPHY_MPI]# locate mpicc++
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database.
Please have a look at /etc/updatedb.conf to enable the daily cron job.
[root@pcii HYPHY_MPI]# which mpicc
/usr/local/bin/mpicc
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: i can't compile the mpi version
Reply #1 - Nov 30th, 2007 at 9:12pm
 
Greetings,

You may want to try editing the build.sh file (the MPI branch) to use g++ with -mpich (or whatever is appropriate for your MPI build) passed in as linker flags. Our stock build script is very simple and is known to work only on MPICH builds. Also, the MPI/GTK version of HyPhy is experimental and buggy, so I would recommend sticking to the MP2 option for gtk_build.sh and using MPI only with the build.sh script.

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
 
daniel
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 2
Re: i can't compile the mpi version
Reply #2 - Dec 19th, 2007 at 2:20am
 
I got another problem compiling HYPHY (1.00beta) with mpich2-1.0.6p1:
Code:
daniel@daniel-desktop:~/sources/test/HYPHY_Source$ bash build.sh MPI
Linux
Checking for curl
curl_check.cpp:1:23: error: curl/curl.h: No such file or directory
Curl seems to be absent (setting up compiler options skip CURL code)
+-----------------------------------------------------------+
|Building a single-threaded HYPHYKernelMPI for MPI	    |
+-----------------------------------------------------------+
COMPILER=mpicc, mpicxx
COMPILER_FLAGS= -w -c -fsigned-char -O3 -fpermissive -I/home/daniel/sources/test/HYPHY_Source/Source -I/home/daniel/sources/test/HYPHY_Source/Source/SQLite -D SQLITE_PTR_SIZE=sizeof(char*) -D __UNIX__  -D__HYPHY_NO_CURL__ -D __HYPHYMPI__
Building baseobj.cpp
In file included from /usr/local/include/mpi.h:1110,
		     from batchlan.h:361,
		     from baseobj.cpp:34:
/usr/local/include/mpicxx.h:26:2: error: #error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
/usr/local/include/mpicxx.h:30:2: error: #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI"
/usr/local/include/mpicxx.h:35:2: error: #error "SEEK_END is #defined but must not be for the C++ binding of MPI"
Error during compilation
 



Compiling HYPHY (1.00beta) with mpich-1.2.7p1 I get the following error:
Code:
daniel@daniel-desktop:~/sources/test/HYPHY_Source$ bash build.sh MPI
Linux
Checking for curl
curl_check.cpp:1:23: error: curl/curl.h: No such file or directory
Curl seems to be absent (setting up compiler options skip CURL code)
+-----------------------------------------------------------+
|Building a single-threaded HYPHYKernelMPI for MPI	    |
+-----------------------------------------------------------+
COMPILER=mpiCC, mpicc
COMPILER_FLAGS= -w -c -fsigned-char -O3 -fpermissive -I/home/daniel/sources/test/HYPHY_Source/Source -I/home/daniel/sources/test/HYPHY_Source/Source/SQLite -D SQLITE_PTR_SIZE=sizeof(char*) -D __UNIX__  -D__HYPHY_NO_CURL__ -D __HYPHYMPI__
Building baseobj.cpp
eval: 1: Syntax error: "(" unexpected
Error during compilation
daniel@daniel-desktop:~/sources/test/HYPHY_Source$
 



How can I compile HYPHY with MPI support?

Thanks,
Daniel
Back to top
 
 
IP Logged
 
daniel
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 2
Re: i can't compile the mpi version
Reply #3 - Dec 19th, 2007 at 4:06am
 
Found the solution for mpich2-1.0.6p1 Smiley

I had to add the following compiler flag: -DMPICH_IGNORE_CXX_SEEK

MPICH2 User's guide:
Quote:
5.3 Special Issues for C++

Some users may get error messages such as
     SEEK_SET is #defined but must not be for the C++ binding of MPI
The problem is that both stdio.h and the MPI C++ interface use SEEK SET,
SEEK CUR, and SEEK END. This is really a bug in the MPI-2 standard. You
can try adding
     #undef SEEK_SET
     #undef SEEK_END
     #undef SEEK_CUR
before mpi.h is included, or add the definition
     -DMPICH_IGNORE_CXX_SEEK
to the command line (this will cause the MPI versions of SEEK SET etc. to
be skipped).


Quick test:
Code:
daniel@daniel-desktop:~/sources/test/HYPHY_Source$ mpirun -np 2 ./HYPHYMPI Examples/BatchFiles/MPITest.bf
Running a HYPHY-MPI test

Detected 2 computational nodes
Polling slave nodes...
Polling node 2...
OK

Measuring simple job send/receieve throughput...
Node     2 sent/received 11994.4 batch jobs per second

Measuring relative computational performance...
Master node reference index:    3591009
Slave node   1 index:    3361130.	93.60% relative to the master


daniel@daniel-desktop:~/sources/test/HYPHY_Source$
 

Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: i can't compile the mpi version
Reply #4 - Dec 19th, 2007 at 10:41am
 
Dear Daniel,

I am glad you worked out the SEEK_xxx quirk and thank you for posting a workaround. I have never come across it before.

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