[Kratos] running trilinos application with 1 process

Hoang Giang Bui hgbk2008 en gmail.com
Jue Dic 20 16:54:05 CET 2012


Hi

I found out that the trilinos application using metis partitioning fail
when running with 1 process. The reason is that after these lines: (in
metis_partitioning_process_quadratic.h)

if(number_of_processes < 2) // There is no need to partition it and just
reading the input
 {
            mrIO.ReadModelPart(mrModelPart);
            return;
 }

The mrModelPart.GetCommunicator().LocalMesh() will not be added with
anything, but this will be used by trilinos builder_and_solver later on.
The result is an empty mesh in the communicator

To fix this, I comment these lines above and modify CallingMetis(...):

if(mNumberOfPartitions > 1 )
{
....existing codes

} else
{
        for(int i=0; i<NumberOfNodes; i++)
            NPart[i] = 0;
        for(int i=0; i<NumberOfElements; i++)
            EPart[i] = 0;
}

This modification works, however I think there should be better approach to
fix.

BR
Giang Bui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/kratos/attachments/20121220/defa5ab2/attachment.htm 


Más información sobre la lista de distribución Kratos