@zigen 's note

MacdeMPI Memo

最終更新:

mynote

- view
だれでも歓迎! 編集
MPI(Message Passing Interface)規格を用いてを用いて並列計算を行なう。
ライブラリにはLAM(Local Area Multicomputer)を使用。
まず最初に使用するコンピュータのホスト表を作成する。
ここではlamhostsと名づける。

  1. デーモンを起動できるかチェック:$recon -v lamhosts '-d 'で詳細表示
  2. デーモンの起動:$lamboot -v lamhosts
  3. lamdがどのノードで走ってるかチェック:$lamnodes
  4. lamdの停止:$wipe -v lamhosts 又は lamhalt
  5. プログラムの停止(LAM使用時):lamclean -v

LAM-MPI関係コマンド一覧
utmcc000:~/himeno host$ ls /usr/local/bin
hboot lamcheckpoint lamhalt lamtrace mpif77 recon
hcc lamclean laminfo lamwipe mpimsg tkill
hcp lamd lamnodes mpic++ mpirun tping
hf77 lamexec lamrestart mpicc mpitask wipe
lamboot lamgrow lamshrink mpiexec povray




Macでの/etc設定はほとんどNetinfoを使用してやるらしい、Linux慣れしてる人にはとっつきにくいがGUIでの設定なのでそれほど手間取らないだろう。


utmcc000:~/x264 SaitouDaisuke$ ps ax | grep nfs
 150  ??  Ss     0:00.00 nfsiod -n 4
 190  ??  Ss     0:00.00 nfsd-master    
 191  ??  S      0:00.00 nfsd-server    
 192  ??  S      0:00.00 nfsd-server    
 193  ??  S      0:00.00 nfsd-server    
 194  ??  S      0:00.00 nfsd-server    
 195  ??  S      0:00.00 nfsd-server    
 196  ??  S      0:00.00 nfsd-server    
12726 p2 S+ 0:00.00 grep nfs
utmcc000:~/x264 SaitouDaisuke$ showmount -e
Exports list on localhost:
/home Everyone
utmcc000:~/x264 SaitouDaisuke$ ps ax | grep nfsd
 190  ??  Ss     0:00.00 nfsd-master    
 191  ??  S      0:00.00 nfsd-server    
 192  ??  S      0:00.00 nfsd-server    
 193  ??  S      0:00.00 nfsd-server    
 194  ??  S      0:00.00 nfsd-server    
 195  ??  S      0:00.00 nfsd-server    
 196  ??  S      0:00.00 nfsd-server    
12784 p2 R+ 0:00.00 grep nfsd
utmcc000:~/x264 SaitouDaisuke$ sudo killall -HUP mountd
Password:
utmcc000:~/x264 SaitouDaisuke$ showmount -e
Exports list on localhost:
/home Everyone
utmcc000:~/x264 SaitouDaisuke$





hosuto-nokonpyuta:~/.ssh host$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/host/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
passphrase too short: have 3 bytes, need > 4              #<-ここ重要
Saving the key failed: /Users/host/.ssh/id_rsa.
hosuto-nokonpyuta:~/.ssh host$ ls -l ~/.ssh
total 8
  • rw-r--r-- 1 host host 1266 Jan 5 13:57 known_hosts
hosuto-nokonpyuta:~/.ssh host$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/host/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/host/.ssh/id_rsa.
Your public key has been saved in /Users/host/.ssh/id_rsa.pub.
The key fingerprint is:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx host@hosuto-nokonpyuta.local
hosuto-nokonpyuta:~/.ssh host$ ls -l ~/.ssh
total 24
  • rw------- 1 host host 1743 Jan 5 14:17 id_rsa
  • rw-r--r-- 1 host host 410 Jan 5 14:17 id_rsa.pub
  • rw-r--r-- 1 host host 1266 Jan 5 13:57 known_hosts
hosuto-nokonpyuta:~/.ssh host$ cat ~/.ssh/id_rsa.pub
ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxx== host@hosuto-nokonpyuta.local
hosuto-nokonpyuta:~/.ssh host$ scp -p ~/.ssh/id_rsa.pub yamadatarou@pcc002:pcc001-host.pub
Password:
id_rsa.pub 100% 410 0.4KB/s 00:00
hosuto-nokonpyuta:~/.ssh host$ ssh yamadatarou@pcc002
Password:
Last login: Fri Jan 5 23:09:11 2007 from hosuto-nokonpyu
Welcome to Darwin!
yamada-tarou-nokonpyuta:~ yamadatarou$ ls
Desktop Library Music Public pcc001-host.pub
Documents Movies Pictures Sites
yamada-tarou-nokonpyuta:~ yamadatarou$ ls -a
. .Xauthority .viminfo Music
.. .bash_history Desktop Pictures
.CFUserTextEncoding .bash_profile Documents Public
.DS_Store .rhosts Library Sites
.Trash .ssh Movies pcc001-host.pub
yamada-tarou-nokonpyuta:~ yamadatarou$ mkdir .ssh
mkdir: .ssh: File exists
yamada-tarou-nokonpyuta:~ yamadatarou$ cat pcc001-host.pub >> ~/.ssh/authorized_keys   #<-ここ重要
yamada-tarou-nokonpyuta:~ yamadatarou$ rm pcc001-host.pub
yamada-tarou-nokonpyuta:~ yamadatarou$ ls .ssh
authorized_keys known_hosts
yamada-tarou-nokonpyuta:~ yamadatarou$ ll
  • bash: ll: command not found
yamada-tarou-nokonpyuta:~ yamadatarou$ ls -l
total 0
drwx------ 9 yamadata yamadata 306 Jan 3 04:11 Desktop
drwx------ 3 yamadata yamadata 102 Oct 2 02:31 Documents
drwx------ 25 yamadata yamadata 850 Oct 7 00:00 Library
drwx------ 3 yamadata yamadata 102 Oct 2 02:31 Movies
drwx------ 3 yamadata yamadata 102 Oct 2 02:31 Music
drwx------ 4 yamadata yamadata 136 Oct 2 02:31 Pictures
drwxr-xr-x 4 yamadata yamadata 136 Oct 2 02:31 Public
drwxr-xr-x 5 yamadata yamadata 170 Oct 2 02:31 Sites
yamada-tarou-nokonpyuta:~ yamadatarou$ ls -la
total 64
drwxr-xr-x 19 yamadata yamadata 646 Jan 6 00:28 .
drwxrwxr-t 5 root admin 170 Oct 2 02:31 ..
  • rw-r--r-- 1 yamadata yamadata 4 Oct 2 02:31 .CFUserTextEncoding
  • rw-r--r-- 1 yamadata yamadata 6148 Oct 1 19:38 .DS_Store
drwx------ 2 yamadata yamadata 68 Jan 5 23:08 .Trash
  • rw------- 1 yamadata yamadata 0 Jan 4 09:13 .Xauthority
  • rw------- 1 yamadata yamadata 2005 Jan 5 23:09 .bash_history
  • rw-r--r-- 1 yamadata yamadata 95 Jan 4 10:23 .bash_profile
  • rw-r--r-- 1 yamadata yamadata 71 Jan 5 13:10 .rhosts
drwx------ 4 yamadata yamadata 136 Jan 6 00:28 .ssh #<-ここ重要
  • rw------- 1 yamadata yamadata 4122 Jan 5 13:42 .viminfo
drwx------ 9 yamadata yamadata 306 Jan 3 04:11 Desktop
drwx------ 3 yamadata yamadata 102 Oct 2 02:31 Documents
drwx------ 25 yamadata yamadata 850 Oct 7 00:00 Library
drwx------ 3 yamadata yamadata 102 Oct 2 02:31 Movies
drwx------ 3 yamadata yamadata 102 Oct 2 02:31 Music
drwx------ 4 yamadata yamadata 136 Oct 2 02:31 Pictures
drwxr-xr-x 4 yamadata yamadata 136 Oct 2 02:31 Public
drwxr-xr-x 5 yamadata yamadata 170 Oct 2 02:31 Sites
yamada-tarou-nokonpyuta:~ yamadatarou$ logout
Connection to pcc002 closed.
hosuto-nokonpyuta:~/.ssh host$ ls
id_rsa id_rsa.pub known_hosts
hosuto-nokonpyuta:~/.ssh host$ cd ~
hosuto-nokonpyuta:~ host$ ssh yamadatarou@pcc002
Enter passphrase for key '/Users/host/.ssh/id_rsa':       #<-ここ重要!これでRSAが有効になった
Last login: Sat Jan 6 00:19:10 2007 from hosuto-nokonpyu
Welcome to Darwin!
yamada-tarou-nokonpyuta:~ yamadatarou$ logout
Connection to pcc002 closed.
hosuto-nokonpyuta:~ host$





hosuto-nokonpyuta:~/.ssh host$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/host/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
passphrase too short: have 3 bytes, need > 4
Saving the key failed: /Users/host/.ssh/id_rsa.
hosuto-nokonpyuta:~/.ssh host$ ls -l ~/.ssh
total 8
  • rw-r--r-- 1 host host 1266 Jan 5 13:57 known_hosts
hosuto-nokonpyuta:~/.ssh host$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/host/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/host/.ssh/id_rsa.
Your public key has been saved in /Users/host/.ssh/id_rsa.pub.
The key fingerprint is:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx host@hosuto-nokonpyuta.local
hosuto-nokonpyuta:~/.ssh host$ ls -l ~/.ssh
total 24
  • rw------- 1 host host 1743 Jan 5 14:17 id_rsa
  • rw-r--r-- 1 host host 410 Jan 5 14:17 id_rsa.pub
  • rw-r--r-- 1 host host 1266 Jan 5 13:57 known_hosts
hosuto-nokonpyuta:~/.ssh host$ cat ~/.ssh/id_rsa.pub
ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx== host@hosuto-nokonpyuta.local
hosuto-nokonpyuta:~/.ssh host$ scp -p ~/.ssh/id_rsa.pub yamadatarou@pcc002:pcc001-host.pub
Password:
id_rsa.pub 100% 410 0.4KB/s 00:00
hosuto-nokonpyuta:~/.ssh host$ ssh yamadatarou@pcc002
Password:
Last login: Fri Jan 5 23:09:11 2007 from hosuto-nokonpyu
Welcome to Darwin!
yamada-tarou-nokonpyuta:~ yamadatarou$ ls
Desktop Library Music Public pcc001-host.pub
Documents Movies Pictures Sites
yamada-tarou-nokonpyuta:~ yamadatarou$ ls -a
. .Xauthority .viminfo Music
.. .bash_history Desktop Pictures
.CFUserTextEncoding .bash_profile Documents Public
.DS_Store .rhosts Library Sites
.Trash .ssh Movies pcc001-host.pub
yamada-tarou-nokonpyuta:~ yamadatarou$ mkdir .ssh
mkdir: .ssh: File exists
yamada-tarou-nokonpyuta:~ yamadatarou$ cat pcc001-host.pub >>





hosuto-nokonpyuta:~/.ssh host$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/host/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
passphrase too short: have 3 bytes, need > 4 #passを3文字にしたらtoo shortで怒られた
Saving the key failed: /Users/host/.ssh/id_rsa.
hosuto-nokonpyuta:~/.ssh host$ ls -l ~/.ssh
total 8
  • rw-r--r-- 1 host host 1266 Jan 5 13:57 known_hosts

#再度チャレンジ
hosuto-nokonpyuta:~/.ssh host$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/host/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/host/.ssh/id_rsa.
Your public key has been saved in /Users/host/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx host@hosuto-nokonpyuta.local
hosuto-nokonpyuta:~/.ssh host$ ls -l ~/.ssh
total 24
  • rw------- 1 host host 1743 Jan 5 14:17 id_rsa
  • rw-r--r-- 1 host host 410 Jan 5 14:17 id_rsa.pub
  • rw-r--r-- 1 host host 1266 Jan 5 13:57 known_hosts
hosuto-nokonpyuta:~/.ssh host$
#うまくできました



LAMMPI Erroer log


error1

ERROR: LAM/MPI unexpectedly received the following on stderr:
bash: line 1: tkill: command not found

LAM failed to execute a LAM binary on the remote node "pcc002".
Since LAM was already able to determine your remote shell as "tkill",
it is probable that this is not an authentication problem.

PLEASE READ THIS ENTIRE MESSAGE, FOLLOW ITS SUGGESTIONS, AND

CONSULT THE "BOOTING LAM" SECTION OF THE LAM/MPI FAQ

(http://www.lam-mpi.org/faq/) BEFORE POSTING TO THE LAM/MPI USER'S

MAILING LIST.


LAM tried to use the remote agent command "ssh"
to invoke the following command:

       ssh pcc002 -n tkill

This can indicate several things. You should check the following:
これは、いくつかのものを示すことができます。あなたは、以下をチェックしなければなりません
       - The LAM binaries are in your $PATH
       - You can run the LAM binaries
       - The $PATH variable is set properly before your 
         .cshrc/.profile exits

Try to invoke the command listed above manually at a Unix prompt.

You will need to configure your local setup such that you will *not*
be prompted for a password to invoke this command on the remote node.
No output should be printed from the remote node before the output of
the command is displayed.

When you can get this command to execute successfully by hand, LAM
will probably be able to function properly.


error2

host@pcc002's password:
ERROR: LAM/MPI unexpectedly received the following on stderr:
Received disconnect from 192.168.11.9: 2: Too many authentication failures for host

LAM failed to execute a process on the remote node "pcc002".
LAM was not trying to invoke any LAM-specific commands yet -- we were
simply trying to determine what shell was being used on the remote
host.

LAM tried to use the remote agent command "ssh"
to invoke "echo $SHELL" on the remote node.

PLEASE READ THIS ENTIRE MESSAGE, FOLLOW ITS SUGGESTIONS, AND

CONSULT THE "BOOTING LAM" SECTION OF THE LAM/MPI FAQ

(http://www.lam-mpi.org/faq/) BEFORE POSTING TO THE LAM/MPI USER'S

MAILING LIST.


This usually indicates an authentication problem with the remote
agent, some other configuration type of error in your .cshrc or
.profile file, or you were unable to executable a command on the
remote node for some other reason. The following is a list of items
that you should check on the remote node:

       - You have an account and can login to the remote machine
       - Incorrect permissions on your home directory (should
         probably be 0755) 
       - Incorrect permissions on your $HOME/.rhosts file (if you are
         using rsh -- they should probably be 0644) 
       - You have an entry in the remote $HOME/.rhosts file (if you
         are using rsh) for the machine and username that you are
         running from
       - Your .cshrc/.profile must not print anything out to the 
         standard error
       - Your .cshrc/.profile should set a correct TERM type
       - Your .cshrc/.profile should set the SHELL environment
         variable to your default shell

Try invoking the following command at the unix command line:

       ssh pcc002 -n 'echo $SHELL'

You will need to configure your local setup such that you will *not*
be prompted for a password to invoke this command on the remote node.
No output should be printed from the remote node before the output of
the command is displayed.
あなたが*not*がパスワードがリモートなノードでこのコマンドを呼び出すために促されると決意するように、あなたはあなたのローカル機構を構成する必要があります。命令の出力が示される前に、出力はリモートなノードから印刷されてはなりません。
When you can get this command to execute successfully by hand, LAM
will probably be able to function properly.

テーブルは 縦棒で くぎります

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

添付ファイル
目安箱バナー