cd build;
export CPLUS_INCLUDE_PATH=${ROCM_PATH}/include:${ROCM_PATH}:/opencl/include
export LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.1.163/linux/mkl/lib/intel64_lin/:$LD_LIBRARY_PATH
#export PATH=/home/huchen/FAISS/swig-4.0.2-build/bin/:$PATH
export CPLUS_INCLUDE_PATH=${ROCM_PATH}/hiprand/include/:${ROCM_PATH}/rocrand/include:$CPLUS_INCLUDE_PATH
export LD_LIBRARY_PATH=${ROCM_PATH}/hipblas/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${ROCM_PATH}/llvm/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/public/home/huchen/faiss/faiss_hc/build/faiss/gpu/test/:/public/home/huchen/faiss/faiss_hc/build/faiss/:/public/home/huchen/faiss/faiss_hc/build/lib/:$LD_LIBRARY_PATH
export HIP_KERNEL_PRINTF=1
#make -j95 VERBOSE=1
export HIP_VISIBLE_DEVICES=5

export HIP_LAUNCH_BLOCKING=1
export HIP_LOG_LEVEL=7

export AMD_LOG_LEVEL=4
export AMD_OCL_WAIT_COMMAND=1

#ctest

#./faiss/gpu/test/TestGpuIndexFlat > hc_test.log 2>&1 
#./faiss/gpu/test/TestGpuIndexFlat
#ctest -R TestGpuIndexFlat.IP_Float32

#ctest -R TestGpuIndexIVFFlat.Float32_32_Add_L2
#./faiss/gpu/test/TestGpuIndexIVFFlat
#./faiss/gpu/test/TestGpuIndexIVFPQ
#./faiss/gpu/test/TestGpuIndexIVFScalarQuantizer

ctest -V -R TestGpuIndexIVFPQ.Query_IP_MMCodeDistance

##./faiss/gpu/test/TestGpuIndexFlat
##./faiss/gpu/test/TestCodePacking
##./faiss/gpu/test/TestGpuIndexBinaryFlat
##./faiss/gpu/test/TestGpuMemoryException
##./faiss/gpu/test/TestGpuSelect
##./faiss/gpu/test/TestGpuDistance

#ctest -V -R TestGpuSelect.test1Warp
