-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Compile from source nor Run binary on WSL2 #211
Comments
@randymojica Thank you for your very detailed issue post. Both Also, it looks like your second .bashrc should use |
@atillack Thank you for your promp reply. The output from rm -f ./host/inc/performdocking.h ./host/src/performdocking.cpp |
@randymojica This looks like you might be using your conda environment's compiler tool chain which seems to clash with WSL's Ubuntu - can you try to deactivate it and compile with Ubuntu's toolchain? |
One more note, it seems that OpenCL is still not working in WSL, so compiling the Cuda version is the way to go: |
@randymojica And one more thing as I am sure you will get things to compile soon - as your GPU is Ampere-based you need to use |
@atillack Thank you again for your kind advices. It was just as you said. The compiler GCC from one of my conda environment was interfering with the one from the OS. To fix the clashing I activated that conda environment and removed its GCC package with CompilationWith this, the command rm -f ./host/inc/performdocking.h ./host/src/performdocking.cpp TestTo test if AutoDock-GPU was working I tried again the command AutoDock-GPU version: v1.5-release Running 1 docking calculation Cuda device: NVIDIA GeForce RTX 3050 Ti Laptop GPU CUDA Setup time 0.359770s Running Job #1 Rest of Setup time 0.015047s Executing docking runs, stopping automatically after either reaching 0.15 kcal/mol standard deviation of Generations | Evaluations | Threshold | Average energy of best 10% | Samples | Best energy
Docking time 32.071513s Shutdown time 0.000865s Job #1 took 32.087 sec after waiting 0.522 sec for setup Run time of entire job set (1 file): 32.881 sec All jobs ran without errors. |
@randymojica Thank you and I am happy it's working for you now. |
Compilation of Auto-Dock GPU under WSL2 (Ubuntu)
and example run
|
Good Afternoon!
I have been working with AutoDock4 since a few years ago and now that there is a recent and updated version I really wanted to give it a try. I tried to compile AutoDock-GPU from source and failed, and downloaded de binary adgpu-v1.5.3_linux_ocl_128wi released on Dec. 17, 2021, but it didn't work either.
To Reproduce
When I tried to execute the binary downloaded from github, there is an error constantly popping up:
./adgpu-v1.5.3_linux_ocl_128wi --lfile ../acarbose_pubchem_minimized.pdbqt --ffile ../aGluc_3top_md_first_frame.maps.fld --nrun 50
Running 1 docking calculation
Kernel source used for development: ./device/calcenergy.cl
Kernel string used for building: ./host/inc/stringify.h
Kernel compilation flags: -I ./device -I ./common -DN128WI -cl-mad-enable
Error: clGetPlatformIDs(): -1001
Expected behavior
I expected for the compiled program to excecute like normal or the downloaded binary to run without problems as in the previous AutoDock 4.2.6, but that was not the case.
Information to help narrow down the bug
Version of AutoDock-GPU: v1.5.3 and v.1.5.release
Which operating system are you on?: WSL2 (tried on both Ubuntu 22.04 LTS and Ubuntu 20.04 LTS) running on Windows 11 Home version 22H2 build 22623.746
Which compiler, compiler version, and
make
compile options did you use?To compile, I tried multiple combination of options in both operative systems, e.g.:
make DEVICE=CUDA NUMWI=256
make DEVICE=CUDA NUMWI=128
make DEVICE=CUDA NUMWI=64
Resulting in:
rm -f ./host/inc/performdocking.h ./host/src/performdocking.cpp
Building adgpu_analysis ...
g++
./host/src/calcenergy.cpp ./host/src/getparameters.cpp ./host/src/main.cpp ./host/src/miscellaneous.cpp ./host/src/processgrid.cpp ./host/src/processligand.cpp ./host/src/processresult.cpp ./host/src/setup.cpp \ -std=c++11 -I./common -I./host/inc -DVERSION="v1.5-release"
-o./bin/adgpu_analysis
-O3 -DTOOLMODE
DEVICE is set to GPU
CPU_INCLUDE_PATH is set to /usr/local/cuda-11.7/include/CL
CPU_LIBRARY_PATH is set to /usr/local/cuda-11.7/lib64
GPU_INCLUDE_PATH is set to /usr/local/cuda-11.7/include
GPU_LIBRARY_PATH is set to /usr/local/cuda-11.7/lib64
nvcc -DN256WI -use_fast_math --ptxas-options="-v" -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -std=c++11 -I./common -I./host/inc -I/usr/local/cuda-11.7/include -I./cuda -c ./cuda/kernels.cu /bin/sh: 1: nvcc: not found
make: *** [Makefile.Cuda:187: kernels] Error 127
While using the next option:
make DEVICE=GPU NUMWI=256
make DEVICE=GPU NUMWI=128
Returned the outputs:
rm -f ./host/inc/performdocking.h ./host/src/performdocking.cpp
Building adgpu_analysis ...
g++
./host/src/calcenergy.cpp ./host/src/getparameters.cpp ./host/src/main.cpp ./host/src/miscellaneous.cpp ./host/src/processgrid.cpp ./host/src/processligand.cpp ./host/src/processresult.cpp ./host/src/setup.cpp \ -std=c++11 -I./common -I./host/inc -DVERSION="v1.5-release"
-o./bin/adgpu_analysis
-O3 -DTOOLMODE
DEVICE is set to GPU
CPU_INCLUDE_PATH is set to /usr/local/cuda-11.7/include/CL CPU_LIBRARY_PATH is set to /usr/local/cuda-11.7/lib64
GPU_INCLUDE_PATH is set to /usr/local/cuda-11.7/include
GPU_LIBRARY_PATH is set to /usr/local/cuda-11.7/lib64
./stringify_ocl_krnls.sh
Stringified input header files:
./common/defines.h
./common/calcenergy_basic.h
Stringified input non-kernel files:
./device/auxiliary_genetic.cl
./device/calcenergy.cl
./device/calcgradient.cl
./device/calcMergedEneGra.cl
Stringified input kernel-files:
./device/kernel1.cl
./device/kernel2.cl
./device/kernel4.cl
./device/kernel3.cl
./device/kernel_sd.cl
./device/kernel_fire.cl
./device/kernel_ad.cl
Stringified output file:
host/inc/stringify.h
ln -sf performdocking.h.OpenCL ./host/inc/performdocking.h
ln -sf performdocking.cpp.OpenCL ./host/src/performdocking.cpp
Building autodock_gpu_256wi ...
g++
./wrapcl/src/BufferObjects.cpp ./wrapcl/src/CommandQueues.cpp ./wrapcl/src/Programs.cpp ./wrapcl/src/Kernels.cpp ./wrapcl/src/Devices.cpp ./wrapcl/src/ImportSource.cpp ./wrapcl/src/Platforms.cpp ./wrapcl/src/Contexts.cpp ./wrapcl/src/ImportBinary.cpp ./wrapcl/src/listAttributes.cpp ./host/src/calcenergy.cpp ./host/src/getparameters.cpp ./host/src/main.cpp ./host/src/miscellaneous.cpp ./host/src/performdocking.cpp ./host/src/processgrid.cpp ./host/src/processligand.cpp ./host/src/processresult.cpp ./host/src/setup.cpp \ -std=c++11 -I./common -I./wrapcl/inc -I./host/inc -I./device -I/usr/local/cuda-11.7/include -L/usr/local/cuda-11.7/lib64 -DVERSION="v1.5-release"
-lOpenCL
-o./bin/autodock_gpu_256wi
-DGPU_DEVICE -DN256WI -O3 -DKRNL_SOURCE=./device/calcenergy.cl -DKRNL_DIRECTORY=./device -DKCMN_DIRECTORY=./common -DK1="gpu_calc_initpop" -DK2="gpu_sum_evals" -DK3="perform_LS" -DK4="gpu_gen_and_eval_newpops" -DK5="gradient_minSD" -DK6="gradient_minFire" -DK7="gradient_minAD"
But if I try to run the compiled program, it does not work:
./autodock_gpu_256wi -L ../acarbose_pubchem_minimized.pdbqt -M ../aGluc_3top_md_first_frame.maps.fld --nrun 50
AutoDock-GPU version: v1.5-release
Running 1 docking calculation
Kernel source used for development: ./device/calcenergy.cl
Kernel string used for building: ./host/inc/stringify.h
Kernel compilation flags:
-I ./device -I ./common -DN256WI -cl-mad-enable
Error: clGetPlatformIDs(): -1001
Which GPU(s) are you running on and is Cuda or OpenCL used?
NVIDIA GeForce RTX3050Ti (Laptop Lenovo LEGION5) targeting for Cuda and the CPU is an Ryzen 7 5800H.
Which driver version and if applicable, which Cuda version are you using?: NVIDIA driver 516.94 and CUDA 11.7 following the instructions for installing CUDA in WSL2 from https://docs.nvidia.com/cuda/wsl-user-guide/index.html
When compiling AutoDock-GPU, are
GPU_INCLUDE_PATH
andGPU_LIBRARY_PATH
set? Are both environment variables set to the correct directories, i.e. corresponding to the correct Cuda version or OpenCL library?On Ubuntu 20.04 LTS I set the environment variables of the file .bashrc in home as:
#Setting CUDA for AutoDock-GPU
export CUDAROOT=/usr/local/cuda-11.7
export GPU_INCLUDE_PATH=$CUDAROOT/include
export GPU_LIBRARY_PATH=$CUDAROOT/lib64
export CPU_INCLUDE_PATH=$CUDAROOT/include/CL
export CPU_LIBRARY_PATH=$CUDAROOT/lib64
The files compiled with DIVICE=GPU but the executable did not work.
Then I tried something slightly different on Ubuntu 22.04 LTS:
#Setting environment variables for ADGPU
export CUDAROOT=/usr/local/cuda
export PATH=$CUDAROOT/bin/:$PATH
export GPU_INCLUDE_PATH=$CUDAROOT/include
export GPU_LIBRARY_PATH=$CUDAROOT/lib64
The files did not compile, but again the program did not work.
Files:
aGluc_3top_md_first_frame.maps.zip
The text was updated successfully, but these errors were encountered: