SSAGESproject / SSAGES

Software Suite for Advanced General Ensemble Simulations
GNU General Public License v3.0
86 stars 29 forks source link

cmake does not recognize -DFFTWF_INCLUDE_DIR #52

Open npavlovikj opened 7 months ago

npavlovikj commented 7 months ago

Hi,

I am trying to install SSAGES 0.9.3 with GROMACS 2018 from the provided source tarball. I already have FFTW3 installed on my system; however when I specify the location to the FFTW3 lib and include directories as suggested by make these flags are nor recognized and the build fails:

The command I use is:

cmake -DCMAKE_INSTALL_PREFIX=$PREFIX \
  -DFFTW_LIBRARY=/util/opt/fftw3/3.3/lib/libfftw3.so \
  -DFFTWF_INCLUDE_DIR ="/util/opt/fftw3/3.3/include" \
  -DGROMACS="2018" \
  -DCMAKE_C_COMPILER=mpicc \
  -DCMAKE_CXX_COMPILER=mpic++ \
  -DGMX_DOUBLE=OFF \
  -DGMX_BUILD_OWN_FFTW=OFF \
  -DGMX_GPU=ON ..

This builds correctly, but shows:

CMake Warning:
  Manually-specified variables were not used by the project:

    FFTWF_INCLUDE_DIR
    FFTW_LIBRARY

on the screen.

Then, when I run make, I get the following error message:

--   Found fftw3f, version 3.3.9
Could not the fftw3f header fftw3.h, please specify its path in FFTWF_INCLUDE_DIR by hand (e.g. -DFFTWF_INCLUDE_DIR='/path/to/include')
CMake Error at cmake/gmxManageFFTLibraries.cmake:89 (MESSAGE):
  Cannot find FFTW 3 (with correct precision - libfftw3f for mixed-precision
  GROMACS or libfftw3 for double-precision GROMACS).  Either choose the right
  precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the
  advanced option to let GROMACS build FFTW 3 for you
  (-DGMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack
  library (-DGMX_FFT_LIBRARY=fftpack).
Call Stack (most recent call first):
  CMakeLists.txt:727 (include)

As suggested, I have -DFFTWF_INCLUDE_DIR specified in the cmake command, but looks like it is not recognized from SSAGES. The directory /util/opt/fftw3/3.3/include does contain the missing fftw3.h file.

Do you have any suggestions how to fix this and be able to compile SSAGES using already existing FFTW3 install?

Please let me know if you need any additional information.

Thank you, Natasha

npavlovikj commented 7 months ago

I also would like to add that I tried adding the valid GROMACS cmake flags that are not supported by SSAGES in https://github.com/SSAGESproject/SSAGES/blob/fb178779371cf8d7bbc25ce6b86f31b79395489c/hooks/gromacs/CMakeLists.txt#L167; however, they are still not recognized and I still get:

  Manually-specified variables were not used by the project:

messages when I do that.

Do I need to specify these flags elsewhere too?