[CP2K-user] [RAC RT #326762] [CP2K:21879] Re: Unusable FFTW?
Raymond Sheppard
rsheppar at iu.edu
Mon Oct 6 16:36:08 UTC 2025
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
On Wednesday, October 1, 2025 at 10:07:29 PM UTC-4 Sheppard, Raymond W
wrote:
> 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... at googlegroups.com <cp... at googlegroups.com> on behalf of
> Sheppard, Raymond W <rshe... at iu.edu>
> Sent: Tuesday, September 16, 2025 6:27 AM
> To: cp2k
> Subject: Re: [External] [CP2K:21839] Re: Unusable FFTW?
>
> 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 at login1:28 libvdwxc-0.4.0]$
>
> Ray again
>
>
> ________________________________________
> From: cp... at googlegroups.com <cp... at googlegroups.com> on behalf of
> Sheppard, Raymond W <rshe... at iu.edu>
> Sent: Monday, September 15, 2025 5:17 PM
> To: cp2k
> Subject: Re: [External] [CP2K:21837] Re: Unusable FFTW?
>
> 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... at googlegroups.com <cp... at googlegroups.com> on behalf of
> Konstantin Tokarev <ann... at gmail.com>
> Sent: Saturday, September 13, 2025 5:47 AM
> To: cp2k
> Subject: Re: [External] [CP2K:21833] Re: Unusable FFTW?
>
> 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?
>
> --
> 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... at googlegroups.com<mailto:cp2k+uns... at 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
> >.
>
> --
> 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... at googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/cp2k/CO1PR08MB7643F5E0AF2BA1AB9A36B5C5A315A%40CO1PR08MB7643.namprd08.prod.outlook.com
> .
>
> --
> 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... at googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/cp2k/CO1PR08MB7643E32C3A78F5CED6EF3E62A314A%40CO1PR08MB7643.namprd08.prod.outlook.com
> .
>
--
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+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/890da62c-517b-4773-993c-f5a9e6d6b18bn%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20251006/8b6e6cb8/attachment.htm>
More information about the CP2K-user
mailing list