我已经使用FFTW3两个月了。我最近决定尝试实现一些并行的方面,以加快计算速度。然而..。
当我尝试./configure --enable-threads --enable-openmp --prefix=/$HOME/Desktop/FFTWLibParallel时,它运行了一段时间,然后我遇到了以下内容:
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking for OpenMP flag of C compiler... unknown
configure: error: don't know how to enable OpenMP我曾尝试使用./configure CC=gcc-12.0.0 ...运行,但结果返回
checking for gcc... gcc-12.0.0
checking whether the C compiler works... no
configure: error: in `/Users/USER/Desktop/fftw-3.3.9':
configure: error: C compiler cannot create executables
See `config.log' for more details 这个问题很明显是与使用--enable-openmp有关的,但是我真的不确定为什么或者如何解决它。我已经在这里看到了这个问题的一些版本,但没有一个能帮助我解决我的问题。
谢谢。
编辑:
我用的是mac!
发布于 2021-02-08 09:16:47
回到这里,以防任何人,像我一样,遇到类似的问题,无法找到解决方案。经过进一步的探索,以下方法终于对我起作用了:
./configure CC=gfortran --enable-openmp --enable-threads CFLAGS="-fopenmp"最关键的部分是CC=gfortran,与CC=gcc不同的是,它支持使用CFLAGS="-fopenmp“。
https://stackoverflow.com/questions/65905837
复制相似问题