本家様 https://github.com/hael/SIMPLE
元論文 https://academic.oup.com/bioinformatics/article/36/7/2237/5650404
コンパイルには下記の要件が必要
- Linux: (we use Ubuntu 16.04 and above)
- MacOSX: 10.10 and above
- CMake 3.2 and above
- FFTW 3.3 and above
- GNU toolchain (gcc & gfortran) 5.5
- libTIFF 4+ (for TIFF format support, ensure dev packages installed)
- jbigkit 2+ (for TIFF format support, ensure dev packages installed)
RockyLinux標準の開発環境では無理. RockyLinuxにあるgcc-toolsetで新しい開発環境が必要です
[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)
[root@rockylinux ~]# dnf install gcc-toolset-12 -y
[root@rockylinux ~]# dnf --enablerepo=powertools install cmake fftw-devel libtiff-devel libjpeg-turbo-devel jbigkit-devel python39-devel xz-devel zlib-devel git -y
[root@rockylinux ~]# alternatives --config python
[root@rockylinux ~]# source scl_source enable gcc-toolset-12
[root@rockylinux ~]# cd /apps/src
[root@rockylinux src]# git clone https://github.com/hael/SIMPLE
[root@rockylinux src]# cd SIMPLE/
[root@rockylinux SIMPLE]# mkdir build && cd build
[root@rockylinux build]# cmake -DCMAKE_INSTALL_PREFIX=/apps/SIMPLE ..
[root@rockylinux build]# make
[root@rockylinux build]# make install
[root@rockylinux build]# ls -l /apps/SIMPLE/
total 16
-rw-rw-rw-. 1 root root 160 Nov 29 01:01 add2.bashrc
-rw-rw-rw-. 1 root root 235 Nov 29 01:01 add2.tcshrc
drwxr-xr-x. 4 root root 4096 Nov 29 01:10 bin
drwxr-xr-x. 5 root root 48 Nov 29 01:10 gui_data
drwxr-xr-x. 3 root root 44 Nov 29 01:10 lib
drwxr-xr-x. 2 root root 4096 Nov 29 01:10 scripts
drwxr-xr-x. 4 root root 51 Nov 29 01:10 tutorials
[root@rockylinux build]#
make installで不足分がある
[root@rockylinux ~]# cd /apps/src/SIMPLE/build/lib
[root@rockylinux lib]# mv libnlopt.so* /apps/SIMPLE/lib/
EnvironmentModules †
add2.bashrcの内容から
[root@rockylinux ~]# vi /apps/modulefiles/SIMPLE
#%Module1.0
#
set SIMPLE /apps/SIMPLE
setenv SIMPLE_PATH $SIMPLE
prepend-path PATH $SIMPLE/scripts:$SIMPLE/bin
setenv SIMPLE_EMAIL ""
setenv SIMPLE_QSYS "local"
[root@rockylinux ~]#
起動すると †
[illya@rockylinux ~]$ module use --append /apps/modulefiles/
[illya@rockylinux ~]$ module load SIMPLE
[illya@rockylinux ~]$ simple

もし †
「Could NOT find TIFF: Found unsuitable version "4.0.9", but required is at least "4.0.10" (found /usr/lib64/libtiff.so, )」と言われ、気になって
TIFF-4.0.10以上を目指すなら、下記のようにしてTIFFを新たにインストールする必要がある.
[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)
[root@rockylinux ~]# cd /apps/src
[root@rockylinux src]# wget http://download.osgeo.org/libtiff/tiff-4.4.0.tar.xz
[root@rockylinux src]# tar xf ./tiff-4.4.0.tar.xz && cd tiff-4.4.0
[root@rockylinux tiff-4.4.0]# dnf install libdeflate-devel libwebp-devel
[root@rockylinux tiff-4.4.0]# ./configure --prefix=/apps/local && make install
そしてSIMPLEのコードをちょいと弄る
| --- a/src/tiff/libtiff_funs.c
+++ b/src/tiff/libtiff_funs.c
@@ -4,7 +4,7 @@
// Use is subject to Janelia Farm Research Campus Software Copyright 1.1
// license terms ( http://license.janelia.org/license/jfrc_copyright_1_1.html )
// Custom EER related routines adapted from Relion
-#include <tiffio.h>
+#include "/apps/local/include/tiffio.h"
TIFFErrorHandler warn = NULL;
|
その上で
[root@rockylinux build]# cmake -DCMAKE_INSTALL_PREFIX=/apps/SIMPLE .. -DTIFF_INCLUDE_DIR=/apps/local
[root@rockylinux build]# make && make install
CentOS7なら †
[root@centos7 ~]# source scl_source enable devtoolset-9
[root@centos7 ~]# cd /apps/src
[root@centos7 src]# git clone https://github.com/hael/SIMPLE
[root@centos7 src]# cd SIMPLE/
[root@centos7 SIMPLE]# mkdir build && cd build
[root@centos7 build]# cmake -DCMAKE_INSTALL_PREFIX=/apps/SIMPLE ..
[root@centos7 build]# vi /apps/src/SIMPLE/build/nlopt_src-prefix/src/nlopt_src-stamp/nlopt_src-configure-RELEASE.cmake
set(command "cmake;-DCMAKE_INSTALL_LIBDIR=lib;-DCMAKE_INSTALL_PREFIX=/apps/src/SIMPLE/build;nlopt-2.7.1/;-GUnix Makefiles;/apps/src/SIMPLE/build/nlopt_src-prefix/src/nlopt_src")
↓
set(command "cmake3;-DCMAKE_INSTALL_LIBDIR=lib;-DCMAKE_INSTALL_PREFIX=/apps/src/SIMPLE/build;nlopt-2.7.1/;-GUnix Makefiles;/apps/src/SIMPLE/build/nlopt_src-prefix/src/nlopt_src")
[root@centos7 build]# make
[root@centos7 build]# make install
って一見よさそうに見えたが、実行したら
「/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found」が出現....
なのでSingularity/Apptainer で製作
Singularity/Apptainer †
CentOS7にSingularityを入れて、その中にRockyLinux8.6を動かした
[root@centos7 ~]# yum --enablerepo=epel install singularity
[root@centos7 ~]# echo "user.max_user_namespaces=10000" >> /etc/sysctl.conf
[root@centos7 ~]# sysctl -p
[root@centos7 ~]# apptainer config fakeroot --add illya
[illya@centos7 ~]$ singularity build --sandbox rockylinux-simple docker://dokken/rockylinux-8
[illya@centos7 ~]$ singularity shell --writable --fakeroot ./rockylinux-simple/
Apptainer>
Apptainer> dnf install gcc-toolset-12 -y
Apptainer> dnf --enablerepo=powertools install cmake fftw-devel libtiff-devel libjpeg-turbo-devel jbigkit-devel python39-devel xz-devel zlib-devel git -y
Apptainer> dnf install gtk3 libX11-xcb alsa-lib ghostscript fuse desktop-file-utils xdg-utils
Apptainer> alternatives --config python
(python --> python3へ)
Apptainer>
Apptainer> source scl_source enable gcc-toolset-12
Apptainer> cd /usr/local/src
Apptainer> git clone https://github.com/hael/SIMPLE
Apptainer> cd SIMPLE/
Apptainer> mkdir build && cd build
Apptainer> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/SIMPLE ..
Apptainer> make
Apptainer> make install
Apptainer> cd /usr/local/src/SIMPLE/build/lib/
Apptainer> cp -a libnlopt.so* /usr/local/SIMPLE/lib/
Apptainer> cat /usr/local/SIMPLE/add2.bashrc >> /environment
Apptainer> exit
exit
[illya@centos7 ~]$
一応これで完了
っで起動
[illya@centos7 ~]$ singularity exec --fakeroot ./rockylinux-simple/ simple
上手く動くならsandboxをsifへ
[illya@centos7 ~]$ singularity build --fakeroot rockylinux-simple.sif ./rockylinux-simple
[illya@centos7 ~]$ singularity exec rockylinux-simple.sif simple