Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Segmentation fault with parallel BGL
From: Quaglino Alessio (alessio.quaglino_at_[hidden])
Date: 2015-11-02 10:09:22


I have compiled with debug symbols and I got the following launching with mpirun -np 1

[alessios-mbp:95195] *** Process received signal ***
[alessios-mbp:95195] Signal: Abort trap: 6 (6)
[alessios-mbp:95195] Signal code: (0)
[alessios-mbp:95195] [ 0] 0 libsystem_platform.dylib 0x00007fff8d8baf1a _sigtramp + 26
[alessios-mbp:95195] [ 1] 0 ??? 0x00007fff5cfe3d20 0x0 + 140734753553696
[alessios-mbp:95195] [ 2] 0 libsystem_c.dylib 0x00007fff89e929b3 abort + 129
[alessios-mbp:95195] [ 3] 0 libpetsc.3.6.dylib 0x0000000103090c66 PetscAbortErrorHandler + 486
[alessios-mbp:95195] [ 4] 0 libpetsc.3.6.dylib 0x00000001030897b7 PetscError + 1223
[alessios-mbp:95195] [ 5] 0 libpetsc.3.6.dylib 0x0000000103092d41 PetscSignalHandlerDefault + 2305
[alessios-mbp:95195] [ 6] 0 libpetsc.3.6.dylib 0x00000001030937f3 PetscSignalHandler_Private + 595
[alessios-mbp:95195] [ 7] 0 libsystem_platform.dylib 0x00007fff8d8baf1a _sigtramp + 26
[alessios-mbp:95195] [ 8] 0 ??? 0x00007feeea4c6e98 0x0 + 140664109821592
[alessios-mbp:95195] [ 9] 0 interiorpoint_graphonly 0x0000000102c83c84 _ZNK5boost6detail8parallel15edge_descriptorINS0_14edge_desc_implINS_12directed_tagEmEEE13out_generatorINS_14adjacency_listINS_4vecSENS_12distributedSINS_5graph11distributed17mpi_process_groupES9_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESH_SH_NS_5listSEEEEclES5_ + 84
[alessios-mbp:95195] [10] 0 interiorpoint_graphonly 0x0000000102c83c17 _ZNK5boost9iterators18transform_iteratorINS_6detail8parallel15edge_descriptorINS2_14edge_desc_implINS_12directed_tagEmEEE13out_generatorINS_14adjacency_listINS_4vecSENS_12distributedSINS_5graph11distributed17mpi_process_groupESB_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESJ_SJ_NS_5listSEEEEENS2_13out_edge_iterINSt3__111__wrap_iterIPNS2_20stored_edge_propertyImNS_8propertyINS_20edge_locally_owned_tEbNSR_INS_26edge_target_processor_id_tEsSJ_EEEEEEEEmS7_lEENS0_11use_defaultES10_E11dereferenceEv + 103
[alessios-mbp:95195] [11] 0 interiorpoint_graphonly 0x0000000102c83b7c _ZN5boost9iterators20iterator_core_access11dereferenceINS0_18transform_iteratorINS_6detail8parallel15edge_descriptorINS4_14edge_desc_implINS_12directed_tagEmEEE13out_generatorINS_14adjacency_listINS_4vecSENS_12distributedSINS_5graph11distributed17mpi_process_groupESD_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESL_SL_NS_5listSEEEEENS4_13out_edge_iterINSt3__111__wrap_iterIPNS4_20stored_edge_propertyImNS_8propertyINS_20edge_locally_owned_tEbNST_INS_26edge_target_processor_id_tEsSL_EEEEEEEEmS9_lEENS0_11use_defaultES12_EEEENT_9referenceERKS14_ + 28
[alessios-mbp:95195] [12] 0 interiorpoint_graphonly 0x0000000102c83b4f _ZNK5boost9iterators6detail20iterator_facade_baseINS0_18transform_iteratorINS_6detail8parallel15edge_descriptorINS4_14edge_desc_implINS_12directed_tagEmEEE13out_generatorINS_14adjacency_listINS_4vecSENS_12distributedSINS_5graph11distributed17mpi_process_groupESD_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESL_SL_NS_5listSEEEEENS4_13out_edge_iterINSt3__111__wrap_iterIPNS4_20stored_edge_propertyImNS_8propertyINS_20edge_locally_owned_tEbNST_INS_26edge_target_processor_id_tEsSL_EEEEEEEEmS9_lEENS0_11use_defaultES12_EESA_NS1_32iterator_category_with_traversalINSQ_18input_iterator_tagENS0_27random_access_traversal_tagEEESA_lLb0ELb0EEdeEv + 47
[alessios-mbp:95195] [13] 0 interiorpoint_graphonly 0x0000000102c83af5 _ZNK5boost18adjacency_iteratorINS_14adjacency_listINS_4vecSENS_12distributedSINS_5graph11distributed17mpi_process_groupES2_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESA_SA_NS_5listSEEENS_6detail8parallel17global_descriptorImEENS_9iterators18transform_iteratorINSE_15edge_descriptorINSD_14edge_desc_implINS_12directed_tagEmEEE13out_generatorISC_EENSD_13out_edge_iterINSt3__111__wrap_iterIPNSD_20stored_edge_propertyImNS_8propertyINS_20edge_locally_owned_tEbNSU_INS_26edge_target_processor_id_tEsSA_EEEEEEEEmSM_lEENSH_11use_defaultES13_EElE11dereferenceEv + 37
[alessios-mbp:95195] [14] 0 interiorpoint_graphonly 0x0000000102c83a91 _ZN5boost9iterators20iterator_core_access11dereferenceINS_18adjacency_iteratorINS_14adjacency_listINS_4vecSENS_12distributedSINS_5graph11distributed17mpi_process_groupES5_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESD_SD_NS_5listSEEENS_6detail8parallel17global_descriptorImEENS0_18transform_iteratorINSH_15edge_descriptorINSG_14edge_desc_implINS_12directed_tagEmEEE13out_generatorISF_EENSG_13out_edge_iterINSt3__111__wrap_iterIPNSG_20stored_edge_propertyImNS_8propertyINS_20edge_locally_owned_tEbNSW_INS_26edge_target_processor_id_tEsSD_EEEEEEEEmSO_lEENS0_11use_defaultES15_EElEEEENT_9referenceERKS18_ + 17
[alessios-mbp:95195] [15] 0 interiorpoint_graphonly 0x0000000102c69249 _ZNK5boost9iterators6detail20iterator_facade_baseINS_18adjacency_iteratorINS_14adjacency_listINS_4vecSENS_12distributedSINS_5graph11distributed17mpi_process_groupES5_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESD_SD_NS_5listSEEENS_6detail8parallel17global_descriptorImEENS0_18transform_iteratorINSH_15edge_descriptorINSG_14edge_desc_implINS_12directed_tagEmEEE13out_generatorISF_EENSG_13out_edge_iterINSt3__111__wrap_iterIPNSG_20stored_edge_propertyImNS_8propertyINS_20edge_locally_owned_tEbNSW_INS_26edge_target_processor_id_tEsSD_EEEEEEEEmSO_lEENS0_11use_defaultES15_EElEESJ_NS1_32iterator_category_with_traversalINST_18input_iterator_tagENS0_27random_access_traversal_tagEEESJ_lLb0ELb0EEdeEv + 25
[alessios-mbp:95195] [16] 0 interiorpoint_graphonly 0x0000000102c1c61e _ZN5boost5graph11distributed23connected_components_psINS_14adjacency_listINS_4vecSENS_12distributedSINS1_17mpi_process_groupES4_NS_8defaultSEEENS_11undirectedSENS_11no_propertyESA_SA_NS_5listSEEENS_21iterator_property_mapINSt3__111__wrap_iterIPiEENS_18local_property_mapIS6_NS_6detail8parallel30global_descriptor_property_mapImEENS_26vec_adj_list_vertex_id_mapISA_mEEEEiRiEEEENS_15property_traitsIT0_E10value_typeERKT_ST_ + 2734
[alessios-mbp:95195] [17] 0 interiorpoint_graphonly 0x0000000102c1a8a7 main + 423
[alessios-mbp:95195] [18] 0 libdyld.dylib 0x00007fff94d385c9 start + 1
[alessios-mbp:95195] [19] 0 ??? 0x0000000000000002 0x0 + 2
[alessios-mbp:95195] *** End of error message ***

As for your suggestions:

Single MPI process - I get the crash anyway (as said above)
Adding edges until there is only a single connected component solves the issue, but of course it also makes the computation trivial.
Dummy_property_map - I am not sure how to use this.

Thanks,
Alessio


On 02 Nov 2015, at 15:21, Marcin Zalewski <marcin.zalewski_at_[hidden]<mailto:marcin.zalewski_at_[hidden]>> wrote:

Is it possible to get a stack trace? Also, have you tried any of the other things I suggested?

On Mon, Nov 2, 2015 at 8:48 AM Quaglino Alessio <alessio.quaglino_at_[hidden]<mailto:alessio.quaglino_at_[hidden]>> wrote:
Thanks for the reply. I am getting a seg fault even with nV=1..

Alessio



On 02 Nov 2015, at 13:50, Marcin Zalewski <marcin.zalewski_at_[hidden]<mailto:marcin.zalewski_at_[hidden]>> wrote:


On Nov 2, 2015 6:55 AM, "Quaglino Alessio" <alessio.quaglino_at_[hidden]<mailto:alessio.quaglino_at_[hidden]>> wrote:
>
> Is anyone using the parallel BGL? The following code gives me a segmentation fault for the parallel case but I can’t figure out what can be wrong. You can replace PetscInitialize and PetscFinalize with the respective standard MPI calls.

Could you try with fewer vertices (just a few) and see if this still happens? If it does, can you try to add some edges and see if it makes a difference? A couple more things to try is to use a single MPI process and dummy_property_map. See if any of these steps make a difference.

> Regards,
> Alessio Quaglino
>
>
> #define PARALLEL_GRAPH
>
> using namespace boost;
> using boost::graph::distributed::mpi_process_group;
>
> typedef adjacency_list <vecS, vecS, undirectedS> SerialGraph;
> typedef adjacency_list<vecS, distributedS<mpi_process_group, vecS>, undirectedS> Graph;
> typedef iterator_property_map<std::vector<int>::iterator, property_map<Graph, vertex_index_t>::type> LocalMap;
>
> static char help[] = "";
>
> int main(int argc,char **args)
> {
> PetscErrorCode ierr;
> PetscInitialize(&argc,&args,(char*)0,help);
>
>
>
> int nV = 40000;
> int num = 0;
>
>
>
> #ifdef PARALLEL_GRAPH
> Graph G(nV+1);
> synchronize(G);
> std::vector<int> localComponent(nV+1);
> LocalMap components(localComponent.begin(),get(vertex_index, G));
> num = connected_components_ps(G, components);
> #else
> SerialGraph G(nV+1);
> std::vector<int> globalComponent(nV+1);
> num = connected_components(G, &globalComponent[0]);
> #endif
>
>
>
> std::cout << num << " connected components" << std::endl;
>
>
>
> ierr = PetscFinalize();
> return 0;
> }
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]<mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]<mailto:Boost-users_at_[hidden]>
http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]<mailto:Boost-users_at_[hidden]>
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]<mailto:Boost-users_at_[hidden]>
http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net