[Trilinos-Users] [EXTERNAL] Epetra_Import problem

Hoang Giang Bui hgbk2008 at gmail.com
Thu Mar 21 14:36:54 MDT 2013


Hi

After tracing back for a while, I detect the crash happen at function
ComputeRecvs_ of Epetra_MpiDistributor.cpp at this line:

#if defined(REDUCE_SCATTER_BUG)
// the bug is found in mpich on linux platforms
  MPI_Reduce(msg_count, counts, nprocs, MPI_INT, MPI_SUM, 0, comm_);
  MPI_Scatter(counts, 1, MPI_INT, &nrecvs_, 1, MPI_INT, 0, comm_);
#else
  MPI_Reduce_scatter( msg_count, &nrecvs_, counts, MPI_INT, MPI_SUM, comm_
);
#endif

However, none of the two options work for my case. Is there thorough
solution for this already? Meanwhile. I will do the memory check using
valgrind but it will take for a while.

BR
Bui





On Thu, Mar 21, 2013 at 6:16 PM, Heroux, Michael A <maherou at sandia.gov>wrote:

> This looks like a memory error.  Please confirm that you are properly
> allocating all arrays and, if you don't see a problem, run your code using
> valgrind or some other memory checking tool.  If you compile your code
> using the options "-O0 -g" you will get better output information from
> valgrind.
>
> Mike
>
> On 3/21/13 7:03 AM, "Hoang Giang Bui" <hgbk2008 at gmail.com> wrote:
>
> >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_MpiDistributor15
> >CreateFromSendsERKiPS0_bRi+0xca)
> >[0x7ffedd755aca]
> >[kratos1:06518] [ 2]
> >/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN21Epetra_MpiDistributor13
> >ComputeSends_IiEEiiRPKT_RPKiRiRPS1_RPii+0xdf)
> >[0x7ffedd756c0f]
> >[kratos1:06518] [ 3]
> >/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN21Epetra_MpiDistributor15
> >CreateFromRecvsERKiPS0_S2_bRiRPiS5_+0x8f)
> >[0x7ffedd7563ff]
> >[kratos1:06518] [ 4]
> >/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN13Epetra_Import9Construct
> >IiEEvRK15Epetra_BlockMapS3_+0x589)
> >[0x7ffedd6fb649]
> >[kratos1:06518] [ 5]
> >/opt/trilinos-11.0.3-ompi1.6/lib/libepetra.so(_ZN13Epetra_ImportC1ERK15Epe
> >tra_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
> >
> >
> >
> >_______________________________________________
> >Trilinos-Users mailing list
> >Trilinos-Users at software.sandia.gov
> >http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>
>


-- 
With Best Regards !
Giang Bui
To learn and to excel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130321/7c691076/attachment.html 


More information about the Trilinos-Users mailing list