本家様 https://emcore.ucsf.edu/ucsf-software
ここで公開
https://github.com/czimaginginstitute/MotionCor3
READMEに
MotionCor3, an improved implementation of MotionCor2 with addition of CTF (Contrast Transfer Function) estimation,
is a multi-GPU accelerated software package that enables single-pixel level correction of anisotropic beam induced
sample motion for cryo-electron microscopy and cryo-electron tomography images.
(DeepL様翻訳)
MotionCor3は、MotionCor2にCTF (Contrast Transfer Function)推定を追加した改良版で、低温電子顕微鏡および
低温電子トモグラフィー画像において、ビームによる試料の動きの異方性を1ピクセルレベルで補正できる
マルチGPUアクセラレーションソフトウェアパッケージです。
とある
っでライセンスは「BSD-3-Clause license」で企業利用も大丈夫みたい. 詳細はここhttps://github.com/czimaginginstitute/MotionCor3?tab=BSD-3-Clause-1-ov-file#BSD-3-Clause-1-ov-file
作り方
cd /apps
git clone https://github.com/czimaginginstitute/MotionCor3
cd MotionCor3
make exe -f makefile11 CUDAHOME=/usr/local/cuda-11.8
ls -l /apps/MotionCor3/MotionCor3
Environment Modulesは「/apps/modulefiles/MotionCor3」で
#%Module
set-alias MotionCor3 /apps/MotionCor3/MotionCor3
set-alias motioncor3 /apps/MotionCor3/MotionCor3
とかで.
ubuntu22.04でコンパイルすると
「/usr/bin/ld: /apps/MotionCor3/Lib/libmrcfile.a(CLoadExtHeader.o): relocation R_X86_64_32 against symbol `__gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIE」と表示される
回避策としてはmakefile11を下記のようにする.
|
ライセンスにご注意ください
本家様から
NOTE: This software may only be downloaded and used for free by academic and/or non-profit users. All others are required to contact David Agard for licensing information prior to download.
取得申請フォームに記載して最新版のMotionCor2をダウンロードします. 「MotionCor2_1.6.4_Mar31_2023.zip」(9.8MB)
これを展開します
mkdir /apps/MotionCor2
cd /apps/MotionCor2
unzip /apps/src/MotionCor2_1.6.4_Mar31_2023.zip
rm -rf /apps/src/MotionCor2_1.6.4_Mar31_2023.zip
「/usr/local」に展開しているcudaライブラリに応じて複数のバイナリーが用意されています。cuda-9.2からcuda-12.1と幅広いです.
ここで ldd で必要な共有ライブラリを見てみると
[root@rockylinux9 MotionCor2]# ldd ./MotionCor2_1.6.4_Cuda121_Mar312023
linux-vdso.so.1 (0x00007ffd7b74f000)
libcufft.so.11 => /usr/local/cuda/targets/x86_64-linux/lib/libcufft.so.11 (0x00007f87e4400000)
libcudart.so.12 => /usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.12 (0x00007f87e4000000)
libcuda.so.1 => /lib64/libcuda.so.1 (0x00007f87dfa00000)
libnvToolsExt.so.1 => /usr/local/cuda/targets/x86_64-linux/lib/libnvToolsExt.so.1 (0x00007f87df600000)
libtiff.so.5 => /lib64/libtiff.so.5 (0x00007f87f565e000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f87f5659000)
librt.so.1 => /lib64/librt.so.1 (0x00007f87f5652000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f87f564d000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f87df200000)
libm.so.6 => /lib64/libm.so.6 (0x00007f87e4325000)
libc.so.6 => /lib64/libc.so.6 (0x00007f87dee00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f87f5632000)
/lib64/ld-linux-x86-64.so.2 (0x00007f87f56f7000)
libwebp.so.7 => /lib64/libwebp.so.7 (0x00007f87e42b8000)
libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f87e3f29000)
libjbig.so.2.1 => /lib64/libjbig.so.2.1 (0x00007f87f5622000)
libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007f87df97f000)
libz.so.1 => /lib64/libz.so.1 (0x00007f87f5608000)
[root@rockylinux9 MotionCor2]#
cuda-12-8が入ってます
これから「libtiff.so.5」が必要なのですが、ubuntu24.04ではこの「libtiff.so.5」がOS提供パッケージから外れてます。代わりに「libtiff.so.6」が提供されている
なのでubuntu24.04でこのMotionCor2を使うには別途 libtiff.so.5 を含むライブラリをインストールする必要があります
作ってみる.
root@ubuntu24:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
:
root@ubuntu24:~#
root@ubuntu24:~# cd /usr/local/src/
root@ubuntu24:/usr/local/src# wget https://download.osgeo.org/libtiff/tiff-4.3.0.zip
root@ubuntu24:/usr/local/src# unzip -q tiff-4.3.0.zip
root@ubuntu24:/usr/local/src# cd tiff-4.3.0/
root@ubuntu24:/usr/local/src/tiff-4.3.0# ls -CF
aclocal.m4 ChangeLog config/ configure.ac HOWTO-RELEASE libtiff-4.pc.in Makefile.in README.md TODO
autogen.sh* cmake/ config.h.in contrib/ html/ m4/ man/ RELEASE-DATE tools/
build/ CMakeLists.txt configure* COPYRIGHT libtiff/ Makefile.am port/ test/ VERSION
root@ubuntu24:/usr/local/src/tiff-4.3.0# apt install build-essential
root@ubuntu24:/usr/local/src/tiff-4.3.0# ./configure
:
Libtiff is now configured for x86_64-pc-linux-gnu
Installation directory: /usr/local
Documentation directory: ${prefix}/share/doc/tiff-4.3.0
C compiler: gcc -g -O2 -Wall -W
C++ compiler: g++ -g -O2
Enable runtime linker paths: no
Enable linker symbol versioning: no
Support Microsoft Document Imaging: yes
Use Win32 IO: no
Support for internal codecs:
CCITT Group 3 & 4 algorithms: yes
Macintosh PackBits algorithm: yes
LZW algorithm: yes
ThunderScan 4-bit RLE algorithm: yes
NeXT 2-bit RLE algorithm: yes
LogLuv high dynamic range encoding: yes
Support for external codecs:
ZLIB support: no <-- libzip-dev
libdeflate support: no <-- libdeflate-dev
Pixar log-format algorithm: no <-- libzip-dev
JPEG support: no <-- libjpeg-dev
Old JPEG support: no <-- libjpeg-dev
JPEG 8/12 bit dual mode: no <-- 「--enable-jpeg12」<-- 使用時は
ISO JBIG support: no <-- libjbig-dev
LERC support: no <-- liblerc-dev
LZMA2 support: no <-- liblzma-dev
ZSTD support: no <-- libzstd-dev
WEBP support: no <-- libwebp-dev
C++ support: yes
OpenGL support: no
root@ubuntu24:/usr/local/src/tiff-4.3.0# apt install libzip-dev libdeflate-dev libjpeg-dev libjbig-dev liblerc-dev liblzma-dev libzstd-dev
root@ubuntu24:/usr/local/src/tiff-4.3.0# ./configure --enable-jpeg12 --with-jpeg12-include-dir=/usr/include
root@ubuntu24:/usr/local/src/tiff-4.3.0# make -j 20
root@ubuntu24:/usr/local/src/tiff-4.3.0# make install
root@ubuntu24:/usr/local/src/tiff-4.3.0# ls -CF /usr/local/bin/
fax2ps* pal2rgb* raw2tiff* tiff2pdf* tiff2rgba* tiffcp* tiffdither* tiffinfo* tiffset*
fax2tiff* ppm2tiff* tiff2bw* tiff2ps* tiffcmp* tiffcrop* tiffdump* tiffmedian* tiffsplit*
root@ubuntu24:/usr/local/src/tiff-4.3.0# ls -CF /usr/local/lib/
libtiff.a libtiff.so@ libtiff.so.5.7.0* libtiffxx.la* libtiffxx.so.5@ pkgconfig/
libtiff.la* libtiff.so.5@ libtiffxx.a libtiffxx.so@ libtiffxx.so.5.7.0* python3.12/
root@ubuntu24:/usr/local/src/tiff-4.3.0#
一応「/etc/ld.so.conf.d/libc.conf」に「/usr/local/lib」が入っているので、そのままでlibtiff.so.5は共有ライブラリとして利用できる
「/usr/local/lib/libtiff.so」は削除した方がいいのかも