Hi,

I update petsc to the latest version by pulling from the repo. Then I find one of my old code, which worked before, output errors now.
After debugging, I find that the error is caused by "DMCreateGlobalVector".
I attach a short program which can re-produce the error. This program works well with an older version of petsc.
I also attach the script I used to configure petsc.

The error message is below. Did I miss something in the installation ? Thank you.

1 [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
  2 [0]PETSC ERROR: Null argument, when expecting valid pointer
  3 [0]PETSC ERROR: Null Object: Parameter # 2
4 [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. 5 [0]PETSC ERROR: Petsc Development GIT revision: v3.7.4-1571-g7fc5cb5 GIT Date: 2016-10-05 10:56:19 -0500 6 [0]PETSC ERROR: [2]PETSC ERROR: ./test_ksp.exe on a gnu-dbg-32idx named kolmog1 by frank Wed Oct 5 17:40:07 2016 7 [0]PETSC ERROR: Configure options --known-mpi-shared="0 " --known-memcmp-ok --with-debugging="1 " --with-shared-libraries=0 --with-mpi-compilers="1 " --download-blacs="1 " --download-metis="1 " --dow nload-parmetis="1 " --download-superlu_dist="1 " --download-hypre=1 PETSC_ARCH=gnu-dbg-32idx 8 [0]PETSC ERROR: #1 VecSetLocalToGlobalMapping() line 83 in /home/frank/petsc/src/vec/vec/interface/vector.c 9 [0]PETSC ERROR: #2 DMCreateGlobalVector_DA() line 45 in /home/frank/petsc/src/dm/impls/da/dadist.c 10 [0]PETSC ERROR: #3 DMCreateGlobalVector() line 880 in /home/frank/petsc/src/dm/interface/dm.c


Regards,
Frank



PROGRAM test_ksp

#include <petsc/finclude/petscdmdef.h> 
#include <petsc/finclude/petscvecdef.h>

  USE petscdmda
  USE petscsys

  IMPLICIT NONE

  DM      :: decomp
  INTEGER :: N = 32, px = 2, py = 2, pz = 2, ierr
  Vec     :: b                        
  

  CALL PetscInitialize( PETSC_NULL_CHARACTER, ierr ) 

  CALL DMDACreate3d( PETSC_COMM_WORLD, &
                   & DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_PERIODIC, &
                   & DMDA_STENCIL_STAR, N, N, N, px, py, pz, 1, 1, &
                   & PETSC_NULL_INTEGER,  PETSC_NULL_INTEGER, PETSC_NULL_INTEGER, &
                   & decomp, ierr ) 

  CALL DMCreateGlobalVector( decomp, b, ierr ) ! cause error

  CALL VecDestroy( b, ierr ) 

  CALL DMDestroy( decomp, ierr )

  CALL PetscFinalize( ierr )

END PROGRAM test_ksp
#!/usr/bin/python

# Do the following before running this configure script [hopp2.nersc.gov]
#
# setenv XTPE_INFO_MESSAGE_OFF yes
# module add acml
# Order of the download and installation of libraries is crucial!!!

if __name__ == '__main__':
  import sys
  import os
  sys.path.insert(0, os.path.abspath('config'))
  import configure
  configure_options = [
    '--known-mpi-shared=0 ',
    '--known-memcmp-ok ',
    '--with-debugging=1 ',
    '--with-shared-libraries=0',
    '--with-mpi-compilers=1 ',
#    '--with-64-bit-indices',
    '--download-blacs=1 ',
    '--download-metis=1 ',
    '--download-parmetis=1 ',    
    '--download-superlu_dist=1 ', 
    '--download-hypre=1',
#    '--with-hdf5-include=/usr/local/petsc/gnu-dbg-32idx/include',
#    '--with-hdf5-lib=/usr/local/petsc/gnu-dbg-32idx/lib',
#    '--download-netcdf=1',
#    '--download-ml=1',
  ]
  configure.petsc_configure(configure_options)

Reply via email to