Adding PetscFunctionBeginUser indeed seems to fix this and moves the error to the next function without PetscFunctionBeginUser...

Thanks!

Matteo

Il 17/04/23 18:27, Pierre Jolivet ha scritto:

        
Non si ricevono spesso messaggi di posta elettronica da [email protected]. Informazioni sul perché è importante <https://aka.ms/LearnAboutSenderIdentification>
        



On 17 Apr 2023, at 6:22 PM, Matteo Semplice <[email protected]> wrote:

Dear PETSc users,

    I am investigating a strange error occurring when using my code on a cluster; I managed to reproduce it on my machine as well and it's weird:

- on petsc3.19, optimized build, the code runs fine, serial and parallel

- on petsc 3,19, --with=debugging=1, the code crashes without giving me a meaningful message. The output is

$ ../levelSet -options_file ../test.opts
Converting from ../pointClouds/2d/ptCloud_cerchio.txt in binary format: this is slow!
Pass in the .info file instead!
Read 50 particles from ../pointClouds/2d/ptCloud_cerchio.txt
Bounding box: [-0.665297, 0.666667] x [-0.666324, 0.666324]
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data
[0]PETSC ERROR: Invalid stack size 0, pop convertCloudTxt clouds.cpp:139.

[0]PETSC ERROR: WARNING! There are option(s) set that were not used! Could be the program crashed before they were used or a spell
ing mistake, etc!
[0]PETSC ERROR:   Option left: name:-delta value: 1.0 source: file
[0]PETSC ERROR:   Option left: name:-dx value: 0.1 source: file
[0]PETSC ERROR:   Option left: name:-extraCells value: 5 source: file
[0]PETSC ERROR:   Option left: name:-maxIter value: 200 source: file
[0]PETSC ERROR:   Option left: name:-p value: 1.0 source: file
[0]PETSC ERROR:   Option left: name:-tau value: 0.1 source: file
[0]PETSC ERROR:   Option left: name:-u0tresh value: 0.3 source: file
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.19.0, unknown
[0]PETSC ERROR: ../levelSet on a  named signalkuppe by matteo Mon Apr 17 18:04:03 2023 [0]PETSC ERROR: Configure options --download-ml \ --with-metis --with-parmetis \ --download-hdf5 \ --with-triangle --with-gmsh \ P ETSC_DIR=/home/matteo/software/petsc --PETSC_ARCH=dbg --with-debugging=1 --COPTFLAGS=-O --CXXOPTFLAGS=-O --FOPTFLAGS=-O --prefix=/
home/matteo/software/petsc/3.19-dbg/
[0]PETSC ERROR: #1 convertCloudTxt() at clouds.cpp:139
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_SELF
with errorcode 77.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Now, line 139 of clouds.cpp is PetscFunctionReturn(PETSC_SUCCESS), so I cannot understand what is the offending operation in that routine. (Note: this is a convertion routine and, skipping it, just make the next routine fail in a similar way...)

My student has also tried to compile PETSc with |--with-strict-petscerrorcode| and fixing all the compilation errors that were raised, but it didn't help.

Do you have any guess on what to look for?

There may be a PetscFunctionBeginUser; missing at the beginning of the convertCloudTxt() function.
Could you double-check this?

Thanks,
Pierre

Bonus question to assess the cluster output what is the default value for --with-debugging? I that option is not specified during PETSc configure, does one get optimized or debug build?

Thanks

    Matteo

--
Professore Associato in Analisi Numerica
Dipartimento di Scienza e Alta Tecnologia
Università degli Studi dell'Insubria
Via Valleggio, 11 - Como

--
---
Professore Associato in Analisi Numerica
Dipartimento di Scienza e Alta Tecnologia
Università degli Studi dell'Insubria
Via Valleggio, 11 - Como

Reply via email to