2013-04-25 44 views
1

我正试图用集群上的boost库编译我的程序。但我不知道如何链接集群上的库。如何在集群上使用boost库进行编译?

我编译我的程序在本地使用此命令我的Mac:

mpic++ -o local ods_v2.4.cpp -L/opt/local/lib/ -lboost_iostreams-mt -lz -I/opt/local/include 

这是推动我的群集上的信息:

-bash-4.1$ module avail boost 

---------------------------------------------------------------- /opt/modules/modulefiles ----------------------------------------------------------------- 
boost/1.49.0_intel-12.0.084 boost/1.49.0_intel-13.0.1.117 
-bash-4.1$ module show boost 
------------------------------------------------------------------- 
/opt/modules/modulefiles/boost/1.49.0_intel-13.0.1.117: 

module-whatis access boost ver. 1.49.0 header files and libraries 
module  load python/2.7.3_intel-13.0.1.117 
setenv  BOOST_HOME /apps/rhel6/boost/1.49.0_intel-13.0.1.117 
setenv  BOOST_ROOT /apps/rhel6/boost/1.49.0_intel-13.0.1.117 
setenv  BOOST_INCLUDE -I/apps/rhel6/boost/1.49.0_intel-13.0.1.117/include 
setenv  LINK_BOOST -L/apps/rhel6/boost/1.49.0_intel-13.0.1.117/lib -Xlinker -rpath -Xlinker /apps/rhel6/boost/1.49.0_intel-13.0.1.117/lib 
prepend-path  LD_LIBRARY_PATH /apps/rhel6/boost/1.49.0_intel-13.0.1.117/lib 
------------------------------------------------------------------- 

-bash-4.1$ 

我不知道我应该使用什么命令行? 我想这一点,但它不工作:

-bash-4.1$ mpiCC -o cluster ods_v2.4.cpp $LINK_BOOST $BOOST_INCLUDE -lz 

回答

1

它解决

-bash-4.1$ mpiCC -o cluster ods_v2.4.cpp $LINK_BOOST -lboost_iostreams -lz $BOOST_INCLUDE 

我忘了,lbookst-XXXX

感谢

相关问题