[petsc-users] Error loading data coming from a .hdf5 file into a DMSwarm

2024-03-31 Thread MIGUEL MOLINOS PEREZ
Dear all,

I am writing a function which store datasets (Vectors) coming from a DMSwarm 
structure into a hdf5 file. This step is done nicely

write_function(){
PetscViewerHDF5Open(…)
PetscViewerHDF5PushTimestepping(…)
DMSwarmCreateGlobalVectorFromField(…)
VecLoad(…)
DMSwarmDestroyGlobalVectorFromField(…)
}

The resulting hdf5 file looks good after an inspection using python’s library 
h5py.

However, I am finding difficulties when I try to use this .hdf5 file as a fresh 
start for my application. The target field is not properly updated when I try 
to load the stored data (it keeps the default one).

read_function(){
…
PetscViewerHDF5Open(…)
PetscViewerHDF5PushTimestepping(…)
DMSwarmCreateGlobalVectorFromField(…)
VecLoad(… )
DMSwarmDestroyGlobalVectorFromField(…)
...
}

The puzzling part is: if I print the “updated” vector inside of read_function() 
using VecView after VecLoad, the vector seem to hold the updated values. 
However, If I print the field in the main function after the call to 
read_function(), the field remains the same it was before calling to 
read_function() and I do not get any erro message.

It is there something wrong with the logic of my programing? Maybe I am missing 
something.

Thank you in advance.

Best regards,
Miguel

Miguel Molinos
Investigador postdoctoral
Juan de la Cierva
Dpto. Mecánica de Medios Continuos y Teoría de Estructuras - ETSI
Universidad de Sevilla
Camino de los descubrimientos, s/n
41092 Sevilla


[us_logo.jpg]





https://urldefense.us/v3/__http://www.us.es__;!!G_uCfscf7eWS!egnWYkerVjlSmbuh1nUjljGJ4vkEwKUvO9ygc9e5BJ72KxK-T4qbWIxTBbg-BeyxDvqN5Rr5EvaWMAIXee5w9w$
 
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es UD. el destinatario del mensaje, le 
ruego lo destruya sin hacer copia digital o física, comunicando al emisor por 
esta misma vía la recepción del presente mensaje. Gracias



Re: [petsc-users] ex19: Segmentation Violation when run with MUMPS on MacOS (arm64)

2024-03-31 Thread Zongze Yang




 > On 31 Mar 2024, at 02: 59, Satish Balay via petsc-users  wrote: > > I'll just note - I can reproduce with: > > petsc@ npro petsc. x % ./configure --download-mpich --download-mumps --download-scalapack




ZjQcmQRYFpfptBannerStart




  

  
	This Message Is From an External Sender
  
  
This message came from outside your organization.
  



 
  


ZjQcmQRYFpfptBannerEnd






> On 31 Mar 2024, at 02:59, Satish Balay via petsc-users  wrote:
> 
> I'll just note - I can reproduce with:
> 
> petsc@npro petsc.x % ./configure --download-mpich --download-mumps --download-scalapack && make && make check 
> 
> And then - the following work fine for me:
> 
> petsc@npro petsc.x % ./configure --download-mpich --download-mumps --download-scalapack COPTFLAGS=-O0 FOPTFLAGS=-O0 LDFLAGS=-Wl,-ld_classic && make && make check

Hello, I've encountered the same issue.

Even after building PETSc with the aforementioned configuration, the error persists.

Apart from the segmentation fault, occasionally the following error arises:

```
> ===
> =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
> =   PID 47531 RUNNING AT yzzs-mac.local
> =   EXIT CODE: 6
> =   CLEANING UP REMAINING PROCESSES
> =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
> ===
> YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Terminated: 15 (signal 15)
> This typically refers to a problem with your application.
> Please see the FAQ page for debugging suggestions
/Users/zzyang/workspace/repos/petsc/src/snes/tutorials
Possible problem with ex19 running with MUMPS, diffs above
```

Is there a possibility that this is related to the Fortran bindings of MPICH?

Best wishes,
Zongze


> 
>CLINKER arch-darwin-c-debug/lib/libpetsc.3.021.0.dylib
>   DSYMUTIL arch-darwin-c-debug/lib/libpetsc.3.021.0.dylib
> =
> Now to check if the libraries are working do:
> make PETSC_DIR=/Users/petsc/petsc.x PETSC_ARCH=arch-darwin-c-debug check
> =
> Running PETSc check examples to verify correct installation
> Using PETSC_DIR=/Users/petsc/petsc.x and PETSC_ARCH=arch-darwin-c-debug
> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
> C/C++ example src/snes/tutorials/ex19 run successfully with MUMPS
> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
> Completed PETSc check examples
> petsc@npro petsc.x %
> 
> petsc@npro petsc.z % ./configure --download-openmpi=https://urldefense.us/v3/__https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.3rc1.tar.bz2__;!!G_uCfscf7eWS!adsQx6TTtuIrMPz2ZorSv0iNPff5Fm5aFUi4i9n_E7v3GfAc8XCDtrlfVFyfPEgDFe4lKLL1XzkJ3c_97YoeukE$ --download-mumps --download-scalapack && make && make check
> 
>   DSYMUTIL arch-darwin-c-debug/lib/libpetsc.3.021.0.dylib
> =
> Now to check if the libraries are working do:
> make PETSC_DIR=/Users/petsc/petsc.z PETSC_ARCH=arch-darwin-c-debug check
> =
> Running PETSc check examples to verify correct installation
> Using PETSC_DIR=/Users/petsc/petsc.z and PETSC_ARCH=arch-darwin-c-debug
> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
> C/C++ example src/snes/tutorials/ex19 run successfully with MUMPS
> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
> Completed PETSc check examples
> petsc@npro petsc.z % 
> 
> [however parmmg and pastix are failing to build with openmpi]
> 
> And I thought this worked for me yesterday - but I see failures now.
> 
> ./configure --download-bison --download-chaco --download-ctetgen --download-eigen --download-fftw --download-hdf5 --download-hpddm --download-hwloc --download-hwloc-configure-arguments=--disable-opencl --download-hypre --download-libpng --download-metis --download-mmg --download-mpich --download-mpich-configure-arguments=--disable-opencl --download-mumps --download-netcdf --download-openblas --download-openblas-make-options="'USE_THREAD=0 USE_LOCKING=1 USE_OPENMP=0'" --download-parmmg --download-pastix --download-pnetcdf --download-pragmatic --download-ptscotch --download-scalapack --download-slepc --download-suitesparse --download-superlu_dist --download-tetgen --download-triangle --with-c2html=0 --with-debugging=1 --with-fortran-bindings=0 --with-shared-libraries=1 --with-x=0 --with-zlib --COPTFLAGS=-O0 --FOPTFLAGS=-O0 --LDFLAGS=-Wl,-ld_classic --with-clean
> 
> Satish
> 
> On Sat, 30 Mar 2024, Barry Smith wrote:
> 
>> 
>>  Can you check the value of IRHSCOMP in the debugger? Using gdb as the debugger may work better for this. 
>> 
>>  Barry
>> 
>> 
>>> On Mar