Re: [AMBER] CUDART lib not found during install

From: Charlotta Lebedenko <clebedenko.fordham.edu>
Date: Mon, 4 Apr 2022 15:24:43 -0400

Hi Dan,

Sorry for not replying for a while. Thanks so much for your above
suggestions, we tried them both with no luck. We did end up reinstalling
CUDA to get version 11.1 instead of 11.4. We tried using approach #2 that
you suggested, and we are getting the following errors.

Here is the command:
FC=gfortran F77=gfortran F90=gfortran ./configure -noX11 -cuda
--skip-python gnu

Here is the error:
Checking NetCDF...
        Using bundled NetCDF library.
        Starting NetCDF build.
        Configuring NetCDF C interface (may be time-consuming)...
        Compiling the NetCDF C interface (may be time-consuming)...
        Configuring NetCDF Fortran interface (may be time-consuming)...
Error: NetCDF Fortran configure returned 1
       NetCDF configure failed! Check the netcdf_config.log file
       in the /mnt/c/Users/banip/amberinstall/amber20_src/AmberTools/src
directory.
Configure failed due to the errors above!

in the log file, we see this error:

configure: finding Fortran compiler
checking whether we are using the GNU Fortran compiler... no
checking whether gfortran accepts -g... yes
checking whether we are using the GNU Fortran 77 compiler... no
checking whether gfortran accepts -g... yes
checking whether Fortran compiler is checked for ISO_C_BINDING support...
yes
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files

We cannot figure out this f90 fortran problem.

Please let me know if you have any more suggestions for installing amber on
WSL2.

Best,
Charlotta

On Fri, Mar 11, 2022 at 3:07 PM Daniel Roe <daniel.r.roe.gmail.com> wrote:

> OK, so your CUDA installation does work, and you're using CUDA
> installed through Ubuntu. That latter part is the one difference
> between your setup and the one I've been testing with. I can recommend
> two things to try:
>
> 1) Install your own CUDA to a local directory. Something like:
>
> /bin/bash cuda_11.4.4_470.82.01_linux.run --installpath=<local install
> path>
>
> You may need to point the script to a new temporary directory if it
> complains about not enough space (with --tmpdir=<temp dir name>). Then
> set CUDA_HOME to <local install path> and ensure $CUDA_HOME/bin is in
> PATH and LD_LIBRARY_PATH contains $CUDA_HOME/lib64. Then try cmake
> again.
>
> 2) Although the configure script is soon-to-be-deprecated, it may be
> worth a shot. With CUDA_HOME properly set try:
>
> ./configure -cuda --skip-python gnu
> make install
>
> See if that works. If you only want pmemd.cuda you can do 'make pmemd'
> instead I think.
>
> Hope this helps,
>
> -Dan
>
> On Thu, Mar 10, 2022 at 6:23 PM Charlotta Lebedenko
> <clebedenko.fordham.edu> wrote:
> >
> > Hi Dan,
> >
> > I was able to build and run deviceQuery. I had to build as sudo as cuda
> is
> > installed as root. I noticed that CUDART library was statically linked.
> The
> > cmake error for amber install is still about CUDART library missing. Here
> > is the test output:
> >
> > banipsita.MSI:/usr/local/cuda-11.4/samples/1_Utilities/deviceQuery$ sudo
> > CUDA_PATH=$CUDA_HOME make
> > [sudo] password for banipsita:
> > /usr/local/cuda-11.4/bin/nvcc -ccbin g++ -I../../common/inc -m64
> > --threads 0 -gencode arch=compute_35,code=sm_35 -gencode
> > arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -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 -gencode
> > arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
> > arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
> > deviceQuery.o -c deviceQuery.cpp
> > nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35',
> > 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a
> > future release (Use -Wno-deprecated-gpu-targets to suppress warning).
> > /usr/local/cuda-11.4/bin/nvcc -ccbin g++ -m64 -gencode
> > arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode
> > arch=compute_50,code=sm_50 -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 -gencode arch=compute_75,code=sm_75 -gencode
> > arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode
> > arch=compute_86,code=compute_86 -o deviceQuery deviceQuery.o
> > nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35',
> > 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a
> > future release (Use -Wno-deprecated-gpu-targets to suppress warning).
> > mkdir -p ../../bin/x86_64/linux/release
> > cp deviceQuery ../../bin/x86_64/linux/release
> > banipsita.MSI:/usr/local/cuda-11.4/samples/1_Utilities/deviceQuery$
> > ./deviceQuery
> > ./deviceQuery Starting...
> >
> > CUDA Device Query (Runtime API) version (CUDART static linking)
> >
> > Detected 1 CUDA Capable device(s)
> >
> > Device 0: "NVIDIA GeForce RTX 3070 Laptop GPU"
> > CUDA Driver Version / Runtime Version 11.6 / 11.4
> > CUDA Capability Major/Minor version number: 8.6
> > Total amount of global memory: 8192 MBytes (8589410304
> > bytes)
> > (040) Multiprocessors, (128) CUDA Cores/MP: 5120 CUDA Cores
> > GPU Max Clock rate: 1620 MHz (1.62 GHz)
> > Memory Clock rate: 7001 Mhz
> > Memory Bus Width: 256-bit
> > L2 Cache Size: 4194304 bytes
> > Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072,
> > 65536), 3D=(16384, 16384, 16384)
> > Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
> > Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048
> > layers
> > Total amount of constant memory: 65536 bytes
> > Total amount of shared memory per block: 49152 bytes
> > Total shared memory per multiprocessor: 102400 bytes
> > Total number of registers available per block: 65536
> > Warp size: 32
> > Maximum number of threads per multiprocessor: 1536
> > Maximum number of threads per block: 1024
> > Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
> > Max dimension size of a grid size (x,y,z): (2147483647, 65535,
> 65535)
> > Maximum memory pitch: 2147483647 bytes
> > Texture alignment: 512 bytes
> > Concurrent copy and kernel execution: Yes with 5 copy
> engine(s)
> > Run time limit on kernels: Yes
> > Integrated GPU sharing Host Memory: No
> > Support host page-locked memory mapping: Yes
> > Alignment requirement for Surfaces: Yes
> > Device has ECC support: Disabled
> > Device supports Unified Addressing (UVA): Yes
> > Device supports Managed Memory: Yes
> > Device supports Compute Preemption: Yes
> > Supports Cooperative Kernel Launch: Yes
> > Supports MultiDevice Co-op Kernel Launch: No
> > Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0
> > Compute Mode:
> > < Default (multiple host threads can use ::cudaSetDevice() with
> device
> > simultaneously) >
> >
> > deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.6, CUDA
> Runtime
> > Version = 11.4, NumDevs = 1
> > Result = PASS
> >
> >
> > Thank you for your help,
> > Charlotta Lebedenko
> >
> > On Mon, Mar 7, 2022 at 6:38 PM Daniel Roe <daniel.r.roe.gmail.com>
> wrote:
> >
> > > On Mon, Mar 7, 2022 at 6:49 AM Daniel Roe <daniel.r.roe.gmail.com>
> wrote:
> > > > .Charlotta, are you able to compile/run any cuda code at all? Maybe
> the
> > > devicequery sample from cuda?
> > >
> > > Specifically, try the following.
> > >
> > > Change to the directory <cuda samples>//1_Utilities/deviceQuery
> > >
> > > Build it (assuming CUDA_HOME is pointing to your CUDA install):
> > >
> > > CUDA_PATH=$CUDA_HOME make
> > >
> > > Run deviceQuery
> > >
> > > You should hopefully get a Result = PASS at the end. If not, something
> > > is wrong with the CUDA install.
> > >
> > > -Dan
> > >
> > > >
> > > > -Dan
> > > >
> > > >
> > > >> CUDA in Windows since it runs
> > > >> with a DOS system. If you want to have CUDA support, you can opt to
> dual
> > > >> boot your computer with Ubuntu or any Linux OS. There are
> installation
> > > >> guidelines on the internet.
> > > >>
> > > >> I hope this helps.
> > > >>
> > > >>
> > > >>
> > > >> Cheers,
> > > >>
> > > >> Alexis
> > > >>
> > > >> On Mon, Mar 7, 2022 at 2:47 AM Charlotta Lebedenko <
> > > clebedenko.fordham.edu>
> > > >> wrote:
> > > >>
> > > >> > Hello,
> > > >> >
> > > >> > Unfortunately I am still facing this problem with amber
> installation
> > > on
> > > >> > windows. I am not sure how to resolve it. Does anyone have any
> advice
> > > about
> > > >> > cmake and cuda?
> > > >> >
> > > >> > Thank you,
> > > >> > Charlotta Lebedenko
> > > >> >
> > > >> >
> > > >> >
> > > >> > > On Mar 3, 2022, at 15:30, Charlotta Lebedenko <
> > > clebedenko.fordham.edu>
> > > >> > wrote:
> > > >> > >
> > > >> > > 
> > > >> > > Hello,
> > > >> > >
> > > >> > > Thank you for the advice. We tried these steps and we are still
> > > getting
> > > >> > the same error. We are doing this on Windows 10, not Windows 11.
> So
> > > maybe
> > > >> > there is a problem there.
> > > >> > > We set -DCUDA_TOOLKIT_ROOT_DIR and CUDA_HOME to cuda home
> > > directory. We
> > > >> > probably need help from someone who understands Cmake.
> > > >> > >
> > > >> > > Here is the error again:
> > > >> > >
> > > >> > > -- Amber source found, building AmberTools and Amber
> > > >> > > -- Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found
> version
> > > >> > "11.4")
> > > >> > > CMake Error at cmake/CudaConfig.cmake:15 (message):
> > > >> > > You turned on CUDA, but it was not found. Please set the
> > > >> > > CUDA_TOOLKIT_ROOT_DIR option to your CUDA install directory.
> > > >> > > Call Stack (most recent call first):
> > > >> > > CMakeLists.txt:120 (include)
> > > >> > >
> > > >> > > We also set:
> > > >> > >
> > > >> >
> > >
> -DCUDA_CUDART_LIBRARY=/usr/local/cuda-11.4/targets/x86_64-linux/lib/libcudart.so.11.4.43
> > > >> > >
> > > >> > > Our cmake command is:
> > > >> > > cmake $AMBER_PREFIX/amber20_src \
> > > >> > > -DCMAKE_INSTALL_PREFIX=$AMBER_PREFIX/amber20 \
> > > >> > > -DCOMPILER=GNU -DBUILD_QUICK=TRUE \
> > > >> > > -DMPI=FALSE -DCUDA=TRUE
> > > -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.4
> > > >> >
> > >
> -DCUDA_CUDART_LIBRARY=/usr/local/cuda-11.4/targets/x86_64-linux/lib/libcudart.so.11.4.43
> > > >> > -DINSTALL_TESTS=TRUE \
> > > >> > > -DDOWNLOAD_MINICONDA=TRUE -DMINICONDA_USE_PY3=TRUE \
> > > >> > > 2>&1 | tee cmake.log
> > > >> > >
> > > >> > > Thank you,
> > > >> > > Charlotta Lebedenko
> > > >> > >
> > > >> > >
> > > >> > >
> > > >> > >> On Thu, Mar 3, 2022 at 9:32 AM Daniel Roe <
> daniel.r.roe.gmail.com>
> > > >> > wrote:
> > > >> > >> Hi,
> > > >> > >>
> > > >> > >> I've been able to install Amber on Windows11/WSL2 with CUDA
> with no
> > > >> > issue.
> > > >> > >> The only different is that I installed CUDA manually (
> > > >> > >>
> > > >> >
> > >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__developer.nvidia.com_cuda-2D11-2D4-2D4-2Ddownload-2Darchive-3Ftarget-5Fos-3DLinux-26target-5Farch-3Dx86-5F64-26Distribution-3DWSL-2DUbuntu-26target-5Fversion-3D2.0-26target-5Ftype-3Drunfile-5Flocal&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=LxDU4uEY3ByKgpRHV5eDbVEPCIZYsLumYeEsQtFAup467V5dapkwob69zo1tel2k&s=iswwSnDzYx_pohoZpVrttYR7-lmM39JF1-6fEZHyMwc&e=
> > > >> > )
> > > >> > >> into a subdirectory of my home directory and set the
> environment
> > > >> > variables
> > > >> > >> CUDA_HOME, PATH, and LD_LIBRARY_PATH, e.g.
> > > >> > >>
> > > >> > >> export CUDA_HOME=<path_to_cuda>
> > > >> > >> export LD_LIBRARY_PATH=<path_to_cuda>/lib64:$LD_LIBRARY_PATH
> > > >> > >> export PATH=<path_to_cuda>/bin:$PATH
> > > >> > >>
> > > >> > >> With those set all I had to do is pass -DCUDA=TRUE to cmake
> and it
> > > was
> > > >> > >> picked up just fine.
> > > >> > >>
> > > >> > >> -Dan
> > > >> > >>
> > > >> > >> On Wed, Mar 2, 2022 at 4:28 PM Charlotta Lebedenko <
> > > >> > clebedenko.fordham.edu>
> > > >> > >> wrote:
> > > >> > >>
> > > >> > >> > Hello,
> > > >> > >> >
> > > >> > >> > I am still struggling with this same issue during
> installation.
> > > I was
> > > >> > >> > hoping someone who has installed Amber with CUDA support on
> > > Windows
> > > >> > before
> > > >> > >> > using WSL2 could offer some advice?
> > > >> > >> >
> > > >> > >> > Thank you,
> > > >> > >> > Charlotta Lebedenko
> > > >> > >> >
> > > >> > >> > >
> > > >> > >> > > On Feb 28, 2022, at 13:04, Charlotta Lebedenko <
> > > >> > clebedenko.fordham.edu>
> > > >> > >> > wrote:
> > > >> > >> > >
> > > >> > >> > > 
> > > >> > >> > > Dear Amber support,
> > > >> > >> > >
> > > >> > >> > > We are trying to install Amber20 and Ambertools21 with CUDA
> > > support
> > > >> > on
> > > >> > >> > Windows 10 21H2 using WSL2 with ubuntu. We see this cmake
> error:
> > > >> > >> > > -- Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY)
> (found
> > > version
> > > >> > >> > "11.4")
> > > >> > >> > > CMake Error at cmake/CudaConfig.cmake:15 (message):
> > > >> > >> > > You turned on CUDA, but it was not found. Please set the
> > > >> > >> > > CUDA_TOOLKIT_ROOT_DIR option to your CUDA install
> directory.
> > > >> > >> > > Call Stack (most recent call first):
> > > >> > >> > > CMakeLists.txt:120 (include)
> > > >> > >> > >
> > > >> > >> > > nvcc is installed at: /usr/local/cuda-11.4/bin/nvcc
> > > >> > >> > > CUDA toolkit is installed into a standard location
> > > /usr/local/cuda:
> > > >> > >> > > ls -l /usr/local
> > > >> > >> > > total 36
> > > >> > >> > > drwxrwxr-x 2 root root 4096 Feb 28 11:49 bin
> > > >> > >> > > lrwxrwxrwx 1 root root 22 Feb 28 11:49 cuda ->
> > > >> > /etc/alternatives/cuda
> > > >> > >> > > lrwxrwxrwx 1 root root 25 Feb 28 11:49 cuda-11 ->
> > > >> > >> > /etc/alternatives/cuda-11
> > > >> > >> > > drwxr-xr-x 17 root root 4096 Feb 28 11:49 cuda-11.4
> > > >> > >> > >
> > > >> > >> > > ls -l /etc/alternatives
> > > >> > >> > > lrwxrwxrwx 1 root root 20 Feb 28 11:49 cuda ->
> > > /usr/local/cuda-11.4
> > > >> > >> > > lrwxrwxrwx 1 root root 20 Feb 28 11:49 cuda-11 ->
> > > >> > /usr/local/cuda-11.4
> > > >> > >> > >
> > > >> > >> > > We set export CUDA_HOME=/usr/local/cuda-11.4
> > > >> > >> > >
> > > >> > >> > > We added this to run_cmake to point to CUDA toolkit and
> cudart
> > > >> > library:
> > > >> > >> > > -DCUDA=TRUE -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.4
> > > >> > >> >
> > > >> >
> > >
> -DCUDA_CUDART_LIBRARY=/usr/local/cuda-11.4/targets/x86_64-linux/lib/libcudart.so
> > > >> > >> >
> > > >> > >> > >
> > > >> > >> > > We still see the error above. What else can we try?
> > > >> > >> > >
> > > >> > >> > > We installed CUDA driver and toolkit following these
> > > instructions:
> > > >> > >> > > CUDA on WSL :: CUDA Toolkit Documentation (nvidia.com)
> > > >> > >> > >
> > > >> > >> > > Thank you,
> > > >> > >> > > Charlotta Lebedenko
> > > >> > >> > _______________________________________________
> > > >> > >> > AMBER mailing list
> > > >> > >> > AMBER.ambermd.org
> > > >> > >> >
> > > >> >
> > >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=LxDU4uEY3ByKgpRHV5eDbVEPCIZYsLumYeEsQtFAup467V5dapkwob69zo1tel2k&s=Qt2CnTbykcS2KFNj_kieGCGm35YDQhDwppdlYm1Vya0&e=
> > > >> > >> >
> > > >> > >> _______________________________________________
> > > >> > >> AMBER mailing list
> > > >> > >> AMBER.ambermd.org
> > > >> > >>
> > > >> >
> > >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=LxDU4uEY3ByKgpRHV5eDbVEPCIZYsLumYeEsQtFAup467V5dapkwob69zo1tel2k&s=Qt2CnTbykcS2KFNj_kieGCGm35YDQhDwppdlYm1Vya0&e=
> > > >> > _______________________________________________
> > > >> > AMBER mailing list
> > > >> > AMBER.ambermd.org
> > > >> >
> > >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=dDmUDpfZ7phpbAWIypFSiJAtCWKxJ7zE2Q1TrJhbpIjM9dsufD1FExOOQAFtRt-L&s=5YzJQJDkjA4b8YF82kXSTxmQLemTlmCmOzIzts35fPI&e=
> > > >> >
> > > >> --
> > > >> Alexis Azucena
> > > >>
> > > >> Instructor
> > > >>
> > > >> School of Technology | University of the Philippines Visayas
> > > >> +639175841130
> > > >> agazucena.up.edu.ph
> > > >> _______________________________________________
> > > >> AMBER mailing list
> > > >> AMBER.ambermd.org
> > > >>
> > >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=dDmUDpfZ7phpbAWIypFSiJAtCWKxJ7zE2Q1TrJhbpIjM9dsufD1FExOOQAFtRt-L&s=5YzJQJDkjA4b8YF82kXSTxmQLemTlmCmOzIzts35fPI&e=
> > >
> > > _______________________________________________
> > > AMBER mailing list
> > > AMBER.ambermd.org
> > >
> > >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=dDmUDpfZ7phpbAWIypFSiJAtCWKxJ7zE2Q1TrJhbpIjM9dsufD1FExOOQAFtRt-L&s=5YzJQJDkjA4b8YF82kXSTxmQLemTlmCmOzIzts35fPI&e=
> > >
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org
> >
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=0w_8HVgLzQbV7HrT1M5MihI5S5PvMyh_s2uPvjW3X1oZptVAvY29r2PiJ14OZRJF&s=KSdtFLhvUi16AvqdTcrrc_cRBJYI0s6YBpKWIvzVCAk&e=
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ambermd.org_mailman_listinfo_amber&d=DwIGaQ&c=aqMfXOEvEJQh2iQMCb7Wy8l0sPnURkcqADc2guUW8IM&r=jOIeI-lTF_2GutlqJUB8jwla6pUZ7k5EeNYDA2RM36A&m=0w_8HVgLzQbV7HrT1M5MihI5S5PvMyh_s2uPvjW3X1oZptVAvY29r2PiJ14OZRJF&s=KSdtFLhvUi16AvqdTcrrc_cRBJYI0s6YBpKWIvzVCAk&e=
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Apr 04 2022 - 12:30:02 PDT
Custom Search