headnode # ssh-keygen -t dsa -f ~/.ssh/id_dsa Generating public/private dsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /private/var/root/.ssh/id_dsa. Your public key has been saved in /private/var/root/.ssh/id_dsa.pub. The key fingerprint is: 2c:40:4d:71:b3:77:61:e9:b9:08:c3:61:43:e8:f4:c1 firstname.lastname@example.org headnode # cat /private/var/root/.ssh/id_dsa.pub > /private/var/root/.ssh/authorized_keys2 headnode # cp /private/var/root/.ssh/id_dsa.pub /export/darwin/head.pubkey The steps are similar for a user other than root, except omit the last step of copying to /export/darwin/head.pubkey
headnode # ls -al ~/.ssh total 32 drwx------ 6 root wheel 204 23 Sep 16:36 . drwxr-x--- 21 root wheel 714 28 Sep 16:35 .. -rw-r----- 1 root wheel 615 20 Sep 16:19 authorized_keys2 -rw------- 1 root wheel 672 8 Nov 11:02 id_dsa -rw-r--r-- 1 root wheel 615 8 Nov 11:02 id_dsa.pub -rw-r--r-- 1 root wheel 971 28 Sep 16:45 known_hosts
headnode # cd /Volumes/darwin headnode # pax -r -w -p e . /export/darwin headnode # cp System/Library/CoreServices/BootX /private/tftpboot/darwin headnode # cp System/Library/Extensions.mkext /private/tftpboot/darwin/mach.macosx.mkext headnode # cp mach_kernel /private/tftpboot/darwin/mach.macosx
headnode # cd /export/darwin headnode # gunzip bandwagon.tar.gz headnode # tar -xf bandwagon.tar
headnode # ./configure
# compute node config file # this file is parsed to: # 1) set the name of the head node # 2) set the hostname for a compute node based on its mac address # 3) build the /etc/hosts file # 4) build the /etc/fstab file # add your head and compute node info here # don't remove the HEAD_NODE tag below, just edit IP and name of your head # the format for cluster nodes is: # IP hostname(no domain) mac-address(colon delimited) # mac address only needed for compute nodes 192.168.1.1 head HEAD_NODE 192.168.1.101 node01 00:0a:95:c4:1f:fa 192.168.1.102 node02 00:01:23:45:67:89 # add additional NFS mounts here, /Users and /cluster required. # these are put into /etc/fstab and loaded into netinfo. # be sure to replace "head" with the name of your head node. # the format for this section is the same as an fstab file, # except that each line is prepended with "FSTAB", i.e. # FSTAB
: nfs -b,-P,-s 0 0 FSTAB head:/Users /Users nfs -b,-P,-s 0 0 FSTAB head:/cluster /cluster nfs -b,-P,-s 0 0
headnode # cd lam-7.1.1 headnode # ./configure --prefix=/cluster/lam --without-fc --with-rsh="ssh -q" <lots of output> headnode # make <lots of output> headnode # make install
headnode # cat hostfile 192.168.1.101 cpu=2 192.168.1.102 cpu=2 192.168.1.103 cpu=2 192.168.1.104 cpu=2
1) Press alt-command-o-f during boot-up to access OpenFirmware At the prompt issue: > printenv This will give you the current values of boot-device and boot-args to record in the event of trouble. Change to the installation values with: > setenv boot-device enet:192.168.1.1,\private\tftpboot\darwin\BootX > setenv boot-args rp=nfs:192.168.1.1:/export/darwin > mac-boot using the ip for your head.
2) If there is a mac OS already installed, issue the command # nvram -p to get a listing of current values, again recording boot-device and boot-args in case of trouble. Then create a file that looks like boot-device enet:192.168.1.1,\private\tftpboot\darwin\BootX boot-args rp=nfs:192.168.1.1:/export/darwin using the ip for your head, and issue the commands # nvram -f <name of file> # reboot
# sge_execdto start the SGE daemon. I have not yet found a way to start this at boot-up.
headnode # cat job_file #!/bin/sh cd /users/blah/mpi lamboot -v ../hostfile mpirun -np 2 ./a.out infile headnode # qsub -cwd job_file your job 217 ("job_file") has been submitted
headnode # /export/darwin/add_user.sh <username>
1 Adapted from http://homepage.mac.com/nand/macosx/netboot.html