[petsc-dev] Problem with VecLoad and .info files

Blaise Bourdin bourdin at lsu.edu
Sun Jun 10 08:37:52 CDT 2012


Hi,

I think I found another bug related to Vec blocksize...

It looks like loading vectors with different block sizes from a binary fine is broken in petsc-3.3:
try the attached example:

iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 0
Vector Object:UVec 1 MPI processes
  type: mpi
Process [0]
0
10
1
11
Vector Object:VVec 1 MPI processes
  type: mpi
Process [0]
0
-100
-200
-10
-110
-210
-1
-101
-201
-11
-111
-211
Writing vectors to file
iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 1
Reading vectors from file
Processor [0] M 2 N 2 m 1 n 1 w 1 s 1
X range of indices: 0 2, Y range of indices: 0 2
Processor [0] M 2 N 2 m 1 n 1 w 3 s 1
X range of indices: 0 2, Y range of indices: 0 2
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Arguments are incompatible!
[0]PETSC ERROR: Local size 4 not compatible with block size 3!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 0, unknown 
[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: ./TestVecLoad-dev on a Darwin-gc named iMac.local by blaise Sun Jun 10 08:35:07 2012
[0]PETSC ERROR: Libraries linked from /opt/HPC/petsc-3.3/Darwin-gcc4.2-g/lib
[0]PETSC ERROR: Configure run at Fri Jun  8 22:01:00 2012
[0]PETSC ERROR: Configure options CFLAGS=-Wno-unused --download-hdf5=1 --download-metis=1 --download-parmetis=1 --download-sowing=1 --download-triangle=1 --with-cmake=cmake --with-debugging=1 --with-gnu-compilers=1 --with-mpi-dir=/opt/HPC/mpich2-1.4.1p1-gcc4.2 --with-pic --with-shared-libraries=1 --with-x11=1
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: PetscLayoutSetBlockSize() line 459 in /opt/HPC/petsc-3.3/src/vec/vec/impls/mpi/pmap.c
[0]PETSC ERROR: VecSetBlockSize() line 1526 in /opt/HPC/petsc-3.3/src/vec/vec/interface/vector.c
[0]PETSC ERROR: VecLoad_Binary() line 104 in /opt/HPC/petsc-3.3/src/vec/vec/utils/vecio.c
[0]PETSC ERROR: VecLoad_Default() line 348 in /opt/HPC/petsc-3.3/src/vec/vec/utils/vecio.c
[0]PETSC ERROR: VecLoad() line 1111 in /opt/HPC/petsc-3.3/src/vec/vec/interface/vector.c
[0]PETSC ERROR: main() line 86 in TestVecLoad-dev.c
application called MPI_Abort(MPI_COMM_WORLD, 75) - process 0
[unset]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 75) - process 0

but if one destroys the vector.dat.info file, everything seems fine:

iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 0
Vector Object:UVec 1 MPI processes
  type: mpi
Process [0]
0
10
1
11
Vector Object:VVec 1 MPI processes
  type: mpi
Process [0]
0
-100
-200
-10
-110
-210
-1
-101
-201
-11
-111
-211
Writing vectors to file
iMac:Misc blaise$ rm vector.dat.info 
iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 1
Reading vectors from file
Processor [0] M 2 N 2 m 1 n 1 w 1 s 1
X range of indices: 0 2, Y range of indices: 0 2
Processor [0] M 2 N 2 m 1 n 1 w 3 s 1
X range of indices: 0 2, Y range of indices: 0 2
Vector Object:UVec 1 MPI processes
  type: seq
0
10
1
11
Vector Object:VVec 1 MPI processes
  type: seq
0
-100
-200
-10
-110
-210
-1
-101
-201
-11
-111
-211

Blaise

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestVecLoad-dev.c
Type: application/octet-stream
Size: 4453 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120610/154bffb9/attachment.obj>
-------------- next part --------------

-- 
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin









More information about the petsc-dev mailing list