背景
服务器配置见上文“VASP服务器第一次安装各种软件(上)”
安装torque
高版本的收费,这里用的是老版本是2.5.11
然后
configure
make
make install
配置环境:把contrib/init.d下面的pbs_*等三个文件拷贝到/etc/init.d下面,注意在pbs_mom中加上一行ulimit -s unlimited,省得存储受限。
把/usr/local/[s]bin加到路径里去
建立一个qmgr.conf文件,内容如下:
#create queues and set their attributes.
#
#
# Create and define queue pool
#
create queue pool
set queue pool queue_type = Execution
set queue pool resources_default.nodes = 1
set queue pool enabled = True
set queue pool started = True
#
# Set server attributes.
#
set server scheduling = True
set server acl_hosts = localhost
set server managers = root@localhost
set server operators = root@localhost
set server default_queue = pool
set server log_events = 511
set server mail_from = adm
set server query_other_jobs = True
set server scheduler_iteration = 600
set server node_check_rate = 150
set server tcp_timeout = 6
set server keep_completed = 0
set server allow_node_submit = True
然后运行
qmgr < qmgr.conf
建立一个/var/spool/torque/server_priv/nodes文件,里面内容是:
localhost np=64 pool
其中localhost这个name是在/etc/hosts下面对应的,
把/var/spool/torque/server_priv/路径,以及新建立的nodes文件编程所有用户可读,(不要可写)
chmod +755 server_priv/
chmod +644 nodes
然后写一个启动脚本:
/etc/init.d/pbs_mom restart
/etc/init.d/pbs_server restart
/etc/init.d/pbs_sched restart
每次启动运行这个脚本就行。
Tips:如果用了systemctl enable,就不用每次重启都运行这个脚本了。
qterm
systemctl start pbs_server.service
systemctl status pbs_server.service
systemctl enable pbs_server.service
然后用pbs的脚本就是
#PBS -S /bin/bash
#PBS -N myjob
#PBS -l nodes=1:ppn=32
#PBS -q pool
export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib:/opt/intel/lib/intel64:/opt/intel/mkl/lib/intel64:/usr/local/lib:/lib64:$
LD_LIBRARY_PATH
source /opt/intel/bin/compilervars.sh intel64
source /opt/intel/impi/2019.9.304/intel64/bin/mpivars.sh
source /opt/intel/mkl/bin/mklvars.sh intel64
# This job's working directory
cd $PBS_O_WORKDIR
# Define number of processors
NPROCS=`wc -l < $PBS_NODEFILE`
echo This job has allocated $NPROCS nodes
# Run the parallel MPI executable a.out
安装xcrysden
-
官网下载 http://www.xcrysden.org/Download.html 用的是linux版本的source package
-
解压
tar zxf xcrysden-1.6.2.tar.gz
-
在Make.sys-semishared的基础上修改Make.sys文件,先
cp system/Make.sys-semishared Make.sys
具体修改的不同比较地方如下:
-
安装
make all
,然后make install
注意在这个过程中,涉及到各种外部依赖包的安装,包括如下,但是其实make的过程中会自动下载自动安装,只有在下载失败的过程中才需要再另外单独安装。
-
根据个人习惯,安装完成后会把xcrysden拷贝到~/bin下面,但是需要修改一下里面的路径:
export XCRYSDEN_TOPDIR="/home/lixin/utilities/xcrysden-1.6.2"
- 安装完成,随便找个路径测试一下能否用xcrysden,如下图,是ok的。
安装phonopy
有了cuda,其实phonopy就很好安装了,根据官网http://phonopy.github.io/phonopy/install.html,直接按照步骤来。
安装完成后,检查.bashrc里面的配置是否齐全:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/lixin/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/lixin/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/lixin/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/lixin/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
不全别忘了补全然后source一下