幹也日々記憶記録  〜Academic Days〜 このページをアンテナに追加 RSSフィード

2013-01-21(Mon)

2013-01-15(Tue)

[][][]Push and Get from GA

$ vi boost.mpi-ga++-3.cpp

#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/shared_ptr.hpp>
#include <iostream>
#include <string>
#include "ga++.h"
using namespace std;

int main(int argc, char* argv[])
{
   GA::Initialize(argc, argv);
   boost::mpi::communicator world;
   GA::GAServices gaServices;
   {   
      int ndim=1;
      int dims[]={20};
      char* arrayName = "array_name";
      boost::shared_ptr<GA::GlobalArray> ptrGA(new GA::GlobalArray(MT_C_DBL, ndim, dims, arrayName, NULL));
      ptrGA->zero();

      if(world.rank() == 2){ 
         int lo[] = {3};
         int hi[] = {7};
         double local3[20];
         for(int i=0; i<20; i++){
            local3[i] = (i+1.0)*3;
         }
         ptrGA->put(lo, hi, local3, NULL);
      }   
      gaServices.sync();

      if(world.rank() == 7){ 
         int lo[] = {0};
         int hi[] ={19};
         double local4[20];
         ptrGA->get(lo, hi, local4, NULL);
         for(int i=0; i<20; i++){
            cout << "i=" << i << "\t" << local4[i] << endl;
         }
      }

   }
   GA::Terminate();
   return 0;
}

$ mpicxx boost.mpi-ga++-3.cpp -o boost.mpi-ga++-3.out -I/home/tcl/boost1.48.0_openmpi-1.4.2_intel64-12.1.3/include -L/home/tcl/boost1.48.0_openmpi-1.4.2_intel64-12.1.3/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/home/tcl/boost1.48.0_openmpi-1.4.2_intel64-12.1.3/lib -I/home/fujii/ga5.1.1_intel12.1.3_openmpi1.4.2_IB/include -L/home/fujii/ga5.1.1_intel12.1.3_openmpi1.4.2_IB/lib -lga++ -lga -larmci -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -DMKL_ILP64 -lmpi_f90 -lmpi_f77 -lrdmacm -libverbs -lrt -lnsl -lutil -ldl -lm -lrt -lnsl -lutil



$ vi nodes

node07

node07

node07

node07

node08

node08

node08

node08

$ mpirun -np 8 boost.mpi-ga++-3.out

i=0 0

i=1 0

i=2 0

i=3 3

i=4 6

i=5 9

i=6 12

i=7 15

i=8 0

i=9 0

i=10 0

i=11 0

i=12 0

i=13 0

i=14 0

i=15 0

i=16 0

i=17 0

i=18 0

i=19 0

2012-12-28(Fri)

[][][]Compiled on Infiniband cluster

(一応,作業前にNWChemやMolpro等のGAを使用しているアプリの環境変数コメントアウトした.)

コンパイラ等確認(インテル12.1.3とopneMPI1.4.2)

$ icc -v

->icc version 12.1.3 (gcc version 4.1.2 compatibility)

$ icpc -v

->icpc version 12.1.3 (gcc version 4.4.3 compatibility)

$ ifort -v

->ifort version 12.1.3

$ which mpicc

->/usr/mpi/intel/openmpi-1.4.2/bin/mpicc

$ mpicc -v

->icc version 12.1.3 (gcc version 4.1.2 compatibility)

$ cat /proc/sys/kernel/shmmax

->68719476736


コンパイル【8byte整数(ILP64モデル)でコンパイル

$ cd

$ tar xvzf packages/ga-5-1-1.tggz

$ mv ga-5-1-1 ga5.1.1_intel12.1.3_openmpi1.4.2_IB

$ cd ga5.1.1_intel12.1.3_IB

$ ./configure --enable-i8 CC=icc CXX=icpc F77=ifort LDFLAGS="-DMKL_ILP64" --with-openib --with-mpi="-I/usr/mpi/intel/openmpi-1.4.2/include -L/usr/mpi/intel/openmpi-1.4.2/lib64 -lmpi" --with-blas8="-L/opt/intel/composer_xe_2011_sp1.9.293/mkl/lib/intel64 -I/opt/intel/composer_xe_2011_sp1.9.293/mkl/include -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread" --enable-cxx --prefix=/home/fujii/ga5.1.1_intel12.1.3_openmpi1.4.2_IB >& config.log

$ make >& make.log


○インストール

# make install >& install.log


○サンプルプログラム

$ vi boost.mpi-ga++-2.cpp

#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>
#include "ga++.h"

int main(int argc, char* argv[])
{
   GA::Initialize(argc, argv);
   boost::mpi::communicator world;
   GA::GAServices gaServices;
   std::cout << "I am process " << world.rank() << " of " << world.size() << ". " 
             << "My node-id is " << gaServices.clusterNodeid() << std::endl;
   GA::Terminate();
   return 0;
}

$ mpicxx boost.mpi-ga++-2.cpp -o boost.mpi-ga++-2.out -I/home/tcl/boost1.48.0_openmpi-1.4.2_intel64-12.1.3/include -L/home/tcl/boost1.48.0_openmpi-1.4.2_intel64-12.1.3/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/home/tcl/boost1.48.0_openmpi-1.4.2_intel64-12.1.3/lib -I/home/fujii/ga5.1.1_intel12.1.3_openmpi1.4.2_IB/include -L/home/fujii/ga5.1.1_intel12.1.3_openmpi1.4.2_IB/lib -lga++ -lga -larmci -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -DMKL_ILP64 -lmpi_f90 -lmpi_f77 -lrdmacm -libverbs -lrt -lnsl -lutil -ldl -lm -lrt -lnsl -lutil



$ vi nodes

node07

node07

node07

node07

node08

node08

node08

node08


$ mpirun -np 4 boost.mpi-ga++-2.out

I am process 4 of 8. My node-id is 1

I am process 0 of 8. My node-id is 0

I am process 3 of 8. My node-id is 0

I am process 1 of 8. My node-id is 0

I am process 5 of 8. My node-id is 1

I am process 6 of 8. My node-id is 1

I am process 2 of 8. My node-id is 0

I am process 7 of 8. My node-id is 1

2012-12-27(Thu)

[][][]GAServices

$ vi boost.mpi-ga++-2.cpp

#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>
#include "ga++.h"

int main(int argc, char* argv[])
{
   GA::Initialize(argc, argv);
   boost::mpi::communicator world;
   boost::shared_ptr<GA::GAServices> gaServices(new GA::GAServices());
   std::cout << "I am process " << world.rank() << " of " << world.size() << ". " 
             << "My node-id is " << gaServices->clusterNodeid() << std::endl;
   GA::Terminate();
   return 0;
}

$ mpicxx boost.mpi-ga++-2.cpp -o boost.mpi-ga++-2.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib -I/usr/local/ga5.1.1_intel12.1.0_openmpi1.4.5/include -L/usr/local/ga5.1.1_intel12.1.0_openmpi1.4.5/lib -lga++ -lga -larmci -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -DMKL_ILP64 -lmpi_f90 -lmpi_f77


$ mpirun -np 4 boost.mpi-ga++-2.out

I am process 0 of 4. My node-id is 0

I am process 1 of 4. My node-id is 0

I am process 2 of 4. My node-id is 0

I am process 3 of 4. My node-id is 0

[][][]Initialization and Termination of the GA

$ vi boost.mpi-ga++-1.cpp

#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>
#include "ga++.h"

int main(int argc, char* argv[])
{
  GA::Initialize(argc, argv);
  boost::mpi::communicator world;
  std::cout << "I am process " << world.rank() << " of " << world.size()
            << "." << std::endl;
  GA::Terminate();
  return 0;
}

$ mpicxx boost.mpi-ga++-1.cpp -o boost.mpi-ga++-1.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib -I/usr/local/ga5.1.1_intel12.1.0_openmpi1.4.5/include -L/usr/local/ga5.1.1_intel12.1.0_openmpi1.4.5/lib -lga++ -lga -larmci -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -DMKL_ILP64 -lmpi_f90 -lmpi_f77


$ mpirun -np 4 boost.mpi-ga++-1.out

I am process 0 of 4.

I am process 1 of 4.

I am process 2 of 4.

I am process 3 of 4.

2012-12-25(Tue)

[]Compiled in Ubuntu10.04 on Intel® Core™ i5-2520M(Sandy Bridge)

(一応,作業前にNWChemやMolpro等のGAを使用しているアプリの環境変数コメントアウトした.)

コンパイラ等確認(インテル12.1.0とopneMPI1.4.5)

$ icc -v

->icc version 12.1.0 (gcc version 4.4.3 compatibility)

$ icpc -v

->icpc version 12.1.0 (gcc version 4.4.3 compatibility)

$ ifort -v

->ifort version 12.1.0

$ which mpicc

->/usr/local/openmpi1.4.5_intel12.1.0/bin/mpicc

$ mpicc -v

->icc version 12.1.0 (gcc version 4.4.3 compatibility)

$ cat /proc/sys/kernel/shmmax

->512229376

あまり小さい値だとテストでエラーがでてしまうので,適当な値にしておく.


コンパイル【8byte整数(ILP64モデル)でコンパイル

$ cd /usr/local

$ su

# tar xvzf /home/fujii/packages/ga/ga-5-1-1.tgz

# mv ga-5-1-1 ga5.1.1_intel12.1.0_openmpi1.4.5

# cd ga5.1.1_intel12.1.0_openmpi1.4.5

# ./configure --enable-i8 CC=icc CXX=icpc F77=ifort LDFLAGS="-DMKL_ILP64" --with-mpi="-I/usr/local/openmpi1.4.5_intel12.1.0/include -L/usr/local/openmpi1.4.5_intel12.1.0/lib -lmpi" --with-blas8="-L/opt/intel/parallel_studio_xe_2011_sp1_update1_intel64/composer_xe_2011_sp1.7.256/mkl/lib/intel64 -I/opt/intel/parallel_studio_xe_2011_sp1_update1_intel64/composer_xe_2011_sp1.7.256/mkl/include -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread" --enable-cxx --prefix=/usr/local/ga5.1.1_intel12.1.0_openmpi1.4.5 >& config.log

# make >& make.log


○テスト

# make check MPIEXEC="mpirun -np 4" >& test.log

->FAIL: testing/testnotify.x

とエラーが出るが,GAを使うのであれば問題ないようだ.以下参照.

https://groups.google.com/forum/?fromgroups=#!msg/hpctools/8kEAy5728No/Pert_-w993wJ

https://groups.google.com/forum/?fromgroups=#!topic/hpctools/1X7Xvvz4X48

testnotify.xのエラーはarmci_notify()に関するエラーらしいがARMCIを直接使わないのであれば問題ない.

GAはこのarmci_notify()を使用しないのでGAを使用するにはエラーが出た状態でも構わないとのこと.

# make check-ga MPIEXEC="mpirun -np 4" >& test-ga.log

->All 58 tests behaved as expected (1 expected failure)

とでてGlobal Array Toolkitのテストが無事終了


○インストール

# make install >& install.log

2012-12-17(Mon)

[][]test code 6

$ vi boost.mpi-6.cpp

#include <boost/mpi.hpp>
 // include headers that implement a archive in simple text format
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

namespace mpi = boost::mpi;
 
class gps_position
{
private:
   friend class boost::serialization::access;
   // When the class Archive corresponds to an output archive, the
   // & operator is defined similar to <<.  Likewise, when the class Archive
   // is a type of input archive the & operator is defined similar to >>.
   template<class Archive>
   void serialize(Archive & ar, const unsigned int version)
   {   
       ar & degrees;
       ar & minutes;
       ar & seconds;
   }   
public:
   int degrees;
   int minutes;
   float seconds;
public:
   gps_position(){};
   gps_position(int d, int m, float s) : degrees(d), minutes(m), seconds(s) {}
};
BOOST_IS_MPI_DATATYPE(gps_position);

int main(int argc, char* argv[])
{
   mpi::environment env(argc,argv);
   mpi::communicator comm;

   gps_position gps(0,0,0.0);
   printf("The first value      @rank%d\t",comm.rank());
   std::cout << gps.degrees 
             << " ' " << gps.minutes
             << " ' " << gps.seconds << std::endl;
   if(comm.rank()==0){
      gps.degrees=11;
      gps.minutes=22;
      gps.seconds=33.33;
      printf("Before communication @rank%d\t",comm.rank());
      std::cout << gps.degrees
                << " ' " << gps.minutes
                << " ' " << gps.seconds << std::endl;
      comm.send(1,1,gps);
      printf("After communication  @rank%d\t",comm.rank());
      std::cout << gps.degrees
                << " ' " << gps.minutes
                << " ' " << gps.seconds << std::endl;
   }
   else if(comm.rank()==1){
      printf("Before communication @rank%d\t",comm.rank());
      std::cout << gps.degrees
                << " ' " << gps.minutes
                << " ' " << gps.seconds << std::endl;
      comm.recv(0,1,gps);
      printf("After communication  @rank%d\t",comm.rank());
      std::cout << gps.degrees
                << " ' " << gps.minutes
                << " ' " << gps.seconds << std::endl;
   }

   return 0;
}

$ mpicxx boost.mpi-6.cpp -o boost.mpi-6.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/


$ mpirun -np 2 boost.mpi-6.out

The first value @rank0 0 ' 0 ' 0

Before communication @rank0 11 ' 22 ' 33.33

After communication @rank0 11 ' 22 ' 33.33

The first value @rank1 0 ' 0 ' 0

Before communication @rank1 0 ' 0 ' 0

After communication @rank1 11 ' 22 ' 33.33

[][]test code 5

$ vi boost.mpi-5.cpp

#include <boost/mpi.hpp>
#include <iostream>
#include <string>
#include <boost/serialization/string.hpp>
namespace mpi = boost::mpi;

int main(int argc, char* argv[])
{
   mpi::environment env(argc, argv);
   mpi::communicator world;
   printf("myrank=%d world=%p\n",world.rank(), &world);
   return 0;
}

$ mpicxx boost.mpi-5.cpp -o boost.mpi-5.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/


$ mpirun -np 4 boost.mpi-5.out

myrank=1 world=0x7fffc5c4b908

myrank=0 world=0x7fff9570dc08

myrank=2 world=0x7fff5e865f88

myrank=3 world=0x7fff9715ed08

[][]test code 4

$ vi boost.mpi-4.cpp

#include <boost/mpi.hpp>
#include <iostream>
#include <string>
#include <boost/serialization/string.hpp>
namespace mpi = boost::mpi;

int main(int argc, char* argv[])
{
   mpi::environment env(argc, argv);
   mpi::communicator world;
   if(world.rank() == 0){ 
      std::cout << "argc: " << argc << std::endl;
      for(int i=0; i<argc; i++){
         printf("argv[%d]=%s\n",i,argv[i]);
      }   
   }   
   return 0;
}

$ mpicxx boost.mpi-4.cpp -o boost.mpi-4.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/


$ mpirun -np 2 boost.mpi-4.out

argc: 1

argv[0]=boost.mpi-4.out


$ mpirun -np 2 boost.mpi-4.out empty.input

argc: 2

argv[0]=boost.mpi-4.out

argv[1]=empty.input

2012-12-16(Sun)

[][]test code 3

$ vi boost.mpi-3.cpp

#include <boost/mpi.hpp>
#include <iostream>
#include <string>
#include <boost/serialization/string.hpp>
namespace mpi = boost::mpi;

int main(int argc, char* argv[])
{
  mpi::environment env(argc, argv);
  mpi::communicator world;

  int tagHello=0;
  int tagWorld=1;
  if (world.rank() == 0) {
    mpi::request reqs[2];
    std::string msg;
    reqs[0] = world.isend(1, tagHello, std::string("Hello"));
    reqs[1] = world.irecv(1, tagWorld, msg);
    mpi::wait_all(reqs, reqs+2);
    std::cout << msg << "!" << std::endl;
  } else {
    mpi::request reqs[2];
    std::string msg;
    reqs[0] = world.isend(0, tagWorld, std::string("world"));
    reqs[1] = world.irecv(0, tagHello, msg);
    mpi::wait_all(reqs, reqs+2);
    std::cout << msg << ", ";
    //std::cout.flush();
  }
  return 0;
}

$ mpicxx boost.mpi-3.cpp -o boost.mpi-3.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/


$ mpirun -np 2 boost.mpi-3.out

Hello, world!

or

world!

Hello,

2012-12-15(Sat)

[][]test code 2

$ vi boost.mpi-2.cpp

#include <boost/mpi.hpp>
#include <iostream>
#include <string>
#include <boost/serialization/string.hpp>
namespace mpi = boost::mpi;

int main(int argc, char* argv[])
{
  mpi::environment env(argc, argv);
  mpi::communicator world;
  int tagHello=0;
  int tagWorld=1;
  if (world.rank() == 0) {
    world.send(1, tagHello, std::string("Hello"));
    std::string msg;
    world.recv(1, tagWorld, msg);
    std::cout << msg << "!" << std::endl;
  } else {
    std::string msg;
    world.recv(0, tagHello, msg);
    std::cout << msg << ", ";
    std::cout.flush();
    world.send(0, tagWorld, std::string("world"));
  }
  return 0;
}

$ mpicxx boost.mpi-2.cpp -o boost.mpi-2.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/


$ mpirun -np 2 boost.mpi-2.out

Hello, world!

or

world!

Hello,

2012-12-14(Fri)

[][]test code 1

$ vi boost.mpi-1.cpp

#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>
namespace mpi = boost::mpi;

int main(int argc, char* argv[])
{
  mpi::environment env(argc, argv);
  mpi::communicator world;
  std::cout << "I am process " << world.rank() << " of " << world.size()
            << "." << std::endl;
  return 0;
}

$ mpicxx boost.mpi-1.cpp -o boost.mpi-1.out -I/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/include/ -L/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/ -lboost_mpi -lboost_serialization -Wl,-rpath=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5/lib/


$ mpirun -np 3 boost.mpi-1.out

I am process 1 of 3.

I am process 2 of 3.

I am process 0 of 3.

2012-03-20(Tue)

[]Install openMPI1.4.5 to the Ubuntu10.04@Let's note

参考:http://nitrogen14.blog51.fc2.com/blog-entry-33.html

openmpi-1.4.5.tar.gzを~/packagesに配置しておく


$ ifort -v

->ifort version 12.1.0

$ icpc -v

->icc version 12.1.0 (gcc version 4.4.3 compatibility)

$ icc -v

->icc version 12.1.0 (gcc version 4.4.3 compatibility)


$ cd ~/packages

$ tar xvzf openmpi-1.4.5.tar.gz

$ mv openmpi-1.4.5.tar.gz openmpi-1.4.5

$ cd openmpi-1.4.5

$ sudo su

# ./configure --prefix=/usr/local/openmpi1.4.5_intel12.1.0 CC=icc CXX=icpc F77=ifort FC=ifort >& configure.log

# make all >& make.log


  • rootの.bashrc更新

# vi /root/.bashrc

->下記を追記

#openmpi1.4.5_inetl12.1.0

MPIROOT=/usr/local/openmpi1.4.5_intel12.1.0

PATH=$MPIROOT/bin:$PATH

LD_LIBRARY_PATH=$MPIROOT/lib:$LD_LIBRARY_PATH

MANPATH=$MPIROOT/share/man:$MANPATH

export MPIROOT PATH LD_LIBRARY_PATH MANPATH

#end(openmpi1.4.5_inetl12.1.0)

# vi /etc/ld.so.conf.d/openmpi.conf を新規作成

->下記1行だけ追加

/usr/local/openmpi1.4.5_intel12.1.0/lib

# ldconfig

->共有ライブラリの情報を更新

# vi /root/.rhosts

->下記1行だけ追加

ubuntu

# vi /root/hostsの作成

->下記1行だけ追加

ubuntu cpu=4

# exit


  • インストール

$ cd ~packages/openmpi-1.4.5/

# sudo su (/root/.bashrcの読み込み)

# make install >& install.log

-> /usr/localに"openmpi1.4.5_intel12.1.0"を確認.

# exit


  • ユーザーの.bashrc更新

$ cd

$ vi .bashrc

->下記を追記

#openmpi1.4.5_inetl12.1.0

MPIROOT=/usr/local/openmpi1.4.5_intel12.1.0

PATH=$MPIROOT/bin:$PATH

LD_LIBRARY_PATH=$MPIROOT/lib:$LD_LIBRARY_PATH

MANPATH=$MPIROOT/share/man:$MANPATH

export MPIROOT PATH LD_LIBRARY_PATH MANPATH

#end(openmpi1.4.5_inetl12.1.0)

$ vi .rhosts

->下記1行だけ追加

ubuntu

$ vi hostsの作成

->下記1行だけ追加

ubuntu cpu=4

[][] Install boost1.48.0 with opneMPI1.4.5 to Ubuntu10.04 @ Let's note

参考: http://www.boost.org/doc/libs/1_48_0/more/getting_started/unix-variants.html

$gcc -v

->gcc version 4.4.3

$icpc -v

->icpc version 12.1.0 (gcc version 4.4.3 compatibility)


$ tar xvzf boost_1_48_0.tar.gz -C /tmp


  • Boost.Build インストール

$ cd /tmp/boost_1_48_0/tools/build/v2/

$ ./bootstrap.sh

$ sudo ./b2 install --prefix=/usr/local/boost-build2_gcc4.4.3


  • boostインストール (Invoke b2)

$ mkdir /tmp/boost.build

$ cd /tmp/boost_1_48_0

$ sudo su

# cp tools/build/v2/user-config.jam ~/

# vi ~/user-config.jam

->下記を追記

# ---------------------

# mpi configuration.

# ---------------------

using mpi ;

# /usr/local/boost-build2_gcc4.4.3/bin/b2 --build-dir=/tmp/boost.build toolset=intel-linux --prefix=/usr/local/boost1.48.0_intel12.1.0_openmpi1.4.5 install > install_intel12.1.0_openmpi1.4.5.log

-> /usr/local/boost1.48.0/lib/にlibboost_mpi.aやlibboost_mpi.soがあれば良い.

# rm -rf /tmp/boost.build

# rm -rf /tmp/boost_1_48_0

# exit