Basic doubt about specifying compiler and MPI

33 views
Skip to first unread message

Praveen C

unread,
Aug 5, 2025, 8:29:35 AMAug 5
to Deal. II Googlegroup
Dear all

The documentation says we set compilers like

cmake -DCMAKE_C_COMPILER=my_c_compiler -DCMAKE_CXX_COMPILER=my_cxx_compiler -DCMAKE_Fortran_COMPILER=my_fortran_compiler <…>

Where do I specify which MPI to use ?

Should I specify mpicc, mpic++, mpif90 as compilers ?

I do not see how deal.II cmake picks the location of MPI ?

Thanks
praveen

blais...@gmail.com

unread,
Aug 5, 2025, 6:04:11 PMAug 5
to deal.II User Group
If you enable MPI (using -DDEAL_II_WITH_MPI) then the cmake output will specify which version of the MPI library you are using.
If you wish to specify in particular a version, you can pass it using additional argument. For example -DMPI_CXX_COMPILER=...

If you wish to see all possible variables you can specify, an easy way is to use ccmake to see all configuration options. You can toggle advanced configuration options to see all variables available to you.
Hope that helps
BB

Praveen C

unread,
Aug 8, 2025, 10:22:06 AMAug 8
to Deal. II Googlegroup
Thanks, is it ok to use

-DCMAKE_CXX_COMPILER=/path/to/mpic++
-DMPI_CXX_COMPILER=/path/to/mpic++

regards
praveen
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/dealii/27c1c4eb-797b-4d43-a298-a837e1840dd4n%40googlegroups.com.


Matthias Maier

unread,
Aug 8, 2025, 11:56:00 AMAug 8
to dea...@googlegroups.com
It's generally best to make sure that mpicc, mpic++, mpirun are in PATH
and then enable MPI via -DWITH_MPI=ON.

MM
Reply all
Reply to author
Forward
0 new messages