Rocks cluster笔记——Rocks cluster基础

Rocks cluster基础
 


2.1~重要命令:
rocks list host #查看集群中的主机
cluster –fork #向节点输入命令
rocks sync users #同步账户信息,新建用户后必须同步后才生效,如果失败,重启再试
rocks sync config #同步集群配置信息,主机每次更改配置后必须使用该命令,否则会出错
浏览器输入 http://IP/ganlia 查看集群运行情况
rocks list net work #列出网络
ssh compute-0-1 #与note 通信、链接,进入节点
rocks-console compute-0-0  #来监控compute节点机的安装过程,安装完以后会自动重启compute-0-0节点机,注意,安装完成后,该命令失效。


rocks remove host 【compute-0-2】 #删除节点
rocks sync config #同步配置
rocks list host boot #查看已安装的节点
rocks-console compute-0-2 #进入节点机
reboot #重启


以下为一组命令
# ssh-agent $SHELL #启动管理,为在所有节点输命令做准备
# ssh-add #准备添加命令
# rocks run host compute  ’放入在所有的机器执行的文件’  #例如:
# rocks run host compute  ‘scp  zhaoming:/etc/host  /etc/host ‘  #将一台叫做zhaoming的机器的/etc/host文件拷到所有节点,文件仍为  /etc/host
# rocks run host compute  ‘scp  zhaoming:/etc/*  /etc/ ‘ #将一台叫做zhaoming的机器的/etc/下所有文件拷到所有节点,路径仍为  /etc/
# rocks run host compute  ‘ echo “rlogin” >> /etc/host ‘ 将rlogin 字符串追加到所有节点的/etc/host 文件的最后一行


# rocks list host boot    #列出所有节点
# rocks set host boot compute-0-0 action=install
# ssh compute-0-0 "shutdown -r now"
shoot-node compute-0-0
如果集群中的节点机需要重新安装,可以在这个节点机上运行:
 /boot/kickstart/cluster-kickstart  来重装系统。
或者可以在Frontend节点机上运行:
 rocks run host '/boot/kickstart/cluster-kickstart' 来重新安装所有的compute节点机


添加用户:  
#useradd – 
#passwd –
 #rocks sync users


安装
1. Install and Configure Your Frontend 见手册


2. Install Your Compute Nodes
Login to the frontend node as root.
a) Run the program which captures compute node DHCP requests and puts their information into the Rocks
b) MySQL database:
c) # insert-ethers
d) Power up the first compute node. #在此过程,用键盘与节点刀片机连接,出现滴的一声响后,立即按 F12。


After your frontend completes its installation, the last step is to force a re-installation of all of your compute
nodes. The following will force a PXE (network install) reboot of all your compute nodes.
# ssh-agent $SHELL
# ssh-add
# rocks run host compute ’/boot/kickstart/cluster-kickstart-pxe’


2.2hpc,Using mpi
2.1 Environment Modules for OpenMPI


To NOT load the Rocks default module Definition. Set the environment variable
ROCKS_MODULE_USER_DEF to a non-zero string.
export ROCKS_USER_MODULE_DEF=True


2.2. Using mpirun from OpenMPI
To interactively launch a test OpenMPI program on two processors:
• Create a file in your home directory named machines, and put two entries in it, such as:
compute-0-0
compute-0-1
#可以将有用的刀片机的名字全加入
• Now launch the job from the frontend:
$ ssh-agent $SHELL
$ ssh-add
$ /opt/openmpi/bin/mpirun -np 2 -machinefile machines /opt/mpi-tests/bin/mpi-ring
#上面语句中的2表示使用machines中前两个机器
You must run MPI programs as a regular user (that is, not root).


2.3 Using mpirun from MPICH
To interactively launch a test MPICH program on two processors:
• Create a file in your home directory named machines, and put two entries in it, such as:
compute-0-0
compute-0-1
• Compile a test program using the MPICH environment:
$ cd $HOME
$ mkdir mpich-test
$ cd mpich-test
$ cp /opt/mpi-tests/src/mpi-ring.c .
$ /opt/mpich/gnu/bin/mpicc -o mpi-ring mpi-ring.c -lm
• Now launch the job from the frontend:
$ ssh-agent $SHELL
$ ssh-add
$ /opt/mpich/gnu/bin/mpirun -nolocal -np 2 -machinefile $HOME/machines \
$HOME/mpich-test/mpi-ring
You must run MPI programs as a regular user (that is, not root).
If you don’t have a user account on the cluster, create one for yourself, and propogate the information to
the compute nodes with:
# useradd username
# rocks sync users


interactively launch the benchmark "High-Performance Linpack" (HPL)
http://www.netlib.org/benchmark/hpl/tuning.html
HPL.dat


  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值