差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
softwares:cernlib [2019/08/24 23:04] – [CERN Program Library] kobayashsoftwares:cernlib [2021/08/21 15:29] (現在) kobayash
行 1: 行 1:
 ===== CERN Program Library ===== ===== CERN Program Library =====
-  * Ubuntu 18.04CentOS 7 に g77 と g77 でコンパイルされた cernlib をインストールした。+==== CentOS 8.2.2004 ==== 
 +  * Debugging the DESY cernlib 
 +    * PAW のメモリの大きさを変えた時は、すべてをコンパイルする必要はなく、以下のコマンドで再コンパイル可能。何度もコンパイルし直していると、log ファイルのファイル名が長くなりすぎてエラーになるので、ログファイルも消しておく。 
 + 
 +  $ emacs -nw 2005/src/pawlib/paw/paw/pawbig.inc 
 +  $ touch 2005/src/pawlib/paw/programs/0pamain.F 
 +  $ rm -rf 2005/build/log/
 +  $ ./Install_cernlib_paw   
 + 
 +    * コンパイルオプション (例えば #   define DefaultFCOptions) を 2005/src/config/linux-lp64.cf 内に追加したら、2005 ディレクトリ内の bin, build, lib ディレクトリをすべて消してすべてコンパイルし直しする。 
 + 
 +    NWPAW を 175000000 以上にして、二次元ヒストグラムを表示すると、以下のように SIGFPE で落ちるときがある。これは再現性がある。 
 + 
 +  PAW> hi/pl 6 
 +   
 +  Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation. 
 +   
 +  Backtrace for this error: 
 +  #0  0x7f7b6339216a 
 +  #1  0x7f7b633912d3 
 +  ... 
 +  #32  0x7f7b627f96a2 
 +  #33  0x429edd 
 +  #34  0xffffffffffffffff 
 +  Floating point exception (core dumped) 
 + 
 +    * gdb ~/cern/sandbox/cernlib_2005_minipacklib_paw/2005/bin/pawX11 として、 (dbg) run とすると、ighcxy_ () で落ちていることがわかる。コンパイル時に -g オプションをつけなくてもSIGであれば dbg がとらえてくれる。 
 +     
 +==== Ubuntu 18.04 LTS ==== 
 +  * Ubuntu 18.04 に gfortran でコンパイルた cernlib をインストールした。ただ、うまく動いてないかも?
     - はじめに一応 Ubuntu のバージョンをチェックしておく。     - はじめに一応 Ubuntu のバージョンをチェックしておく。
  
行 8: 行 37:
   DISTRIB_CODENAME=bionic   DISTRIB_CODENAME=bionic
   DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"   DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
-    a + 
-    - +    imake コマンドを使えるようにし、gmake から make へのリンクを貼る 
 + 
 +  $ sudo apt-get install xutils-dev 
 +  $ sudo ln -s /usr/bin/make /usr/bin/gmake 
 + 
 +    - ディレクトリを作成 
 + 
 +  $ mkdir -p ~/cern/cernlib-2005-paw-128mb 
 +  $ cd ~/cern/cernlib-2005-paw-128mb 
 + 
 +    - 以下のソースを [[https://www-zeuthen.desy.de/linear_collider/cernlib/new/cernlib_2005.html|CERNLIB 2005 and 2006 (64 bit) compatible with the gcc4/gfortran compiler suite]]からダウンロード。 
 +      * [[https://www-zeuthen.desy.de/linear_collider/cernlib/new/cernlib-2005-all-new.tgz|cernlib-2005-all-new.tgz]] 
 +      * [[https://www-zeuthen.desy.de/linear_collider/cernlib/new/cernlib.2005.corr.2014.04.17.tgz|cernlib.2005.corr.2014.04.17.tgz]] 
 +      * [[https://www-zeuthen.desy.de/linear_collider/cernlib/new/cernlib.2005.install.2014.04.17.tgz|cernlib.2005.install.2014.04.17.tgz]] 
 + 
 +  $ wget https://www-zeuthen.desy.de/linear_collider/cernlib/new/cernlib-2005-all-new.tgz 
 +  $ wget https://www-zeuthen.desy.de/linear_collider/cernlib/new/cernlib.2005.corr.2014.04.17.tgz 
 +  $ wget https://www-zeuthen.desy.de/linear_collider/cernlib/new/cernlib.2005.install.2014.04.17.tgz 
 + 
 +    - tar ファイルの解凍と上書き 
 + 
 +  $ tar zxvf cernlib-2005-all-new.tgz 
 +  $ mv cernlib.2005.corr.2014.04.17.tgz cernlib.2005.corr.tgz 
 +  $ tar zxvf cernlib.2005.install.2014.04.17.tgz 
 + 
 +    - 中身があるか一応チェック 
 + 
 +  $ ls 
 +  Install_cernlib* Install_old_patchy4* 
 +  Install_cernlib_and_lapack* README_cernlib 
 +  Install_cernlib_bin* cernlib-2005-all-new.tgz 
 +  Install_cernlib_fixes* cernlib.2005.corr.tgz 
 +  Install_cernlib_include* cernlib.2005.install.2014.04.17.tgz 
 +  Install_cernlib_lib* cernlib.fixed* 
 +  Install_cernlib_patchy* cernlib_2005.tgz 
 +  Install_cernlib_src* cernlib_env* 
 +  Install_cernlib_test* lapack.tar.gz 
 +  Install_lapack* patchy4.tar.gz 
 +  $  
 + 
 +    - src の展開 
 + 
 +  $ export CERN=$PWD 
 +  $ ./Install_cernlib_src 
 + 
 +    - PAW のメモリを増加 
 + 
 +  $ emacs ~/cern/cernlib-2005-paw-128mb/2005/src/pawlib/paw/paw/pawbig.inc 
 +  *** Edit Line 20 of the file as below *** 
 +        PARAMETER (NWPAW=2000000) 
 +               | | | 
 +               V V V 
 +  * NWPAW was enlarged from 2000000 to 32000000 by Nobu on Jul. 4, 2018 
 +  *      PARAMETER (NWPAW=2000000) 
 +        PARAMETER (NWPAW=32000000) 
 + 
 +    - sdf 
 + 
 +  $ emacs ~/cern/cernlib-2005-paw-128mb/2005/src/config/linux-lp64.cf 
 +  *** Edit Line 142 and 157 as below *** 
 +  ... 
 +  # define DefaultCCOptions -fPIC  
 +                | | | 
 +                V V V 
 +  # define DefaultCCOptions /* -fPIC c/o by Nobu on Aug. 24, 2019*/ 
 +  ... 
 +  #   define DefaultFCOptions -fno-automatic -fno-second-underscore -fPIC 
 +                | | | 
 +                V V V 
 +  #   define DefaultFCOptions -fno-automatic -fno-second-underscore /* -fPIC c/o by Nobu on Aug. 24, 2019*/ 
 +  ... 
 + 
 +  $ emacs ~/cern/cernlib-2005-paw-128mb/2005/src/config/Imake.cf 
 +  *** Edit Line 390 as below *** 
 +  ... 
 +  #if __GNUC__ == 4 
 +            | | | 
 +            V V V 
 +  #if __GNUC__ == 7  
 + 
 +    - Install_cernlib を書き換え 
 + 
 +  $ emacs ~/cern/cernlib-2005-paw-128mb/Install_cernlib 
 +  *** Edit Line 13-15, and 33 as below *** 
 +  ... 
 +  echo "installing cernlib sources" 
 +   
 +  ./Install_cernlib_src 
 +                | | | 
 +                V V V 
 +  #echo "installing cernlib sources" 
 +  # 
 +  #./Install_cernlib_src 
 +  ... 
 +  [ "$GCCVSN" = "4" ]&&FC=gfortran 
 +                | | | 
 +                V V V 
 +  [ "$GCCVSN" = "7" ]&&FC=gfortran 
 + 
 +    - インストールの実行 
 + 
 +  $ ./Install_cernlib 
  
 ==== CentOS 7 ==== ==== CentOS 7 ====
softwares/cernlib.1566655465.txt.gz · 最終更新: 2019/08/24 23:04 by kobayash
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0