[petsc-dev] Making a PetSc Roll and Rocks Module
the usual naming scheme is just the version number, but for petsc, most supercomputing centers use %version-%arch the installer will copy the file into $MODULEPATH/petsc/%version-%arch, or the user to $HOME/.modulefiles Of course, %version-%arch is a really silly name out of context. How about petsc-%version-%arch, somewhere within $PETSC_DIR/$PETSC_ARCH, or $PETSC_DIR/$PETSC_ARCH/modulefiles/%version-%arch ? Blaise On Jan 24, 2013, at 6:19 PM, Satish Balay balay at mcs.anl.gov wrote: On Thu, 24 Jan 2013, Matthew Knepley wrote: On Thu, Jan 24, 2013 at 3:42 PM, Blaise A Bourdin bourdin at lsu.edu wrote: I am attaching a very basic module file for reference. One would need to update petsc_dir and petsc_arch upon deploying these, or perhaps configure can do it. I actually use this to easily switch between builds and debug / optimized versions Pushed something that writes your simple module file to lib/modules/PETSc.mod. It would now be good to get feedback to make this the right thing. The name conflists with f90 modules. Perhaps there is a different notation for software modules? Also for prefix install we should set PETSC_ARCH= And for inplace install - do we also add PETSC_DIR/bin to PATH? Satish -- Department of Mathematics and Center for Computation Technology Louisiana State University, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin
[petsc-dev] Making a PetSc Roll and Rocks Module
On Jan 24, 2013, at 6:37 PM, Satish Balay balay at mcs.anl.gov wrote: On Fri, 25 Jan 2013, Blaise A Bourdin wrote: the usual naming scheme is just the version number, but for petsc, most supercomputing centers use %version-%arch the installer will copy the file into $MODULEPATH/petsc/%version-%arch, or the user to $HOME/.modulefiles Of course, %version-%arch is a really silly name out of context. How about petsc-%version-%arch, somewhere within $PETSC_DIR/$PETSC_ARCH, or $PETSC_DIR/$PETSC_ARCH/modulefiles/%version-%arch ? And PETSC_ARCH has no singificance with prefix install [the significant text is in the prefix-path - and one doesn't have to match PETSC_ARCH to this significant text] True. I actually realized that as I was hitting send BTW: Is the following notation ok? [google didn't help] prepend-path PATH /home/balay/spetsc/asterix64/bin:/home/balay/spetsc/bin It seems to work, but prepend-path PATH /home/balay/spetsc/asterix64/bin prepend-path PATH /home/balay/spetsc/bin may be safer. Both will break under windows, but I don't think it is a problem, really Blaise I have some fixes [except for the modfile name] which I can push. thanks, Satish Blaise On Jan 24, 2013, at 6:19 PM, Satish Balay balay at mcs.anl.gov wrote: On Thu, 24 Jan 2013, Matthew Knepley wrote: On Thu, Jan 24, 2013 at 3:42 PM, Blaise A Bourdin bourdin at lsu.edu wrote: I am attaching a very basic module file for reference. One would need to update petsc_dir and petsc_arch upon deploying these, or perhaps configure can do it. I actually use this to easily switch between builds and debug / optimized versions Pushed something that writes your simple module file to lib/modules/PETSc.mod. It would now be good to get feedback to make this the right thing. The name conflists with f90 modules. Perhaps there is a different notation for software modules? Also for prefix install we should set PETSC_ARCH= And for inplace install - do we also add PETSC_DIR/bin to PATH? Satish -- Department of Mathematics and Center for Computation Technology Louisiana State University, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin
[petsc-dev] Function pointer conversion: undefined behavior
Hi, the Nightly test results improved slightly: http://krupp.iue.tuwien.ac.at/petsc-test/ However, the custom Fortran stuff in C89 logs here: http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/build_arch-linux-c89_thrash.log seem to be quite hard to fix: warning: ISO C forbids conversion of function pointer to object pointer type [-pedantic] These warnings are caused by assignments of the form void * ptr = f; where f is a function pointer argument: void (PETSC_STDCALL *f)(TS*,double*,Vec*,Vec*,void*,PetscErrorCode*) A similar warning is obtained when assigning an instance of void* to such a function pointer. As an example, let's take the following function in mat/matfd/ftn-custom/zfdmatrixf.c: void PETSC_STDCALL matfdcoloringsetfunctionts_( MatFDColoring *fd, void (PETSC_STDCALL *f)(TS*,double*,Vec*,Vec*,void*,PetscErrorCode*)) { (*fd)-ftn_func_pointer = (void*) f; ... } A look at MatFDColoring shows struct _p_MatFDColoring{ ... void*ftn_func_pointer,*ftn_func_cntx; }; so the only fix I can think of is to replace void* with e.g. void (*ftn_func_pointer)(void); in order to remain in the 'function pointer world'. This is, nevertheless, still fairly ugly. Does anyone have a better solution for this? Best regards, Karli
[petsc-dev] missing fortran stuff?
Are you missing an include? $ git grep DMDA_BOUNDARY_ include/finclude include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_NONE include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_GHOSTED include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_MIRROR include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_PERIODIC include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_NONE = 0) include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_GHOSTED = 1) include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_MIRROR = 2) include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_PERIODIC = 3) On Fri, Jan 25, 2013 at 10:41 AM, Mark F. Adams mark.adams at columbia.eduwrote: I get some errors when using 'implicit none': DMDA_BOUNDARY_NONE, DMDA_BOUNDARY_NONE, 1 Error: Symbol 'dmda_boundary_none' at (1) has no IMPLICIT type petsc_kkt_solver.F90:144.27: DMDA_STENCIL_BOX,nfour,nfour,PETSC_DECIDE,PETSC_DECIDE, 1 Error: Symbol 'dmda_stencil_box' at (1) has no IMPLICIT type petsc_kkt_solver.F90:207.61: call MatSetOption(Bmat,MAT_IGNORE_OFF_PROCESSOR_ENTRIES,PETSC_TRUE); 1 Error: Symbol 'mat_ignore_off_processor_entries' at (1) has no IMPLICIT type petsc_kkt_solver.F90:177.38: call DMCreateMatrix(daphi,MPIAIJ,Amat,ierr) 1 Error: Symbol 'mpiaij' at (1) has no IMPLICIT type And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/681bd9c2/attachment.html
[petsc-dev] Function pointer conversion: undefined behavior
Hi Jed, seem to be quite hard to fix: warning: ISO C forbids conversion of function pointer to object pointer type [-pedantic] Yup, this problem is well-known. I've been removing them as it makes sense, but since we've never used an architecture where void(*)(void) has a different size than void*, it hasn't been urgent to eradicate every last instance. That said, we're nearly there with the PetscObjectSetFortranCallback interface I put in two weeks ago (there are just a few places still using the old way, then we can remove this code). Ok, great, so we have a handle on this problem. I think there are a couple other places, maybe in the MPI stuff, where function pointers and data pointers are conflated, though I think they are also easy enough to replace. In the nightly tests are only very few warnings of that type left. Only 11 files affected with about ~7 warnings each on average: vec/pf/impls/constant/const.c mat/matfd/ftn-custom/zfdmatrixf.c mat/impls/mffd/ftn-custom/zmffdf.c ksp/pc/impls/tfs/comm.c ksp/pc/impls/tfs/xxt.c ksp/pc/impls/tfs/xyt.c ksp/ksp/interface/ftn-custom/zitfuncf.c snes/interface/ftn-custom/zsnesf.c snes/utils/dmsnes.c ts/interface/ftn-custom/ztsf.c ts/utils/dmts.c:65 Please let me know if I can be of any help. Best regards, Karli
[petsc-dev] Function pointer conversion: undefined behavior
On Fri, Jan 25, 2013 at 10:56 AM, Karl Rupp rupp at mcs.anl.gov wrote: In the nightly tests are only very few warnings of that type left. Only 11 files affected with about ~7 warnings each on average: vec/pf/impls/constant/const.c mat/matfd/ftn-custom/**zfdmatrixf.c mat/impls/mffd/ftn-custom/**zmffdf.c ksp/pc/impls/tfs/comm.c ksp/pc/impls/tfs/xxt.c ksp/pc/impls/tfs/xyt.c ksp/ksp/interface/ftn-custom/**zitfuncf.c snes/interface/ftn-custom/**zsnesf.c snes/utils/dmsnes.c ts/interface/ftn-custom/ztsf.c ts/utils/dmts.c:65 Please let me know if I can be of any help. It's not fun work, but if you want to have the honor of deleting some of the ugliest code in PETSc, just apply the pattern here to those ftn-custom cases. https://bitbucket.org/petsc/petsc-dev/commits/f2a68b8a037e I'll get around to it if you don't. -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/dfe1a6f0/attachment.html
[petsc-dev] Function pointer conversion: undefined behavior
Hi Jed, In the nightly tests are only very few warnings of that type left. Only 11 files affected with about ~7 warnings each on average: vec/pf/impls/constant/const.c mat/matfd/ftn-custom/__zfdmatrixf.c mat/impls/mffd/ftn-custom/__zmffdf.c ksp/pc/impls/tfs/comm.c ksp/pc/impls/tfs/xxt.c ksp/pc/impls/tfs/xyt.c ksp/ksp/interface/ftn-custom/__zitfuncf.c snes/interface/ftn-custom/__zsnesf.c snes/utils/dmsnes.c ts/interface/ftn-custom/ztsf.c ts/utils/dmts.c:65 Please let me know if I can be of any help. It's not fun work, but if you want to have the honor of deleting some of the ugliest code in PETSc, just apply the pattern here to those ftn-custom cases. https://bitbucket.org/petsc/petsc-dev/commits/f2a68b8a037e I'll get around to it if you don't. Alright, I'll give it a try. There's snow outside, so I have a morale bonus today which I can use :-) Best regards, Karli
[petsc-dev] missing fortran stuff?
I have program main #include finclude/petscdmdef.h #include finclude/petscsnesdef.h use petscdm use petscsnes use petsc_kkt_solver_module use petsc_kkt_solver_moduleinterfaces On Jan 25, 2013, at 11:43 AM, Jed Brown jedbrown at mcs.anl.gov wrote: Are you missing an include? $ git grep DMDA_BOUNDARY_ include/finclude include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_NONE include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_GHOSTED include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_MIRROR include/finclude/petscdmda.h: PetscEnum DMDA_BOUNDARY_PERIODIC include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_NONE = 0) include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_GHOSTED = 1) include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_MIRROR = 2) include/finclude/petscdmda.h: parameter (DMDA_BOUNDARY_PERIODIC = 3) On Fri, Jan 25, 2013 at 10:41 AM, Mark F. Adams mark.adams at columbia.edu wrote: I get some errors when using 'implicit none': DMDA_BOUNDARY_NONE, DMDA_BOUNDARY_NONE, 1 Error: Symbol 'dmda_boundary_none' at (1) has no IMPLICIT type petsc_kkt_solver.F90:144.27: DMDA_STENCIL_BOX,nfour,nfour,PETSC_DECIDE,PETSC_DECIDE, 1 Error: Symbol 'dmda_stencil_box' at (1) has no IMPLICIT type petsc_kkt_solver.F90:207.61: call MatSetOption(Bmat,MAT_IGNORE_OFF_PROCESSOR_ENTRIES,PETSC_TRUE); 1 Error: Symbol 'mat_ignore_off_processor_entries' at (1) has no IMPLICIT type petsc_kkt_solver.F90:177.38: call DMCreateMatrix(daphi,MPIAIJ,Amat,ierr) 1 Error: Symbol 'mpiaij' at (1) has no IMPLICIT type And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/3de79968/attachment-0001.html
[petsc-dev] missing fortran stuff?
And I have this problem also: And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/12937dba/attachment.html
[petsc-dev] missing fortran stuff?
On Fri, Jan 25, 2013 at 11:11 AM, Mark F. Adams mark.adams at columbia.eduwrote: And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? Yeah, those are missing. I'll add them today and let you know. -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/41fbe87a/attachment.html
[petsc-dev] missing fortran stuff?
On Fri, Jan 25, 2013 at 11:10 AM, Mark F. Adams mark.adams at columbia.eduwrote: I have program main #include finclude/petscdmdef.h #include finclude/petscsnesdef.h use petscdm use petscsnes use petsc_kkt_solver_module use petsc_kkt_solver_moduleinterfaces I think you're just missing use petscdmda. -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/9661b17f/attachment.html
[petsc-dev] missing fortran stuff?
I think you're just missing use petscdmda. That did not help: program main #include finclude/petscdmdef.h #include finclude/petscsnesdef.h use petscdm use petscdmda use petscsnes use petsc_kkt_solver_module use petsc_kkt_solver_moduleinterfaces ! implicit none
[petsc-dev] missing fortran stuff?
If I nm the .a files I see things like: _VecNestGetSubVec But the link errors are for _vecnestgetsubvec_ It has an extra subscript ? but it is finding other Vec methods. On Jan 25, 2013, at 12:13 PM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:11 AM, Mark F. Adams mark.adams at columbia.edu wrote: And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? Yeah, those are missing. I'll add them today and let you know. -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/8ade91d0/attachment.html
[petsc-dev] missing fortran stuff?
On Fri, Jan 25, 2013 at 11:13 AM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:11 AM, Mark F. Adams mark.adams at columbia.eduwrote: And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? Yeah, those are missing. I'll add them today and let you know. Pushed https://bitbucket.org/petsc/petsc-dev/commits/59843d687d130ed7b97ee18d8704320150a44f31 https://bitbucket.org/petsc/petsc-dev/commits/5420f5634239d2a06df1e090a0c1b0effe5ba36d https://bitbucket.org/petsc/petsc-dev/commits/b800724bd477bca1a8dc8c2193153866285f511f -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/5f7bf92b/attachment.html
[petsc-dev] missing fortran stuff?
On Fri, Jan 25, 2013 at 1:41 PM, Mark F. Adams mark.adams at columbia.eduwrote: If I nm the .a files I see things like: _VecNestGetSubVec But the link errors are for _vecnestgetsubvec_ It has an extra subscript ? but it is finding other Vec methods. That's because the Fortran bindings were disabled (I'm not sure why; some were ftn-auto). -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/687f4c83/attachment.html
[petsc-dev] missing fortran stuff?
On Fri, Jan 25, 2013 at 1:31 PM, Mark F. Adams mark.adams at columbia.eduwrote: I think you're just missing use petscdmda. That did not help: program main #include finclude/petscdmdef.h #include finclude/petscsnesdef.h use petscdm use petscdmda use petscsnes use petsc_kkt_solver_module use petsc_kkt_solver_moduleinterfaces ! implicit none Can you compare what you've got to snes ex5f90t.F? -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/0cc0721f/attachment.html
[petsc-dev] missing fortran stuff?
The DM method is fixed but still no _vecnestgetsubvec_ This is what I see in the libs, _veccreatenest_ is there but _vecnestgetsubvec_ is not: U _VecCreateNest 03c0 T _veccreatenest_ 30e0 S _veccreatenest_.eh 00013210 T _VecCreateNest 0001d968 S _VecCreateNest.eh U _VecCreateNest U _VecCreateNest ~/Codes/petsc-dev/arch-macosx-gnu-g/libnm *.a | grep -i vecnestgetsubvec ec90 T _VecNestGetSubVec 0001d728 S _VecNestGetSubVec.eh ea20 T _VecNestGetSubVec_Nest 0001d6f8 S _VecNestGetSubVec_Nest.eh f2c0 T _VecNestGetSubVecs 0001d788 S _VecNestGetSubVecs.eh f0b0 T _VecNestGetSubVecs_Nest 0001d758 S _VecNestGetSubVecs_Nest.eh e680 t _VecNestGetSubVecs_Private 0001d6c8 s _VecNestGetSubVecs_Private.eh On Jan 25, 2013, at 2:49 PM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:13 AM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:11 AM, Mark F. Adams mark.adams at columbia.edu wrote: And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? Yeah, those are missing. I'll add them today and let you know. Pushed https://bitbucket.org/petsc/petsc-dev/commits/59843d687d130ed7b97ee18d8704320150a44f31 https://bitbucket.org/petsc/petsc-dev/commits/5420f5634239d2a06df1e090a0c1b0effe5ba36d https://bitbucket.org/petsc/petsc-dev/commits/b800724bd477bca1a8dc8c2193153866285f511f -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/7b8fc9b9/attachment.html
[petsc-dev] missing fortran stuff?
Can you compare what you've got to snes ex5f90t.F? This is what I cloned. I just got a debug version working so I'll do a deep cleaning.
[petsc-dev] missing fortran stuff?
You must not have done make allfortranstubs. On Fri, Jan 25, 2013 at 2:03 PM, Mark F. Adams mark.adams at columbia.eduwrote: The DM method is fixed but still no _vecnestgetsubvec_ This is what I see in the libs, _veccreatenest_ is there but _vecnestgetsubvec_ is not: U _VecCreateNest 03c0 T _veccreatenest_ 30e0 S _veccreatenest_.eh 00013210 T _VecCreateNest 0001d968 S _VecCreateNest.eh U _VecCreateNest U _VecCreateNest ~/Codes/petsc-dev/arch-macosx-gnu-g/libnm *.a | grep -i vecnestgetsubvec ec90 T _VecNestGetSubVec 0001d728 S _VecNestGetSubVec.eh ea20 T _VecNestGetSubVec_Nest 0001d6f8 S _VecNestGetSubVec_Nest.eh f2c0 T _VecNestGetSubVecs 0001d788 S _VecNestGetSubVecs.eh f0b0 T _VecNestGetSubVecs_Nest 0001d758 S _VecNestGetSubVecs_Nest.eh e680 t _VecNestGetSubVecs_Private 0001d6c8 s _VecNestGetSubVecs_Private.eh On Jan 25, 2013, at 2:49 PM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:13 AM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:11 AM, Mark F. Adams mark.adams at columbia.eduwrote: And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? Yeah, those are missing. I'll add them today and let you know. Pushed https://bitbucket.org/petsc/petsc-dev/commits/59843d687d130ed7b97ee18d8704320150a44f31 https://bitbucket.org/petsc/petsc-dev/commits/5420f5634239d2a06df1e090a0c1b0effe5ba36d https://bitbucket.org/petsc/petsc-dev/commits/b800724bd477bca1a8dc8c2193153866285f511f -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/6afc5bad/attachment.html
[petsc-dev] missing fortran stuff?
Deep clean worked, Now I get a segv in dmcreatematrix. The string length is crazy. I tried calling this with MPIAIJ and PETSC_NULL, both had crazy 'len' (but slightly different) and segv at the same place. 0x000100b112e4 in dmcreatematrix_ (dm=0x7fff5fbff5b0, mat_type=0x101e90f00 , J=0x7fff5fbff5e0, ierr=0x7fff5fbff59c, len=1606415580) at zdmf.c:40 40FIXCHAR(mat_type,len,t); (gdb) list 35 36 EXTERN_C_BEGIN 37 void PETSC_STDCALL dmcreatematrix_(DM *dm,CHAR mat_type PETSC_MIXED_LEN(len),Mat *J,PetscErrorCode *ierr PETSC_END_LEN(len)) 38 { 39char *t; 40FIXCHAR(mat_type,len,t); 41*ierr = DMCreateMatrix(*dm,t,J); 42FREECHAR(mat_type,t); 43 } 44 EXTERN_C_END On Jan 25, 2013, at 3:17 PM, Jed Brown jedbrown at mcs.anl.gov wrote: You must not have done make allfortranstubs. On Fri, Jan 25, 2013 at 2:03 PM, Mark F. Adams mark.adams at columbia.edu wrote: The DM method is fixed but still no _vecnestgetsubvec_ This is what I see in the libs, _veccreatenest_ is there but _vecnestgetsubvec_ is not: U _VecCreateNest 03c0 T _veccreatenest_ 30e0 S _veccreatenest_.eh 00013210 T _VecCreateNest 0001d968 S _VecCreateNest.eh U _VecCreateNest U _VecCreateNest ~/Codes/petsc-dev/arch-macosx-gnu-g/libnm *.a | grep -i vecnestgetsubvec ec90 T _VecNestGetSubVec 0001d728 S _VecNestGetSubVec.eh ea20 T _VecNestGetSubVec_Nest 0001d6f8 S _VecNestGetSubVec_Nest.eh f2c0 T _VecNestGetSubVecs 0001d788 S _VecNestGetSubVecs.eh f0b0 T _VecNestGetSubVecs_Nest 0001d758 S _VecNestGetSubVecs_Nest.eh e680 t _VecNestGetSubVecs_Private 0001d6c8 s _VecNestGetSubVecs_Private.eh On Jan 25, 2013, at 2:49 PM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:13 AM, Jed Brown jedbrown at mcs.anl.gov wrote: On Fri, Jan 25, 2013 at 11:11 AM, Mark F. Adams mark.adams at columbia.edu wrote: And, when I link I get some missing stuff: Undefined symbols for architecture x86_64: _dmsetoptionsprefix_, referenced from: _MAIN__ in petsc_kkt_solver.o _matnestgetsubmat_, referenced from: _formjacobian_ in petsc_kkt_solver.o _vecnestgetsubvec_, referenced from: _formjacobian_ in petsc_kkt_solver.o _formfunction_ in petsc_kkt_solver.o Are these missing fortran wrappers? Yeah, those are missing. I'll add them today and let you know. Pushed https://bitbucket.org/petsc/petsc-dev/commits/59843d687d130ed7b97ee18d8704320150a44f31 https://bitbucket.org/petsc/petsc-dev/commits/5420f5634239d2a06df1e090a0c1b0effe5ba36d https://bitbucket.org/petsc/petsc-dev/commits/b800724bd477bca1a8dc8c2193153866285f511f -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/6b4a6db7/attachment.html
[petsc-dev] missing fortran stuff?
On Fri, Jan 25, 2013 at 2:44 PM, Mark F. Adams mark.adams at columbia.eduwrote: Deep clean worked, Now I get a segv in dmcreatematrix. The string length is crazy. I tried calling this with MPIAIJ and PETSC_NULL, both had crazy 'len' (but slightly different) and segv at the same place. Never ever ever use PETSC_NULL from Fortran. It is always wrong. You must use PETSC_NULL_OBJECT, PETSC_NULL_CHARACTER, etc, if you want a NULL value. MATAIJ should work: $ git grep DMCreateMatrix -- *.F src/dm/impls/mesh/examples/tutorials/ex4f90.F: call DMCreateMatrix(mesh, MATAIJ, A,ierr) src/snes/examples/tutorials/ex5f90.F:call DMCreateMatrix(da,MATAIJ,J,ierr) src/snes/examples/tutorials/ex5f90t.F:call DMCreateMatrix(user%da,MATAIJ,J,ierr) src/ts/examples/tutorials/ex22f.F: call DMCreateMatrix(da,MATAIJ,J,ierr) 0x000100b112e4 in dmcreatematrix_ (dm=0x7fff5fbff5b0, mat_type=0x101e90f00 , J=0x7fff5fbff5e0, ierr=0x7fff5fbff59c, len=1606415580) at zdmf.c:40 40FIXCHAR(mat_type,len,t); (gdb) list 35 36 EXTERN_C_BEGIN 37 void PETSC_STDCALL dmcreatematrix_(DM *dm,CHAR mat_type PETSC_MIXED_LEN(len),Mat *J,PetscErrorCode *ierr PETSC_END_LEN(len)) 38 { 39char *t; 40FIXCHAR(mat_type,len,t); 41*ierr = DMCreateMatrix(*dm,t,J); 42FREECHAR(mat_type,t); 43 } 44 EXTERN_C_END -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130125/72362c9a/attachment.html