MacOSX標準コンパイラGCC(clang)で Relion-2.0.3 を作ってみた

まず、clangで作ったopenmpiを用意します。参照Apple/openmpi

そして、relionに必要な fftwとfltkも作ります

fftw

mini:~ supervisor$ export PATH=/usr/bin:/bin
mini:~ supervisor$ unset DYLD_LIBRARY_PATH
 
mini:~ supervisor$ cd /usr/local/src
mini:src supervisor$ curl -O http://www.fftw.org/fftw-3.3.6-pl1.tar.gz
mini:src supervisor$ gzip -cd fftw-3.3.6-pl1.tar.gz | tar xf - && cd fftw-3.3.6-pl1
mini:fftw-3.3.6-pl1 supervisor$ ./configure --enable-shared --enable-sse2 --enable-avx --prefix=/usr/local
mini:fftw-3.3.6-pl1 supervisor$ make && sudo make install

fltk

mini:~ supervisor$ export PATH=/usr/bin:/bin
mini:~ supervisor$ unset DYLD_LIBRARY_PATH
 
mini:~ supervisor$ cd /usr/local/src
mini:src supervisor$ curl -O http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-1-source.tar.gz
mini:src supervisor$ gzip -cd fltk-1.3.4-1-source.tar.gz | tar xf - && cd fltk-1.3.4-1
mini:fltk-1.3.4-1 supervisor$
mini:fltk-1.3.4-1 supervisor$ ./configure --enable-shared --prefix=/usr/local
mini:fltk-1.3.4-1 supervisor$ make && sudo make install

っで relion-2.0.3 をコンパイル

mini:~ supervisor$ cd /usr/local/src/
mini:src supervisor$
mini:src supervisor$ git clone https://github.com/3dem/relion.git
 
mini:src supervisor$ cd relion
mini:relion supervisor$
 
mini:relion supervisor$
mini:relion supervisor$ mkdir build-170206
mini:relion supervisor$ cd build-170206
 
mini:build-170206 supervisor$
mini:build-170206 supervisor$ export PATH=/usr/local/openmpi-2.0.2_clang-800.0.42.1/bin:/usr/bin:/bin
mini:build-170206 supervisor$ export DYLD_LIBRARY_PATH=/usr/local/openmpi-2.0.2_clang-800.0.42.1/lib
mini:build-170206 supervisor$ export MAC_OSX=1
 
mini:build-170206 supervisor$ /Applications/CMake.app/Contents/bin/cmake \
    -DCMAKE_INSTALL_PREFIX=/usr/local/relion-2.0.3_clang .. -L
 
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BUILD TYPE set to the default type:  'Release'
-- Setting fallback CUDA_ARCH=35
-- Setting cpu precision to double
-- Setting gpu precision to single
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing:  CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- Using non-cuda compilation....
-- Found MPI_C: /usr/local/openmpi-2.0.2_clang-800.0.42.1/lib/libmpi.dylib
-- Found MPI_CXX: /usr/local/openmpi-2.0.2_clang-800.0.42.1/lib/libmpi.dylib
-- MPI_INCLUDE_PATH : /usr/local/openmpi-2.0.2_clang-800.0.42.1/include
-- MPI_LIBRARIES : /usr/local/openmpi-2.0.2_clang-800.0.42.1/lib/libmpi.dylib
-- MPI_CXX_INCLUDE_PATH : /usr/local/openmpi-2.0.2_clang-800.0.42.1/include
-- MPI_CXX_LIBRARIES : /usr/local/openmpi-2.0.2_clang-800.0.42.1/lib/libmpi.dylib
-- Looking for XOpenDisplay in /usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib
-- Looking for XOpenDisplay in /usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/X11R6/lib/libX11.dylib
-- Found FLTK: /usr/local/lib/libfltk_images.dylib;/usr/local/lib/libfltk_forms.dylib;/usr/local/lib/libfltk.dylib
-- X11 and FLTK were found
-- FLTK_LIBRARIES: -framework Carbon -framework Cocoa -framework ApplicationServices (略
-- Found FFTW: fftw3
-- FFTW_LIBRARIES: /usr/local/lib/libfftw3.dylib
-- Looking for sincos
-- Looking for sincos - not found
-- Looking for __sincos
-- Looking for __sincos - found
-- Building shared libs (smaller build size and binaries)
-- CMAKE_BINARY_DIR:/usr/local/src/relion/build-170206
-- added autopick...
-- added autopick_mpi...
-- added display...
-- added find_tiltpairs...
-- added helix_toolbox...
-- added image_handler...
-- added maingui...
-- added manualpick...
-- added mask_create...
-- added particle_polish...
-- added particle_polish_mpi...
-- added particle_reposition...
-- added particle_sort...
-- added particle_sort_mpi...
-- added particle_symmetry_expand...
-- added pipeliner...
-- added postprocess...
-- added postprocess_mpi...
-- added preprocess...
-- added preprocess_mpi...
-- added project...
-- added reconstruct...
-- added refine...
-- added refine_mpi...
-- added run_ctffind...
-- added run_ctffind_mpi...
-- added run_motioncorr...
-- added run_motioncorr_mpi...
-- added stack_create...
-- added star_combine...
-- added star_compare...
-- added tiltpair_plot...
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/relion/build-170206
-- Cache values
BUILD_SHARED_LIBS:BOOL=ON
CMAKE_BUILD_TYPE:STRING=
CMAKE_CXX_FLAGS_BENCHMARKING:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_PROFILING:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_BENCHMARKING:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_PROFILING:STRING=-O3 -DNDEBUG
CMAKE_EXE_LINKER_FLAGS_BENCHMARKING:STRING=
CMAKE_EXE_LINKER_FLAGS_PROFILING:STRING=
CMAKE_INSTALL_PREFIX:PATH=/usr/local/relion-2.0.3_clang
CMAKE_OSX_ARCHITECTURES:STRING=
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=
CMAKE_OSX_SYSROOT:STRING=
CUDA:BOOL=ON
CUDA_HOST_COMPILER:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/clang
CUDA_NVCC_FLAGS_BENCHMARKING:STRING=-arch=sm_35  -D__INTEL_COMPILER
CUDA_NVCC_FLAGS_PROFILING:STRING=-arch=sm_35  -D__INTEL_COMPILER -lineinfo
CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND
CUDA_TOOLKIT_ROOT_DIR:PATH=CUDA_TOOLKIT_ROOT_DIR-NOTFOUND
CUFFT:BOOL=OFF
CachedAlloc:BOOL=ON
CudaForceSTL:BOOL=OFF
CudaTexture:BOOL=ON
CustomAllocMemGuards:BOOL=OFF
DoublePrec_CPU:BOOL=ON
DoublePrec_GPU:BOOL=OFF
FFTW_INCLUDES:PATH=/usr/local/include
FFTW_LIBRARIES:FILEPATH=/usr/local/lib/libfftw3.dylib
FFTW_PATH:PATH=/usr/local/include
FLTK_BASE_LIBRARY:FILEPATH=/usr/local/lib/libfltk.dylib
FLTK_CONFIG_SCRIPT:FILEPATH=/usr/local/bin/fltk-config
FLTK_DIR:PATH=FLTK_DIR-NOTFOUND
FLTK_FLUID_EXECUTABLE:FILEPATH=/usr/local/bin/fluid
FLTK_FORMS_LIBRARY:FILEPATH=/usr/local/lib/libfltk_forms.dylib
FLTK_GL_LIBRARY:FILEPATH=/usr/local/lib/libfltk_gl.dylib
FLTK_IMAGES_LIBRARY:FILEPATH=/usr/local/lib/libfltk_images.dylib
FLTK_INCLUDE_DIR:PATH=/usr/local/include
FLTK_MATH_LIBRARY:FILEPATH=/usr/lib/libm.dylib
FORCE_OWN_FFTW:BOOL=OFF
FORCE_OWN_FLTK:BOOL=OFF
GUI:BOOL=ON
MPI_EXTRA_LIBRARY:STRING=MPI_EXTRA_LIBRARY-NOTFOUND
MPI_LIBRARY:FILEPATH=/usr/local/openmpi-2.0.2_clang-800.0.42.1/lib/libmpi.dylib
RELION_FLAGS_BENCHMARKING:STRING=
RELION_FLAGS_DEBUG:STRING=-O0
RELION_FLAGS_PROFILING:STRING=
RELION_FLAGS_RELEASE:STRING=
RELION_NVCC_FLAGS:STRING=-arch=sm_35  -D__INTEL_COMPILER
RELION_NVCC_FLAGS_BENCHMARKING:STRING=-arch=sm_35  -D__INTEL_COMPILER
RELION_NVCC_FLAGS_DEBUG:STRING=-arch=sm_35  -D__INTEL_COMPILER
RELION_NVCC_FLAGS_PROFILING:STRING=-arch=sm_35  -D__INTEL_COMPILER -lineinfo
RELION_NVCC_FLAGS_RELEASE:STRING=-arch=sm_35  -D__INTEL_COMPILER --disable-warnings
RELION_NVCC_FLAGS_RELWITHDEBINFO:STRING=-arch=sm_35  -D__INTEL_COMPILER
X11_INCLUDES:PATH=X11_INCLUDES-NOTFOUND
 
mini:build-170206 supervisor$
mini:build-170206 supervisor$ make && sudo make install

一応は完成できた。
ライブラリを本当に使っているかを調べてみた

mini:~ supervisor$ otool -L /usr/local/relion-2.0.3_clang/bin/relion
/usr/local/relion-2.0.3_clang/bin/relion:
        @rpath/librelion_lib.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/local/lib/libfftw3.3.dylib (compatibility version 9.0.0, current version 9.6.0)
        /usr/local/openmpi-2.0.2_clang-800.0.42.1/lib/libmpi.20.dylib (compatibility version 21.0.0, current version 21.2.0)
        /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
        /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0)
        /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/local/lib/libfltk_images.1.3.dylib (compatibility version 1.3.0, current version 1.3.4)
        /usr/local/lib/libfltk_forms.1.3.dylib (compatibility version 1.3.0, current version 1.3.4)
        /usr/local/lib/libfltk.1.3.dylib (compatibility version 1.3.0, current version 1.3.4)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
mini:~ supervisor$
 
mini:~ supervisor$ otool -L /usr/local/relion-2.0.3_clang/bin/relion_refine_mpi
/usr/local/relion-2.0.3_clang/bin/relion_refine_mpi:
        @rpath/librelion_lib.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/local/lib/libfftw3.3.dylib (compatibility version 9.0.0, current version 9.6.0)
        /usr/local/openmpi-2.0.2_clang-800.0.42.1/lib/libmpi.20.dylib (compatibility version 21.0.0, current version 21.2.0)
        /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
        /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 22.0.0)
        /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/local/lib/libfltk_images.1.3.dylib (compatibility version 1.3.0, current version 1.3.4)
        /usr/local/lib/libfltk_forms.1.3.dylib (compatibility version 1.3.0, current version 1.3.4)
        /usr/local/lib/libfltk.1.3.dylib (compatibility version 1.3.0, current version 1.3.4)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
mini:~ supervisor$

大丈夫みたい

起動してみた
2017y02m06d_222720796.png


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2017-02-07 (火) 21:15:42 (309d)