Professional Documents
Culture Documents
Rocks
Some
examples
of
the
command
line
are
a. List
all
hosts
in
a
cluster
# rocks list host
c. List
attributes
of
a
particular
host
d. Generate
dhcp,
dns,
hosts
files
for
the
cluster
# rocks report host # rocks report host dhcpd frontend # rocks report resolv
without
any
arguments.
Get
help
for
each
of
the
command
line
utilities
using
# rocks <command line> help
Some commands can only be run as root. a. Any command that changes information in the database, can only be run as root. b. Most other commands that list and report contents from the database, can be run as a normal user.
2. Adding
Users
to
a
Rocks
Cluster
Adding
users
to
a
Rocks
cluster
is
done
as
a
two-step
process.
a. Add
the
user
to
the
Frontend
normally,
as
you
would
on
any
other
Linux/Unix
machine
# useradd <username> # passwd <username> Changing password for user <username>. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully.
b. Now
sync
the
user
to
all
the
other
nodes
in
the
cluster
This
now
adds
the
user
to
all
the
machines
in
the
cluster.
3. Adding
Software
to
a
Rocks
Cluster
Adding
software
to
a
cluster
means
being
able
to
access
the
software
on
all
the
machines
that
are
a
part
of
the
cluster.
There
are
2
ways
of
adding
software
to
a
Rocks
Cluster.
a. We
can
install
the
software
in
a
shared
location.
This
means
the
software
will
be
accessible
on
all
machines
of
the
cluster
with
the
same
path.
i. /share/apps
is
a
global
shared
location
for
the
cluster.
Just
install
the
software
in
/export/apps
on
the
frontend.
ii. /home/username
is
a
user-specific
shared
location
for
the
cluster.
b. We
can
use
a
software
package
(RPM),
and
use
the
Rocks
software
installation
insfrastructure
to
install
software
on
all
machines
of
the
cluster.
i. We
can
download
an
RPM
from
a
trusted
source
ii. We
can
create
our
own
RPM
using
the
Rocks
build
infrastructure.
iii. We
can
create
an
RPM
using
rocks
create
package
# rocks create package <directory> <name> # ls /root/extra anaconda-ks.cfg install.log install.log.syslog rocks-post.log rocks-post.sh rocks-pre.log rocks-pre.sh # rocks create package /root/extra rocks-root-extra version=2 release=3 some output ... # ls *.rpm rocks-root-extra-2-3.x86_64.rpm # rpm -qlp rocks-root-extra-2-3.x86_64.rpm # rocks sync users
/ /root /root/extra /root/extra/anaconda-ks.cfg /root/extra/install.log /root/extra/install.log.syslog /root/extra/rocks-post.log /root/extra/rocks-post.sh /root/extra/rocks-pre.log /root/extra/rocks-pre.sh # rocks create package /root/extra rocks-root-extra version=2 release=3 prefix=/var/local # ls *.rpm rocks-root-extra-2-3.x86_64.rpm # rpm -qlp rocks-root-extra-2-3.x86_64.rpm / /var /var/local /var/local/extra /var/local/extra/anaconda-ks.cfg /var/local/extra/install.log /var/local/extra/install.log.syslog /var/local/extra/rocks-post.log /var/local/extra/rocks-post.sh /var/local/extra/rocks-pre.log /var/local/extra/rocks-pre.sh
After
youve
created
your
RPM
file,
youll
need
to
perform
the
following
steps
to
install
the
RPM
on
all
your
compute
nodes.
a. Place
this
RPM
file
in
/export/rocks/install/contrib/5.3/<arch>/RPMS
e. Install
the
RPM
on
your
compute
nodes.
There
are
2
ways
to
achieve
this.
a. Run
# rocks run host compute command=yum install <rpmname>
# cat date.sh.o7 Sun Aug 1 19:40:39 PDT 2010 Sun Aug 1 19:40:49 PDT 2010
2. Running
an
MPI
Job
via
SGE
-
Lets
choose
MPI-Blast
as
an
example
of
running
an
MPI
job.
We
will
do
this
in
4
steps
a. Download
a
FASTA
formatted
database
file
from
NCBI
ftp
site.
i. Navigate
to
ftp://ftp.ncbi.nih.gov/blast/db/FASTA/
ii. Select
any
database
that
you
like.
Ill
choose
drosoph.nt.gz
(Drosophila
Melanogaster)
-
Nucleotide
database
of
the
fruit-fly.
iii. Download
using
wget.
# wget ftp://ftp.ncbi.nih.gov/blast/db/FASTA/drosoph.nt.gz
b. Format
the
FASTA
database
to
be
usable
by
MPI-Blast.
i. You
can
run
mpiformatdb
by
hand
ii. You
can
create
an
SGE
job
to
run
mpiformatdb
# vi mpiformatdb.sh #!/bin/bash #$ -cwd #$ -j y #$ -S /bin/bash export MPI_DIR=/opt/openmpi/ export BLASTDB=$HOME/bio/ncbi/db/ export BIOROLL=/opt/bio export BLASTMAT=$BIOROLL/ncbi/data/ $BIOROLL/mpiblast/bin/mpiformatdb --nfrags=4 \ -p F -i $BLASTDB/drosoph.nt # qsub mpiformatdb.sh
d. Run
MPI-Blast
on
the
database,
using
the
search
string
as
your
input.
i. Create
a
SGE
submission
script.
# vi mpiblast.sh #!/bin/bash #$ -cwd #$ -j y #$ -S /bin/bash export MPI_DIR=/opt/openmpi/ export BLASTDB=$HOME/bio/ncbi/db/ export BIOROLL=/opt/bio export BLASTMAT=$BIOROLL/ncbi/data/ $MPI_DIR/bin/mpirun -np $NSLOTS \ /opt/bio/mpiblast/bin/mpiblast \ -d drosoph.nt -i $HOME/test.txt \ -p blastn -o $HOME/result.txt