[Trilinos-Users] HDF5 - segmentation fault

Antonio Cervone ant.cervone at gmail.com
Sat Dec 22 02:46:53 MST 2012


hi Andrea,
i tested your example and it is working for me, so the problem is in
the configuration/installation of your trilinos and hdf5 libraries.
you can try turning on epetraext examples and tests to see if they are working.
i used trilinos 10.12.2 and hdf5 1.8.9.
ciao

antonio

On Sat, Dec 22, 2012 at 10:06 AM, Villa Andrea (RSE)
<Andrea.Villa at rse-web.it> wrote:
> I'm experiencing a segmentation fault running the following code with 4
> processors.
> I attach the driver below. The problem seems to be at line:
> hdf5.Write("nodes",nodes_epetra);
> Am I missing something?
> Thankyou very much for any suggestion!
>
>
>
> #include <cmath>
> #include <iostream>
>
> #include "Epetra_MpiComm.h"
> #include "Epetra_Map.h"
> #include "EpetraExt_DistArray.h"
> #include "EpetraExt_HDF5.h"
>
>
> int main(int argc, char *argv[])
> {
>   MPI_Init(&argc,&argv);
>   Epetra_MpiComm epetraComm(MPI_COMM_WORLD);
>   int numMyElements;
>   int MyGlobalElements[4];
>
>   if(epetraComm.MyPID() == 0)
>   {
>      numMyElements = 4;
>      MyGlobalElements[0] = 0;
>      MyGlobalElements[1] = 1;
>      MyGlobalElements[2] = 2;
>      MyGlobalElements[3] = 3;
>   }
>
>   if(epetraComm.MyPID() == 1)
>   {
>      numMyElements = 4;
>      MyGlobalElements[0] = 4;
>      MyGlobalElements[1] = 5;
>      MyGlobalElements[2] = 6;
>      MyGlobalElements[3] = 7;
>   }
>
>   if(epetraComm.MyPID() == 2)
>   {
>      numMyElements = 4;
>      MyGlobalElements[0] = 8;
>      MyGlobalElements[1] = 9;
>      MyGlobalElements[2] = 10;
>      MyGlobalElements[3] = 11;
>   }
>
>   if(epetraComm.MyPID() == 3)
>   {
>      numMyElements = 2;
>      MyGlobalElements[0] = 12;
>      MyGlobalElements[1] = 13;
>   }
>
>   Epetra_Map mappa(-1,numMyElements,MyGlobalElements,0,epetraComm);
>   EpetraExt::DistArray<double> nodes_epetra(mappa,3);
>
>   EpetraExt::HDF5 hdf5(epetraComm);
>   hdf5.Create("err.h5");
>   hdf5.Write("nodes",nodes_epetra);
>   hdf5.Close();
>
>   MPI_Finalize();
> }
>
>
> RSE SpA ha adottato il Modello Organizzativo ai sensi del D.Lgs.231/2001, in
> forza del quale l'assunzione di obbligazioni da parte della Società avviene
> con firma di un procuratore, munito di idonei poteri. RSE adopts a
> Compliance Programme under the Italian Law (D.Lgs.231/2001). According to
> this RSE Compliance Programme, any commitment of RSE is taken by the
> signature of one Representative granted by a proper Power of Attorney.
>
> Le informazioni contenute in questo messaggio di posta elettronica sono
> riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o
> forma. Qualora Lei non fosse la persona destinataria del presente messaggio,
> La invitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente
> comunicazione al mittente. The information included in this e-mail and any
> attachments are confidential and may also be privileged. If you are not the
> correct recipient, you are kindly requested to notify the sender
> immediately, to cancel it and not to disclose the contents to any other
> person.
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>




More information about the Trilinos-Users mailing list