ORNL cades-virtues上编译 RMG/ Compile RMG on Cades-virtues at ORNL

System information:

Linux version 3.10.0-327.4.4.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Tue Jan 5 16:07:00 UTC 2016

 

 

Step 1: Load all required modules (All other modules have been compiled separately, and will be found by cmake later).

module load cmake/3.6.1

Step 2: Modify CMakeFindRootPath.inc file in source code directory: add all separately compiled modules' paths here.

set(CMAKE_FIND_ROOT_PATH
/software/user_tools/current/cades-virtues/apps/fftw/gcc5/3.3.4/
/software/tools/spack/opt/spack/linux-x86_64/gcc-4.8.5/openblas-0.2.15-f74b2gb6oq6bdcwpewkbbgake2rbe25z
/home/z8j/softwares/pfft
/home/z8j/softwares/spglib-1.9.5
/home/z8j/softwares/libxc-2.2.3
/home/z8j/softwares/bzip2-1.0.6
/home/z8j/softwares/scalapack-2.0.2/build
)

Step 3: Modify cmake/Modules/FindFFTW.cmake. There is an error linking FFTW library if we use static libray here, so we need to make sure that cmake find the shared library of FFTW(While in other cases, we will have to use static library, which I am also confused).

# - Find FFTW
# Find the native FFTW3 includes and library
#
#  FFTW_INCLUDES    - where to find fftw3.h
#  FFTW_LIBRARIES   - List of libraries when using FFTW3.
#  FFTW_FOUND       - True if FFTW3 found.

if (FFTW_INCLUDES)
  # Already in cache, be silent
  set (FFTW_FIND_QUIETLY TRUE)
endif (FFTW_INCLUDES)

find_path (FFTW_INCLUDES fftw3.h)
if(NOT FFTW_INCLUDES)
    find_path (FFTW_INCLUDES dfftw3.h)
endif(NOT FFTW_INCLUDES)

find_library (FFTW_LIBRARIES NAMES dfftw3)
if(NOT FFTW_LIBRARIES)
    find_library (FFTW_LIBRARIES NAMES libfftw3.a)
endif(NOT FFTW_LIBRARIES)

if(NOT FFTW_LIBRARIES)
    find_library (FFTW_LIBRARIES NAMES fftw3)
endif(NOT FFTW_LIBRARIES)

find_library (FFTW_MPI_LIBRARIES NAMES libfftw3_mpi.so)

# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)

mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)

Step 4: run following commands in order.

cmake .
make -j 4 rmg-cpu

 

转载于:https://www.cnblogs.com/zjyx/p/5898401.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值