Instalando o P3DFFT

1

Estou instalando o P3DFFT no Ubuntu. Eu baixei o arquivo ".tar.gz" para ele e o extraí. Em seguida, usei o comando "./configure". O configure deu o seguinte erro, "configure: error: você deve optar por usar ESSL ou FTTW" Eu tenho chamado o FTTW lib antes do P3DFFT. Por favor me ajude nesse erro.

Obrigado

    
por Kiran Jadhav 16.05.2018 / 15:05

1 resposta

1

Como você não especifica sua versão do Ubuntu, eu testei o método abaixo em duas versões suportadas do LTS - Ubuntu 16.04 LTS (Xenial Xerus) e Ubuntu 18.04 LTS (Bionic Beaver).

Instale os pacotes de desenvolvedor relacionados ao FFTW e as dependências de compilação. Não se esqueça de ativar os repositórios de código-fonte em Software & Atualizações ( software-properties-gtk ) antes de prosseguir.
Então corra:

sudo apt-get install -y libfftw3-dev libfftw3-mpi-dev libopenmpi-dev gfortran
sudo apt-get build-dep -y libfftw3-dev libfftw3-mpi-dev

Faça o download e extraia o pacote P3DFFT:

cd ~/Downloads
wget https://github.com/sdsc/p3dfft/archive/v2.7.6.tar.gz
tar -xf v2.7.6.tar.gz
cd p3dfft-2.7.6/

Como era já escrito por @steeldriver :

The first thing to note is that the argument to --with-fftw must be the top level path to the FFTW3 header files and libraries. So for example if the headers are in /usr/include and the libraries are under /usr/lib (the default, when package libfftw3-dev is installed from the Ubuntu repository), the value should be given as --with-fftw=/usr

The additional issue in this case is that the provided configure script appears to be hard-wired to look in only the lib and lib64 subdirectories:

   3315         if test -e $withfftw/lib/libfftw3.a ; then
   3316                 FFTW_INC="-I$withfftw/include"
   3317 
   3318                 FFTW_LIB="$withfftw/lib/libfftw3.a"
   3319 
   3320         elif test -e $withfftw/lib64/libfftw3.a ; then
   3321                 FFTW_INC="-I$withfftw/include"
   3322 
   3323                 FFTW_LIB="$withfftw/lib64/libfftw3.a"
   3324 
   3325         else
   3326                 as_fn_error $? "libfftw3.a was not found in given location!" "$LINENO" 5
   3327         fi

The use of a lib64 subdirectory is an old convention that pre-dates Debian's Multiarch framework - the modern location for 64-bit libraries would be lib/x86_64-linux-gnu

Então você precisa corrigir o script configure . Você pode fazer isso com os comandos abaixo:

sed -i 's/\$withfftw\/include/\/usr\/include/g' configure
sed -i 's/\$withfftw\/lib64\//\$withfftw\//g' configure
sed -i 's/\$withfftw\/lib\//\$withfftw\//g' configure

Em seguida, execute o novo script configure com as opções corretas:

./configure --enable-fftw --with-fftw=/usr/lib/x86_64-linux-gnu

Em seguida, execute a compilação e a instalação:

make
sudo make install
    
por N0rbert 17.05.2018 / 22:14