If I remove lines 47-50 in daindexf.c (the PETSC_EXTERN …for dmdasetaotype_), then when I try to compile the test code, it complains of an undefined reference to dmdasetaotype_.
So I put the lines back in, and with your patch applied, and then run in the debugger, with a breakpoint at dmdasetaotype_, it stops at /src/dm/impls/da/ftn-auto/daindexf.c. 3 steps later, at *__ierr = DMDASetAOType( is where it bombs out. So it seems to be ignoring the dmdasetaotype_ in /src/dm/impls/da/ftn-custom/zdaindexf.c in favor of ../ftn-auto/daindexf.c Randy > On Feb 17, 2016, at 6:31 PM, Barry Smith <bsm...@mcs.anl.gov> wrote: > > > It is probably my fault. Edit src/dm/impls/da/ftn-auto/daindexf.c and remove > the function function from that file and then run make on the library again. > If that does not work then run in the debugger and put a break point in > dmdasetaotype_ once it is there in the debugger you can make sure it is the > right function and step until it crashes to see what I have done wrong. > > Baryr > >> On Feb 17, 2016, at 7:29 PM, Randall Mackie <rlmackie...@gmail.com> wrote: >> >> Unfortunately I am getting exactly the same result. >> >> I applied the patch (patch -p1 < fix-fortran-dmdasetaotype.patch) >> >> Then I recompiled the library, and my code, but the error remains. >> >> Perhaps there is something else I’m missing? >> >> Randy >> >> >>> On Feb 17, 2016, at 3:15 PM, Barry Smith <bsm...@mcs.anl.gov> wrote: >>> >>> >>> Here is patch. <fix-fortran-dmdasetaotype.patch> >>> >>> If it works for you I'll put it in maint and master tomorrow. >>> >>> Barry >>> >>>> On Feb 17, 2016, at 3:46 PM, Randall Mackie <rlmackie...@gmail.com> wrote: >>>> >>>> The attached test program demonstrates the problem. When I run it, I get >>>> the following output: >>>> >>>> [0]PETSC ERROR: >>>> ------------------------------------------------------------------------ >>>> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, >>>> probably memory access out of range >>>> [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger >>>> [0]PETSC ERROR: or see >>>> http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind >>>> [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X >>>> to find memory corruption errors >>>> [0]PETSC ERROR: likely location of problem given in stack below >>>> [0]PETSC ERROR: --------------------- Stack Frames >>>> ------------------------------------ >>>> [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not >>>> available, >>>> [0]PETSC ERROR: INSTEAD the line number of the start of the function >>>> [0]PETSC ERROR: is given. >>>> [0]PETSC ERROR: [0] PetscStrlen line 150 >>>> /home/rmackie/PETSc/petsc-3.6.3/src/sys/utils/str.c >>>> [0]PETSC ERROR: [0] PetscStrallocpy line 185 >>>> /home/rmackie/PETSc/petsc-3.6.3/src/sys/utils/str.c >>>> [0]PETSC ERROR: [0] DMDASetAOType line 84 >>>> /home/rmackie/PETSc/petsc-3.6.3/src/dm/impls/da/daindex.c >>>> [0]PETSC ERROR: --------------------- Error Message >>>> -------------------------------------------------------------- >>>> [0]PETSC ERROR: Signal received >>>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html >>>> for trouble shooting. >>>> >>>> >>>> Randy >>>> >>>> >>>>> On Feb 17, 2016, at 11:35 AM, Barry Smith <bsm...@mcs.anl.gov> wrote: >>>>> >>>>> >>>>> Should be ok. Do you have implicit none and the correct include files so >>>>> AOMEMORYSCALABLE is defined? >>>>> >>>>> I think you need to run in the debugger next to track why this happens. >>>>> >>>>> Barry >>>>> >>>>>> On Feb 17, 2016, at 11:33 AM, Randall Mackie <rlmackie...@gmail.com> >>>>>> wrote: >>>>>> >>>>>> What is the correct way to set the AO for a DMDA to be the memory >>>>>> scalable version? >>>>>> >>>>>> I have tried this: >>>>>> >>>>>> call DMDASetAOType(da,AOMEMORYSCALABLE,ierr) >>>>>> call DMDAGetAO(da,ao,ierr) >>>>>> >>>>>> The code compiles fine, but I simply get a Segmentation Violation when I >>>>>> run it: >>>>>> >>>>>> [3]PETSC ERROR: >>>>>> ------------------------------------------------------------------------ >>>>>> [3]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, >>>>>> probably memory access out of range >>>>>> [3]PETSC ERROR: Try option -start_in_debugger or >>>>>> -on_error_attach_debugger >>>>>> [3]PETSC ERROR: or see >>>>>> http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind >>>>>> [3]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS >>>>>> X to find memory corruption errors >>>>>> [3]PETSC ERROR: configure using --with-debugging=yes, recompile, link, >>>>>> and run >>>>>> [3]PETSC ERROR: to get more information on the crash. >>>>>> [3]PETSC ERROR: --------------------- Error Message >>>>>> -------------------------------------------------------------- >>>>>> [3]PETSC ERROR: Signal received >>>>>> [3]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html >>>>>> for trouble shooting. >>>>>> [3]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 >>>>>> [3]PETSC ERROR: Configure options PETSC_ARCH=linux-gfortran-opt >>>>>> --with-clean=1 --with-scalar-type=complex --with-debugging=0 >>>>>> --with-fortran=1 --download-mpich=./mpich-3.1.3.tar.gz --FOPTFLAGS=-O3 >>>>>> --COPTFLAGS=-O3 >>>>>> [3]PETSC ERROR: #1 User provided function() line 0 in unknown file >>>>>> application called MPI_Abort(MPI_COMM_WORLD, 59) - process 3 >>>>>> [cli_3]: aborting job: >>>>>> >>>>>> >>>>>> In fact, I get the same thing even if I set the AOType to AOBASIC, in >>>>>> other words >>>>>> >>>>>> call DMDASetAOTYPE(da,AOBASIC,ierr) >>>>>> >>>>>> >>>>>> Previously, I did not set an AOType, and only called DMDAGetAO, which >>>>>> works fine, and from what I can tell sets the type to basic. >>>>>> >>>>>> >>>>>> Thanks, Randy M. >>>>> >>>> <test.F90><makefile> >>> >> >