2012-11-26 3 views
5

Rmpi 패키지를 LAM MPI 클러스터 시스템에 설치하려고합니다. 이전에 나는 약간의 물건 (mpi4py과 작은 C++ 프로그램)을 컴파일하고 테스트 해왔으므로 MPI 자체가 작동 할 것이라고 확신합니다. 그러나 라이브러리를 연결할 때 Rmpi 패키지 설치가 실패합니다.LAM/MPI 클러스터에 Rmpi ​​설치

주 용의자는 makefile에 mpicc 대신 gcc이 필요합니다. 구성을 변경하려면이 줄을 찾으려고했으나 지금까지 찾을 수 없었습니다.

누군가 LAM에 Rmpi를 설치 한 경험이 있습니까? 어떻게 관리 했습니까?

아키텍처

  • LAM MPI (예 :이 존재하는 경우 또는 어쩌면 PBS MPI는 어떻게 확인합니까?). 확실히 한 가지, 나는 생각하지 않는다 mpicpp 파일 느릅 모든 MPI 구현에 공통이
  • R-2.15.2
  • Rmpi_0.6-1는
  • 에 CentOS 5.5 (최종) 발표, x86_64의
  • R에서 호출

명령

install.packages("Rmpi") 

로그인

trying URL 'http://cran.at.r-project.org/src/contrib/Rmpi_0.6-1.tar.gz' 
Content type 'application/x-gzip' length 92977 bytes (90 Kb) 
opened URL 
================================================== 
downloaded 90 Kb 

* installing *source* package âRmpiâ ... 
** package âRmpiâ successfully unpacked and MD5 sums checked 
checking for gcc... gcc -std=gnu99 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc -std=gnu99 accepts -g... yes 
checking for gcc -std=gnu99 option to accept ISO C89... none needed 
I am here /usr and it is OpenMPI 
Trying to find mpi.h ... 
Found in /usr/include 
Trying to find libmpi.so or libmpich.a ... 
Found libmpi in /usr/lib 
checking for openpty in -lutil... yes 
checking for main in -lpthread... yes 
configure: creating ./config.status 
config.status: creating src/Makevars 
** libs 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c RegQuery.c -o RegQuery.o 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c Rmpi.c -o Rmpi.o 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c conversion.c -o conversion.o 
gcc -std=gnu99 -I/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/include -DNDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I/usr/include -DMPI2 -DOPENMPI -I/usr/local/include -fpic -g -O2 -c internal.c -o internal.o 
gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o Rmpi.o conversion.o internal.o -L/usr/lib -lmpi -lutil -lpthread -L/g/software/linux/pack/r-2.15.2/centos-5/lib64/R/lib -lR 
/usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil 
/usr/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil 
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread 
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread 
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc 
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc 
installing to /home/andrejev/R/x86_64-unknown-linux-gnu-library/2.15/Rmpi/libs 
** R 
** demo 
** inst 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** testing if installed package can be loaded 
Error : .onLoad failed in loadNamespace() for 'Rmpi', details: 
    call: dyn.load(file, DLLpath = DLLpath, ...) 
    error: unable to load shared object '/home/andrejev/R/x86_64-unknown-linux-gnu-library/2.15/Rmpi/libs/Rmpi.so': 
    /usr/lib/libmpi.so.0: undefined symbol: _kio 
Error: loading failed 
Execution halted 
ERROR: loading failed 
* removing â/home/andrejev/R/x86_64-unknown-linux-gnu-library/2.15/Rmpiâ 

The downloaded source packages are in 
     â/tmp/Rtmp5qzeqp/downloaded_packagesâ 
Warning message: 
In install.packages("Rmpi") : 
    installation of package âRmpiâ had non-zero exit status 
+0

은 당신이 정말로 여전히/MPI를 LAM을 실행하고 있습니까?! 우주 자체가 :) 차라리 당신이 열기 MPI 사용하고 있는지 말할 것 같은이 일이 (LAM을/MPI 전에 열기 MPI 년에 합병)와 같은 오래되었습니다. PBS는 클러스터의 배치 시스템이며 MPI와는 아무런 관련이 없습니다. 내 손이 닿지 지금까지 –

답변

6

우리는 매우 비슷한 설정을 가지고 있습니다. 나는 최근에 당신의 특정한 상황에 대해 이야기 할 수있을 정도로 충분히 만질 수는 없지만, 나는 우리에게 뛰고있는 몇 가지 명령을 전달할 수 있습니다 ...

우리를위한 첫 번째 단계는 다음과 같습니다. Dirk은 OpenMPI가 실행되도록 언급했습니다. 그 설정이있어 후에는 반드시해야합니다 귀하의 LD_LIBRARY_PATH가 제대로 설정되어

export LD_LIBRARY_PATH=/opt/openmpiv2/lib/:$LD_LIBRARY_PATH 

마지막으로 Rmpi이 (R를 위의 명령을 실행하고 시작한 후) 우리를 위해 설치했다있어 명령 :

install.packages("Rmpi", configure.args = c("--with-Rmpi-include=/opt/openmpiv2/include/", "--with-Rmpi-libpath=/opt/openmpiv2/lib/", "--with-Rmpi-type=OPENMPI", "--with-mpi=/opt/openmpiv2/")) 

패키지가 성공적으로 설치되었습니다. 이 명령은 당신에게 시간을 절약 할 수 있습니다 여기에 그래서 그들은 유용하지 않을 수 있습니다 우리의 설치와 관련된, 그러나 희망 뭔가 할 수

qsub -I -l nodes=2:ppn=12 
/opt/openmpiv2/bin/mpirun --hostfile $PBS_NODEFILE -n 1 R --slave -f rmpitest.R 

: 그럼 우리는 다음과 같은 명령을 사용하여 작업을 실행할 수 있습니다!

@Sergej 아래 제안으로

는,보다 일반적인 해결책은 될 수

install.packages(
    "Rmpi", 
    configure.args = c(
    "--with-Rmpi-include=/usr/include/", # This is where LAM's mpi.h is located 
    "--with-Rmpi-libpath=/usr/lib/",  # This is where liblam.so is located (actually as I type it mine was located in /usr/lib64/liblam.so.0, so maybe this is not needed at all) 
    "--with-Rmpi-type=LAM"    # This says that the type is LAM (there is also OPENMPI and MPICH) 
)) 

우리의 설치 : RHEL 5, Rmpi ​​0.5-9, OpenMPI 실행 1.4.3, R 2.15..제프 알렌에 의해 제안으로 내가 실행할 때 컴파일하는 데 성공에도 불구하고 0

+0

감사합니다. 나는 이것을 지금 시험해 볼 것이다 –

+0

나는 그것에 어떤 마법이 있었는지 모르지만 그것이 효과가있다. 고마워. 설정이 약간 다르므로 아래에 내 솔루션을 게시하고 질문을 표시하겠습니다. 당신은 당신의 대답에서 그것을 참조 할 수 있습니까? –

+0

물론! 기쁜 데 도움이되었습니다. 내 경우에는 –

2

나는 오래 전에 LAM을 사용했지만 OpenMPI로 전환했습니다. Rmpi의 저자 하오 유 (Hao Yu)는 똑같은 행동을 제안합니다.

r-sig-hpc 목록은 이러한 질문에 알맞은 곳입니다.

+0

는 :) –

+0

LAM은 열기 MPI에 합병되었다. LAM에는 적극적인 개발이 진행되지 않으며 유지 보수 버그 만 수정됩니다. 이야기의 일부에 불과 –

+0

는 --- 최종 LAM 자료도 Rmpi과/일을 구축하는 데 실패했습니다. 그래서 예, OpenMPI입니다. LAM 사이트에서도 그렇게 말합니다. 알림 주셔서 감사. 다른 리눅스 맛,이 모든 단지 (apt-get을) 상자 밖으로 작동 : 아, 그리고 데비안에 대한 R, Rmpi, ... 테이너 5 월 경우. –

1

나는 나는 또한

# Because it was non-standard R location so it din't find shared libraries 
export LD_LIBRARY_PATH=/g/software/linux/pack/r-2.15.0/lib64/R/lib 

# Rmpi also could not find libutil so I had to add path to it as well 
export LD_PRELOAD=/usr/lib64/libutil.so 

편집

을 실행 R에 가서

install.packages(
    "Rmpi", 
    configure.args = c(
    "--with-Rmpi-include=/usr/include/", # This is where LAM's mpi.h is located 
    "--with-Rmpi-libpath=/usr/lib64/",  # This is where liblam.so is located 
    "--with-Rmpi-type=LAM"    # This says that the type is LAM (there is also OPENMPI and MPICH) 
)) 

을 실행 하나 이상의 노드에서 Rmpi가 실패합니다. 그래서 나는 결국 OpenMPI 실행 전환을 추진하고 시작해야 할 것 같아요 :/

관련 문제