本家様 https://emcore.ucsf.edu/ucsf-software

MotionCor3

ここで公開
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を下記のようにする.

--- a/makefile11
+++ b/makefile11
@@ -162,7 +162,7 @@ exe: $(OBJS)
        -L$(CUDALIB) \
        -L$(CONDA)/lib \
        -L/usr/lib64 \
-       -lcufft -lcudart -lcuda -lnvToolsExt -ltiff -lc -lm -lpthread \
+       -lcufft -lcudart -lcuda -lnvToolsExt -ltiff -lc -lm -lpthread -Xcompiler -no-pie \
        -o MotionCor3
        @echo MotionCor3 has been generated.

MotionCor2

ライセンスにご注意ください
本家様から

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」は削除した方がいいのかも

最新の60件
2025-04-27 2025-04-26 2025-04-25 2025-04-24 2025-04-17 2025-04-15 2025-04-13 2025-04-02 2025-04-01 2025-03-31 2025-03-29 2025-03-28 2025-03-27 2025-03-26 2025-03-23 2025-03-22 2025-03-20 2025-03-17 2025-03-16 2025-03-15 2025-03-06 2025-03-03 2025-03-01 2025-02-18 2025-02-17 2025-02-14 2025-02-12 2025-02-03 2025-02-02 2025-01-27 2025-01-26 2025-01-25 2025-01-24 2025-01-23

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-03-23 (日) 12:08:18