ATLASのOffline解析の環境を整えるためのメモ
特にSLC関係、アトラスソフトウェア関係
参考URL : http://linux.web.cern.ch/linux/scientific5/docs/install.shtml
SLC であれば useraddcern を使うことで構築できる。
useraddcern --login LOGINID
で LXPLUS と同様のパスワード、グループ、ログインシェル、ホームが使える。
2013年10月頃からAFSでなくCVMFSでGridやAthenaを使うことが推奨された。
そのうちAFSでは利用できなくなる?
CERN global ネットワークに接続されているマシンに対しては簡単に導入でき、以下のインストラクションの通りにCVMFSをインストールすれば使える。
https://twiki.cern.ch/twiki/bin/view/AtlasComputing/Cvmfs21
soprano ~ % su - [root@soprano ~]# rpm -Uvh http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/EL/5/`uname -i`/cvmfs-release-2-4.el5.noarch.rpm [root@soprano ~]# yum install cvmfs cvmfs-init-scripts cvmfs-auto-setup
[root@soprano ~]# cat /etc/cvmfs/default.local CVMFS_REPOSITORIES=atlas.cern.ch,atlas-condb.cern.ch,atlas-nightlies.cern.ch,sft.cern.ch CVMFS_CACHE_BASE='/var/lib/cvmfs' CVMFS_QUOTA_LIMIT='20916' CVMFS_HTTP_PROXY='http://ca-proxy.cern.ch:3128;http://lxbrb1413.cern.ch:3128|http://lxbrb1414.cern.ch:3128' [root@soprano ~]# cat /etc/cvmfs/domain.d/cern.ch.local # Change the order so that the nearest server is the first in the list ... # Note that port 8000 is preferred for the servers below but, if it does not work, use port 80 instead. # if you are in Europe (uncomment) CVMFS_SERVER_URL="http://cvmfs-stratum-one.cern.ch:8000/opt/@org@;http://cernvmfs.gridpp.rl.ac.uk:8000/opt/@org@;http://cvmfs.racf.bnl.gov:8000/opt/@org@" # if you are in North America (uncomment) #CVMFS_SERVER_URL="http://cvmfs.racf.bnl.gov:8000/opt/@org@;http://cvmfs-stratum-one.cern.ch:8000/opt/@org@;http://cernvmfs.gridpp.rl.ac.uk:8000/opt/@org@"
[root@soprano ~]# service autofs start Starting automount: automount: program is already running. [ OK ]
[root@soprano ~]# cvmfs_config chksetup OK [root@soprano ~]# cvmfs_config probe Probing /cvmfs/atlas.cern.ch... OK Probing /cvmfs/atlas-condb.cern.ch... OK Probing /cvmfs/atlas-nightlies.cern.ch... OK Probing /cvmfs/sft.cern.ch... OK [root@soprano ~]# cvmfs_config status atlas.cern.ch mounted on /cvmfs/atlas.cern.ch with pid 31459 atlas-condb.cern.ch mounted on /cvmfs/atlas-condb.cern.ch with pid 32441 atlas-nightlies.cern.ch mounted on /cvmfs/atlas-nightlies.cern.ch with pid 1000 sft.cern.ch mounted on /cvmfs/sft.cern.ch with pid 1980 [root@soprano ~]# cvmfs_config stat -v Running /usr/bin/cvmfs_config stat atlas.cern.ch: Version: 2.1.14.0 PID: 31459 Uptime: 0 minutes Memory Usage: 20536k File Catalog Revision: 3449 (expires in 59 minutes) File Catalog ID: a189a55543065c2a1a3ce16f95431bbf5a7ff693 No. Active File Catalogs: 1 Cache Usage: 25615k / 21417985k File Descriptor Usage: 0 / 65024 No. Open Directories: 0 No. IO Errors: 0 Connection: http://cvmfs-stratum-one.cern.ch:8000/opt/atlas through proxy http://ca-proxy.cern.ch:3128 (online) Usage: 0 open() calls (hitrate n/a%), 3 opendir() calls Transfer Statistics: 7601k read, avg. speed: n/ak/s Running /usr/bin/cvmfs_config stat atlas-condb.cern.ch: Version: 2.1.14.0 PID: 32441 Uptime: 0 minutes Memory Usage: 20364k File Catalog Revision: 852 (expires in 59 minutes) File Catalog ID: a47ea32b8ec3f6276ae67e67bcd571e89fcf127b No. Active File Catalogs: 1 Cache Usage: 25615k / 21417985k File Descriptor Usage: 0 / 65024 No. Open Directories: 0 No. IO Errors: 0 Connection: http://cvmfs-stratum-one.cern.ch:8000/opt/atlas-condb through proxy http://ca-proxy.cern.ch:3128 (online) Usage: 0 open() calls (hitrate n/a%), 3 opendir() calls Transfer Statistics: 826k read, avg. speed: n/ak/s Running /usr/bin/cvmfs_config stat atlas-nightlies.cern.ch: Version: 2.1.14.0 PID: 1000 Uptime: 0 minutes Memory Usage: 20372k File Catalog Revision: 2435 (expires in 59 minutes) File Catalog ID: 94f71eeba9f42cd6a2934197d0bf87ed6e6a61e7 No. Active File Catalogs: 1 Cache Usage: 25615k / 21417985k File Descriptor Usage: 0 / 65024 No. Open Directories: 0 No. IO Errors: 0 Connection: http://cvmfs-atlas-nightlies.cern.ch/cvmfs/atlas-nightlies.cern.ch through proxy http://ca-proxy.cern.ch:3128 (online) Usage: 0 open() calls (hitrate n/a%), 3 opendir() calls Transfer Statistics: 4829k read, avg. speed: n/ak/s Running /usr/bin/cvmfs_config stat sft.cern.ch: Version: 2.1.14.0 PID: 1980 Uptime: 0 minutes Memory Usage: 20344k File Catalog Revision: 383 (expires in 59 minutes) File Catalog ID: 0072656749eae7d629669e39c443694f3c3defc5 No. Active File Catalogs: 1 Cache Usage: 25615k / 21417985k File Descriptor Usage: 0 / 65024 No. Open Directories: 0 No. IO Errors: 0 Connection: http://cvmfs-stratum-one.cern.ch:8000/opt/sft through proxy http://ca-proxy.cern.ch:3128 (online) Usage: 0 open() calls (hitrate n/a%), 3 opendir() calls Transfer Statistics: 5k read, avg. speed: n/ak/s
rod local のデータはcastorに転送されてしまうのでここから拾ってくるれらのコマンドを使用
castor コマンド unix コマンド nsls ls nsmkdir or rfmkdir mkdir nschmod chmod (rfcp cp) rfdir (= nsls -l) ls -l rfrm (ファイル) rm rfrm -r (ディレクトリ) rm -r rfrename mv
2009/10/14からコピーには以下のコマンドを使用
xrdcp root://castoratlas//castor/cern.ch/grid/atlas/DAQ/muon/tgc/runNumber/134811.RodA01_00.run .
環境変数の設定をすると rfcp が使えるようになる様子
export STAGE_SVCCLASS=atlcal
ユーザーズガイド http://castor.web.cern.ch/castor/ug/
scpを駆使してデータを拾ってくるかポートフォワードを使う。
ssh -N -L 22000:lxatut11:22 lxplus.cern.ch
を実行。ログインする。 (ログイン後、何も入力ができない状態になります。)
scp -P 22000 wakajun@localhost:~/.bashrc ./を実行。lxatut 上の disk のファイルをとってこれます。 または、
sftp -oPort=22000 wakajun@localhostでもOK。
rsync -avz -e 'ssh -p 22000' localhost:server_dir client_dir
簡単な解説
ssh -N -L 22000:lxatut11:22 lxplus.cern.ch
-N option はターミナルに入力を禁止するオプション。-L はポート転送を行うことをあらわすオプション。 lxplus.cern.ch を踏み台に使って、 local host の 22000 のポートと、 lxatut11 の 22のポートをつなぐ。 (22 ssh 用の port) ポートを指定して、 scp を行う。 localhost の 22000 番のポートにつなぐということは、 lxplus.cern.ch を経由して、 lxatut11 のポートにつなぐということ。
lxplus にログインするとほかのマシンにもログインできる。-Y オプションで GUI も使える。(何故か -X はダメ)
ssh -Y lxplus.cern.ch
これを経由してlxatut、atlasgw、tgcjpc、guarneriにログインする。 スクラッチディスクが
/tmp/wakajun
にあるのでファイルの移動の際にはここを使う。 ただし、オートマウントなので
ssh lxplusXXX.cern.ch XXX:数字3ケタ
で指定する必要あり。
東大の計算機群、基本的にCERNのlxplusと同様に使えるが、homeが少し大きめで使いやすい。
quotaコマンドがうまく働かないのでduコマンドで容量を常に監視するようにする。
ログインは
ssh -Y lxatut01
lxatutの後に数字を指定する必要あり。
普通のシステムなら"chsh"コマンドをすれば良いが、LXPLUSでは使えない。 https://espace.cern.ch/it-faqs/Lists/faqs/DispForm.aspx?ID=7
CRA tool を使うようにする。https://cra.cern.ch
KEK部屋にPhaser 8560が設置されているのでこれが利用できる。 詳しくはプリンタのページ。
CERNではP2Pの使用が厳しい。そのため、Skypeのポートを切り替える必要がある。 以下のように『ポートを50123に指定し、アップデートを常にせよ』とのこと。
* software configured to use port 50123 * supernode functionality disabled * no local firewall exceptions for Skype * Skype security patches kept updated
設定の参考になるページ https://espace.cern.ch/it-ff/Lists/Facts%20%20FAQs/DispForm.aspx?ID=74
NICEアカウントが必要になる。 AFS 上のフォルダ、DFS (アップローダのようなもの)、Collaboration のワークスペース、Java site などの形式が選べる。 今回は簡単のために DFS を選択した。 手順は以下の通り。
これでサイト自体はできたが、外からは見られない。 外から見られるようにするには以下の事をやる必要がある。
% stty -a
のようにすると現在の設定が表示される。
.login (csh/tcsh),.bash_profile (bash), .zshenv (zsh)に設定することでログインするとこのキーが有効になる。
stty erase '^H' stop undef
のように記述する。
% stty erase ^H
emacsの癖でたまにCntrl-sをxtermで使ってしまい、stopしてしまうので誤動作防止の為にこの操作を受け付けないようにする。
% stty stop undef
Xorg.confに書き加える必要がある。
以下のページを参照 http://www.komoto.org/etc/wuxga.html
周波数の設定がミソらしい。
xorg.conf を自動で生成してくれるらしい。 root になってから以下のコマンドを実行する。
# Xorg -configure
これで /root のフォルダに /xorg.conf.new ができる。 指示にしたがってテスト
# X -config /root/xorg.conf.new
マウスカーソルが正しく表示されたらこれでOK。
終了するときは Ctrl-Alt-Backspace で戻れる。
次に xorg.conf.new を /etc/X11 にコピーする。
一応前の xorg.conf は取っておくべき。
最後に startx でちゃんと X が走るか確かめる。