Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
SP installation (Read 2784 times)
itaymay
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 3
SP installation
May 3rd, 2010 at 10:29am
 
Hi,

I am trying to install hyphy as a single threaded on a Linux cluster but I am getting some error messages in the linking stage (note that the MP2 version compiled successfully). Am I missing something? This is the message I got:

$sh build.sh SP
Linux
Checking for curl
Curl seems to be present
+--------------------------------------+
|Building a single threaded HYPHYKernel|
+--------------------------------------+
COMPILER=g++, gcc
COMPILER_FLAGS= -w -c -fsigned-char -O3 -fpermissive -I/home/mayrose/bin/hyphy/hyphy/HYPHY_SP/Source -I/home/m
ayrose/bin/hyphy/hyphy/HYPHY_SP/Source/SQLite -D INTPTR_TYPE=long -D __UNIX__  -D _SLKP_LFENGINE_REWRITE_
File baseobj.cpp is up to date
File batchlan2.cpp is up to date
File batchlan.cpp is up to date
File bayesgraph2.cpp is up to date
File bayesgraph.cpp is up to date
File bgm2.cpp is up to date
File bgm.cpp is up to date
File calcnode2.cpp is up to date
File calcnode.cpp is up to date
File category.cpp is up to date
File error.cpp is up to date
File fisher_exact.cpp is up to date
File HYNetInterface.cpp is up to date
File hyphyunixutils.cpp is up to date
File likefunc2.cpp is up to date
File likefunc.cpp is up to date
File list.cpp is up to date
File matrix.cpp is up to date
File Net.cpp is up to date
File nexus.cpp is up to date
File parser2.cpp is up to date
File parser.cpp is up to date
File polynoml.cpp is up to date
File regex.cpp is up to date
File scfg.cpp is up to date
File sequence.cpp is up to date
File site.cpp is up to date
File strings.cpp is up to date
File main-unix.cxx is up to date
SQLite File sqlite3.c is up to date
Linking HYPHY
g++ -w -fsigned-char -o HYPHY obj_SP/baseobj.cpp.o obj_SP/batchlan2.cpp.o obj_SP/batchlan.cpp.o obj_SP/bayesgr
aph2.cpp.o obj_SP/bayesgraph.cpp.o obj_SP/bgm2.cpp.o obj_SP/bgm.cpp.o obj_SP/calcnode2.cpp.o obj_SP/calcnode.c
pp.o obj_SP/category.cpp.o obj_SP/error.cpp.o obj_SP/fisher_exact.cpp.o obj_SP/HYNetInterface.cpp.o obj_SP/hyp
hyunixutils.cpp.o obj_SP/likefunc2.cpp.o obj_SP/likefunc.cpp.o obj_SP/list.cpp.o obj_SP/main-unix.cxx.o obj_SP
/matrix.cpp.o obj_SP/Net.cpp.o obj_SP/nexus.cpp.o obj_SP/parser2.cpp.o obj_SP/parser.cpp.o obj_SP/polynoml.cpp
.o obj_SP/regex.cpp.o obj_SP/scfg.cpp.o obj_SP/sequence.cpp.o obj_SP/site.cpp.o obj_SP/sqlite3.c.o obj_SP/stri
ngs.cpp.o -lssl -lcrypto -lcurl -lm -ldl
obj_SP/sqlite3.c.o: In function `pthreadMutexTry':
sqlite3.c:(.text+0x3275): undefined reference to `pthread_mutex_trylock'
obj_SP/sqlite3.c.o: In function `pthreadMutexAlloc':
sqlite3.c:(.text+0x10a05): undefined reference to `pthread_mutexattr_init'
sqlite3.c:(.text+0x10a12): undefined reference to `pthread_mutexattr_settype'
sqlite3.c:(.text+0x10a25): undefined reference to `pthread_mutexattr_destroy'
obj_SP/sqlite3.c.o: In function `findLockInfo':
sqlite3.c:(.text+0x10e12): undefined reference to `pthread_create'
sqlite3.c:(.text+0x10f4e): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
Finished



Thanks!
Itay

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: SP installation
Reply #1 - May 3rd, 2010 at 10:32am
 
Hi Itay,

Good catch. The SP build will break because I included a multi-threaded version of SQLite (an embedded database engine) in the source. Just paste in the long g++ call into the console and add -lpthread to the end of the arguments and you should get rid of the errors. HyPhy will be single threaded and it accesses SQLite from a single thread at a time, so this should achieve the desired functionality. I will add a fix to the build script.

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


Feed your monkey!

Posts: 3
Re: SP installation
Reply #2 - May 3rd, 2010 at 10:52am
 
thanks! That solved it.
I also tried to run the MP2 version on a cluster node with 16 total CPUs, of which 8 are already occupied. After running hyphy the load raised from 8 to 24 (that is - more than available). It seems that hyphy will allocate the total number of CPUs the node has instead of the number of free CPUs. Is there a way to specify hyphy to allocate only the number of free CPUs, or alternatively, to specify the max number it can allocate? 

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


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: SP installation
Reply #3 - May 3rd, 2010 at 11:12am
 
Hi Itay,

You are correct: by default HyPhy will spawn as many threads as there are available processors.
You can limit the maximum number to n by supplying a CPU=n command line argument, e.g.

Code:
$HYPHYMP CPU=8
 



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


Feed your monkey!

Posts: 3
Re: SP installation
Reply #4 - May 3rd, 2010 at 11:16am
 
thanks. I'll try that

Itay
Back to top
 
 
IP Logged