<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Stefano,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Many thanks for your response. I have just installed and run valgrind, and I get the output
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
pasted in below. I can see it seems to be reporting some kind of error, but I don't valgrind well enough</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
to know exactly where it is saying the problem is. Does this suggest the cause of the problem to you ?<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Many thanks once again,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dan.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
dan@super01 /data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3 $ valgrind --track-origins=yes --leak-check=full mpiexec.hydra -n 1 ./trashy.exe
<div>==839704== Memcheck, a memory error detector</div>
<div>==839704== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.</div>
<div>==839704== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info</div>
<div>==839704== Command: mpiexec.hydra -n 1 ./trashy.exe</div>
<div>==839704== </div>
<div>==839704== Conditional jump or move depends on uninitialised value(s)</div>
<div>==839704== at 0x437D9C: HYD_find_base_path (hydra_fs.c:203)</div>
<div>==839704== by 0x41B2D8: mpiexec_get_parameters (mpiexec_params.c:1226)</div>
<div>==839704== by 0x4049F4: main (mpiexec.c:1743)</div>
<div>==839704== </div>
<div>==839704== Conditional jump or move depends on uninitialised value(s)</div>
<div>==839704== at 0x437DAB: HYD_find_base_path (hydra_fs.c:203)</div>
<div>==839704== by 0x41B2D8: mpiexec_get_parameters (mpiexec_params.c:1226)</div>
<div>==839704== by 0x4049F4: main (mpiexec.c:1743)</div>
<div>==839704== </div>
<div>==839704== Conditional jump or move depends on uninitialised value(s)</div>
<div>==839704== at 0x437DB6: HYD_find_base_path (hydra_fs.c:204)</div>
<div>==839704== by 0x41B2D8: mpiexec_get_parameters (mpiexec_params.c:1226)</div>
<div>==839704== by 0x4049F4: main (mpiexec.c:1743)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x4520AA: send_info_downstream (i_hydra_bstrap.c:618)</div>
<div>==839704== by 0x4520AA: HYD_bstrap_setup (i_hydra_bstrap.c:763)</div>
<div>==839704== by 0x4060A6: main (mpiexec.c:1913)</div>
<div>==839704== Address 0x4d93940 is 0 bytes inside a block of size 300 alloc'd</div>
<div>==839704== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)</div>
<div>==839704== by 0x42F856: create_pg_node_list (i_mpiexec.c:677)</div>
<div>==839704== by 0x4056BD: main (mpiexec.c:1817)</div>
<div>==839704== Uninitialised value was created by a heap allocation</div>
<div>==839704== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)</div>
<div>==839704== by 0x438066: HYD_node_list_append (hydra_node.c:19)</div>
<div>==839704== by 0x404D2F: get_node_list (mpiexec.c:276)</div>
<div>==839704== by 0x404D2F: main (mpiexec.c:1773)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x4098E9: cmd_bcast_root (mpiexec.c:169)</div>
<div>==839704== by 0x40A60B: push_env_downstream (mpiexec.c:642)</div>
<div>==839704== by 0x407E65: main (mpiexec.c:1944)</div>
<div>==839704== Address 0x1ffeffb6a0 is on thread 1's stack</div>
<div>==839704== in frame #3, created by push_env_downstream (mpiexec.c:562)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x409CF0: push_env_downstream (mpiexec.c:562)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x4098E9: cmd_bcast_root (mpiexec.c:169)</div>
<div>==839704== by 0x40A6DD: push_env_downstream (mpiexec.c:648)</div>
<div>==839704== by 0x407E65: main (mpiexec.c:1944)</div>
<div>==839704== Address 0x1ffeffb6a0 is on thread 1's stack</div>
<div>==839704== in frame #3, created by push_env_downstream (mpiexec.c:562)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x409CF0: push_env_downstream (mpiexec.c:562)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x4098E9: cmd_bcast_root (mpiexec.c:169)</div>
<div>==839704== by 0x409C3F: push_cwd_downstream (mpiexec.c:682)</div>
<div>==839704== by 0x407F07: main (mpiexec.c:1948)</div>
<div>==839704== Address 0x1ffeffb738 is on thread 1's stack</div>
<div>==839704== in frame #3, created by push_cwd_downstream (mpiexec.c:668)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x409BC0: push_cwd_downstream (mpiexec.c:668)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x4098E9: cmd_bcast_root (mpiexec.c:169)</div>
<div>==839704== by 0x4092FF: push_mapping_info_downstream (mpiexec.c:790)</div>
<div>==839704== by 0x40803D: main (mpiexec.c:1957)</div>
<div>==839704== Address 0x1ffeffb738 is on thread 1's stack</div>
<div>==839704== in frame #3, created by push_mapping_info_downstream (mpiexec.c:782)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x409290: push_mapping_info_downstream (mpiexec.c:782)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x4098E9: cmd_bcast_root (mpiexec.c:169)</div>
<div>==839704== by 0x413670: initiate_process_launch (mpiexec.c:813)</div>
<div>==839704== by 0x4080D8: main (mpiexec.c:1960)</div>
<div>==839704== Address 0x1ffeffb728 is on thread 1's stack</div>
<div>==839704== in frame #3, created by initiate_process_launch (mpiexec.c:801)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x4135B0: initiate_process_launch (mpiexec.c:801)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x4098E9: cmd_bcast_root (mpiexec.c:169)</div>
<div>==839704== by 0x413740: initiate_process_launch (mpiexec.c:819)</div>
<div>==839704== by 0x4080D8: main (mpiexec.c:1960)</div>
<div>==839704== Address 0x1ffeffb728 is on thread 1's stack</div>
<div>==839704== in frame #3, created by initiate_process_launch (mpiexec.c:801)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x4135B0: initiate_process_launch (mpiexec.c:801)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x420A36: mpiexec_pmi_barrier (mpiexec_pmi.c:81)</div>
<div>==839704== by 0x40E6AA: control_cb (mpiexec.c:1280)</div>
<div>==839704== by 0x4339CF: HYDI_dmx_poll_wait_for_event (hydra_demux_poll.c:75)</div>
<div>==839704== by 0x4066B9: main (mpiexec.c:2006)</div>
<div>==839704== Address 0x1ffeffb68c is on thread 1's stack</div>
<div>==839704== in frame #2, created by mpiexec_pmi_barrier (mpiexec_pmi.c:13)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x420850: mpiexec_pmi_barrier (mpiexec_pmi.c:13)</div>
<div>==839704== </div>
<div>==839704== Syscall param write(buf) points to uninitialised byte(s)</div>
<div>==839704== at 0x488E297: write (write.c:26)</div>
<div>==839704== by 0x43A54D: HYD_sock_write (hydra_sock_intel.c:347)</div>
<div>==839704== by 0x420A97: mpiexec_pmi_barrier (mpiexec_pmi.c:48)</div>
<div>==839704== by 0x40E6AA: control_cb (mpiexec.c:1280)</div>
<div>==839704== by 0x4339CF: HYDI_dmx_poll_wait_for_event (hydra_demux_poll.c:75)</div>
<div>==839704== by 0x4066B9: main (mpiexec.c:2006)</div>
<div>==839704== Address 0x1ffeffb698 is on thread 1's stack</div>
<div>==839704== in frame #2, created by mpiexec_pmi_barrier (mpiexec_pmi.c:13)</div>
<div>==839704== Uninitialised value was created by a stack allocation</div>
<div>==839704== at 0x420850: mpiexec_pmi_barrier (mpiexec_pmi.c:13)</div>
<div>==839704== </div>
<div> check 01: 10 0 9</div>
<div> check 02: 10 0 9</div>
<div> 4 4 4</div>
<div> 4 4 4</div>
<div> 4 4 4</div>
<div> 4</div>
<div> now for PetscIntView ...</div>
<div>0: 4 4 4 4 4 4 4 4 4 4</div>
<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div>
<div>[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range</div>
<div>[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</div>
<div>[0]PETSC ERROR: or see https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</div>
<div>[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors</div>
<div>[0]PETSC ERROR: likely location of problem given in stack below</div>
<div>[0]PETSC ERROR: --------------------- Stack Frames ------------------------------------</div>
<div>[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,</div>
<div>[0]PETSC ERROR: INSTEAD the line number of the start of the function</div>
<div>[0]PETSC ERROR: is given.</div>
<div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div>
<div>[0]PETSC ERROR: Signal received</div>
<div>[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.</div>
<div>[0]PETSC ERROR: Petsc Release Version 3.14.5, Mar 03, 2021 </div>
<div>[0]PETSC ERROR: ./trashy.exe on a named super01 by darren Fri Apr 9 18:02:16 2021</div>
<div>[0]PETSC ERROR: Configure options --package-prefix-hash=/home/darren/petsc-hash-pkgs --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-mpiexec=mpiexec.hydra COPTFLAGS="-g -O" FOPTFLAGS="-g -O" CXXOPTFLAGS="-g -O" --with-64-bit-indices=1 --with-scalar-type=complex
--with-precision=double --with-debugging=1 --with-blaslapack-dir=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl --with-mkl_pardiso-dir=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl --with-mkl_cpardiso-dir=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl
--download-mumps --download-scalapack --download-cmake PETSC_ARCH=arch-ci-linux-intel-mkl-cmplx-ilp64-dbg-ftn-with-external</div>
<div>[0]PETSC ERROR: #1 User provided function() line 0 in unknown file</div>
<div>[0]PETSC ERROR: Checking the memory for corruption.</div>
<div>Abort(50176059) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 50176059) - process 0</div>
<div>==839704== </div>
<div>==839704== HEAP SUMMARY:</div>
<div>==839704== in use at exit: 84 bytes in 8 blocks</div>
<div>==839704== total heap usage: 4,061 allocs, 4,053 frees, 1,651,554 bytes allocated</div>
<div>==839704== </div>
<div>==839704== 2 bytes in 1 blocks are definitely lost in loss record 1 of 8</div>
<div>==839704== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)</div>
<div>==839704== by 0x44EFAE: HYD_str_from_int_pad (hydra_str.c:129)</div>
<div>==839704== by 0x4632F2: i_gtool_proxy_args (i_gtool.c:307)</div>
<div>==839704== by 0x405D5F: main (mpiexec.c:1901)</div>
<div>==839704== </div>
<div>==839704== 30 bytes in 1 blocks are definitely lost in loss record 8 of 8</div>
<div>==839704== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)</div>
<div>==839704== by 0x4632B4: MPL_strdup (mpl_trmem.h:295)</div>
<div>==839704== by 0x4632B4: i_gtool_proxy_args (i_gtool.c:306)</div>
<div>==839704== by 0x405D5F: main (mpiexec.c:1901)</div>
<div>==839704== </div>
<div>==839704== LEAK SUMMARY:</div>
<div>==839704== definitely lost: 32 bytes in 2 blocks</div>
<div>==839704== indirectly lost: 0 bytes in 0 blocks</div>
<div>==839704== possibly lost: 0 bytes in 0 blocks</div>
<div>==839704== still reachable: 52 bytes in 6 blocks</div>
<div>==839704== suppressed: 0 bytes in 0 blocks</div>
<div>==839704== Reachable blocks (those to which a pointer was found) are not shown.</div>
<div>==839704== To see them, rerun with: --leak-check=full --show-leak-kinds=all</div>
<div>==839704== </div>
<div>==839704== For lists of detected and suppressed errors, rerun with: -s</div>
<div>==839704== ERROR SUMMARY: 15 errors from 14 contexts (suppressed: 0 from 0)</div>
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Stefano Zampini <stefano.zampini@gmail.com><br>
<b>Sent:</b> Friday, April 9, 2021 7:46 AM<br>
<b>To:</b> dazza simplythebest <sayosale@hotmail.com><br>
<b>Cc:</b> petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject:</b> Re: [petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">As the error message says, use valgrind <a href="https://www.valgrind.org/" class="">https://www.valgrind.org/</a> to catch these kind of issues<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Apr 9, 2021, at 10:43 AM, dazza simplythebest <<a href="mailto:sayosale@hotmail.com" class="">sayosale@hotmail.com</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Dear All,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I am getting a puzzling 'Segmentation Violation' error when I try to</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
write out an integer array using PetscIntView in a Fortran code. I have written the small<span class="x_Apple-converted-space"> </span><br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
code below which reproduces the problem. All this code does is create</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
a PetscInt array, initialise this array, then try to write it out to screen.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Interestingly PetscIntView<span class="x_Apple-converted-space"> </span><i class="">does</i><span class="x_Apple-converted-space"> </span>seem to correctly write out all the values to</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
the screen (which agree with a direct write), but then fails before it can return to</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
the main program (see output pasted in below).</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I think I must be doing something quite silly, but just<span class="x_Apple-converted-space"> </span><br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
can't quite see what it is! Any suggestions will be very welcome.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Many thanks,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Dan<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<span class="x_Apple-converted-space"> </span><br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Code:</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"><span class="x_Apple-converted-space"> </span> MODULE ALL_STAB_ROUTINES</span>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> IMPLICIT NONE</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> CONTAINS</span></div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> SUBROUTINE WRITE_ROWS_TO_PETSC_MATRIX( ISIZE, JALOC)</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)">#include <slepc/finclude/slepceps.h></span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> use slepceps</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> IMPLICIT NONE</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> PetscInt, INTENT (IN) :: ISIZE</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> PetscInt, INTENT(INOUT), DIMENSION(0:ISIZE-1) :: JALOC</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> PetscErrorCode :: ierr</span></div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> write(*,*)'check 02: ',shape(jaloc),lbound(jaloc),ubound(jaloc)</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> write(*,*)jaloc</span></div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> write(*,*)'now for PetscIntView ...'</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> call PetscIntView(ISIZE,JALOC, PETSC_VIEWER_STDOUT_WORLD)</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> CHKERRA(ierr)</span></div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> END SUBROUTINE WRITE_ROWS_TO_PETSC_MATRIX</span></div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> END MODULE ALL_STAB_ROUTINES </span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> </span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> program stabbo</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> USE MPI</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)">#include <slepc/finclude/slepceps.h></span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> use slepceps</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> USE ALL_STAB_ROUTINES</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> IMPLICIT NONE</span><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> </span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> PetscInt, ALLOCATABLE, DIMENSION(:) :: JALOC</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> PetscInt, PARAMETER :: ISIZE = 10</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> PetscInt, parameter :: FOUR=4</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> PetscErrorCode :: ierr_pets</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> call SlepcInitialize(PETSC_NULL_CHARACTER,ierr_pets)</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> </span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> ALLOCATE(JALOC(0:ISIZE-1))</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> JALOC = FOUR</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> write(*,*)'check 01: ',shape(jaloc),lbound(jaloc),ubound(jaloc)</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> CALL WRITE_ROWS_TO_PETSC_MATRIX(ISIZE, JALOC)</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> CALL SlepcFinalize(ierr_pets)</span></div>
<div class=""><span class="" style="font-family:Cambria,Georgia,serif; color:rgb(23,78,134)"> END PROGRAM STABBO <span class="x_Apple-converted-space"> </span></span><br class="">
</div>
<div class=""><br class="">
</div>
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<span class="" style="color:rgb(6,64,12)">Output:</span></div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<span class="" style="color:rgb(6,64,12)">dan@super01 /data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3 $ mpiexec.hydra -n 1 ./trashy.exe</span>
<div class=""><span class="" style="color:rgb(6,64,12)"> check 01: 10 0 9</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)"> check 02: 10 0 9</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)"> 4 4 4</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)"> 4 4 4</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)"> 4 4 4</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)"> 4</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)"> now for PetscIntView ...</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">0: 4 4 4 4 4 4 4 4 4 4</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: ------------------------------------------------------------------------</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: or see<span class="x_Apple-converted-space"> </span><a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a></span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: or try<span class="x_Apple-converted-space"> </span><a href="http://valgrind.org/" class="">http://valgrind.org</a><span class="x_Apple-converted-space"> </span>on GNU/linux and Apple Mac
OS X to find memory corruption errors</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: likely location of problem given in stack below</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: --------------------- Stack Frames ------------------------------------</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: INSTEAD the line number of the start of the function</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: is given.</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: Signal received</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: See<span class="x_Apple-converted-space"> </span><a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html</a><span class="x_Apple-converted-space"> </span>for
trouble shooting.</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: Petsc Release Version 3.14.5, Mar 03, 2021</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: ./trashy.exe on a named super01 by darren Fri Apr 9 16:28:25 2021</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: Configure options --package-prefix-hash=/home/darren/petsc-hash-pkgs --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --with-mpiexec=mpiexec.hydra COPTFLAGS="-g -O" FOPTFLAGS="-g
-O" CXXOPTFLAGS="-g -O" --with-64-bit-indices=1 --with-scalar-type=complex --with-precision=double --with-debugging=1 --with-blaslapack-dir=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl --with-mkl_pardiso-dir=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl
--with-mkl_cpardiso-dir=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl --download-mumps --download-scalapack --download-cmake PETSC_ARCH=arch-ci-linux-intel-mkl-cmplx-ilp64-dbg-ftn-with-external</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: #1 User provided function() line 0 in unknown file</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">[0]PETSC ERROR: Checking the memory for corruption.</span></div>
<div class=""><span class="" style="color:rgb(6,64,12)">Abort(50176059) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 50176059) - process 0</span></div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>