本家様 http://blake.bcm.edu/emanwiki/EMAN2

バージョン番号が良く分からなかったが
EMAN2.1、EMAN2.2、EMAN2.3とかはメジャーバージョン.
EMAN2.11とEMAN2.12は「EMAN2.1」のマイナーバージョンアップ版の位置付けみたい.

EMAN2.1 ------------> EMAN2.2 --------> EMAN2.3 --------> EMAN2.9
  +-- EMAN2.11          +-- EMAN2.21      +-- EMAN2.31      +-- EMAN2.91
  +-- EMAN2.12          +-- EMAN2.22                        +-- EMAN2.99.47

macOSについてはEMAN2/macOS
EMAN2/windowsPC

EMAN2.99.47

2023-03-10リリース
インストール方法は3つ提供されていて、従来のパッケージ展開(minicondaが展開)、既にあるanaconda環境に別途のconda実行環境を作ってそこで展開、そしてソースから作る.
ここでは従来版での作り方を.

[root@rockylinux9 src]# bash ./eman2.99.47_sphire1.4_sparx.linux64.sh
 
Welcome to EMAN2-SPHIRE-SPARX combined
 
EMAN2-SPHIRE-SPARX will now be installed into this location:
/root/eman2-sphire-sparx
 
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below
 
[/root/eman2-sphire-sparx] >>> /apps/eman2.99.47      <--- インストール先を指定
PREFIX=/apps/eman2.99.47
 :
by running conda init? [yes|no]
[no] >>>                                       <-- 「no」のままリターン
 
You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:
 
eval "$(/apps/eman2.99.47/bin/conda shell.YOUR_SHELL_NAME hook)"
 
To install conda's shell functions for easier access, first activate, then:
 
conda init
 
If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:
 
conda config --set auto_activate_base false
 
Thank you for installing EMAN2-SPHIRE-SPARX!
[root@rockylinux9 src]#

EnvironmentModulesは「/apps/modulefiles/eman2/2.99.47」として

#%Module1.0
set          EMAN2DIR        /apps/eman2.99.47
prepend-path PATH            $EMAN2DIR/bin:$EMAN2DIR/condabin

*ロードすると「/apps/eman2.99.47/lib/libk5crypto.so.3」が影響してそのターミナルでsshがエラーになります....

テスト

[saber@rockylinux9 ~]$ module use /apps/modulefiles/
[saber@rockylinux9 ~]$ module load eman2/2.99.47
 
[saber@rockylinux9 ~]$ e2version.py
EMAN 2.99.47 ( GITHUB: 2023-03-04 13:31 - commit: 3f313008c3185410fe859663e763dffb9c0b6fcc )
Your EMAN2 is running on: Linux-5.14.0-162.6.1.el9_1.x86_64-x86_64-with-glibc2.34 5.14.0-162.6.1.el9_1.x86_64
Your Python version is: 3.9.16
 
[saber@rockylinux9 ~]$ e2speedtest.py
This could take a few minutes. Please be patient.
Initializing
(略
 
Your machines speed factor = 2.6484 +- 0.0156 (0.0087 +- 0.00005 sec)
 
[saber@rockylinux9 ~]$
[saber@rockylinux9 ~]$ python
>>> import tensorflow as tf
>>> tf.config.list_physical_devices('GPU')
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
>>>
[saber@rockylinux9 ~]$

既に敷いてある pyenv/anaconda環境でeman2向けの実行環境を作るなら

git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2023.03
pyenv global anaconda3-2023.03
export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH
conda update conda
 
(既にpyenv/anaconda環境があるなら)
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
export PATH=$PYENV_ROOT/versions/anaconda3-2023.03/bin/:$PATH

としたうえで

[root@rockylinux9 ~]# conda create -n eman2.99.47 eman-dev==2.99.47 -c cryoem -c conda-forge

っでお仕舞.
EnvironmentModulesは pyenv/anaconda で作ったので

#%Module1.0
set          root /apps/pyenv/versions/anaconda3-2023.03/envs/eman2.99.47/
prepend-path PATH $root/bin

eman2.91

20210308にリリース https://cryoem.bcm.edu/cryoem/downloads/view_eman2_version/32
サイトから「eman2.91_sphire1.4_sparx.linux64.sh」をダウンロードします
「eman2.91_sphire1.4_sparx_huge.linux64.sh」は関連ライブラリを含んだ完全版. ネットに繋げられないクローズドな計算機向けみたい

[root@c ~]# bash /apps/src/eman2.91_sphire1.4_sparx.linux64.sh
 
Welcome to EMAN2-SPHIRE-SPARX combined
 
EMAN2-SPHIRE-SPARX will now be installed into this location:
/root/eman2-sphire-sparx
 
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below
 
[/root/eman2-sphire-sparx] >>>  /apps/eman2.91        <--- インストール先を指定
PREFIX=/apps/eman2.91
 :
(必要なパッケージがダウンロードされ、インストールが進む)
 :
by running conda init? [yes|no]
[no] >>> no
 
 
You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:
 
eval "$(/apps/eman2.91/bin/conda shell.YOUR_SHELL_NAME hook)"
 
To install conda's shell functions for easier access, first activate, then:
 
conda init
 
If you'd prefer that conda's base environment not be activated on startup,
   set the auto_activate_base parameter to false:
 
conda config --set auto_activate_base false
 
Thank you for installing EMAN2-SPHIRE-SPARX!
[root@c ~]#

動作テスト

[saber@c ~]$ e2version.py
EMAN 2.91 final ( GITHUB: 2021-03-08 11:36 - commit: 81caed2 )
Your Python version is: 3.7.9
 
[saber@c ~]$ e2speedtest.py
This could take a few minutes. Please be patient.
Initializing
....................
....................
....................
....................
....................
....................
....................
....................
 
Your machines speed factor = 0.6262 +- 0.0575 (0.0367 +- 0.00371 sec)
 
[saber@c ~]$ e2proc2d.py :64:64:1 test.hdf --process mask.sharp:outer_radius=24
1 images, processing 0-0 stepping by 1
1 images
 
[saber@c ~]$ e2display.py test.hdf   <-- ここだけ表示されない時があった..

eman2.31

EMAN2のサイトから「eman2.31_sphire1.3.linux64.sh」をダウンロードします
そして

[root@c ~]# bash /apps/src/eman2.31_sphire1.3.linux64.sh
 
Welcome to EMAN2 2.31
 
EMAN2 will now be installed into this location:
/root/EMAN2
 
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below
 
[/root/EMAN2] >>> /apps/eman2.31           <-- インストール先を指定
PREFIX=/apps/eman2.31
 :
 :
INSTALLATION IS NOW COMPLETE
 
Please, go to http://blake.bcm.edu/emanwiki/EMAN2/Install/BinaryInstallAnaconda
for detailed installation instructions, testing and troubleshooting information.
If this installation is on a Linux cluster,
you will require additional steps before installation is complete!
 
cat: /apps/eman2.31/.messages.txt: No such file or directory
installation finished.
Do you wish the installer to initialize EMAN2
in your /root/.bashrc ? [yes|no]
[no] >>> no                              <-- yesでも構わないが、、、noにしてます
 
Initializing EMAN2 in /root/.bashrc
A backup will be made to: /root/.bashrc-eman2.bak
 
 
For this change to become active, you have to open a new terminal.
 
Thank you for installing EMAN2!
[root@c ~]#

eman2.31を使うにはPATH(/apps/eman2.31/bin)を加えればいいのだが、このpathに含まれるopenmpiには注意が必要

[root@c ~]# /apps/eman2.31/bin/ompi_info | grep "dl support"
              dl support: no
[root@c ~]#

とdl(dlopen)が無効化されているopenmpiです。
relionでコンパイル時に使用しているOS提供のopenmpiとかでは

[root@c ~]# module load mpi
[root@c ~]# ompi_info |grep "dl support"
              dl support: yes
[root@c ~]#

とdl(dlopen)が有効である。
なのでEnvironmentModulesを使ってrelionとは排他的に実行できるようにする必要があるみたい
こんな感じで「conflict」を使って制御する

[root@c ~]# /etc/modulefiles/eman/2.31
#%Module1.0
conflict mpi
conflict relion
conflict eman
 
set EMAN2DIR /apps/eman2.31
setenv EMAN2DIR $EMAN2DIR
prepend-path PATH $EMAN2DIR/bin
[root@c ~]#

ソースコードから作ってみる

上記の「eman2.31_sphire1.3.linux64.sh」はpython2.7が内包されpre-buildされています。
なのでCentOS8で標準である python3.6 に関係なく(PATHの設定が必要なものの)そのまま使えます。
もちろん mpirun も

ここではCentOS8でソースコードから eman2.31 を作ってみる。

方針としては

の2通りがあるかと思う。ここではcrYOLO,Cinderella,JANNI,topaz,PyEMのように
後者の pyenv/anaconda でpython3 実行仮想環境を用意して、そこにインストールを行ってみる。
PyEM#w42b9b88と内容が被ります

まずは pyenv/anaconda の敷設 *既にあるなら不要

git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
eval "$(pyenv init - --no-rehash)"
 
pyenv install anaconda3-5.3.1
pyenv global anaconda3-5.3.1
pyenv versions
export PATH=$PYENV_ROOT/versions/anaconda3-5.3.1/bin/:$PATH
conda update conda

次に、eman2.31向けの python3 実行仮想環境を作る

[root@centos8 ~]# conda create -n eman2 python=3.7
[root@centos8 ~]# source activate eman2
(eman2) [root@centos8 ~]#

これでeman2.31向けの python3 実行仮想環境に移った。

eman2のソースコードを入手します. 取得はgitで.

(eman2) [root@centos8 ~]# cd /apps/src
(eman2) [root@centos8 src]# git clone https://github.com/cryoem/eman2
(eman2) [root@centos8 src]# cd eman2/
(eman2) [root@centos8 eman2]# git checkout -b v2.31 refs/tags/v2.31
(eman2) Switched to a new branch 'v2.31'
(eman2) [root@centos8 eman2]# git branch
  master
* v2.31
(eman2) [root@centos8 eman2]#

その後、コンパイル場所を作って、移って

(eman2) [root@centos8 eman2]# mkdir b && cd b
(eman2) [root@centos8 b]#

cmakeでconfigureしてみると

(eman2) [root@centos8 b]# cmake ..

ここでパッケージが足りないとか言われます。
下記パッケージをインストールしました.

(CentOSのパッケージインストール)
(eman2) [root@centos8 ~]# dnf --enablerepo=PowerTools install gsl-devel libtiff-devel libjpeg-turbo-devel libpng-devel freeglut-devel
 
hdf5-devel ftgl-devel  PyQt5 boost-devel
 
(eman2.31向けの python3 実行仮想環境へのpythonパッケージのインストール)
(eman2) [root@centos8 ~]# conda install fftw numpy boost  
 
 
 
future pyopengl pyqt=5 matplotlib
(eman2) [root@centos8 ~]# conda install -c conda-forge hdf5 
 
 
bsddb3              <-- conda-forgeリポジトリから
(eman2) [root@centos8 ~]# conda install -c cryoem ftgl                          <-- cryoemリポジトリから

これが終わって再び cmake で configure します

(eman2) [root@centos8 ~]# cd /apps/src/eman2/b
(eman2) [root@centos8 b]# cmame ..
 
(eman2) [root@centos8 b]# make
(eman2) [root@centos8 b]# make install

eman2のバイナリーが、「/apps/pyenv/versions/anaconda3-5.3.1/envs/eman2/bin」にインストールされます

使い方は

[illya@centos8 ~]$ export PYENV_ROOT=/apps/pyenv
[illya@centos8 ~]$ export PATH=$PYENV_ROOT/bin:$PATH
[illya@centos8 ~]$ eval "$(pyenv init - --no-rehash)"
[illya@centos8 ~]$ export PATH=$PYENV_ROOT/versions/anaconda3-5.3.1/bin/:$PATH
 
[illya@centos8 ~]$ source activate eman2
(eman2) [illya@centos8 ~]$

として「e2projectmanager.py」と実行します。

あるいはEnvironmentModulesを活用して「/etc/modulefiles」に

[root@centos8 ~]# /etc/modulefiles/eman2/2.31
#%Module1.0
set EMAN2DIR /apps/pyenv/versions/anaconda3-5.3.1/envs/eman2
setenv EMAN2DIR $EMAN2DIR
prepend-path PATH $EMAN2DIR/bin

と用意して、

[illya@centos8 ~]$ module load eman2/2.31
 
[illya@centos8 ~]$ e2projectmanager.py

とするのが良いかもしれない

eman2.31向けのmpirunを用意する

計算はthreadsで行えるので特段必要なのかな?とも思いますが、複数の計算機を使って計算を行うには
mpiが必要で、ここではソースから作ったeman2.31向けの openmpi を調理します

最新の60件
2023-09-20 2023-09-19 2023-09-18 2023-09-17 2023-09-16 2023-09-14 2023-09-12 2023-09-11 2023-09-08 2023-09-05 2023-09-02 2023-08-30 2023-08-29 2023-08-28 2023-08-27 2023-08-22 2023-08-20 2023-08-18 2023-08-17 2023-08-14 2023-08-12 2023-08-09 2023-08-07 2023-08-06 2023-08-03 2023-07-31 2023-07-29 2023-07-27 2023-07-25 2023-07-24 2023-07-22 2023-07-17 2023-07-16 2023-07-09 2023-07-08

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-05-17 (水) 01:27:41