Zotac MAG User manual

Zotac MAG User manual
Building your Personal Linux Cluster - User Manual
Dian Putrasahan, Henry Juang and Yunfei Zhang
Computing power is essential for conducting climate and weather research. While super-computing
facilities exist, availability to them are limited. Here, we provide an example on how you can build
your own cost and energy efficient, mini computer cluster to aid in your research. In addition,
we include the installation of an atmospheric model, the Regional (Mesoscale) Spectral Model
(RSM/MSM) and running it.
Hardware Requirements:
• Mini PCs
• Monitor
• Keyboard and mouse
• Router Hub
• ethernet cables
Mini PC used: ”Zotac MAG Intel Atom N330, NVIDIA ION, 2 GB DDR2, 160 GB HD, eSATA,
HDMI HD-ND01-U Mini PC”. It is dual core but does not come with the OS, though compatible
with Linux.
To make the set up cost as low as possible, operating system, compilers and software programs are
all open source.
Software Requirements:
• Linux Operating System (Fedora)
• C compiler (gcc)
• Fortarn90 compiler (gfortran)
• MPI (mpich2)
For the purposes of this manual, the colors are coded as follows:
Red is for emphasis
Blue for commands in unix/linux environment
Blue and underlined indicate links to click on
Brown for website address
1
Green for outputs to screen
Black for normal text or comments
Some file edits in vi mode are in dark grey for easier reading with indentations.
1. Download and Installation of Operating System
Fedora 14 was downloaded and used as the operating system for the linux box. A USB boot
disk was created in order to install Fedora (http://www.webupd8.org/2009/04/4-ways-to-createbootable-live-usb.html).
a. Creating a Live USB boot disk
i. Download Fedora Live Desktop Edition (x86 64) unto USB and desktop (∼/CompCluster)
from http://fedoraproject.org/en/get-fedora-all
Filename: Fedora-14-x86 64-Live desktop.iso
ii. Open a Terminal (under Utilities)
iii. Run diskutil list to get the current list of devices
iv. Insert your flash media
v. Run diskutil list again and determine the device node assigned to your flash media (e.g.
/dev/disk1)
vi. Run diskutil unmountDisk /dev/diskN
diskutil unmountDisk /dev/disk1
vii. Execute sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m
sudo dd if=/Users/hostname/CompCluster/Fedora-14-x86 64-Live-Desktop.iso of=/dev/disk1
bs=1m
Output to screen:
687+0 records in
687+0 records out
720371712 bytes transferred in 412.327442 secs (1747087 bytes/sec)
viii. Run diskutil eject /dev/diskN and remove your flash media when the command completes
diskutil eject /dev/disk1
b. Installation of Fedora 14
i. First boot to get ZOTAC to boot from USB disk.
2
• Plug in USB Fedora Live Drive
• Turn on ZOTAC and hold down Delete button until the BIOS setup utility screen shows
up
• Right key (3x) to Boot tab
• Scroll to Hard Dish Drives and press enter
On screen:
1st Drive [SATA: 3M-SMASUNG HM]
2nd Drive [USC: SMI USB DISK]
• Select 1st Drive (press enter)
• Press down key to select USB:SMI USB DISK
• Press enter to choose
Note that the 1st and 2nd Drive will swap places
• Press ESC to exit to previous screen.
• Right key (3x) to Exit tab
• Press enter twice to save configuration changes and exit set up.
It will automatically boot into Fedora Live Disk. Fedora will boot and login screen
appears (∼2mins)
ii. Second boot to install Fedora.
• Automatic Login
• Click onto Install Hard Drive
• Click Next onto language (US English)
• Choose ’Basic Storage Devices’, click Next
• Create Hostname: CompCluster/ CompCluster2
• Choose Location: America/Los Angeles
• Enter root password
• Select which type of installation you would like => Use all space
• Choose ATA SAMSUNG HM161HI and set it to install target drive, click Next
• Confirm message window: Click on Write Changes to Disk
Installation would take about
• Fedora Installer window: click close after installation complete
• Go to System, choose Shut Down
• Choose Restart
• Press on Delete Key as it restarts
iii. Third boot to set boot always from Fedora on desktop.
BIOS SETUP UTILITY menu:
• Go to Boot tab
3
• Hard Disk Drives
• Swap the 2 drives
• Press ESC to exit to previous screen.
• Right key (3x) to Exit tab
• Press enter twice to save configuration changes and exit set up.
Welcome screen to Fedora comes up
• Click Forward
• Create Username
• Create Password
Once setting is all done, Fedora is ready to be used.
2. Download and Installation of C and Fortran90 compiler
a. Download C and Fortran90 compiler
• Download gcc and gfortran for Fedora 14:
http://pkgs.org/fedora-14/fedora-x86 64/gcc-gfortran-4.5.1-4.fc14.x86 64.rpm.html
• Click on:
’To download gcc-gfortran-4.5.1-4.fc14.x86 64.rpm for Fedora 14 distribution select mirror.’
This takes you to: http://pkgs.org/download/fedora-14/fedora-x86 64/gcc-gfortran-4.5.1-4.fc14.x86 64.rpm.html
• Select: binary package
b. Installation of C and Fortran90 compiler
• Go to Downloads folder
• Double click: gcc-gfortran-4.5.1-4.fc14.x86 64.rpm
This will begin the process of installation. Upon finishing, they will list other softwares that
need to be installed, as well as updates.
Output to screen will show:
Following softwares needs to be installed (21.4MB):
gcc-4.5.1-4.fc14 (x86 64)
ppl-0.10.2-10.fc12 (x86-64)
libgomp-4.5.1-4.fc14 (x86 64)
cpp-4.5.2-4.fc14 (x86-64)
cloog-ppl-0.15.7-2.fc14 (x86 64)
glibc-headers-2.13-1 (x86 64)
kernel-headers-2.6.35.11-83.fc14 (x86 64)
4
gcc-gfortran-4.5.1-4.fc14 (x86 64)
libmpc-0.8.1-1.fc13 (x86 64)
libgfortran-4.5.1-4.fc14 (x86 64)
binutils-2.20.51.0.7-6.fc14 (x86 64)
Update the following softwares (17.8MB):
glibc-2.13-1 (x86 64)
glibc-common-2.13-1 (x86 64)
• Click ’Continue’
Authentication required to install signed package (super user):
• Enter super user password
• This will continue and complete the installation.
• To check:
man gcc
man gfortran
3. Download and Installation of MPICH2
a. Download MPICH2 and MPICPH2-devel
• Download MPICH2 and MPICH2-devel for Fedora 14:
http://pkgs.org/fedora-14/fedora-x86 64/mpich2-1.2.1p1-8.fc14.x86 64.rpm.html
• Click on:
’To download mpich2-1.2.1p1-8.fc14.x86 64.rpm for Fedora 14 distribution select mirror.’
This takes you to: http://pkgs.org/download/fedora-14/fedora-x86 64/mpich2-1.2.1p1-8.fc14.x86 64.rpm.html
• Select: binary package
• Download MPICH2 and MPICH2-devel for Fedora 14:
http://pkgs.org/fedora-14/fedora-x86 64/mpich2-devel-1.2.1p1-8.fc14.x86 64.rpm.html
• Click on:
’To download mpich2-devel-1.2.1p1-8.fc14.x86 64.rpm for Fedora 14 distribution select mirror.’
This takes you to: http://pkgs.org/download/fedora-14/fedora-x86 64/mpich2-devel-1.2.1p18.fc14.x86 64.rpm.html
• Select: binary package
b. Installation of MPICH2 and MPICH2-devel
• Go to Downloads folder
• Double click: mpich2-1.2.1p1-8.fc14.x86 64.rpm
This will begin the process of installation. Upon finishing, they will list other softwares that
5
need to be installed.
Output to screen will show:
Following softwares also needs to be installed: 12.3MB
environment-modules-3.2.8-1.fc14 (x86 64)
perl-Module-Pluggable-1:3.90-141.fc14 (noarch)
perl-4:5.12.3-141.fc14 (x86 64)
perl-libs-4:5.12.3-141.fc14 (x86 64)
perl-threads-1.81-1.fc14 (x86 64)
perl-Pod-Escapes-1:1.04-141.fc14 (x86 64)
perl-threads-shared-1.32-141.fc14 (x86 64)
perl-Pod-Simple-1:3.13-141.fc14 (noarch)
mpich2-1.2.1pl-8.fc14 (x86 64)
• Click ’Continue’
Authentication required to install signed package (super user):
• Enter super user password
• This will continue and complete the installation of MPICH2
• Back to Downloads folder
• Double click: mpich2-devel-1.2.1p1-8.fc14.x86 64.rpm
• This will complete the installation of MPICH2-devel
4. Getting the PCs to Communicate With One Another
a. Enable SSH on all machines
• Login as a root user
su –login
• Check if ssh is installed and its status
/sbin/service sshd status
openssh-daemon is stopped
• Generate ssh and turn necessary sshd on
/sbin/service sshd start
Generating SSH2 RSA host key: [OK]
Generating SSH1 RSA host key: [OK]
Generating SSH2 DSA host key: [OK]
Starting sshd: [OK]
chkconfig –list sshd
sshd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chkconfig –level 345 sshd on
chkconfig –list sshd
6
sshd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
• Make sure it is done on all machines, and check sshd status
/sbin/service sshd status
openssh-daemon (pid 1572) is running [CompCluster]
openssh-daemon (pid 5633) is running [CompCluster2]
exit [logout from root user]
• Opening port 22 to make sure SSH works using GUI on computer
system-config-firewall
Under ”Trusted Services”, make sure SSH is enabled
Under ”Other Ports”, add ”Port 22” for both tcp and udp
Click ”Apply”, then ”Disable” and then ” Enabled”
• IP address of each machine
ifconfig -a
192.168.1.72
192.168.1.80
• Giving a fixed IP address for the machines
http://192.168.1.254/
Go to ”Settings”, then to ”LAN”, then ”IP address allocation”
Find the Device with IP address that matches (192.168.1.72)
Set ”Address Assignment” to Private Fixed: 192.168.1.72
Click ”Save”
(Do the same for second machine, 192.168.1.80)
• Accessing via SSH from local network only, not from outside
ssh [email protected] [ssh [email protected]]
ssh [email protected] [ssh [email protected]]
• Accessing via SSH from outside
http://192.168.1.254/
Go to ”Settings”, then ”Firewall”
Select/Click ”Choose ZOTAC (192.168.1.72)”
Select ”Allow individual application(s) - .........”
Go to ”Application List”
Select ”SSH Server”
Click ”Add”
Click ”Save”
Go back to ”Settings”, then ”Broadband”, then ”Status”
IP address from outside: 99.52.102.82
ssh [email protected]
• Remove firewall on CompCluster2
system-config-firewall
7
On CompCluster, in ”Trusted Interface” tab, [eth+ and wlan+] were checked.
On CompCluster2, under ”Options”, select ”Disable Firewall”.
• Automatic SSH from CompCluster to CompCluster2 and vice versa
On CompCluster,
cd .ssh/
ssh-keygen
Generating public/private rsa key pair
Enter file in which to save the key (/home/username/.ssh/id rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id rsa.
Your public key has been saved in /home/username/.ssh/id rsa.pub.
The key fingerprint is: [whole string of alphanumerics]
This should produce id rsa and id rsa.pub
On CompCluster2, (no .ssh folder)
ssh-keygen -t rsa
Create authorized keys file in ∼/.ssh folder for each computer.
Copy id rsa.pub from CompCluster2 and paste in authorized keys of CompCluster. Do the
same for id rsa.pub from CompCluster and paste onto authorized keys of CompCluster2
Make sure that the user directory (/home/username) and ∼/.ssh folders are on 755 mode
and authorized keys is on 644 mode.
b. NFS Server Installation
NFS allows us to create a folder on the master node and have it synced on all the other nodes.
This folder can be used to store programs.
• On all machines, install NFS
yum install nfs-utils
• On all machines, make a folder to store data and programs in this folder.
mkdir /mirror
/etc/init.d/rpcbind start
/etc/init.d/nfs start
• On the master node, edit /etc/exports file on the CompCluster (master node) to contain an
additional line
vi /etc/exports
/mirror 192.168.1.0/24(rw,async)
• Restart rpcbind and nfs
/etc/init.d/rpcbind restart
8
/etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [OK]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
• On computational nodes, mount the folder on the other nodes
mount -t nfs CompCluster:/mirror /mirror
• On computational nodes, change fstab in order to mount it on every boot. Edit /etc/fstab
and add a line.
vi /etc/fstab
CompCluster:/mirror /mirror nfs defaults 1 2
c. MPI Cluster Formation
• Find host name for each machine:
su –login
view /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=CompCluster
HOSTNAME=CompCluster2 [second machine]
• Find their IP addresses:
ifconfig -a
192.168.1.72
192.168.1.80
• Hostname and IP address must match on each machine
vi /etc/hosts
#Do not remove the following line or various programs that require network functionality
will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.72 CompCluster #Added by NetworkManager
192.168.1.80 CompCluster2 #Added by NetworkManager
#::1 CompCluster localhost6.localdomain6 localhost6
chkconfig sendmail off
exit [logout from super user account]
• Create list for mpd hosts on each machine
vi ∼/mpd.hosts
CompCluster:2
9
CompCluster2:2
• Create mpd secret word in home directory
touch .mpd.conf
chmod 600 .mpd.conf
vi .mpd.conf
MPD SECRETWORD=<secret word>
• Test mpd
On CompCluster,
mpdboot -n 2 –ncpus=2 -f /home/username/mpd.hosts
mpdtrace -l
CompCluster 33400 (192.168.1.72)
CompCluster2 35000 (192.168.1.80)
mpiexec -n 4 /bin/hostname
CompCluster
CompCluster
CompCluster2
CompCluster2
On CompCluster2,
mpdtrace -l
CompCluster2 35000 (192.168.1.80)
CompCluster 40935 (192.168.1.72)
mpiexec -n 4 /bin/hostname
CompCluster2
CompCluster
CompCluster2
CompCluster
mpdallexit
5. Download and Installation of SVN
In order to get RSM/MSM, you would need Subversion (SVN) repository control system.
a. Download SVN
• Go to http://subversion.apache.org/
• In the left column, under ’Getting Subversion’, click on Binary Packages
• Click on Fedora Project
• In the left column, click on Builds
10
• Search of subversion
• Click on subversion-1.6.16-1.fc14.x86 64 [F-14-x86 64-u Commit: Joe Orton , License: ASL
1.1, Score: 5 ]
• Click on Fedora 14 -x86 64 - Updates
This should begin the download for subversion-1.6.16-1.fc14.x86 64.rpm
b. Installation of SVN
• Go to Downloads folder
• Double click: subversion-1.6.16-1.fc14.x86 64.rpm
This will begin the process of installation. Upon finishing, they will list other softwares that
need to be installed.
Output to screen will show:
Following softwares also needs to be installed:
subversion-1.6.16-1.fc14 (x86 64)
perl-URI-1.54-2.fc14 (noarch)
subversion-libs-1.6.16-1.fc14 (x86 64)
• Click ’Continue’
Authentication required to install signed package (super user):
• Enter super user password
• This will continue and complete the installation.
6. Download, Installation and Running RSM/MSM
We will use SVN to download RSM/MSM into /mirror folder. This way, we only need to download
and compile them all once. Perform the download and installation in the master node (CompCluster).
a. Download RSM/MSM
• Create the folder to download the model
su –login
cd /mirror
mkdir Model/ Model/GRMSM
cd Model/GRMSM
• Download the model using SVN
svn co https://grmsm.svn.sourceforge.net/svnroot/grmsm grmsm
Creates grmsm/ and its subfolders: .svn/ sys/ usr/
11
• Change mode of /mirror/Model
The mode of /mirror does not allow users to edit and save files. As such, we had to change
the mode of the directory and subdirectories.
cd /mirror
chmod -R 757 Model/
exit [logout from super user account]
b. Installation of RSM/MSM
Basics of installing RSM/MSM can be found in usr/doc/INSTALL
i. Install library
• Go to sys/lib and remove all existing libraries
cd sys/lib
rm *.a *.la
• Go sys/lib/incmod and remove all existing modules
cd sys/lib/incmod
rm -rf *
• Go to sys/lib/src, edit compile.sh and choose MACHINE. Then run compile.sh
cd sys/lib/src
vi compile.sh
export MACHINE=${MACHINE:-linux gfortran}
./compile.sh >& compilelibsrc.log
You should see libg2 4.a, libw3 4.a, libw3 d.a , libw3 8.a, libbacio 4.a, libbacio 8.a, libjasper.a, libz.a, libpng12.a,libpng.a,
If you use a machine we don’t support, please install the libraries manually.
ii. Install utilities
• Go to sys/utl and run compile
cd sys/utl
./compile >& compileutl.log
iii. Compile RSM source code
• Go to sys/src/rsm pgrb.fd, compile rsm pgrb
cd sys/src/rsm pgrb.fd
make -f makefile awips gfortran
Successful compilation should produce rpgbnawips.x under sys/utl
12
c. Running Test Case
Run a test case to check that the cluster works and RSM/MSM is able to use all the CPUs for its
model integration. This is performed in usr/exp/ , and run the test case from the computational
node (CompCluster2).
gfsp2rsm preprocesses GFS pressure level data to RSM background
rsm2msm will do RSM nonhydrostatic run using RSM background
The test case will use gfsp2rsm to create the RSM background files, and then run rsm2msm using
RSM background files previously made.
i. Preprocess the GFS sigma data into RSM domain
• Go to usr/exp/gfsp2rsm and edit configure
cd usr/exp/gfsp2rsm
vi configure
export SDATE=${SDATE:-2011081500}
export MACHINE=linux gfortran
export IBMSP=no
export NEST=P2R # G2R C2R P2R N2R
if [ -s /ptmp ]; then
export TEMP=/ptmp/${USERID}/$EXPN #output top directory
else
# export TEMP= /Model/TMPDIR/$EXPN
export TEMP=/mirror/Model/GRMSM/TMPDIR/$EXPN
mkdir -p $TEMP
fi
export BASEDIR=/mirror/Model/GRMSM/DATA/gfs/$SDATE
• Compile gfsp2rsm
./compile >& compile gfsp2rsm.log
This creates exe folder and Model/TMPDIR folder.
exe folder contains rmtn.x and rinp.x
TMPDIR holds gfsp2rsm/dir cmp, which contains model code and define.h files
• Edit down gfs.sh
vi down gfs.sh
export DTOOL=curl # wget or curl (download tool choice)
export SDATE=${SDATE:-2011081500}
export DATADIR=${BASEDIR:-/mirror/Model/GRMSM/DATA/gfs/$SDATE}
export DISKSYS=${DISKSYS:-/mirror/Model/GRMSM/grmsm/sys}
• Edit run.sh and run gfsp2rsm
Note that run.s is for ibm xlf, while run.sh is for linux.
13
vi run.sh
export SDATE=2011073000
./run.sh >& run gfsp2rsm.log
ii. Run MSM using RSM background files made from GFS sigma data
• Go to usr/exp/rsm2msm and edit configure
Note that you can find all config terms and comments in sys/opt/rsm default.option
cd usr/exp/rsm2msm
vi configure
export SDATE=${SDATE:-2011081500}
if [ -s /ptmp ]; then
export TEMP=/ptmp/${USERID}/$EXPN #output top directory
else
# export TEMP= /Model/TMPDIR/$EXPN
export TEMP=/mirror/Model/GRMSM/TMPDIR/$EXPN
fi
export BASEDIR=/mirror/Model/GRMSM/TMPDIR/gfsp2rsm/201108/r2011081500.05
# machine dependent
# compile options for ibm xlf, mac intel, mac absoft, mac xlf, linux pgi, linux gfortran
export MACHINE=linux gfortran
export MPICH=yes
export NCOL=2
export NROW=2
# machine dependent cpp
export IBMSP=no
export FFT99M=yes
export RUNENV=’mpiexec -s all -n 4 ’
• Compile rsm2msm
./compile >& compile rsm2msm.log
This creates exe folder and Model/TMPDIR/rsm2msm/dir cmp folder.
exe folder contains rmtn.x, rinp.x and rsm.x
TMPDIR holds rsm2msm/dir cmp, which contains model code and define.h files
• Edit run.sh
Note that run.s is for ibm xlf, while run.sh is for linux.
vi run.sh
export SDATE=2011081500
mpdboot -n 2 –ncpus=2 -f /home/dputrasa/mpd.hosts
mpdtrace -l
export RUNENV=’mpiexec -s all -n ’${NPES}
14
$JSHDIR/rsm fcst.sh
mpdtrace -l
mpdallexit
• Run rsm2msm
This needs to be done from the computational node (CompCluster2).
cd /mirror/Model/GRMSM/grmsm/usr/exp/rsm2msm
./run.sh >& run rsm2msm.log
• Check the loads on the nodes
ssh CompCluster ”uptime”
13:30:23 up 51 days, 2:14, 8 users, load average: 2.29, 1.03, 0.43
ssh CompCluster2 ”uptime”
14:04:30 up 51 days, 1:24, 3 users, load average: 2.05, 2.06, 1.93
Output layout:
– time on computer, up for number of days, up for number of hours:minutes, number
of users, load average
– load average: last 3 numbers represents:
– load for last minute
– load for last 5 minutes
– load for last 15 minutes
7. Cluster Setup without Internet
This is VERY SIMILAR to the above case except without internet and using a simple ethernet
hub.
Using the machines that have perviously been set up, we now hook them up to a Netgear DS-104
ethernet hub.
a. IP Address of each machine
Please make sure that each machine is assigned an IP address. They should share the same
gateway.
• Disable wireless network
• Go to System -> Preferences -> Network Connections
• Under Wired tab, click on <Auto eth0> and then click on ”Edit”
Uncheck Connect automatically
Copy Device MAC address
Click ”Save”
15
• Back on the Wired tab, click Add
Edit ”Connection name:” <Eth0 on Netgear>
Check ”Connect automatically”
Paste ”Device MAC address” from <Auto eth0>
• Go to ”IPv4 Settings” tab
• On Method, choose Manual
Click Add
Address: 192.168.1.72
Netmask: 255.255.255.0
Gateway: 192.168.0.1
Click Save
b. Enable SSH
Make sure you can SSH from one machine to another and vice versa.
• On both nodes, check status of SSH
su –login
/sbin/service sshd status
openssh-daemon (pid 3567) is running [CompCluster]
openssh-daemon (pid 5312) is running [CompCluster2]
exit [logout from root user]
• ssh from master to computational node
ssh [email protected]
• ssh from computational to master node
ssh [email protected]
c. Enable NFS server
Check and make sure that NFS is working on the cluster. You must be able to to see the contents
of /mirror from CompCluster2.
• On master node, start rpcbind and nfs, then edit /etc/exports file on the CompCluster
(master node) to contain an additional line
/etc/init.d/rpcbind start
/etc/init.d/nfs start
vi /etc/exports
/mirror 192.168.1.0/24(rw,async)
• Restart rpcbind and nfs on master node
/etc/init.d/rpcbind restart
16
/etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [OK]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
• On computational nodes, start rpcbind and nfs, then mount the folder on the other nodes
/etc/init.d/rpcbind start
/etc/init.d/nfs start
mount -t nfs 192.168.1.72:/mirror /mirror
• On computational nodes, change fstab in order to mount it on every boot. Edit /etc/fstab
and add a line.
vi /etc/fstab
192.168.1.72:/mirror /mirror nfs defaults 1 2
d. Enable MPI
This is to make certain that the machines can communicate with one another, test and ensure mpd
works.
• Check host name for each machine:
su –login
view /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=CompCluster
HOSTNAME=CompCluster2 [second machine]
• Hostname and IP address must match on each machine
vi /etc/hosts
#Do not remove the following line or various programs that require network functionality
will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.72 CompCluster
192.168.1.80 CompCluster2
#::1 CompCluster localhost6.localdomain6 localhost6
chkconfig sendmail off
exit [logout from super user account]
• Check list for mpd hosts on each machine
vi ∼/mpd.hosts
17
CompCluster:2
CompCluster2:2
• Check mpd secret word in home directory
touch .mpd.conf
chmod 600 .mpd.conf
vi .mpd.conf
MPD SECRETWORD=<secret word>
• Test mpd on cluster
On CompCluster,
mpdboot -n 2 –ncpus=2 -f /home/username/mpd.hosts
mpdtrace -l
CompCluster 33400 (192.168.1.72)
CompCluster2 35000 (192.168.1.80)
mpiexec -n 4 /bin/hostname
CompCluster
CompCluster
CompCluster2
CompCluster2
On CompCluster2,
mpdtrace -l
CompCluster2 35000 (192.168.1.80)
CompCluster 40935 (192.168.1.72)
mpiexec -n 4 /bin/hostname
CompCluster2
CompCluster
CompCluster2
CompCluster
mpdallexit
e. Test run of RSM/MSM
Perform a test case of rsm2msm from CompCluster2
• Make sure there’s no directory clash
cd /mirror/Model/GRMSM/TMPDIR/rsm2msm
mv 201108/ 201108ATT/
• Run a test case
cd /mirror/Model/GRMSM/grmsm/usr/exp/rsm2msm
./run.sh >& run rsm2msm.new.log
18
You can check the output in /mirror/Model/GRMSM/TMPDIR/rsm2msm/201108/r2011073000.05
8. Domain Set Up for RSM/MSM
Again, we will run gfsp2rsm and then rsm2msm.
gfsp2rsm downloads GFS pressure level data, extracts and interpolates the GFS pressure level data
from GRIB- formatted files to the RSM model grids.
To set this up, first define a model coarse domain which we call RSM0. RSM0 domain is a little
larger than the real model domain but the same resolution. The RSM supports Polar stereographic
and Mercator projections.
gfsp2rsm uses down gfs.sh to download the GFS data from the NCEP NOMADS server. The
NCEP NOMADS server support grib filter which is used to access a subset of a GFS data file. The
regional subset of GFS file include left longitude, right longitude, top latitude, and bottom latitude
which are decided by the RSM0 domain. If you already have the GRIB files, just link them as
pgbfXX, where XX means the forecast hour.
gfsp2rsm also support the additional SST files. Link them as sstfXX and set NEWSST=.true.
The projection of the simulation domain needs to be defined, as with the size and location of
all model grids.
You can use MSM google map tool (web browser, http://99.15.69.103/) provided by Shyh Chen,
or sys/utl/rsmmap.sh to create your domain.
a. Grid Set-up of gfsp2rsm
Go to usr/exp/gfsp2rsm and edit configure
The following variables in file configure should be set up:
LEVS
level of the outside grid
CIGRD1
lon grid number of the outside grid +1
CJGRD1
lat grid number of the outside grid +1
IGRD
lon grid number of the RSM0 domain
JGRD
lat grid number of the RSM0 domain
LEVR
the model level The next part is the location of RSM
RPROJ
is the projection index.
0 is Mercater,
1 for north polar stereographic projection,
-1 for south polar stereographic projection
4 for lon-lat grid
19
RTRUTH
is the latitude where the map plane cuts through the earths surface
for Mercater, use the north latitude.
for north polar projection, it is fixed as 60.
for south polar projection, it is fixed as -60.
RORIENT is the longitude which is parallel to the y-axis for Mercater. It can be any value.
RDELX
The grid spacing (meter) in x-direction at TRUTH.
RDELY
The grid spacing (meter) in y-direction at TRUTH.
RCENLAT The reference latitude
for Mercater, it can be any latitude
for north polar projection, it is fixed as 90.
for south polar projection, it is fixed as -90.
RCENLON The reference longitude
for Mercater, it can be any longitude
for north or south polar projection, it’s fixed as 0.
RLFTGRD =[X(CENLON,CENLAT)-X(i=1,j=1)]/DELX + 1
RBTMGRD=[Y(CENLON,CENLAT)-Y(i=1,j=1)]/DELY + 1
The last two definitions can be understood as the (i,j) of the reference point, (CENLON,CENLAT) related
to the origin point (1,1) of the regional domain.
CLAT1
the bottom lat
CLAT2
the top lat
CLON1
the left lon
CLON2
the right lon
Note that names starting with R are for regional domain and names beginning with C are for outer coarse grid.
i. RSM domain choice:
You may use google maps to figure out your domain on a web browser, courtesy of Shyh
Chen.
Go to http://99.15.69.103/ and click on ”RSM/MSM domain setting”
• RCENLAT and RCENLON gives the location of the ”red balloon”. Either change
the number in the boxes or move the red balloon, to adjust your central latitude and
longitude.
RDELX and RDELY is your horizontal resolution. Note that on the web browser, units
are in km while in configure file, units are in m.
• IGRD and JGRD are the total number of grid points for x- and y- directions respectively.
There are some constraints to the number of points you can choose from. Since the model
uses FFT, number of points are limited to the product of exponentials of 2 and 3 only.
IGRD = 2m x 3n , where m and n are integers 0, 1, 2, 3, etc.
JGRD = 2k x 3l , where k and l are integers 0,1, 2, 3, etc.
• RLFTGRD indicates number of points to the left of RCENLON
20
RBTMGRD indicates number of points below RCENLAT
• For example, let’s set up a domain over Taiwan. Choose these options in the browser
RCENLAT = 24
RCENLON = 121
IGRD = 24 x 3 = 48
JGRD = 48
RDELX=15
RDELY=15
RLFTGRD = 24
RBTMGRD = 24
• Then click on ”Redraw” and you can now see the domain it covers. Drag red balloon
to your desired central location and reclick on ”Redraw” again to update new domain.
Once you are satisfied with your grid, key in the values onto ”configure” file.
• RTRUTH and RORIENT should be the same as RCENLAT and RCENLON, respectively. So for the current example,
RTRUTH = 24
RORIENT = 121
ii. GFSp domain set up:
Instead of downloading the whole global data set, you can specify the domain you want and
download only that specific region. Continue from the above example.
• Go back to the google map tool, drag the red balloon to the left bottom border of the
red box and note the latitude and record it in ”configure” file.
CLAT1 = 21
• Drag balloon to top border of red box,
CLAT2 = 27
• Drag balloon to left border of red box, and note longitude and record in ”configure” file.
CLON1 = 118
• Drag balloon to right border of red box,
CLON2 = 124
• Compute CIGRD1 and CJGRD1, then key them into ”configure” file.
CIGRD1 = (CLON2 - CLON1) * 2 + 1 = (124-118)*2+1 = 13
CJGRD1 = (CLAT2 - CLAT1) * 2 + 1 = (27-21)*2+1 = 13
iii. Other options in configure file
TEMP
the temp directory where output is placed
BASEDIR the GFS data directory where data is stored
MACHINE your machine
21
IBMSP
IBMSP or not
FFT99M
use model fft lib (typically is ”yes”)
DCRFT
IBM fft lib
GTOPO30 use 30” data or not
NCLDB
cloud variables of the outside grid
NCLD
cloud variables of the model grid
iv. Once you have made the necessary changes to your configure options, compile the code.
./compile >& compile gfsp2rsm.log
If the compilation was successful, you should find rmtn.x and rinp.x under usr/exp/gfsp2rsm/exe
v. Run gfsp2rsm to get your background RSM files
• Edit down gfs.sh
DTOOL
download tool choice (curl or wget)
CYC
choose cycle
• Edit run.sh, then run gfsp2rsm
Note that run.s is for ibm xlf, while run.sh is for linux.
ENDHOUR forecast length
MTNRES resolution of the terrain data
SDATE
the start day
• ./run.sh >& run gfsp2rsm.log
If the run was successful, you should find r sig.fXX and r sfc.fXX in $TEMP directory.
b. Grid Set-up of rsm2msm
Once you have ran gfsp2rsm to get the RSM background files, you can now prepare the domain to
run MSM.
For rsm2msm, it is similar to gfsp2rsm, except the outside grid is now RSM. As such, the names
starting with R are for regional MSM domain and names beginning with C are for outer RSM grid.
Note that the outside grid should be the same projection and resolution with the model grid for
using Mean Bias Correction (MBC) option.
Go to usr/exp/rsm2msm and edit configure
i. RSM outer domain Set-up
• We continue with previous example for Taiwan domain, make following edit in ”configure” file.
Most of the names starting with C correspond to names starting with R in gfsp2rsm.
CPROJ=0.
22
CCENLAT = 24.
CCENLON = 121.
CDELX=15.
CDELY=15.
CLFTGRD = 24.
CBTMGRD = 24.
CTRUTH = 24.
CORIENT = 121.
• CIGRD and CJGRD would need an extra point each.
CIGRD = 24 x 3 +1 = 49
CJGRD = 49
• CLAT1, CLAT2, CLON1, CLON2 does not matter. Leave them as 0.
ii. MSM domain Set-up
The inner MSM domain is smaller than RSM. We can keep the resolution and center latitude
and longitude the same, but the number of grid points would be less than that of RSM.
• Perform following changes in ”configure” file.
RPROJ = 0.
RCENLAT = 24
RCENLON = 121
RDELX=15
RDELY=15
• We will use a smaller grid for MSM, but the same rules for choosing IGRD and JGRD
applies.
RLFTGRD = 18
RBTMGRD = 18
IGRD = 22 x 32 = 36
JGRD = 36
iii. Other configure options to consider
TEMP
the temp directory
BASEDIR the RSM0 data directory
MACHINE your machine
MARCH
mpi or not
LAMMPI
lammpi or not
MPICH
mpich or not
NCOL
cpu number on column
NROW
cpu number on row
23
NODES
node number on IBMSP machine
MP
mpi or not
THREAD openmp or not
IBMSP
ibmsp or not
FFT99M
use model fft lib
DCRFT
IBM fft lib
NONHYD nonhyd or not
RKN
single point output
RAS
ras
SAS
sas
NUMP3D microphysics, 3 ferrier, 4 zhao
NUMP2D microphysics, 1 ferrier, 3 zhao
GTOPO30 use 30” data or not
NCLDB
cloud variables of the outside grid
NCLD
cloud variables of the model grid
CHGTLEV upper layer rayleigh damping
MBC
mean bias correction
LBC
local mean bias correction
iv. Once you have made the necessary changes to your configure options, compile the code.
./compile >& compile rsm2msm.log
If the compilation was successful, you should find rmtn.x, rinp.x and rsm.x under usr/exp/rsm2msm/exe
v. More edits in configure that pertain to the actual run
RUNENV mpi run command
ENDHOUR forecast length
TIMESTEPtimestep
MTNRES resolution of the terrain data
SDATE
the start day
vi. Run rsm2msm
• Edit run.sh, then run rsm2msm
Note that run.s is for ibm xlf, while run.sh is for linux.
SDATE
the start day
RUNENV mpi run command
• ./run.sh >& run rsm2msm.log
If the run was successful, you should find r sig.fXX, r sfc.fXX and r pgb.fXX in $TEMP
directory.
24
rsm pgrb will interpolate the RSM sigma level data to the pressure data and create the
GRADS control file, which we can then use on GRADS to check the model result.
• If you are using qsub, then modify qsub sample (username, NCPUS and directory of
rsm2msm)
qsub qsub sample
Use ”qstat” to check the status of your run.
25
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement