[Wien] Error : configure: error: could not find mpi library for --enable-mpi while installing fftw

Gavin Abo gabo13279 at gmail.com
Mon Sep 5 19:25:10 CEST 2022


I looked into this further, and below is my Ubuntu bash terminal output.


By removing mpicc from my environment, I was able to reproduce your 
reported error:


username at computername:~/fftw-3.3.10$ which mpicc

username at computername:~/fftw-3.3.10$ grep openmpi ~/.bashrc

username at computername:~/fftw-3.3.10$ ./configure FCC=gfortran CC=gcc 
MPICC=mpicc --enable-mpi --prefix=$HOME/fftw-3.3.10
...
checking for mpicc... mpicc
checking for MPI_Init... no
checking for MPI_Init in -lmpi... no
checking for MPI_Init in -lmpich... no
configure: error: could not find mpi library for --enable-mpi


To resolve it, I checked that mpicc was generated by "make all install" 
for Open MPI (in step 3 of [1]) in the bin directory:


username at computername:~/fftw-3.3.10$ ls ~/openmpi-4.1.4/bin/
aggregate_profile.pl  mpiCC    mpif77   mpirun      ompi-server 
orte-clean  orterun
mpic++                mpicxx   mpif90   ompi-clean  opal_wrapper 
orted       orte-server
mpicc                 mpiexec mpifort  ompi_info   ortecc        
orte-info   profile2mat.pl


Then, I added to my environment [2] mpicc:


username at computername:~/fftw-3.3.10$ gedit ~/.bashrc
username at computername:~/fftw-3.3.10$ source ~/.bashrc
username at computername:~/fftw-3.3.10$ which mpicc
/home/username/openmpi-4.1.4/bin/mpicc
username at computername:~/fftw-3.3.10$ grep openmpi ~/.bashrc
export PATH=$PATH:/home/username/openmpi-4.1.4/bin
export 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/username/OpenBLAS:/home/username/openmpi-4.1.4/lib


Next, I ran mpicc to see what version it has:


username at computername:~/fftw-3.3.10$ mpicc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Finally, when running configure, the error had gone away and the 
MPI_Init with "no" above can be seen to have changed to "yes" below:


username at computername:~/fftw-3.3.10$ ./configure FCC=gfortran CC=gcc 
MPICC=mpicc --enable-mpi --prefix=$HOME/fftw-3.3.10
...
checking for mpicc... mpicc
checking for MPI_Init... yes
checking for mpi.h... yes
checking for mpirun... mpirun
...


Your .bashrc does look correct.  After saving the changes to .bashrc, 
maybe you didn't reload the new .bashrc settings for example by running 
"source ~/.bashrc" (Or alternatively: closing/opening a new terminal, 
logging in/out, or by restarting the computer).


[1] 
https://github.com/gsabo/WIEN2k-Docs/blob/main/WIEN2k21.1_Ubuntu22.04_Install_with_gfortran.pdf

[2] https://help.ubuntu.com/community/EnvironmentVariables


Kind Regards,

Gavin

WIEN2k user


On 9/5/2022 9:36 AM, Gavin Abo wrote:
>
> The openmpi-4.1.4 might not be installed.  What does "which mpicc" 
> return as output?
>
>
> On 9/5/2022 8:52 AM, AJAY SINGH VERMA wrote:
>> Dear all,
>> I am following below pdf to install wien2k
>>
>>
>> [WIEN2k 21.1 Install with gfortran
>> August 1, 2022
>> Linux Operating System Version (lsb_release -a): Ubuntu 22.04 LTS
>> Fortran Compiler Version (gfortran --version): gfortran 11.2.0
>> WIEN2k Version (cat $WIENROOT/WIEN2k_VERSION): 21.1 (Release 14/4/2021)]
>>
>>
>>
>> I have edited bashrc as follow for Openblas and openmpi
>>
>>
>>
>> XCRYSDEN_TOPDIR=/usr/share/xcrysden
>> XCRYSDEN_LIB_BINDIR=/usr/lib/xcrysden
>> export XCRYSDEN_TOPDIR
>> export XCRYSDEN_LIB_BINDIR
>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/rashmi/OpenBLAS
>>
>>
>>
>> PATH=/home/rashmi/openmpi-4.1.4/bin:$PATH
>> LD_LIBRARY_PATH=/home/rashmi/OpenBLAS:/home/rashmi/openmpi-4.1.4/lib:$LD_LIBRARY_PATH
>> export PATH
>> export LD_LIBRARY_PATH
>>
>>
>>
>> While following the commands for installing fftw-3.3.10 and giving 
>> this particular command
>>
>> ./configure FCC=gfortran CC=gcc MPICC=mpicc --enable-mpi 
>> --prefix=$HOME/fftw-3.3.10
>>
>> I am getting error
>>
>> configure: error: could not find mpi library for --enable-mpi
>>
>> Kindly help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20220905/66af378f/attachment.htm>


More information about the Wien mailing list