How to Use Cluster
文章目录
关于怎样使用学院服务器集群的说明。
校外使用VPN服务
First, You need connect to the campus network through VPN service.
In this step, you’d better use the “EasyConnect” Application, and use your CCNU campus account.
By the way, the “Server Address” needed by the EasyConnect is “vpn.ccnu.edu.cn”.
登录学院集群
Second, You need connect to the computer cluster through SSH service.
In this step, your just need to open a terminal if you use GNU/Linux or MacOS. If Windows, you’d better use “PuTTY” or XShell for convenience.
Then type and execute the following command:
ssh -p 1362 usr_02@202.114.36.19
If you did the above steps right and the network is fine, after this command, you will get a message letting you input a password, and that is the password I told you.
集群使用
文件传输
小的脚本,可以直接在远程服务器上编写,远程编辑器有 vim 和 nano 供你选择。
但总还是有些时候必需在本地和服务器之前进行文件传输。
方法有:
- 图形化工具
- 命令行工具
在本地终端运行命令:sftp -P 1362 usr_02@202.114.36.19
sftp登录完成以后,可以使用ls | cd | get | put 四个命令来完成上传与下载。 ls and cd 我就不再说了。
|
|
常用查询命令
|
|
正式提交任务
Furthermore, when you login the remote server, that is to say you have input the password and got a prompt, like “usr_02@admin ~$”. Then you can use the server as you own PC.
但是,集群有集群的使用规则,你必须将你的程序交给集群的 自动管理软件slurm 来帮你 执行。方法是将你的命令写在一个脚本中,我已经有写好的脚本模板,放在本文最后。
你只需要更改脚本中的一行数据,即可通过以下命令提交任务了:
sbatch run.slurm
在run.slurm中,需要修改的地方就是在“开始执行我们的任务”下面加上你要运行的命令,
文件中有例子,形如:
srun math -script yourScript.wl
简单调试
Third, How to use Mathematica at the cluster?
This is a sophisticated problem. I have installed the mathematica under this
server account. And you can run it through the following command:
math -script yourScript.wl
Troubleshooting
Possible problem: The VPN service is not stable, it will disconnect to the campus network
at any time, you can restart the EasyConnect APP to fix this problem.
run.slurm
|
|