From b4d77b1dc9af2a483b02f43bb87ca26d633e1093 Mon Sep 17 00:00:00 2001 From: Sergei Isakov Date: Fri, 18 Feb 2022 16:22:55 +0100 Subject: [PATCH] cuQuantum lib directory. --- Makefile | 2 +- apps/make.sh | 2 +- pybind_interface/custatevec/CMakeLists.txt | 2 +- tests/make.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 706ffab6d..7cdaa4149 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ ARCHFLAGS = -march=native NVCCFLAGS = -O3 # CUQUANTUM_DIR should be set. -CUSTATEVECFLAGS = -I$(CUQUANTUM_DIR)/include -L$(CUQUANTUM_DIR)/lib64 -lcustatevec -lcublas +CUSTATEVECFLAGS = -I$(CUQUANTUM_DIR)/include -L${CUQUANTUM_DIR}/lib -L$(CUQUANTUM_DIR)/lib64 -lcustatevec -lcublas PYBIND11 = true diff --git a/apps/make.sh b/apps/make.sh index 7b2db2c8e..c742e1927 100755 --- a/apps/make.sh +++ b/apps/make.sh @@ -27,5 +27,5 @@ nvcc -O3 -o qsim_base_cuda.x qsim_base_cuda.cu nvcc -O3 -o qsim_qtrajectory_cuda.x qsim_qtrajectory_cuda.cu # CUQUANTUM_DIR should be set. -CUSTATEVECFLAGS="-I${CUQUANTUM_DIR}/include -L${CUQUANTUM_DIR}/lib64 -lcustatevec -lcublas" +CUSTATEVECFLAGS="-I${CUQUANTUM_DIR}/include -L${CUQUANTUM_DIR}/lib -L${CUQUANTUM_DIR}/lib64 -lcustatevec -lcublas" nvcc -O3 $CUSTATEVECFLAGS -o qsim_base_custatevec.x qsim_base_custatevec.cu diff --git a/pybind_interface/custatevec/CMakeLists.txt b/pybind_interface/custatevec/CMakeLists.txt index 0d9a05fbc..912f531cc 100644 --- a/pybind_interface/custatevec/CMakeLists.txt +++ b/pybind_interface/custatevec/CMakeLists.txt @@ -46,7 +46,7 @@ find_package(CUDA REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS} ${pybind11_SOURCE_DIR}/include) include_directories($ENV{CUQUANTUM_DIR}/include) -link_directories($ENV{CUQUANTUM_DIR}/lib64) +link_directories($ENV{CUQUANTUM_DIR}/lib $ENV{CUQUANTUM_DIR}/lib64) cuda_add_library(qsim_custatevec MODULE pybind_main_custatevec.cpp) target_link_libraries(qsim_custatevec -lcustatevec -lcublas) diff --git a/tests/make.sh b/tests/make.sh index fb3bbc8ec..f379a102d 100755 --- a/tests/make.sh +++ b/tests/make.sh @@ -61,7 +61,7 @@ nvcc -O3 -I$path_to_include -L$path_to_lib -o simulator_cuda_test.x simulator_cu nvcc -O3 -I$path_to_include -L$path_to_lib -o statespace_cuda_test.x statespace_cuda_test.cu -lgtest -lpthread # CUQUANTUM_DIR should be set. -CUSTATEVECFLAGS="-I${CUQUANTUM_DIR}/include -L${CUQUANTUM_DIR}/lib64 -lcustatevec -lcublas" +CUSTATEVECFLAGS="-I${CUQUANTUM_DIR}/include -L${CUQUANTUM_DIR}/lib -L${CUQUANTUM_DIR}/lib64 -lcustatevec -lcublas" nvcc -O3 $CUSTATEVECFLAGS -I$path_to_include -L$path_to_lib -o hybrid_custatevec_test.x hybrid_custatevec_test.cu -lgtest -lpthread nvcc -O3 $CUSTATEVECFLAGS -I$path_to_include -L$path_to_lib -o qtrajectory_custatevec_test.x qtrajectory_custatevec_test.cu -lgtest -lpthread nvcc -O3 $CUSTATEVECFLAGS -I$path_to_include -L$path_to_lib -o simulator_custatevec_test.x simulator_custatevec_test.cu -lgtest -lpthread