Unusable FFTW?

62 views
Skip to first unread message

Raymond Sheppard

unread,
Sep 11, 2025, 1:18:47 AMSep 11
to cp2k
Hello, 
  I am trying to build on a Cray that is running Sles15 (sp6).  My build keeps generating errors that make no sense.  I just turned off ELPA with similar issues, but can not turn off the HPE (Cray) provided FFTW.  The build knows wher the include files are (below) but still says they can not find them.  Thanks for any insight.
           Ray

checking for FFTW3 include flags... -I'/opt/cray/pe/fftw/3.3.10.10/x86_rome/include'
checking for FFTW3 library flags... -lfftw3_mpi -lfftw3 -lfftw3_omp
checking fftw3.h usability... no
checking fftw3.h presence... no
checking for fftw3.h... no
checking whether we have a full FFTW3 support... no
configure: error: in `/N/soft/sles15sp6/cp2k/build/cp2k-2025.2/tools/toolchain/build/libvdwxc-0.4.0':
configure: error: FFTW3 is missing or incomplete
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
/geode2/soft/hps/sles15sp6/cp2k/build/cp2k-2025.2/tools/toolchain/scripts/tool_kit.sh: line 680: /N/soft/sles15sp6/cp2k/build/cp2k-2025.2/tools/toolchain/install/libvdwxc-0.4.0/install_successful: No such file or directory

[rsheppar@login2:26 toolchain]$ ls -l /opt/cray/pe/fftw/3.3.10.10/x86_rome/include
total 205
-rw-r--r-- 1 root root  2447 Feb  4  2025 fftw3.f
-rw-r--r-- 1 root root 55032 Feb  4  2025 fftw3.f03
-rw-r--r-- 1 root root 31986 Feb  4  2025 fftw3.h
-rw-r--r-- 1 root root 27203 Feb  4  2025 fftw3l.f03
-rw-r--r-- 1 root root 18678 Feb  4  2025 fftw3l-mpi.f03
-rw-r--r-- 1 root root 36969 Feb  4  2025 fftw3-mpi.f03
-rw-r--r-- 1 root root  9624 Feb  4  2025 fftw3-mpi.h
-rw-r--r-- 1 root root 25902 Feb  4  2025 fftw3q.f03
[rsheppar@login2:26 toolchain]$

Konstantin Tokarev

unread,
Sep 11, 2025, 2:26:00 AMSep 11
to cp2k
Hello Raymond,

Could you share config.log?

Sheppard, Raymond W

unread,
Sep 11, 2025, 4:03:27 AMSep 11
to cp2k
FYI, My build command and loaded modules are below in case that helps. ELPA did not want to link to the Cray libsci libraries, So I just turned it off after fighting with it for awhile. It also did not like our CMake version 4.1.0 (thought it was too old?) So I let it build its own..
Ray again

cat build_toolchain.bash
./install_cp2k_toolchain.sh --with-mpich=system --with-cmake --enable-cray --math-mode=cray --with-hdf5=system --with-gcc=system --with-fftw=system --with-elpa=no

[rsheppar@login2:26 toolchain]$ module list

Currently Loaded Modules:
1) craype-x86-rome 7) cray-dsmml/0.3.1 13) cray-hdf5/1.14.3.5
2) craype-network-ucx 8) cray-ucx/1.14.0 14) cray-fftw/3.3.10.10
3) perftools-base/25.03.0 9) cray-mpich-ucx/8.1.32 15) cmake/4.1.0
4) xpmem/0.2.119-1.3_gef379be13330 10) cray-libsci/25.03.0 16) openblas/0.3.26
5) gcc-native/14.2 11) PrgEnv-gnu/8.6.0
6) craype/2.7.34 12) quota/1.9




________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Konstantin Tokarev <ann...@gmail.com>
Sent: Thursday, September 11, 2025 2:25 AM
To: cp2k
Subject: [External] [CP2K:21823] Re: Unusable FFTW?

You don't often get email from ann...@gmail.com. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>

This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.


Hello Raymond,

Could you share config.log?

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/411931d2-bbe2-4d49-91ff-1972b49fc975n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/411931d2-bbe2-4d49-91ff-1972b49fc975n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Sheppard, Raymond W

unread,
Sep 11, 2025, 4:03:35 AMSep 11
to cp2k
Hi,
Thanks for replying. I seem to have a number of config logs in the build, but not for FFTW:
[rsheppar@login2:26 toolchain]$ find . -name config.log
./build/elpa-2024.05.001/build_cpu/config.log
./build/libint-v2.6.0-cp2k-lmax-5/config.log
./build/libvdwxc-0.4.0/config.log
./build/gsl-2.8/config.log
./build/mpich-4.3.1/config.log
./build/mpich-4.3.1/modules/json-c/config.log
./build/mpich-4.3.1/modules/yaksa/config.log
./build/mpich-4.3.1/src/mpl/config.log
./build/mpich-4.3.1/src/pmi/config.log
./build/mpich-4.3.1/src/mpi/romio/config.log
./build/mpich-4.3.1/src/pm/hydra/config.log
[rsheppar@login2:26 toolchain]$


Which one would you like? Thanks again.
Ray


________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Konstantin Tokarev <ann...@gmail.com>
Sent: Thursday, September 11, 2025 2:25 AM
To: cp2k
Subject: [External] [CP2K:21823] Re: Unusable FFTW?

You don't often get email from ann...@gmail.com. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>

This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.


Hello Raymond,

Could you share config.log?

Konstantin Tokarev

unread,
Sep 11, 2025, 4:22:58 AMSep 11
to cp2k


четверг, 11 сентября 2025 г. в 11:03:35 UTC+3, Sheppard, Raymond W:
Hi,
Thanks for replying. I seem to have a number of config logs in the build, but not for FFTW:

I'd like to see config.log that corresponds to the build log you've posted first. Of course that config.log is not from FFTW itself, but from other package that fails to utilize it. It seems like your log corresponds to libvdwxc, therefore required file is ./build/libvdwxc-0.4.0/config.log 

Sheppard, Raymond W

unread,
Sep 11, 2025, 6:59:07 AMSep 11
to cp2k
Sorry,
I should have thought of that. Grepping out the config.log's showed the relics of my learning curve. So I wiped out the directory and let it fail with a clean slate. One note, Y'all look for an mpicxx library in your MPICH testing. Cray does not have that (they did recently extend the compiler wrappers from the old CC to include mpicxx in bin though). So I edited our script to look for tvmpich instead. I think that is related to TotalView and not very useful, but it was a library your script could find. the config.log seems too long to paste nicely, so I bundled and attached it. If your mail does not like attachments, please let me know and I will resend it. Thanks again for the help.
Ray

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Konstantin Tokarev <ann...@gmail.com>
Sent: Thursday, September 11, 2025 4:22 AM
To: cp2k
Subject: Re: [External] [CP2K:21826] Re: Unusable FFTW?

You don't often get email from ann...@gmail.com. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>


--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/8fd69b42-13c4-472b-b913-9b00cd742813n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/8fd69b42-13c4-472b-b913-9b00cd742813n%40googlegroups.com?utm_medium=email&utm_source=footer>.
buildlibvdwxc-0.4.0.config.log

Konstantin Tokarev

unread,
Sep 13, 2025, 5:47:27 AMSep 13
to cp2k
Error is:

configure:16952: /N/soft/sles15sp6/cp2k/build/cp2k-2025.2/tools/toolchain/build/libvdwxc-0.4.0/config/wrappers/wrap-mpicc -c -O2 -fPIC -fno-omit-frame-pointer -fopenmp -g -mtune=native -fpermissive  -I'/opt/cray/pe/fftw/3.3.10.10/x86_rome/include' conftest.c >&5
conftest.c:65:10: fatal error: fftw3.h: No such file or directory
   65 | #include <fftw3.h>
      |          ^~~~~~~~~
compilation terminated.

Does file /opt/cray/pe/fftw/3.3.10.10/x86_rome/include/fftw3.h exist?

Sheppard, Raymond W

unread,
Sep 13, 2025, 3:44:34 PMSep 13
to cp2k
Hi again,
Yes. That was part of my original question and why I am stuck.

]$ ls -l /opt/cray/pe/fftw/3.3.10.10/x86_rome/include/
total 205
-rw-r--r-- 1 root root 2447 Feb 4 2025 fftw3.f
-rw-r--r-- 1 root root 55032 Feb 4 2025 fftw3.f03
-rw-r--r-- 1 root root 31986 Feb 4 2025 fftw3.h
-rw-r--r-- 1 root root 27203 Feb 4 2025 fftw3l.f03
-rw-r--r-- 1 root root 18678 Feb 4 2025 fftw3l-mpi.f03
-rw-r--r-- 1 root root 36969 Feb 4 2025 fftw3-mpi.f03
-rw-r--r-- 1 root root 9624 Feb 4 2025 fftw3-mpi.h
-rw-r--r-- 1 root root 25902 Feb 4 2025 fftw3q.f03

Not only is it there, I use it all of the time. For example, NAMD and Amber both use the fftw module. Cray builds and maintains it. I only build packages like FFTW and HDF5 on the Red Hat machine. If there were an issue, Cray (HPE) would know and fix it. I have seen this type of thing if they were looking for a 32-bit library, but this is an include (text) file.
Ray



________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Konstantin Tokarev <ann...@gmail.com>
Sent: Saturday, September 13, 2025 5:47 AM
To: cp2k
Subject: Re: [External] [CP2K:21833] Re: Unusable FFTW?
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/a5842ef5-55b3-4765-8ab3-b461b9c357f4n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/a5842ef5-55b3-4765-8ab3-b461b9c357f4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Konstantin Tokarev

unread,
Sep 14, 2025, 8:32:38 AMSep 14
to cp2k
Does the failing command produce the same result if you run it manually?

cd ./build/libvdwxc-0.4.0/

Sheppard, Raymond W

unread,
Sep 16, 2025, 1:25:57 AMSep 16
to cp2k
Hi,
Sorry I was slow, but I have been working in the yard over the weekend.

I think I found their conftest.c:

#include <fftw3.h>
int
main ()
{
fftw_plan *plan;
fftw_complex *a1, *a2;
fftw_execute_dft(plan, a1, a2);
;
return 0;
}

I renamed the file a little and get errors related to their code. I did notice they put their directory in quotes. I do not think that matters because there is only one, but let me check. Nope, same result as below.


$ mpicc -c -O2 -fPIC -fno-omit-frame-pointer -fopenmp -g -mtune=native -fpermissive -I/opt/cray/pe/fftw/3.3.10.10/x86_rome/include -o rayfftw.test fftw.test.c

fftw.test.c: In function ‘main’:
fftw.test.c:9:26: warning: passing argument 1 of ‘fftw_execute_dft’ from incompatible pointer type [-Wincompatible-pointer-types]
9 | fftw_execute_dft(plan, a1, a2);
| ^~~~
| |
| struct fftw_plan_s **
In file included from fftw.test.c:1:
/opt/cray/pe/fftw/3.3.10.10/x86_rome/include/fftw3.h:196:41: note: expected ‘fftw_plan’ {aka ‘struct fftw_plan_s * const’} but argument is of type ‘struct fftw_plan_s **’
196 | FFTW_CDECL X(execute_dft)(const X(plan) p, C *in, C *out); \
| ~~~~~~~~~~~~~~^
/opt/cray/pe/fftw/3.3.10.10/x86_rome/include/fftw3.h:465:1: note: in expansion of macro ‘FFTW_DEFINE_API’
465 | FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
| ^~~~~~~~~~~~~~~
gcc: warning: -I/opt/cray/pe/fftw/3.3.10.10/x86_rome/include: linker input file unused because linking not done
gcc: error: -I/opt/cray/pe/fftw/3.3.10.10/x86_rome/include: linker input file not found: No such file or directory


Ray again

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Konstantin Tokarev <ann...@gmail.com>
Sent: Saturday, September 13, 2025 5:47 AM
To: cp2k
Subject: Re: [External] [CP2K:21833] Re: Unusable FFTW?
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com<mailto:cp2k+uns...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/a5842ef5-55b3-4765-8ab3-b461b9c357f4n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/a5842ef5-55b3-4765-8ab3-b461b9c357f4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Sheppard, Raymond W

unread,
Sep 16, 2025, 6:42:23 AMSep 16
to cp2k
Hi again,
Just for fun (and to prove the fftw3 module, I wrote a real, toy program that works idf I change the compile line a little from theirs:
cat shouldwork.c
#include <fftw3.h>
#include <stdio.h>

int main() {
int N = 8; // Define the size of the arrays
fftw_complex *in, *out;
fftw_plan p;

// Allocate memory for the input and output arrays
in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);

// Create the FFTW plan
p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);

// Execute the plan
fftw_execute(p);

// Clean up
fftw_destroy_plan(p);
fftw_free(in);
fftw_free(out);

return 0;
}


Compile line:
mpicc -o should_work shouldwork.c -I/opt/cray/pe/fftw/3.3.10.10/x86_rome/include -L/opt/cray/pe/fftw/3.3.10.10/x86_rome/lib -lfftw3_mpi -lfftw3 -lm
[rsheppar@login1:28 libvdwxc-0.4.0]$

Ray again


________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Sheppard, Raymond W <rshe...@iu.edu>
Sent: Monday, September 15, 2025 5:17 PM
To: cp2k
Subject: Re: [External] [CP2K:21837] Re: Unusable FFTW?
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/CO1PR08MB7643F5E0AF2BA1AB9A36B5C5A315A%40CO1PR08MB7643.namprd08.prod.outlook.com.

Sheppard, Raymond W

unread,
Oct 1, 2025, 10:07:29 PM (5 days ago) Oct 1
to cp2k, Szaleniec, Maciej via RT
Hello again,
I had to take some vacation days. So I just passively hoped you could find the issues. Since I have been back, I located two. A few versions back, GNU started strictly interpreting pointer declarations. So, if one is declared "long" and another "long long" they are mismatched now, even though both refer to a 64-bit pointer. In this case, one is actually in a struct. So it is not recognized. The fix for this was to set CFLAGS with -Wno-incompatible-pointer-types. That only got partway. For some reason, LD_LIBRARY_PATH is being ignored in the libvdwxc-0.4.0 configure.
$ printenv LD_LIBRARY_PATH
/opt/cray/pe/fftw/3.3.10.10/x86_rome/lib:/N/soft/sles15/atlas/gnu/3.10.3/lib:/opt/cray/pe/mpich/8.1.32/ucx/gnu/12.3/lib:/opt/cray/pe/ucx/1.14.0/ucx/lib:/opt/cray/pe/papi/7.2.0.1/lib64

By manually inserting "-L/opt/cray/pe/fftw/3.3.10.10/x86_rome/lib:/N/soft/sles15/atlas/gnu/3.10.3/lib" in the compile line of the FFTW test in configure, it finished and I was able to "make" and "make install" the library directly with:

./configure --prefix=/N/soft/sles15sp6/cp2k/build/cp2k-2025.2/tools/toolchain/install --with-fftw --with-mpi

So I went back to run your install_cp2k_toolchain.sh The problem now though is that does not know the library was built. It throws away the good version, downloads a fresh tar file and then reports the error I just fixed. How do I tell your script either to look for the version in install, or just skip the new download? Thanks.
Ray

________________________________________
From: cp...@googlegroups.com <cp...@googlegroups.com> on behalf of Sheppard, Raymond W <rshe...@iu.edu>
Sent: Tuesday, September 16, 2025 6:27 AM
To: cp2k
Subject: Re: [External] [CP2K:21839] Re: Unusable FFTW?
To view this discussion visit https://groups.google.com/d/msgid/cp2k/CO1PR08MB7643E32C3A78F5CED6EF3E62A314A%40CO1PR08MB7643.namprd08.prod.outlook.com.

Raymond Sheppard

unread,
12:37 PM (10 hours ago) 12:37 PM
to cp2k
I solved my troubles.  They stem from using the *.tgz version of the download.  Using the *.bz2 version cleaned up most of the troubles.
                        Ray

Reply all
Reply to author
Forward
0 new messages