-
Notifications
You must be signed in to change notification settings - Fork 18
Libxc with CUDA support installation guide
Eduardo Andres Perez Leale edited this page Jul 2, 2018
·
7 revisions
The purpose of this document is to provide a guide to successfully install the version of the Libxc library wich has support for CUDA devices. Once the install is complete, you can then compile Lio with Libxc support.
- Cuda Toolkit v8.0 or above download page.
- CMake v3.9.0 or above download page.
- Clone the library from gitlab (you'll need to have an account).
git clone git@gitlab.com:eduarditoperez/libxc.git
- Switch to the libxc-gpu branch
git checkout cuda-integration
- Create the install folder by typping the following command
cmake -H. -Bobjdir
- Go to the
objdir
folder that was created in step 3.
cd objdir
- Create the
libxc_cuda.so
shared library by typping the make command from theobjdir
folder
make
-
Copy the
xc_version.h
file located inobjdir
to the parent folder. This file is generated as the result of the step 5 and is needed to run the test. -
Install the
libxc_cuda.so
in you libraries folder. -
Create and export two environment variables in LD_LIBRARY_PATH,
LIBXC_LIBS=points to the path where the libxc libaries where installed in the file system.
LIBXC_INCLUDES=points to the path where the libxc include files where installed in the file system.
- To run the test, go to the
unit-test
folder located inlibxc/testsuite/unit_test
and run the commandmake
. After the script has finished you should see the test results.
Running gpu test...
work_gga_c test: 0
work_gga_x test: 0
work_lda test: 0
work_mgga_c test: 0
work_mgga_x test: 0
The 0
after each test means that the test is ok.
Once Libxc is successfuly installed, you can compile Lio with Libxc support. Here are all the possible compilations modes for Lio with Libxc,
- make cuda=0 cpu=1 libxc=0 - Lio cpu version without Libxc.
- make cuda=0 cpu=1 libxc=1 - Lio cpu version with Libxc cpu version.
- make cuda=1 cpu=0 libxc=0 - Lio gpu version without Libxc.
- make cuda=1 cpu=0 libxc=1 - Lio gpu version with Libxc cpu version.
- make cuda=1 cpu=0 libxc=2 - Lio gpu version with Libxc gpu version.