[petsc-users] Product of matrix row times a vector
Jeremy Theler
jeremy at seamplex.com
Fri Jan 31 03:18:09 CST 2020
On Thu, 2020-01-30 at 18:05 -0500, Matthew Knepley wrote:
> On Thu, Jan 30, 2020 at 6:04 PM Jeremy Theler <jeremy at seamplex.com>
> wrote:
> > On Thu, 2020-01-30 at 21:10 +0000, Smith, Barry F. wrote:
> >
> > > MatGetSubMatrix() and then do the product on the sub matrix
> > then
> > > VecSum
> > >
> >
> > Ok, I have it working in a single-processor and throws the expected
> > value. Yet I have a segfault in parallel when I ask for the IS
> > corresponding to the rows. When I call this instruction in parallel
> > I
> > get a segfault (I can post the full debug output if needed):
> >
> > ISCreateStride(PETSC_COMM_WORLD, size_local, first_row, 1,
> > &set_cols);
> >
> > I tried also
> >
> > ISCreateStride(PETSC_COMM_WORLD, size_global, 0, 1, &set_cols));
> >
> > but it also fails with the same segfault.
> >
> > What am I getting wrong?
>
> Show the entire error, including stack.
>
I run in two processes with start_on_debugger. Main terminal says
malloc(): corrupted top size
and the gdb output with the stack trace is
Attaching to program: /home/gtheler/codigos/wasora-suite/fino/examples/fino, process 31192
[New LWP 31196]
[New LWP 31198]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fd236019720 in __GI___nanosleep (
requested_time=requested_time at entry=0x7ffdf9838190,
remaining=remaining at entry=0x7ffdf9838190)
at ../sysdeps/unix/sysv/linux/nanosleep.c:28
28 ../sysdeps/unix/sysv/linux/nanosleep.c: No such file or directory.
(gdb) c
Continuing.
[New Thread 0x7fd233034700 (LWP 31212)]
Thread 1 "fino" received signal SIGABRT, Aborted.
__GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0 __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007fd235f75535 in __GI_abort () at abort.c:79
#2 0x00007fd235fcc508 in __libc_message (action=action at entry=do_abort,
fmt=fmt at entry=0x7fd2360d728d "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007fd235fd2c1a in malloc_printerr (
str=str at entry=0x7fd2360d5518 "malloc(): corrupted top size")
at malloc.c:5341
#4 0x00007fd235fd620d in _int_malloc (
av=av at entry=0x7fd23610ec40 <main_arena>, bytes=bytes at entry=2372)
at malloc.c:4099
#5 0x00007fd235fd756a in __GI___libc_malloc (bytes=2372) at malloc.c:3057
#6 0x00007fd2377dd42d in PetscMallocAlign (mem=2372, clear=PETSC_TRUE,
line=37, func=0x7fd239450408 <__func__.14861> "ISCreate",
file=0x7fd239450298 "/home/gtheler/libs/petsc-3.12.3/src/vec/is/is/interface/isreg.c", result=0x7ffdf983c618)
at /home/gtheler/libs/petsc-3.12.3/src/sys/memory/mal.c:49
#7 0x00007fd2377e0875 in PetscTrMallocDefault (a=768, clear=PETSC_TRUE,
lineno=37, function=0x7fd239450408 <__func__.14861> "ISCreate",
filename=0x7fd239450298 "/home/gtheler/libs/petsc-3.12.3/src/vec/is/is/interface/isreg.c", result=0x7ffdf983c8b0)
at /home/gtheler/libs/petsc-3.12.3/src/sys/memory/mtr.c:164
#8 0x00007fd2377dedf0 in PetscMallocA (n=1, clear=PETSC_TRUE, lineno=37,
function=0x7fd239450408 <__func__.14861> "ISCreate",
--Type <RET> for more, q to quit, c to continue without paging--
filename=0x7fd239450298 "/home/gtheler/libs/petsc-3.12.3/src/vec/is/is/interface/isreg.c", bytes0=768, ptr0=0x7ffdf983c8b0)
at /home/gtheler/libs/petsc-3.12.3/src/sys/memory/mal.c:422
#9 0x00007fd237c67760 in ISCreate (comm=0x556dbe8c9ee0 <ompi_mpi_comm_world>,
is=0x7ffdf983c8b0)
at /home/gtheler/libs/petsc-3.12.3/src/vec/is/is/interface/isreg.c:37
#10 0x00007fd237c4589a in ISCreateStride (
comm=0x556dbe8c9ee0 <ompi_mpi_comm_world>, n=70188, first=70191, step=1,
is=0x7ffdf983c8b0)
#11 0x0000556dbe82aab4 in fino_instruction_reaction (arg=0x556dbf8b4460)
at ./reactions.c:72
#12 0x0000556dbe8a8aa2 in wasora_step (whence=0) at ../wasora/src/wasora.c:406
#13 0x0000556dbe8a81b3 in wasora_standard_run () at ../wasora/src/wasora.c:206
#14 0x0000556dbe8a80a5 in main (argc=3, argv=0x7ffdf983cbd8)
at ../wasora/src/wasora.c:166
(gdb)
More information about the petsc-users
mailing list