[gmx-users] Re: cygwin_mpi_gmx installation

Szilárd Páll szilard.pall at cbr.su.se
Sat Apr 13 17:27:50 CEST 2013

On Sat, Apr 13, 2013 at 3:30 PM, Mirco Wahab
<mirco.wahab at chemie.tu-freiberg.de> wrote:
> On 12.04.2013 20:20, Szilárd Páll wrote:
>> On Fri, Apr 12, 2013 at 3:45 PM, 라지브간디 <rajiv at kaist.ac.kr> wrote:
>>> Can cygwin recognize the CUDA installed in win 7? if so, how do i link
>>> them ?
>> Good question, I've no idea whether it can as I myself have never
>> built GROMACS with CUDA on cygwin neither have I heard of anyone else
>> do that. What I can safely state is that the native Win builds with
>> non-cygwin CMake and MSVC as a compiler do work with with a variety of
>> generators: nmake, ninja, and VS.
>> However, it would be very useful to know whether/how it is possible to
>> detect CUDA with CMake a build GROMACS with GPU acceleration on
>> cygwin. Perhaps someone else on the list with more cygwin experience
>> could help out with tips or even try to build with CUDA.
> CUDA compilation cannot use cygwin's gcc afaik for now. It *might*
> be  possible to *link* somethin Win64-Cuda into Cygwin64, but to my
> knowledge, nobody succeeded so far in this.

Right, I forgot to mention the host compiler aspect. AFAIK all nvcc
versions, up to 5.0, will only work with MSVC as a host compiler.
However, if cl.exe is in your path or you set CUDA_HOST_COMPILER
manually, this part should work fine.

> Resumé: No CUDA acceleration for Gromacs under Cywin32/Cygwin64
> (which corresponds to -DGMX_GPU=OFF).

I wouldn't jump to that conclusion just yet, I've heard people use
CUDA with cygwin, that is gcc + (nvcc with MSVC). What we don't know
is how to get this combination to work in the GROMACS build system. It
might be quite easy to do, but it could also be impossible without
tweaks in the build system.

Some brief googling turned up some info which suggests that it should work:

>>> Computing Toolkit\CUDA
>> The whitespaces will need special treatment, AFAIR putting quotes
>> around the path (or simply copying the directory to C:\CUDA) should
>> work. Alternatively, you could try to put nvcc in your path, than
>> CMake should be able to do the path handling magic.
> gcc and spaces in paths is a show stopper. The toolchain doesn't usually
> work well  (if at all) if spaces in paths are present.

Note that I was not suggesting to use gcc with spaces, but that
passing the path to the CUDA toolkit directory to CMake should work
even with spaces in the path (as well as the CMake CUDA detection) as
CMake should do the escaping - after all, the MSVC compiler is
typically in "Program Files".

> I checked today the new Cygwin64, the distribution which contains gcc
> 4.8.0 and fftw3f 3.3.3, with gromacs. *It builds fine* (aside from the
> known warnings from gcc 4.8.0). The first time I saw a working 64 bit
> gromacs under Cygwin. The provided fftw3f doesn't have a SIMD mode,
> but hey ..

Great! That reminds me that one should be careful with using the
matching libraries when building with CUDA in cygwin, i.e when
building in 32-bit mode with gcc, nvcc and cl.exe should also be
instructed to build 32-bit code. However, you finding suggests that
one could potentially get Cygwin64 + gcc4.8 + MSVC (10?) 64 bit + CUDA
64 bit to all work together. Emphasis on *potentially*. :)

Compiling fftw with SSE should be no big deal, though.

Thanks Mirco for the insights. Let us know if anybody progresses with
cygwin + CUDA.


> -DGMX_GPU=OFF ../gromacs-4.6.1
> Regards
> M.
> --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> * Please don't post (un)subscribe requests to the list. Use the www
> interface or send it to gmx-users-request at gromacs.org.
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

More information about the gromacs.org_gmx-users mailing list