[Trilinos-Users] Epetra_Import problem
Hoang Giang Bui
hgbk2008 at gmail.com
Thu Mar 21 06:03:35 MDT 2013
Hi
I constantly got error when using Epetra_Import in my problem. The error
message was this:
[kratos1:06518] *** Process received signal ***
[kratos1:06518] Signal: Segmentation fault (11)
[kratos1:06518] Signal code: Address not mapped (1)
[kratos1:06518] Failing at address: 0x109f1c8e0
[kratos1:06518] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030)
[0x7ffef400b030]
[kratos1:06518] [ 1]
/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN21Epetra_MpiDistributor15CreateFromSendsERKiPS0_bRi+0xca)
[0x7ffedd755aca]
[kratos1:06518] [ 2]
/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN21Epetra_MpiDistributor13ComputeSends_IiEEiiRPKT_RPKiRiRPS1_RPii+0xdf)
[0x7ffedd756c0f]
[kratos1:06518] [ 3]
/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN21Epetra_MpiDistributor15CreateFromRecvsERKiPS0_S2_bRiRPiS5_+0x8f)
[0x7ffedd7563ff]
[kratos1:06518] [ 4]
/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN13Epetra_Import9ConstructIiEEvRK15Epetra_BlockMapS3_+0x589)
[0x7ffedd6fb649]
[kratos1:06518] [ 5]
/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN13Epetra_ImportC1ERK15Epetra_BlockMapS2_+0x1fe)
[0x7ffedd6f8f4e]
The code segment call the error was:
int number_of_dofs = rDofSet.size();
int* index_array = new int[number_of_dofs];
//filling the array with the global ids
int counter = 0;
for(typename DofsArrayType::iterator i_dof = rDofSet.begin() ; i_dof !=
rDofSet.end() ; ++i_dof)
{
int id = i_dof->EquationId();
if( id < system_size)
{
index_array[counter] = id;
counter += 1;
}
}
int tot_update_dofs = counter;
Epetra_Map dof_update_map(-1,tot_update_dofs,index_array,0,b.Comm());
Epetra_Import importer( dof_update_map, Dx.Map() );
Initially I think I passed some un-existed elements to the TargetMap
that cause segmentation fault error. But when I check the global ids of
both SourceMap and TargetMap of local processes, everything was fine. I
also extract the SourceMap and TargetMap manually and do a test case, it
still got no error. And the program crashes in an undeterministic way,
the step it crashes change for different run. When I take the same code
and run in smaller platform, it can run smoothly without error. Does
anyone have any hint on the problem I got?
BR
Bui
More information about the Trilinos-Users
mailing list