分类 科研 下的文章

[原创]无光线传感器笔记本上自动调整亮度的设置

2020-03-03:补充和clight作者交流后得知的扩充功能的方法

2020-02-21:创建文章

本文章中的操作为原创内容,适用于Manjaro Linux和Microsoft Windows 10,其余环境未作尝试,软件从网上获得。本文如有转载,请注明出处。
——by realasking

最近一直写东西,眼睛有些受不了,但是自己的电脑都没有光线传感器,亮度得不断调整,为了解决这个问题,就在网上搜索了一下,在Manjaro和Win10上分别找到了实现办法,记录如下:

使用Manjaro Linux的联想小新潮7000笔记本实现应用摄像头测光的屏幕亮度自动调整

安装clight和clightd

yaourt -S clight-git clightd-git

clight的配置

该软件安装之后,重启计算机服务就会自动打开,但是默认调光是线性的,没有考虑到两个问题:
1.人的视觉感受不是线性的
2.光线强到一定程度发生溢出之后的所有量化值都一样了
所以需要我们重新配置
该软件配置文件位置在:

/etc/default/clight.conf

根据说明,我调整了这几项:

#调光步长
backlight_trans_step = 0.05;
#图片亮度取值为[0,1],然后分成11个刻度,每个刻度对应屏幕约化亮度
ac_backlight_regression_points = [ 0.0, 0.082, 0.133, 0.2046, 0.2758, 0.33, 0.385, 0.408, 0.52, 0.69, 1.0 ];
batt_backlight_regression_points = [ 0.0, 0.08, 0.128, 0.19, 0.25, 0.297, 0.338, 0.35, 0.44, 0.57, 0.80 ];
#用5帧的结果调光
captures = 5;
#北京的经纬度
latitude = 39.9;
longitude = 116.5;

两组对应亮度的参数我均以最近白天靠阳台房间窗口背光处笔记本云很少的时候的笔记本适合我的感观的亮度作为基准,对应于第7,8个数字,其余部分尽量平滑的变化到最大值和最小值,然后再根据自己的感受做了一定调整。高亮度部分不如低亮度部分可靠,对应的点太少。
使用中感觉要好了不少,但是在夜间,有时测光后亮度会非常亮,这种感觉不好,尚不知原因。

创建clight个人模块,增加夜间停用自动调光功能

夜间有时自动调光亮度过亮,不知道原因,但win下没有这问题,经过和作者交流(夜间停用调光),得知可以通过创建个人模块的办法来解决,做法是:

创建一个c语言模块文件

比如叫a.c。
我所用的模块是将作者回复我的内容稍作修改实现的。我加上夜间先调光的内容,将夜间的亮度先设置为0.16,然后再关闭。

编译为模块

gcc -shared -fPIC a.c -o NightOFF -Wno-unused

然后拷贝到:

a="~/.local/share/clight/modules.d"
mkdir "$a" && cp NightOFF "$a"

详情见自定义模块

然后重启就好了。
该软件作者非常热情,回复很积极,很开心。

Windows 10下用摄像头测光并调整亮度的办法

软件的选择

Windows下曾经有多个软件可以实现这样的功能,然而,现在已经不容易找到了,经过反复搜索,找到了BLUntrl和SoftonEyes这两个还能下载使用的软件。然而,这两个软件均不能自己设定调光频率而且摄像头持续开启,其中BLUntrl还需要结合nircmd才能使用,会导致不断弹窗。
不过摄像头的开闭可以通过打开关闭程序来实现,所以最终选择使用SoftonEyes。

软件安装

解压SoftonEyes到D:\Tools\SoftonEyes,用choco安装AutoHotKeys和AutoHotKeys compiler

软件配置

建立AdjustBrightness.ahk,内容如下:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
Loop
{
   Run, D:\Tools\SoftonEyes.exe
     Sleep, 10000
   Run, taskkill /im SoftonEyes* /F,,Hide
     Sleep, 1800000
}
Return

编译该文件,然后把快捷方式加入开机运行即可。

【笔记】在联想小新潮7000-15ARR+Manjaro Linux使用pyopencl和amd开源显卡驱动的安装配置

个人笔记,如有转载,请注明出处。
——by realasking


众所周知,amdgpu开源驱动的opengl硬件加速性能比amdgpu-pro闭源显卡更好,但其通过mesa实现的opencl只能支持到1.1版,而且并不总能正常的工作。如果能在开源显卡驱动的基础上安装闭源驱动中的opencl支持,显然是非常好的事情。好在AUR中就提供有这样的方案。

安装

yaourt -S opencl-amd ocl-icd opencl-headers clinfo pyopencl-headers python-pyopencl

检查


[realasking@zh-pc ~]$ clinfo 
Number of platforms                               2
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (2906.7)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             AMD

Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.1 AMD-APP (2906.7)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
  Platform Host timer resolution                  1ns
  Platform Extensions function suffix             AMD

Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 1
  Device Name                                     gfx804
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.2 AMD-APP (2906.7)
  Driver Version                                  2906.7
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Board Name (AMD)                         Radeon 500 Series
  Device Topology (AMD)                           PCI-E, 01:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               8
  SIMD per compute unit (AMD)                     4
  SIMD width (AMD)                                16
  SIMD instruction width (AMD)                    1
  Max clock frequency                             1124MHz
  Graphics IP (AMD)                               8.0
  Device Partition                                (core)
    Max number of sub-devices                     8
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x1024
  Max work group size                             256
  Preferred work group size (AMD)                 256
  Max work group size (AMD)                       1024
  Preferred work group size multiple              64
  Wavefront width (AMD)                           64
  Preferred / native vector sizes
char 4 / 4
short 2 / 2
int 1 / 1
long 1 / 1
half 1 / 1 (cl_khr_fp16) float 1 / 1
double 1 / 1 (cl_khr_fp64) Half-precision Floating-point support (cl_khr_fp16) Denormals No Infinity and NANs No Round to nearest No Round to zero No Round to infinity No IEEE754-2008 fused multiply-add No Support is emulated in software No Single-precision Floating-point support (core) Denormals No Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Correctly-rounded divide and sqrt operations Yes Double-precision Floating-point support (cl_khr_fp64) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Address bits 64, Little-Endian Global memory size 2141634560 (1.995GiB) Global free memory (AMD) 2071608 (1.976GiB) Global memory channels (AMD) 2 Global memory banks per channel (AMD) 16 Global memory bank width (AMD) 256 bytes Error Correction support No Max memory allocation 1596849766 (1.487GiB) Unified memory for Host and Device No Minimum alignment for any data type 128 bytes Alignment of base address 2048 bits (256 bytes) Global Memory cache type Read/Write Global Memory cache size 16384 (16KiB) Global Memory cache line size 64 bytes Image support Yes Max number of samplers per kernel 16 Max size for 1D images from buffer 134217728 pixels Max 1D or 2D image array size 2048 images Base address alignment for 2D image buffers 256 bytes Pitch alignment for 2D image buffers 256 pixels Max 2D image size 16384x16384 pixels Max 3D image size 2048x2048x2048 pixels Max number of read image args 128 Max number of write image args 8 Local memory type Local Local memory size 32768 (32KiB) Local memory syze per CU (AMD) 65536 (64KiB) Local memory banks (AMD) 32 Max number of constant args 8 Max constant buffer size 1596849766 (1.487GiB) Preferred constant buffer size (AMD) 16384 (16KiB) Max size of kernel argument 1024 Queue properties
Out-of-order execution No Profiling Yes Prefer user sync for interop Yes Profiling timer resolution 1ns Profiling timer offset since Epoch (AMD) 1580776646713521172ns (Tue Feb 4 08:37:26 2020) Execution capabilities
Run OpenCL kernels Yes Run native kernels No Thread trace supported (AMD) Yes Number of async queues (AMD) 2 Max real-time compute queues (AMD) 0 Max real-time compute units (AMD) 0 SPIR versions 1.2 printf() buffer size 4194304 (4MiB) Built-in kernels (n/a) Device Extensions cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_amd_bus_addressable_memory cl_khr_spir cl_khr_gl_event Platform Name AMD Accelerated Parallel Processing Number of devices 1 Device Name gfx902 Device Vendor Advanced Micro Devices, Inc. Device Vendor ID 0x1002 Device Version OpenCL 2.0 AMD-APP (2906.7) Driver Version 2906.7 (PAL,HSAIL) Device OpenCL C Version OpenCL C 2.0 Device Type GPU Device Board Name (AMD) Unknown AMD GPU Device Topology (AMD) PCI-E, 05:00.0 Device Profile FULL_PROFILE Device Available Yes Compiler Available Yes Linker Available Yes Max compute units 8 SIMD per compute unit (AMD) 4 SIMD width (AMD) 16 SIMD instruction width (AMD) 1 Max clock frequency 1100MHz Graphics IP (AMD) 9.2 Device Partition (core) Max number of sub-devices 8 Supported partition types None Supported affinity domains (n/a) Max work item dimensions 3 Max work item sizes 1024x1024x1024 Max work group size 256 Preferred work group size (AMD) 256 Max work group size (AMD) 1024 Preferred work group size multiple 64 Wavefront width (AMD) 64 Preferred / native vector sizes
char 4 / 4
short 2 / 2
int 1 / 1
long 1 / 1
half 1 / 1 (cl_khr_fp16) float 1 / 1
double 1 / 1 (cl_khr_fp64) Half-precision Floating-point support (cl_khr_fp16) Denormals No Infinity and NANs No Round to nearest No Round to zero No Round to infinity No IEEE754-2008 fused multiply-add No Support is emulated in software No Single-precision Floating-point support (core) Denormals No Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Correctly-rounded divide and sqrt operations Yes Double-precision Floating-point support (cl_khr_fp64) Denormals Yes Infinity and NANs Yes Round to nearest Yes Round to zero Yes Round to infinity Yes IEEE754-2008 fused multiply-add Yes Support is emulated in software No Address bits 64, Little-Endian Global memory size 2684354560 (2.5GiB) Global free memory (AMD) 2553760 (2.435GiB) Global memory channels (AMD) 4 Global memory banks per channel (AMD) 4 Global memory bank width (AMD) 256 bytes Error Correction support No Max memory allocation 912680550 (870.4MiB) Unified memory for Host and Device Yes Shared Virtual Memory (SVM) capabilities (core) Coarse-grained buffer sharing Yes Fine-grained buffer sharing Yes Fine-grained system sharing No Atomics No Minimum alignment for any data type 128 bytes Alignment of base address 2048 bits (256 bytes) Preferred alignment for atomics
SVM 0 bytes Global 0 bytes Local 0 bytes Max size for global variable 821412352 (783.4MiB) Preferred total size of global vars 2684354560 (2.5GiB) Global Memory cache type Read/Write Global Memory cache size 16384 (16KiB) Global Memory cache line size 64 bytes Image support Yes Max number of samplers per kernel 16 Max size for 1D images from buffer 134217728 pixels Max 1D or 2D image array size 2048 images Base address alignment for 2D image buffers 256 bytes Pitch alignment for 2D image buffers 256 pixels Max 2D image size 16384x16384 pixels Max 3D image size 2048x2048x2048 pixels Max number of read image args 128 Max number of write image args 64 Max number of read/write image args 64 Max number of pipe args 16 Max active pipe reservations 16 Max pipe packet size 912680550 (870.4MiB) Local memory type Local Local memory size 65536 (64KiB) Local memory syze per CU (AMD) 65536 (64KiB) Local memory banks (AMD) 32 Max number of constant args 8 Max constant buffer size 912680550 (870.4MiB) Preferred constant buffer size (AMD) 16384 (16KiB) Max size of kernel argument 1024 Queue properties (on host)
Out-of-order execution No Profiling Yes Queue properties (on device)
Out-of-order execution Yes Profiling Yes Preferred size 262144 (256KiB) Max size 8388608 (8MiB) Max queues on device 1 Max events on device 1024 Prefer user sync for interop Yes Number of P2P devices (AMD) 0 P2P devices (AMD) (n/a) Profiling timer resolution 1ns Profiling timer offset since Epoch (AMD) 1580776646713519545ns (Tue Feb 4 08:37:26 2020) Execution capabilities
Run OpenCL kernels Yes Run native kernels No Thread trace supported (AMD) Yes Number of async queues (AMD) 4 Max real-time compute queues (AMD) 0 Max real-time compute units (AMD) 0 SPIR versions 1.2 printf() buffer size 4194304 (4MiB) Built-in kernels (n/a) Device Extensions cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_khr_gl_depth_images cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_subgroups cl_khr_gl_event cl_khr_depth_images cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_amd_copy_buffer_p2p NULL platform behavior clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) AMD Accelerated Parallel Processing clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [AMD] clCreateContext(NULL, ...) [default] Success [AMD] clCreateContext(NULL, ...) [other] Success [AMD] clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1) Platform Name AMD Accelerated Parallel Processing Device Name gfx804 clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1) Platform Name AMD Accelerated Parallel Processing Device Name gfx804 clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1) Platform Name AMD Accelerated Parallel Processing Device Name gfx804 ICD loader properties ICD loader Name OpenCL ICD Loader ICD loader Vendor OCL Icd free software ICD loader Version 2.2.12 ICD loader Profile OpenCL 2.2

切换显卡

使用环境变量PYOPENCL_CTX='0''1'

【笔记】对python的最佳优化:换用C++

之前写了个处理计算数据的脚本,图方便,直接用python做的,结果哪想到后来要反复使用这个脚本,就觉得慢了,于是进行了一系列优化。
最初这个脚本运行时间是270秒左右;
使用numpy替换部分列表之后,运行时间缩短到220~240秒;
numpy对部分矩阵赋值改成整行赋值,运行时间缩短到202秒;
将部分内容函数化,然后把外层循环用迭代器替换,运行时间缩短到184秒;
嗯,成效显著。突发奇想,要是换成c++来实现一下怎么样?
于是花了两个小时coding,运行之后......
耗时5秒。
嗯,看到这个结果......
今后需要多次使用的脚本,不太复杂的还是用c++吧......

【原创】通过Zerotier进行远程桌面访问速度太慢的解决方法

个人笔记,如有转载,请注明出处。

——by realasking

微软Windows10自带的远程桌面mstsc是一种非常方便的远程桌面连接方式,在Linux上则有xrdp这一使用相同协议的服务器端实现,可以使mstsc顺利访问。相比于teamviewer向日葵等第三方的远程桌面,使用rdp协议mstsc访问远程桌面不影响显示器驱动,对支持多用户、多登录的远程系统(如Linux)可以不在远程电脑上显示正在进行的操作,对于不支持多个登录的远程系统(如Windows)则在远程登录时会退出本地登录,这种设计大大增强了用户操作的安全性,防止远程设备在无人看管的情况下发生的泄密,或者受到他人误操作影响。

然而,这一远程桌面工具却只能在局域网内使用,殊为可惜,对于这一问题的一个解决办法是搭建虚拟局域网Zerotier就是一个很好的工具。用Zerotier建立虚拟局域网的方法是:

  1. Zerotier的官网注册,并建立private的网络

  2. 在两台不同网络环境的电脑上分别安装其客户端,并在客户端join network

  3. 打开两台设备上的9993端口

  4. Zerotier官网上Auth两个连接的设备

  5. 在操作端打开微软远程桌面连接

在不同网络环境下,Zerotier表现很不相同,有些地方网速能达到3-4MB/s,有些地方只能达到0-10KB/s,这对于笔记本电脑用户来说,无疑是难以接受的。对此,一般的解决方法是建立Moon服务器。然而,对于具有ipv6地址的公网vps服务器Zerotier在建立虚拟局域网映射时往往会使用Moon服务器ipv6地址,这对于国内很多宽带wifi用户来说,非但起不到加速作用,相反还会让连接速度更慢。对于此问题,本文找到一个解决办法,就是使用代理服务器。

具体做法是:

  1. vps上,建立socks5代理服务器,软件任意
  2. 除了Moon服务器外,同时也join network
  3. 在操作设备上,将代理服务器映射到127.0.0.1:1080,使用本地PAC
  4. 华军软件园下载SocksCap64并解压
  5. 打开SocksCap64,点击程序旁的向下按钮,添加微软的mstsc
  6. 点击代理,添加127.0.0.1:1080
  7. SocksCap64使用mstsc

除了可以用代理访问mstsc之外,操作设备上如果安装了WSL,也可以在其中以代理方式使用sshrsync,方法是:

#ssh的使用
ssh -o ProxyCommand=\"nc -X 5 -x 127.0.0.1:1080 %h %p\" RemoteSSH

#rsync的使用
export RSYNC_PROXY="127.0.0.1:1080"
rsync 参数.....

这样,只要vps能正常连接,远程连接就更加方便了。

【原创】2019年使用Intel编译器和CMake编译支持CUDA、python的lammps

个人笔记,如有转载,请注明出处。

--by realasking

这几年来,lammps的程序变得规范了许多,自从其github上发布的版本支持cmake之后,编译也变得简单了不少。去年8月曾经尝试在自己笔记本的win10下的WSL环境用cmake编译过一个简单的版本,并将方法发布在百度lammps吧:win10下安装lammps不完全教程,现在发现它已经更加完善,于是就在实验室服务器上用此方法重新编译了一个更新版本。

系统环境

我们实验室的服务器有P100显卡,安装有intel编译器和mkl数学库,之前已经安装了virtualenv,vtk,voro++,jpeg,png等库及开发包。

系统环境变量采用env-modules来管理。

安装mpi4py

pip3 install mpi4py

安装cmake 3.1

要支持GPU组件和识别MKL数学库,必须使用cmake3.1。

yum install cmake3*

获取lammps

git clone https://github.com/lammps/lammps.git

编译Cuda版

[user@cmake]$mkdir build; cd build
[user@build]$cmake3 .. -DCMAKE_INSTALL_PREFIX=~/lammps -DCMAKE_BUILD_TYPE=Release -DPKG_CORESHELL=ON -DPKG_DIPOLE=ON -DPKG_GRANULAR=ON -DPKG_MOLECULE=ON -DPKG_PERI=ON -DPKG_MC=ON  -DPKG_MISC=ON -DPKG_USER-MEAMC=ON -DPKG_USER-REAXC=ON -DPKG_REPLICA=ON -DPKG_KSPACE=ON -DPKG_PYTHON=ON -DPKG_POEMS=ON -DPKG_MANYBODY=ON -DPKG_USER-ATC=ON -DPKG_USER-AWPMD=ON -DPKG_USER-DIFFRACTION=ON -DPKG_USER-FEP=ON -DPKG_USER-MEAMC=ON -DPKG_USER-MOLFILE=ON -DPKG_USER-PHONON=ON -DPKG_USER-REAXC=OFF -DPKG_USER-VTK=ON -DPKG_VORONOI=ON -DDOWNLOAD_VORO=OFF -DPKG_USER-FEP=ON -DPKG_USER-MEAMC=ON -DPKG_USER-MOLFILE=ON -DPKG_USER-PHONON=ON -DPKG_USER-VTK=ON -DBUILD_OMP=ON -DPKG_OPT=ON -DPKG_USER-OMP=ON -DPKG_KOKKOS=OFF -DPKG_KIM=OFF -DPKG_LATTE=OFF -DDOWNLOAD_KIM=OFF -DBUILD_OMP=ON -DPKG_OPT=ON -DPKG_USER-OMP=ON -DBUILD_LIB=ON -DBUILD_EXE=ON -DBUILD_SHARED_LIBS=ON -DPKG_GPU=ON -DPKG_PYTHON=ON -DGPU_API=cuda -DGPU_ARCH=sm_60 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_Fortran_COMPILER=mpif90 -DFFT=MKL -DMKL_INCLUDE_DIRS=-I/opt/intel2015/composer_xe_2015.2.164/mkl/include -DMKL_LIBRARIES=-L/opt/intel2015/composer_xe_2015.2.164/mkl/lib/intel64
[user@build]$make -j20
[user@build]$make install

编译纯CPU版

[user@cmake]$mkdir build2; cd build2
[user@build2]$cmake3 .. -DCMAKE_INSTALL_PREFIX=~/lammps_nocuda -DCMAKE_BUILD_TYPE=Release -DPKG_CORESHELL=ON -DPKG_DIPOLE=ON -DPKG_GRANULAR=ON -DPKG_MOLECULE=ON -DPKG_PERI=ON -DPKG_MC=ON  -DPKG_MISC=ON -DPKG_USER-MEAMC=ON -DPKG_USER-REAXC=ON -DPKG_REPLICA=ON -DPKG_KSPACE=ON -DPKG_PYTHON=ON -DPKG_POEMS=ON -DPKG_MANYBODY=ON -DPKG_USER-ATC=ON -DPKG_USER-AWPMD=ON -DPKG_USER-DIFFRACTION=ON -DPKG_USER-FEP=ON -DPKG_USER-MEAMC=ON -DPKG_USER-MOLFILE=ON -DPKG_USER-PHONON=ON -DPKG_USER-REAXC=OFF -DPKG_USER-VTK=ON -DPKG_VORONOI=ON -DDOWNLOAD_VORO=OFF -DPKG_USER-FEP=ON -DPKG_USER-MEAMC=ON -DPKG_USER-MOLFILE=ON -DPKG_USER-PHONON=ON -DPKG_USER-VTK=ON -DBUILD_OMP=ON -DPKG_OPT=ON -DPKG_USER-OMP=ON -DPKG_KOKKOS=OFF -DPKG_KIM=OFF -DPKG_LATTE=OFF -DDOWNLOAD_KIM=OFF -DBUILD_OMP=ON -DPKG_OPT=ON -DPKG_USER-OMP=ON -DBUILD_LIB=ON -DBUILD_EXE=ON -DBUILD_SHARED_LIBS=ON -DPKG_PYTHON=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_Fortran_COMPILER=mpif90 -DFFT=MKL -DMKL_INCLUDE_DIRS=-I/opt/intel2015/composer_xe_2015.2.164/mkl/include -DMKL_LIBRARIES=-L/opt/intel2015/composer_xe_2015.2.164/mkl/lib/intel64
[user@build2]$make -j20
[user@build2]$make install

然后将两个版本分别加入到module文件中,使用时动态切换就可以了。

最新文章

最近回复

  • realasking: 哪里的话,还要非常感...
  • cnfczn: 发送留言报错:in_...
  • cnfczn: 大狮兄666,以前经...
  • realasking: 最近还行啊,就是上网...
  • cnfczn: 大狮兄,好久不见啊....
  • realasking: 您好。有什么问题就在...
  • Eric Chen: 作者你好!最近折腾中...

分类

归档

其它