user906357
user906357

Reputation: 4685

Configure error installing fftw

I just followed the instructions here to update my gcc. Now I am trying to install FFTW. So I downloaded the filed here. After I unzip and navigate to that directory I run this:

./configure  --enable-mpi --enable-threads --enable-openmp

But I get the following error:

checking for OpenMP flag of C compiler... unknown
configure: error: don't know how to enable OpenMP

I know OpenMP didn't work before I updated GCC, but it does now if I do this:

export PATH=/usr/local/gcc-6.1.0/bin:$PATH
gcc-6.1.0 main.c -o main

So I'm guessing the problem is that when I try to configure FFTW it is using the default gcc, but I need it to use gcc-6.1.0. How can I do this?

Upvotes: 0

Views: 1614

Answers (2)

tim18
tim18

Reputation: 620

Your method of setting PATH should work if you also set LD_LIBRARY_PATH to the lib or lib64 which was installed along with your new gcc. It should be in the same directory as bin.

Upvotes: 0

logan rakai
logan rakai

Reputation: 2557

From the manual, CC is the environment variable to set the compiler for configure.

./configure CC=gcc-6.1.0 --enable-mpi --enable-threads --enable-openmp

should set the version of gcc for that configure. You can also consider changing the symbolic link for gcc.

Upvotes: 5

Related Questions