<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sorry I made copy-paste a mistake, the communicator is called through the following line:<div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: rgb(1, 97, 66); ">DataHandle</span><<span style="color: rgb(145, 28, 103); ">typename</span> <span style="color: rgb(1, 97, 66); ">ElementMapper</span>, std::<span style="color: rgb(1, 97, 66); ">vector</span><<span style="color: rgb(119, 88, 67); ">LocalVector</span>> > datatransfer(elementMapper , a_);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(1, 97, 66); "><span style="color: rgb(0, 0, 0); ">      </span><span style="color: rgb(0, 0, 0); ">grid_.</span><span style="color: rgb(145, 28, 103); ">template</span><span style="color: rgb(0, 0, 0); "> communicate<</span>DataHandle<span style="color: rgb(0, 0, 0); "><</span><span style="color: rgb(145, 28, 103); ">typename</span><span style="color: rgb(0, 0, 0); "> </span>ElementMapper<span style="color: rgb(0, 0, 0); ">,std::</span>vector<span style="color: rgb(0, 0, 0); "><</span><span style="color: rgb(119, 88, 67); ">LocalVector</span><span style="color: rgb(0, 0, 0); ">> > ></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: rgb(0, 0, 0); ">      (</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">datatransfer</span><span style="color: rgb(0, 0, 0); ">,Dune::</span>InteriorBorder_All_Interface<span style="color: rgb(0, 0, 0); ">,Dune::</span>ForwardCommunication<span style="color: rgb(0, 0, 0); ">);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: rgb(0, 0, 0); "><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: rgb(0, 0, 0); ">Best,</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: rgb(0, 0, 0); ">Arya</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: rgb(0, 0, 0); "><br></span></div><div><div>On Mar 15, 2012, at 10:31 AM, arya fallahi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Martin,<div><br></div><div>There is no stupid question, there MAY be stupid answers ;-).</div><div><br></div><div>So, I forgot to mention that I am using the svn version of DUNE and I have done the update just 2 days ago.</div><div><br></div><div>Concerning your question about the Vector class, let me say it exactly. Consider the communicator I sent to you. and I want to communicate by calling the following lines:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #016142"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #016142"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(1, 97, 66); "><span style="color: #911c67">typedef</span><span style="color: #000000"> </span><span style="color: #911c67">typename</span><span style="color: #000000"> Dune::</span>LeafMultipleCodimMultipleGeomTypeMapper<span style="color: #000000"><</span><span style="color: #775843">Grid</span><span style="color: #000000">,</span>P0Layout<span style="color: #000000">> </span>ElementMapper<span style="color: #000000">;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(1, 97, 66); "><span style="color: #000000"><br></span></div></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #016142">ElementMapper</span> elementMapper(grid_);</div></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #016142"><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #016142">DataHandle</span><<span style="color: #911c67">typename</span> <span style="color: #016142">ElementMapper</span>, std::<span style="color: #016142">vector</span><<span style="color: #775843">LocalVector</span>> > datatransfer(elementMapper , a_);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(1, 97, 66); "><span style="color: #000000">      </span><span style="color: #000000">grid_.</span><span style="color: #911c67">template</span><span style="color: #000000"> communicate<</span>DataHandle<span style="color: #000000"><</span><span style="color: #911c67">typename</span><span style="color: #000000"> </span>ElementMapper<span style="color: #000000">,std::</span>vector<span style="color: #000000"><</span><span style="color: #775843">LocalVector</span><span style="color: #000000">> > ></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: #000000">      (</span><span class="Apple-style-span" style="">a_</span><span style="color: #000000">,Dune::</span>InteriorBorder_All_Interface<span style="color: #000000">,Dune::</span>ForwardCommunication<span style="color: #000000">);</span></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: #000000"><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(25, 46, 201); "><span style="color: #000000"><br></span></div><div><div><div>So, as you see "Vector" in the communicator is "std::vector<LocalVector>" When I determine LocalVector through the following line:</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; "><span style="color: #911c67">typedef</span></span><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; "><span style="color: #000000"> Dune::</span></span><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; ">FieldVector</span><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; "><span style="color: #000000"><</span></span><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; ">double</span><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; "><span style="color: #000000">,6> </span></span><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; ">LocalVector</span><span class="Apple-style-span" style="color: rgb(1, 97, 66); font-family: Monaco; font-size: 11px; "><span style="color: #000000">;</span></span></div><div><br></div><div>Everything is ok, including the run on multiple processors. However, when I determine LocalVector through the following line:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: rgb(145, 28, 103); ">typedef</span><span style="color: rgb(0, 0, 0); "> Dune::</span><font class="Apple-style-span" color="#016142">DynamicVector</font><span style="color: rgb(0, 0, 0); "><</span><font class="Apple-style-span" color="#016142">double</font><span style="color: rgb(0, 0, 0); ">> </span><font class="Apple-style-span" color="#016142">LocalVector</font><span style="color: rgb(0, 0, 0); ">;</span></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(1, 97, 66); "><span style="color: #000000"><br></span></div><div>The run performs successfully only on one processor and on multiple ones I receive the following error when I let it run on 2 processors (no matter if the fixedsize is true or false):</div><div><br></div><div>[pcp042851:69307] *** Process received signal ***</div><div>[pcp042851:69307] Signal: Segmentation fault (11)</div><div>[pcp042851:69307] Signal code: Address not mapped (1)</div><div>[pcp042851:69307] Failing at address: 0x400000001</div><div>[pcp042851:69306] *** Process received signal ***</div><div>[pcp042851:69306] Signal: Segmentation fault (11)</div><div>[pcp042851:69306] Signal code: Address not mapped (1)</div><div>[pcp042851:69306] Failing at address: 0x400000001</div><div>[pcp042851:69307] [ 0] 2   libSystem.B.dylib                   0x00007fff882301ba _sigtramp + 26</div><div>[pcp042851:69307] [ 1] 3   ???                                 0x00007fff5fbfbb68 0x0 + 140734799788904</div><div>[pcp042851:69307] [ 2] 4   eltd                                0x000000010008c94c _ZNSt6vectorIdSaIdEEaSERKS1_ + 172</div><div>[pcp042851:69307] [ 3] 5   eltd                                0x00000001000d352e _ZNK4Dune16CommDataHandleIFIN7DataHandleINS_39LeafMultipleCodimMultipleGeomTypeMapperINS_14ALUSimplexGridILi3ELi3EEENS1_8P0LayoutEEESt6vectorINS_13DynamicVectorIdEESaISA_EEEESA_E6gatherIN12ALUGridSpace16ObjectStreamImplENS_6EntityILi0ELi3EKNS_9ALU3dGridILNS_20ALU3dGridElementTypeE4EP19ompi_communicator_tEENS_15ALU3dGridEntityEEEEEvRT_RKT0_ + 382</div><div>[pcp042851:69307] [ 4] 6   eltd                                0x00000001000d3f86 _ZN12ALUGridSpace21GatherScatterBaseImplIN4Dune9ALU3dGridILNS1_20ALU3dGridElementTypeE4EP19ompi_communicator_tEENS1_16CommDataHandleIFIN7DataHandleINS1_39LeafMultipleCodimMultipleGeomTypeMapperINS1_14ALUSimplexGridILi3ELi3EEENS8_8P0LayoutEEESt6vectorINS1_13DynamicVectorIdEESaISH_EEEESH_EELi0EE8sendDataERNS_16ObjectStreamImplERKNS_6Gitter8helementE + 198</div><div>[pcp042851:69307] [ 5] 7   eltd                                0x00000001002a69d0 _ZN12ALUGridSpace13GitterDunePll28sendInteriorGhostElementDataERNS_12ObjectStreamEPNS_11IteratorSTIINS_6Gitter5hfaceEEERNS_13GatherScatterE + 96</div><div>[pcp042851:69307] [ 6] 8   eltd                                0x00000001002b8190 _ZN12ALUGridSpace13GitterDunePll19doInteriorGhostCommERSt6vectorINS_12ObjectStreamESaIS2_EERNS_13GatherScatterES7_S7_S7_NS0_17CommunicationTypeE + 608</div><div>[pcp042851:69307] [ 7] 9   eltd                                0x00000001002d3b54 _ZN12ALUGridSpace13GitterDunePll15doCommunicationERNS_13GatherScatterES2_S2_S2_NS0_17CommunicationTypeE + 596</div><div>[pcp042851:69307] [ 8] 10  eltd                                0x00000001000071e5 T.96101 + 389</div><div>[pcp042851:69307] [ 9] 11  eltd                                0x000000010000da11 T.95985 + 1889</div><div>[pcp042851:69307] [10] 12  eltd                                0x000000010021fb5a _ZN7ElTdNonDispersiveIN4Dune14ALUSimplexGridILi3ELi3EEENS_16ReducedWebbBasisIS3_EENS_9DoFMapperINS1_8GridViewINS1_25DefaultLeafGridViewTraitsIKS3_LNS1_21PartitionIteratorTypeE4EEEEES5_EENS1_13DynamicMatrixIdEENS1_13DynamicVectorIdEENS_24BoundaryIntegralInDirectIS3_S5_SD_SF_SH_EEE19updateTimeStepSolveEv + 1178</div><div>[pcp042851:69307] [11] 13  eltd                                0x000000010002fefb _ZN7ElTdNonDispersiveIN4Dune14ALUSimplexGridILi3ELi3EEENS_16ReducedWebbBasisIS3_EENS_9DoFMapperINS1_8GridViewINS1_25DefaultLeafGridViewTraitsIKS3_LNS1_21PartitionIteratorTypeE4EEEEES5_EENS1_13DynamicMatrixIdEENS1_13DynamicVectorIdEENS_24BoundaryIntegralInDirectIS3_S5_SD_SF_SH_EEE14updateTimeStepEv + 27</div><div>[pcp042851:69307] [12] 14  eltd                                0x0000000100217e5b _ZN7ElTdSolveINS_4ElTdIN4Dune14ALUSimplexGridILi3ELi3EEENS_16ReducedWebbBasisIS4_EENS_9DoFMapperINS2_8GridViewINS2_25DefaultLeafGridViewTraitsIKS4_LNS2_21PartitionIteratorTypeE4EEEEES6_EENS2_13DynamicMatrixIdEENS2_13DynamicVectorIdEENS_24BoundaryIntegralInDirectIS4_S6_SE_SG_SI_EEEES4_S6_SE_SG_SI_EEiPNS_RKT0_ + 2091</div><div>[pcp042851:69307] [13] 15  eltd                                0x0000000100027a6f main + 9567</div><div>[pcp042851:69307] [14] 16  eltd                                0x0000000100005634 start + 52</div><div>[pcp042851:69307] [15] 17  ???                                 0x0000000000000002 0x0 + 2</div><div>[pcp042851:69307] *** End of error message ***</div><div>[pcp042851:69306] [ 0] 2   libSystem.B.dylib                   0x00007fff882301ba _sigtramp + 26</div><div>[pcp042851:69306] [ 1] 3   ???                                 0x00007fff5fbfbb68 0x0 + 140734799788904</div><div>[pcp042851:69306] [ 2] 4   eltd                                0x000000010008c94c _ZNSt6vectorIdSaIdEEaSERKS1_ + 172</div><div>[pcp042851:69306] [ 3] 5   eltd                                0x00000001000d352e _ZNK4Dune16CommDataHandleIFIN713DataHandleINS_39LeafMultipleCodimMultipleGeomTypeMapperINS_14ALUSimplexGridILi3ELi3EEENS1_8P0LayoutEEESt6vectorINS_13DynamicVectorIdEESaISA_EEEESA_E6gatherIN12ALUGridSpace16ObjectStreamImplENS_6EntityILi0ELi3EKNS_9ALU3dGridILNS_20ALU3dGridElementTypeE4EP19ompi_communicator_tEENS_15ALU3dGridEntityEEEEEvRT_RKT0_ + 382</div><div>[pcp042851:69306] [ 4] 6   eltd                                0x00000001000d3f86 _ZN12ALUGridSpace21GatherScatterBaseImplIN4Dune9ALU3dGridILNS1_20ALU3dGridElementTypeE4EP19ompi_communicator_tEENS1_16CommDataHandleIFIN7DataHandleINS1_39LeafMultipleCodimMultipleGeomTypeMapperINS1_14ALUSimplexGridILi3ELi3EEENS8_8P0LayoutEEESt6vectorINS1_13DynamicVectorIdEESaISH_EEEESH_EELi0EE8sendDataERNS_16ObjectStreamImplERKNS_6Gitter8helementE + 198</div><div>[pcp042851:69306] [ 5] 7   eltd                                0x00000001002a69d0 _ZN12ALUGridSpace13GitterDunePll28sendInteriorGhostElementDataERNS_12ObjectStreamEPNS_11IteratorSTIINS_6Gitter5hfaceEEERNS_13GatherScatterE + 96</div><div>[pcp042851:69306] [ 6] 8   eltd                                0x00000001002b817e _ZN12ALUGridSpace13GitterDunePll19doInteriorGhostCommERSt6vectorINS_12ObjectStreamESaIS2_EERNS_13GatherScatterES7_S7_S7_NS0_17CommunicationTypeE + 590</div><div>[pcp042851:69306] [ 7] 9   eltd                                0x00000001002d3b54 _ZN12ALUGridSpace13GitterDunePll15doCommunicationERNS_13GatherScatterES2_S2_S2_NS0_17CommunicationTypeE + 596</div><div>[pcp042851:69306] [ 8] 10  eltd                                0x00000001000071e5 T.96101 + 389</div><div>[pcp042851:69306] [ 9] 11  eltd                                0x000000010000da11 T.95985 + 1889</div><div>[pcp042851:69306] [10] 12  eltd                                0x000000010021fb5a _ZN7Hades3d17ElTdNonDispersiveIN4Dune14ALUSimplexGridILi3ELi3EEENS_16ReducedWebbBasisIS3_EENS_9DoFMapperINS1_8GridViewINS1_25DefaultLeafGridViewTraitsIKS3_LNS1_21PartitionIteratorTypeE4EEEEES5_EENS1_13DynamicMatrixIdEENS1_13DynamicVectorIdEENS_24BoundaryIntegralInDirectIS3_S5_SD_SF_SH_EEE19updateTimeStepSolveEv + 1178</div><div>[pcp042851:69306] [11] 13  eltd                                0x000000010002fefb _ZN7ElTdNonDispersiveIN4Dune14ALUSimplexGridILi3ELi3EEENS_16ReducedWebbBasisIS3_EENS_9DoFMapperINS1_8GridViewINS1_25DefaultLeafGridViewTraitsIKS3_LNS1_21PartitionIteratorTypeE4EEEEES5_EENS1_13DynamicMatrixIdEENS1_13DynamicVectorIdEENS_24BoundaryIntegralInDirectIS3_S5_SD_SF_SH_EEE14updateTimeStepEv + 27</div><div>[pcp042851:69306] [12] 14  eltd                                0x0000000100217e5b _ZN7ElTdSolveINS_4ElTdIN4Dune14ALUSimplexGridILi3ELi3EEENS_16ReducedWebbBasisIS4_EENS_9DoFMapperINS2_8GridViewINS2_25DefaultLeafGridViewTraitsIKS4_LNS2_21PartitionIteratorTypeE4EEEEES6_EENS2_13DynamicMatrixIdEENS2_13DynamicVectorIdEENS_24BoundaryIntegralInDirectIS4_S6_SE_SG_SI_EEEES4_S6_SE_SG_SI_EEiPNS_RKT0_ + 2091</div><div>[pcp042851:69306] [13] 15  eltd                                0x0000000100027a6f main + 9567</div><div>[pcp042851:69306] [14] 16  eltd                                0x0000000100005634 start + 52</div><div>[pcp042851:69306] [15] 17  ???                                 0x0000000000000002 0x0 + 2</div><div>[pcp042851:69306] *** End of error message ***</div><div><br></div><div><br></div><div>I hope it is now more clear, but if it's not. Let me know, and I will prepare a simple example program and file the bug report.</div><div><br></div><div>Thank you very much for your assistance and support,</div><div><br></div><div>Best regards,</div><div>Arya</div><div> </div><div>On Mar 15, 2012, at 9:06 AM, Martin Nolte wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Call me stupid, but I still don't know what Vector::value_type really is. And this information might or might not have a huge impact.<br><br>Best,<br><br>Martin<br><br>Martin<br><br>On 03/15/2012 12:48 AM, Fallahi Arya wrote:<br><blockquote type="cite">Hi Martin, Andreas and Christian,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">First thanks a lot for your quick replies and your guesses. Actually, I thought I was clear enough and have written the whole required things, but it seems I was wrong. Sorry for the disturbance. I thought maybe you already had faced with such an issue.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">As I mentioned in my first email, I receive error when the template "Vector" is set to "DynamicVector" and it runs ok when it is set to "FieldVector". Furthermore, I am using ALUGrid.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The code compiles correctly and completely, so the error does not happen during the compilation. The error was returned by C++ during the runtime, exactly when the communication is to be fulfilled. I myself could actually understand nothing from the message, but if it may be helpful I will send it tomorrow morning, because I should run the code again to see the error.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The reason I want to use "DynamicVector" is that the dimensions of the vector is found by a function at the very beginning of the code. So, although it never changes in the code, it can not be of type "const". That's the reason I am trying to use "DynamicVector" instead of "FieldVector" as the template parameter (referenced by "Vector"). Perhaps, the suggestion that the fixedsize is not true is the sort of the problem. I will check it again and let you know tomorrow, when I send you the error message.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks again for your support,<br></blockquote><blockquote type="cite">Arya<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-----Original Message-----<br></blockquote><blockquote type="cite">From: <a href="mailto:dune-bounces+arya.fallahi=psi.ch@dune-project.org">dune-bounces+arya.fallahi=psi.ch@dune-project.org</a> on behalf of Martin Nolte<br></blockquote><blockquote type="cite">Sent: Wed 3/14/2012 8:58 PM<br></blockquote><blockquote type="cite">To: <a href="mailto:dune@dune-project.org">dune@dune-project.org</a><br></blockquote><blockquote type="cite">Subject: Re: [Dune] communication of dynamic vectors<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi Arya,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Sorry, but any answer to your request would be pure guess work. What kind of<br></blockquote><blockquote type="cite">error message are you referring to (compiler error, runtime exception,<br></blockquote><blockquote type="cite">assertion, undefined behavior, ...). Moreover, the code is absolutely useless,<br></blockquote><blockquote type="cite">because you are not stating the template arguments. For example: What is Vector?<br></blockquote><blockquote type="cite">Not to mention: What grid are you using?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Maybe you could you even provide a simple example program and file a correct bug<br></blockquote><blockquote type="cite">report? This would potentially allow us to reproduce the error and give you a<br></blockquote><blockquote type="cite">helpful answer.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please note: Even writing such a reply takes a lot of time and DUNE' development<br></blockquote><blockquote type="cite">team is rather small, its support team is even non-existent. If you want useful<br></blockquote><blockquote type="cite">answers (unlike the one I just wrote), you might want to consider writing<br></blockquote><blockquote type="cite">understandable or reproducible questions.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Best,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Martin<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 03/14/2012 07:27 PM, arya fallahi wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">Dear Dune team,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Recently, I have had a problem with the communication of variables with type<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">DynamicVector. I have the following communicator inside a code, which is written<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">in accordance with the Dune guide notes:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">template<classElementMapper, classVector><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">classDataHandle: publicDune::CommDataHandleIF<DataHandle<ElementMapper,Vector>,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">typenameVector::value_type><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">public:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">typedeftypenameVector::value_typeDataType;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">bool contains (int dim, int codim) const { return (codim==0); }<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">bool fixedsize (int dim, int codim) const {returntrue; }<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">template<classEntityType>  size_t size (EntityType&  e) const { return(1); }<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">template<classMessageBuffer, classEntityType><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">void gather (MessageBuffer&  buff, const EntityType&  e) const<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">unsigned int globalElementIndex=elementMapper_.map(e);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">buff.write(v_[globalElementIndex]);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">template<classMessageBuffer, classEntityType><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">void scatter (MessageBuffer&  buff, const EntityType&  e, size_t n)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">DataType x;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">buff.read(x);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">unsigned int globalElementIndex=elementMapper_.map(e);<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">v_[globalElementIndex] = x;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">DataHandle (const ElementMapper&  elementMapper, Vector&  v):<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">elementMapper_(elementMapper),v_(v){}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">private:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">constElementMapper&  elementMapper_;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Vector&  v_;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">};<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">This works well when variables with type FieldVector<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(Dune::FieldVector<double,6>) are going to be communicated. However, when I want<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">to communicate DynamicVector (Dune::DynamicVector<double>) data, the code stops<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">and I receive an error message. I believe the problem lies in the communication<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">part, since the code with DynamicVector works well on 1 processor. Do you have<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">any idea why such a thing happens? Have you previously faced with this problem?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Best regards and thanks,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Arya Fallahi,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Dr. sc. techn. ETH,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Computational Accelerator Scientist<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Paul Scherrer Institute (PSI),<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">CH-5232 Villigen, Switzerland,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">arya.fallahi@psi.ch<<a href="mailto:arya.fallahi@psi.ch">mailto:arya.fallahi@psi.ch</a>>,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">+41(0)56 310 50 17<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Dune mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:Dune@dune-project.org">Dune@dune-project.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br>-- <br>Dr. Martin Nolte <<a href="mailto:nolte@mathematik.uni-freiburg.de">nolte@mathematik.uni-freiburg.de</a>><br><br>Universität Freiburg                                   phone: +49-761-203-5630<br>Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632<br>Hermann-Herder-Straße 10<br>79104 Freiburg, Germany<br></div></blockquote></div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Arya Fallahi, <div>Dr. sc. techn.  ETH, </div><div>Computational Accelerator Scientist </div><div>Paul Scherrer Institute (PSI), </div><div>CH-5232 Villigen, Switzerland, </div><div><a href="mailto:arya.fallahi@psi.ch">arya.fallahi@psi.ch</a>, </div><div>+41(0)56 310 50 17<br><br></div></div>
</div>
<br></div></div>_______________________________________________<br>Dune mailing list<br><a href="mailto:Dune@dune-project.org">Dune@dune-project.org</a><br>http://lists.dune-project.org/mailman/listinfo/dune<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Arya Fallahi, <div>Dr. sc. techn.  ETH, </div><div>Computational Accelerator Scientist </div><div>Paul Scherrer Institute (PSI), </div><div>CH-5232 Villigen, Switzerland, </div><div><a href="mailto:arya.fallahi@psi.ch">arya.fallahi@psi.ch</a>, </div><div>+41(0)56 310 50 17<br><br></div></div></span></span>
</div>
<br></div></body></html>