Disabling parallel features (mpi)?

Asked by Tuomas

Is it possible to somehow disable parallel (mpi) features? I would like to do some model based optimization, and use mpi in the outer genetic algorithm optimization, and restrict dolfin to use just one process.

Best regards,
Tuomas

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Tuomas
Solved:
Last query:
Last reply:
Revision history for this message
Tuomas (tuma+sec) said :
#1

Ok I found that I could compile Dolfin entirely with DOLFIN_ENABLE_MPI:BOOL=OFF, and that's my intermediate solution. But is there any way to do this runtime?

Revision history for this message
Anders Logg (logg) said :
#2

On Thu, Aug 09, 2012 at 02:26:02PM -0000, Tuomas wrote:
> Question #205316 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/205316
>
> Tuomas gave more information on the question:
> Ok I found that I could compile Dolfin entirely with
> DOLFIN_ENABLE_MPI:BOOL=OFF, and that's my intermediate solution. But is
> there any way to do this runtime?

Not currently.

I think it should be possible to add run-time control for this if
others think it's a good idea. I'm not sure it is. The idea would be
to return 1 in dolfin::MPI::num_processes().

--
Anders

Revision history for this message
Tuomas (tuma+sec) said :
#3

Thank you for answer. I must apologize that I was too quick yesterday saying that my problem was solved. It was not (my test was not comprehensive enough..). The processes somehow freeze and fenics does not proceed in its tasks.

I also tried your trick, i.e. returning 1 from dolfin::MPI::num_processes(). The result is the same.

Any idea, why it freezes? And any idea how to get it working? It freezes just the same as if MPI was enabled, because I am using MPI in the outer optimization system.

Best regards, Tuomas

Revision history for this message
Tuomas (tuma+sec) said :
#4

It seems that in addition to disabling MPI in dolfin, I need to change linear algebra backend from PETSc to something else -- uBLAS seems to work.