红联Linux门户
Linux帮助

VMware+Ubuntu环境安装配置SLURM

发布时间:2014-08-15 21:41:26来源:linux网站作者:tomxice

VMware是常见的虚拟机软件,这就不多说了。安装Ubuntu也很简单,装上就完了。


VMware虚拟机的迁移

许多虚拟机软件都支持将虚拟机文件在其他地方重用。比如VirtualBox和ParalellDesktop的虚拟机本身就是一个文件,直接拷贝就好了。但是VMware默认建立的虚拟机是一个文件夹里面有一堆文件。首先要导出虚拟机到一个文件中。File->Export to OVF。然后就生成几个文件,其中有一个很小的OVF文件和一个很大的虚拟磁盘文件,还有一个配置文件吧。。。把它们放在一个文件夹中就可以随便复制粘贴了。导入虚拟机的时候直接双击那个OVF文件即可。


Ubuntu中ssh环境的配置

ssh客户端是默认安装的,但是服务端可能要手动安装

sudo apt-get openssh-server

完成之后看

ps -e | grep ssh

看ssh-agent和sshd是否出现,出现的话就说明启动成功,其他节点就可以访问这台ubuntu了。


Ubuntu中MUNGE的安装

SLURM需要一个用作安全管理的插件,MUNGE是其中的一种。安装配置说简单也简单,但是我的英文不好,所以看guide的时候理解错了(好桑心啊)


MUNGE的安装指南

总之就是先装上,然后把各个文件夹的权限按要求改了。还要把文件夹的owner改成使用munge的那个用户。MUNGE安装中生成的文件夹属于munge,比如我的用户名是tomxice,就要修改一下用户

sudo chmod 0700 /etc/munge

sudo chown tomxice /etc/munge

启动munge的命令是munged不是munge。


Ubuntu中SLURM的安装

ubuntu有这个软件的包。叫slurm-llnl,名为slurm的包是一个网络监控软件,和我们这里讨论的不是同一个SLURM。

但是,我用apt-get装好之后,不知道他的配置文件在哪里。所以我是源码编译的。按照SLURM官网上的教程一步步做就好了。


SLURM的安装指南

配置文件不用自己写,有个configuration.html可以帮你配置,从源代码编译的话,这个文件在源文件的doc目录下。注意,SlurmUser和SlurmdUser是两个不同的变量,默认是root,如果要用tomxice用户运行,就要有这两行

SlurmUser=tomxice

SlurmdUser=tomxice

最后就是试运行了。结果一开始就出BUG。

slurmctld: slurmctld version 2.4.2 started on cluster cluster
slurmctld: debug3: Trying to load plugin /usr/local/lib/slurm/crypto_munge.so
slurmctld: debug4: /usr/local/lib/slurm/crypto_munge.so: Does not exist or not a regular file.
slurmctld: error: Couldn't find the specified plugin name for crypto/munge looking at all files
slurmctld: error: can't find a plugin for type crypto/munge
slurmctld: error: cannot resolve crypto plugin operations
slurmctld: fatal: slurm_cred_creator_ctx_create((null)): Operation not permitted
里面提到的文件crypto_munge.so我在/usr/lib/slurm里面找到一个,把它复制过去后,又提示缺一个叫auth_munge.so的文件,然后我又复制过去,于是slurmctl和slurmd都可以运行了。
另开一个窗口,执行squeue,scontrol命令都没问题,但是跑示例程序
srun -N1 -l /bin/hostname
会出现以下错误
tomxice@master:/home$ srun -N1 -l /bin/hostname
srun: symbol lookup error: /usr/local/lib/slurm/auth_munge.so: undefined symbol: slurm_auth_get_arg_desc

我在google上搜索发现几个条目也是有人遇到这样的问题,但是没说怎么解决。


我以为是ubuntu系统的问题,但是转念一想,应该不至于,这个怎么看都是链接库不对。因为在/usr/local/lib/slurm和/usr/lib/slurm里有很多同名不同质的文件,所以拷贝过去只是自欺欺人罢了。于是只好发邮件问学长,学长说年代久远忘记了,所以我只能继续折腾。事情在今天出现了转机,今天GFW网开一面让我上了google group,我在这里发现了同样的问题,底下有大牛回复

On Wed, 21 Sep 2011 00:49:18 -0700, Daniel Espling <espl...@cs.umu.se> wrote:
> Hi
> I'm trying to build and install slurm 2.3.0-rc2 on Ubuntu Lucid 10.4,
> but for some reason the crypto/munge plugin is not copied as a part of
> the "make install" process:
[snip]
> Any ideas? I've confirmed that slurm.conf is in the expected directory
> (/usr/local/etc), that it's set to use crypto/munge and that munge is
> installed and running.

Did you have munge development files installed at the time of
configure/make? (i.e. munge-dev or munge-devel package installed)

Check config.log with the following and see if there was any problem
detecting the munge installation:

grep -A3 'checking for munge' config.log

mark


那我就grep一下呗,结果发现slurm在安装的时候根本就没有找到munge,但是我确确实实是装了的啊,应该真的如同大牛所说,还有个开发库之类的,然后在这个网站上发现了.

sudo apt-get install libmunge-dev

重新安装一遍slurm就好了。

tomxice@master:~/Downloads/slurm-2.4.2$ srun /bin/hostname
master

那么SLURM的安装就告一段落了。