超算小站 超算小站
首页
  • 注册账号
  • 登录系统
  • 熟悉系统
  • 配置环境
  • 数据管理
  • 作业管理
  • 集群软件环境:

    • 01.编译环境
    • 02.基础库
    • 03.应用软件
    • 04.工具软件
    • 05.常用语言环境
    • 06.使用进阶
  • 入门课程

    • 01.超算历史
    • 02.VPN登录
    • 03.Mobaxterm工具
    • 04.Linux基本命令
    • 05.Module环境变量管理工具
    • 06.Vim文本编辑器使用
    • 07.Slurm作业管理系统
HPC&AI
  • 01.登录问题
  • 02.编译问题
  • 03.作业问题
  • 04.存储和数据问题
  • 05.GPU问题
资料下载
归档
关于我
🚀试用
首页
  • 注册账号
  • 登录系统
  • 熟悉系统
  • 配置环境
  • 数据管理
  • 作业管理
  • 集群软件环境:

    • 01.编译环境
    • 02.基础库
    • 03.应用软件
    • 04.工具软件
    • 05.常用语言环境
    • 06.使用进阶
  • 入门课程

    • 01.超算历史
    • 02.VPN登录
    • 03.Mobaxterm工具
    • 04.Linux基本命令
    • 05.Module环境变量管理工具
    • 06.Vim文本编辑器使用
    • 07.Slurm作业管理系统
HPC&AI
  • 01.登录问题
  • 02.编译问题
  • 03.作业问题
  • 04.存储和数据问题
  • 05.GPU问题
资料下载
归档
关于我
🚀试用
  • 编译环境

  • 基础库

  • 应用软件

    • alamode 编译安装教程
    • ANGSD 编译安装教程
    • BEAST安装使用教程
    • BerkeleyGW-2.1 安装教程
    • COMSOL安装教程
    • CP2K编译安装教程
      • 简介
      • 编译环境
      • 一些依赖库
        • BLAS/LAPACK
        • LIBINT
        • LIBXC
      • 编译cp2k
    • gromacs编译安装教程
    • jfeff安装说明
    • LAMMPS编译安装教程
    • MIgcm编译安装教程
    • MOLPRO安装使用说明
    • nciplot安装说明
    • ovito安装说明(windows+linux)
    • swash编译安装教程
    • UV-CDAT 安装教程
    • VASP编译安装教程
    • 如何使用WRF
    • VASP6.x编译安装教程
  • 工具软件

  • 常用语言环境

  • 使用进阶

  • 软件中心
  • 应用软件
mrzhenggang
2017-12-05
目录

CP2K编译安装教程

# 简介

CP2K是一种量子化学和固态物理软件包,可以执行固态,液态,分子,周期,材料,晶体和生物系统的原子模拟。 CP2K为不同的建模方法提供了一般框架,例如使用混合高斯和DFT的DFT接近GPW和GAPW。

链接:官网地址 (opens new window),下载地址 (opens new window)

# 编译环境

cp2k 支持 multi-threading, MPI, and CUDA

单线程版本只需要串行编译器即可,多线程版本需要编译器支持例如-fopenmp参数,MPI版本需要MPI编译器,CUDA版本需要CUDA编译器。

本文仅介绍前两种,针对CUDA的编译暂略。

设置编译环境举例:

# 设置intel编译器环境
source /opt/intel/composer_xe_2013.0.079/bin/iccvars.sh intel64
source /opt/intel/composer_xe_2013.0.079/bin/ifortvars.sh intel64
source /opt/intel/composer_xe_2013.0.079/mkl/bin/mklvars.sh intel64
# 设置mpi编译环境
export PATH=/usr/local/mpi-intel2013/bin:$PATH  
export LD_LIBRARY_PATH=/usr/local/mpi-intel2013/lib:$LD_LIBRARY_PATH
1
2
3
4
5
6
7

# 一些依赖库

# BLAS/LAPACK

使用Intel编译器,直接用MKL库即可。

# LIBINT

Libint is a software stack for computing integrals used in molecular quantum mechanics.

# 下载:https://sourceforge.net/projects/libint/files/v1-releases/
./configure CC=icc CXX=icpc FC=ifort \
  --prefix=$HOME/software/libint-1.1.5 --enable-deriv
make
make install
1
2
3
4
5

# LIBXC

Libxc is a library of exchange-correlation functionals for density-functional theory. The aim is to provide a portable, well tested and reliable set of exchange and correlation functionals that can be used by all the ETSF codes and also other codes.

# 下载:http://octopus-code.org/wiki/Libxc:download
tar zxvf libxc-2.2.3.tar.gz
cd libxc-2.2.3
./configure CC=icc CXX=icpc FC=ifort --prefix=$HOME/libxc/2.2.3
make
make install
1
2
3
4
5
6

# 编译cp2k

tar zxvf cp2k-4.1.tar.gz
cd cp2k-4.1

# 因为用的是mpich,所以修改mpi的编译命令
sed -i "s/mpiicpc/mpicxx/g" arch/Linux-x86-64-intel-mic.psmp 
sed -i "s/mpiicc/mpicc/g" arch/Linux-x86-64-intel-mic.psmp
sed -i "s/mpiifort/mpif90/g" arch/Linux-x86-64-intel-mic.psmp

cd makefiles/
make -j 12 ARCH=Linux-x86-64-intel-host \
  VERSION=popt \
  LIBINTROOT=$HOME/software/libint/1.1.5 \
  LIBXCROOT=$HOME/software/libxc/2.2.3 \
  MKL_STATIC=2
1
2
3
4
5
6
7
8
9
10
11
12
13
14

说明:

参数 含义
-j 12 用 12 个核同时编译
ARCH=Linux-x86-64-intel-host 指定ARCH为linux系统,x86_64架构,用intel编译器
VERSION=popt 指定为mpi版本
LIBINTROOT=$HOME/software/libint/1.1.5 给出libint路径,不给出则不支持该库
LIBXCROOT=$HOME/software/libxc/2.2.3 给出libxc路径,不给出则不支持该库
MKL_STATIC=2 选择动态MKL库的支持

备注:

  1. 可以依据需求编译各种版本:
    • sopt 串行
    • ssmp 多线程
    • popt mpi版本
    • psmp mpi+多线程
  2. 网络上有一个非常详细的教程,可以参考:
    • cp2k4.x-5.x 最新多进程并行版(host.popt版)超详细完美安装教程 (opens new window)
COMSOL安装教程
gromacs编译安装教程

← COMSOL安装教程 gromacs编译安装教程→

Theme by Vdoing | Copyright © 2015-2024 Zheng Gang | MIT License | 津ICP备2021008634号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×