From yxliu at fudan.edu.cn Thu Nov 2 02:27:11 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Thu, 02 Nov 2006 16:27:11 +0800 Subject: how to use PetscMap? Message-ID: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> Hi, I reveive the error as, [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Signal received! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 CDT 2006 HG revision: 9215af156a9cbcdc1ec666e2b5c7934688ddc526 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user Thu Nov 02 16:22:47 2006 [0]PETSC ERROR: Libraries linked from /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 [0]PETSC ERROR: Configure options --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file unable to read the cmd header on the pmi context, Undefined dynamic error code. job aborted: rank: node: exit code[: error message] 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 I think this error maybe caused by these codes, PetscMap *map; ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); CHKERRQ(ierr); ierr = PetscMapSetSize (map, n); ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); Is it correct to use the PetscMap like this? Best, Yixun -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Nov 2 07:07:04 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 2 Nov 2006 07:07:04 -0600 Subject: how to use PetscMap? In-Reply-To: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> Message-ID: No, in 2.3.2 PetscMap no longer exists. Matt On 11/2/06, Yixun Liu wrote: > > > Hi, > > I reveive the error as, > > [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Signal received! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > CDT 2006 HG revision: > 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > Thu Nov 02 16:22:47 2006 > [0]PETSC ERROR: Libraries linked from > /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > [0]PETSC ERROR: Configure options > --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > file > unable to read the cmd header on the pmi context, Undefined dynamic error > code. > > job aborted: > rank: node: exit code[: error message] > 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > process 0 > > I think this error maybe caused by these codes, > > PetscMap *map; > ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > CHKERRQ(ierr); > ierr = PetscMapSetSize (map, n); > ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > CHKERRQ(ierr); > > Is it correct to use the PetscMap like this? > > Best, > > Yixun > > > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From yxliu at fudan.edu.cn Thu Nov 2 07:46:51 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Thu, 02 Nov 2006 21:46:51 +0800 Subject: how to use PetscMap? References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> Message-ID: <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> Hi, I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, PetscMap map; ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); ierr = PetscMapDestroy(map); CHKERRQ(ierr); If 2.3.2 does not support PetscMap, which class should I use? Best, Yixun ----- Original Message ----- From: "Matthew Knepley" To: Sent: Thursday, November 02, 2006 9:07 PM Subject: Re: how to use PetscMap? > No, in 2.3.2 PetscMap no longer exists. > > Matt > > On 11/2/06, Yixun Liu wrote: >> >> >> Hi, >> >> I reveive the error as, >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c >> [0]PETSC ERROR: --------------------- Error Message >> ------------------------------------ >> [0]PETSC ERROR: Signal received! >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 >> CDT 2006 HG revision: >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> [0]PETSC ERROR: See docs/index.html for manual pages. >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user >> Thu Nov 02 16:22:47 2006 >> [0]PETSC ERROR: Libraries linked from >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 >> [0]PETSC ERROR: Configure options >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown >> file >> unable to read the cmd header on the pmi context, Undefined dynamic error >> code. >> >> job aborted: >> rank: node: exit code[: error message] >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - >> process 0 >> >> I think this error maybe caused by these codes, >> >> PetscMap *map; >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); >> CHKERRQ(ierr); >> ierr = PetscMapSetSize (map, n); >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); >> CHKERRQ(ierr); >> >> Is it correct to use the PetscMap like this? >> >> Best, >> >> Yixun >> >> >> >> > > > -- > "Failure has a thousand explanations. Success doesn't need one" -- Sir > Alec Guiness > From knepley at gmail.com Thu Nov 2 07:56:39 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 2 Nov 2006 07:56:39 -0600 Subject: how to use PetscMap? In-Reply-To: <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> Message-ID: There is no replacement. What are you tring to do here? Matt On 11/2/06, Yixun Liu wrote: > Hi, > > I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > > PetscMap map; > ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > ierr = PetscMapDestroy(map); CHKERRQ(ierr); > > If 2.3.2 does not support PetscMap, which class should I use? > > Best, > > Yixun > > > > ----- Original Message ----- > From: "Matthew Knepley" > To: > Sent: Thursday, November 02, 2006 9:07 PM > Subject: Re: how to use PetscMap? > > > > No, in 2.3.2 PetscMap no longer exists. > > > > Matt > > > > On 11/2/06, Yixun Liu wrote: > >> > >> > >> Hi, > >> > >> I reveive the error as, > >> > >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > >> [0]PETSC ERROR: --------------------- Error Message > >> ------------------------------------ > >> [0]PETSC ERROR: Signal received! > >> [0]PETSC ERROR: > >> ------------------------------------------------------------------------ > >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > >> CDT 2006 HG revision: > >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > >> [0]PETSC ERROR: See docs/index.html for manual pages. > >> [0]PETSC ERROR: > >> ------------------------------------------------------------------------ > >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > >> Thu Nov 02 16:22:47 2006 > >> [0]PETSC ERROR: Libraries linked from > >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > >> [0]PETSC ERROR: Configure options > >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > >> [0]PETSC ERROR: > >> ------------------------------------------------------------------------ > >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > >> file > >> unable to read the cmd header on the pmi context, Undefined dynamic error > >> code. > >> > >> job aborted: > >> rank: node: exit code[: error message] > >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > >> process 0 > >> > >> I think this error maybe caused by these codes, > >> > >> PetscMap *map; > >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > >> CHKERRQ(ierr); > >> ierr = PetscMapSetSize (map, n); > >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > >> CHKERRQ(ierr); > >> > >> Is it correct to use the PetscMap like this? > >> > >> Best, > >> > >> Yixun > >> > >> > >> > >> > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From yxliu at fudan.edu.cn Thu Nov 2 08:23:36 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Thu, 02 Nov 2006 22:23:36 +0800 Subject: how to use PetscMap? References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> Message-ID: <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> Hi, I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. Best, Yixun ----- Original Message ----- From: "Matthew Knepley" To: Sent: Thursday, November 02, 2006 9:56 PM Subject: Re: how to use PetscMap? > There is no replacement. What are you tring to do here? > > Matt > > On 11/2/06, Yixun Liu wrote: >> Hi, >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, >> >> PetscMap map; >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); >> >> If 2.3.2 does not support PetscMap, which class should I use? >> >> Best, >> >> Yixun >> >> >> >> ----- Original Message ----- >> From: "Matthew Knepley" >> To: >> Sent: Thursday, November 02, 2006 9:07 PM >> Subject: Re: how to use PetscMap? >> >> >> > No, in 2.3.2 PetscMap no longer exists. >> > >> > Matt >> > >> > On 11/2/06, Yixun Liu wrote: >> >> >> >> >> >> Hi, >> >> >> >> I reveive the error as, >> >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c >> >> [0]PETSC ERROR: --------------------- Error Message >> >> ------------------------------------ >> >> [0]PETSC ERROR: Signal received! >> >> [0]PETSC ERROR: >> >> ------------------------------------------------------------------------ >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 >> >> CDT 2006 HG revision: >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> >> [0]PETSC ERROR: See docs/index.html for manual pages. >> >> [0]PETSC ERROR: >> >> ------------------------------------------------------------------------ >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user >> >> Thu Nov 02 16:22:47 2006 >> >> [0]PETSC ERROR: Libraries linked from >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 >> >> [0]PETSC ERROR: Configure options >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 >> >> [0]PETSC ERROR: >> >> ------------------------------------------------------------------------ >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown >> >> file >> >> unable to read the cmd header on the pmi context, Undefined dynamic error >> >> code. >> >> >> >> job aborted: >> >> rank: node: exit code[: error message] >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - >> >> process 0 >> >> >> >> I think this error maybe caused by these codes, >> >> >> >> PetscMap *map; >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); >> >> CHKERRQ(ierr); >> >> ierr = PetscMapSetSize (map, n); >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); >> >> CHKERRQ(ierr); >> >> >> >> Is it correct to use the PetscMap like this? >> >> >> >> Best, >> >> >> >> Yixun >> >> >> >> >> >> >> >> >> > >> > >> > -- >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir >> > Alec Guiness >> > >> >> > > > -- > "Failure has a thousand explanations. Success doesn't need one" -- Sir > Alec Guiness > From knepley at gmail.com Thu Nov 2 08:27:34 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 2 Nov 2006 08:27:34 -0600 Subject: how to use PetscMap? In-Reply-To: <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> Message-ID: http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html Matt On 11/2/06, Yixun Liu wrote: > Hi, > > I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > > Best, > > Yixun > > ----- Original Message ----- > From: "Matthew Knepley" > To: > Sent: Thursday, November 02, 2006 9:56 PM > Subject: Re: how to use PetscMap? > > > > There is no replacement. What are you tring to do here? > > > > Matt > > > > On 11/2/06, Yixun Liu wrote: > >> Hi, > >> > >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > >> > >> PetscMap map; > >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > >> > >> If 2.3.2 does not support PetscMap, which class should I use? > >> > >> Best, > >> > >> Yixun > >> > >> > >> > >> ----- Original Message ----- > >> From: "Matthew Knepley" > >> To: > >> Sent: Thursday, November 02, 2006 9:07 PM > >> Subject: Re: how to use PetscMap? > >> > >> > >> > No, in 2.3.2 PetscMap no longer exists. > >> > > >> > Matt > >> > > >> > On 11/2/06, Yixun Liu wrote: > >> >> > >> >> > >> >> Hi, > >> >> > >> >> I reveive the error as, > >> >> > >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > >> >> [0]PETSC ERROR: --------------------- Error Message > >> >> ------------------------------------ > >> >> [0]PETSC ERROR: Signal received! > >> >> [0]PETSC ERROR: > >> >> ------------------------------------------------------------------------ > >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > >> >> CDT 2006 HG revision: > >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > >> >> [0]PETSC ERROR: > >> >> ------------------------------------------------------------------------ > >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > >> >> Thu Nov 02 16:22:47 2006 > >> >> [0]PETSC ERROR: Libraries linked from > >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > >> >> [0]PETSC ERROR: Configure options > >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > >> >> [0]PETSC ERROR: > >> >> ------------------------------------------------------------------------ > >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > >> >> file > >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > >> >> code. > >> >> > >> >> job aborted: > >> >> rank: node: exit code[: error message] > >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > >> >> process 0 > >> >> > >> >> I think this error maybe caused by these codes, > >> >> > >> >> PetscMap *map; > >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > >> >> CHKERRQ(ierr); > >> >> ierr = PetscMapSetSize (map, n); > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > >> >> CHKERRQ(ierr); > >> >> > >> >> Is it correct to use the PetscMap like this? > >> >> > >> >> Best, > >> >> > >> >> Yixun > >> >> > >> >> > >> >> > >> >> > >> > > >> > > >> > -- > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > >> > Alec Guiness > >> > > >> > >> > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From yxliu at fudan.edu.cn Thu Nov 2 19:18:39 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Fri, 03 Nov 2006 09:18:39 +0800 Subject: how to use PetscMap? References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> Message-ID: <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> Hi, For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange? Best, Yixun ----- Original Message ----- From: "Matthew Knepley" To: Sent: Thursday, November 02, 2006 10:27 PM Subject: Re: how to use PetscMap? > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > Matt > > On 11/2/06, Yixun Liu wrote: >> Hi, >> >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. >> >> Best, >> >> Yixun >> >> ----- Original Message ----- >> From: "Matthew Knepley" >> To: >> Sent: Thursday, November 02, 2006 9:56 PM >> Subject: Re: how to use PetscMap? >> >> >> > There is no replacement. What are you tring to do here? >> > >> > Matt >> > >> > On 11/2/06, Yixun Liu wrote: >> >> Hi, >> >> >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, >> >> >> >> PetscMap map; >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); >> >> >> >> If 2.3.2 does not support PetscMap, which class should I use? >> >> >> >> Best, >> >> >> >> Yixun >> >> >> >> >> >> >> >> ----- Original Message ----- >> >> From: "Matthew Knepley" >> >> To: >> >> Sent: Thursday, November 02, 2006 9:07 PM >> >> Subject: Re: how to use PetscMap? >> >> >> >> >> >> > No, in 2.3.2 PetscMap no longer exists. >> >> > >> >> > Matt >> >> > >> >> > On 11/2/06, Yixun Liu wrote: >> >> >> >> >> >> >> >> >> Hi, >> >> >> >> >> >> I reveive the error as, >> >> >> >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c >> >> >> [0]PETSC ERROR: --------------------- Error Message >> >> >> ------------------------------------ >> >> >> [0]PETSC ERROR: Signal received! >> >> >> [0]PETSC ERROR: >> >> >> ------------------------------------------------------------------------ >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 >> >> >> CDT 2006 HG revision: >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. >> >> >> [0]PETSC ERROR: >> >> >> ------------------------------------------------------------------------ >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user >> >> >> Thu Nov 02 16:22:47 2006 >> >> >> [0]PETSC ERROR: Libraries linked from >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 >> >> >> [0]PETSC ERROR: Configure options >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 >> >> >> [0]PETSC ERROR: >> >> >> ------------------------------------------------------------------------ >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown >> >> >> file >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error >> >> >> code. >> >> >> >> >> >> job aborted: >> >> >> rank: node: exit code[: error message] >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - >> >> >> process 0 >> >> >> >> >> >> I think this error maybe caused by these codes, >> >> >> >> >> >> PetscMap *map; >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); >> >> >> CHKERRQ(ierr); >> >> >> ierr = PetscMapSetSize (map, n); >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); >> >> >> CHKERRQ(ierr); >> >> >> >> >> >> Is it correct to use the PetscMap like this? >> >> >> >> >> >> Best, >> >> >> >> >> >> Yixun >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir >> >> > Alec Guiness >> >> > >> >> >> >> >> > >> > >> > -- >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir >> > Alec Guiness >> > >> >> > > > -- > "Failure has a thousand explanations. Success doesn't need one" -- Sir > Alec Guiness > From bsmith at mcs.anl.gov Thu Nov 2 19:26:12 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 2 Nov 2006 19:26:12 -0600 (CST) Subject: how to use PetscMap? In-Reply-To: <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> Message-ID: Yixun Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, PetscMapGetGlobalRange etc. http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html I told you about PetscMapInitialize() over a week ago. You should not need to broadcast these simple tasks to everyone; you should be able to use the manual pages to handle this trivial stuff. Barry On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange? > > Best, > > Yixun > > ----- Original Message ----- > From: "Matthew Knepley" > To: > Sent: Thursday, November 02, 2006 10:27 PM > Subject: Re: how to use PetscMap? > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > Matt > > > > On 11/2/06, Yixun Liu wrote: > >> Hi, > >> > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > >> > >> Best, > >> > >> Yixun > >> > >> ----- Original Message ----- > >> From: "Matthew Knepley" > >> To: > >> Sent: Thursday, November 02, 2006 9:56 PM > >> Subject: Re: how to use PetscMap? > >> > >> > >> > There is no replacement. What are you tring to do here? > >> > > >> > Matt > >> > > >> > On 11/2/06, Yixun Liu wrote: > >> >> Hi, > >> >> > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > >> >> > >> >> PetscMap map; > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > >> >> > >> >> If 2.3.2 does not support PetscMap, which class should I use? > >> >> > >> >> Best, > >> >> > >> >> Yixun > >> >> > >> >> > >> >> > >> >> ----- Original Message ----- > >> >> From: "Matthew Knepley" > >> >> To: > >> >> Sent: Thursday, November 02, 2006 9:07 PM > >> >> Subject: Re: how to use PetscMap? > >> >> > >> >> > >> >> > No, in 2.3.2 PetscMap no longer exists. > >> >> > > >> >> > Matt > >> >> > > >> >> > On 11/2/06, Yixun Liu wrote: > >> >> >> > >> >> >> > >> >> >> Hi, > >> >> >> > >> >> >> I reveive the error as, > >> >> >> > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > >> >> >> [0]PETSC ERROR: --------------------- Error Message > >> >> >> ------------------------------------ > >> >> >> [0]PETSC ERROR: Signal received! > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > >> >> >> CDT 2006 HG revision: > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > >> >> >> Thu Nov 02 16:22:47 2006 > >> >> >> [0]PETSC ERROR: Libraries linked from > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > >> >> >> [0]PETSC ERROR: Configure options > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > >> >> >> file > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > >> >> >> code. > >> >> >> > >> >> >> job aborted: > >> >> >> rank: node: exit code[: error message] > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > >> >> >> process 0 > >> >> >> > >> >> >> I think this error maybe caused by these codes, > >> >> >> > >> >> >> PetscMap *map; > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > >> >> >> CHKERRQ(ierr); > >> >> >> ierr = PetscMapSetSize (map, n); > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > >> >> >> CHKERRQ(ierr); > >> >> >> > >> >> >> Is it correct to use the PetscMap like this? > >> >> >> > >> >> >> Best, > >> >> >> > >> >> >> Yixun > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > -- > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > >> >> > Alec Guiness > >> >> > > >> >> > >> >> > >> > > >> > > >> > -- > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > >> > Alec Guiness > >> > > >> > >> > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > From yxliu at fudan.edu.cn Thu Nov 2 19:45:42 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Fri, 03 Nov 2006 09:45:42 +0800 Subject: how to use PetscMap? References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> Message-ID: <002801c6fee9$c5bfbc30$3364a8c0@dmrc6700512> Hi, I am sorry. Matt told me that there is no PetscMap in 2.3.2 version and he told me to use PetscSplitOwnership. From the manual pages I cannot find any examples about PetscSplitOwnership. Best, Yixun ----- Original Message ----- From: "Barry Smith" To: Sent: Friday, November 03, 2006 9:26 AM Subject: Re: how to use PetscMap? Yixun Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, PetscMapGetGlobalRange etc. http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html I told you about PetscMapInitialize() over a week ago. You should not need to broadcast these simple tasks to everyone; you should be able to use the manual pages to handle this trivial stuff. Barry On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange? > > Best, > > Yixun > > ----- Original Message ----- > From: "Matthew Knepley" > To: > Sent: Thursday, November 02, 2006 10:27 PM > Subject: Re: how to use PetscMap? > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > Matt > > > > On 11/2/06, Yixun Liu wrote: > >> Hi, > >> > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > >> > >> Best, > >> > >> Yixun > >> > >> ----- Original Message ----- > >> From: "Matthew Knepley" > >> To: > >> Sent: Thursday, November 02, 2006 9:56 PM > >> Subject: Re: how to use PetscMap? > >> > >> > >> > There is no replacement. What are you tring to do here? > >> > > >> > Matt > >> > > >> > On 11/2/06, Yixun Liu wrote: > >> >> Hi, > >> >> > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > >> >> > >> >> PetscMap map; > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > >> >> > >> >> If 2.3.2 does not support PetscMap, which class should I use? > >> >> > >> >> Best, > >> >> > >> >> Yixun > >> >> > >> >> > >> >> > >> >> ----- Original Message ----- > >> >> From: "Matthew Knepley" > >> >> To: > >> >> Sent: Thursday, November 02, 2006 9:07 PM > >> >> Subject: Re: how to use PetscMap? > >> >> > >> >> > >> >> > No, in 2.3.2 PetscMap no longer exists. > >> >> > > >> >> > Matt > >> >> > > >> >> > On 11/2/06, Yixun Liu wrote: > >> >> >> > >> >> >> > >> >> >> Hi, > >> >> >> > >> >> >> I reveive the error as, > >> >> >> > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > >> >> >> [0]PETSC ERROR: --------------------- Error Message > >> >> >> ------------------------------------ > >> >> >> [0]PETSC ERROR: Signal received! > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > >> >> >> CDT 2006 HG revision: > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > >> >> >> Thu Nov 02 16:22:47 2006 > >> >> >> [0]PETSC ERROR: Libraries linked from > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > >> >> >> [0]PETSC ERROR: Configure options > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > >> >> >> file > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > >> >> >> code. > >> >> >> > >> >> >> job aborted: > >> >> >> rank: node: exit code[: error message] > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > >> >> >> process 0 > >> >> >> > >> >> >> I think this error maybe caused by these codes, > >> >> >> > >> >> >> PetscMap *map; > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > >> >> >> CHKERRQ(ierr); > >> >> >> ierr = PetscMapSetSize (map, n); > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > >> >> >> CHKERRQ(ierr); > >> >> >> > >> >> >> Is it correct to use the PetscMap like this? > >> >> >> > >> >> >> Best, > >> >> >> > >> >> >> Yixun > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > -- > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > >> >> > Alec Guiness > >> >> > > >> >> > >> >> > >> > > >> > > >> > -- > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > >> > Alec Guiness > >> > > >> > >> > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > From yxliu at fudan.edu.cn Thu Nov 2 20:15:22 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Fri, 03 Nov 2006 10:15:22 +0800 Subject: how to use PetscMap? References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> Message-ID: <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> Hi, I use PetscMap as below, PetscMap map; ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); CHKERRQ(ierr); ierr = PetscMapSetBlockSize(&map,n); CHKERRQ(ierr); ierr = PetscMapSetSize (&map, n); CHKERRQ(ierr); ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); The compiler error is :PetscMapSetBlockSize' : undeclared identifier. I am sure I include "petscksp.h", so I think 2.3.2 does not support PetscMap. BTW, I am not clear about the block size. Best, Yixun ----- Original Message ----- From: "Barry Smith" To: Sent: Friday, November 03, 2006 9:26 AM Subject: Re: how to use PetscMap? Yixun Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, PetscMapGetGlobalRange etc. http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html I told you about PetscMapInitialize() over a week ago. You should not need to broadcast these simple tasks to everyone; you should be able to use the manual pages to handle this trivial stuff. Barry On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange? > > Best, > > Yixun > > ----- Original Message ----- > From: "Matthew Knepley" > To: > Sent: Thursday, November 02, 2006 10:27 PM > Subject: Re: how to use PetscMap? > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > Matt > > > > On 11/2/06, Yixun Liu wrote: > >> Hi, > >> > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > >> > >> Best, > >> > >> Yixun > >> > >> ----- Original Message ----- > >> From: "Matthew Knepley" > >> To: > >> Sent: Thursday, November 02, 2006 9:56 PM > >> Subject: Re: how to use PetscMap? > >> > >> > >> > There is no replacement. What are you tring to do here? > >> > > >> > Matt > >> > > >> > On 11/2/06, Yixun Liu wrote: > >> >> Hi, > >> >> > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > >> >> > >> >> PetscMap map; > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > >> >> > >> >> If 2.3.2 does not support PetscMap, which class should I use? > >> >> > >> >> Best, > >> >> > >> >> Yixun > >> >> > >> >> > >> >> > >> >> ----- Original Message ----- > >> >> From: "Matthew Knepley" > >> >> To: > >> >> Sent: Thursday, November 02, 2006 9:07 PM > >> >> Subject: Re: how to use PetscMap? > >> >> > >> >> > >> >> > No, in 2.3.2 PetscMap no longer exists. > >> >> > > >> >> > Matt > >> >> > > >> >> > On 11/2/06, Yixun Liu wrote: > >> >> >> > >> >> >> > >> >> >> Hi, > >> >> >> > >> >> >> I reveive the error as, > >> >> >> > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > >> >> >> [0]PETSC ERROR: --------------------- Error Message > >> >> >> ------------------------------------ > >> >> >> [0]PETSC ERROR: Signal received! > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > >> >> >> CDT 2006 HG revision: > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > >> >> >> Thu Nov 02 16:22:47 2006 > >> >> >> [0]PETSC ERROR: Libraries linked from > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > >> >> >> [0]PETSC ERROR: Configure options > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > >> >> >> [0]PETSC ERROR: > >> >> >> ------------------------------------------------------------------------ > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > >> >> >> file > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > >> >> >> code. > >> >> >> > >> >> >> job aborted: > >> >> >> rank: node: exit code[: error message] > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > >> >> >> process 0 > >> >> >> > >> >> >> I think this error maybe caused by these codes, > >> >> >> > >> >> >> PetscMap *map; > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > >> >> >> CHKERRQ(ierr); > >> >> >> ierr = PetscMapSetSize (map, n); > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > >> >> >> CHKERRQ(ierr); > >> >> >> > >> >> >> Is it correct to use the PetscMap like this? > >> >> >> > >> >> >> Best, > >> >> >> > >> >> >> Yixun > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > -- > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > >> >> > Alec Guiness > >> >> > > >> >> > >> >> > >> > > >> > > >> > -- > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > >> > Alec Guiness > >> > > >> > >> > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > From bsmith at mcs.anl.gov Thu Nov 2 20:26:42 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 2 Nov 2006 20:26:42 -0600 (CST) Subject: how to use PetscMap? In-Reply-To: <002801c6fee9$c5bfbc30$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> <002801c6fee9$c5bfbc30$3364a8c0@dmrc6700512> Message-ID: On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > I am sorry. > Matt told me that there is no PetscMap in 2.3.2 version and he told me to use PetscSplitOwnership. From the manual pages I cannot find any examples about PetscSplitOwnership. > Matt is an idiot. The source code and manual pages determine what is in a PETSc version, not Matt the oracle. > Best, > > Yixun > > ----- Original Message ----- > From: "Barry Smith" > To: > Sent: Friday, November 03, 2006 9:26 AM > Subject: Re: how to use PetscMap? > > > > Yixun > > Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, > PetscMapGetGlobalRange etc. > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html > I told you about PetscMapInitialize() over a week ago. > > You should not need to broadcast these simple tasks to everyone; you should be > able to use the manual pages to handle this trivial stuff. > > Barry > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > Hi, > > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange? > > > > Best, > > > > Yixun > > > > ----- Original Message ----- > > From: "Matthew Knepley" > > To: > > Sent: Thursday, November 02, 2006 10:27 PM > > Subject: Re: how to use PetscMap? > > > > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > > > Matt > > > > > > On 11/2/06, Yixun Liu wrote: > > >> Hi, > > >> > > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > > >> > > >> Best, > > >> > > >> Yixun > > >> > > >> ----- Original Message ----- > > >> From: "Matthew Knepley" > > >> To: > > >> Sent: Thursday, November 02, 2006 9:56 PM > > >> Subject: Re: how to use PetscMap? > > >> > > >> > > >> > There is no replacement. What are you tring to do here? > > >> > > > >> > Matt > > >> > > > >> > On 11/2/06, Yixun Liu wrote: > > >> >> Hi, > > >> >> > > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > > >> >> > > >> >> PetscMap map; > > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > > >> >> > > >> >> If 2.3.2 does not support PetscMap, which class should I use? > > >> >> > > >> >> Best, > > >> >> > > >> >> Yixun > > >> >> > > >> >> > > >> >> > > >> >> ----- Original Message ----- > > >> >> From: "Matthew Knepley" > > >> >> To: > > >> >> Sent: Thursday, November 02, 2006 9:07 PM > > >> >> Subject: Re: how to use PetscMap? > > >> >> > > >> >> > > >> >> > No, in 2.3.2 PetscMap no longer exists. > > >> >> > > > >> >> > Matt > > >> >> > > > >> >> > On 11/2/06, Yixun Liu wrote: > > >> >> >> > > >> >> >> > > >> >> >> Hi, > > >> >> >> > > >> >> >> I reveive the error as, > > >> >> >> > > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > > >> >> >> [0]PETSC ERROR: --------------------- Error Message > > >> >> >> ------------------------------------ > > >> >> >> [0]PETSC ERROR: Signal received! > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > > >> >> >> CDT 2006 HG revision: > > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > > >> >> >> Thu Nov 02 16:22:47 2006 > > >> >> >> [0]PETSC ERROR: Libraries linked from > > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > > >> >> >> [0]PETSC ERROR: Configure options > > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > > >> >> >> file > > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > > >> >> >> code. > > >> >> >> > > >> >> >> job aborted: > > >> >> >> rank: node: exit code[: error message] > > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > > >> >> >> process 0 > > >> >> >> > > >> >> >> I think this error maybe caused by these codes, > > >> >> >> > > >> >> >> PetscMap *map; > > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > > >> >> >> CHKERRQ(ierr); > > >> >> >> ierr = PetscMapSetSize (map, n); > > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > > >> >> >> CHKERRQ(ierr); > > >> >> >> > > >> >> >> Is it correct to use the PetscMap like this? > > >> >> >> > > >> >> >> Best, > > >> >> >> > > >> >> >> Yixun > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> > > > >> >> > > > >> >> > -- > > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > >> >> > Alec Guiness > > >> >> > > > >> >> > > >> >> > > >> > > > >> > > > >> > -- > > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > >> > Alec Guiness > > >> > > > >> > > >> > > > > > > > > > -- > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > Alec Guiness > > > > > > > > > From bsmith at mcs.anl.gov Thu Nov 2 20:30:27 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 2 Nov 2006 20:30:27 -0600 (CST) Subject: how to use PetscMap? In-Reply-To: <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> Message-ID: On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > I use PetscMap as below, > > PetscMap map; > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); CHKERRQ(ierr); > ierr = PetscMapSetBlockSize(&map,n); CHKERRQ(ierr); You do not need to use PetscMapSetBlockSize(), in it extraordinarily unlikely you want to set it to n. > ierr = PetscMapSetSize (&map, n); CHKERRQ(ierr); > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > The compiler error is :PetscMapSetBlockSize' : undeclared identifier. I am sure I include "petscksp.h", so I think 2.3.2 does not support PetscMap. Yes, but the other functions (PetscMapInitialize() etc) are NOT undeclared, so they do exist. Barry > BTW, I am not clear about the block size. > > Best, > > Yixun > > > > ----- Original Message ----- > From: "Barry Smith" > To: > Sent: Friday, November 03, 2006 9:26 AM > Subject: Re: how to use PetscMap? > > > > Yixun > > Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, > PetscMapGetGlobalRange etc. > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html > I told you about PetscMapInitialize() over a week ago. > > You should not need to broadcast these simple tasks to everyone; you should be > able to use the manual pages to handle this trivial stuff. > > Barry > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > Hi, > > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange?????? > > > > Best, > > > > Yixun > > > > ----- Original Message ----- > > From: "Matthew Knepley" > > To: > > Sent: Thursday, November 02, 2006 10:27 PM > > Subject: Re: how to use PetscMap? > > > > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > > > Matt > > > > > > On 11/2/06, Yixun Liu wrote: > > >> Hi, > > >> > > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > > >> > > >> Best, > > >> > > >> Yixun > > >> > > >> ----- Original Message ----- > > >> From: "Matthew Knepley" > > >> To: > > >> Sent: Thursday, November 02, 2006 9:56 PM > > >> Subject: Re: how to use PetscMap? > > >> > > >> > > >> > There is no replacement. What are you tring to do here? > > >> > > > >> > Matt > > >> > > > >> > On 11/2/06, Yixun Liu wrote: > > >> >> Hi, > > >> >> > > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > > >> >> > > >> >> PetscMap map; > > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > > >> >> > > >> >> If 2.3.2 does not support PetscMap, which class should I use? > > >> >> > > >> >> Best, > > >> >> > > >> >> Yixun > > >> >> > > >> >> > > >> >> > > >> >> ----- Original Message ----- > > >> >> From: "Matthew Knepley" > > >> >> To: > > >> >> Sent: Thursday, November 02, 2006 9:07 PM > > >> >> Subject: Re: how to use PetscMap? > > >> >> > > >> >> > > >> >> > No, in 2.3.2 PetscMap no longer exists. > > >> >> > > > >> >> > Matt > > >> >> > > > >> >> > On 11/2/06, Yixun Liu wrote: > > >> >> >> > > >> >> >> > > >> >> >> Hi, > > >> >> >> > > >> >> >> I reveive the error as, > > >> >> >> > > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > > >> >> >> [0]PETSC ERROR: --------------------- Error Message > > >> >> >> ------------------------------------ > > >> >> >> [0]PETSC ERROR: Signal received! > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > > >> >> >> CDT 2006 HG revision: > > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > > >> >> >> Thu Nov 02 16:22:47 2006 > > >> >> >> [0]PETSC ERROR: Libraries linked from > > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > > >> >> >> [0]PETSC ERROR: Configure options > > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > > >> >> >> file > > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > > >> >> >> code. > > >> >> >> > > >> >> >> job aborted: > > >> >> >> rank: node: exit code[: error message] > > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > > >> >> >> process 0 > > >> >> >> > > >> >> >> I think this error maybe caused by these codes, > > >> >> >> > > >> >> >> PetscMap *map; > > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > > >> >> >> CHKERRQ(ierr); > > >> >> >> ierr = PetscMapSetSize (map, n); > > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > > >> >> >> CHKERRQ(ierr); > > >> >> >> > > >> >> >> Is it correct to use the PetscMap like this? > > >> >> >> > > >> >> >> Best, > > >> >> >> > > >> >> >> Yixun > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> > > > >> >> > > > >> >> > -- > > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > >> >> > Alec Guiness > > >> >> > > > >> >> > > >> >> > > >> > > > >> > > > >> > -- > > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > >> > Alec Guiness > > >> > > > >> > > >> > > > > > > > > > -- > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > Alec Guiness > > > > > > > > > From yxliu at fudan.edu.cn Thu Nov 2 20:46:14 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Fri, 03 Nov 2006 10:46:14 +0800 Subject: how to use PetscMap? References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> Message-ID: <006c01c6fef2$3aa54c10$3364a8c0@dmrc6700512> Hi, I do not use PetscMapSetBlockSize firstly and it is ok with compiler. PetscMap map; ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); ierr = PetscMapSetSize (&map, n); CHKERRQ(ierr); ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); However,the running error is: [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: BlockSize not yet set! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 CDT 2006 HG revision: 9215af156a9cbcdc1ec666e2b5c7934688ddc526 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: D:\MyVC\PETSCTest\PETSCTemplate\Debug\PETSCTemplate.exe on a cygwin-cx named DMRC-6700512 by DMRC-user Fri Nov 03 10:26:11 2006 [0]PETSC ERROR: Libraries linked from /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 [0]PETSC ERROR: Configure options --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: PetscMapInitialize() line 44 in src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c Norm of error 0.00110997 iterations 44 0.0702505 Yixun ----- Original Message ----- From: "Barry Smith" To: Sent: Friday, November 03, 2006 10:30 AM Subject: Re: how to use PetscMap? On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > I use PetscMap as below, > > PetscMap map; > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); CHKERRQ(ierr); > ierr = PetscMapSetBlockSize(&map,n); CHKERRQ(ierr); You do not need to use PetscMapSetBlockSize(), in it extraordinarily unlikely you want to set it to n. > ierr = PetscMapSetSize (&map, n); CHKERRQ(ierr); > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > The compiler error is :PetscMapSetBlockSize' : undeclared identifier. I am sure I include "petscksp.h", so I think 2.3.2 does not support PetscMap. Yes, but the other functions (PetscMapInitialize() etc) are NOT undeclared, so they do exist. Barry > BTW, I am not clear about the block size. > > Best, > > Yixun > > > > ----- Original Message ----- > From: "Barry Smith" > To: > Sent: Friday, November 03, 2006 9:26 AM > Subject: Re: how to use PetscMap? > > > > Yixun > > Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, > PetscMapGetGlobalRange etc. > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html > I told you about PetscMapInitialize() over a week ago. > > You should not need to broadcast these simple tasks to everyone; you should be > able to use the manual pages to handle this trivial stuff. > > Barry > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > Hi, > > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange?????? > > > > Best, > > > > Yixun > > > > ----- Original Message ----- > > From: "Matthew Knepley" > > To: > > Sent: Thursday, November 02, 2006 10:27 PM > > Subject: Re: how to use PetscMap? > > > > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > > > Matt > > > > > > On 11/2/06, Yixun Liu wrote: > > >> Hi, > > >> > > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > > >> > > >> Best, > > >> > > >> Yixun > > >> > > >> ----- Original Message ----- > > >> From: "Matthew Knepley" > > >> To: > > >> Sent: Thursday, November 02, 2006 9:56 PM > > >> Subject: Re: how to use PetscMap? > > >> > > >> > > >> > There is no replacement. What are you tring to do here? > > >> > > > >> > Matt > > >> > > > >> > On 11/2/06, Yixun Liu wrote: > > >> >> Hi, > > >> >> > > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > > >> >> > > >> >> PetscMap map; > > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > > >> >> > > >> >> If 2.3.2 does not support PetscMap, which class should I use? > > >> >> > > >> >> Best, > > >> >> > > >> >> Yixun > > >> >> > > >> >> > > >> >> > > >> >> ----- Original Message ----- > > >> >> From: "Matthew Knepley" > > >> >> To: > > >> >> Sent: Thursday, November 02, 2006 9:07 PM > > >> >> Subject: Re: how to use PetscMap? > > >> >> > > >> >> > > >> >> > No, in 2.3.2 PetscMap no longer exists. > > >> >> > > > >> >> > Matt > > >> >> > > > >> >> > On 11/2/06, Yixun Liu wrote: > > >> >> >> > > >> >> >> > > >> >> >> Hi, > > >> >> >> > > >> >> >> I reveive the error as, > > >> >> >> > > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > > >> >> >> [0]PETSC ERROR: --------------------- Error Message > > >> >> >> ------------------------------------ > > >> >> >> [0]PETSC ERROR: Signal received! > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > > >> >> >> CDT 2006 HG revision: > > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > > >> >> >> Thu Nov 02 16:22:47 2006 > > >> >> >> [0]PETSC ERROR: Libraries linked from > > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > > >> >> >> [0]PETSC ERROR: Configure options > > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > > >> >> >> [0]PETSC ERROR: > > >> >> >> ------------------------------------------------------------------------ > > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > > >> >> >> file > > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > > >> >> >> code. > > >> >> >> > > >> >> >> job aborted: > > >> >> >> rank: node: exit code[: error message] > > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > > >> >> >> process 0 > > >> >> >> > > >> >> >> I think this error maybe caused by these codes, > > >> >> >> > > >> >> >> PetscMap *map; > > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > > >> >> >> CHKERRQ(ierr); > > >> >> >> ierr = PetscMapSetSize (map, n); > > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > > >> >> >> CHKERRQ(ierr); > > >> >> >> > > >> >> >> Is it correct to use the PetscMap like this? > > >> >> >> > > >> >> >> Best, > > >> >> >> > > >> >> >> Yixun > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> > > > >> >> > > > >> >> > -- > > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > >> >> > Alec Guiness > > >> >> > > > >> >> > > >> >> > > >> > > > >> > > > >> > -- > > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > >> > Alec Guiness > > >> > > > >> > > >> > > > > > > > > > -- > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > Alec Guiness > > > > > > > > > From bsmith at mcs.anl.gov Thu Nov 2 20:51:33 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 2 Nov 2006 20:51:33 -0600 (CST) Subject: how to use PetscMap? In-Reply-To: <006c01c6fef2$3aa54c10$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> <006c01c6fef2$3aa54c10$3364a8c0@dmrc6700512> Message-ID: Sorry about this; you can just use map->bs = 1; before the call to PetscMapInitialize() Barry On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > I do not use PetscMapSetBlockSize firstly and it is ok with compiler. > > PetscMap map; > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); > ierr = PetscMapSetSize (&map, n); > CHKERRQ(ierr); > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > > > However,the running error is: > > [0]PETSC ERROR: --------------------- Error Message ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: BlockSize not yet set! > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 CDT 2006 HG revision: 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: D:\MyVC\PETSCTest\PETSCTemplate\Debug\PETSCTemplate.exe on a cygwin-cx named DMRC-6700512 by DMRC-user Fri Nov 03 10:26:11 2006 > [0]PETSC ERROR: Libraries linked from /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > [0]PETSC ERROR: Configure options --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: PetscMapInitialize() line 44 in src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > Norm of error 0.00110997 iterations 44 > 0.0702505 > > Yixun > > > > > > ----- Original Message ----- > From: "Barry Smith" > To: > Sent: Friday, November 03, 2006 10:30 AM > Subject: Re: how to use PetscMap? > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > Hi, > > I use PetscMap as below, > > > > PetscMap map; > > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); CHKERRQ(ierr); > > ierr = PetscMapSetBlockSize(&map,n); CHKERRQ(ierr); > > You do not need to use PetscMapSetBlockSize(), in it extraordinarily unlikely > you want to set it to n. > > > ierr = PetscMapSetSize (&map, n); CHKERRQ(ierr); > > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > > > The compiler error is :PetscMapSetBlockSize' : undeclared identifier. I am sure I include "petscksp.h", so I think 2.3.2 does not support PetscMap. > > Yes, but the other functions (PetscMapInitialize() etc) are NOT undeclared, so they do exist. > > Barry > > > BTW, I am not clear about the block size. > > > > Best, > > > > Yixun > > > > > > > > ----- Original Message ----- > > From: "Barry Smith" > > To: > > Sent: Friday, November 03, 2006 9:26 AM > > Subject: Re: how to use PetscMap? > > > > > > > > Yixun > > > > Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, > > PetscMapGetGlobalRange etc. > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html > > I told you about PetscMapInitialize() over a week ago. > > > > You should not need to broadcast these simple tasks to everyone; you should be > > able to use the manual pages to handle this trivial stuff. > > > > Barry > > > > > > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > > > Hi, > > > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange?????? > > > > > > Best, > > > > > > Yixun > > > > > > ----- Original Message ----- > > > From: "Matthew Knepley" > > > To: > > > Sent: Thursday, November 02, 2006 10:27 PM > > > Subject: Re: how to use PetscMap? > > > > > > > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > > > > > Matt > > > > > > > > On 11/2/06, Yixun Liu wrote: > > > >> Hi, > > > >> > > > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > > > >> > > > >> Best, > > > >> > > > >> Yixun > > > >> > > > >> ----- Original Message ----- > > > >> From: "Matthew Knepley" > > > >> To: > > > >> Sent: Thursday, November 02, 2006 9:56 PM > > > >> Subject: Re: how to use PetscMap? > > > >> > > > >> > > > >> > There is no replacement. What are you tring to do here? > > > >> > > > > >> > Matt > > > >> > > > > >> > On 11/2/06, Yixun Liu wrote: > > > >> >> Hi, > > > >> >> > > > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > > > >> >> > > > >> >> PetscMap map; > > > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > > > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > > > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > > > >> >> > > > >> >> If 2.3.2 does not support PetscMap, which class should I use? > > > >> >> > > > >> >> Best, > > > >> >> > > > >> >> Yixun > > > >> >> > > > >> >> > > > >> >> > > > >> >> ----- Original Message ----- > > > >> >> From: "Matthew Knepley" > > > >> >> To: > > > >> >> Sent: Thursday, November 02, 2006 9:07 PM > > > >> >> Subject: Re: how to use PetscMap? > > > >> >> > > > >> >> > > > >> >> > No, in 2.3.2 PetscMap no longer exists. > > > >> >> > > > > >> >> > Matt > > > >> >> > > > > >> >> > On 11/2/06, Yixun Liu wrote: > > > >> >> >> > > > >> >> >> > > > >> >> >> Hi, > > > >> >> >> > > > >> >> >> I reveive the error as, > > > >> >> >> > > > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > > > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > > > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > > > >> >> >> [0]PETSC ERROR: --------------------- Error Message > > > >> >> >> ------------------------------------ > > > >> >> >> [0]PETSC ERROR: Signal received! > > > >> >> >> [0]PETSC ERROR: > > > >> >> >> ------------------------------------------------------------------------ > > > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > > > >> >> >> CDT 2006 HG revision: > > > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > > > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > > > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > > > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > > > >> >> >> [0]PETSC ERROR: > > > >> >> >> ------------------------------------------------------------------------ > > > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > > > >> >> >> Thu Nov 02 16:22:47 2006 > > > >> >> >> [0]PETSC ERROR: Libraries linked from > > > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > > > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > > > >> >> >> [0]PETSC ERROR: Configure options > > > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > > > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > > > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > > > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > > > >> >> >> [0]PETSC ERROR: > > > >> >> >> ------------------------------------------------------------------------ > > > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > > > >> >> >> file > > > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > > > >> >> >> code. > > > >> >> >> > > > >> >> >> job aborted: > > > >> >> >> rank: node: exit code[: error message] > > > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > > > >> >> >> process 0 > > > >> >> >> > > > >> >> >> I think this error maybe caused by these codes, > > > >> >> >> > > > >> >> >> PetscMap *map; > > > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > > > >> >> >> CHKERRQ(ierr); > > > >> >> >> ierr = PetscMapSetSize (map, n); > > > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > > > >> >> >> CHKERRQ(ierr); > > > >> >> >> > > > >> >> >> Is it correct to use the PetscMap like this? > > > >> >> >> > > > >> >> >> Best, > > > >> >> >> > > > >> >> >> Yixun > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> > > > > >> >> > > > > >> >> > -- > > > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > >> >> > Alec Guiness > > > >> >> > > > > >> >> > > > >> >> > > > >> > > > > >> > > > > >> > -- > > > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > >> > Alec Guiness > > > >> > > > > >> > > > >> > > > > > > > > > > > > -- > > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > > Alec Guiness > > > > > > > > > > > > > > > > From yxliu at fudan.edu.cn Thu Nov 2 21:12:36 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Fri, 03 Nov 2006 11:12:36 +0800 Subject: how to use PetscMap? References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> <006c01c6fef2$3aa54c10$3364a8c0@dmrc6700512> Message-ID: <008801c6fef5$e98dba20$3364a8c0@dmrc6700512> Hi, I did as you said, PetscMap map; // PetscMapSetBlockSize(&map,n); map.bs = 1; ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); ierr = PetscMapSetSize (&map, n); ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); The running error is, [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Signal received! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 CDT 2006 HG revision: 9215af156a9cbcdc1ec666e2b5c7934688ddc526 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: D:\MyVC\PETSCTest\PETSCTemplate\Debug\PETSCTemplate.exe on a cygwin-cx named DMRC-6700512 by DMRC-user Fri Nov 03 11:10:22 2006 [0]PETSC ERROR: Libraries linked from /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 [0]PETSC ERROR: Configure options --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file unable to read the cmd header on the pmi context, Undefined dynamic error code. job aborted: rank: node: exit code[: error message] 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 Best, Yixun ----- Original Message ----- From: "Barry Smith" To: Sent: Friday, November 03, 2006 10:51 AM Subject: Re: how to use PetscMap? Sorry about this; you can just use map->bs = 1; before the call to PetscMapInitialize() Barry On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > I do not use PetscMapSetBlockSize firstly and it is ok with compiler. > > PetscMap map; > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); > ierr = PetscMapSetSize (&map, n); > CHKERRQ(ierr); > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > > > However,the running error is: > > [0]PETSC ERROR: --------------------- Error Message ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: BlockSize not yet set! > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 CDT 2006 HG revision: 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: D:\MyVC\PETSCTest\PETSCTemplate\Debug\PETSCTemplate.exe on a cygwin-cx named DMRC-6700512 by DMRC-user Fri Nov 03 10:26:11 2006 > [0]PETSC ERROR: Libraries linked from /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > [0]PETSC ERROR: Configure options --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: PetscMapInitialize() line 44 in src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > Norm of error 0.00110997 iterations 44 > 0.0702505 > > Yixun > > > > > > ----- Original Message ----- > From: "Barry Smith" > To: > Sent: Friday, November 03, 2006 10:30 AM > Subject: Re: how to use PetscMap? > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > Hi, > > I use PetscMap as below, > > > > PetscMap map; > > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); CHKERRQ(ierr); > > ierr = PetscMapSetBlockSize(&map,n); CHKERRQ(ierr); > > You do not need to use PetscMapSetBlockSize(), in it extraordinarily unlikely > you want to set it to n. > > > ierr = PetscMapSetSize (&map, n); CHKERRQ(ierr); > > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > > > The compiler error is :PetscMapSetBlockSize' : undeclared identifier. I am sure I include "petscksp.h", so I think 2.3.2 does not support PetscMap. > > Yes, but the other functions (PetscMapInitialize() etc) are NOT undeclared, so they do exist. > > Barry > > > BTW, I am not clear about the block size. > > > > Best, > > > > Yixun > > > > > > > > ----- Original Message ----- > > From: "Barry Smith" > > To: > > Sent: Friday, November 03, 2006 9:26 AM > > Subject: Re: how to use PetscMap? > > > > > > > > Yixun > > > > Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, > > PetscMapGetGlobalRange etc. > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html > > I told you about PetscMapInitialize() over a week ago. > > > > You should not need to broadcast these simple tasks to everyone; you should be > > able to use the manual pages to handle this trivial stuff. > > > > Barry > > > > > > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > > > Hi, > > > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange?????? > > > > > > Best, > > > > > > Yixun > > > > > > ----- Original Message ----- > > > From: "Matthew Knepley" > > > To: > > > Sent: Thursday, November 02, 2006 10:27 PM > > > Subject: Re: how to use PetscMap? > > > > > > > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > > > > > Matt > > > > > > > > On 11/2/06, Yixun Liu wrote: > > > >> Hi, > > > >> > > > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > > > >> > > > >> Best, > > > >> > > > >> Yixun > > > >> > > > >> ----- Original Message ----- > > > >> From: "Matthew Knepley" > > > >> To: > > > >> Sent: Thursday, November 02, 2006 9:56 PM > > > >> Subject: Re: how to use PetscMap? > > > >> > > > >> > > > >> > There is no replacement. What are you tring to do here? > > > >> > > > > >> > Matt > > > >> > > > > >> > On 11/2/06, Yixun Liu wrote: > > > >> >> Hi, > > > >> >> > > > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > > > >> >> > > > >> >> PetscMap map; > > > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > > > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > > > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > > > >> >> > > > >> >> If 2.3.2 does not support PetscMap, which class should I use? > > > >> >> > > > >> >> Best, > > > >> >> > > > >> >> Yixun > > > >> >> > > > >> >> > > > >> >> > > > >> >> ----- Original Message ----- > > > >> >> From: "Matthew Knepley" > > > >> >> To: > > > >> >> Sent: Thursday, November 02, 2006 9:07 PM > > > >> >> Subject: Re: how to use PetscMap? > > > >> >> > > > >> >> > > > >> >> > No, in 2.3.2 PetscMap no longer exists. > > > >> >> > > > > >> >> > Matt > > > >> >> > > > > >> >> > On 11/2/06, Yixun Liu wrote: > > > >> >> >> > > > >> >> >> > > > >> >> >> Hi, > > > >> >> >> > > > >> >> >> I reveive the error as, > > > >> >> >> > > > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > > > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > > > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > > > >> >> >> [0]PETSC ERROR: --------------------- Error Message > > > >> >> >> ------------------------------------ > > > >> >> >> [0]PETSC ERROR: Signal received! > > > >> >> >> [0]PETSC ERROR: > > > >> >> >> ------------------------------------------------------------------------ > > > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > > > >> >> >> CDT 2006 HG revision: > > > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > > > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > > > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > > > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > > > >> >> >> [0]PETSC ERROR: > > > >> >> >> ------------------------------------------------------------------------ > > > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > > > >> >> >> Thu Nov 02 16:22:47 2006 > > > >> >> >> [0]PETSC ERROR: Libraries linked from > > > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > > > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > > > >> >> >> [0]PETSC ERROR: Configure options > > > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > > > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > > > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > > > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > > > >> >> >> [0]PETSC ERROR: > > > >> >> >> ------------------------------------------------------------------------ > > > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > > > >> >> >> file > > > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > > > >> >> >> code. > > > >> >> >> > > > >> >> >> job aborted: > > > >> >> >> rank: node: exit code[: error message] > > > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > > > >> >> >> process 0 > > > >> >> >> > > > >> >> >> I think this error maybe caused by these codes, > > > >> >> >> > > > >> >> >> PetscMap *map; > > > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > > > >> >> >> CHKERRQ(ierr); > > > >> >> >> ierr = PetscMapSetSize (map, n); > > > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > > > >> >> >> CHKERRQ(ierr); > > > >> >> >> > > > >> >> >> Is it correct to use the PetscMap like this? > > > >> >> >> > > > >> >> >> Best, > > > >> >> >> > > > >> >> >> Yixun > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> > > > > >> >> > > > > >> >> > -- > > > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > >> >> > Alec Guiness > > > >> >> > > > > >> >> > > > >> >> > > > >> > > > > >> > > > > >> > -- > > > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > >> > Alec Guiness > > > >> > > > > >> > > > >> > > > > > > > > > > > > -- > > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > > Alec Guiness > > > > > > > > > > > > > > > > From bsmith at mcs.anl.gov Thu Nov 2 21:37:56 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 2 Nov 2006 21:37:56 -0600 (CST) Subject: how to use PetscMap? In-Reply-To: <008801c6fef5$e98dba20$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> <006c01c6fef2$3aa54c10$3364a8c0@dmrc6700512> <008801c6fef5$e98dba20$3364a8c0@dmrc6700512> Message-ID: You need to set the size before calling PetscMapInitialize On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > I did as you said, > > PetscMap map; > // PetscMapSetBlockSize(&map,n); > map.bs = 1; > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); > ierr = PetscMapSetSize (&map, n); > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > The running error is, > > [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > [0]PETSC ERROR: --------------------- Error Message ------------------------------------ > [0]PETSC ERROR: Signal received! > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 CDT 2006 HG revision: 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: D:\MyVC\PETSCTest\PETSCTemplate\Debug\PETSCTemplate.exe on a cygwin-cx named DMRC-6700512 by DMRC-user Fri Nov 03 11:10:22 2006 > [0]PETSC ERROR: Libraries linked from /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > [0]PETSC ERROR: Configure options --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file > unable to read the cmd header on the pmi context, Undefined dynamic error code. > > job aborted: > rank: node: exit code[: error message] > 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 > > Best, > > Yixun > > > > > > > > > ----- Original Message ----- > From: "Barry Smith" > To: > Sent: Friday, November 03, 2006 10:51 AM > Subject: Re: how to use PetscMap? > > > > Sorry about this; you can just use map->bs = 1; before the call to > PetscMapInitialize() > > Barry > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > Hi, > > I do not use PetscMapSetBlockSize firstly and it is ok with compiler. > > > > PetscMap map; > > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); > > ierr = PetscMapSetSize (&map, n); > > CHKERRQ(ierr); > > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > > > > > > > However,the running error is: > > > > [0]PETSC ERROR: --------------------- Error Message ------------------------------------ > > [0]PETSC ERROR: Object is in wrong state! > > [0]PETSC ERROR: BlockSize not yet set! > > [0]PETSC ERROR: ------------------------------------------------------------------------ > > [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 CDT 2006 HG revision: 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > > [0]PETSC ERROR: See docs/index.html for manual pages. > > [0]PETSC ERROR: ------------------------------------------------------------------------ > > [0]PETSC ERROR: D:\MyVC\PETSCTest\PETSCTemplate\Debug\PETSCTemplate.exe on a cygwin-cx named DMRC-6700512 by DMRC-user Fri Nov 03 10:26:11 2006 > > [0]PETSC ERROR: Libraries linked from /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > > [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > > [0]PETSC ERROR: Configure options --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > > [0]PETSC ERROR: ------------------------------------------------------------------------ > > [0]PETSC ERROR: PetscMapInitialize() line 44 in src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > > Norm of error 0.00110997 iterations 44 > > 0.0702505 > > > > Yixun > > > > > > > > > > > > ----- Original Message ----- > > From: "Barry Smith" > > To: > > Sent: Friday, November 03, 2006 10:30 AM > > Subject: Re: how to use PetscMap? > > > > > > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > > > Hi, > > > I use PetscMap as below, > > > > > > PetscMap map; > > > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); CHKERRQ(ierr); > > > ierr = PetscMapSetBlockSize(&map,n); CHKERRQ(ierr); > > > > You do not need to use PetscMapSetBlockSize(), in it extraordinarily unlikely > > you want to set it to n. > > > > > ierr = PetscMapSetSize (&map, n); CHKERRQ(ierr); > > > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); > > > > > > The compiler error is :PetscMapSetBlockSize' : undeclared identifier. I am sure I include "petscksp.h", so I think 2.3.2 does not support PetscMap. > > > > Yes, but the other functions (PetscMapInitialize() etc) are NOT undeclared, so they do exist. > > > > Barry > > > > > BTW, I am not clear about the block size. > > > > > > Best, > > > > > > Yixun > > > > > > > > > > > > ----- Original Message ----- > > > From: "Barry Smith" > > > To: > > > Sent: Friday, November 03, 2006 9:26 AM > > > Subject: Re: how to use PetscMap? > > > > > > > > > > > > Yixun > > > > > > Please read the manual pages for PetscMapInitialize, PetscMapGetLocalRange, > > > PetscMapGetGlobalRange etc. > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/PetscMapInitialize.html > > > I told you about PetscMapInitialize() over a week ago. > > > > > > You should not need to broadcast these simple tasks to everyone; you should be > > > able to use the manual pages to handle this trivial stuff. > > > > > > Barry > > > > > > > > > > > > > > > On Fri, 3 Nov 2006, Yixun Liu wrote: > > > > > > > Hi, > > > > For example, if N is known, I call PetscSplitOwnership(PETSC_COMM, PETSC_DECIDE , &N) . However, how to get the start and end value like PetscMapGetLocalRange?????? > > > > > > > > Best, > > > > > > > > Yixun > > > > > > > > ----- Original Message ----- > > > > From: "Matthew Knepley" > > > > To: > > > > Sent: Thursday, November 02, 2006 10:27 PM > > > > Subject: Re: how to use PetscMap? > > > > > > > > > > > > > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html > > > > > > > > > > Matt > > > > > > > > > > On 11/2/06, Yixun Liu wrote: > > > > >> Hi, > > > > >> > > > > >> I want to use PetscMap to gets the range of values owned by this process, e.g.,PetscMapGetLocalRange(map,&Istart,&Iend). Then according to Istart and Iend to determine the parameters used by MatCreateMPIAIJ to create a matrix. > > > > >> > > > > >> Best, > > > > >> > > > > >> Yixun > > > > >> > > > > >> ----- Original Message ----- > > > > >> From: "Matthew Knepley" > > > > >> To: > > > > >> Sent: Thursday, November 02, 2006 9:56 PM > > > > >> Subject: Re: how to use PetscMap? > > > > >> > > > > >> > > > > >> > There is no replacement. What are you tring to do here? > > > > >> > > > > > >> > Matt > > > > >> > > > > > >> > On 11/2/06, Yixun Liu wrote: > > > > >> >> Hi, > > > > >> >> > > > > >> >> I want to change the code, which is based on old version PETSC to version 2.3.2. The old petsc code are, > > > > >> >> > > > > >> >> PetscMap map; > > > > >> >> ierr = PetscMapCreateMPI(PETSC_COMM_WORLD,PETSC_DECIDE,n,&map);CHKERRQ(ierr); > > > > >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); CHKERRQ(ierr); > > > > >> >> ierr = PetscMapDestroy(map); CHKERRQ(ierr); > > > > >> >> > > > > >> >> If 2.3.2 does not support PetscMap, which class should I use? > > > > >> >> > > > > >> >> Best, > > > > >> >> > > > > >> >> Yixun > > > > >> >> > > > > >> >> > > > > >> >> > > > > >> >> ----- Original Message ----- > > > > >> >> From: "Matthew Knepley" > > > > >> >> To: > > > > >> >> Sent: Thursday, November 02, 2006 9:07 PM > > > > >> >> Subject: Re: how to use PetscMap? > > > > >> >> > > > > >> >> > > > > >> >> > No, in 2.3.2 PetscMap no longer exists. > > > > >> >> > > > > > >> >> > Matt > > > > >> >> > > > > > >> >> > On 11/2/06, Yixun Liu wrote: > > > > >> >> >> > > > > >> >> >> > > > > >> >> >> Hi, > > > > >> >> >> > > > > >> >> >> I reveive the error as, > > > > >> >> >> > > > > >> >> >> [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/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > > > > >> >> >> ERROR: or try http://valgrind.org on linux or man libgmalloc on Apple 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] PetscMapInitialize line 41 > > > > >> >> >> src/vec/vec/impls/mpi/d:\MyVC\PETSC-~1.2-P\src\vec\vec\impls\mpi\pmap.c > > > > >> >> >> [0]PETSC ERROR: --------------------- Error Message > > > > >> >> >> ------------------------------------ > > > > >> >> >> [0]PETSC ERROR: Signal received! > > > > >> >> >> [0]PETSC ERROR: > > > > >> >> >> ------------------------------------------------------------------------ > > > > >> >> >> [0]PETSC ERROR: Petsc Release Version 2.3.2, Patch 3, Fri Sep 29 17:09:34 > > > > >> >> >> CDT 2006 HG revision: > > > > >> >> >> 9215af156a9cbcdc1ec666e2b5c7934688ddc526 > > > > >> >> >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > > > > >> >> >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > > > > >> >> >> [0]PETSC ERROR: See docs/index.html for manual pages. > > > > >> >> >> [0]PETSC ERROR: > > > > >> >> >> ------------------------------------------------------------------------ > > > > >> >> >> [0]PETSC ERROR: Unknown Name on a cygwin-cx named DMRC-6700512 by DMRC-user > > > > >> >> >> Thu Nov 02 16:22:47 2006 > > > > >> >> >> [0]PETSC ERROR: Libraries linked from > > > > >> >> >> /cygdrive/D/MyVC/petsc-2.3.2-p3/lib/cygwin-cxx-debug > > > > >> >> >> [0]PETSC ERROR: Configure run at Wed Nov 1 10:08:10 2006 > > > > >> >> >> [0]PETSC ERROR: Configure options > > > > >> >> >> --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc="win32fe cl" > > > > >> >> >> --with-fc=0 --with-cxx="win32fe cl" --with-clanguage=cxx > > > > >> >> >> --with-blas-lapack-dir=/cygdrive/D/MyVC/petsc-2.3.2-p3/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib > > > > >> >> >> COPTFLAGS="-MD -Z7" CXXOPTFLAGS="-MD -Z7" --useThreads=0 --with-shared=0 > > > > >> >> >> [0]PETSC ERROR: > > > > >> >> >> ------------------------------------------------------------------------ > > > > >> >> >> [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown > > > > >> >> >> file > > > > >> >> >> unable to read the cmd header on the pmi context, Undefined dynamic error > > > > >> >> >> code. > > > > >> >> >> > > > > >> >> >> job aborted: > > > > >> >> >> rank: node: exit code[: error message] > > > > >> >> >> 0: dmrc-6700512: 59: application called MPI_Abort(MPI_COMM_WORLD, 59) - > > > > >> >> >> process 0 > > > > >> >> >> > > > > >> >> >> I think this error maybe caused by these codes, > > > > >> >> >> > > > > >> >> >> PetscMap *map; > > > > >> >> >> ierr = PetscMapInitialize(PETSC_COMM_WORLD, map); > > > > >> >> >> CHKERRQ(ierr); > > > > >> >> >> ierr = PetscMapSetSize (map, n); > > > > >> >> >> ierr = PetscMapGetLocalRange(map,&Istart,&Iend); > > > > >> >> >> CHKERRQ(ierr); > > > > >> >> >> > > > > >> >> >> Is it correct to use the PetscMap like this? > > > > >> >> >> > > > > >> >> >> Best, > > > > >> >> >> > > > > >> >> >> Yixun > > > > >> >> >> > > > > >> >> >> > > > > >> >> >> > > > > >> >> >> > > > > >> >> > > > > > >> >> > > > > > >> >> > -- > > > > >> >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > > >> >> > Alec Guiness > > > > >> >> > > > > > >> >> > > > > >> >> > > > > >> > > > > > >> > > > > > >> > -- > > > > >> > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > > >> > Alec Guiness > > > > >> > > > > > >> > > > > >> > > > > > > > > > > > > > > > -- > > > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > > > Alec Guiness > > > > > > > > > > > > > > > > > > > > > > > > > From balay at mcs.anl.gov Thu Nov 2 21:37:49 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 2 Nov 2006 21:37:49 -0600 (CST) Subject: how to use PetscMap? In-Reply-To: <008801c6fef5$e98dba20$3364a8c0@dmrc6700512> References: <005401c6fe58$b1d0b4e0$3364a8c0@dmrc6700512> <005a01c6fe85$5a336160$3364a8c0@dmrc6700512> <006601c6fe8a$7cb73040$3364a8c0@dmrc6700512> <001701c6fee5$fede5f70$3364a8c0@dmrc6700512> <003d01c6feed$eaed1cb0$3364a8c0@dmrc6700512> <006c01c6fef2$3aa54c10$3364a8c0@dmrc6700512> <008801c6fef5$e98dba20$3364a8c0@dmrc6700512> Message-ID: On Fri, 3 Nov 2006, Yixun Liu wrote: > Hi, > I did as you said, > > PetscMap map; > // PetscMapSetBlockSize(&map,n); > map.bs = 1; > ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); > ierr = PetscMapSetSize (&map, n); > ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); The following code should work. Satish >>>>>>>>>>>>>>>>. #include "private/vecimpl.h" { PetscMap map; PetscInt Istart,Iend; ierr = PetscMemzero(&map,sizeof(map));CHKERRQ(ierr); map.bs = 1; map.N = n; /* global size */ map.n = PETSC_DECIDE; /* local size */ ierr = PetscMapInitialize(PETSC_COMM_WORLD, &map); ierr = PetscMapGetLocalRange(&map,&Istart,&Iend); CHKERRQ(ierr); ierr = PetscFree(map.range);CHKERRQ(ierr); } From mafunk at nmsu.edu Fri Nov 3 11:21:52 2006 From: mafunk at nmsu.edu (Matt Funk) Date: Fri, 3 Nov 2006 10:21:52 -0700 Subject: PETSC's hypre version In-Reply-To: References: <000801c6fd57$cc1702c0$3364a8c0@dmrc6700512> Message-ID: <200611031021.54860.mafunk@nmsu.edu> Hi, i downloaded hypre through PETSc (i.e. download-hypre=1). The hypre package it downloaded is: hypre-1.9.0b-mod I assume the 'mod' stands for modified. So i was wondering if there have been major changes to it or in what way it has been modified? The reason i am wondering is because i am thinking of trying to use hypre standalone and am wondering whether i can use these modified libraries? thanks mat From balay at mcs.anl.gov Fri Nov 3 11:34:19 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 3 Nov 2006 11:34:19 -0600 (CST) Subject: PETSC's hypre version In-Reply-To: <200611031021.54860.mafunk@nmsu.edu> References: <000801c6fd57$cc1702c0$3364a8c0@dmrc6700512> <200611031021.54860.mafunk@nmsu.edu> Message-ID: On Fri, 3 Nov 2006, Matt Funk wrote: > Hi, > > i downloaded hypre through PETSc (i.e. download-hypre=1). The hypre package it > downloaded is: hypre-1.9.0b-mod > > I assume the 'mod' stands for modified. So i was wondering if there have been > major changes to it or in what way it has been modified? The reason i am > wondering is because i am thinking of trying to use hypre standalone and am > wondering whether i can use these modified libraries? The modifications are for the following reasons: - cleanly build hypre with PETSc - avoid duplication of superlu/blas stuff. etc.. The user interface is untouched - so you should be able to use the libraries built by PETSc. However there are newer version of hypre - which you might want to explore [curently petsc uses hypre-1.11b, and the latest hypre version is hypre-1.13] Satish From mafunk at nmsu.edu Fri Nov 3 11:40:18 2006 From: mafunk at nmsu.edu (Matt Funk) Date: Fri, 3 Nov 2006 10:40:18 -0700 Subject: PETSC's hypre version In-Reply-To: References: <000801c6fd57$cc1702c0$3364a8c0@dmrc6700512> <200611031021.54860.mafunk@nmsu.edu> Message-ID: <200611031040.19595.mafunk@nmsu.edu> Thanks, mat On Friday 03 November 2006 10:34, Satish Balay wrote: > On Fri, 3 Nov 2006, Matt Funk wrote: > > Hi, > > > > i downloaded hypre through PETSc (i.e. download-hypre=1). The hypre > > package it downloaded is: hypre-1.9.0b-mod > > > > I assume the 'mod' stands for modified. So i was wondering if there have > > been major changes to it or in what way it has been modified? The reason > > i am wondering is because i am thinking of trying to use hypre standalone > > and am wondering whether i can use these modified libraries? > > The modifications are for the following reasons: > > - cleanly build hypre with PETSc > - avoid duplication of superlu/blas stuff. > > etc.. > > The user interface is untouched - so you should be able to use the > libraries built by PETSc. However there are newer version of hypre - > which you might want to explore [curently petsc uses hypre-1.11b, and > the latest hypre version is hypre-1.13] > > Satish From manav at u.washington.edu Fri Nov 3 17:34:10 2006 From: manav at u.washington.edu (Manav Bhatia) Date: Fri, 3 Nov 2006 15:34:10 -0800 Subject: Boundary Conditions and MatZeroRows Message-ID: <0B0F18BF-BCAF-4789-A0A2-C70A7B8AF014@u.washington.edu> Hi, I am trying to apply dirichlet boundary conditions in an elliptic problem, and I followed the suggestions from section 3.4 (Other Matrix Operations) in the users manual. I use the command MatrixZeroRows() to zero out the rows corresponding to the dofs that are constrained, and pass PETSC_NULL as the last argument to the function to also remove the diagonal entry. However, it seems that I am missing a point somewhere, since when I call the KSPSolve routine, I get an error saying that an empty row was found. My matrix is SeqAIJ, and I am using direct solvers. In my understanding, calling this function should remove the rows (and also the columns) from all operations, so that these dofs do not play any role in the solution. Please correct me if I am wrong. I understand that I can place a 1.0 at the diagonal, and that would solve the problem. However, as I mentioned before, I want to remove the rows and columns corresponding to the constrained dofs. Is this the right function to use for such a task? The other method, as I understand, is to extract the submatrix from the main matrix and use that for the computations. I would appreciate any help on this issue. Regards Manav From bsmith at mcs.anl.gov Fri Nov 3 19:57:14 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Fri, 3 Nov 2006 19:57:14 -0600 (CST) Subject: Boundary Conditions and MatZeroRows In-Reply-To: <0B0F18BF-BCAF-4789-A0A2-C70A7B8AF014@u.washington.edu> References: <0B0F18BF-BCAF-4789-A0A2-C70A7B8AF014@u.washington.edu> Message-ID: Manav, MatZeroRows() only zeros the rows, it does not zero the columns or remove them from the matrix. You can use MatGetSubMatrix() to pull out the part you want and solve with that smaller matrix. Barry On Fri, 3 Nov 2006, Manav Bhatia wrote: > Hi, > > I am trying to apply dirichlet boundary conditions in an elliptic problem, > and I followed the suggestions from section 3.4 (Other Matrix Operations) in > the users manual. > I use the command MatrixZeroRows() to zero out the rows corresponding to > the dofs that are constrained, and pass PETSC_NULL as the last argument to the > function to also remove the diagonal entry. However, it seems that I am > missing a point somewhere, since when I call the KSPSolve routine, I get an > error saying that an empty row was found. > > My matrix is SeqAIJ, and I am using direct solvers. In my understanding, > calling this function should remove the rows (and also the columns) from all > operations, so that these dofs do not play any role in the solution. Please > correct me if I am wrong. > > I understand that I can place a 1.0 at the diagonal, and that would solve > the problem. However, as I mentioned before, I want to remove the rows and > columns corresponding to the constrained dofs. Is this the right function to > use for such a task? The other method, as I understand, is to extract the > submatrix from the main matrix and use that for the computations. > > I would appreciate any help on this issue. > > Regards > Manav > > From jbakosi at gmu.edu Fri Nov 3 22:39:06 2006 From: jbakosi at gmu.edu (Jozsef Bakosi) Date: Fri, 03 Nov 2006 23:39:06 -0500 Subject: Boundary Conditions and MatZeroRows In-Reply-To: References: <0B0F18BF-BCAF-4789-A0A2-C70A7B8AF014@u.washington.edu> Message-ID: <20061104043906.GB13255@debian.scs.gmu.edu> Manav, I'm just curious. Why don't you want to place a 1.0 in the main diagonal and solve it like that? Why do the boundary rows and columns have to be specifically removed? Jozsef On Fri, Nov 03, 2006 at 07:57:14PM -0600, Barry Smith wrote: > > Manav, > > MatZeroRows() only zeros the rows, it does not zero the columns or > remove them from the matrix. > > You can use MatGetSubMatrix() to pull out the part you want and solve > with that smaller matrix. > > Barry > > > On Fri, 3 Nov 2006, Manav Bhatia wrote: > > > Hi, > > > > I am trying to apply dirichlet boundary conditions in an elliptic problem, > > and I followed the suggestions from section 3.4 (Other Matrix Operations) in > > the users manual. > > I use the command MatrixZeroRows() to zero out the rows corresponding to > > the dofs that are constrained, and pass PETSC_NULL as the last argument to the > > function to also remove the diagonal entry. However, it seems that I am > > missing a point somewhere, since when I call the KSPSolve routine, I get an > > error saying that an empty row was found. > > > > My matrix is SeqAIJ, and I am using direct solvers. In my understanding, > > calling this function should remove the rows (and also the columns) from all > > operations, so that these dofs do not play any role in the solution. Please > > correct me if I am wrong. > > > > I understand that I can place a 1.0 at the diagonal, and that would solve > > the problem. However, as I mentioned before, I want to remove the rows and > > columns corresponding to the constrained dofs. Is this the right function to > > use for such a task? The other method, as I understand, is to extract the > > submatrix from the main matrix and use that for the computations. > > > > I would appreciate any help on this issue. > > > > Regards > > Manav > > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From manav at u.washington.edu Fri Nov 3 23:59:00 2006 From: manav at u.washington.edu (Manav Bhatia) Date: Fri, 3 Nov 2006 21:59:00 -0800 Subject: Boundary Conditions and MatZeroRows In-Reply-To: <20061104043906.GB13255@debian.scs.gmu.edu> References: <0B0F18BF-BCAF-4789-A0A2-C70A7B8AF014@u.washington.edu> <20061104043906.GB13255@debian.scs.gmu.edu> Message-ID: Well, the primary reason is that I am using the same matrices for a linear solution, as well as an eigen solution. The problem with keeping 1.0 at the diagonal is that it induces spurious modes and eigenvalues in the eigensolution, and might even hide an actual eigenvalue. Also, in my recent experience, this method has been giving me convergence problems for both linear as well as eigen solutions. (I use slepc for eigensolution). This was my motivation to remove the constrained dofs, and work with a reduced matrix. I thank Barry Smith for his response to my question. Reagrds, Manav On Nov 3, 2006, at 8:39 PM, Jozsef Bakosi wrote: > Manav, > > I'm just curious. Why don't you want to place a 1.0 in the main > diagonal > and solve it like that? Why do the boundary rows and columns have > to be > specifically removed? > > Jozsef > > On Fri, Nov 03, 2006 at 07:57:14PM -0600, Barry Smith wrote: >> >> Manav, >> >> MatZeroRows() only zeros the rows, it does not zero the >> columns or >> remove them from the matrix. >> >> You can use MatGetSubMatrix() to pull out the part you want >> and solve >> with that smaller matrix. >> >> Barry >> >> >> On Fri, 3 Nov 2006, Manav Bhatia wrote: >> >>> Hi, >>> >>> I am trying to apply dirichlet boundary conditions in an >>> elliptic problem, >>> and I followed the suggestions from section 3.4 (Other Matrix >>> Operations) in >>> the users manual. >>> I use the command MatrixZeroRows() to zero out the rows >>> corresponding to >>> the dofs that are constrained, and pass PETSC_NULL as the last >>> argument to the >>> function to also remove the diagonal entry. However, it seems >>> that I am >>> missing a point somewhere, since when I call the KSPSolve >>> routine, I get an >>> error saying that an empty row was found. >>> >>> My matrix is SeqAIJ, and I am using direct solvers. In my >>> understanding, >>> calling this function should remove the rows (and also the >>> columns) from all >>> operations, so that these dofs do not play any role in the >>> solution. Please >>> correct me if I am wrong. >>> >>> I understand that I can place a 1.0 at the diagonal, and that >>> would solve >>> the problem. However, as I mentioned before, I want to remove the >>> rows and >>> columns corresponding to the constrained dofs. Is this the right >>> function to >>> use for such a task? The other method, as I understand, is to >>> extract the >>> submatrix from the main matrix and use that for the computations. >>> >>> I would appreciate any help on this issue. >>> >>> Regards >>> Manav >>> >>> >> From yxliu at fudan.edu.cn Sat Nov 4 00:15:42 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Sat, 04 Nov 2006 14:15:42 +0800 Subject: about PETSC run time lib Message-ID: <000c01c6ffd8$a87a6450$3364a8c0@dmrc6700512> Hi, I config PETSC with, $ ./config/configure.py --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc='win32fe cl' --with-fc=0 --with-cxx='win32fe cl' --with-clanguage=cxx --with-blas-lapack-dir=$PETSC_DIR/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS='-MD -Z7' CXXOPTFLAGS='-MD -Z7' In my applicaton I use another lib, which use Debug multithread DLL run time lib. When I use this two libs together I alwayse receive the warning : "LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library". I think this is because PETSC use MSVCRT run time lib and the other lib use MSVCRTD run time lib. If I ignore this warning the application will run into exception. So I need to config the PETSC to let it use the same run time lib. Should I use COPTFLAGS='-MDd -Z7' CXXOPTFLAGS='-MDd -Z7'? Best, Yixun -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Sat Nov 4 08:54:12 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Sat, 4 Nov 2006 08:54:12 -0600 (CST) Subject: about PETSC run time lib In-Reply-To: <000c01c6ffd8$a87a6450$3364a8c0@dmrc6700512> References: <000c01c6ffd8$a87a6450$3364a8c0@dmrc6700512> Message-ID: On Sat, 4 Nov 2006, Yixun Liu wrote: > Hi, > I config PETSC with, > $ ./config/configure.py --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc='win32fe cl' --with-fc=0 --with-cxx='win32fe cl' --with-clanguage=cxx --with-blas-lapack-dir=$PETSC_DIR/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS='-MD -Z7' CXXOPTFLAGS='-MD -Z7' > > In my applicaton I use another lib, which use Debug multithread DLL run time lib. When I use this two libs together I alwayse receive the warning : > "LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library". > I think this is because PETSC use MSVCRT run time lib and the other lib use MSVCRTD run time lib. If I ignore this warning the application will run into exception. So I need to config the PETSC to let it use the same run time lib. Should I use COPTFLAGS='-MDd -Z7' CXXOPTFLAGS='-MDd -Z7'? I think both options are the same - and PETSc is attempting to use MSVCRTD.lib. You can verify with: cd lib/$PETSC_ARCH/ strings *.lib |grep defaultlib | sort | uniq If you think there is a difference - rebuild with the appropriate compiler options you need. Satish From liuchangjohn at gmail.com Mon Nov 6 20:49:34 2006 From: liuchangjohn at gmail.com (liu chang) Date: Tue, 7 Nov 2006 10:49:34 +0800 Subject: Convex optimization with linear constraint? Message-ID: <94e43e390611061849h298ca884xecb0b93e077fb182@mail.gmail.com> Hi all, I'm using PETSc + TAO's LMVM method for a convex optimization problem. As the project progresses, it's clear that some linear constraints are also needed, the problem now looks like: minimize f(vec_x) (f is neither linear or quadratic, but is convex) subject to vec_x[i] >= 0 for all i A * vec_x = vec_b As LMVM does not support linear constraints, I'm looking for another solver. TAO lists several functions dealing with constraints, but they're all in the developer section, and in the samples linked from the manual I haven't found one that's linearly constrained. Is there a suitable one in TAO? If so how should I use it? If not can anyone recommend an optimization library for me? It doesn't need to be distributed like PETSc. Any suggestion is greatly appreciated. Liu Chang From yxliu at fudan.edu.cn Mon Nov 6 21:26:19 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Tue, 07 Nov 2006 11:26:19 +0800 Subject: about PETSC run time lib References: <000c01c6ffd8$a87a6450$3364a8c0@dmrc6700512> Message-ID: <001701c7021c$7dcc9d90$3364a8c0@dmrc6700512> Hi, I cofigu PETSC with COPTFLAGS='-MDd -Z7' CXXOPTFLAGS='-MDd -Z7' and no compiler warning, so both options are not same. Best, Yixun ----- Original Message ----- From: "Satish Balay" To: "PETSC" Sent: Saturday, November 04, 2006 10:54 PM Subject: Re: about PETSC run time lib > On Sat, 4 Nov 2006, Yixun Liu wrote: > >> Hi, >> I config PETSC with, >> $ ./config/configure.py --with-mpi-dir=/cygdrive/d/MPICH2 --with-cc='win32fe cl' --with-fc=0 --with-cxx='win32fe cl' --with-clanguage=cxx --with-blas-lapack-dir=$PETSC_DIR/externalpackages/w_mkl_serial_p_8.1.001/mkl_serial_8.1/mkl_8.1_serial/ia32/lib COPTFLAGS='-MD -Z7' CXXOPTFLAGS='-MD -Z7' >> >> In my applicaton I use another lib, which use Debug multithread DLL run time lib. When I use this two libs together I alwayse receive the warning : >> "LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library". >> I think this is because PETSC use MSVCRT run time lib and the other lib use MSVCRTD run time lib. If I ignore this warning the application will run into exception. So I need to config the PETSC to let it use the same run time lib. Should I use COPTFLAGS='-MDd -Z7' CXXOPTFLAGS='-MDd -Z7'? > > > I think both options are the same - and PETSc is attempting to use > MSVCRTD.lib. You can verify with: > > cd lib/$PETSC_ARCH/ > strings *.lib |grep defaultlib | sort | uniq > > > If you think there is a difference - rebuild with the appropriate > compiler options you need. > > Satish > From billy at dem.uminho.pt Tue Nov 7 22:44:07 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 8 Nov 2006 04:44:07 +0000 Subject: MatCreateMPISAIJ? Message-ID: <1162961047.455160976de0b@serv-g1.ccom.uminho.pt> Hi, I am currently using MatCreateMPIAIJ type matrices. Is there a symmetric version of this type? Like: MatCreateMPIBAIJ (non-symmetric) -> MatCreateMPISBAIJ (symmetric). MatCreateMPIAIJ (non-symmetric) -> MatCreateMPISAIJ (symmetric) ?? Billy. From hzhang at mcs.anl.gov Tue Nov 7 22:47:43 2006 From: hzhang at mcs.anl.gov (Hong Zhang) Date: Tue, 7 Nov 2006 22:47:43 -0600 (CST) Subject: MatCreateMPISAIJ? In-Reply-To: <1162961047.455160976de0b@serv-g1.ccom.uminho.pt> References: <1162961047.455160976de0b@serv-g1.ccom.uminho.pt> Message-ID: MatCreateMPIAIJ -> MatCreateMPISBAIJ (symmetric) with block size bs=1. Hong On Wed, 8 Nov 2006 billy at dem.uminho.pt wrote: > > Hi, > > > I am currently using MatCreateMPIAIJ type matrices. Is there a symmetric version > of this type? > > Like: > > MatCreateMPIBAIJ (non-symmetric) -> MatCreateMPISBAIJ (symmetric). > > MatCreateMPIAIJ (non-symmetric) -> MatCreateMPISAIJ (symmetric) ?? > > Billy. > > From billy at dem.uminho.pt Wed Nov 8 09:20:23 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 8 Nov 2006 15:20:23 +0000 Subject: MatCreateMPISAIJ? In-Reply-To: References: <1162961047.455160976de0b@serv-g1.ccom.uminho.pt> Message-ID: <1162999223.4551f5b7075ba@serv-g1.ccom.uminho.pt> What does the block size mean? Billy. Quoting Hong Zhang : > > MatCreateMPIAIJ -> MatCreateMPISBAIJ (symmetric) with block size bs=1. > > Hong > > On Wed, 8 Nov 2006 billy at dem.uminho.pt wrote: > > > > > Hi, > > > > > > I am currently using MatCreateMPIAIJ type matrices. Is there a symmetric > version > > of this type? > > > > Like: > > > > MatCreateMPIBAIJ (non-symmetric) -> MatCreateMPISBAIJ (symmetric). > > > > MatCreateMPIAIJ (non-symmetric) -> MatCreateMPISAIJ (symmetric) ?? > > > > Billy. > > > > > > From hzhang at mcs.anl.gov Wed Nov 8 09:34:02 2006 From: hzhang at mcs.anl.gov (Hong Zhang) Date: Wed, 8 Nov 2006 09:34:02 -0600 (CST) Subject: MatCreateMPISAIJ? In-Reply-To: <1162999223.4551f5b7075ba@serv-g1.ccom.uminho.pt> References: <1162961047.455160976de0b@serv-g1.ccom.uminho.pt> <1162999223.4551f5b7075ba@serv-g1.ccom.uminho.pt> Message-ID: petsc supports many sparse matrix storage formats, in which aij for compressed sparse row format baij for block compressed sparse row format sbaij for symmetric block compressed sparse row format. When block size bs=1, baij format is same as aij, and sbaij format is same as aij without storing the lower triangular entries. Hong On Wed, 8 Nov 2006 billy at dem.uminho.pt wrote: > > What does the block size mean? > > Billy. > > Quoting Hong Zhang : > > > > > MatCreateMPIAIJ -> MatCreateMPISBAIJ (symmetric) with block size bs=1. > > > > Hong > > > > On Wed, 8 Nov 2006 billy at dem.uminho.pt wrote: > > > > > > > > Hi, > > > > > > > > > I am currently using MatCreateMPIAIJ type matrices. Is there a symmetric > > version > > > of this type? > > > > > > Like: > > > > > > MatCreateMPIBAIJ (non-symmetric) -> MatCreateMPISBAIJ (symmetric). > > > > > > MatCreateMPIAIJ (non-symmetric) -> MatCreateMPISAIJ (symmetric) ?? > > > > > > Billy. > > > > > > > > > > > > > From billy at dem.uminho.pt Wed Nov 8 09:39:04 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 8 Nov 2006 15:39:04 +0000 Subject: MatCreateMPISAIJ? In-Reply-To: References: <1162961047.455160976de0b@serv-g1.ccom.uminho.pt> <1162999223.4551f5b7075ba@serv-g1.ccom.uminho.pt> Message-ID: <1163000344.4551fa18a87cc@serv-g1.ccom.uminho.pt> Thanks for the info. Quoting Hong Zhang : > > petsc supports many sparse matrix storage formats, in which > aij for compressed sparse row format > baij for block compressed sparse row format > sbaij for symmetric block compressed sparse row format. > When block size bs=1, baij format is same as aij, > and sbaij format is same as aij without storing the > lower triangular entries. > > Hong > > On Wed, 8 Nov 2006 billy at dem.uminho.pt wrote: > > > > > What does the block size mean? > > > > Billy. > > > > Quoting Hong Zhang : > > > > > > > > MatCreateMPIAIJ -> MatCreateMPISBAIJ (symmetric) with block size bs=1. > > > > > > Hong > > > > > > On Wed, 8 Nov 2006 billy at dem.uminho.pt wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I am currently using MatCreateMPIAIJ type matrices. Is there a > symmetric > > > version > > > > of this type? > > > > > > > > Like: > > > > > > > > MatCreateMPIBAIJ (non-symmetric) -> MatCreateMPISBAIJ (symmetric). > > > > > > > > MatCreateMPIAIJ (non-symmetric) -> MatCreateMPISAIJ (symmetric) ?? > > > > > > > > Billy. > > > > > > > > > > > > > > > > > > > > > > From billy at dem.uminho.pt Wed Nov 8 10:58:17 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 8 Nov 2006 16:58:17 +0000 Subject: Symmetric matrices. Message-ID: <1163005097.45520ca91600c@serv-g1.ccom.uminho.pt> Hi, Which solvers are more appropriate for symmetric matrices? Billy. From hzhang at mcs.anl.gov Wed Nov 8 11:12:44 2006 From: hzhang at mcs.anl.gov (Hong Zhang) Date: Wed, 8 Nov 2006 11:12:44 -0600 (CST) Subject: Symmetric matrices. In-Reply-To: <1163005097.45520ca91600c@serv-g1.ccom.uminho.pt> References: <1163005097.45520ca91600c@serv-g1.ccom.uminho.pt> Message-ID: > Which solvers are more appropriate for symmetric matrices? Iterative solvers: ksp_type cg, pc_type icc Direct solvers: ksp_type preonly, pc_type cc Non-symmetric solvers also work, but the above solvers are more efficient in general. You can run petsc code with various ksp/pc combinations, and use the option '-log_summary' to evaluate the performance. Using '-help' to see all solver options. Hong From billy at dem.uminho.pt Sun Nov 12 14:28:22 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Sun, 12 Nov 2006 20:28:22 +0000 Subject: zero pivot Message-ID: <1163363302.455783e672c3b@serv-g1.ccom.uminho.pt> I am getting zero pivot errors. I know the matrix has a high condition number. see http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#ZeroPivot! [12]PETSC ERROR: Zero pivot row 3556 value 6.56537e-13 tolerance 1e-12 * rs 0.727229! [12]PETSC ERROR: MatLUFactorNumeric() line 2212 in src/mat/interface/matrix.c [12]PETSC ERROR: PCSetUp_ILU() line 551 in src/ksp/pc/impls/factor/ilu/ilu.c [12]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c [12]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c [12]PETSC ERROR: PCSetUpOnBlocks_ASM() line 224 in src/ksp/pc/impls/asm/asm.c [12]PETSC ERROR: PCSetUpOnBlocks() line 831 in src/ksp/pc/interface/precon.c [12]PETSC ERROR: KSPSetUpOnBlocks() line 158 in src/ksp/ksp/interface/itfunc.c [12]PETSC ERROR: KSPSolve() line 335 in src/ksp/ksp/interface/itfunc.c When I use -sub_pc_factor_shift_nonzero and -pc_factor_zeropivot 1E-18 I get: [10]PETSC ERROR: Caught signal number 8 FPE: Floating Point Exception,probably divide by zero [10]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [10]PETSC ERROR: or try http://valgrind.org on linux to find memory corruption errors [10]PETSC ERROR: likely location of problem given in stack below [10]PETSC ERROR: --------------- Stack Frames --------------- [10]PETSC ERROR: Note: The EXACT line numbers in the stack are not available, [10]PETSC ERROR: INSTEAD the line number of the start of the function [10]PETSC ERROR: is given. [10]PETSC ERROR: [10] VecDot_MPI line 25 src/vec/vec/impls/mpi/pbvec.c [10]PETSC ERROR: [10] VecDot line 86 src/vec/vec/interface/rvector.c [10]PETSC ERROR: [10] KSPSolve_BCGS line 29 src/ksp/ksp/impls/bcgs/bcgs.c [10]PETSC ERROR: -------------------------------------------- [10]PETSC ERROR: User provided function() line 0 in unknown directory unknown file [10]PETSC ERROR: Signal received! [10]PETSC ERROR: ! Is there anyway to solve this? From billy at dem.uminho.pt Mon Nov 13 20:00:27 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Tue, 14 Nov 2006 02:00:27 +0000 Subject: Symmetric matrices. In-Reply-To: References: <1163005097.45520ca91600c@serv-g1.ccom.uminho.pt> Message-ID: <1163469627.4559233b8a69a@serv-g1.ccom.uminho.pt> Does the direct solver work in parallel? Because when I try it with more than 1 processor, I get: [0]PETSC ERROR: MatCholeskyFactorSymbolic() line 2319 in src/mat/interface/matrix.c [0]PETSC ERROR: No support for this operation for this object type! [0]PETSC ERROR: Mat type mpisbaij! [0]PETSC ERROR: PCSetUp_Cholesky() line 237 in src/ksp/pc/impls/factor/cholesky/cholesky.c [0]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c [0]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: KSPSolve() line 334 in src/ksp/ksp/interface/itfunc.c [1]PETSC ERROR: MatCholeskyFactorSymbolic() line 2319 in src/mat/interface/matrix.c [1]PETSC ERROR: No support for this operation for this object type! [1]PETSC ERROR: Mat type mpisbaij! [1]PETSC ERROR: PCSetUp_Cholesky() line 237 in src/ksp/pc/impls/factor/cholesky/cholesky.c [1]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c [1]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c [1]PETSC ERROR: KSPSolve() line 334 in src/ksp/ksp/interface/itfunc.c Billy. Quoting Hong Zhang : > > > Which solvers are more appropriate for symmetric matrices? > > Iterative solvers: ksp_type cg, pc_type icc > Direct solvers: ksp_type preonly, pc_type cc > > Non-symmetric solvers also work, but the above solvers > are more efficient in general. > > You can run petsc code with various ksp/pc combinations, > and use the option '-log_summary' to evaluate the performance. > Using '-help' to see all solver options. > > Hong > > From bsmith at mcs.anl.gov Mon Nov 13 20:11:11 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Mon, 13 Nov 2006 20:11:11 -0600 (CST) Subject: Symmetric matrices. In-Reply-To: <1163469627.4559233b8a69a@serv-g1.ccom.uminho.pt> References: <1163005097.45520ca91600c@serv-g1.ccom.uminho.pt> <1163469627.4559233b8a69a@serv-g1.ccom.uminho.pt> Message-ID: You need to install PETSc with the external package Spooles or MUMPS for parallel direct solvers. Barry Click on the links from http://www-unix.mcs.anl.gov/petsc/petsc-as/documentation/linearsolvertable.html for how to use them. On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote: > > > Does the direct solver work in parallel? Because when I try it with more than 1 > processor, I get: > > [0]PETSC ERROR: MatCholeskyFactorSymbolic() line 2319 in src/mat/interface/matrix.c > [0]PETSC ERROR: No support for this operation for this object type! > [0]PETSC ERROR: Mat type mpisbaij! > [0]PETSC ERROR: PCSetUp_Cholesky() line 237 in > src/ksp/pc/impls/factor/cholesky/cholesky.c > [0]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: KSPSolve() line 334 in src/ksp/ksp/interface/itfunc.c > [1]PETSC ERROR: MatCholeskyFactorSymbolic() line 2319 in src/mat/interface/matrix.c > [1]PETSC ERROR: No support for this operation for this object type! > [1]PETSC ERROR: Mat type mpisbaij! > [1]PETSC ERROR: PCSetUp_Cholesky() line 237 in > src/ksp/pc/impls/factor/cholesky/cholesky.c > [1]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c > [1]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c > [1]PETSC ERROR: KSPSolve() line 334 in src/ksp/ksp/interface/itfunc.c > > > Billy. > > Quoting Hong Zhang : > > > > > > Which solvers are more appropriate for symmetric matrices? > > > > Iterative solvers: ksp_type cg, pc_type icc > > Direct solvers: ksp_type preonly, pc_type cc > > > > Non-symmetric solvers also work, but the above solvers > > are more efficient in general. > > > > You can run petsc code with various ksp/pc combinations, > > and use the option '-log_summary' to evaluate the performance. > > Using '-help' to see all solver options. > > > > Hong > > > > > > > From billy at dem.uminho.pt Tue Nov 14 17:18:55 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Tue, 14 Nov 2006 23:18:55 +0000 Subject: PETSC debug Message-ID: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> Hi, I was running my code and I got FPE error on alpha machines. Using gdb the output is the following. I am using 4 processors. Program received signal SIGFPE, Arithmetic exception. 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770, zz=0x120bc9fb0) at baij2.c:260 260 while (n--) sum += *v++ * x[*idx++]; (gdb) print n $1 = 0 (gdb) print idx $2 = (PetscInt *) 0x120c7aab8 (gdb) print *idx $3 = 1710 (gdb) print v $4 = (MatScalar *) 0x120c99190 (gdb) print *v $5 = 4.0109832449655266e-12 (gdb) print x $6 = (PetscScalar *) 0x120be1690 (gdb) print x[*idx] $7 = 1.2349520920477556e-308 (gdb) print sum $8 = 0 Billy -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Tue Nov 14 19:56:42 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 14 Nov 2006 19:56:42 -0600 (CST) Subject: PETSC debug In-Reply-To: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> Message-ID: Billy, The x array contains the vector entries. It is either that 1) idx == 1710 is not a valid index or more likely 2) x[] on input has garbage values in it. Can you call VecView() on x right before or after it is passed into the MatMult? My guess is it has garbage in it from earlier in the code. Barry On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote: > > Hi, > > I was running my code and I got FPE error on alpha machines. > > Using gdb the output is the following. I am using 4 processors. > > Program received signal SIGFPE, Arithmetic exception. > 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770, > zz=0x120bc9fb0) at baij2.c:260 > 260 while (n--) sum += *v++ * x[*idx++]; > (gdb) print n > $1 = 0 > (gdb) print idx > $2 = (PetscInt *) 0x120c7aab8 > (gdb) print *idx > $3 = 1710 > (gdb) print v > $4 = (MatScalar *) 0x120c99190 > (gdb) print *v > $5 = 4.0109832449655266e-12 > (gdb) print x > $6 = (PetscScalar *) 0x120be1690 > (gdb) print x[*idx] > $7 = 1.2349520920477556e-308 > (gdb) print sum > $8 = 0 > > > Billy > From billy at dem.uminho.pt Tue Nov 14 21:32:14 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 15 Nov 2006 03:32:14 +0000 Subject: PETSC debug In-Reply-To: References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> Message-ID: <1163561534.455a8a3eea63a@serv-g1.ccom.uminho.pt> I tried call VecView(x, 0) in gdb but x is not a Vec and gives me an error. How do I print the array x? Billy. Quoting Barry Smith : > > Billy, > > The x array contains the vector entries. It is either that > 1) idx == 1710 is not a valid index or more likely > 2) x[] on input has garbage values in it. > > Can you call VecView() on x right before or after > it is passed into the MatMult? My guess is it has > garbage in it from earlier in the code. > > Barry > > On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote: > > > > > Hi, > > > > I was running my code and I got FPE error on alpha machines. > > > > Using gdb the output is the following. I am using 4 processors. > > > > Program received signal SIGFPE, Arithmetic exception. > > 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770, > > zz=0x120bc9fb0) at baij2.c:260 > > 260 while (n--) sum += *v++ * x[*idx++]; > > (gdb) print n > > $1 = 0 > > (gdb) print idx > > $2 = (PetscInt *) 0x120c7aab8 > > (gdb) print *idx > > $3 = 1710 > > (gdb) print v > > $4 = (MatScalar *) 0x120c99190 > > (gdb) print *v > > $5 = 4.0109832449655266e-12 > > (gdb) print x > > $6 = (PetscScalar *) 0x120be1690 > > (gdb) print x[*idx] > > $7 = 1.2349520920477556e-308 > > (gdb) print sum > > $8 = 0 > > > > > > Billy > > > > From billy at dem.uminho.pt Tue Nov 14 21:38:55 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 15 Nov 2006 03:38:55 +0000 Subject: PETSC debug In-Reply-To: References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> Message-ID: <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> x has very small values and some zeros. Is this a problem? (gdb) p *x at 1710 {5.6661805945484757e-226, -1.1627609243420647e-234, -3.0191454638161275e-228, 4.9827910759046858e-233, -2.0736747864315411e-242, -6.2486892875076229e-236, 7.936938687044959e-240, -2.7194212807360601e-249, -8.588425549413817e-243, 2.3024631606271122e-243, -5.9846691224557681e-252, -2.2335202330567468e-245, 9.7831244726432479e-236, -1.3552548630405792e-244, -3.495520937088327e-238, 5.4989262786345397e-243, -1.3210098902792841e-252, -3.8682663837382384e-246, 8.8387035435575233e-250, -1.8090256621813952e-259, -5.4716023064278407e-253, 3.588000018861786e-253, -6.2458537296193104e-262, -2.3148026340361519e-255, 1.0977920182613153e-245, -1.0249411693868054e-254, -2.6419424389659324e-248, 3.9853740743647345e-253, -5.4255411897492446e-263, -1.5685468152877737e-256, 6.4972881272145346e-260, -7.7132606040774855e-270, -2.2883458301363077e-263, 3.7376905182602783e-263, -4.3589162441629927e-272, -1.6122153535564706e-265, 5.4679961341990742e-256, -3.4946761363871895e-265, -9.0506057005070676e-259, 1.2625051605987276e-263, -9.8127138874528815e-274, -2.8171459920204651e-267, 2.1144094764316537e-270, -1.4661783326174102e-280, -4.3021011674687748e-274, 1.7171839888390158e-273, -1.355360583021068e-282, -5.0256495711998189e-276, 2.3441225393534538e-275, -1.4167665839646082e-284, -9.5098664261506559e-276, 5.8664086258683721e-265, -5.2303663615699708e-274, -3.4638320353774473e-265, 7.1774245671418306e-255, -9.5315249514698032e-264, -6.22580454316614e-255, 4.3135135163622493e-245, -8.6106571400568118e-254, -5.54411948811998e-245, 1.2782302660591342e-235, -3.8700430138360975e-244, -2.4540088843175776e-235, 1.8714298666616161e-226, -8.667061714016371e-235, -5.4046157807505651e-226, 1.3558688389339507e-217, -9.6883371298320722e-226, ---Type to continue, or q to quit--- -5.9285856500623996e-217, 4.8468289723098665e-209, -5.3857466678811828e-217, -3.2242188218384035e-208, 8.4534293726532241e-201, -1.4738192384650725e-208, -8.5980759783639217e-200, 6.907091796675751e-193, -1.9033438119138147e-200, -1.0763770568701642e-191, 2.6478532383011193e-272, -1.4903005865209107e-282, -7.7998156143119667e-274, 9.305780800265163e-262, -8.8839704462246742e-272, -4.5901635372628567e-263, 1.6034530482636144e-251, -2.6131364216028464e-261, -1.3303679068670779e-252, 1.3592022238328847e-241, -3.7997620105273078e-251, -1.9017131279478928e-242, 5.6792247063849799e-232, -2.7364107576938111e-241, -1.3423648502867758e-232, 1.1692077782649843e-222, -9.7510387600061777e-232, -4.6696270174942923e-223, 1.1853783027581269e-213, -1.7218922665317482e-222, -8.0083000299810735e-214, 5.8785159049366656e-205, -1.495807982671848e-213, -6.7077377611273877e-205, 1.4070570606363661e-196, -6.3472382608798458e-205, -2.7230139900247648e-196, 1.5497123236581113e-188, -1.2485875796131097e-196, -5.0753617625768587e-188, 1.5434660362531493e-265, -9.6427364575548134e-276, -4.9469124048614407e-267, 5.5771128650726324e-255, -6.0715211415635001e-265, -3.0557860054339049e-256, 9.7596266862900188e-245, -1.8630746938040184e-254, -9.1835699478680429e-246, 8.400502948812723e-235, -2.8372007398618318e-244, -1.365943291479874e-235, 3.5683163152848973e-225, -2.1529642010355749e-234, -1.0086136614457182e-225, 7.470797689290204e-216, -8.1244038233290801e-225, -3.6841086790658924e-216, 7.6946486289534802e-207, -1.5231479988588442e-215, -6.6343355238597203e-207, 3.8658097394017472e-198, -1.4018784919234662e-206, -5.7883232195093694e-198, 9.3704091845606854e-190, -6.2833327107970169e-198, -2.4015591026235036e-189, 1.0604778036924017e-181, -1.3130129893123058e-189, ---Type to continue, or q to quit--- -4.3944520676710034e-181, 5.3191550180698584e-174, -1.2276467039908345e-181, 6.582654853774009e-258, -3.6960150023175459e-267, -1.541051696004311e-258, 1.5081568307026851e-247, -1.2291453940848028e-256, -5.045748607868979e-248, 1.6985391993644289e-237, -2.0388029995970922e-246, -8.2307676982689932e-238, 9.31882138782716e-228, -1.6611812318932581e-236, -6.5847692143411066e-228, 2.4911590486436157e-218, -6.6411748999525368e-227, -2.578412473673239e-218, 3.2461544324197385e-209, -1.3019895450678336e-217, -4.930407732106102e-209, 2.0647053899839311e-200, -1.2536927838659388e-208, -4.5973820374997486e-200, 6.3999453950640209e-192, -5.9162039831540975e-200, -2.0733460339667467e-191, 9.6386220362933024e-184, -1.3685224770731774e-191, -4.468872196846956e-183, 6.9383373250314803e-176, -1.5267617834505389e-183, -4.3847638022619328e-175, 2.2993251811195029e-168, -8.018740019783814e-176, 8.0187312547169491e-280, -1.9681088822187587e-289, -8.6000837193564188e-281, 2.4418184153863893e-291, -3.6413466395574048e-301, -1.6520119055708723e-292, 6.2083711391797733e-303, 0, -2.7166342721641981e-304, 0 , 1.3382706765032754e-300, 0, -3.7946354577853773e-304, 6.3527319749529548e-289, -1.0316342902978391e-298, -2.7857994540718757e-292, 1.3926426017545835e-277, -3.7119818003349503e-287, -9.8649586986765956e-281...} Billy. Quoting Barry Smith : > > Billy, > > The x array contains the vector entries. It is either that > 1) idx == 1710 is not a valid index or more likely > 2) x[] on input has garbage values in it. > > Can you call VecView() on x right before or after > it is passed into the MatMult? My guess is it has > garbage in it from earlier in the code. > > Barry > > On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote: > > > > > Hi, > > > > I was running my code and I got FPE error on alpha machines. > > > > Using gdb the output is the following. I am using 4 processors. > > > > Program received signal SIGFPE, Arithmetic exception. > > 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770, > > zz=0x120bc9fb0) at baij2.c:260 > > 260 while (n--) sum += *v++ * x[*idx++]; > > (gdb) print n > > $1 = 0 > > (gdb) print idx > > $2 = (PetscInt *) 0x120c7aab8 > > (gdb) print *idx > > $3 = 1710 > > (gdb) print v > > $4 = (MatScalar *) 0x120c99190 > > (gdb) print *v > > $5 = 4.0109832449655266e-12 > > (gdb) print x > > $6 = (PetscScalar *) 0x120be1690 > > (gdb) print x[*idx] > > $7 = 1.2349520920477556e-308 > > (gdb) print sum > > $8 = 0 > > > > > > Billy > > > > From billy at dem.uminho.pt Wed Nov 15 11:40:32 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 15 Nov 2006 17:40:32 +0000 Subject: PETSC debug. Message-ID: <1163612432.455b51109eb4e@serv-g1.ccom.uminho.pt> Hi, Running another case. I got also a FPE. This is the output of gdb: Program received signal SIGFPE, Arithmetic exception. 0x1204efc4c in VecNorm_MPI (xin=0x120d626d0, type=NORM_2, z=0x11fffe690) at pvec2.c:80 80 work *= work; (gdb) p work $1 = 7.7555804021556748e+161 Billy. From bsmith at mcs.anl.gov Wed Nov 15 13:58:58 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 15 Nov 2006 13:58:58 -0600 (CST) Subject: PETSC debug In-Reply-To: <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> Message-ID: These numbers are all garbage (tiny numbers like this very, very, very rarely appear). It looks like the vector or the array you are using is not being initialized or is getting totally written over incorrectly. Barry On Wed, 15 Nov 2006, billy at dem.uminho.pt wrote: > > x has very small values and some zeros. Is this a problem? > > > (gdb) p *x at 1710 > > {5.6661805945484757e-226, -1.1627609243420647e-234, > -3.0191454638161275e-228, 4.9827910759046858e-233, -2.0736747864315411e-242, > -6.2486892875076229e-236, 7.936938687044959e-240, -2.7194212807360601e-249, > -8.588425549413817e-243, 2.3024631606271122e-243, -5.9846691224557681e-252, > -2.2335202330567468e-245, 9.7831244726432479e-236, -1.3552548630405792e-244, > -3.495520937088327e-238, 5.4989262786345397e-243, -1.3210098902792841e-252, > -3.8682663837382384e-246, 8.8387035435575233e-250, -1.8090256621813952e-259, > -5.4716023064278407e-253, 3.588000018861786e-253, -6.2458537296193104e-262, > -2.3148026340361519e-255, 1.0977920182613153e-245, -1.0249411693868054e-254, > -2.6419424389659324e-248, 3.9853740743647345e-253, -5.4255411897492446e-263, > -1.5685468152877737e-256, 6.4972881272145346e-260, -7.7132606040774855e-270, > -2.2883458301363077e-263, 3.7376905182602783e-263, -4.3589162441629927e-272, > -1.6122153535564706e-265, 5.4679961341990742e-256, -3.4946761363871895e-265, > -9.0506057005070676e-259, 1.2625051605987276e-263, -9.8127138874528815e-274, > -2.8171459920204651e-267, 2.1144094764316537e-270, -1.4661783326174102e-280, > -4.3021011674687748e-274, 1.7171839888390158e-273, -1.355360583021068e-282, > -5.0256495711998189e-276, 2.3441225393534538e-275, -1.4167665839646082e-284, > -9.5098664261506559e-276, 5.8664086258683721e-265, -5.2303663615699708e-274, > -3.4638320353774473e-265, 7.1774245671418306e-255, -9.5315249514698032e-264, > -6.22580454316614e-255, 4.3135135163622493e-245, -8.6106571400568118e-254, > -5.54411948811998e-245, 1.2782302660591342e-235, -3.8700430138360975e-244, > -2.4540088843175776e-235, 1.8714298666616161e-226, -8.667061714016371e-235, > -5.4046157807505651e-226, 1.3558688389339507e-217, -9.6883371298320722e-226, > ---Type to continue, or q to quit--- > -5.9285856500623996e-217, 4.8468289723098665e-209, -5.3857466678811828e-217, > -3.2242188218384035e-208, 8.4534293726532241e-201, -1.4738192384650725e-208, > -8.5980759783639217e-200, 6.907091796675751e-193, -1.9033438119138147e-200, > -1.0763770568701642e-191, 2.6478532383011193e-272, -1.4903005865209107e-282, > -7.7998156143119667e-274, 9.305780800265163e-262, -8.8839704462246742e-272, > -4.5901635372628567e-263, 1.6034530482636144e-251, -2.6131364216028464e-261, > -1.3303679068670779e-252, 1.3592022238328847e-241, -3.7997620105273078e-251, > -1.9017131279478928e-242, 5.6792247063849799e-232, -2.7364107576938111e-241, > -1.3423648502867758e-232, 1.1692077782649843e-222, -9.7510387600061777e-232, > -4.6696270174942923e-223, 1.1853783027581269e-213, -1.7218922665317482e-222, > -8.0083000299810735e-214, 5.8785159049366656e-205, -1.495807982671848e-213, > -6.7077377611273877e-205, 1.4070570606363661e-196, -6.3472382608798458e-205, > -2.7230139900247648e-196, 1.5497123236581113e-188, -1.2485875796131097e-196, > -5.0753617625768587e-188, 1.5434660362531493e-265, -9.6427364575548134e-276, > -4.9469124048614407e-267, 5.5771128650726324e-255, -6.0715211415635001e-265, > -3.0557860054339049e-256, 9.7596266862900188e-245, -1.8630746938040184e-254, > -9.1835699478680429e-246, 8.400502948812723e-235, -2.8372007398618318e-244, > -1.365943291479874e-235, 3.5683163152848973e-225, -2.1529642010355749e-234, > -1.0086136614457182e-225, 7.470797689290204e-216, -8.1244038233290801e-225, > -3.6841086790658924e-216, 7.6946486289534802e-207, -1.5231479988588442e-215, > -6.6343355238597203e-207, 3.8658097394017472e-198, -1.4018784919234662e-206, > -5.7883232195093694e-198, 9.3704091845606854e-190, -6.2833327107970169e-198, > -2.4015591026235036e-189, 1.0604778036924017e-181, -1.3130129893123058e-189, > ---Type to continue, or q to quit--- > -4.3944520676710034e-181, 5.3191550180698584e-174, -1.2276467039908345e-181, > 6.582654853774009e-258, -3.6960150023175459e-267, -1.541051696004311e-258, > 1.5081568307026851e-247, -1.2291453940848028e-256, -5.045748607868979e-248, > 1.6985391993644289e-237, -2.0388029995970922e-246, -8.2307676982689932e-238, > 9.31882138782716e-228, -1.6611812318932581e-236, -6.5847692143411066e-228, > 2.4911590486436157e-218, -6.6411748999525368e-227, -2.578412473673239e-218, > 3.2461544324197385e-209, -1.3019895450678336e-217, -4.930407732106102e-209, > 2.0647053899839311e-200, -1.2536927838659388e-208, -4.5973820374997486e-200, > 6.3999453950640209e-192, -5.9162039831540975e-200, -2.0733460339667467e-191, > 9.6386220362933024e-184, -1.3685224770731774e-191, -4.468872196846956e-183, > 6.9383373250314803e-176, -1.5267617834505389e-183, -4.3847638022619328e-175, > 2.2993251811195029e-168, -8.018740019783814e-176, 8.0187312547169491e-280, > -1.9681088822187587e-289, -8.6000837193564188e-281, 2.4418184153863893e-291, > -3.6413466395574048e-301, -1.6520119055708723e-292, 6.2083711391797733e-303, > 0, -2.7166342721641981e-304, 0 , 1.3382706765032754e-300, > 0, -3.7946354577853773e-304, 6.3527319749529548e-289, > -1.0316342902978391e-298, -2.7857994540718757e-292, 1.3926426017545835e-277, > -3.7119818003349503e-287, -9.8649586986765956e-281...} > > > > Billy. > > > Quoting Barry Smith : > > > > > Billy, > > > > The x array contains the vector entries. It is either that > > 1) idx == 1710 is not a valid index or more likely > > 2) x[] on input has garbage values in it. > > > > Can you call VecView() on x right before or after > > it is passed into the MatMult? My guess is it has > > garbage in it from earlier in the code. > > > > Barry > > > > On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote: > > > > > > > > Hi, > > > > > > I was running my code and I got FPE error on alpha machines. > > > > > > Using gdb the output is the following. I am using 4 processors. > > > > > > Program received signal SIGFPE, Arithmetic exception. > > > 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770, > > > zz=0x120bc9fb0) at baij2.c:260 > > > 260 while (n--) sum += *v++ * x[*idx++]; > > > (gdb) print n > > > $1 = 0 > > > (gdb) print idx > > > $2 = (PetscInt *) 0x120c7aab8 > > > (gdb) print *idx > > > $3 = 1710 > > > (gdb) print v > > > $4 = (MatScalar *) 0x120c99190 > > > (gdb) print *v > > > $5 = 4.0109832449655266e-12 > > > (gdb) print x > > > $6 = (PetscScalar *) 0x120be1690 > > > (gdb) print x[*idx] > > > $7 = 1.2349520920477556e-308 > > > (gdb) print sum > > > $8 = 0 > > > > > > > > > Billy > > > > > > > > > > From billy at dem.uminho.pt Wed Nov 15 14:36:01 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Wed, 15 Nov 2006 20:36:01 +0000 Subject: PETSC debug In-Reply-To: References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> Message-ID: <1163622961.455b7a3146d15@serv-g1.ccom.uminho.pt> Hi, How do you suggest I track the origin of the problem. Which data should I look at? Thanks, Billy. Quoting Barry Smith : > > These numbers are all garbage (tiny numbers like this very, very, very > rarely > appear). It looks like the vector or the array you are using is not being > initialized or is getting totally written over incorrectly. > > Barry > > > On Wed, 15 Nov 2006, billy at dem.uminho.pt wrote: > > > > > x has very small values and some zeros. Is this a problem? > > > > > > (gdb) p *x at 1710 > > > > {5.6661805945484757e-226, -1.1627609243420647e-234, > > -3.0191454638161275e-228, 4.9827910759046858e-233, > -2.0736747864315411e-242, > > -6.2486892875076229e-236, 7.936938687044959e-240, > -2.7194212807360601e-249, > > -8.588425549413817e-243, 2.3024631606271122e-243, > -5.9846691224557681e-252, > > -2.2335202330567468e-245, 9.7831244726432479e-236, > -1.3552548630405792e-244, > > -3.495520937088327e-238, 5.4989262786345397e-243, > -1.3210098902792841e-252, > > -3.8682663837382384e-246, 8.8387035435575233e-250, > -1.8090256621813952e-259, > > -5.4716023064278407e-253, 3.588000018861786e-253, > -6.2458537296193104e-262, > > -2.3148026340361519e-255, 1.0977920182613153e-245, > -1.0249411693868054e-254, > > -2.6419424389659324e-248, 3.9853740743647345e-253, > -5.4255411897492446e-263, > > -1.5685468152877737e-256, 6.4972881272145346e-260, > -7.7132606040774855e-270, > > -2.2883458301363077e-263, 3.7376905182602783e-263, > -4.3589162441629927e-272, > > -1.6122153535564706e-265, 5.4679961341990742e-256, > -3.4946761363871895e-265, > > -9.0506057005070676e-259, 1.2625051605987276e-263, > -9.8127138874528815e-274, > > -2.8171459920204651e-267, 2.1144094764316537e-270, > -1.4661783326174102e-280, > > -4.3021011674687748e-274, 1.7171839888390158e-273, > -1.355360583021068e-282, > > -5.0256495711998189e-276, 2.3441225393534538e-275, > -1.4167665839646082e-284, > > -9.5098664261506559e-276, 5.8664086258683721e-265, > -5.2303663615699708e-274, > > -3.4638320353774473e-265, 7.1774245671418306e-255, > -9.5315249514698032e-264, > > -6.22580454316614e-255, 4.3135135163622493e-245, > -8.6106571400568118e-254, > > -5.54411948811998e-245, 1.2782302660591342e-235, > -3.8700430138360975e-244, > > -2.4540088843175776e-235, 1.8714298666616161e-226, > -8.667061714016371e-235, > > -5.4046157807505651e-226, 1.3558688389339507e-217, > -9.6883371298320722e-226, > > ---Type to continue, or q to quit--- > > -5.9285856500623996e-217, 4.8468289723098665e-209, > -5.3857466678811828e-217, > > -3.2242188218384035e-208, 8.4534293726532241e-201, > -1.4738192384650725e-208, > > -8.5980759783639217e-200, 6.907091796675751e-193, > -1.9033438119138147e-200, > > -1.0763770568701642e-191, 2.6478532383011193e-272, > -1.4903005865209107e-282, > > -7.7998156143119667e-274, 9.305780800265163e-262, > -8.8839704462246742e-272, > > -4.5901635372628567e-263, 1.6034530482636144e-251, > -2.6131364216028464e-261, > > -1.3303679068670779e-252, 1.3592022238328847e-241, > -3.7997620105273078e-251, > > -1.9017131279478928e-242, 5.6792247063849799e-232, > -2.7364107576938111e-241, > > -1.3423648502867758e-232, 1.1692077782649843e-222, > -9.7510387600061777e-232, > > -4.6696270174942923e-223, 1.1853783027581269e-213, > -1.7218922665317482e-222, > > -8.0083000299810735e-214, 5.8785159049366656e-205, > -1.495807982671848e-213, > > -6.7077377611273877e-205, 1.4070570606363661e-196, > -6.3472382608798458e-205, > > -2.7230139900247648e-196, 1.5497123236581113e-188, > -1.2485875796131097e-196, > > -5.0753617625768587e-188, 1.5434660362531493e-265, > -9.6427364575548134e-276, > > -4.9469124048614407e-267, 5.5771128650726324e-255, > -6.0715211415635001e-265, > > -3.0557860054339049e-256, 9.7596266862900188e-245, > -1.8630746938040184e-254, > > -9.1835699478680429e-246, 8.400502948812723e-235, > -2.8372007398618318e-244, > > -1.365943291479874e-235, 3.5683163152848973e-225, > -2.1529642010355749e-234, > > -1.0086136614457182e-225, 7.470797689290204e-216, > -8.1244038233290801e-225, > > -3.6841086790658924e-216, 7.6946486289534802e-207, > -1.5231479988588442e-215, > > -6.6343355238597203e-207, 3.8658097394017472e-198, > -1.4018784919234662e-206, > > -5.7883232195093694e-198, 9.3704091845606854e-190, > -6.2833327107970169e-198, > > -2.4015591026235036e-189, 1.0604778036924017e-181, > -1.3130129893123058e-189, > > ---Type to continue, or q to quit--- > > -4.3944520676710034e-181, 5.3191550180698584e-174, > -1.2276467039908345e-181, > > 6.582654853774009e-258, -3.6960150023175459e-267, > -1.541051696004311e-258, > > 1.5081568307026851e-247, -1.2291453940848028e-256, > -5.045748607868979e-248, > > 1.6985391993644289e-237, -2.0388029995970922e-246, > -8.2307676982689932e-238, > > 9.31882138782716e-228, -1.6611812318932581e-236, > -6.5847692143411066e-228, > > 2.4911590486436157e-218, -6.6411748999525368e-227, > -2.578412473673239e-218, > > 3.2461544324197385e-209, -1.3019895450678336e-217, > -4.930407732106102e-209, > > 2.0647053899839311e-200, -1.2536927838659388e-208, > -4.5973820374997486e-200, > > 6.3999453950640209e-192, -5.9162039831540975e-200, > -2.0733460339667467e-191, > > 9.6386220362933024e-184, -1.3685224770731774e-191, > -4.468872196846956e-183, > > 6.9383373250314803e-176, -1.5267617834505389e-183, > -4.3847638022619328e-175, > > 2.2993251811195029e-168, -8.018740019783814e-176, > 8.0187312547169491e-280, > > -1.9681088822187587e-289, -8.6000837193564188e-281, > 2.4418184153863893e-291, > > -3.6413466395574048e-301, -1.6520119055708723e-292, > 6.2083711391797733e-303, > > 0, -2.7166342721641981e-304, 0 , > 1.3382706765032754e-300, > > 0, -3.7946354577853773e-304, 6.3527319749529548e-289, > > -1.0316342902978391e-298, -2.7857994540718757e-292, > 1.3926426017545835e-277, > > -3.7119818003349503e-287, -9.8649586986765956e-281...} > > > > > > > > Billy. > > > > > > Quoting Barry Smith : > > > > > > > > Billy, > > > > > > The x array contains the vector entries. It is either that > > > 1) idx == 1710 is not a valid index or more likely > > > 2) x[] on input has garbage values in it. > > > > > > Can you call VecView() on x right before or after > > > it is passed into the MatMult? My guess is it has > > > garbage in it from earlier in the code. > > > > > > Barry > > > > > > On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote: > > > > > > > > > > > Hi, > > > > > > > > I was running my code and I got FPE error on alpha machines. > > > > > > > > Using gdb the output is the following. I am using 4 processors. > > > > > > > > Program received signal SIGFPE, Arithmetic exception. > > > > 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770, > > > > zz=0x120bc9fb0) at baij2.c:260 > > > > 260 while (n--) sum += *v++ * x[*idx++]; > > > > (gdb) print n > > > > $1 = 0 > > > > (gdb) print idx > > > > $2 = (PetscInt *) 0x120c7aab8 > > > > (gdb) print *idx > > > > $3 = 1710 > > > > (gdb) print v > > > > $4 = (MatScalar *) 0x120c99190 > > > > (gdb) print *v > > > > $5 = 4.0109832449655266e-12 > > > > (gdb) print x > > > > $6 = (PetscScalar *) 0x120be1690 > > > > (gdb) print x[*idx] > > > > $7 = 1.2349520920477556e-308 > > > > (gdb) print sum > > > > $8 = 0 > > > > > > > > > > > > Billy > > > > > > > > > > > > > > > > > > From bsmith at mcs.anl.gov Wed Nov 15 14:39:54 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 15 Nov 2006 14:39:54 -0600 (CST) Subject: PETSC debug In-Reply-To: <1163622961.455b7a3146d15@serv-g1.ccom.uminho.pt> References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> <1163622961.455b7a3146d15@serv-g1.ccom.uminho.pt> Message-ID: Look at the vector entries earlier and earlier in the code until you find the point when they are not nuts. Then you know the small piece of code that is making them nuts. Also use -malloc_debug (-trmalloc in old versions of PETSc) or better valgrind www.valgrind.org to make sure that it is not memory corruption making the crazy values. Barry On Wed, 15 Nov 2006, billy at dem.uminho.pt wrote: > > Hi, > > How do you suggest I track the origin of the problem. Which data should I look at? > > Thanks, > > Billy. > > Quoting Barry Smith : > > > > > These numbers are all garbage (tiny numbers like this very, very, very > > rarely > > appear). It looks like the vector or the array you are using is not being > > initialized or is getting totally written over incorrectly. > > > > Barry > > > > > > On Wed, 15 Nov 2006, billy at dem.uminho.pt wrote: > > > > > > > > x has very small values and some zeros. Is this a problem? > > > > > > > > > (gdb) p *x at 1710 > > > > > > {5.6661805945484757e-226, -1.1627609243420647e-234, > > > -3.0191454638161275e-228, 4.9827910759046858e-233, > > -2.0736747864315411e-242, > > > -6.2486892875076229e-236, 7.936938687044959e-240, > > -2.7194212807360601e-249, > > > -8.588425549413817e-243, 2.3024631606271122e-243, > > -5.9846691224557681e-252, > > > -2.2335202330567468e-245, 9.7831244726432479e-236, > > -1.3552548630405792e-244, > > > -3.495520937088327e-238, 5.4989262786345397e-243, > > -1.3210098902792841e-252, > > > -3.8682663837382384e-246, 8.8387035435575233e-250, > > -1.8090256621813952e-259, > > > -5.4716023064278407e-253, 3.588000018861786e-253, > > -6.2458537296193104e-262, > > > -2.3148026340361519e-255, 1.0977920182613153e-245, > > -1.0249411693868054e-254, > > > -2.6419424389659324e-248, 3.9853740743647345e-253, > > -5.4255411897492446e-263, > > > -1.5685468152877737e-256, 6.4972881272145346e-260, > > -7.7132606040774855e-270, > > > -2.2883458301363077e-263, 3.7376905182602783e-263, > > -4.3589162441629927e-272, > > > -1.6122153535564706e-265, 5.4679961341990742e-256, > > -3.4946761363871895e-265, > > > -9.0506057005070676e-259, 1.2625051605987276e-263, > > -9.8127138874528815e-274, > > > -2.8171459920204651e-267, 2.1144094764316537e-270, > > -1.4661783326174102e-280, > > > -4.3021011674687748e-274, 1.7171839888390158e-273, > > -1.355360583021068e-282, > > > -5.0256495711998189e-276, 2.3441225393534538e-275, > > -1.4167665839646082e-284, > > > -9.5098664261506559e-276, 5.8664086258683721e-265, > > -5.2303663615699708e-274, > > > -3.4638320353774473e-265, 7.1774245671418306e-255, > > -9.5315249514698032e-264, > > > -6.22580454316614e-255, 4.3135135163622493e-245, > > -8.6106571400568118e-254, > > > -5.54411948811998e-245, 1.2782302660591342e-235, > > -3.8700430138360975e-244, > > > -2.4540088843175776e-235, 1.8714298666616161e-226, > > -8.667061714016371e-235, > > > -5.4046157807505651e-226, 1.3558688389339507e-217, > > -9.6883371298320722e-226, > > > ---Type to continue, or q to quit--- > > > -5.9285856500623996e-217, 4.8468289723098665e-209, > > -5.3857466678811828e-217, > > > -3.2242188218384035e-208, 8.4534293726532241e-201, > > -1.4738192384650725e-208, > > > -8.5980759783639217e-200, 6.907091796675751e-193, > > -1.9033438119138147e-200, > > > -1.0763770568701642e-191, 2.6478532383011193e-272, > > -1.4903005865209107e-282, > > > -7.7998156143119667e-274, 9.305780800265163e-262, > > -8.8839704462246742e-272, > > > -4.5901635372628567e-263, 1.6034530482636144e-251, > > -2.6131364216028464e-261, > > > -1.3303679068670779e-252, 1.3592022238328847e-241, > > -3.7997620105273078e-251, > > > -1.9017131279478928e-242, 5.6792247063849799e-232, > > -2.7364107576938111e-241, > > > -1.3423648502867758e-232, 1.1692077782649843e-222, > > -9.7510387600061777e-232, > > > -4.6696270174942923e-223, 1.1853783027581269e-213, > > -1.7218922665317482e-222, > > > -8.0083000299810735e-214, 5.8785159049366656e-205, > > -1.495807982671848e-213, > > > -6.7077377611273877e-205, 1.4070570606363661e-196, > > -6.3472382608798458e-205, > > > -2.7230139900247648e-196, 1.5497123236581113e-188, > > -1.2485875796131097e-196, > > > -5.0753617625768587e-188, 1.5434660362531493e-265, > > -9.6427364575548134e-276, > > > -4.9469124048614407e-267, 5.5771128650726324e-255, > > -6.0715211415635001e-265, > > > -3.0557860054339049e-256, 9.7596266862900188e-245, > > -1.8630746938040184e-254, > > > -9.1835699478680429e-246, 8.400502948812723e-235, > > -2.8372007398618318e-244, > > > -1.365943291479874e-235, 3.5683163152848973e-225, > > -2.1529642010355749e-234, > > > -1.0086136614457182e-225, 7.470797689290204e-216, > > -8.1244038233290801e-225, > > > -3.6841086790658924e-216, 7.6946486289534802e-207, > > -1.5231479988588442e-215, > > > -6.6343355238597203e-207, 3.8658097394017472e-198, > > -1.4018784919234662e-206, > > > -5.7883232195093694e-198, 9.3704091845606854e-190, > > -6.2833327107970169e-198, > > > -2.4015591026235036e-189, 1.0604778036924017e-181, > > -1.3130129893123058e-189, > > > ---Type to continue, or q to quit--- > > > -4.3944520676710034e-181, 5.3191550180698584e-174, > > -1.2276467039908345e-181, > > > 6.582654853774009e-258, -3.6960150023175459e-267, > > -1.541051696004311e-258, > > > 1.5081568307026851e-247, -1.2291453940848028e-256, > > -5.045748607868979e-248, > > > 1.6985391993644289e-237, -2.0388029995970922e-246, > > -8.2307676982689932e-238, > > > 9.31882138782716e-228, -1.6611812318932581e-236, > > -6.5847692143411066e-228, > > > 2.4911590486436157e-218, -6.6411748999525368e-227, > > -2.578412473673239e-218, > > > 3.2461544324197385e-209, -1.3019895450678336e-217, > > -4.930407732106102e-209, > > > 2.0647053899839311e-200, -1.2536927838659388e-208, > > -4.5973820374997486e-200, > > > 6.3999453950640209e-192, -5.9162039831540975e-200, > > -2.0733460339667467e-191, > > > 9.6386220362933024e-184, -1.3685224770731774e-191, > > -4.468872196846956e-183, > > > 6.9383373250314803e-176, -1.5267617834505389e-183, > > -4.3847638022619328e-175, > > > 2.2993251811195029e-168, -8.018740019783814e-176, > > 8.0187312547169491e-280, > > > -1.9681088822187587e-289, -8.6000837193564188e-281, > > 2.4418184153863893e-291, > > > -3.6413466395574048e-301, -1.6520119055708723e-292, > > 6.2083711391797733e-303, > > > 0, -2.7166342721641981e-304, 0 , > > 1.3382706765032754e-300, > > > 0, -3.7946354577853773e-304, 6.3527319749529548e-289, > > > -1.0316342902978391e-298, -2.7857994540718757e-292, > > 1.3926426017545835e-277, > > > -3.7119818003349503e-287, -9.8649586986765956e-281...} > > > > > > > > > > > > Billy. > > > > > > > > > Quoting Barry Smith : > > > > > > > > > > > Billy, > > > > > > > > The x array contains the vector entries. It is either that > > > > 1) idx == 1710 is not a valid index or more likely > > > > 2) x[] on input has garbage values in it. > > > > > > > > Can you call VecView() on x right before or after > > > > it is passed into the MatMult? My guess is it has > > > > garbage in it from earlier in the code. > > > > > > > > Barry > > > > > > > > On Tue, 14 Nov 2006, billy at dem.uminho.pt wrote: > > > > > > > > > > > > > > Hi, > > > > > > > > > > I was running my code and I got FPE error on alpha machines. > > > > > > > > > > Using gdb the output is the following. I am using 4 processors. > > > > > > > > > > Program received signal SIGFPE, Arithmetic exception. > > > > > 0x1202c4e1c in MatMult_SeqBAIJ_1 (A=0x120bbc7c0, xx=0x120be0770, > > > > > zz=0x120bc9fb0) at baij2.c:260 > > > > > 260 while (n--) sum += *v++ * x[*idx++]; > > > > > (gdb) print n > > > > > $1 = 0 > > > > > (gdb) print idx > > > > > $2 = (PetscInt *) 0x120c7aab8 > > > > > (gdb) print *idx > > > > > $3 = 1710 > > > > > (gdb) print v > > > > > $4 = (MatScalar *) 0x120c99190 > > > > > (gdb) print *v > > > > > $5 = 4.0109832449655266e-12 > > > > > (gdb) print x > > > > > $6 = (PetscScalar *) 0x120be1690 > > > > > (gdb) print x[*idx] > > > > > $7 = 1.2349520920477556e-308 > > > > > (gdb) print sum > > > > > $8 = 0 > > > > > > > > > > > > > > > Billy > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From c.calonaci at cineca.it Thu Nov 16 02:48:05 2006 From: c.calonaci at cineca.it (Cristiano Calonaci) Date: Thu, 16 Nov 2006 09:48:05 +0100 (MET) Subject: Symmetric matrixes multiply Message-ID: <455C25C5.2000809@cineca.it> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm using version Petsc version 2.3.2. 1 - I try to multiply two (symmetric) matrixes allocated using MatCreateMPISBAIJ() Mat A, B, C; .... bs = 1; ierr = MatCreateMPISBAIJ(PETSC_COMM_WORLD, bs, PETSC_DECIDE, PETSC_DECIDE, n, n, d_nz, d_nnz, o_nx, o_nnz, &A); CHKERRQ(ierr); ierr = MatCreateMPISBAIJ(PETSC_COMM_WORLD, bs, PETSC_DECIDE, PETSC_DECIDE, n, n, d_nz, d_nnz, o_nx, o_nnz, &B); CHKERRQ(ierr); using MatMatMult(A, B, MAT_INITIAL_MATRIX, 1., &C); but it doesn't work .... [0]PETSC ERROR: No support for this operation for this object type! [1]PETSC ERROR: MatMatMult not supported for B of type mpisbaij! Is there any workaround ? 2 - Is it possible using any PETSC functions to compute (for square matrixes) A = A*B instead that C=A*B and wasting memory if I don't need C ? Thank a lot for any help ! Cristiano - -- ______________________________________________________________________ "Un programma di computer fa quello che gli dici, non quello che vuoi" Terza legge di Greer ______________________________________________________________________ Cristiano Calonaci - Supercomputing Group - CINECA Via Magnanelli 6/3 - 40033 Casalecchio di Reno - Bologna - Italy Tel.+39-0516171421 - Fax.+39-0516137273 - e-mail: c.calonaci at cineca.it -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFFXCXFvt08LyoFZwMRAlzWAJ9yTXqwOZDE/ICg/byNqa45yR2FSACfWqfx CBZ5h8fes6i1w5IfrLfV5aA= =vTgK -----END PGP SIGNATURE----- From knepley at gmail.com Thu Nov 16 08:24:10 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 16 Nov 2006 08:24:10 -0600 Subject: Symmetric matrixes multiply In-Reply-To: <455C25C5.2000809@cineca.it> References: <455C25C5.2000809@cineca.it> Message-ID: These questions are more suitable for petsc-maint. The problem here is the same. It is not easy to calculate the nonzero pattern of the result, although it can be done. We did not have the resources to implement it for all matrix types. We would be happy to accept the code if you want to give it a try. The reason the we have no A = A*B is that A and A*B almost never have the saem nonzero pattern. Matt On 11/16/06, Cristiano Calonaci wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > I'm using version Petsc version 2.3.2. > > 1 - I try to multiply two (symmetric) matrixes allocated using > > MatCreateMPISBAIJ() > > Mat A, B, C; > .... > bs = 1; > ierr = MatCreateMPISBAIJ(PETSC_COMM_WORLD, bs, PETSC_DECIDE, > PETSC_DECIDE, n, n, > d_nz, d_nnz, o_nx, o_nnz, &A); CHKERRQ(ierr); > ierr = MatCreateMPISBAIJ(PETSC_COMM_WORLD, bs, PETSC_DECIDE, > PETSC_DECIDE, n, n, > d_nz, d_nnz, o_nx, o_nnz, &B); CHKERRQ(ierr); > using > > MatMatMult(A, B, MAT_INITIAL_MATRIX, 1., &C); > > but it doesn't work .... > > [0]PETSC ERROR: No support for this operation for this object type! > [1]PETSC ERROR: MatMatMult not supported for B of type mpisbaij! > > Is there any workaround ? > > 2 - Is it possible using any PETSC functions to compute (for square > matrixes) > > A = A*B > > instead that C=A*B and wasting memory if I don't need C ? > > Thank a lot for any help ! > > Cristiano > > - -- > ______________________________________________________________________ > > "Un programma di computer fa quello che gli dici, non quello che vuoi" > Terza legge di Greer > ______________________________________________________________________ > > Cristiano Calonaci - Supercomputing Group - CINECA > Via Magnanelli 6/3 - 40033 Casalecchio di Reno - Bologna - Italy > Tel.+39-0516171421 - Fax.+39-0516137273 - e-mail: c.calonaci at cineca.it > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFFXCXFvt08LyoFZwMRAlzWAJ9yTXqwOZDE/ICg/byNqa45yR2FSACfWqfx > CBZ5h8fes6i1w5IfrLfV5aA= > =vTgK > -----END PGP SIGNATURE----- > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From mafunk at nmsu.edu Thu Nov 16 13:08:12 2006 From: mafunk at nmsu.edu (Matt Funk) Date: Thu, 16 Nov 2006 12:08:12 -0700 Subject: PCSetOperators In-Reply-To: <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> Message-ID: <200611161208.14702.mafunk@nmsu.edu> Hi, i had a question regarding PCSetOperators(...): 1) what is the difference between PCSetOperators and KSPSetOperators since the description and the arguments for both functions are the same (i.e.): "Sets the matrix associated with the linear system and a (possibly) different one associated with the preconditioner" Right now, what i do to set my preconditioner is to call: PCSetType(m_pc, PCJACOBI); 2) Is this sufficient or do i need to call PCSetOperators? 3) Do PCSetType and PCSetOperators have the same function? Right now what i basically do to set up my solver context is to call the following functions (in this order): - KSPCreate //create my context - KSPSetOperators //associate my matrix with the context - KSPSetType //set my solver type - PCSetType - KSPSetUp It seems to work, but i don't know if it is efficient and preferred way (if there is such a thing)? Also, do several successive solves on the same linear system with the same preconditioner. So i pass SAME_NONZEROPATTERN as the MatStructure flag to the KSPSetOperators call. So do i need to call PCSetOperators and pass it the flag as well to reuse the preconditioner? thanks for all the help mat From knepley at gmail.com Thu Nov 16 13:24:50 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 16 Nov 2006 13:24:50 -0600 Subject: PCSetOperators In-Reply-To: <200611161208.14702.mafunk@nmsu.edu> References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> <200611161208.14702.mafunk@nmsu.edu> Message-ID: On 11/16/06, Matt Funk wrote: > Hi, > > i had a question regarding PCSetOperators(...): > > 1) what is the difference between PCSetOperators and KSPSetOperators since the > description and the arguments for both functions are the same (i.e.): > "Sets the matrix associated with the linear system and a (possibly) different > one associated with the preconditioner" KSPSetOperators() calls the PC version. > Right now, what i do to set my preconditioner is to call: > PCSetType(m_pc, PCJACOBI); > 2) Is this sufficient or do i need to call PCSetOperators? It should be sufficient. > 3) Do PCSetType and PCSetOperators have the same function? No. We allow the later in order to support construction of the PC very early on. > Right now what i basically do to set up my solver context is to call the > following functions (in this order): > - KSPCreate //create my context > - KSPSetOperators //associate my matrix with the context > - KSPSetType //set my solver type > - PCSetType > - KSPSetUp > It seems to work, but i don't know if it is efficient and preferred way (if > there is such a thing)? This seems fine. > Also, do several successive solves on the same linear system with the same > preconditioner. So i pass SAME_NONZEROPATTERN as the MatStructure flag to the > KSPSetOperators call. So do i need to call PCSetOperators and pass it the > flag as well to reuse the preconditioner? No. Matt > thanks for all the help > mat -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From bsmith at mcs.anl.gov Thu Nov 16 13:32:37 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 16 Nov 2006 13:32:37 -0600 (CST) Subject: PCSetOperators In-Reply-To: <200611161208.14702.mafunk@nmsu.edu> References: <1163546335.455a4edfd1fa3@serv-g1.ccom.uminho.pt> <1163561935.455a8bcfa607a@serv-g1.ccom.uminho.pt> <200611161208.14702.mafunk@nmsu.edu> Message-ID: > Also, do several successive solves on the same linear system with the same > preconditioner. So i pass SAME_NONZEROPATTERN as the MatStructure flag to the > KSPSetOperators call. Use SAME_PRECONDITIONER Barry On Thu, 16 Nov 2006, Matt Funk wrote: > Hi, > > i had a question regarding PCSetOperators(...): > > 1) what is the difference between PCSetOperators and KSPSetOperators since the > description and the arguments for both functions are the same (i.e.): > "Sets the matrix associated with the linear system and a (possibly) different > one associated with the preconditioner" > > Right now, what i do to set my preconditioner is to call: > PCSetType(m_pc, PCJACOBI); > 2) Is this sufficient or do i need to call PCSetOperators? > 3) Do PCSetType and PCSetOperators have the same function? > > Right now what i basically do to set up my solver context is to call the > following functions (in this order): > - KSPCreate //create my context > - KSPSetOperators //associate my matrix with the context > - KSPSetType //set my solver type > - PCSetType > - KSPSetUp > It seems to work, but i don't know if it is efficient and preferred way (if > there is such a thing)? > > Also, do several successive solves on the same linear system with the same > preconditioner. So i pass SAME_NONZEROPATTERN as the MatStructure flag to the > KSPSetOperators call. So do i need to call PCSetOperators and pass it the > flag as well to reuse the preconditioner? > > thanks for all the help > mat > > From charden at scs.fsu.edu Fri Nov 17 18:14:55 2006 From: charden at scs.fsu.edu (Chris Harden) Date: Fri, 17 Nov 2006 19:14:55 -0500 Subject: New PETSc manual Message-ID: <27A95431-D957-446A-9C3A-05722675CF2E@scs.fsu.edu> Does anyone know when the new PETSc manual will be available which corresponds to the changes made in the new PETSc 2.3.2? For example, the current manual has no mention the SLES package which KSP is just a subset of now. Thanks, guys. Chris Harden Graduate Assistant School of Computational Science Florida State University 446-B Dirac Science Library Tallahassee, Florida 32306-4120 Voice: 850.644.3442 E-mail: charden at scs.fsu.edu http://www.scs.fsu.edu/~charden/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From charden at scs.fsu.edu Fri Nov 17 18:44:51 2006 From: charden at scs.fsu.edu (Chris Harden) Date: Fri, 17 Nov 2006 19:44:51 -0500 Subject: New PETSc manual In-Reply-To: <27A95431-D957-446A-9C3A-05722675CF2E@scs.fsu.edu> References: <27A95431-D957-446A-9C3A-05722675CF2E@scs.fsu.edu> Message-ID: Never mind. I found it. I had a an old link that needed to be refreshed. Sorry. Thanks! On Nov 17, 2006, at 7:14 PM, Chris Harden wrote: > Does anyone know when the new PETSc manual will be available which > corresponds to the changes made in the new PETSc 2.3.2? > > For example, the current manual has no mention the SLES package > which KSP is just a subset of now. > > > Thanks, guys. > > > > Chris Harden > Graduate Assistant > School of Computational Science > Florida State University > 446-B Dirac Science Library > Tallahassee, Florida 32306-4120 > > Voice: 850.644.3442 > E-mail: charden at scs.fsu.edu > http://www.scs.fsu.edu/~charden/ > > Chris Harden Graduate Assistant School of Computational Science Florida State University 446-B Dirac Science Library Tallahassee, Florida 32306-4120 Voice: 850.644.3442 E-mail: charden at scs.fsu.edu http://www.scs.fsu.edu/~charden/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From billy at dem.uminho.pt Sun Nov 19 16:47:31 2006 From: billy at dem.uminho.pt (billy at dem.uminho.pt) Date: Sun, 19 Nov 2006 22:47:31 +0000 Subject: GMRES: Convergence Message-ID: <1163976450.4560df0302768@serv-g1.ccom.uminho.pt> I have specified maximum number of iterations 500 and tolerance 1E-8. Usually it drives the residual to specified tolerance but in this case GMRES seems to stop after 15 iterations and the residual is still above tolerance. 0 KSP Residual norm 2.928143483788e+05 1 KSP Residual norm 1.403875955158e+05 2 KSP Residual norm 4.068852804332e+04 3 KSP Residual norm 8.517044011269e+03 4 KSP Residual norm 2.179034005404e+03 5 KSP Residual norm 6.155723927227e+02 6 KSP Residual norm 1.636241232571e+02 7 KSP Residual norm 4.839052750735e+01 8 KSP Residual norm 1.118719384434e+01 9 KSP Residual norm 3.313977141518e+00 10 KSP Residual norm 7.447603108045e-01 11 KSP Residual norm 1.942386237492e-01 12 KSP Residual norm 4.843647894709e-02 13 KSP Residual norm 1.215264193249e-02 14 KSP Residual norm 3.111716140560e-03 15 KSP Residual norm 7.922640853896e-04 Matrix p Number of iterations: 15 Residual: +7.922641E-04 Anyone knows why this happens? Billy. From knepley at gmail.com Sun Nov 19 16:53:18 2006 From: knepley at gmail.com (Matthew Knepley) Date: Sun, 19 Nov 2006 16:53:18 -0600 Subject: GMRES: Convergence In-Reply-To: <1163976450.4560df0302768@serv-g1.ccom.uminho.pt> References: <1163976450.4560df0302768@serv-g1.ccom.uminho.pt> Message-ID: I would guess that you specified a relative tolerance of 10^-8, which is satisfied below. Matt On 11/19/06, billy at dem.uminho.pt wrote: > > I have specified maximum number of iterations 500 and tolerance 1E-8. Usually it > drives the residual to specified tolerance but in this case GMRES seems to stop > after 15 iterations and the residual is still above tolerance. > > 0 KSP Residual norm 2.928143483788e+05 > 1 KSP Residual norm 1.403875955158e+05 > 2 KSP Residual norm 4.068852804332e+04 > 3 KSP Residual norm 8.517044011269e+03 > 4 KSP Residual norm 2.179034005404e+03 > 5 KSP Residual norm 6.155723927227e+02 > 6 KSP Residual norm 1.636241232571e+02 > 7 KSP Residual norm 4.839052750735e+01 > 8 KSP Residual norm 1.118719384434e+01 > 9 KSP Residual norm 3.313977141518e+00 > 10 KSP Residual norm 7.447603108045e-01 > 11 KSP Residual norm 1.942386237492e-01 > 12 KSP Residual norm 4.843647894709e-02 > 13 KSP Residual norm 1.215264193249e-02 > 14 KSP Residual norm 3.111716140560e-03 > 15 KSP Residual norm 7.922640853896e-04 > > Matrix p Number of iterations: 15 Residual: +7.922641E-04 > > Anyone knows why this happens? > > Billy. > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From sqbang at 163.com Mon Nov 20 10:41:49 2006 From: sqbang at 163.com (sqbang) Date: Tue, 21 Nov 2006 00:41:49 +0800 (CST) Subject: petsc-users Message-ID: <4561DACD.00003D.11211@bj163app92.163.com> Dear sir: I would be most grateful if you could give me some suggestions on Petsc. I'm a new user. One question I met is which method should be used when solving FEM(finite element method)questions ? In detail,KSP gives several methods and a lot of precondition, how to combinate them to work effectively? Does there exist the cases that some specific combinations are forbidden? I would like to thank you for your generous help. Your prompt attention to this letter would be highly appreciated. I am looking forward to hearing from you. sd. -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Nov 20 11:20:19 2006 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 20 Nov 2006 11:20:19 -0600 Subject: petsc-users In-Reply-To: <4561DACD.00003D.11211@bj163app92.163.com> References: <4561DACD.00003D.11211@bj163app92.163.com> Message-ID: Actually, I believe that this is the wrong question. One of the motivations behind PETSc is the lack of any theory indicating which solver/pc performs best with which equation/discretization. The only options is to try them all. We make this easy. You can set -ksp_type and -pc_type from the command line. If the combination will not work, you jsut get an error and keep going. We usually use a shell script for this. Thanks, Matt On 11/20/06, sqbang wrote: > Dear sir: > I would be most grateful if you could give me some suggestions on Petsc. > I'm a new user. One question I met is which method should be used when > solving FEM(finite element method)questions ? In detail,KSP gives several > methods and a lot of precondition, how to combinate them to work > effectively? Does there exist the cases that some specific combinations are > forbidden? > I would like to thank you for your generous help. Your prompt attention > to this letter would be highly appreciated. > I am looking forward to hearing from you. > sd. > > > > > > > > > > > > ? ? ? ? ? ? ? ? ? , ? ? ? ? ? ? > ? ? ? ? ? ? ? ? 20 ? ? , ? ? ? ? ? ? ? ? ? ? ? 20 ? >> -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From yaronkretchmer at gmail.com Tue Nov 21 23:57:06 2006 From: yaronkretchmer at gmail.com (Yaron Kretchmer) Date: Tue, 21 Nov 2006 21:57:06 -0800 Subject: petsc object hierarchy Message-ID: Hi all I'd like to understand the class/object hierarchy of Petsc (i.e. KSP uses a MAT , which uses a VEC etc. etc.)- other than digging through the code, how can i do this? Thanks Yaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Nov 22 07:05:18 2006 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 22 Nov 2006 07:05:18 -0600 Subject: petsc object hierarchy In-Reply-To: References: Message-ID: There is a classic slides in all the tutorials about control flow, but it is really simple: - Mat uses Vec - PC uses (Mat, Vec) - KSP use (PC, Mat, Vec) - SNES uses (KSP, PC, Mat, Vec) - TS uses (SNES, KSP, PC, Mat, Vec) Very linear. Matt On 11/21/06, Yaron Kretchmer wrote: > Hi all > I'd like to understand the class/object hierarchy of Petsc (i.e. KSP uses a > MAT , which uses a VEC etc. etc.)- other than digging through the code, how > can i do this? > > Thanks > Yaron > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From sqbang at 163.com Wed Nov 22 10:05:41 2006 From: sqbang at 163.com (sqbang) Date: Thu, 23 Nov 2006 00:05:41 +0800 (CST) Subject: petsc: symmetric matrix Message-ID: <45647555.00010B.15798@bj163app89.163.com> Hi, all when I create a matrix with MatCreateSeqAIJ() and the matrix is symmetry,how can I complete it while only the half data is inserted ? does the memory needed be half of the same scale matrix but not symmetry ? if not,how should i set it ? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Wed Nov 22 10:47:31 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 22 Nov 2006 10:47:31 -0600 (CST) Subject: petsc: symmetric matrix In-Reply-To: <45647555.00010B.15798@bj163app89.163.com> References: <45647555.00010B.15798@bj163app89.163.com> Message-ID: On Thu, 23 Nov 2006, sqbang wrote: > Hi, all > when I create a matrix with MatCreateSeqAIJ() and the matrix is > symmetry,how can I complete it while only the half data is inserted > ? does the memory needed be half of the same scale matrix but not > symmetry ? if not,how should i set it ? > thanks You'll have to use MatCreateSeqSBAIJ() for this purpose. Satish From randy at geosystem.us Wed Nov 22 10:52:54 2006 From: randy at geosystem.us (Randall Mackie) Date: Wed, 22 Nov 2006 08:52:54 -0800 Subject: petsc: symmetric matrix In-Reply-To: References: <45647555.00010B.15798@bj163app89.163.com> Message-ID: <45648066.2050406@geosystem.us> Satish, This questions seems to be asked on the average of once per week on this list. Perhaps a section on symmetric matrics could be added to the manual? Randy Satish Balay wrote: > On Thu, 23 Nov 2006, sqbang wrote: > >> Hi, all >> when I create a matrix with MatCreateSeqAIJ() and the matrix is >> symmetry,how can I complete it while only the half data is inserted >> ? does the memory needed be half of the same scale matrix but not >> symmetry ? if not,how should i set it ? >> thanks > > You'll have to use MatCreateSeqSBAIJ() for this purpose. > > Satish > -- Randall Mackie GSY-USA, Inc. PMB# 643 2261 Market St., San Francisco, CA 94114-1600 Tel (415) 469-8649 Fax (415) 469-5044 California Registered Geophysicist License No. GP 1034 From yaronkretchmer at gmail.com Wed Nov 22 11:09:44 2006 From: yaronkretchmer at gmail.com (Yaron Kretchmer) Date: Wed, 22 Nov 2006 09:09:44 -0800 Subject: petsc object hierarchy In-Reply-To: References: Message-ID: Thanks Matt. And Vec sits on top of BLAS/MPI ? How are Vec-Vec operators (VecAXPBY for instance) and Mat-Mat operators (MatMatMult) performed? Yaron On 11/22/06, Matthew Knepley wrote: > > There is a classic slides in all the tutorials about control flow, but > it is really simple: > > - Mat uses Vec > - PC uses (Mat, Vec) > - KSP use (PC, Mat, Vec) > - SNES uses (KSP, PC, Mat, Vec) > - TS uses (SNES, KSP, PC, Mat, Vec) > > Very linear. > > Matt > > On 11/21/06, Yaron Kretchmer wrote: > > Hi all > > I'd like to understand the class/object hierarchy of Petsc (i.e. KSP > uses a > > MAT , which uses a VEC etc. etc.)- other than digging through the code, > how > > can i do this? > > > > Thanks > > Yaron > > > > > -- > "Failure has a thousand explanations. Success doesn't need one" -- Sir > Alec Guiness > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Nov 22 11:26:38 2006 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 22 Nov 2006 11:26:38 -0600 Subject: petsc object hierarchy In-Reply-To: References: Message-ID: On 11/22/06, Yaron Kretchmer wrote: > Thanks Matt. > > And Vec sits on top of BLAS/MPI ? Everything is on top of MPI. Vec can use BLAS. > How are Vec-Vec operators (VecAXPBY for instance) and Mat-Mat operators > (MatMatMult) performed? There are lots of implementations: BLAS, Fortran kernels, etc. For the Mat stuff, I think block matrices are BLAS, and the other stuff is jsut hand coded. Matt > > Yaron > > > On 11/22/06, Matthew Knepley wrote: > > There is a classic slides in all the tutorials about control flow, but > > it is really simple: > > > > - Mat uses Vec > > - PC uses (Mat, Vec) > > - KSP use (PC, Mat, Vec) > > - SNES uses (KSP, PC, Mat, Vec) > > - TS uses (SNES, KSP, PC, Mat, Vec) > > > > Very linear. > > > > Matt > > > > On 11/21/06, Yaron Kretchmer wrote: > > > Hi all > > > I'd like to understand the class/object hierarchy of Petsc ( i.e. KSP > uses a > > > MAT , which uses a VEC etc. etc.)- other than digging through the code, > how > > > can i do this? > > > > > > Thanks > > > Yaron > > > > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From bsmith at mcs.anl.gov Wed Nov 22 14:35:54 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 22 Nov 2006 14:35:54 -0600 (CST) Subject: petsc object hierarchy In-Reply-To: References: Message-ID: On Wed, 22 Nov 2006, Yaron Kretchmer wrote: > Thanks Matt. > > And Vec sits on top of BLAS/MPI ? Vec and Mat both talk directly to BLAS and MPI. It is rare that PC talks directly to MPI/Blas, usually it goes through Mat. KSP, SNES and TS hardly ever use BLAS/MPI directly, ideally KSP, SNES and TS will not talk to BLAS or MPI directly at all. Barry PetscViewers also talk directly to MPI (not blas :-)) and are used by all the objects. > > How are Vec-Vec operators (VecAXPBY for instance) and Mat-Mat operators > (MatMatMult) performed? > > > Yaron > > On 11/22/06, Matthew Knepley wrote: > > > > There is a classic slides in all the tutorials about control flow, but > > it is really simple: > > > > - Mat uses Vec > > - PC uses (Mat, Vec) > > - KSP use (PC, Mat, Vec) > > - SNES uses (KSP, PC, Mat, Vec) > > - TS uses (SNES, KSP, PC, Mat, Vec) > > > > Very linear. > > > > Matt > > > > On 11/21/06, Yaron Kretchmer wrote: > > > Hi all > > > I'd like to understand the class/object hierarchy of Petsc (i.e. KSP > > uses a > > > MAT , which uses a VEC etc. etc.)- other than digging through the code, > > how > > > can i do this? > > > > > > Thanks > > > Yaron > > > > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > > From bsmith at mcs.anl.gov Wed Nov 22 15:00:56 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 22 Nov 2006 15:00:56 -0600 (CST) Subject: petsc: symmetric matrix In-Reply-To: <45648066.2050406@geosystem.us> References: <45647555.00010B.15798@bj163app89.163.com> <45648066.2050406@geosystem.us> Message-ID: Randy, Good point. I've added an entry to the FAQ and to the MatType and MatSetType manual pages. Barry On Wed, 22 Nov 2006, Randall Mackie wrote: > Satish, > > This questions seems to be asked on the average of once per week on > this list. Perhaps a section on symmetric matrics could be added > to the manual? > > Randy > > Satish Balay wrote: > > On Thu, 23 Nov 2006, sqbang wrote: > > > > > Hi, all > > > when I create a matrix with MatCreateSeqAIJ() and the matrix is > > > symmetry,how can I complete it while only the half data is inserted > > > ? does the memory needed be half of the same scale matrix but not > > > symmetry ? if not,how should i set it ? > > > thanks > > > > You'll have to use MatCreateSeqSBAIJ() for this purpose. > > > > Satish > > > > From semplice at mat.unimi.it Thu Nov 23 13:01:16 2006 From: semplice at mat.unimi.it (Matteo Semplice) Date: Thu, 23 Nov 2006 20:01:16 +0100 Subject: saving parallel vectors Message-ID: <200611232001.16210.semplice@mat.unimi.it> This is really a newbie question but I am struggling to solve out of memory troubles on my first processor. I have a parallel global vector, say v, that I obtain with a call to DAGetGlobalVector. I save it to disk opening an ASCII standard viewer on PETSC_COMM_WORLD and calling VecView. As I understand from the manual, this causes all processors to send their data to the first one and this one writes them to disk. This works fine for small computational grids, but hangs my program if the grid is bigger. I am thinking to get each processor to write its own file and reassemble the data at the end of the program. I tried to create the viewer with the communicator PETSC_COMM_SELF and issue VecView. I get as many files as processors, but the first one contains all the data and the others are empty! Why? And, more importantly, what's the best way to achieve my goal? Thanks a lot. Matteo From bsmith at mcs.anl.gov Thu Nov 23 19:34:05 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 23 Nov 2006 19:34:05 -0600 (CST) Subject: saving parallel vectors In-Reply-To: <200611232001.16210.semplice@mat.unimi.it> References: <200611232001.16210.semplice@mat.unimi.it> Message-ID: NEVER use ascii for large data sets. Use the binary viewer to save them. See PetscViewerBinaryOpen(). Barry On Thu, 23 Nov 2006, Matteo Semplice wrote: > This is really a newbie question but I am struggling to solve out of memory > troubles on my first processor. > > I have a parallel global vector, say v, that I obtain with a call to > DAGetGlobalVector. I save it to disk opening an ASCII standard viewer on > PETSC_COMM_WORLD and calling VecView. As I understand from the manual, this > causes all processors to send their data to the first one and this one writes > them to disk. This works fine for small computational grids, but hangs my > program if the grid is bigger. > > I am thinking to get each processor to write its own file and reassemble the > data at the end of the program. I tried to create the viewer with the > communicator PETSC_COMM_SELF and issue VecView. I get as many files as > processors, but the first one contains all the data and the others are empty! > > Why? And, more importantly, what's the best way to achieve my goal? > > Thanks a lot. > > Matteo > > From balay at mcs.anl.gov Thu Nov 23 22:47:11 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 23 Nov 2006 22:47:11 -0600 (CST) Subject: saving parallel vectors In-Reply-To: References: <200611232001.16210.semplice@mat.unimi.it> Message-ID: To complete your query - you'll also need a Vec with the same communicator - i.e PETSC_COMM_SELF - for your approach to work. One way to do this is: VecGetArray(vec,&v) VecGetLocalSize(vec,size) VecCreateSeqWithArray(MPI_COMM_SELF,size,v,&seqvec) VecView(seqvec,seqviewer) VecDestroy(seqvec) VecRestoreArray(vec,&v) Satish On Thu, 23 Nov 2006, Barry Smith wrote: > > NEVER use ascii for large data sets. Use the binary viewer to save > them. See PetscViewerBinaryOpen(). > > Barry > > > On Thu, 23 Nov 2006, Matteo Semplice wrote: > > > This is really a newbie question but I am struggling to solve out of memory > > troubles on my first processor. > > > > I have a parallel global vector, say v, that I obtain with a call to > > DAGetGlobalVector. I save it to disk opening an ASCII standard viewer on > > PETSC_COMM_WORLD and calling VecView. As I understand from the manual, this > > causes all processors to send their data to the first one and this one writes > > them to disk. This works fine for small computational grids, but hangs my > > program if the grid is bigger. > > > > I am thinking to get each processor to write its own file and reassemble the > > data at the end of the program. I tried to create the viewer with the > > communicator PETSC_COMM_SELF and issue VecView. I get as many files as > > processors, but the first one contains all the data and the others are empty! > > > > Why? And, more importantly, what's the best way to achieve my goal? > > > > Thanks a lot. > > > > Matteo > > > > > > From semplice at mat.unimi.it Fri Nov 24 02:16:57 2006 From: semplice at mat.unimi.it (Matteo Semplice) Date: Fri, 24 Nov 2006 09:16:57 +0100 (CET) Subject: saving parallel vectors In-Reply-To: References: <200611232001.16210.semplice@mat.unimi.it> Message-ID: Thansk for all the replies. I always thought that binary format would be best, but I couldn't find any description of the binary format. Could you point me to a relevant piece of the docs? Can I load the PETSC binary files into MatLab or DataExplorer for further processing and visualization? Matteo On Thu, 23 Nov 2006, Barry Smith wrote: > NEVER use ascii for large data sets. Use the binary viewer to save > them. See PetscViewerBinaryOpen(). > > Barry > > > On Thu, 23 Nov 2006, Matteo Semplice wrote: > >> This is really a newbie question but I am struggling to solve out of memory >> troubles on my first processor. >> >> I have a parallel global vector, say v, that I obtain with a call to >> DAGetGlobalVector. I save it to disk opening an ASCII standard viewer on >> PETSC_COMM_WORLD and calling VecView. As I understand from the manual, this >> causes all processors to send their data to the first one and this one writes >> them to disk. This works fine for small computational grids, but hangs my >> program if the grid is bigger. >> >> I am thinking to get each processor to write its own file and reassemble the >> data at the end of the program. I tried to create the viewer with the >> communicator PETSC_COMM_SELF and issue VecView. I get as many files as >> processors, but the first one contains all the data and the others are empty! >> >> Why? And, more importantly, what's the best way to achieve my goal? >> >> Thanks a lot. >> >> Matteo >> >> > -- -- Matteo Semplice Dip. di Matematica - Universita` degli Studi di Milano Via Saldini, 50 - 20133 MILANO. Tel: +39 02 50316170 From balay at mcs.anl.gov Fri Nov 24 09:38:43 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 24 Nov 2006 09:38:43 -0600 (CST) Subject: saving parallel vectors In-Reply-To: References: <200611232001.16210.semplice@mat.unimi.it> Message-ID: On Fri, 24 Nov 2006, Matteo Semplice wrote: > Thansk for all the replies. > > I always thought that binary format would be best, but I couldn't find any > description of the binary format. Could you point me to a relevant piece of > the docs? This is documented in the man page for VecLoad() and MatLoad() > Can I load the PETSC binary files into MatLab or DataExplorer for > further processing and visualization? You might want to check/use bin/matlab/PetscBinaryRead.m Satish From zonexo at gmail.com Fri Nov 24 18:32:24 2006 From: zonexo at gmail.com (Ben Tay) Date: Sat, 25 Nov 2006 08:32:24 +0800 Subject: Unable to use MPICH2 during Petsc compilation Message-ID: <804ab5d40611241632s1b7f0ab0oa7651b5d7e2e749b@mail.gmail.com> Hi, I'm trying to use MPICH2 for the mpi during compilation of my Petsc. It works OK if I use MPICH (mpich.nt.1.2.5). I try to specify the directory,lib (mpich2.lib),include etc but it keeps on saying that mpi_init cannot work or something like that. May I know what's wrong? My OS is winxp pro sp2. Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Fri Nov 24 18:40:52 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 24 Nov 2006 18:40:52 -0600 (CST) Subject: Unable to use MPICH2 during Petsc compilation In-Reply-To: <804ab5d40611241632s1b7f0ab0oa7651b5d7e2e749b@mail.gmail.com> References: <804ab5d40611241632s1b7f0ab0oa7651b5d7e2e749b@mail.gmail.com> Message-ID: Have you rebuilt PETSc libraries with mpich2 - when you made this change? If so - send us the relavent logs at petsc-maint at mcs.anl.gov [configure.log, make_log and log for 'make test'] Satish On Sat, 25 Nov 2006, Ben Tay wrote: > Hi, > > I'm trying to use MPICH2 for the mpi during compilation of my Petsc. It > works OK if I use MPICH (mpich.nt.1.2.5). I try to specify the directory,lib > (mpich2.lib),include etc but it keeps on saying that mpi_init cannot work or > something like that. May I know what's wrong? > > My OS is winxp pro sp2. > > Thank you very much! > From zonexo at gmail.com Fri Nov 24 18:46:23 2006 From: zonexo at gmail.com (Ben Tay) Date: Sat, 25 Nov 2006 08:46:23 +0800 Subject: Modifying the MSDdev *.dsw *.dsp files to run without mpi Message-ID: <804ab5d40611241646u3ec3f0d6h465e7c7a7ab2db57@mail.gmail.com> Hi, I've managed to compile and run the examples in MSDev when i use MPICH. However, if I compile without MPI, I 'll get errors during linking. How should I modify my configuration file in MSDev so that I can run without mpi? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Nov 24 19:05:22 2006 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 24 Nov 2006 19:05:22 -0600 Subject: Modifying the MSDdev *.dsw *.dsp files to run without mpi In-Reply-To: <804ab5d40611241646u3ec3f0d6h465e7c7a7ab2db57@mail.gmail.com> References: <804ab5d40611241646u3ec3f0d6h465e7c7a7ab2db57@mail.gmail.com> Message-ID: You need to configure using --wih-mpi=0. Matt On 11/24/06, Ben Tay wrote: > Hi, > > I've managed to compile and run the examples in MSDev when i use MPICH. > However, if I compile without MPI, I 'll get errors during linking. How > should I modify my configuration file in MSDev so that I can run without > mpi? > > Thank you very much! -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From zonexo at gmail.com Fri Nov 24 19:36:09 2006 From: zonexo at gmail.com (Ben Tay) Date: Sat, 25 Nov 2006 09:36:09 +0800 Subject: Unable to use MPICH2 during Petsc compilation In-Reply-To: References: <804ab5d40611241632s1b7f0ab0oa7651b5d7e2e749b@mail.gmail.com> Message-ID: <804ab5d40611241736j34aadaabs9724407345e1e4e3@mail.gmail.com> Hi, I tried to install the mpich2 package 1st and compile the Petsc. I tried specifying the directory/libs/include but they all did not work. I had used /config/configure.py --with-cc='win32fe cl' --with-fc='win32fe f90' --with-cxx='win32fe cl' By moving the intel mkl from c:/program files/intel/mkl/8.1.1/ to c:/program files/intel/mkl/, it was able to detect mkl. However, the mpi ini() was not successful. So in the end I had to install mpich1 and compile with Petsc using that. I now 've a working Petsc with mpich1. If I use the above command again to generate the log file, will it "damaged" my current Petsc? Thank you! On 11/25/06, Satish Balay wrote: > > Have you rebuilt PETSc libraries with mpich2 - when you made this change? > > If so - send us the relavent logs at petsc-maint at mcs.anl.gov > [configure.log, make_log and log for 'make test'] > > Satish > > On Sat, 25 Nov 2006, Ben Tay wrote: > > > Hi, > > > > I'm trying to use MPICH2 for the mpi during compilation of my Petsc. It > > works OK if I use MPICH (mpich.nt.1.2.5). I try to specify the > directory,lib > > (mpich2.lib),include etc but it keeps on saying that mpi_init cannot > work or > > something like that. May I know what's wrong? > > > > My OS is winxp pro sp2. > > > > Thank you very much! > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zonexo at gmail.com Fri Nov 24 19:42:11 2006 From: zonexo at gmail.com (Ben Tay) Date: Sat, 25 Nov 2006 09:42:11 +0800 Subject: Modifying the MSDdev *.dsw *.dsp files to run without mpi In-Reply-To: References: <804ab5d40611241646u3ec3f0d6h465e7c7a7ab2db57@mail.gmail.com> Message-ID: <804ab5d40611241742r512854abj3d44ed13c2712b04@mail.gmail.com> Hi, yes I did that. There is no problem if I run the example in cygwin. However, if I use the project files for MSDev given in the petsc package, it gives me errors during linking. Compiling works though. I tried to recompile the whole Petsc with mpich1 and there is no such errors. Thank you. On 11/25/06, Matthew Knepley wrote: > > You need to configure using --wih-mpi=0. > > Matt > > On 11/24/06, Ben Tay wrote: > > Hi, > > > > I've managed to compile and run the examples in MSDev when i use MPICH. > > However, if I compile without MPI, I 'll get errors during linking. How > > should I modify my configuration file in MSDev so that I can run without > > mpi? > > > > Thank you very much! > > > -- > "Failure has a thousand explanations. Success doesn't need one" -- Sir > Alec Guiness > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Nov 24 19:45:15 2006 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 24 Nov 2006 19:45:15 -0600 Subject: Modifying the MSDdev *.dsw *.dsp files to run without mpi In-Reply-To: <804ab5d40611241742r512854abj3d44ed13c2712b04@mail.gmail.com> References: <804ab5d40611241646u3ec3f0d6h465e7c7a7ab2db57@mail.gmail.com> <804ab5d40611241742r512854abj3d44ed13c2712b04@mail.gmail.com> Message-ID: We are not able to generate MSDev files, so you will have to alter them yourself. You need to take out the references to MPI. Matt On 11/24/06, Ben Tay wrote: > Hi, > > yes I did that. There is no problem if I run the example in cygwin. However, > if I use the project files for MSDev given in the petsc package, it gives me > errors during linking. Compiling works though. > > I tried to recompile the whole Petsc with mpich1 and there is no such > errors. > > Thank you. > > > > On 11/25/06, Matthew Knepley wrote: > > You need to configure using --wih-mpi=0. > > > > Matt > > > > On 11/24/06, Ben Tay < zonexo at gmail.com> wrote: > > > Hi, > > > > > > I've managed to compile and run the examples in MSDev when i use MPICH. > > > However, if I compile without MPI, I 'll get errors during linking. How > > > should I modify my configuration file in MSDev so that I can run without > > > mpi? > > > > > > Thank you very much! > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From balay at mcs.anl.gov Fri Nov 24 20:07:47 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 24 Nov 2006 20:07:47 -0600 (CST) Subject: Unable to use MPICH2 during Petsc compilation In-Reply-To: <804ab5d40611241736j34aadaabs9724407345e1e4e3@mail.gmail.com> References: <804ab5d40611241632s1b7f0ab0oa7651b5d7e2e749b@mail.gmail.com> <804ab5d40611241736j34aadaabs9724407345e1e4e3@mail.gmail.com> Message-ID: You can't build PETSc libraries with mpich1 and expect it to work with mpich2. If there was a configure failure with mpich2 - then send us the relavent configure.log file. Configure should have found mpich2 - if it were installed in the default location. Perhaps there was some other issue here.. Also - if mpich1 works - I'll recommend sticking with it on windows. [unless there is a specific reason - requiring mpich2] Satish On Sat, 25 Nov 2006, Ben Tay wrote: > Hi, > > I tried to install the mpich2 package 1st and compile the Petsc. I tried > specifying the directory/libs/include but they all did not work. I had > used /config/configure.py > --with-cc='win32fe cl' --with-fc='win32fe f90' --with-cxx='win32fe cl' > By moving the intel mkl from c:/program files/intel/mkl/8.1.1/ to c:/program > files/intel/mkl/, it was able to detect mkl. However, the mpi ini() was not > successful. So in the end I had to install mpich1 and compile with Petsc > using that. > > I now 've a working Petsc with mpich1. If I use the above command again to > generate the log file, will it "damaged" my current Petsc? > > Thank you! > > On 11/25/06, Satish Balay wrote: > > > > Have you rebuilt PETSc libraries with mpich2 - when you made this change? > > > > If so - send us the relavent logs at petsc-maint at mcs.anl.gov > > [configure.log, make_log and log for 'make test'] > > > > Satish > > > > On Sat, 25 Nov 2006, Ben Tay wrote: > > > > > Hi, > > > > > > I'm trying to use MPICH2 for the mpi during compilation of my Petsc. It > > > works OK if I use MPICH (mpich.nt.1.2.5). I try to specify the > > directory,lib > > > (mpich2.lib),include etc but it keeps on saying that mpi_init cannot > > work or > > > something like that. May I know what's wrong? > > > > > > My OS is winxp pro sp2. > > > > > > Thank you very much! > > > > > > > > From balay at mcs.anl.gov Fri Nov 24 20:11:55 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 24 Nov 2006 20:11:55 -0600 (CST) Subject: Modifying the MSDdev *.dsw *.dsp files to run without mpi In-Reply-To: References: <804ab5d40611241646u3ec3f0d6h465e7c7a7ab2db57@mail.gmail.com> <804ab5d40611241742r512854abj3d44ed13c2712b04@mail.gmail.com> Message-ID: You'll have to follow instructions in the 'Project Files' section at http://www-unix.mcs.anl.gov/petsc/petsc-as/documentation/installation.html [specifically - perhaps that MPI include/library paths in the project files were not updated to point to mpiuni stuff [as would be visible when a PETSc example is compiled from cygwin bash using make.] Satish On Fri, 24 Nov 2006, Matthew Knepley wrote: > We are not able to generate MSDev files, so you will have to alter them > yourself. You need to take out the references to MPI. > > Matt > > On 11/24/06, Ben Tay wrote: > > Hi, > > > > yes I did that. There is no problem if I run the example in cygwin. However, > > if I use the project files for MSDev given in the petsc package, it gives me > > errors during linking. Compiling works though. > > > > I tried to recompile the whole Petsc with mpich1 and there is no such > > errors. > > > > Thank you. > > > > > > > > On 11/25/06, Matthew Knepley wrote: > > > You need to configure using --wih-mpi=0. > > > > > > Matt > > > > > > On 11/24/06, Ben Tay < zonexo at gmail.com> wrote: > > > > Hi, > > > > > > > > I've managed to compile and run the examples in MSDev when i use MPICH. > > > > However, if I compile without MPI, I 'll get errors during linking. How > > > > should I modify my configuration file in MSDev so that I can run without > > > > mpi? > > > > > > > > Thank you very much! > > > > > > > > > -- > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > Alec Guiness > > > > > > > > > > > > > From kishor.gawande at nicta.com.au Sat Nov 25 00:15:26 2006 From: kishor.gawande at nicta.com.au (Kishor Gawande) Date: Sat, 25 Nov 2006 17:15:26 +1100 Subject: Missing references to libpetsc.so in libpetscksp.so Message-ID: Hi, I can load libpetsc.so successfully using dlopen, however after that while loading libpetscksp.so using dlopen I get following error: kishor at tepal:~/snapshot/externalpackages/petsc-2.3.2-p3$~/samples/pet [start_test] [PetscDLLTest.c] dlopen("libpetsc.so", RTLD_NOW): Successful [PetscDLLTest.c] Unable to open library: /home/kishor/snapshot/externalpackages/petsc-2.3.2-p3/lib/linux-gnu- cxx-debug/libpetscksp.so: undefined symbol: _stageLog This work successfully on my MAC Os X but it is not working on Ubuntu Linux 6.06 It seems the symbol is _stageLog is defined in libpetsc.so library but libpetsck.so is not able to locate it. I have checked dependacy using ldd, it does not show any reference to libpetsc.so, however it does show references to libmpich.so and other files. Also I have edited the binary libpetscksp.so and it also does not include any references to libpetsc.so and other libpetsc library files. kishor at tepal:~/snapshot/externalpackages/petsc-2.3.2-p3/lib/linux-gnu- cxx-debug$ ldd libpetscksp.so linux-gate.so.1 => (0xffffe000) libmpich.so => /home/kishor/snapshot/externalpackages/petsc-2.3.2-p3/ externalpackages/mpich2-1.0.4p1/linux-gnu-cxx-debug/lib/libmpich.so (0xb7baf000) libnsl.so.1 => /lib/../lib/tls/i686/cmov/libnsl.so.1 (0xb7b9a000) librt.so.1 => /lib/../lib/tls/i686/cmov/librt.so.1 (0xb7b92000) libdl.so.2 => /lib/../lib/tls/i686/cmov/libdl.so.2 (0xb7b8e000) libgcc_s.so.1 => /lib/../lib/libgcc_s.so.1 (0xb7b84000) libgfortran.so.0 => /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libgfortran.so.0 (0xb7b2b000) libm.so.6 => /lib/../lib/tls/i686/cmov/libm.so.6 (0xb7b09000) libstdc++.so.6 => /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libstdc++.so.6 (0xb7a34000) libc.so.6 => /lib/../lib/tls/i686/cmov/libc.so.6 (0xb7904000) libpthread.so.0 => /lib/../lib/tls/i686/cmov/libpthread.so.0 (0xb78f2000) /lib/ld-linux.so.2 (0x80000000) kishor at tepal:~/snapshot/externalpackages/petsc-2.3.2-p3/lib/linux-gnu- cxx-debug$ These are the PETSC configure Options: --with-cc=gcc --download-f-blas-lapack=1 --download-mpich=1 --with-shared --with-dynamic --with-python --with-clanguage=C++ --with-c-support Any clue what is wrong here? Thanks, _KishorG From balay at mcs.anl.gov Sat Nov 25 00:25:36 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Sat, 25 Nov 2006 00:25:36 -0600 (CST) Subject: Missing references to libpetsc.so in libpetscksp.so In-Reply-To: References: Message-ID: You might want to check the code for PetscInitialize_DynamicLibraries() in src/sys/dll/reg.c Part of the issue is - on Mac libpetscksp.dylib is linked in with libpetsc.dylib [otherwise the dylibs can't be created] ..etc - but not on linux. Satish On Sat, 25 Nov 2006, Kishor Gawande wrote: > Hi, > > I can load libpetsc.so successfully using dlopen, however after that while > loading libpetscksp.so using dlopen I get following error: > > kishor at tepal:~/snapshot/externalpackages/petsc-2.3.2-p3$~/samples/pet > [start_test] > [PetscDLLTest.c] dlopen("libpetsc.so", RTLD_NOW): > Successful > [PetscDLLTest.c] Unable to open library: > /home/kishor/snapshot/externalpackages/petsc-2.3.2-p3/lib/linux-gnu-cxx-debug/libpetscksp.so: > undefined symbol: _stageLog > > This work successfully on my MAC Os X but it is not working on Ubuntu Linux > 6.06 > > It seems the symbol is _stageLog is defined in libpetsc.so library but > libpetsck.so is not able to > locate it. > > I have checked dependacy using ldd, it does not show any reference to > libpetsc.so, however it does show references to libmpich.so and other files. > Also I have edited the binary libpetscksp.so and it also does not include any > references to libpetsc.so and other libpetsc library files. > > kishor at tepal:~/snapshot/externalpackages/petsc-2.3.2-p3/lib/linux-gnu-cxx-debug$ > ldd libpetscksp.so > linux-gate.so.1 => (0xffffe000) > libmpich.so => > /home/kishor/snapshot/externalpackages/petsc-2.3.2-p3/externalpackages/mpich2-1.0.4p1/linux-gnu-cxx-debug/lib/libmpich.so > (0xb7baf000) > libnsl.so.1 => > /lib/../lib/tls/i686/cmov/libnsl.so.1 (0xb7b9a000) > librt.so.1 => > /lib/../lib/tls/i686/cmov/librt.so.1 (0xb7b92000) > libdl.so.2 => > /lib/../lib/tls/i686/cmov/libdl.so.2 (0xb7b8e000) > libgcc_s.so.1 => /lib/../lib/libgcc_s.so.1 > (0xb7b84000) > libgfortran.so.0 => > /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libgfortran.so.0 > (0xb7b2b000) > libm.so.6 => > /lib/../lib/tls/i686/cmov/libm.so.6 (0xb7b09000) > libstdc++.so.6 => > /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libstdc++.so.6 > (0xb7a34000) > libc.so.6 => > /lib/../lib/tls/i686/cmov/libc.so.6 (0xb7904000) > libpthread.so.0 => > /lib/../lib/tls/i686/cmov/libpthread.so.0 (0xb78f2000) > /lib/ld-linux.so.2 (0x80000000) > kishor at tepal:~/snapshot/externalpackages/petsc-2.3.2-p3/lib/linux-gnu-cxx-debug$ > > These are the PETSC configure Options: --with-cc=gcc > --download-f-blas-lapack=1 --download-mpich=1 > --with-shared --with-dynamic --with-python > --with-clanguage=C++ --with-c-support > > Any clue what is wrong here? > > Thanks, > _KishorG > From zonexo at gmail.com Tue Nov 28 03:36:44 2006 From: zonexo at gmail.com (Ben Tay) Date: Tue, 28 Nov 2006 17:36:44 +0800 Subject: Using Compaq visual fortran w/o intel mkl & visual 6 c++ Message-ID: <804ab5d40611280136k723dbfbfnf19a1769138c96d4@mail.gmail.com> Hi, may I know if it is possible to run my program in compaq visual fortran 6.6without installing visual c++6 and intel mkl? in other words, use gnu c compiler and the downloaded blas/lapack. all a system with all these it worked. however, another comp in my sch only has vf 6.6. thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From zonexo at gmail.com Tue Nov 28 03:58:12 2006 From: zonexo at gmail.com (Ben Tay) Date: Tue, 28 Nov 2006 17:58:12 +0800 Subject: unresolved external symbol with matgetarrayf90/matrestorearrayf90 Message-ID: <804ab5d40611280158i5ae9ef7esdeae9801723ae3fe@mail.gmail.com> hi, I'm using win xp with visual fortran and visual c++. i had compiled in cygwin w/o any problems and most examples worked. however ex16f90 in the mat directory gave the error of unresolved external symbol with matgetarrayf90/matrestorearrayf90 when i tried to compile in cygwin. it's stated in the documentation that these subroutine only works with certain f90 compiler. does it mean it doesn't work with visual fortran? so in order to access the matrix, should i use matgetarray instead? thanks alot! -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Tue Nov 28 07:15:25 2006 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 28 Nov 2006 07:15:25 -0600 Subject: unresolved external symbol with matgetarrayf90/matrestorearrayf90 In-Reply-To: <804ab5d40611280158i5ae9ef7esdeae9801723ae3fe@mail.gmail.com> References: <804ab5d40611280158i5ae9ef7esdeae9801723ae3fe@mail.gmail.com> Message-ID: On 11/28/06, Ben Tay wrote: > hi, > > I'm using win xp with visual fortran and visual c++. i had compiled in > cygwin w/o any problems and most examples worked. however ex16f90 in the mat > directory gave the error of unresolved external symbol with > matgetarrayf90/matrestorearrayf90 when i tried to compile > in cygwin. > > it's stated in the documentation that these subroutine only works with > certain f90 compiler. does it mean it doesn't work with visual fortran? Yes, these routines can only work if we now the array descriptor format. Compaq keeps this a secret. > so in order to access the matrix, should i use matgetarray instead? Yes. Matt > > thanks alot! -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From balay at mcs.anl.gov Tue Nov 28 09:46:00 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Tue, 28 Nov 2006 09:46:00 -0600 (CST) Subject: unresolved external symbol with matgetarrayf90/matrestorearrayf90 In-Reply-To: References: <804ab5d40611280158i5ae9ef7esdeae9801723ae3fe@mail.gmail.com> Message-ID: On Tue, 28 Nov 2006, Matthew Knepley wrote: > On 11/28/06, Ben Tay wrote: > > hi, > > > > I'm using win xp with visual fortran and visual c++. i had compiled in > > cygwin w/o any problems and most examples worked. however ex16f90 in the mat > > directory gave the error of unresolved external symbol with > > matgetarrayf90/matrestorearrayf90 when i tried to compile > > in cygwin. > > > > it's stated in the documentation that these subroutine only works with > > certain f90 compiler. does it mean it doesn't work with visual fortran? > > Yes, these routines can only work if we now the array descriptor > format. Compaq keeps this a secret. Actually we have the f90 interface working with Compaqf90 [6.0 compiler]. Use the additional configure option --with-f90-interface=win32 Satish > > > so in order to access the matrix, should i use matgetarray instead? > > Yes. > > Matt > > > > > thanks alot! > From balay at mcs.anl.gov Tue Nov 28 09:51:57 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Tue, 28 Nov 2006 09:51:57 -0600 (CST) Subject: Using Compaq visual fortran w/o intel mkl & visual 6 c++ In-Reply-To: <804ab5d40611280136k723dbfbfnf19a1769138c96d4@mail.gmail.com> References: <804ab5d40611280136k723dbfbfnf19a1769138c96d4@mail.gmail.com> Message-ID: We haven't tried gcc+compaq fortran. I don't think it will work. You'll need the C compiler to install PETSc libraries. But once the libraries are installed - you might be able to copy/use them on a different machine with only the fortran compiler [provided everything else PETSc is configured with - i.e blas, mpi - are in the exact same location on this other machine] Satish On Tue, 28 Nov 2006, Ben Tay wrote: > Hi, > > may I know if it is possible to run my program in compaq visual > fortran 6.6without installing visual c++6 and intel mkl? in other > words, use gnu c > compiler and the downloaded blas/lapack. > > all a system with all these it worked. however, another comp in my sch only > has vf 6.6. > > thank you very much! > From mep4gk01 at ucy.ac.cy Wed Nov 29 14:49:59 2006 From: mep4gk01 at ucy.ac.cy (mep4gk01 at ucy.ac.cy) Date: Wed, 29 Nov 2006 22:49:59 +0200 Subject: write output in a ASCII Message-ID: Dear all, How can I pass a vector or a matrix into a text file? I am using Fortran 90. What I am trying to do is to pass the solution vector from KSP into a text file without printing it on the screen. Thanks, George Katsambas From knepley at gmail.com Wed Nov 29 15:59:01 2006 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 29 Nov 2006 15:59:01 -0600 Subject: write output in a ASCII In-Reply-To: References: Message-ID: Use VecView() with an ASCII viewer opened to the file you want. Thanks, Matt On 11/29/06, mep4gk01 at ucy.ac.cy wrote: > Dear all, > > How can I pass a vector or a matrix into a text file? I am using Fortran 90. What I am trying to do is to pass the solution vector from KSP into a text file without printing it on the screen. > > Thanks, > George Katsambas > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From zonexo at gmail.com Wed Nov 29 21:35:23 2006 From: zonexo at gmail.com (Ben Tay) Date: Thu, 30 Nov 2006 11:35:23 +0800 Subject: unable to find include files during make Message-ID: <804ab5d40611291935s31ad02cm201fa39ff488d2b3@mail.gmail.com> hi, i've managed to compile petsc on my sch's linux server. i've done both the shared and non-shared libraries. test examples worked fine. however when i tried to compile my own code which uses petsc in one of the module, it says "can't find include file..... (all include files)". my petsc_dir/petsc arch has already been set. i'm using intel fortran 7 (ifc) with gcc, because i get the error msg "Fortran libraries cannot be used with C compiler" when i tried ifc with icc. is there anyway to get around this? anyway, how should my makefile be? currently my makefile for the petsc solver is petsc_sub.o : petsc_sub.F $(f90) $(opt) petsc_sub.F if i compiled as shared libraries, what other statements must i add? the current opt are -r8 -ip -w95 -c -static-libcxa -L/nas/lsftmp/g0306332/petsc-2.3.2-p6/ thank you very much regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From zonexo at gmail.com Thu Nov 30 00:39:55 2006 From: zonexo at gmail.com (Ben Tay) Date: Thu, 30 Nov 2006 14:39:55 +0800 Subject: unable to find include files during make - found solution Message-ID: <804ab5d40611292239g4a56bdf6u4c94ecfbd37b7095@mail.gmail.com> hi, i managed to solve the problem by telling the compiler to search for the include directory. however, it seems that i need to specify the petsc dir, the petsc/bmake/linux-gnu-intel/ dir and the petsc/include dir. it is now up and running. -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxliu at fudan.edu.cn Thu Nov 30 01:59:59 2006 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Thu, 30 Nov 2006 15:59:59 +0800 Subject: about memory type Message-ID: <002801c71455$889ffaf0$3364a8c0@dmrc6700512> Hi, Which memory type, e.g. share or distributed memory, is most suitable to PETSC? Cheers Yixun -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Nov 30 06:00:18 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 30 Nov 2006 06:00:18 -0600 Subject: about memory type In-Reply-To: <002801c71455$889ffaf0$3364a8c0@dmrc6700512> References: <002801c71455$889ffaf0$3364a8c0@dmrc6700512> Message-ID: On 11/30/06, Yixun Liu wrote: > Hi, > > Which memory type, e.g. share or distributed memory, is most suitable to > PETSC? The parallel performance of PETSc depends of that of MPI. If built correctly, good performance can be achieved on either architecture. Matt > Cheers > > Yixun -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From bsmith at mcs.anl.gov Thu Nov 30 08:31:10 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 30 Nov 2006 08:31:10 -0600 (CST) Subject: unable to find include files during make In-Reply-To: <804ab5d40611291935s31ad02cm201fa39ff488d2b3@mail.gmail.com> References: <804ab5d40611291935s31ad02cm201fa39ff488d2b3@mail.gmail.com> Message-ID: Ben, You need also to have ${PETSC_FC_INCLUDES} which is defined in ${PETSC_DIR}/bmake/common/variables so if you are using the include ${PETSC_DIR}/bmake/common/base in your makefile you need only add ${PETSC_FC_INCLUDES} to your opt. If you are NOT using the inclusion of PETSc common/base it gets more complicated you will need something like -I${PETSC_DIR} -I${PETSC_DIR}/bmake/${PETSC_ARCH} -I${PETSC_DIR}/include added to the opt. Barry On Thu, 30 Nov 2006, Ben Tay wrote: > hi, > > i've managed to compile petsc on my sch's linux server. i've done both the > shared and non-shared libraries. test examples worked fine. however when i > tried to compile my own code which uses petsc in one of the module, it says > "can't find include file..... (all include files)". > > my petsc_dir/petsc arch has already been set. i'm using intel fortran 7 > (ifc) with gcc, because i get the error msg "Fortran libraries cannot be > used with C compiler" when i tried ifc with icc. is there anyway to get > around this? > > anyway, how should my makefile be? currently my makefile for the petsc > solver is > > petsc_sub.o : petsc_sub.F > > $(f90) $(opt) petsc_sub.F > if i compiled as shared libraries, what other statements must i add? the > current opt are > > -r8 -ip -w95 -c -static-libcxa -L/nas/lsftmp/g0306332/petsc-2.3.2-p6/ > > > thank you very much > > regards >