超算(北航限定)踩过的坑

由于超算的便捷性,目前开始使用超算,但本人对于Linux命令流一窍不通,安装各种软件和命令都踩了不少坑,北航的超算平台也各种反人类。

北航超算的相关信息:

本系统配置了 3 个登录节点,260 个 CPU 计算节点(注意!),10 个 GPU 计算节点(注意!),一套 1.8P 共享存储。所有节点通过 100Gb/s EDR Infiniband 互联组成计算和存储网络。系统详细配置如下:

1) 登录管理节点:共 3 个登录节点。(只影响登陆)

2) GPU 计算节点:共 10 个 GPU 计算节点,每个节点配置 2 颗 Intel Golden 6240 系列处理
器(每个卡有18核处理器),共 36 个物理核,384GB 内存,8 个 NVIDIA V100 GPU 卡。

3) CPU 计算节点:共 260 个 CPU 计算节点,每个节点配置 2 颗 Intel Golden 6240 系列处
理器(每个卡18核处理器),共 36 物理核,384GB 内存(注意)(根据 IB 网络配置,单个作业最多使用 160 个计算节
点)。

4) 并行存储系统:配置一套 DDN 并行存储系统,共配置 1.8PB 存储容量。

5) 管理网络:配置一套千兆管理网;

6) 带外管理网络:配置一套千兆带外管理网;

7) 计算网络:配置一套 100Gb/s 高速 Infiniband 网。

总共电脑数有几个不知道啊。

  1. nn表示计算节点数,这里你可以自己选择,因为cpu最多160个计算节点

计算节点数/计算机数 = 每台计算机运行节点数
为什么要分配节点数,因为一台计算机的内存有限,最常见的原因是求解器所需的内存太多,无法在一台主机上运行。系统最大384GB 内存

nnhost表示要在每个主机计算几个节点。

  1. np表示核数
    表示每个计算节点使用可用的内核数
    nn*np 是活动核数(每个节点不要超过36个)

理论上可以用160个计算节点,于是160✖️36=5760。
也就是每个计算节点最多可以申请36个核,cpu最多申请活动的总核数可以到达5760个。但实际不可能让你申请那么多计算节点,全校这么多人在用。

例如:
使用4个计算节点(nn=4),每个计算节点分配8个核(np=8,np*nn=32),每个计算机分配2个节点(nnhost=2)
这样实际就用了两台计算机

使用2个计算节点(nn=2),每个计算节点12个核(np=12,np*nn=24),每个计算机分配1个节点(nnhost=1)
这样也是用了两台计算机

这些是我的观点,有错误可以指出

例子:

/gs/home/xx/Comsol/comsol56/multiphysics/bin/comsol batch -nn 1 -nnhost 12 -np 12 -inputfile ${INPUTFILE} -outputfile ${OUTPUTFILE} \
-batchlog $

表示1个计算节点,每个主机计算12个节点数,每个节点都使用12个内核

分布式计算就是希望通过指派多个节点,并行计算程序(我在瞎说,不严格就当没看到)
但并不是核越多越好问题的规模会影响加速效果。对于非常大型的模型(如几百万个自由度),加速效果会更好。如果您使用非常小的模型,则在使用多个内核时,加速会受到限制。此外,可能达到的最大加速效果还受到算法非并行部分的限制。

运行时长例子:针对同一套matlab程序,有

#SBATCH -N 4            # 使用 4 个节点
#SBATCH -n 20           # 共使用 20 个进程(cpu 核)
#SBATCH --ntasks-per-node=5 # 每个节点启动 5 个进程
结果为:
Elapsed time is 97.883870 seconds.
#SBATCH -N 4            # 使用 4 个节点
#SBATCH -n 60           # 共使用 60 个进程(cpu 核)
#SBATCH --ntasks-per-node=15    # 每个节点启动 15 个进程
结果为:
Elapsed time is 94.403575 seconds.

参考:http://cn.comsol.com/support/knowledgebase/1001
https://cn.comsol.com/blogs/hybrid-computing-advantages-shared-distributed-memory-combined/

程序安装

安装的例子b站很多,可以多搜索多试试

一、Matlab

北航超算居然没有安装matlab,滑天下之大稽,居然有高校超算不装matlab的,真是闻所未闻....
事先说明,csdn有个北航安装超算的帖子,本人亲测无用,因为是用X11的,下不到X11的我直接选择静默安装。

那个帖子如下:https://blog.csdn.net/weixin_41692946/article/details/120971906

我的安装历程:

  1. 下载Linux版 matlab,这里都用2019.链接在 https://pan.baidu.com/s/17fBd0XX0At5cevaLzxUuhQ
    注意把里面的破解包也下过来 密码:qalz

  2. 本地解压后上传服务器端,你要直接用服务器7zip也行

  3. 将文件上传的地方进行修改权限,你可以选择手动修改,直接改为777

捕获.JPG

或者通过命令修改
chmod 777 /路径/install

好的,修改命令的指令你会了。你需要修改这几个文件的权限:

/gs/home/XX/matlab/R2019b_Linux/install
/gs/home/XX/matlab/R2019b_Linux/bin/glnxa64/install_unix
/gs/home/XX/matlab/R2019b_Linux/sys/java/jre/glnxa64/jre/bin

修改完了;当然你也可以对所有文件修改权限,注意要用resursively

  1. 开始安装

  2. 直接cd到安装包所在文件夹/gs/home/XX/matlab/R2019b_Linux/,然后 ./install
    结果: 报错

Error: Installation cannot proceed. You may either:
1. Set an X11 display, and restart the install process
2. Use the silent install feature by specifying the -mode silent option

后来发现:必须静默模式下安装,因为没有可视化界面

  1. 修改后命令 ./install -mode silent

接着报错:说 the Installer cannot be run from inside the DVD directory. Change to your home directory and execute this command.

百度之,发现不能直接在挂载的目录即matlab文件夹下运行./install,可以返回上级目录运行./matlab/install

  1. 接着回上一层文件夹/gs/home/XX/matlab/
    然后 ./install -mode silent -agreeToLicense yes -fileInstallationKey 09806-07443-53955-64350-21751-41297
    接着报错:
    Error: 不能在home文件创造xx(英文反正这个意思)
    确实,我没有根目录的权限也不可能装在学校根目录下啊,得手动修改安装路径

  2. 只能自己打开安装包信息看看了,在/gs/home/xx/matlab/R2019b_Linux/install_input.txt

## SPECIFY INSTALLATION FOLDER
## 
## Example: 
##        (Windows) destinationFolder=C:\Program Files\MATLAB\RXXXX
##        (Unix) destinationFolder=/usr/local/RXXXX
##        (Mac) destinationFolder=/Applications
##
## Set the desired value for destinationFolder and 
## uncomment the line. 

# destinationFolder=

## SPECIFY FILE INSTALLATION KEY 
##
## Example: fileInstallationKey=xxxxx-xxxxx-xxxxx-xxxxx.....
##
## Set the desired value for fileInstallationKey and 
## uncomment the line.
##
# fileInstallationKey=

好吧,把安装的绝对路径及序列号加上
最终安装命令:

./R2019b_Linux/install -mode silent -agreeToLicense yes -fileInstallationKey 09806-07443-53955-64350-21751-41297 -destinationFolder /gs/home/xx/Matlab

好,这下成功安装中了,接着和师弟出去吃饭了,回来一看傻眼了,被程序kill了

  1. 询问超算老师,得知是负载过高....

忍住吐槽的心(安装个matlab也能负载过高,你这可是超算啊),把原来的安装残余文件删除(不然这些残余文件会影响下次安装)
自己写个脚本提交计算节点好了

于是我把脚本放在这里了, 建立了脚本 install_mat.sh,注意要改成 LF格式。不然提交会报错说识别不了\n\r.
(Batch script contains DOS line breaks (\r\n))

#!/bin/bash
#SBATCH -J std
#SBATCH -p cpu-normal
#SBATCH -N 1
#SBATCH -n 20
#SBATCH -t 10000:00
#SBATCH --mail-type=all 
#module load intel/17.0.7-thc

cd ${SLURM_SUBMIT_DIR}
mkdir ${SLURM_JOBID}
export TMPDIR=${SLURM_SUBMIT_DIR}
./R2019b_Linux/install -mode silent -agreeToLicense yes -fileInstallationKey 09806-07443-53955-64350-21751-41297 -destinationFolder /gs/home/xx/Matlab
make
make install

提交完,系统又卡bug了,不过这次是官方的问题
美滋滋出去吃个夜宵
安装OK的标志:查看文件slurm-4537276.out
会有信息

Exiting with status 0
End - Successful.
Finished
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install`.  Stop.

妥了

  1. 回来一看,准备打开,想起来还需要激活,于是看下前面crack的文件 readme.txt
    standalone:
- Install choosing the option "Use a File Installation Key" and supply the following FIK
    09806-07443-53955-64350-21751-41297
- To install Matlab Production Server,using this
    40236-45817-26714-51426-39281
- Use license_standalone.lic to activate,
  or copy license_standalone.lic to %installdir%\licenses\ ,and run matlab without activation
- after the installation finishes copy the folders to %installdir% to overwriting the originally installed files

好,告诉我们两个事:

  1. 需要在你安装的目录新建一个licenses的文件夹,把 license_standalone.lic 放进去

  2. 把 libmwlmgrimpl.so 这个文件取代安装位置bin/glnxa64/matlab_startup_plugins/lmgrimpl/中的同名文件,记着取代之前该原始文件权限777

  3. 两个文件都搞定以后,直接cd到安装好的matlab路径(在bin文件位置):

./matlab

(网上说需要./matlab -chome/usr/matlab2016/licenses/license_standalone.lic, 但是我直接matlab就打开了,前面也说直接copy就行,不知道为啥)

出现以下文字


MATLAB is selecting SOFTWARE OPENGL rendering.

                                                                      < M A T L A B (R) >
                                                            Copyright 1984-2019 The MathWorks, Inc.
                                                            R2019b (9.7.0.1190202) 64-bit (glnxa64)
                                                                        August 21, 2019


To get started, type doc.
For product information, visit www.mathworks.com.

>> 1+1

ans =

     2

成功打开

有些可能需要清空系统的缓存,命令rm -r -f ~/.matlab/(我没试过,总之看rp)

  1. 提交作业
    两种方式:
  2. 采用后台计算,并不是提交到计算节点上,cd到作业的目录,然后输入
nohup matlab -nodesktop -nosplash < test.m >running.log 2>running.err

这种方法不推荐,因为不能调度服务器的资源

  1. 采用脚本提交作业
    首先要在之前环境变量中加入matlab路径。首先先新建文本文件.bashrc
    在文件中加入
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi
# export SYSTEMD_PAGER="/gs/home/xx/Matlab/bin/matlab"
export PATH="/gs/home/baoyue/Matlab/bin/:$PATH"
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER="/gs/home/xx/Matlab/bin:$PATH"

# User specific aliases and functions

然后接着激活,在命令行中输入

. ~/.bashrc

激活后即可使用。
于是采用matlab提交作业脚本进行提交,提交脚本如官方指导,奉上
matlab_slurm.sh

#!/bin/bash
#SBATCH -J test             # 任务名字是 test
#SBATCH -p cpu-normal       # 提交到 normal 分区
#SBATCH -N 4            # 使用 4 个节点
#SBATCH -n 20           # 使用 20 个进程(cpu 核)
#SBATCH --ntasks-per-node=5 # 每个节点启动 5 个进程
#SBATCH -t 10000:00         # 任务最大运行时间是 10000 分钟
#SBATCH -o  test.out        #正确的输出
#SBATCH -e  err.out     #错误的输出

# module add matlab             # 添加 MATLAB 模块,由于在超算中我们使用的是自己的matlab程序,所以这里不载入环境
matlab -nodesktop -nosplash -nodisplay -r "test_" # 使用 MATLAB 运行当前文件夹中的 Test.m 文件

Bingo!

参考:视频

https://www.cnblogs.com/graybird/p/9104581.html
https://blog.csdn.net/yuanchheneducn/article/details/50172027
https://blog.csdn.net/weixin_40562999/article/details/112394410
https://zhuanlan.zhihu.com/p/339545166
https://blog.csdn.net/sethinking/article/details/88375995
https://blog.csdn.net/qq_15015187/article/details/107740427
https://blog.csdn.net/weixin_45092662/article/details/121299887

二、Comsol

Comsol安装并无大碍,非常顺利,我的是6.0版本
1 如前一样。
修改权限

2 按照流程安装comsol,其他没啥可说的。因为comsol需要无图形界面安装
需要修改 setupconfig.ini 文件,主要是一个静默安装、一个同意条款、安装文件路径、然后破解许可证文件路径。

#
# COMSOL automated installation answer file.
#
# Usage:
# 1) copy this file and modify the properties below
# 2) run setup -s <path to modified setupconfig.ini file>
#
# The setup program returns one of the following exit codes:
#   0: The installation was successful.
#   1: The installation was completed but there was at least one warning.
#   2: The installation was completed but there was at least one error.
#   3: The installation was completed but there was at least one fatal error.
#   4: The installation program exited before the installation was completed.

# ----------------------------------------------------------------------------
# NOTE! Before running the automated installer, make sure you have read
#       and accepted the terms of the COMSOL AB Software License Agreement
#       (see license_en_US.txt on the DVD).
# ----------------------------------------------------------------------------


# ============================================================================
# GLOBAL OPTIONS
# ============================================================================

# ----------------------------------------------------------------------------
# General
#
#   installdir:
#     Installation directory path.
#     A default path will be used if not specified.
#       (example: installdir = C:\Program Files\COMSOL\COMSOL60\Multiphysics)
# ----------------------------------------------------------------------------
installdir = /gs/home/xx/comsol60/

# ----------------------------------------------------------------------------
# Installer Mode
#
#   install:
#     Performs a new installation, adds/removes products to an existing
#     installation, or changes the license for an existing installation.
#   uninstall:
#     Uninstalls an existing installation.
#   update:
#     Updates an existing installation to a newer version using the file
#     specified by update.filepath.
# ----------------------------------------------------------------------------
installmode = install

# ----------------------------------------------------------------------------
#   repair:
#     Use '1' to repair all already installed features.
# ----------------------------------------------------------------------------
repair = 0

# ----------------------------------------------------------------------------
#   update.filepath:
#     The absolute path of an update file.
# ----------------------------------------------------------------------------
update.filepath =

# ----------------------------------------------------------------------------
# User interaction
#
#   showgui:
#     Use '1' to display progress in the graphical user interface.
#     Set this to 0 if no display is available.
#     Note that Microsoft .NET Framework 4 is required on windows, but if
#     showgui is set to 0 it is not installed automatically.
#
#   autofinish (used when showgui is set to 1):
#     Determines if the graphical user interface should close automatically
#     when setup has finished. Used when showgui is set to 1.
#     Alternatives:
#     - '1':       Close automatically when finished, as long as no errors
#                  occurred.
#     - '0':       Do not close automatically--show the installation summary
#                  when finished.
#     - 'success': Close automatically if installation was successful,
#                  that is, if no warnings or errors occurred.
#     - 'warning': Close automatically even if warnings occurred, but not if
#                  any errors occurred. (This is the same behavior as '1'.)
#     - 'error':   Close automatically even if warnings or errors occurred,
#                  but not if any fatal errors occurred.
#     - 'always':  Always close automatically.
#
#   quiet:
#     Use '1' to suppress output to terminal.
#
#   language:
#     Set default language. Supported values are:
#       zh_CN  Simplified Chinese
#       zh_TW  Traditional Chinese
#       en_US  English
#       fr_FR  French
#       de_DE  German
#       it_IT  Italian
#       ja_JP  Japanese
#       ko_KR  Korean
#       es_ES  Spanish
#     If no value or an unsupported value is given, the default language
#     is set en_US.
#
# ----------------------------------------------------------------------------
showgui = 0
autofinish = 0
quiet = 0
language = en_US


# ============================================================================
# INSTALLATION OPTIONS
# ============================================================================

# ----------------------------------------------------------------------------
# License
#
#   agree (REQUIRED):
#     Change this to '1' instead of '0' when you have read and accepted the
#     terms of the COMSOL AB Software License Agreement (see license_en_US.txt
#     on the DVD).
#
#   license (REQUIRED):
#     Alternatives:
#     - passcode
#         (example: license = FFFFFFFFFFFFFFFF-CUSV-123456-1234567-123456789), or
#     - license file path
#         (example: license = C:\license.dat), or
#     - port@host
#         (example: license = 1718@mylicserver), or
#     - three-server redundancy
#         (example: license = 1718@licsvr1 1718@licsvr2 1718@licsvr3)
#
#   name, company:
#     Information about the user that will use this license.
#
#   licno:
#     License number to use if the license contains more than one
#     license number.
#
#   lictype:
#     Type of installation to perform when the selected license number allows
#     more than one type.
#     Alternatives:
#     - mph     Perform multiphysics installation
#     - server  Perform server installation
#
# ----------------------------------------------------------------------------
agree = 1
license = /gs/home/sy1913122/soft/COMSOL.Multiphysics.6.0.318.Win.Linux.macOS-SSQ/LMCOMSOL_Multiphysics_SSQ.lic
name =
company =
licno =
lictype =

# ----------------------------------------------------------------------------
# Features
#
#   comsol:
#     Use '1' to install COMSOL and '0' to not install COMSOL.
#     Not installing COMSOL is useful if you want to install
#     only the license manager.
#
#   licmanager:
#     Use '1' if you want to install License manager files and '0' if not.
#
#   matlabdir:
#     MATLAB root directory path.
#         (example: matlabdir = C:\MATLAB)
#
#   proedir:
#     Pro/ENGINEER root directory path.
#         (example: proedir = C:\Program Files\PTC\Creo Elements\Pro5.0 or
#                   proedir = C:\Program Files\proeWildfire 5.0)
#
#   llexcelallusers:
#     Use '1' to install LiveLink for Excel for all users.
#     Use '0' to install LiveLink for Excel only for the current user.
#
#   powerpointinterface:
#     Use 'currentuser' to install PowerPoint interface only for the current user.
#     Use 'allusers' to install PowerPoint interface for all users.
#     Use 'no' to skip PowerPoint interface installation.
#
#   doc:
#     Use 'selected' if you want to install documentation for all selected products.
#     Use 'all' if you want to install documentation for all products.
#     Use 'no' if you do not want to install documentation.
#     - doc: Documentation (html and pdf files)
#
#   applications:
#     Use 'selected' if you want to install applications for all selected products.
#     Use 'all' if you want to install applications for all products.
#     Use 'previewselected' if you want to install application previews for all selected products.
#     Use 'previewall' if you want to install application previews for all products.
#     Use 'no' if you do not want to install applications.
#     - applications: Application Library models and applications.
#
#   comsol.*:
#     Use '1' if you want to install a feature and '0' if not.
#     Features not included in the license cannot be installed.
#     Features that depend on not installed features are not installed.
#     - comsol.acdc:         AC/DC Module
#     - comsol.aco:          Acoustics Module
#     - comsol.battery:      Battery Module
#     - comsol.cfd:          CFD Module
#     - comsol.mixer:        Mixer Module
#     - comsol.chem:         Chemical Reaction Engineering Module
#     - comsol.compmat:      Composite Materials Module
#     - comsol.corr:         Corrosion Module
#     - comsol.echem:        Electrochemistry Module
#     - comsol.edecm:        Electrodeposition Module
#     - comsol.fce:          Fuel Cell and Electrolyzer Module
#     - comsol.ht:           Heat Transfer Module
#     - comsol.mems:         MEMS Module
#     - comsol.metproc:      Metal Processing Module
#     - comsol.mfl:          Microfluidics Module
#     - comsol.molec:        Molecular Flow Module
#     - comsol.particle:     Particle Tracing Module
#     - comsol.pipe:         Pipe Flow Module
#     - comsol.plasma:       Plasma Module
#     - comsol.polymer:      Polymer Flow Module
#     - comsol.porous:       Porous Media Flow Module
#     - comsol.roptics:      Ray Optics Module
#     - comsol.rf:           RF Module
#     - comsol.semicond:     Semiconductor Module
#     - comsol.sme:          Structural Mechanics Module
#     - comsol.fatigue:      Fatigue Module
#     - comsol.geomech:      Geomechanics Module
#     - comsol.mbd:          Multibody Dynamics Module
#     - comsol.nsm:          Nonlinear Structural Materials Module
#     - comsol.rotor:        Rotordynamics Module
#     - comsol.ssf:          Subsurface Flow Module
#     - comsol.lgp:          Liquid & Gas Properties Module
#     - comsol.uq:           Uncertainty Quantification Module
#     - comsol.woptics:      Wave Optics Module
#     - comsol.cad:          CAD Import Module
#     - comsol.catia5:       File Import for CATIA V5
#     - comsol.design:       Design Module
#     - comsol.ecad:         ECAD Import Module
#     - comsol.llac:         LiveLink for AutoCAD
#     - comsol.llexcel:      LiveLink for Excel
#     - comsol.llinv:        LiveLink for Inventor
#     - comsol.llmatlab:     LiveLink for MATLAB
#     - comsol.llcreop:      LiveLink for Creo Parametric
#     - comsol.llproe:       LiveLink for PTC Pro/ENGINEER
#     - comsol.llrevit:      LiveLink for Revit
#     - comsol.llsimulink:   LiveLink for Simulink
#     - comsol.llse:         LiveLink for Solid Edge
#     - comsol.llsw:         LiveLink for SOLIDWORKS
#     - comsol.optlab:       Optimization Module
#     - comsol.matlib:       Material Library
#     - comsol.modelmanager: Model Manager Components
#     - comsol.cluster:      COMSOL Cluster Components
#
#   comsol.compiler:
#     Use '1' if you want to install COMSOL Compiler and '0' if not.
#
# ----------------------------------------------------------------------------
comsol = 1
licmanager = 1

matlabdir =
proedir =
llexcelallusers = 0
powerpointinterface = currentuser

doc = selected
applications = selected

comsol.acdc = 1
comsol.aco = 1
comsol.battery = 1
comsol.cfd = 1
comsol.mixer = 1
comsol.chem = 1
comsol.compmat = 1
comsol.corr = 1
comsol.echem = 1
comsol.edecm = 1
comsol.fce = 1
comsol.ht = 1
comsol.mems = 1
comsol.metproc = 1
comsol.mfl = 1
comsol.molec = 1
comsol.particle = 1
comsol.pipe = 1
comsol.plasma = 1
comsol.polymer = 1
comsol.porous = 1
comsol.roptics = 1
comsol.rf = 1
comsol.semicond = 1
comsol.sme = 1
comsol.fatigue = 1
comsol.geomech = 1
comsol.mbd = 1
comsol.nsm = 1
comsol.rotor = 1
comsol.ssf = 1
comsol.lgp = 1
comsol.uq = 1
comsol.woptics = 1
comsol.cad = 1
comsol.catia5 = 1
comsol.design = 1
comsol.ecad = 1
comsol.llac = 1
comsol.llexcel = 1
comsol.llinv = 1
comsol.llmatlab = 1
comsol.llcreop = 1
comsol.llproe = 1
comsol.llrevit = 1
comsol.llsimulink = 1
comsol.llse = 1
comsol.llsw = 1
comsol.optlab = 1
comsol.matlib = 1
comsol.modelmanager = 1
comsol.cluster = 1

comsol.compiler = 1

# ----------------------------------------------------------------------------
# License manager service configuration
#
#   licmanager.service:
#     Use '1' to install the license manager service.
#             Requires root on Linux and macOS.
#     Use '0' to not install the license manager service.
#
#   licmanager.service.logfile:
#     License manager log file path.
#     A default path will be used if not specified.
#
#   licmanager.service.lmdown.local:
#     Use '1' to restrict the lmdown command to be run only from
#             the same machine where lmgrd is running.
#     Use '0' to allow remote use of lmdown.
#
#   licmanager.service.lmdown.disable:
#     Use '1' to disable the lmdown command.
#     Use '0' to enable the lmdown command.
#
#   licmanager.service.lmremove.disable:
#     Use '1' to disable the lmremove command.
#     Use '0' to enable the lmremove command.
#
#   licmanager.service.user
#     For Linux and macOS, the username to run the license manager.
#
#   licmanager.service.group
#     For Linux and macOS, the group of the user to run the license manager.
#
# ----------------------------------------------------------------------------
licmanager.service = 0
licmanager.service.logfile =
licmanager.service.lmdown.local = 0
licmanager.service.lmdown.disable = 0
licmanager.service.lmremove.disable = 0
licmanager.service.user =
licmanager.service.group =

# ----------------------------------------------------------------------------
# Options
#
#   startmenushortcuts:
#     Use '1' if you want setup to create shortcuts on the Windows start menu.
#     Use '0' if you do not want the shortcuts.
#
#   desktopshortcuts:
#     Use '1' if you want setup to create shortcuts on the Windows desktop.
#     Use '0' if you do not want the shortcuts.
#
#   firewall:
#     Use '1' if you want setup to create Windows Firewall rules to allow
#     incoming network traffic for COMSOL server programs.
#     Use '0' if you do not want firewall rules to be created.
#
#   linuxlauncher:
#     Use '1' if you want setup to create a COMSOL launcher.
#     Use '0' if you do not want the launcher.
#
#   symlinks:
#     Use '1' if you want setup to create symbolic links to COMSOL in
#     /usr/local/bin on Linux (requires administrative privileges).
#     Use '0' if you do not want the symbolic links.
#
#   fileassoc:
#     Use '1' if you want setup to associate the .mph and .fl file types with
#     this installation. Use '0' if you do not want the file association.
#
#   checkupdate:
#     Use '1' if you want comsol to automatically check for updates
#
#   jre:
#     By default, COMSOL 6.0 includes a Java 11.0.13 runtime.
#     If you prefer COMSOL to use another Java 11 runtime that you have licensed and
#     installed, specify its location.
#     (example: jre = C:\Program Files\Java\jre-11)
#
# ----------------------------------------------------------------------------
startmenushortcuts = 1
desktopshortcuts = 1
linuxlauncher = 1
symlinks = 1
fileassoc = 1
checkupdate = 0
firewall = 1
jre = 

# ----------------------------------------------------------------------------
# Multiphysics security options
#
#   setsecuritypolicy:
#     Use '1' if you want to enforce a security policy
#   security.comsol.allowbatch:
#     Use '1' if you want to allow batch jobs
#   security.comsol.allowexternalprocess:
#     Use '1' if you want to allow external processes
#   security.comsol.allowexternallibraries:
#     Use '1' if you want to allow external libraries
#   security.comsol.allowexternalmatlab:
#     Use '1' if you want to allow external MATLAB functions
#   security.comsol.allowmethods:
#     Use '1' if you want to allow running application methods
#   security.comsol.allowapplications:
#     Use '1' if you want to allow running applications
#   security.external.enable:
#     Use '1' if you want to enforce security restrictions
#   security.external.propertypermission:
#     Use '1' if you want to allow access to system properties
#   security.external.runtimepermission:
#     Use '1' if you want to allow changes to the runtime system
#   security.external.filepermission:
#     Use 'full' if you want to allow full file system access.
#     Use 'limited' if you want to allow limited file system access.
#   security.external.socketpermission:
#     Use '1' if you want to allow access to network sockets
#   security.external.netpermission:
#     Use '1' if you want to allow control of the network authentication method
#   security.external.reflectpermission:
#     Use '1' if you want to allow access to classes through reflection
#   security.external.securitypermission:
#     Use '1' if you want to allow access to runtime security settings
#
# ----------------------------------------------------------------------------
setsecuritypolicy = 0
security.comsol.allowbatch = 1
security.comsol.allowexternalprocess = 0
security.comsol.allowexternallibraries = 0
security.comsol.allowexternalmatlab = 0
security.comsol.allowmethods = 1
security.comsol.allowapplications = 1
security.external.enable = 1
security.external.propertypermission = 0
security.external.runtimepermission = 0
security.external.filepermission = limited
security.external.socketpermission = 0
security.external.netpermission = 0
security.external.reflectpermission = 0
security.external.securitypermission = 0

# ----------------------------------------------------------------------------
# COMSOL Server configuration options
#
#   server.port:
#     The default TCP port for COMSOL Server
#   server.service:
#     Use '1' to install COMSOL Server as a Windows service
#   server.service.account:
#     Name of account that runs the Windows service, or 'default' to use
#     a default service account
#     For a secondary installation, use 'default' to read setting from
#     the shared working directory
#   server.service.password:
#     Password corresponding to server.service.account
#     Leave empty if the account does not have a password
#   server.service.start:
#     Use 'disabled' to make the service disabled
#     Use 'demand' to specify that the service must be started manually
#     Use 'auto' to make the service start automatically when the computer starts
#     Use 'delayed-auto' to make the service start automatically a short time
#          after the computer starts
#   server.createadmin:
#     Use '1' to create a default local administrative user
#   server.admin:
#     Name of the default local administrative user
#   server.admin.password:
#     Temporary password for the default local administrative user
#   server.multiple:
#     Use '1' to support running COMSOL Server on multiple computers
#   server.primary:
#     Use '1' to create a primary installation
#     Use '0' to create a secondary installation
#   server.multiple.prefsdir:
#     The shared working directory for multiple computers
#   server.multiple.primaryhost:
#     Primary server hostname
#     Use 'auto' to read setting from the shared working directory
#   server.multiple.primaryport:
#     Primary server port
#     Use 'auto' to read setting from the shared working directory
#   server.windowsauthentication:
#     Use '1' to use Windows authentication
#   server.windowsauthentication.adminrole:
#     Semicolon separated list of Windows user names with Administrator
#     privileges in COMSOL Server
#   server.windowsauthentication.poweruserrole:
#     Semicolon separated list of Windows user names with Power user
#     privileges in COMSOL Server
#   server.windowsauthentication.userrole:
#     Semicolon separated list of Windows user names with Guest
#     privileges in COMSOL Server
#   server.windowsauthentication.guestrole:
#     Semicolon separated list of Windows user names with User
#     privileges in COMSOL Server
#
# ----------------------------------------------------------------------------
server.port = 2036

server.service = 1
server.service.account = default
server.service.password =
server.service.start = auto

server.createadmin = 1
server.admin = localadmin
server.admin.password = changeit

server.multiple = 0
server.primary = 1
server.multiple.prefsdir =
server.multiple.primaryhost = auto
server.multiple.primaryport = auto

server.windowsauthentication = 0
server.windowsauthentication.adminrole = BUILTIN\Administrators
server.windowsauthentication.poweruserrole = BUILTIN\Power Users
server.windowsauthentication.userrole = BUILTIN\Users
server.windowsauthentication.guestrole = BUILTIN\Guests

然后 命令行

./setup -s ./setupconfig.ini
  1. 提交脚本,待执行文件为mph格式,脚本文件为sh,可以参照自己的文件。
    脚本文件无私分享:
#!/bin/bash
# slurmsubmit.sh
#SBATCH -J std
#SBATCH -N 1
#SBATCH -n 20
#SBATCH -p cpu-normal
#SBATCH --mem 256G
#SBATCH -t 10000:00
#SBATCH -o slurm.out
#SBATCH -e slurm.err
#SBATCH --mail-type=all 
#module load intel/17.0.7-thc

# no limit Ram 
ulimit -s unlimit

cd ${SLURM_SUBMIT_DIR}
mkdir ${SLURM_JOBID}
export TMPDIR=${SLURM_SUBMIT_DIR}

input=R20R100_ABH_WO_Damp
INPUTFILE=$input.mph


OUTPUTFILE=${SLURM_JOBID}/${MODELTOCOMPUTE}
BATCHLOG=${SLURM_JOBID}/${MODELTOCOMPUTE}.log

# -nn
/gs/home/xx/Comsol/comsol56/multiphysics/bin/comsol batch -nn 1 -nnhost 12 -np 12 -inputfile ${INPUTFILE} -outputfile ${OUTPUTFILE} \
-batchlog ${BATCHLOG}

安装完成即可
参考:
https://blog.csdn.net/sowhatgavin/article/details/70666200
https://www.bilibili.com/video/BV1vi4y117N9?spm_id_from=333.337.search-card.all.click

三、abaqus

基本需要多试几个节点

1. 将abaqus安装文件上传,首先破解license
2. 在安装目录下输入 ./lmgrd -c abaqus.lic
3. 安装成功后进入abaqus安装,首先创建一个文件夹,并cd到该文件夹
4. 通过chmod + x /setup文件位置(安全打开)
5. 接着csh /setup文件位置(可能需要创建一个scratch的文件位置,输入就好了)
6. 再chmod + x +install.bin文件位置(直接拷贝上面的)
7. 接着csh /setup文件位置
8. enjoy安装
9. 可能需要清空系统的缓存,命令rm -r -f ~/.abaqus/(我没试过)
10. 一个节点安装不成试用多个,这个安装真的靠rp
提交文件就不放在这里了,网上到处都是

参考:来自视频

四、安装解压缩程序

在超算安装其他源程序如p7zip 
1. 下载需要的文件(可以用超算直接下载,超算联网的)
2. chmod打开文件,然后注意用文档查看install文件(注意修改安装位置),和前面装matlab类似
3. make&make install或者./install

参考:https://www.cnblogs.com/xiao-apple36/p/9264875.html

五、一些小白的命令

$ squeue -u xx   查看自己任务

$ scontrol show job 280675   查看自己任务详情

$ sbatch xx.sh    提交任务

./ 指在当前目录

pwd 显示文件位置

cd 进入用户主目录

$ du -hs /gs/home/xx/ 查看容量

$ rm -rf 路径   删除文件夹

Ctrl+c和ctrl+z都是中断命令,但是他们的作用却不一样.
Ctrl+c是强制中断程序的执行。
Ctrl+z的是将任务中断,但是此任务并没有结束,他仍然在进程中他只是维持挂起的状态。

cd进入文件(不可在Ln上直接提交,需要cd进入文件夹里面提交)
将xx.sh中的文件名与提交节点修改,将inp文件与该文件一起上传至文件区,然后使用$ sbatch xx.sh提交即可。
可同时计算三个作业。其他都会排队。

scancel (id) 取消作业

费用查询 http://10.212.66.3
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
禁止转载,如需转载请通过简信或评论联系作者。
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,039评论 6 498
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,223评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 161,916评论 0 351
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,009评论 1 291
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,030评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,011评论 1 295
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,934评论 3 416
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,754评论 0 271
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,202评论 1 309
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,433评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,590评论 1 346
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,321评论 5 342
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,917评论 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,568评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,738评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,583评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,482评论 2 352

推荐阅读更多精彩内容