You are misinterpreting --with-mpi-include --with-mpi-lib options. Any particular reason you want to use these options instead of mpi compilers?
>>>>>>> balay@p1 /home/balay $ mpicc -show gcc -I/home/balay/soft/mpich-4.0.1/include -L/home/balay/soft/mpich-4.0.1/lib -Wl,-rpath -Wl,/home/balay/soft/mpich-4.0.1/lib -Wl,--enable-new-dtags -lmpi balay@p1 /home/balay $ mpif90 -show gfortran -fallow-argument-mismatch -I/home/balay/soft/mpich-4.0.1/include -I/home/balay/soft/mpich-4.0.1/include -L/home/balay/soft/mpich-4.0.1/lib -lmpifort -Wl,-rpath -Wl,/home/balay/soft/mpich-4.0.1/lib -Wl,--enable-new-dtags -lmpi <<<<< i.e here I would use: --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-mpi-include=/home/balay/soft/mpich-4.0.1/include --with-mpi-lib="-L/home/balay/soft/mpich-4.0.1/lib -Wl,-rpath -Wl,/home/balay/soft/mpich-4.0.1/lib -lmpifort -lmpi" Satish On Mon, 13 May 2024, neil liu wrote: > Thanks, I tried the following, and it didn't work. > > ./configure --download-fblaslapack --with-mpi-lib=/usr/lib64/openmpi/lib > --with-mpi-include=/usr/include/openmpi-x86_64 > ============================================================================================= > Configuring PETSc to compile on your system > ============================================================================================= > TESTING: check from > config.libraries(config/BuildSystem/config/libraries.py:186) > ********************************************************************************************* > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > details): > --------------------------------------------------------------------------------------------- > --with-mpi-lib=['/usr/lib64/openmpi/lib'] and > --with-mpi-include=['/usr/include/openmpi-x86_64'] did not work > ********************************************************************************************* > > On Mon, May 13, 2024 at 11:32 AM Satish Balay <[email protected]> wrote: > > > > > On Mon, 13 May 2024, neil liu wrote: > > > > > Dear Petsc developers, > > > > > > I am trying to install Petsc with a preinstalled OpenMPi. > > > > > > ./configure --download-fblaslapack --with-mpi-dir=/usr/lib64/openmpi > > > > --with-mpi-dir=DIR is a bit unique [wrt other pkg-dir options]. > > > > It means: > > > > --with-cc=DIR/bin/mpicc --with-cxx=DIR/bin/mpicxx --with-fc=DIR/bin/mpif90 > > > > > --with-mpi-incdir=/usr/include/openmpi-x86_64 > > > > There is no such configure option > > > > > > > > But the final information shows, > > > MPI: > > > Version: 3 > > > Includes: -I/usr/lib64/openmpi/include (*This is not the right > > include > > > directory*) > > > > Can you send configure.log for this build [perhaps to petsc-maint] > > > > Satish > > > > > mpiexec: /usr/lib64/openmpi/bin/mpiexec > > > Implementation: openmpi > > > OMPI_VERSION: 4.1.1 > > > > > > Did I use the wrong way to include the incdir? > > > > > > Thanks, > > > Xiaodong > > > > > > > >
