Torque在Linux集群上的安装配置

2024-03-24 10:48

本文主要是介绍Torque在Linux集群上的安装配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

2008年7月的时候尝试安装Torque于TCCL的服务器上,失败。
2010年1月12日开始,再次尝试。希望不要再失败。

服务器的基本状况:
一个2T硬盘的前端存储节点,名称为tccl_front;9台8核的计算节点,名称分别为tccl01-tccl09。操作系统为CentOS 5.3 x86_64版本的Linux系统。
NIS服务已经配置好,存储节点的磁盘用NFS挂载在每个计算节点上作为共享磁盘。所有的应用软件都安装在此共享磁盘上。

1.ssh免密码登录.对每个用户都要设置。
2.下载Torque,解压缩,编译。
目前,torque 2.3是稳定版本,2.4是beta版本。为了稳定,我下载的是2.3.9版本。
下载地址:
http://clusterresources.com/downloads/torque
在PBS服务器节点上:
tar xvfz torque-2.3.9.tar.gz
configure需要加参数
./configure --enable-docs --with-scp --enable-syslog 
make
make packages
make install
将torque-package-mom-linux-i686.sh,torque-package-clients-linux-i686.sh安装到计算节点上。
将这两个文件拷贝到计算节点上(或者是共享磁盘上),登录进计算节点,运行:
./torque-package-mom-linux-i686.sh --install
./torque-package-clients-linux-i686.sh --install
可以使用dsh之类的工具来辅助。或者手工写一个脚本来完成这些工作。

3.配置pbs_mom为服务
在torque源码包contrib目录中有一个文件
cp contrib/init.d/pbs_mom /etc/init.d/pbs_mom
chkconfig --add pbs_mom
在所有的机器(pbs服务器和计算节点)上都需要如此设置。
写脚本来完成吧!比如
for i in `seq 1 9`
do 
echo tccl0$i
ssh tccl0$i "some command"
done

4.配置torque
1) 
ldconfig
2) Specify Compute Nodes
编辑文件
/var/spool/torque/server_priv/nodes
内容如下(注意,这里使用的都是机器的简称,与使用免密码登录时的机器名称相同):
tccl01 np=8 smallmem
tccl02 np=8 smallmem
tccl03 np=8 bigmem
tccl04 np=8 bigmem
tccl05 np=8 bigmem
tccl06 np=8 24G_Mem fastcpu
tccl07 np=8 24G_Mem fastcpu
tccl08 np=8 20G_Mem fastcpu
tccl09 np=8 24G_Mem fastcpu

3)Configure TORQUE on the Compute Nodes
按照系统的情况,配置如下:
在计算节点上编辑文件
/var/spool/torque/mom_priv/config
内容如下:
$pbsserver tccl_front
arch x86_64
opsys RHEL
$logevent 255
$ideal_load 4.0
$max_load 8.0
$tmpdir /tmp

4)初始化
torque.setup root
这会生成最基本的一个设置,有一个batch队列。如果需要比较复杂的队列,建议自己写一个配置文件,比如queue.conf文件。下面是一个有short,medium,long 共3个队列的配置文件:
#
# Create queues and set their attributes.
#
#
# Create and define queue batch
#
#create queue batch
#set queue batch queue_type = Execution
#set queue batch resources_default.nodes = 1
#set queue batch resources_default.walltime = 01:00:00
#set queue batch enabled = True
#set queue batch started = True

#Short queue
create queue short
set queue short queue_type = Execution
set queue short resources_default.nodes=1
set queue short Priority = 1000
set queue short max_running=20
set queue short max_queuable=40
set queue short max_user_run=10
set queue short max_user_queuable=20
set queue short resources_min.walltime=00:00:10
set queue short resources_max.walltime=12:00:00
set queue short resources_default.walltime = 12:00:00
set queue short resources_default.neednodes = smallmem
set queue short enabled = True
set queue short started = True

#Medium queue
create queue medium
set queue medium queue_type = Execution
set queue medium resources_default.nodes=1
set queue medium Priority = 100
set queue medium max_running=12
set queue medium max_queuable=20
set queue medium max_user_run=4
set queue medium max_user_queuable=8
set queue medium resources_min.walltime=12:00:10
set queue medium resources_max.walltime=48:00:00
set queue medium resources_default.walltime = 24:00:00
set queue medium enabled = True
set queue medium started = True
set queue medium resources_default.neednodes = fastcpu

#Long queue
create queue long   
set queue long queue_type = Execution
set queue long resources_default.nodes=1
set queue long Priority = 10
set queue long max_running=10
set queue long max_queuable=12
set queue long max_user_run=3
set queue long max_user_queuable=6
set queue long resources_min.walltime=48:00:00
set queue long resources_max.walltime=480:00:00
set queue long resources_default.walltime = 72:00:00
set queue long resources_default.neednodes = bigmem
set queue long enabled = True
set queue long started = True
#
# Set server attributes.
#
set server scheduling = True
set server acl_hosts = tccl_front
set server acl_hosts += tccl_front.tccl_group
set server acl_hosts += "tccl01,tccl02,tccl03,tccl04,tccl05,tccl06,tccl07,tccl08,tccl09"
set server acl_host_enable = true
set server managers = root@tccl_front.tccl_group
set server operators = root@tccl_front.tccl_group
set server default_queue = short
set server log_events = 511
set server mail_from = adm
set server scheduler_iteration = 10
set server node_check_rate = 120
set server tcp_timeout = 6
set server mom_job_sync = True
set server keep_completed = 120
#set server next_job_number = 0
set server query_other_jobs = True


运行
qmgr <queue.conf
即可完成两个队列(long,short)的基本设置。

需要注意的问题:
/etc/hosts设置
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost   localhost
::1    tccl_front6.tccl_group    localhost6
192.168.1.218    tccl_front.tccl_group    tccl_front
192.168.1.3    tccl01.tccl_group    tccl01
192.168.1.2    tccl02.tccl_group    tccl02
192.168.1.4     tccl03.tccl_group       tccl03
192.168.1.5     tccl04.tccl_group       tccl04
192.168.1.6     tccl05.tccl_group       tccl05
192.168.1.7     tccl06.tccl_group       tccl06
192.168.1.8     tccl07.tccl_group       tccl07
192.168.1.9     tccl08.tccl_group       tccl08
192.168.1.10    tccl09.tccl_group       tccl09
包含tccl_front的应该是192.168.*.*的IP,而不能是外网IP或者127.0.0.1的IP,切记!

5.安装mpiexec,这个是为了方便运行nwchem等程序。否则,删除任务以后,实际上没有将mpirun杀死。
http://www.osc.edu/~djohnson/mpiexec/index.php
下载,解压缩以后
./configure --with-pbs=/var/spool/torque --with-prefix=/home_srv/scicons/mpich/mpiexec --with-default-comm=shmem
make
make install
编译mpiexec时,需要注意--with-default-comm选项。这个选项要与mpirun的default-comm一致。比如,我的服务器上用的是shmem,这里就要设置为--with-default-comm=shmem
如果设置错误的话,会发现申请了n个processor,实际计算的时候只使用了一个。

6.将所有的pbs_iff程序setuid=root
chmod 4775 /usr/local/sbin/pbs_iff

参考文献:

http://clusterresources.com/torquedocs21/torquequickstart.shtml


http://zevan.blog.sohu.com/142998635.html

这篇关于Torque在Linux集群上的安装配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/841370

相关文章

mysqld_multi在Linux服务器上运行多个MySQL实例

《mysqld_multi在Linux服务器上运行多个MySQL实例》在Linux系统上使用mysqld_multi来启动和管理多个MySQL实例是一种常见的做法,这种方式允许你在同一台机器上运行多个... 目录1. 安装mysql2. 配置文件示例配置文件3. 创建数据目录4. 启动和管理实例启动所有实例

Linux内存泄露的原因排查和解决方案(内存管理方法)

《Linux内存泄露的原因排查和解决方案(内存管理方法)》文章主要介绍了运维团队在Linux处理LB服务内存暴涨、内存报警问题的过程,从发现问题、排查原因到制定解决方案,并从中学习了Linux内存管理... 目录一、问题二、排查过程三、解决方案四、内存管理方法1)linux内存寻址2)Linux分页机制3)

VScode连接远程Linux服务器环境配置图文教程

《VScode连接远程Linux服务器环境配置图文教程》:本文主要介绍如何安装和配置VSCode,包括安装步骤、环境配置(如汉化包、远程SSH连接)、语言包安装(如C/C++插件)等,文中给出了详... 目录一、安装vscode二、环境配置1.中文汉化包2.安装remote-ssh,用于远程连接2.1安装2

Redis多种内存淘汰策略及配置技巧分享

《Redis多种内存淘汰策略及配置技巧分享》本文介绍了Redis内存满时的淘汰机制,包括内存淘汰机制的概念,Redis提供的8种淘汰策略(如noeviction、volatile-lru等)及其适用场... 目录前言一、什么是 Redis 的内存淘汰机制?二、Redis 内存淘汰策略1. pythonnoe

Linux中shell解析脚本的通配符、元字符、转义符说明

《Linux中shell解析脚本的通配符、元字符、转义符说明》:本文主要介绍shell通配符、元字符、转义符以及shell解析脚本的过程,通配符用于路径扩展,元字符用于多命令分割,转义符用于将特殊... 目录一、linux shell通配符(wildcard)二、shell元字符(特殊字符 Meta)三、s

Linux之软件包管理器yum详解

《Linux之软件包管理器yum详解》文章介绍了现代类Unix操作系统中软件包管理和包存储库的工作原理,以及如何使用包管理器如yum来安装、更新和卸载软件,文章还介绍了如何配置yum源,更新系统软件包... 目录软件包yumyum语法yum常用命令yum源配置文件介绍更新yum源查看已经安装软件的方法总结软

linux报错INFO:task xxxxxx:634 blocked for more than 120 seconds.三种解决方式

《linux报错INFO:taskxxxxxx:634blockedformorethan120seconds.三种解决方式》文章描述了一个Linux最小系统运行时出现的“hung_ta... 目录1.问题描述2.解决办法2.1 缩小文件系统缓存大小2.2 修改系统IO调度策略2.3 取消120秒时间限制3

Linux alias的三种使用场景方式

《Linuxalias的三种使用场景方式》文章介绍了Linux中`alias`命令的三种使用场景:临时别名、用户级别别名和系统级别别名,临时别名仅在当前终端有效,用户级别别名在当前用户下所有终端有效... 目录linux alias三种使用场景一次性适用于当前用户全局生效,所有用户都可调用删除总结Linux

Linux:alias如何设置永久生效

《Linux:alias如何设置永久生效》在Linux中设置别名永久生效的步骤包括:在/root/.bashrc文件中配置别名,保存并退出,然后使用source命令(或点命令)使配置立即生效,这样,别... 目录linux:alias设置永久生效步骤保存退出后功能总结Linux:alias设置永久生效步骤

python管理工具之conda安装部署及使用详解

《python管理工具之conda安装部署及使用详解》这篇文章详细介绍了如何安装和使用conda来管理Python环境,它涵盖了从安装部署、镜像源配置到具体的conda使用方法,包括创建、激活、安装包... 目录pytpshheraerUhon管理工具:conda部署+使用一、安装部署1、 下载2、 安装3