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

相关文章

mybatis映射器配置小结

《mybatis映射器配置小结》本文详解MyBatis映射器配置,重点讲解字段映射的三种解决方案(别名、自动驼峰映射、resultMap),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定... 目录select中字段的映射问题使用SQL语句中的别名功能使用mapUnderscoreToCame

防止Linux rm命令误操作的多场景防护方案与实践

《防止Linuxrm命令误操作的多场景防护方案与实践》在Linux系统中,rm命令是删除文件和目录的高效工具,但一旦误操作,如执行rm-rf/或rm-rf/*,极易导致系统数据灾难,本文针对不同场景... 目录引言理解 rm 命令及误操作风险rm 命令基础常见误操作案例防护方案使用 rm编程 别名及安全删除

Linux下MySQL数据库定时备份脚本与Crontab配置教学

《Linux下MySQL数据库定时备份脚本与Crontab配置教学》在生产环境中,数据库是核心资产之一,定期备份数据库可以有效防止意外数据丢失,本文将分享一份MySQL定时备份脚本,并讲解如何通过cr... 目录备份脚本详解脚本功能说明授权与可执行权限使用 Crontab 定时执行编辑 Crontab添加定

Java使用jar命令配置服务器端口的完整指南

《Java使用jar命令配置服务器端口的完整指南》本文将详细介绍如何使用java-jar命令启动应用,并重点讲解如何配置服务器端口,同时提供一个实用的Web工具来简化这一过程,希望对大家有所帮助... 目录1. Java Jar文件简介1.1 什么是Jar文件1.2 创建可执行Jar文件2. 使用java

SpringBoot 多环境开发实战(从配置、管理与控制)

《SpringBoot多环境开发实战(从配置、管理与控制)》本文详解SpringBoot多环境配置,涵盖单文件YAML、多文件模式、MavenProfile分组及激活策略,通过优先级控制灵活切换环境... 目录一、多环境开发基础(单文件 YAML 版)(一)配置原理与优势(二)实操示例二、多环境开发多文件版

Vite 打包目录结构自定义配置小结

《Vite打包目录结构自定义配置小结》在Vite工程开发中,默认打包后的dist目录资源常集中在asset目录下,不利于资源管理,本文基于Rollup配置原理,本文就来介绍一下通过Vite配置自定义... 目录一、实现原理二、具体配置步骤1. 基础配置文件2. 配置说明(1)js 资源分离(2)非 JS 资

使用docker搭建嵌入式Linux开发环境

《使用docker搭建嵌入式Linux开发环境》本文主要介绍了使用docker搭建嵌入式Linux开发环境,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面... 目录1、前言2、安装docker3、编写容器管理脚本4、创建容器1、前言在日常开发全志、rk等不同

MySQL8 密码强度评估与配置详解

《MySQL8密码强度评估与配置详解》MySQL8默认启用密码强度插件,实施MEDIUM策略(长度8、含数字/字母/特殊字符),支持动态调整与配置文件设置,推荐使用STRONG策略并定期更新密码以提... 目录一、mysql 8 密码强度评估机制1.核心插件:validate_password2.密码策略级

ShardingProxy读写分离之原理、配置与实践过程

《ShardingProxy读写分离之原理、配置与实践过程》ShardingProxy是ApacheShardingSphere的数据库中间件,通过三层架构实现读写分离,解决高并发场景下数据库性能瓶... 目录一、ShardingProxy技术定位与读写分离核心价值1.1 技术定位1.2 读写分离核心价值二

QT Creator配置Kit的实现示例

《QTCreator配置Kit的实现示例》本文主要介绍了使用Qt5.12.12与VS2022时,因MSVC编译器版本不匹配及WindowsSDK缺失导致配置错误的问题解决,感兴趣的可以了解一下... 目录0、背景:qt5.12.12+vs2022一、症状:二、原因:(可以跳过,直奔后面的解决方法)三、解决方