歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> VMware+Ubuntu環境安裝配置SLURM

VMware+Ubuntu環境安裝配置SLURM

日期:2017/2/28 15:31:47   编辑:Linux教程

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 <[email protected]> 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的安裝就告一段落了。

Copyright © Linux教程網 All Rights Reserved