Re: [gmx-users] Problem with cuda toolkit

2019-03-13 Thread Mark Abraham
Hi,

If that was your cmake command, then CUDA_TOOLKIT_ROOT_DIR would not have
that value, and things should have just worked with nvcc where you report
it is located. But using cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr will let normal
path searching find that nvcc is in the bin directory.

Distributions like Fedora can have other issues, like that the binutils
package from the distribution is not yet installed.

Mark

On Wed, 13 Mar 2019 at 06:48 Shahrokh Nasseri (PhD) 
wrote:

> Hi Dears Gromacs Developers and users
>
> I want to install gromacs in Fedora core 25.
>
> My Computer Specifications are as follows:
>
> (base) [sn@localhost ~]$ which nvcc
> /usr/bin/nvcc
> (base) [sn@localhost ~]$ nvcc --version
> nvcc: NVIDIA (R) Cuda compiler driver
> Copyright (c) 2005-2016 NVIDIA Corporation
> Built on Tue_Jan_10_13:22:03_CST_2017
> Cuda compilation tools, release 8.0, V8.0.61
> (base) [sn@localhost ~]$ nvidia-smi
> Wed Mar 13 08:09:56 2019
>
> +-+
> | NVIDIA-SMI 378.13 Driver Version: 378.13
> |
>
> |---+--+--+
> | GPU  NamePersistence-M| Bus-IdDisp.A | Volatile Uncorr.
> ECC |
> | Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage | GPU-Util  Compute
> M. |
>
> |===+==+==|
> |   0  GeForce GTX 650 Ti  Off  | :01:00.0 N/A |
> N/A |
> | 20%   32CP8N/A /  N/A |220MiB /   980MiB | N/A
> Default |
>
> +---+--+--+
>
>
> +-+
> | Processes:   GPU
> Memory |
> |  GPU   PID  Type  Process name   Usage
> |
>
> |=|
> |0  Not Supported
>|
>
> +-+
> (base) [sn@localhost ~]$
>
> For installation, I enter the following commands:
> (base) [sn@localhost ~]$ wget
> ftp://ftp.gromacs.org/pub/gromacs/gromacs-2019.1.tar.gz
> ...
> 2019-03-12 18:17:18 (308 KB/s) - ‘gromacs-2019.1.tar.gz’ saved [33435278]
> (base) [sn@localhost ~]$ tar -xzf gromacs-2019.1.tar.gz
> (base) [sn@localhost ~]$ mv gromacs-2019.1.tar.gz gromacs-2019.1
> (base) [sn@localhost ~]$ cd ./gromacs-2019.1/
> (base) [sn@localhost gromacs-2019.1]$ cmake --version
> cmake version 3.6.2
>
> (base) [sn@localhost gromacs-2019.1]$ mkdir build
> (base) [sn@localhost gromacs-2019.1]$ mkdir bin
> (base) [sn@localhost gromacs-2019.1]$ cd build/
> (base) [sn@localhost build]$ ccmake .. -DGMX_BUILD_OWN_FFTW=ON
> -DREGRESSIONTEST_DOWNLOAD=ON
> ...
>  Page 1 of 1
>  BUILD_SHARED_LIBSON
>  BUILD_TESTINGON
>  CMAKE_BUILD_TYPE Release
>  CMAKE_INSTALL_PREFIX /home/sn/gromacs-2019.1/bin
>  CMAKE_PREFIX_PATH
>  CUDA_TOOLKIT_ROOT_DIR/usr/bin --->
> Note: I address to location of nvcc
>  GMXAPI   OFF
>  GMX_BUILD_MDRUN_ONLY OFF
>  GMX_CLANG_CUDA   OFF
>  GMX_DEFAULT_SUFFIX   ON
>  GMX_DOUBLE   OFF
>  GMX_ENABLE_CCACHEOFF
>  GMX_EXTERNAL_TNG OFF
>  GMX_EXTERNAL_ZLIBOFF
>  GMX_FFT_LIBRARY  fftw3
>  GMX_GPU  ON
>  GMX_HWLOCAUTO
>  GMX_MIMICOFF
>  GMX_MPI  OFF
>  GMX_OPENMP   ON
>  GMX_QMMM_PROGRAM None
>  GMX_SIMD AUTO
>  GMX_THREAD_MPI   ON
>  GMX_USE_OPENCL   OFF
>  GMX_USE_TNG  ON
>  GMX_X11  OFF
>  ImageMagick_EXECUTABLE_DIR  /usr/bin
> ...
> Press [c] to configure
> ...
> I get the following error message:
> ...
>  CMake Error at cmake/gmxManageNvccConfig.cmake:194 (message):
>CUDA compiler does not seem to be functional.
>  Call Stack (most recent call first):
>cmake/gmxManageGPU.cmake:204 (include)
>CMakeLists.txt:590 (gmx_gpu_setup)
>
> How should I define "CUDA_TOOLKIT_ROOT_DIR"?
> Please guide me,
> Shahrokh
>
>
>
>
> Shahrokh Nasseri
>
> Assistant Professor of Medical Physics
>
> Department and Research Center of Medical Physics
>
> Mashhad University of Medical Sciences
>
> Mashhad, Iran
>
> Tel: +98 513 8002328
> Fax: +98 513 8002 320
> e-mail: naser...@mums.ac.ir, shahrokh.nass...@gmail.com
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read 

[gmx-users] Problem with cuda toolkit

2019-03-12 Thread Shahrokh Nasseri (PhD)
Hi Dears Gromacs Developers and users

I want to install gromacs in Fedora core 25.

My Computer Specifications are as follows:

(base) [sn@localhost ~]$ which nvcc
/usr/bin/nvcc
(base) [sn@localhost ~]$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
(base) [sn@localhost ~]$ nvidia-smi
Wed Mar 13 08:09:56 2019
+-+
| NVIDIA-SMI 378.13 Driver Version: 378.13|
|---+--+--+
| GPU  NamePersistence-M| Bus-IdDisp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage | GPU-Util  Compute M. |
|===+==+==|
|   0  GeForce GTX 650 Ti  Off  | :01:00.0 N/A |  N/A |
| 20%   32CP8N/A /  N/A |220MiB /   980MiB | N/A  Default |
+---+--+--+

+-+
| Processes:   GPU Memory |
|  GPU   PID  Type  Process name   Usage  |
|=|
|0  Not Supported |
+-+
(base) [sn@localhost ~]$

For installation, I enter the following commands:
(base) [sn@localhost ~]$ wget 
ftp://ftp.gromacs.org/pub/gromacs/gromacs-2019.1.tar.gz
...
2019-03-12 18:17:18 (308 KB/s) - ‘gromacs-2019.1.tar.gz’ saved [33435278]
(base) [sn@localhost ~]$ tar -xzf gromacs-2019.1.tar.gz
(base) [sn@localhost ~]$ mv gromacs-2019.1.tar.gz gromacs-2019.1
(base) [sn@localhost ~]$ cd ./gromacs-2019.1/
(base) [sn@localhost gromacs-2019.1]$ cmake --version
cmake version 3.6.2

(base) [sn@localhost gromacs-2019.1]$ mkdir build
(base) [sn@localhost gromacs-2019.1]$ mkdir bin
(base) [sn@localhost gromacs-2019.1]$ cd build/
(base) [sn@localhost build]$ ccmake .. -DGMX_BUILD_OWN_FFTW=ON 
-DREGRESSIONTEST_DOWNLOAD=ON
...
 Page 1 of 1
 BUILD_SHARED_LIBSON
 BUILD_TESTINGON
 CMAKE_BUILD_TYPE Release
 CMAKE_INSTALL_PREFIX /home/sn/gromacs-2019.1/bin
 CMAKE_PREFIX_PATH
 CUDA_TOOLKIT_ROOT_DIR/usr/bin ---> Note: I 
address to location of nvcc
 GMXAPI   OFF
 GMX_BUILD_MDRUN_ONLY OFF
 GMX_CLANG_CUDA   OFF
 GMX_DEFAULT_SUFFIX   ON
 GMX_DOUBLE   OFF
 GMX_ENABLE_CCACHEOFF
 GMX_EXTERNAL_TNG OFF
 GMX_EXTERNAL_ZLIBOFF
 GMX_FFT_LIBRARY  fftw3
 GMX_GPU  ON
 GMX_HWLOCAUTO
 GMX_MIMICOFF
 GMX_MPI  OFF
 GMX_OPENMP   ON
 GMX_QMMM_PROGRAM None
 GMX_SIMD AUTO
 GMX_THREAD_MPI   ON
 GMX_USE_OPENCL   OFF
 GMX_USE_TNG  ON
 GMX_X11  OFF
 ImageMagick_EXECUTABLE_DIR  /usr/bin
...
Press [c] to configure
...
I get the following error message:
...
 CMake Error at cmake/gmxManageNvccConfig.cmake:194 (message):
   CUDA compiler does not seem to be functional.
 Call Stack (most recent call first):
   cmake/gmxManageGPU.cmake:204 (include)
   CMakeLists.txt:590 (gmx_gpu_setup)

How should I define "CUDA_TOOLKIT_ROOT_DIR"?
Please guide me,
Shahrokh




Shahrokh Nasseri

Assistant Professor of Medical Physics

Department and Research Center of Medical Physics

Mashhad University of Medical Sciences

Mashhad, Iran

Tel: +98 513 8002328
Fax: +98 513 8002 320
e-mail: naser...@mums.ac.ir, shahrokh.nass...@gmail.com
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Problem with CUDA

2018-04-09 Thread Borchert, Christopher B ERDC-RDE-ITL-MS Contractor
Thanks. That was already set by cuda module. Didn't help me. 

Chris

-Original Message-
From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
[mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf Of Szilárd 
Páll
Sent: Saturday, April 07, 2018 11:28 AM
To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
Cc: gromacs.org_gmx-users@maillist.sys.kth.se
Subject: Re: [gmx-users] Problem with CUDA

Sorry, forgot to mention that for dynamic linking you (might?) need export 
CRAYPE_LINK_TYPE=dynamic
--
Szilárd


On Sat, Apr 7, 2018 at 12:09 AM, Borchert, Christopher B ERDC-RDE-ITL-MS 
Contractor <christopher.b.borch...@erdc.dren.mil>
wrote:
> Unfortunately using your shortened cmake args, I still get fpic 
> errors. But it does complete the build statically with 
> -DGMX_BUILD_SHARED_EXE=OFF
>
> CC=cc CXX=CC cmake ../ -DGMX_SIMD=AVX2_256 -DGMX_MPI=ON -DGMX_GPU=ON 
> -DCMAKE_PREFIX_PATH=${FFTW_DIR}/..
>
> /usr/bin/ld: 
> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_
> cuda.cu.o: relocation R_X86_64_32 against 
> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_at
> omdata10cu_nbparam8cu_plistb' can not be used when making a shared 
> object; recompile with -fPIC
>
> Thanks,
> Chris
>
> -Original Message-
> From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
> [mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf 
> Of Szilárd Páll
> Sent: Friday, April 06, 2018 2:40 PM
> To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
> Cc: gromacs.org_gmx-users@maillist.sys.kth.se
> Subject: Re: [gmx-users] Problem with CUDA
>
> On CSCS Piz Daint I use the following command line (assuming
> PrgEnv-gnu) where everything in "[]" is optional and compilation should work 
> just fine without.
>
> CC=cc CXX=CC cmake ../
> -DGMX_SIMD=THE_RIGHT_SIMD_FLAVOR
> -DGMX_MPI=ON
> -DGMX_GPU=ON
> -DCMAKE_PREFIX_PATH=${FFTW_DIR}/.. \
> [ -DGMX_FFT_LIBRARY=fftw3
> -DGMX_CUDA_TARGET_SM=60
> -DGMX_PREFER_STATIC_LIBS=ON
> -DBUILD_SHARED_LIBS=OFF
> -DGMX_BUILD_MDRUN_ONLY=ON
> -DGMX_EXTERNAL_BLAS=OFF -DGMX_EXTERNAL_LAPACK=OFF ]
>
> In fact, other than the "-DCMAKE_PREFIX_PATH=${FFTW_DIR}/.."and
> setting the right compiler wrappers, the rest is most of the time unnecessary 
> for a "vanilla" build.
>
> Cheers,
> --
> Szilárd
>
>
> On Fri, Apr 6, 2018 at 8:32 PM, Borchert, Christopher B 
> ERDC-RDE-ITL-MS Contractor <christopher.b.borch...@erdc.dren.mil>
> wrote:
>> You are trying to give me a hint. :) My cmake args are taken from a 
>> co-worker, and the statement syntax is from the CMakeCache.txt file. On a 
>> Cray you force cc/CC and all the module libraries/headers should be 
>> automatically found. Strangely it didn’t find fftw without help. Regardless 
>> I get the fpic error. But you've given me a path to investigate. Thanks.
>>
>> cmake ..
>> -DGMX_GPU=ON
>> -DCMAKE_C_COMPILER:FILEPATH=`which cc` 
>> -DCMAKE_CXX_COMPILER:FILEPATH=`which CC`
>> -DGMX_FFT_LIBRARY=fftw3
>> -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so
>> -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC
>>
>> /usr/bin/ld:
>> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn
>> _
>> cuda.cu.o: relocation R_X86_64_32 against 
>> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_a
>> t omdata10cu_nbparam8cu_plistb' can not be used when making a shared 
>> object; recompile with -fPIC
>>
>> Chris
>>
>> -----Original Message-
>> From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se
>> [mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf 
>> Of Szilárd Páll
>> Sent: Friday, April 06, 2018 12:05 PM
>> To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
>> Cc: gromacs.org_gmx-users@maillist.sys.kth.se
>> Subject: Re: [gmx-users] Problem with CUDA
>>
>> FYI: not even a my vanilla (non-CRAY) local build which does work otherwise 
>> succeeds with cmake . -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
>> so as I guessed, that's the culprit.
>>
>> Out of curiosity I wonder: what's the reason for the "inventive" use of 
>> CMake options, none of which are needed?
>>
>> --
>> Szilárd
>>
>>
>> On Fri, Apr 6, 2018 at 6:57 PM, Szilárd Páll <pall.szil...@gmail.com> wrote:
>>> I think the fpic errors can't be caused by missing rdc=true because 
>>> the latter refers to the GPU _device_ code, but GROMACS does not 
>>> need relocatable device code, so that sho

Re: [gmx-users] Problem with CUDA

2018-04-06 Thread Borchert, Christopher B ERDC-RDE-ITL-MS Contractor
Unfortunately using your shortened cmake args, I still get fpic errors. But it 
does complete the build statically with -DGMX_BUILD_SHARED_EXE=OFF

CC=cc CXX=CC cmake ../ -DGMX_SIMD=AVX2_256 -DGMX_MPI=ON -DGMX_GPU=ON 
-DCMAKE_PREFIX_PATH=${FFTW_DIR}/..

/usr/bin/ld: 
CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_cuda.cu.o:
 relocation R_X86_64_32 against 
`_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_atomdata10cu_nbparam8cu_plistb'
 can not be used when making a shared object; recompile with -fPIC

Thanks,
Chris

-Original Message-
From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
[mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf Of Szilárd 
Páll
Sent: Friday, April 06, 2018 2:40 PM
To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
Cc: gromacs.org_gmx-users@maillist.sys.kth.se
Subject: Re: [gmx-users] Problem with CUDA

On CSCS Piz Daint I use the following command line (assuming
PrgEnv-gnu) where everything in "[]" is optional and compilation should work 
just fine without.

CC=cc CXX=CC cmake ../
-DGMX_SIMD=THE_RIGHT_SIMD_FLAVOR
-DGMX_MPI=ON
-DGMX_GPU=ON
-DCMAKE_PREFIX_PATH=${FFTW_DIR}/.. \
[ -DGMX_FFT_LIBRARY=fftw3
-DGMX_CUDA_TARGET_SM=60
-DGMX_PREFER_STATIC_LIBS=ON
-DBUILD_SHARED_LIBS=OFF
-DGMX_BUILD_MDRUN_ONLY=ON
-DGMX_EXTERNAL_BLAS=OFF -DGMX_EXTERNAL_LAPACK=OFF ]

In fact, other than the "-DCMAKE_PREFIX_PATH=${FFTW_DIR}/.."and
setting the right compiler wrappers, the rest is most of the time unnecessary 
for a "vanilla" build.

Cheers,
--
Szilárd


On Fri, Apr 6, 2018 at 8:32 PM, Borchert, Christopher B ERDC-RDE-ITL-MS 
Contractor <christopher.b.borch...@erdc.dren.mil>
wrote:
> You are trying to give me a hint. :) My cmake args are taken from a 
> co-worker, and the statement syntax is from the CMakeCache.txt file. On a 
> Cray you force cc/CC and all the module libraries/headers should be 
> automatically found. Strangely it didn’t find fftw without help. Regardless I 
> get the fpic error. But you've given me a path to investigate. Thanks.
>
> cmake ..
> -DGMX_GPU=ON
> -DCMAKE_C_COMPILER:FILEPATH=`which cc` 
> -DCMAKE_CXX_COMPILER:FILEPATH=`which CC`
> -DGMX_FFT_LIBRARY=fftw3
> -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so
> -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC
>
> /usr/bin/ld: 
> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_
> cuda.cu.o: relocation R_X86_64_32 against 
> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_at
> omdata10cu_nbparam8cu_plistb' can not be used when making a shared 
> object; recompile with -fPIC
>
> Chris
>
> -Original Message-
> From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
> [mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf 
> Of Szilárd Páll
> Sent: Friday, April 06, 2018 12:05 PM
> To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
> Cc: gromacs.org_gmx-users@maillist.sys.kth.se
> Subject: Re: [gmx-users] Problem with CUDA
>
> FYI: not even a my vanilla (non-CRAY) local build which does work otherwise 
> succeeds with cmake . -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
> so as I guessed, that's the culprit.
>
> Out of curiosity I wonder: what's the reason for the "inventive" use of CMake 
> options, none of which are needed?
>
> --
> Szilárd
>
>
> On Fri, Apr 6, 2018 at 6:57 PM, Szilárd Páll <pall.szil...@gmail.com> wrote:
>> I think the fpic errors can't be caused by missing rdc=true because 
>> the latter refers to the GPU _device_ code, but GROMACS does not need 
>> relocatable device code, so that should not be necessary.
>> --
>> Szilárd
>>
>>
>> On Fri, Apr 6, 2018 at 6:33 PM, Borchert, Christopher B 
>> ERDC-RDE-ITL-MS Contractor <christopher.b.borch...@erdc.dren.mil>
>> wrote:
>>> Thanks Szilárd. My understanding is rdc is nvcc's equivalent of fpic. I get 
>>> fpic errors without it. In fact I get fpic errors without including fpic 
>>> explicitly in the C/CXX flags.
>>>
>>> /usr/bin/ld:
>>> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnx
>>> n
>>> _cuda.cu.o: relocation R_X86_64_32 against 
>>> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_
>>> a tomdata10cu_nbparam8cu_plistb' can not be used when making a 
>>> shared object; recompile with -fPIC
>>>
>>> So I removed boost, avx2, mpi, and dynamic but get the same result. What 
>>> else should I remove?
>>>
>>> cmake ..
>>> -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
>>> -DCMAKE_C_COMPILER:FILEPATH=`which cc` -DCMAKE_C_FLAGS:STRING=-fPIC 
>>> -DCMAKE_CXX_CO

Re: [gmx-users] Problem with CUDA

2018-04-06 Thread Szilárd Páll
On CSCS Piz Daint I use the following command line (assuming
PrgEnv-gnu) where everything in "[]" is optional and compilation
should work just fine without.

CC=cc CXX=CC cmake ../
-DGMX_SIMD=THE_RIGHT_SIMD_FLAVOR
-DGMX_MPI=ON
-DGMX_GPU=ON
-DCMAKE_PREFIX_PATH=${FFTW_DIR}/.. \
[ -DGMX_FFT_LIBRARY=fftw3
-DGMX_CUDA_TARGET_SM=60
-DGMX_PREFER_STATIC_LIBS=ON
-DBUILD_SHARED_LIBS=OFF
-DGMX_BUILD_MDRUN_ONLY=ON
-DGMX_EXTERNAL_BLAS=OFF -DGMX_EXTERNAL_LAPACK=OFF ]

In fact, other than the "-DCMAKE_PREFIX_PATH=${FFTW_DIR}/.."and
setting the right compiler wrappers, the rest is most of the time
unnecessary for a "vanilla" build.

Cheers,
--
Szilárd


On Fri, Apr 6, 2018 at 8:32 PM, Borchert, Christopher B
ERDC-RDE-ITL-MS Contractor <christopher.b.borch...@erdc.dren.mil>
wrote:
> You are trying to give me a hint. :) My cmake args are taken from a 
> co-worker, and the statement syntax is from the CMakeCache.txt file. On a 
> Cray you force cc/CC and all the module libraries/headers should be 
> automatically found. Strangely it didn’t find fftw without help. Regardless I 
> get the fpic error. But you've given me a path to investigate. Thanks.
>
> cmake ..
> -DGMX_GPU=ON
> -DCMAKE_C_COMPILER:FILEPATH=`which cc`
> -DCMAKE_CXX_COMPILER:FILEPATH=`which CC`
> -DGMX_FFT_LIBRARY=fftw3
> -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so
> -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC
>
> /usr/bin/ld: 
> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_cuda.cu.o:
>  relocation R_X86_64_32 against 
> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_atomdata10cu_nbparam8cu_plistb'
>  can not be used when making a shared object; recompile with -fPIC
>
> Chris
>
> -Original Message-
> From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
> [mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf Of 
> Szilárd Páll
> Sent: Friday, April 06, 2018 12:05 PM
> To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
> Cc: gromacs.org_gmx-users@maillist.sys.kth.se
> Subject: Re: [gmx-users] Problem with CUDA
>
> FYI: not even a my vanilla (non-CRAY) local build which does work otherwise 
> succeeds with cmake . -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
> so as I guessed, that's the culprit.
>
> Out of curiosity I wonder: what's the reason for the "inventive" use of CMake 
> options, none of which are needed?
>
> --
> Szilárd
>
>
> On Fri, Apr 6, 2018 at 6:57 PM, Szilárd Páll <pall.szil...@gmail.com> wrote:
>> I think the fpic errors can't be caused by missing rdc=true because
>> the latter refers to the GPU _device_ code, but GROMACS does not need
>> relocatable device code, so that should not be necessary.
>> --
>> Szilárd
>>
>>
>> On Fri, Apr 6, 2018 at 6:33 PM, Borchert, Christopher B
>> ERDC-RDE-ITL-MS Contractor <christopher.b.borch...@erdc.dren.mil>
>> wrote:
>>> Thanks Szilárd. My understanding is rdc is nvcc's equivalent of fpic. I get 
>>> fpic errors without it. In fact I get fpic errors without including fpic 
>>> explicitly in the C/CXX flags.
>>>
>>> /usr/bin/ld:
>>> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn
>>> _cuda.cu.o: relocation R_X86_64_32 against
>>> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_a
>>> tomdata10cu_nbparam8cu_plistb' can not be used when making a shared
>>> object; recompile with -fPIC
>>>
>>> So I removed boost, avx2, mpi, and dynamic but get the same result. What 
>>> else should I remove?
>>>
>>> cmake ..
>>> -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
>>> -DCMAKE_C_COMPILER:FILEPATH=`which cc` -DCMAKE_C_FLAGS:STRING=-fPIC
>>> -DCMAKE_CXX_COMPILER:FILEPATH=`which CC`
>>> -DCMAKE_CXX_FLAGS:STRING=-fPIC -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX
>>> -DGMX_FFT_LIBRARY=fftw3
>>> -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so
>>> -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC
>>> -DGMX_GPU=ON
>>> -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
>>>
>>> /opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -fPIC -std=c++11   
>>> -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast   
>>> CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
>>> -Wl,-rpath,/p/work/borchert/gromacs-2018.1/build/lib 
>>> ../../lib/libgromacs.so.3.1.0 -fopenmp -lm
>>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>>> `__cudaRegisterLinkedBinary_59_tmpxft_01e3__21_pmalloc_cuda_compute_61_cpp1_ii_63d6

Re: [gmx-users] Problem with CUDA

2018-04-06 Thread Borchert, Christopher B ERDC-RDE-ITL-MS Contractor
You are trying to give me a hint. :) My cmake args are taken from a co-worker, 
and the statement syntax is from the CMakeCache.txt file. On a Cray you force 
cc/CC and all the module libraries/headers should be automatically found. 
Strangely it didn’t find fftw without help. Regardless I get the fpic error. 
But you've given me a path to investigate. Thanks.

cmake .. 
-DGMX_GPU=ON  
-DCMAKE_C_COMPILER:FILEPATH=`which cc` 
-DCMAKE_CXX_COMPILER:FILEPATH=`which CC`  
-DGMX_FFT_LIBRARY=fftw3  
-DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so  
-DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC

/usr/bin/ld: 
CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_cuda.cu.o:
 relocation R_X86_64_32 against 
`_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_atomdata10cu_nbparam8cu_plistb'
 can not be used when making a shared object; recompile with -fPIC

Chris

-Original Message-
From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
[mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf Of Szilárd 
Páll
Sent: Friday, April 06, 2018 12:05 PM
To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
Cc: gromacs.org_gmx-users@maillist.sys.kth.se
Subject: Re: [gmx-users] Problem with CUDA

FYI: not even a my vanilla (non-CRAY) local build which does work otherwise 
succeeds with cmake . -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
so as I guessed, that's the culprit.

Out of curiosity I wonder: what's the reason for the "inventive" use of CMake 
options, none of which are needed?

--
Szilárd


On Fri, Apr 6, 2018 at 6:57 PM, Szilárd Páll <pall.szil...@gmail.com> wrote:
> I think the fpic errors can't be caused by missing rdc=true because 
> the latter refers to the GPU _device_ code, but GROMACS does not need 
> relocatable device code, so that should not be necessary.
> --
> Szilárd
>
>
> On Fri, Apr 6, 2018 at 6:33 PM, Borchert, Christopher B 
> ERDC-RDE-ITL-MS Contractor <christopher.b.borch...@erdc.dren.mil>
> wrote:
>> Thanks Szilárd. My understanding is rdc is nvcc's equivalent of fpic. I get 
>> fpic errors without it. In fact I get fpic errors without including fpic 
>> explicitly in the C/CXX flags.
>>
>> /usr/bin/ld: 
>> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn
>> _cuda.cu.o: relocation R_X86_64_32 against 
>> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_a
>> tomdata10cu_nbparam8cu_plistb' can not be used when making a shared 
>> object; recompile with -fPIC
>>
>> So I removed boost, avx2, mpi, and dynamic but get the same result. What 
>> else should I remove?
>>
>> cmake ..
>> -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
>> -DCMAKE_C_COMPILER:FILEPATH=`which cc` -DCMAKE_C_FLAGS:STRING=-fPIC 
>> -DCMAKE_CXX_COMPILER:FILEPATH=`which CC` 
>> -DCMAKE_CXX_FLAGS:STRING=-fPIC -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX
>> -DGMX_FFT_LIBRARY=fftw3
>> -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so
>> -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC
>> -DGMX_GPU=ON
>> -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
>>
>> /opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -fPIC -std=c++11   
>> -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast   
>> CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
>> -Wl,-rpath,/p/work/borchert/gromacs-2018.1/build/lib 
>> ../../lib/libgromacs.so.3.1.0 -fopenmp -lm
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_59_tmpxft_01e3__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_57_tmpxft_a64f__21_pme_spread_compute_61_cpp1_ii_d982d3ad'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_71_tmpxft_03a4__21_cuda_version_information_compute_61_cpp1_ii_8ab8dc1d'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_58_tmpxft_a80b__21_pme_timings_compute_61_cpp1_ii_75ae0e44'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_56_tmpxft_a10b__21_pme_3dfft_compute_61_cpp1_ii_79dff388'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_57_tmpxft_9bd7__21_nbnxn_cuda_compute_61_cpp1_ii_f147f02c'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_50_tmpxft_a9c8__21_pme_compute_61_cpp1_ii_6dbf966c'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_56_tmpxft_a490__21_pme_solve_compute_61_cpp1_ii_06051a94'
>> ../../

Re: [gmx-users] Problem with CUDA

2018-04-06 Thread Szilárd Páll
FYI: not even a my vanilla (non-CRAY) local build which does work
otherwise succeeds with
cmake . -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
so as I guessed, that's the culprit.

Out of curiosity I wonder: what's the reason for the "inventive" use
of CMake options, none of which are needed?

--
Szilárd


On Fri, Apr 6, 2018 at 6:57 PM, Szilárd Páll <pall.szil...@gmail.com> wrote:
> I think the fpic errors can't be caused by missing rdc=true because
> the latter refers to the GPU _device_ code, but GROMACS does not need
> relocatable device code, so that should not be necessary.
> --
> Szilárd
>
>
> On Fri, Apr 6, 2018 at 6:33 PM, Borchert, Christopher B
> ERDC-RDE-ITL-MS Contractor <christopher.b.borch...@erdc.dren.mil>
> wrote:
>> Thanks Szilárd. My understanding is rdc is nvcc's equivalent of fpic. I get 
>> fpic errors without it. In fact I get fpic errors without including fpic 
>> explicitly in the C/CXX flags.
>>
>> /usr/bin/ld: 
>> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_cuda.cu.o:
>>  relocation R_X86_64_32 against 
>> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_atomdata10cu_nbparam8cu_plistb'
>>  can not be used when making a shared object; recompile with -fPIC
>>
>> So I removed boost, avx2, mpi, and dynamic but get the same result. What 
>> else should I remove?
>>
>> cmake ..
>> -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
>> -DCMAKE_C_COMPILER:FILEPATH=`which cc`
>> -DCMAKE_C_FLAGS:STRING=-fPIC
>> -DCMAKE_CXX_COMPILER:FILEPATH=`which CC`
>> -DCMAKE_CXX_FLAGS:STRING=-fPIC
>> -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX
>> -DGMX_FFT_LIBRARY=fftw3
>> -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so
>> -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC
>> -DGMX_GPU=ON
>> -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
>>
>> /opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -fPIC -std=c++11   
>> -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast   
>> CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
>> -Wl,-rpath,/p/work/borchert/gromacs-2018.1/build/lib 
>> ../../lib/libgromacs.so.3.1.0 -fopenmp -lm
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_59_tmpxft_01e3__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_57_tmpxft_a64f__21_pme_spread_compute_61_cpp1_ii_d982d3ad'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_71_tmpxft_03a4__21_cuda_version_information_compute_61_cpp1_ii_8ab8dc1d'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_58_tmpxft_a80b__21_pme_timings_compute_61_cpp1_ii_75ae0e44'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_56_tmpxft_a10b__21_pme_3dfft_compute_61_cpp1_ii_79dff388'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_57_tmpxft_9bd7__21_nbnxn_cuda_compute_61_cpp1_ii_f147f02c'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_50_tmpxft_a9c8__21_pme_compute_61_cpp1_ii_6dbf966c'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_56_tmpxft_a490__21_pme_solve_compute_61_cpp1_ii_06051a94'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_56_tmpxft_ab85__21_cudautils_compute_61_cpp1_ii_25933dd5'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_54_tmpxft_aefc__21_pinning_compute_61_cpp1_ii_5d0f4aae'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_56_tmpxft_ad42__21_gpu_utils_compute_61_cpp1_ii_70828085'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_57_tmpxft_a2d0__21_pme_gather_compute_61_cpp1_ii_a7a2f9c7'
>> ../../lib/libgromacs.so.3.1.0: undefined reference to 
>> `__cudaRegisterLinkedBinary_67_tmpxft_9f4e__21_nbnxn_cuda_data_mgmt_compute_61_cpp1_ii_a1eafeba'
>>
>> Chris
>>
>> -Original Message-
>> From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
>> [mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf Of 
>> Szilárd Páll
>> Sent: Friday, April 06, 2018 10:17 AM
>> To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
>> Cc: gromacs.org_gmx-users@maillist.sy

Re: [gmx-users] Problem with CUDA

2018-04-06 Thread Szilárd Páll
I think the fpic errors can't be caused by missing rdc=true because
the latter refers to the GPU _device_ code, but GROMACS does not need
relocatable device code, so that should not be necessary.
--
Szilárd


On Fri, Apr 6, 2018 at 6:33 PM, Borchert, Christopher B
ERDC-RDE-ITL-MS Contractor <christopher.b.borch...@erdc.dren.mil>
wrote:
> Thanks Szilárd. My understanding is rdc is nvcc's equivalent of fpic. I get 
> fpic errors without it. In fact I get fpic errors without including fpic 
> explicitly in the C/CXX flags.
>
> /usr/bin/ld: 
> CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_cuda.cu.o:
>  relocation R_X86_64_32 against 
> `_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_atomdata10cu_nbparam8cu_plistb'
>  can not be used when making a shared object; recompile with -fPIC
>
> So I removed boost, avx2, mpi, and dynamic but get the same result. What else 
> should I remove?
>
> cmake ..
> -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
> -DCMAKE_C_COMPILER:FILEPATH=`which cc`
> -DCMAKE_C_FLAGS:STRING=-fPIC
> -DCMAKE_CXX_COMPILER:FILEPATH=`which CC`
> -DCMAKE_CXX_FLAGS:STRING=-fPIC
> -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX
> -DGMX_FFT_LIBRARY=fftw3
> -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so
> -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC
> -DGMX_GPU=ON
> -DCUDA_NVCC_FLAGS:STRING="-rdc=true"
>
> /opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -fPIC -std=c++11   
> -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast   
> CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
> -Wl,-rpath,/p/work/borchert/gromacs-2018.1/build/lib 
> ../../lib/libgromacs.so.3.1.0 -fopenmp -lm
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_59_tmpxft_01e3__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_57_tmpxft_a64f__21_pme_spread_compute_61_cpp1_ii_d982d3ad'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_71_tmpxft_03a4__21_cuda_version_information_compute_61_cpp1_ii_8ab8dc1d'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_58_tmpxft_a80b__21_pme_timings_compute_61_cpp1_ii_75ae0e44'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_a10b__21_pme_3dfft_compute_61_cpp1_ii_79dff388'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_57_tmpxft_9bd7__21_nbnxn_cuda_compute_61_cpp1_ii_f147f02c'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_50_tmpxft_a9c8__21_pme_compute_61_cpp1_ii_6dbf966c'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_a490__21_pme_solve_compute_61_cpp1_ii_06051a94'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_ab85__21_cudautils_compute_61_cpp1_ii_25933dd5'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_54_tmpxft_aefc__21_pinning_compute_61_cpp1_ii_5d0f4aae'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_ad42__21_gpu_utils_compute_61_cpp1_ii_70828085'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_57_tmpxft_a2d0__21_pme_gather_compute_61_cpp1_ii_a7a2f9c7'
> ../../lib/libgromacs.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_67_tmpxft_9f4e__21_nbnxn_cuda_data_mgmt_compute_61_cpp1_ii_a1eafeba'
>
> Chris
>
> -Original Message-
> From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
> [mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf Of 
> Szilárd Páll
> Sent: Friday, April 06, 2018 10:17 AM
> To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
> Cc: gromacs.org_gmx-users@maillist.sys.kth.se
> Subject: Re: [gmx-users] Problem with CUDA
>
> Hi,
>
> What is the reason for using the custom CMake options? What's the -rdc=true 
> for -- I don't think it's needed and it can very well be causing the issue. 
> Have you tried to actually do an as-vanilla-as-possible build?
>
> --
> Szilárd
>
>
> On Thu, Apr 5, 2018 at 6:52 PM, Borchert, Christopher B ERDC-RDE-ITL-MS 
> Contractor <christopher.b.borch...@erdc.dren.mil>
> wrote:
>> Hello. I'm taking a working build from a co-worker and trying to add GPU 
>> support on a Cray XC. CMake works but make fails. Both 2016 and 2018 die at 
>> the same point -- can't find gromac's own routi

Re: [gmx-users] Problem with CUDA

2018-04-06 Thread Borchert, Christopher B ERDC-RDE-ITL-MS Contractor
Thanks Szilárd. My understanding is rdc is nvcc's equivalent of fpic. I get 
fpic errors without it. In fact I get fpic errors without including fpic 
explicitly in the C/CXX flags.

/usr/bin/ld: 
CMakeFiles/libgromacs.dir/mdlib/nbnxn_cuda/libgromacs_generated_nbnxn_cuda.cu.o:
 relocation R_X86_64_32 against 
`_Z58nbnxn_kernel_ElecEwQSTabTwinCut_VdwLJEwCombLB_F_prune_cuda11cu_atomdata10cu_nbparam8cu_plistb'
 can not be used when making a shared object; recompile with -fPIC

So I removed boost, avx2, mpi, and dynamic but get the same result. What else 
should I remove?

cmake ..   
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE  
-DCMAKE_C_COMPILER:FILEPATH=`which cc` 
-DCMAKE_C_FLAGS:STRING=-fPIC  
-DCMAKE_CXX_COMPILER:FILEPATH=`which CC` 
-DCMAKE_CXX_FLAGS:STRING=-fPIC  
-DCMAKE_INSTALL_PREFIX:PATH=$PREFIX  
-DGMX_FFT_LIBRARY=fftw3 
-DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so  
-DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC  
-DGMX_GPU=ON  
-DCUDA_NVCC_FLAGS:STRING="-rdc=true"

/opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -fPIC -std=c++11   -O3 
-DNDEBUG -funroll-all-loops -fexcess-precision=fast   
CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
-Wl,-rpath,/p/work/borchert/gromacs-2018.1/build/lib 
../../lib/libgromacs.so.3.1.0 -fopenmp -lm 
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_59_tmpxft_01e3__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_57_tmpxft_a64f__21_pme_spread_compute_61_cpp1_ii_d982d3ad'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_71_tmpxft_03a4__21_cuda_version_information_compute_61_cpp1_ii_8ab8dc1d'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_58_tmpxft_a80b__21_pme_timings_compute_61_cpp1_ii_75ae0e44'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_a10b__21_pme_3dfft_compute_61_cpp1_ii_79dff388'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_57_tmpxft_9bd7__21_nbnxn_cuda_compute_61_cpp1_ii_f147f02c'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_50_tmpxft_a9c8__21_pme_compute_61_cpp1_ii_6dbf966c'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_a490__21_pme_solve_compute_61_cpp1_ii_06051a94'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_ab85__21_cudautils_compute_61_cpp1_ii_25933dd5'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_54_tmpxft_aefc__21_pinning_compute_61_cpp1_ii_5d0f4aae'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_ad42__21_gpu_utils_compute_61_cpp1_ii_70828085'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_57_tmpxft_a2d0__21_pme_gather_compute_61_cpp1_ii_a7a2f9c7'
../../lib/libgromacs.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_67_tmpxft_9f4e__21_nbnxn_cuda_data_mgmt_compute_61_cpp1_ii_a1eafeba'

Chris

-Original Message-
From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
[mailto:gromacs.org_gmx-users-boun...@maillist.sys.kth.se] On Behalf Of Szilárd 
Páll
Sent: Friday, April 06, 2018 10:17 AM
To: Discussion list for GROMACS users <gmx-us...@gromacs.org>
Cc: gromacs.org_gmx-users@maillist.sys.kth.se
Subject: Re: [gmx-users] Problem with CUDA

Hi,

What is the reason for using the custom CMake options? What's the -rdc=true for 
-- I don't think it's needed and it can very well be causing the issue. Have 
you tried to actually do an as-vanilla-as-possible build?

--
Szilárd


On Thu, Apr 5, 2018 at 6:52 PM, Borchert, Christopher B ERDC-RDE-ITL-MS 
Contractor <christopher.b.borch...@erdc.dren.mil>
wrote:
> Hello. I'm taking a working build from a co-worker and trying to add GPU 
> support on a Cray XC. CMake works but make fails. Both 2016 and 2018 die at 
> the same point -- can't find gromac's own routines.
>
> 2016.5:
> /opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -O2 -fPIC -dynamic 
> -std=c++0x   -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast  
> -dynamic CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
> -Wl,-rpath,/p/work/cots/gromacs-2016.5/build/lib:/opt/nvidia/cudatoolkit8.0/8.0.54_2.3.12_g180d272-2.2/lib64/stubs
>  -dynamic ../../lib/libgromacs_mpi.so.2.5.0 -fopenmp -lcudart 
> /opt/nvidia/cudatoolkit8.0/8.0.54_2.3.12_g180d272-2.2/lib64/stubs/libnvidia-ml.so
>  -lhwloc -lz -ldl -lrt -lm -lfftw3f
> ../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
> `__cudaRegisterLinkedBinary_59_tmpxft_0001bc78__21_pmalloc_cuda_compute_61_

Re: [gmx-users] Problem with CUDA

2018-04-06 Thread Szilárd Páll
Hi,

What is the reason for using the custom CMake options? What's the
-rdc=true for -- I don't think it's needed and it can very well be
causing the issue. Have you tried to actually do an
as-vanilla-as-possible build?

--
Szilárd


On Thu, Apr 5, 2018 at 6:52 PM, Borchert, Christopher B
ERDC-RDE-ITL-MS Contractor 
wrote:
> Hello. I'm taking a working build from a co-worker and trying to add GPU 
> support on a Cray XC. CMake works but make fails. Both 2016 and 2018 die at 
> the same point -- can't find gromac's own routines.
>
> 2016.5:
> /opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -O2 -fPIC -dynamic 
> -std=c++0x   -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast  
> -dynamic CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
> -Wl,-rpath,/p/work/cots/gromacs-2016.5/build/lib:/opt/nvidia/cudatoolkit8.0/8.0.54_2.3.12_g180d272-2.2/lib64/stubs
>  -dynamic ../../lib/libgromacs_mpi.so.2.5.0 -fopenmp -lcudart 
> /opt/nvidia/cudatoolkit8.0/8.0.54_2.3.12_g180d272-2.2/lib64/stubs/libnvidia-ml.so
>  -lhwloc -lz -ldl -lrt -lm -lfftw3f
> ../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
> `__cudaRegisterLinkedBinary_59_tmpxft_0001bc78__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
> ../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_0001bac2__21_gpu_utils_compute_61_cpp1_ii_d70ebee0'
> ../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_0001b90b__21_cudautils_compute_61_cpp1_ii_24d20763'
> ../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
> `__cudaRegisterLinkedBinary_71_tmpxft_0001c016__21_cuda_version_information_compute_61_cpp1_ii_e35285be'
> ../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
> `__cudaRegisterLinkedBinary_57_tmpxft_0001b592__21_nbnxn_cuda_compute_61_cpp1_ii_6e47f057'
> ../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
> `__cudaRegisterLinkedBinary_67_tmpxft_0001b754__21_nbnxn_cuda_data_mgmt_compute_61_cpp1_ii_a1eafeba'
> collect2: error: ld returned 1 exit status
>
> 2018.1:
> /opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -O2 -fPIC -dynamic 
> -std=c++11   -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast  
> -dynamic CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
> -Wl,-rpath,/p/work/cots/gromacs-2018.1/build/lib 
> ../../lib/libgromacs_mpi.so.3.1.0 -fopenmp -lm
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_68a5__21_pme_3dfft_compute_61_cpp1_ii_79dff388'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_67_tmpxft_6621__21_nbnxn_cuda_data_mgmt_compute_61_cpp1_ii_a1eafeba'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_57_tmpxft_6f47__21_pme_spread_compute_61_cpp1_ii_d982d3ad'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_6d70__21_pme_solve_compute_61_cpp1_ii_06051a94'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_59_tmpxft_8da7__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_50_tmpxft_7930__21_pme_compute_61_cpp1_ii_6dbf966c'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_58_tmpxft_7382__21_pme_timings_compute_61_cpp1_ii_75ae0e44'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_57_tmpxft_6b11__21_pme_gather_compute_61_cpp1_ii_a7a2f9c7'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_7f9f__21_cudautils_compute_61_cpp1_ii_25933dd5'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_54_tmpxft_88f9__21_pinning_compute_61_cpp1_ii_5d0f4aae'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_57_tmpxft_39b7__21_nbnxn_cuda_compute_61_cpp1_ii_f147f02c'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_71_tmpxft_91d4__21_cuda_version_information_compute_61_cpp1_ii_8ab8dc1d'
> ../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
> `__cudaRegisterLinkedBinary_56_tmpxft_8407__21_gpu_utils_compute_61_cpp1_ii_70828085'
> collect2: error: ld returned 1 exit status
>
> BUILD INSTRUCTIONS:
> module swap PrgEnv-cray PrgEnv-gnu
> module swap gcc gcc/5.3.0
> export CRAYPE_LINK_TYPE=dynamic
>
> module load cudatoolkit/8.0.54_2.3.12_g180d272-2.2
> module load cmake/gcc-6.3.0/3.7.2
> module load fftw/3.3.4.11
> export BOOST_DIR=/app/unsupported/boost/1.64.0-gcc-6.3.0
>
> export 

[gmx-users] Problem with CUDA

2018-04-05 Thread Borchert, Christopher B ERDC-RDE-ITL-MS Contractor
Hello. I'm taking a working build from a co-worker and trying to add GPU 
support on a Cray XC. CMake works but make fails. Both 2016 and 2018 die at the 
same point -- can't find gromac's own routines.

2016.5:
/opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -O2 -fPIC -dynamic 
-std=c++0x   -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast  
-dynamic CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
-Wl,-rpath,/p/work/cots/gromacs-2016.5/build/lib:/opt/nvidia/cudatoolkit8.0/8.0.54_2.3.12_g180d272-2.2/lib64/stubs
 -dynamic ../../lib/libgromacs_mpi.so.2.5.0 -fopenmp -lcudart 
/opt/nvidia/cudatoolkit8.0/8.0.54_2.3.12_g180d272-2.2/lib64/stubs/libnvidia-ml.so
 -lhwloc -lz -ldl -lrt -lm -lfftw3f 
../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
`__cudaRegisterLinkedBinary_59_tmpxft_0001bc78__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_0001bac2__21_gpu_utils_compute_61_cpp1_ii_d70ebee0'
../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_0001b90b__21_cudautils_compute_61_cpp1_ii_24d20763'
../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
`__cudaRegisterLinkedBinary_71_tmpxft_0001c016__21_cuda_version_information_compute_61_cpp1_ii_e35285be'
../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
`__cudaRegisterLinkedBinary_57_tmpxft_0001b592__21_nbnxn_cuda_compute_61_cpp1_ii_6e47f057'
../../lib/libgromacs_mpi.so.2.5.0: undefined reference to 
`__cudaRegisterLinkedBinary_67_tmpxft_0001b754__21_nbnxn_cuda_data_mgmt_compute_61_cpp1_ii_a1eafeba'
collect2: error: ld returned 1 exit status

2018.1:
/opt/cray/pe/craype/2.5.13/bin/CC-march=core-avx2   -O2 -fPIC -dynamic 
-std=c++11   -O3 -DNDEBUG -funroll-all-loops -fexcess-precision=fast  
-dynamic CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template 
-Wl,-rpath,/p/work/cots/gromacs-2018.1/build/lib 
../../lib/libgromacs_mpi.so.3.1.0 -fopenmp -lm 
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_68a5__21_pme_3dfft_compute_61_cpp1_ii_79dff388'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_67_tmpxft_6621__21_nbnxn_cuda_data_mgmt_compute_61_cpp1_ii_a1eafeba'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_57_tmpxft_6f47__21_pme_spread_compute_61_cpp1_ii_d982d3ad'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_6d70__21_pme_solve_compute_61_cpp1_ii_06051a94'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_59_tmpxft_8da7__21_pmalloc_cuda_compute_61_cpp1_ii_63d60154'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_50_tmpxft_7930__21_pme_compute_61_cpp1_ii_6dbf966c'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_58_tmpxft_7382__21_pme_timings_compute_61_cpp1_ii_75ae0e44'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_57_tmpxft_6b11__21_pme_gather_compute_61_cpp1_ii_a7a2f9c7'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_7f9f__21_cudautils_compute_61_cpp1_ii_25933dd5'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_54_tmpxft_88f9__21_pinning_compute_61_cpp1_ii_5d0f4aae'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_57_tmpxft_39b7__21_nbnxn_cuda_compute_61_cpp1_ii_f147f02c'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_71_tmpxft_91d4__21_cuda_version_information_compute_61_cpp1_ii_8ab8dc1d'
../../lib/libgromacs_mpi.so.3.1.0: undefined reference to 
`__cudaRegisterLinkedBinary_56_tmpxft_8407__21_gpu_utils_compute_61_cpp1_ii_70828085'
collect2: error: ld returned 1 exit status

BUILD INSTRUCTIONS:
module swap PrgEnv-cray PrgEnv-gnu
module swap gcc gcc/5.3.0
export CRAYPE_LINK_TYPE=dynamic

module load cudatoolkit/8.0.54_2.3.12_g180d272-2.2
module load cmake/gcc-6.3.0/3.7.2
module load fftw/3.3.4.11
export BOOST_DIR=/app/unsupported/boost/1.64.0-gcc-6.3.0

export PREFIX=/app/unsupported/gromacs/201x.x
mkdir $PREFIX

cmake ..  \
 -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
 -DCMAKE_C_COMPILER:FILEPATH=`which cc` \
 -DCMAKE_C_FLAGS:STRING="-O2 -fPIC -dynamic" \
 -DCMAKE_CXX_COMPILER:FILEPATH=`which CC` \
 -DCMAKE_CXX_FLAGS:STRING="-O2 -fPIC -dynamic" \
 -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX \
 -DGMX_FFT_LIBRARY=fftw3 \
 -DCMAKE_EXE_LINKER_FLAGS:STRING=-dynamic \
 -DGMX_SIMD=AVX2_256 \
 -DFFTWF_LIBRARY:FILEPATH=${FFTW_DIR}/libfftw3f.so \
 -DFFTWF_INCLUDE_DIR:PATH=$FFTW_INC \