PaStiXLUSolver: invalid conversion from ‘MPI_Comm {aka ompi_communicator_t*}’ to ‘int’

Issue #254 invalid
fred777 created an issue

I'm trying to build latest master branch of Dolfin on Archlinux (AMD64, g++ (GCC) 4.8.2, openmpi 1.6.5-1, pastix 5.2.2-1) and it gives me the following error:

/tmp/yaourt-tmp-koehler/aur-dolfin-git/src/dolfin/dolfin/la/PaStiXLUSolver.cpp: In member function std::size_t dolfin::PaStiXLUSolver::solve(dolfin::GenericVector&, const dolfin::GenericVector&)’:
/tmp/yaourt-tmp-koehler/aur-dolfin-git/src/dolfin/dolfin/la/PaStiXLUSolver.cpp:106:35: error: invalid conversion from MPI_Comm {aka ompi_communicator_t*}’ to int [-fpermissive]
   MPI_Comm mpi_comm = A->mpi_comm();
                                   ^
/tmp/yaourt-tmp-koehler/aur-dolfin-git/src/dolfin/dolfin/la/PaStiXLUSolver.cpp:279:35: error: invalid conversion from int to MPI_Comm {aka ompi_communicator_t*}’ [-fpermissive]
   x.init(mpi_comm, b.local_range());
                                   ^
In file included from /tmp/yaourt-tmp-koehler/aur-dolfin-git/src/dolfin/dolfin/la/PaStiXLUSolver.cpp:35:0:
/tmp/yaourt-tmp-koehler/aur-dolfin-git/src/dolfin/dolfin/la/GenericVector.h:119:18: error:   initializing argument 1 of virtual void dolfin::GenericVector::init(MPI_Comm, std::pair<long unsigned int, long unsigned int>) [-fpermissive]
     virtual void init(MPI_Comm comm,
                  ^
dolfin/CMakeFiles/dolfin.dir/build.make:2426: recipe for target 'dolfin/CMakeFiles/dolfin.dir/la/PaStiXLUSolver.cpp.o' failed
make[2]: *** [dolfin/CMakeFiles/dolfin.dir/la/PaStiXLUSolver.cpp.o] Error 1
CMakeFiles/Makefile2:204: recipe for target 'dolfin/CMakeFiles/dolfin.dir/all' failed
make[1]: *** [dolfin/CMakeFiles/dolfin.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

If I uninstall / disable pastix, the build will succeed. Not sure if I need it, just tried to provide all dependencies...

Comments (4)

  1. Jan Blechta

    It seems like fallback typedef int MPI_Comm; from dolfin/common/MPI.h or similar typedef from pastix.h is active within dolfin/la/PaStiXLUSolver.cpp. Try cleaning the DOLFIN tree and start over. If a failure repeats, investigate pastix.h for this typedef.

  2. Prof Garth Wells

    No activity for a week and can't be reproduced.

    Error is typical a MPI installations (e.g. MPICH and OpenMPI) being mixed up.

  3. Log in to comment