FFTW Function Checking Fails on Windows Installation

GROMACS version: 2020.4
GROMACS modification: No

Hello,

Sorry if this is an obvious question, I always seem to have trouble building software like this. I’m looking to install GROMACS on my machine running Windows 10, and it seems like the best way to do that is with the CMake GUI from a pre-built FFTW library. So, I’m trying to do exactly that. I’ve built an FFTW .lib file from the latest library release using the VSC++ lib tool. In the CMake GUI, I point to the extracted GROMACS folder for the “Where is the source code” option, and point to the folder I want it to build into for the “Where to build the binaries” option. Before configuring, I add two entries to CMake:

FFTWF_INCLUDE_DIR = C:\Users\mikec\Documents\gromacs-2020.4\build4\libffw3
FFTWF_LIBRARY=libfftw3f-3.lib

The directory is where I have my FFTW library. As I understand, the library should be in single precision to match GROMACS, and I think mine is. When I configure with CMake, I get the following output:

CMake Error at cmake/FindFFTW.cmake:105 (message):
  Could not find fftwf_plan_many_[r2c|c2r] in libfftw3f-3.lib, take a look at
  the error message in
  C:/Users/mikec/Documents/gromacs-2020.4/build4/CMakeFiles/CMakeError.log to
  find out what went wrong.  If you are using a static lib (.a) make sure you
  have specified all dependencies of fftw3f in FFTWF_LIBRARY by hand (e.g.
  -DFFTWF_LIBRARY='/path/to/libfftw3f.so;/path/to/libm.so') !
Call Stack (most recent call first):
  cmake/gmxManageFFTLibraries.cmake:89 (find_package)
  CMakeLists.txt:716 (include)

It seems like it’s having trouble verifying the function exists. The notable part in the CMakeError.log, I think, is this:

Source file was:
int main() { return 0; }
Determining if the function fftwf_plan_many_dft exists in the libfftw3f-3.lib failed with the following output:
Change Dir: C:/Users/mikec/Documents/gromacs-2020.4/build4/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe cmTC_456db.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.8.2+25e4d540b for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29335 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  CheckFunctionExists.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=fftwf_plan_many_dft /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_456db.dir\Debug\\" /Fd"cmTC_456db.dir\Debug\vc142.pdb" /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.19\Modules\CheckFunctionExists.c"

LINK : fatal error LNK1104: cannot open file 'libfftw3f-3.lib' [C:\Users\mikec\Documents\gromacs-2020.4\build4\CMakeFiles\CMakeTmp\cmTC_456db.vcxproj]

I’m not exactly sure, but it seems to me like it’s having trouble finding the FFTW library file, even though I’ve specified the directory and file name through the CMake GUI. Is there something I’m doing wrong? Are there any options I should change for an installation like this? I would be happy to upload the error and output logs, but I’m unfortunately not authorized to do so.

Thanks in advance for any help,
Michael

You ever solved this problem I’m stuck at the same place :/ Thanks in advance!

Have you ever solved it? I met the same problem.

Same problem here.

I don’t suppose someone figured this out yet… relevant xkcd: xkcd: Bug Thread

I know this isn’t a solution per say, but I just scraped the whole thing, downloaded Ubuntu and downloaded the software through there. It took less than 10 minutes. Nice tutorial is here