구축하려고 해요오픈 버블~을 위한제온 피존재하다센트OS 6.5(리눅스 2.6.32-431.11.2.el6.x86_64)
이것을 사용하세요속도
인텔 병렬 스튜디오 설치
tar xvfz parallel_studio_xe_2013_sp1_update2.tgz
cd parallel_studio_xe_2013_sp1_update2
./install.sh
flex 및 zlib 컴파일
echo '
/opt/intel/bin/iccvars.sh intel64
export PATH=/opt/intel/bin:$PATH
' >> ~/.bashrc
bash
# zlib
wget -c 'http://zlib.net/zlib-1.2.8.tar.gz'
tar xvfz zlib-1.2.8.tar.gz
cd zlib-1.2.8
CC=icc CFLAGS="-mmic" CHOST=x86_64 ./configure --shared
make && make install prefix=/opt/crtdc/micgnu
cd ..
# flex
wget -c 'http://downloads.sourceforge.net/project/flex/flex-2.5.39.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fflex%2Ffiles%2F&ts=1397722559&use_mirror=jaist'
mv flex-2.5.39.tar.gz* flex-2.5.39.tar.gz
tar xvfz flex-2.5.39.tar.gz
cd flex-2.5.39
CC=icc ./configure --prefix=/opt/crtdc/micgnu/ --build=x86_64-k1om-linux
make && make install prefix=/opt/crtdc/micgnu
cd ..
OpenFOAM 및 ThirdParty를 다운로드하고 etc/bashrc
파일의 압축을 풀고 편집하세요.
export WM_COMPILER=Icc
export WM_MPLIB=INTEL_MPI
source etc/bashrc
오래된 편집물 정리(있는 경우)
wcleanAll ; wcleanLnIncludeAll ; wcleanMachine
-mmic
로고 추가
vim wmake/rules/linux64ICC/c
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC -mmic
vim wmake/rules/linux64ICC/c++
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -mmic
-xHost
플래그를 제거합니다 ( 와 충돌함 -mmic
).
vim wmake/rules/linux64Icc/c++Opt
c++OPT = -O2 -no-prec-div
XeonPhi용으로 제작됨
source etc/bashrc
./Allwmake
마지막 단계에서는 몇 가지 오류가 표시됩니다.
icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -O2 -no-prec-div -DNoRepository -I/root/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -ItractionDisplacementCorrectionStress -I../solidDisplacementFoam -IlnInclude -I. -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -fPIC -mmic -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64IccDPOpt/tractionDisplacementCorrectionFvPatchVectorField.o Make/linux64IccDPOpt/solidEquilibriumDisplacementFoam.o -L/root/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64IccDPOpt/lib \
-lfiniteVolume -lOpenFOAM -ldl -L/lib -lm -o /root/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64IccDPOpt/bin/solidEquilibriumDisplacementFoam
x86_64-k1om-linux-ld: cannot find -lfiniteVolume
x86_64-k1om-linux-ld: cannot find -lOpenFOAM
make[2]: *** [/root/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64IccDPOpt/bin/solidEquilibriumDisplacementFoam] Error 1
make[2]: Leaving directory `/root/OpenFOAM/OpenFOAM-2.2.2/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam'
make[1]: *** [solidEquilibriumDisplacementFoam] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/root/OpenFOAM/OpenFOAM-2.2.2/applications/solvers/stressAnalysis'
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.
첫 번째 단계에서는 다음도 보여줍니다.
Note: ignore spurious warnings about missing mpicxx.h headers
wmake libso mpi
SOURCE=UOPwrite.C ; icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -O2 -no-prec-div -DNoRepository -IlnInclude -I. -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/root/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -fPIC -mmic -c $SOURCE -o Make/linux64IccDPOptINTEL_MPI/UOPwrite.o
UOPwrite.C(29): catastrophic error: cannot open source file "mpi.h"
#include "mpi.h"
mpi.h 파일을 찾으려고 합니다.
$ locate /mpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/anympi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/deinompi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/lammpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/openmpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/sgimpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/deinompi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/lammpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/openmpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/sgimpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/mrmpi/mpistubs/mpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/vtkhdf5/src/H5FDmpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/gcc-4.5.2/libjava/include/jvmpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/include/mpi.h.in
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/mpi/f77/prototypes_mpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/mrmpi/mpi.h
/home/ccfd/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/vtkhdf5/H5FDmpi.h
/opt/intel/composer_xe_2013_sp1.1.106/mkl/benchmarks/mp_linpack/include/hpl_mpi.h
/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw/fftw3-mpi.h
/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw/fftw_mpi.h
/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw/rfftw_mpi.h
/opt/intel/composer_xe_2013_sp1.2.144/mkl/benchmarks/mp_linpack/include/hpl_mpi.h
/opt/intel/composer_xe_2013_sp1.2.144/mkl/include/fftw/fftw3-mpi.h
/opt/intel/composer_xe_2013_sp1.2.144/mkl/include/fftw/fftw_mpi.h
/opt/intel/composer_xe_2013_sp1.2.144/mkl/include/fftw/rfftw_mpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/anympi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/deinompi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/lammpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/openmpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/compat/sgimpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/deinompi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/lammpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/openmpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/Utilities/mpi4py/Library/config/sgimpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/mrmpi/mpistubs/mpi.h
/root/OpenFOAM/ThirdParty-2.2.2/ParaView-3.12.0/VTK/Utilities/vtkhdf5/src/H5FDmpi.h
/root/OpenFOAM/ThirdParty-2.2.2/gcc-4.5.2/libjava/include/jvmpi.h
/root/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/contrib/vt/vt/tools/vtunify/mpi/vt_unify_mpi.h
/root/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/include/mpi.h.in
/root/OpenFOAM/ThirdParty-2.2.2/openmpi-1.6.3/ompi/mpi/f77/prototypes_mpi.h
/root/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/mrmpi/mpi.h
/root/OpenFOAM/ThirdParty-2.2.2/platforms/linux64Gcc45/paraview-3.12.0/include/paraview-3.12/vtkhdf5/H5FDmpi.h
/usr/include/openmpi-x86_64/mpi.h
/usr/src/kernels/2.6.32-431.11.2.el6.x86_64/include/config/usb/serial/siemens/mpi.h
/usr/src/kernels/2.6.32-431.11.2.el6.x86_64/include/linux/crypto/mpi.h
/usr/src/kernels/2.6.32-431.3.1.el6.x86_64/include/config/usb/serial/siemens/mpi.h
/usr/src/kernels/2.6.32-431.3.1.el6.x86_64/include/linux/crypto/mpi.h
이게 무슨 문제야? Intel MPI가 없기 때문인가요? Intel MPI 없이 이 문제를 해결할 수 있는 방법이 있습니까?
답변1
스위치를 사용하여 library 를 호출하고 있지만 -l
컴파일러가 찾을 수 있는 위치에는 없습니다. 이는 /etc/ld.so.conf
컴파일러에 제공하는 매개변수 에 의해 /etc/ld.so.conf.d
제어 됩니다.-L
$ icpc -std=c++0x ...... -lfiniteVolume -lOpenFOAM -ldl -L/lib -lm -o \
/root/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64IccDPOpt/bin/solidEquilibriumDisplacementFoam
x86_64-k1om-linux-ld: cannot find -lfiniteVolume
x86_64-k1om-linux-ld: cannot find -lOpenFOAM
....
.so
먼저 스위치를 통해 제공한 디렉토리에 실제 라이브러리가 존재하는지 조사하겠습니다 -L
.