From c.calonaci at cineca.it Fri Dec 1 09:57:32 2006 From: c.calonaci at cineca.it (Cristiano Calonaci) Date: Fri, 1 Dec 2006 16:57:32 +0100 (MET) Subject: .info file Message-ID: <457050EB.1020404@cineca.it> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I am saving a vector on disk using this code ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD, xtruename, FILE_MODE_WRITE, &xtruefilebin); CHKERRQ(ierr); ierr = PetscViewerSetType(xtruefilebin, "binary"); ierr = VecView(*xtrue, xtruefilebin); CHKERRQ(ierr); ierr = PetscViewerDestroy(xtruefilebin); CHKERRQ(ierr); I don't want to create the .info file, how can do it ? Here http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Viewer/PetscViewerBinarySkipInfo.html#PetscViewerBinarySkipInfo there is a reference to PetscViewerBinarySetFilename but this function doesn't exist in 2.3.2 ..... Thanks a lot ! 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 iD8DBQFFcFDrvt08LyoFZwMRAtOBAJ91rK1tDsnTWQmCsoUuukx0+soghgCgiTo6 5uKapNhs+4u2LyqeRNNIe6M= =X3mW -----END PGP SIGNATURE----- From knepley at gmail.com Fri Dec 1 10:05:27 2006 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 1 Dec 2006 10:05:27 -0600 Subject: .info file In-Reply-To: <457050EB.1020404@cineca.it> References: <457050EB.1020404@cineca.it> Message-ID: On 12/1/06, Cristiano Calonaci wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I am saving a vector on disk using this code > > ierr = PetscViewerBinaryOpen(PETSC_COMM_WORLD, xtruename, > FILE_MODE_WRITE, &xtruefilebin); CHKERRQ(ierr); > ierr = PetscViewerSetType(xtruefilebin, "binary"); > ierr = VecView(*xtrue, xtruefilebin); CHKERRQ(ierr); > ierr = PetscViewerDestroy(xtruefilebin); CHKERRQ(ierr); > > I don't want to create the .info file, how can do it ? > Here http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Viewer/PetscViewerBinarySkipInfo.html#PetscViewerBinarySkipInfo That is the correct function. > there is a reference to > > PetscViewerBinarySetFilename > > but this function doesn't exist in 2.3.2 ..... It was changed to http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Viewer/PetscViewerFileSetName.html Matt > Thanks a lot ! > > Cristiano -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From balay at mcs.anl.gov Fri Dec 1 13:09:37 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 1 Dec 2006 13:09:37 -0600 (CST) Subject: unresolved external symbol with matgetarrayf90/matrestorearrayf90 In-Reply-To: References: <804ab5d40611280158i5ae9ef7esdeae9801723ae3fe@mail.gmail.com> Message-ID: On Tue, 28 Nov 2006, Satish Balay wrote: > Actually we have the f90 interface working with Compaqf90 [6.0 compiler]. Use > the additional configure option > > --with-f90-interface=win32 There was bug - which prevented this from working. You can get the latest tarfile [p7] which has the fix for it. Satish From zonexo at gmail.com Sun Dec 3 21:41:29 2006 From: zonexo at gmail.com (Ben Tay) Date: Mon, 4 Dec 2006 11:41:29 +0800 Subject: Some basic questions about PETSC Message-ID: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> Hi, I'm still relatively new to PETSC but I've finally managed to solve my own poisson eqn using it in about a week's time.Thank you for writing such a good solver. However, I have some questions still about PETSC: 1. Are petscscaler the same as real nos.? I am writing in double precision or real(8). So are these 2 interchangeable? (same as petscint and integer). 2. while linking in compaq visual fortran, I get the warning message about conflict library with LIBCMT. Is it important or can I just ignore it? 3. I am writing in f90 free form format. When I modify from fixed f77 format to f90, it gives me a lot of error, which seems to be the include file error. So, is it possible to write in f90 format? 4. I am writing a Navier stokes solver and I'm using PETSC to solve the poisson eqn. If only the RHS changes with each time step, do I need to call VecCreateSeq VecAssemblyBegin VecAssemblyEnd VecDestroy at each time step? I don't think I can (or I should) change values of b after VecAssemblyBegin,VecAssemblyEnd, or can I? Thank you very much and have a nice day Regards, Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Sun Dec 3 21:49:07 2006 From: knepley at gmail.com (Matthew Knepley) Date: Sun, 3 Dec 2006 21:49:07 -0600 Subject: Some basic questions about PETSC In-Reply-To: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> References: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> Message-ID: On 12/3/06, Ben Tay wrote: > Hi, > > I'm still relatively new to PETSC but I've finally managed to solve my own > poisson eqn using it in about a week's time.Thank you for writing such a > good solver. > > However, I have some questions still about PETSC: > > 1. Are petscscaler the same as real nos.? I am writing in double precision > or real(8). So are these 2 interchangeable? (same as petscint and integer). Yes. > 2. while linking in compaq visual fortran, I get the warning message about > conflict library with LIBCMT. Is it important or can I just ignore it? This is determined by your configure. Satish will know better how to control it. > 3. I am writing in f90 free form format. When I modify from fixed f77 format > to f90, it gives me a lot of error, which seems to be the include file > error. So, is it possible to write in f90 format? Depending on which compiler you use, you might have to give a flag. For g95 it is -ffree-form. > 4. I am writing a Navier stokes solver and I'm using PETSC to solve the > poisson eqn. If only the RHS changes with each time step, do I need to call > > VecCreateSeq > > VecAssemblyBegin > VecAssemblyEnd > VecDestroy > > at each time step? I don't think I can (or I should) change values of b > after VecAssemblyBegin,VecAssemblyEnd, or can I? You can just change the values. Call AssemblyBegin/End() after each group of changes. Matt > > Thank you very much and have a nice day > > Regards, > Ben -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From balay at mcs.anl.gov Sun Dec 3 22:34:35 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Sun, 3 Dec 2006 22:34:35 -0600 (CST) Subject: Some basic questions about PETSC In-Reply-To: References: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> Message-ID: On Sun, 3 Dec 2006, Matthew Knepley wrote: > > 1. Are petscscaler the same as real nos.? I am writing in double precision > > or real(8). So are these 2 interchangeable? (same as petscint and integer). > > Yes. You can check these defines in include/finclude/petscdef.h PetscInt -> integer*4 PetscScalar -> real*8 > > > 2. while linking in compaq visual fortran, I get the warning message about > > conflict library with LIBCMT. Is it important or can I just ignore it? > > This is determined by your configure. Satish will know better how to control > it. There are some warnings because of the way compqaq f90 tries to workarround some bugs in Visual Studio 6 version of the libraries. It will be fine as long as all code [PETSc & application] is compiled with the same set of compiler options, > > > 3. I am writing in f90 free form format. When I modify from fixed f77 format > > to f90, it gives me a lot of error, which seems to be the include file > > error. So, is it possible to write in f90 format? > > Depending on which compiler you use, you might have to give a flag. For g95 > it is -ffree-form. We'll have to see the error messgaes to determine what the problem is - however - if you check the PETSc fortran examples - they comply with both fixed and free from syntax. > > 4. I am writing a Navier stokes solver and I'm using PETSC to solve the > > poisson eqn. If only the RHS changes with each time step, do I need to call > > > > VecCreateSeq > > > > VecAssemblyBegin > > VecAssemblyEnd > > VecDestroy > > > > at each time step? I don't think I can (or I should) change values of b > > after VecAssemblyBegin,VecAssemblyEnd, or can I? > > You can just change the values. Call AssemblyBegin/End() after each group > of changes. Another note: - If you change values with VecSetValues() - you'll need to call VecAssemblyBegin,VecAssemblyEnd. However if you do VecGetArray() [or VecGetArrayF0()] - and change values - then you don't need the calls to VecAssembly... Satish From zonexo at gmail.com Mon Dec 4 01:00:34 2006 From: zonexo at gmail.com (Ben Tay) Date: Mon, 4 Dec 2006 15:00:34 +0800 Subject: Some basic questions about PETSC In-Reply-To: References: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> Message-ID: <804ab5d40612032300t7c2fa2ealaf4741197d7aad5d@mail.gmail.com> Hi, regarding qn 4 ie the requirement of VecAssemblyBegin,VecAssemblyEnd, I used VecPlaceArray, VecResetArray to change the values. I did not use Assembly after the 1st time step and it works ok. So that is fine too, right? Thank you! On 12/4/06, Satish Balay wrote: > > On Sun, 3 Dec 2006, Matthew Knepley wrote: > > > > 1. Are petscscaler the same as real nos.? I am writing in double > precision > > > or real(8). So are these 2 interchangeable? (same as petscint and > integer). > > > > Yes. > > You can check these defines in include/finclude/petscdef.h > > PetscInt -> integer*4 > PetscScalar -> real*8 > > > > > > 2. while linking in compaq visual fortran, I get the warning message > about > > > conflict library with LIBCMT. Is it important or can I just ignore it? > > > > This is determined by your configure. Satish will know better how to > control > > it. > > There are some warnings because of the way compqaq f90 tries to > workarround some bugs in Visual Studio 6 version of the libraries. It > will be fine as long as all code [PETSc & application] is compiled > with the same set of compiler options, > > > > > > 3. I am writing in f90 free form format. When I modify from fixed f77 > format > > > to f90, it gives me a lot of error, which seems to be the include file > > > error. So, is it possible to write in f90 format? > > > > Depending on which compiler you use, you might have to give a flag. For > g95 > > it is -ffree-form. > > We'll have to see the error messgaes to determine what the problem is > - however - if you check the PETSc fortran examples - they comply with > both fixed and free from syntax. > > > > 4. I am writing a Navier stokes solver and I'm using PETSC to solve > the > > > poisson eqn. If only the RHS changes with each time step, do I need to > call > > > > > > VecCreateSeq > > > > > > VecAssemblyBegin > > > VecAssemblyEnd > > > VecDestroy > > > > > > at each time step? I don't think I can (or I should) change values of > b > > > after VecAssemblyBegin,VecAssemblyEnd, or can I? > > > > You can just change the values. Call AssemblyBegin/End() after each > group > > of changes. > > Another note: - If you change values with VecSetValues() - you'll need > to call VecAssemblyBegin,VecAssemblyEnd. However if you do > VecGetArray() [or VecGetArrayF0()] - and change values - then you > don't need the calls to VecAssembly... > > Satish > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Dec 4 08:17:39 2006 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 4 Dec 2006 08:17:39 -0600 Subject: Some basic questions about PETSC In-Reply-To: <804ab5d40612032300t7c2fa2ealaf4741197d7aad5d@mail.gmail.com> References: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> <804ab5d40612032300t7c2fa2ealaf4741197d7aad5d@mail.gmail.com> Message-ID: On 12/4/06, Ben Tay wrote: > > Hi, > > regarding qn 4 ie the requirement of > VecAssemblyBegin,VecAssemblyEnd, I used VecPlaceArray, > VecResetArray to change the values. I did not use Assembly after the 1st > time step and it works ok. So that is fine too, right? Its alright, but probably not optimal. It could result in slower code due to all the allocation. Its normally better to change the values in place. Matt > Thank you! > > On 12/4/06, Satish Balay wrote: > > On Sun, 3 Dec 2006, Matthew Knepley wrote: > > > > > > 1. Are petscscaler the same as real nos.? I am writing in double > precision > > > > or real(8). So are these 2 interchangeable? (same as petscint and > integer). > > > > > > Yes. > > > > You can check these defines in include/finclude/petscdef.h > > > > PetscInt -> integer*4 > > PetscScalar -> real*8 > > > > > > > > > 2. while linking in compaq visual fortran, I get the warning message > about > > > > conflict library with LIBCMT. Is it important or can I just ignore it? > > > > > > This is determined by your configure. Satish will know better how to > control > > > it. > > > > There are some warnings because of the way compqaq f90 tries to > > workarround some bugs in Visual Studio 6 version of the libraries. It > > will be fine as long as all code [PETSc & application] is compiled > > with the same set of compiler options, > > > > > > > > > 3. I am writing in f90 free form format. When I modify from fixed f77 > format > > > > to f90, it gives me a lot of error, which seems to be the include file > > > > error. So, is it possible to write in f90 format? > > > > > > Depending on which compiler you use, you might have to give a flag. For > g95 > > > it is -ffree-form. > > > > We'll have to see the error messgaes to determine what the problem is > > - however - if you check the PETSc fortran examples - they comply with > > both fixed and free from syntax. > > > > > > 4. I am writing a Navier stokes solver and I'm using PETSC to solve > the > > > > poisson eqn. If only the RHS changes with each time step, do I need to > call > > > > > > > > VecCreateSeq > > > > > > > > VecAssemblyBegin > > > > VecAssemblyEnd > > > > VecDestroy > > > > > > > > at each time step? I don't think I can (or I should) change values of > b > > > > after VecAssemblyBegin,VecAssemblyEnd, or can I? > > > > > > You can just change the values. Call AssemblyBegin/End() after each > group > > > of changes. > > > > Another note: - If you change values with VecSetValues() - you'll need > > to call VecAssemblyBegin,VecAssemblyEnd. However if you > do > > VecGetArray() [or VecGetArrayF0()] - and change values - then you > > don't need the calls to VecAssembly... > > > > Satish > > > > > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From jbakosi at gmu.edu Mon Dec 4 12:19:17 2006 From: jbakosi at gmu.edu (Jozsef Bakosi) Date: Mon, 04 Dec 2006 13:19:17 -0500 Subject: -parallel Intel compiler option Message-ID: <20061204181917.GI5133@debian.scs.gmu.edu> Hi all, is it safe to compile the PETSc libraries with the -parallel option of Intel's compiler? Jozsef -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From balay at mcs.anl.gov Mon Dec 4 12:34:32 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Mon, 4 Dec 2006 12:34:32 -0600 (CST) Subject: -parallel Intel compiler option In-Reply-To: <20061204181917.GI5133@debian.scs.gmu.edu> References: <20061204181917.GI5133@debian.scs.gmu.edu> Message-ID: nope - PETSc uses MPI for parallelism internally - so using the additional compiler directive is not required. It mignt work - but it is not appropriate. [we never tested this mode] If you use this option - you'll need to understand what exactly it means [in this context of MPI etc.. ] - and how you want to control various issues involved in this mode. You can check out literature [or google for] 'Mixing MPI and OpenMP'. Satish On Mon, 4 Dec 2006, Jozsef Bakosi wrote: > Hi all, > > is it safe to compile the PETSc libraries with the -parallel option of > Intel's compiler? > > Jozsef > From gdiso at ustc.edu Mon Dec 4 19:37:20 2006 From: gdiso at ustc.edu (Gong Ding) Date: Tue, 05 Dec 2006 09:37:20 +0800 Subject: =?gb2312?B?VGhlIHN1cHBvcnQgb2YgbG9nIGRvdWJsZQ==?= Message-ID: Hi, I found that PETSC supports long double type float point number, which may be useful in my semiconductor simulation code. But as i know, no long double support exists in BLAS/LAPACK. So can any one tell me the truth about long double. Another problem about SNES is my code diverged with gcc, but works well with Intel icc. Does any one meet the same problem? As a result, I 'd like to try long double, which seems more accurate to double. Thanks G.D. -- USTC Alumni Email System From bsmith at mcs.anl.gov Mon Dec 4 19:51:20 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Mon, 4 Dec 2006 19:51:20 -0600 (CST) Subject: =?gb2312?B?VGhlIHN1cHBvcnQgb2YgbG9nIGRvdWJsZQ==?= In-Reply-To: References: Message-ID: G.D. You can compile PETSc to use long double with the additional configure/configure.py options --with-precision=longdouble --download-c-blas-lapack It compiles a special version of Blas/Lapack for long double. I'm not sure this is really the best way to go. I would suggest investigating further why intel compiler works but not gcc. most likely it indicates some error or memory overwrite in your code. It is also possible that gcc generates some incorrect code, does gcc not work even with the debug version of PETSc? When you run the gcc and intel versions do they start out pretty much the same and then start diverging from each other, or are they different straight from the start. Run with -snes_monitor -ksp_monitor Barry On Tue, 5 Dec 2006, Gong Ding wrote: > Hi, > I found that PETSC supports long double type > float point number, which may be useful in my > semiconductor simulation code. > But as i know, no long double support exists in > BLAS/LAPACK. So can any one tell me the truth > about long double. > Another problem about SNES is my code diverged > with gcc, but works well with Intel icc. Does any > one meet the same problem? As a result, I 'd like > to try long double, which seems more accurate to > double. > > Thanks > G.D. > -- > USTC Alumni Email System > > From knepley at gmail.com Mon Dec 4 19:56:43 2006 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 4 Dec 2006 19:56:43 -0600 Subject: The support of log double In-Reply-To: <-6603246732356479994@unknownmsgid> References: <-6603246732356479994@unknownmsgid> Message-ID: I strongly suspect that long double reals will not help you at all. It is very unlikely that your nonlinear system fails to converge due to loss of precision. If the Jacobian does become near singular near the solution, it often indicates a deficiency in the formulation. Could you indicate why you think loss of precision is responsible for non-convergence? Matt On 12/4/06, Gong Ding wrote: > Hi, > I found that PETSC supports long double type > float point number, which may be useful in my > semiconductor simulation code. > But as i know, no long double support exists in > BLAS/LAPACK. So can any one tell me the truth > about long double. > Another problem about SNES is my code diverged > with gcc, but works well with Intel icc. Does any > one meet the same problem? As a result, I 'd like > to try long double, which seems more accurate to > double. > > Thanks > G.D. > -- > USTC Alumni Email System > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From zonexo at gmail.com Mon Dec 4 23:58:24 2006 From: zonexo at gmail.com (Ben Tay) Date: Tue, 5 Dec 2006 13:58:24 +0800 Subject: Some basic questions about PETSC In-Reply-To: References: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> <804ab5d40612032300t7c2fa2ealaf4741197d7aad5d@mail.gmail.com> Message-ID: <804ab5d40612042158t5a30f7cfgbd04e77708ea1973@mail.gmail.com> "Its normally better to change the values in place" So you mean I should use VecSetValue/s instead? Thank you. Regards. On 12/4/06, Matthew Knepley wrote: > > On 12/4/06, Ben Tay wrote: > > > > Hi, > > > > regarding qn 4 ie the requirement of > > VecAssemblyBegin,VecAssemblyEnd, I used VecPlaceArray, > > VecResetArray to change the values. I did not use Assembly after the 1st > > time step and it works ok. So that is fine too, right? > > Its alright, but probably not optimal. It could result in slower code > due to all the > allocation. Its normally better to change the values in place. > > Matt > > > Thank you! > > > > On 12/4/06, Satish Balay wrote: > > > On Sun, 3 Dec 2006, Matthew Knepley wrote: > > > > > > > > 1. Are petscscaler the same as real nos.? I am writing in double > > precision > > > > > or real(8). So are these 2 interchangeable? (same as petscint and > > integer). > > > > > > > > Yes. > > > > > > You can check these defines in include/finclude/petscdef.h > > > > > > PetscInt -> integer*4 > > > PetscScalar -> real*8 > > > > > > > > > > > > 2. while linking in compaq visual fortran, I get the warning > message > > about > > > > > conflict library with LIBCMT. Is it important or can I just ignore > it? > > > > > > > > This is determined by your configure. Satish will know better how to > > control > > > > it. > > > > > > There are some warnings because of the way compqaq f90 tries to > > > workarround some bugs in Visual Studio 6 version of the libraries. It > > > will be fine as long as all code [PETSc & application] is compiled > > > with the same set of compiler options, > > > > > > > > > > > > 3. I am writing in f90 free form format. When I modify from fixed > f77 > > format > > > > > to f90, it gives me a lot of error, which seems to be the include > file > > > > > error. So, is it possible to write in f90 format? > > > > > > > > Depending on which compiler you use, you might have to give a flag. > For > > g95 > > > > it is -ffree-form. > > > > > > We'll have to see the error messgaes to determine what the problem is > > > - however - if you check the PETSc fortran examples - they comply with > > > both fixed and free from syntax. > > > > > > > > 4. I am writing a Navier stokes solver and I'm using PETSC to > solve > > the > > > > > poisson eqn. If only the RHS changes with each time step, do I > need to > > call > > > > > > > > > > VecCreateSeq > > > > > > > > > > VecAssemblyBegin > > > > > VecAssemblyEnd > > > > > VecDestroy > > > > > > > > > > at each time step? I don't think I can (or I should) change values > of > > b > > > > > after VecAssemblyBegin,VecAssemblyEnd, or can I? > > > > > > > > You can just change the values. Call AssemblyBegin/End() after each > > group > > > > of changes. > > > > > > Another note: - If you change values with VecSetValues() - you'll need > > > to call VecAssemblyBegin,VecAssemblyEnd. However if you > > do > > > VecGetArray() [or VecGetArrayF0()] - and change values - then you > > > don't need the calls to VecAssembly... > > > > > > Satish > > > > > > > > > > > > > -- > "Failure has a thousand explanations. Success doesn't need one" -- Sir > Alec Guiness > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdiso at ustc.edu Tue Dec 5 00:57:33 2006 From: gdiso at ustc.edu (Gong Ding) Date: Tue, 05 Dec 2006 14:57:33 +0800 Subject: =?gb2312?B?UmU6IFJlOiBUaGUgc3VwcG9ydCBvZiBsb2cgZG91Ymxl?= Message-ID: I'd like to thank the developers of PETSC. I had spent years to develop a semiconductor simulation code which based on PETSC. The code is carefully checked by valgrind and no memory problem should exist. In semiconductor, the magnitude of carrier density differs much. When the electron density is 10e18, the hole density is only 10e2. The sum/sub of two variables may have float precision problem and in my code, a lot of parameters must be computed with density arguments. In most of the situation, my code works fine with both gcc/icc except a heterojunction BJT example. The code generated by icc works but not work with gcc. I guess the float point precision in gcc is not enough. (I found a ?long double? description in the configure file of icc. Does icc use long double internally?) Unfortunately, icc is not free. I have to make gcc work. I?d like to try petsc with long double. Another requirement, can PETSC functions support different ?scalar type?? For example, by adding a postfix letter as BLAS? The semiconductor code needs ?real? value but I?d like to add optical modular which needs ?complex? value. At present, I can only link real lib. As a result, I have to do a lot of work on complex->real. Yous G.D. -- USTC Alumni Email System From bsmith at mcs.anl.gov Tue Dec 5 07:25:48 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 5 Dec 2006 07:25:48 -0600 (CST) Subject: =?gb2312?B?UmU6IFJlOiBUaGUgc3VwcG9ydCBvZiBsb2cgZG91Ymxl?= In-Reply-To: References: Message-ID: Please see the message I posted yesterday. Date: Mon, 4 Dec 2006 19:51:20 -0600 (CST) From: Barry Smith To: petsc-users Subject: Re: [gb2312] The support of log double G.D. You can compile PETSc to use long double with the additional configure/configure.py options --with-precision=longdouble --download-c-blas-lapack It compiles a special version of Blas/Lapack for long double. On Tue, 5 Dec 2006, Gong Ding wrote: > I'd like to thank the developers of PETSC. > > I had spent years to develop a semiconductor > simulation code which based on PETSC. The code is > carefully checked by valgrind and no memory > problem should exist. > > In semiconductor, the magnitude of carrier density > differs much. When the electron density is 10e18, > the hole density is only 10e2. The sum/sub of two > variables may have float precision problem and in > my code, a lot of parameters must be computed with > density arguments. In most of the situation, my > code works fine with both gcc/icc except a > heterojunction BJT example. The code generated by > icc works but not work with gcc. I guess the float > point precision in gcc is not enough. (I found a > ??long double?? description in the configure file of > icc. Does icc use long double internally?) > > Unfortunately, icc is not free. I have to make gcc > work. I??d like to try petsc with long double. > > Another requirement, can PETSC functions support > different ??scalar type??? For example, by adding a > postfix letter as BLAS? The semiconductor code > needs ??real?? value but I??d like to add optical > modular which needs ??complex?? value. At present, I > can only link real lib. As a result, I have to do > a lot of work on complex->real. > > Yous > G.D. > -- > USTC Alumni Email System > > From zonexo at gmail.com Tue Dec 5 08:26:07 2006 From: zonexo at gmail.com (Ben Tay) Date: Tue, 5 Dec 2006 22:26:07 +0800 Subject: Configuration crash - can't start new thread Message-ID: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> Hi, I tried to compile the library on a linux sys (xeon). It gives the error msg: ********************************************************************************* CONFIGURATION CRASH (Please send configure.log to petsc-maint at mcs.anl.gov) ********************************************************************************* can't start new thread File "./config/configure.py", line 172, in petsc_configure framework = config.framework.Framework(sys.argv[1:]+['--configModules= PETSc.Configure','--optionsModule=PETSc.compilerOptions'], loadArgDB = 0) File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/config/framework.py", line 81, in __init__ self.argDB['debugSections'] = ['screen'] File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", line 219, in __setitem__ self.save() File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", line 639, in save self.saveTimer.start() File "/usr/lib/python2.2/threading.py", line 396, in start _start_new_thread(self.__bootstrap, ()) May I know what's wrong? I also can't find any configure.log file. Thank you. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Tue Dec 5 09:44:53 2006 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 5 Dec 2006 09:44:53 -0600 Subject: Some basic questions about PETSC In-Reply-To: <804ab5d40612042158t5a30f7cfgbd04e77708ea1973@mail.gmail.com> References: <804ab5d40612031941p36cbc2bdla94931835bdb06e0@mail.gmail.com> <804ab5d40612032300t7c2fa2ealaf4741197d7aad5d@mail.gmail.com> <804ab5d40612042158t5a30f7cfgbd04e77708ea1973@mail.gmail.com> Message-ID: I would, but not knowing anything about your application, I can't tell whether it will make a difference. Matt On 12/4/06, Ben Tay wrote: > "Its normally better to change the values in place" > > So you mean I should use VecSetValue/s instead? > > Thank you. > > Regards. > > > On 12/4/06, Matthew Knepley wrote: > > On 12/4/06, Ben Tay wrote: > > > > > > Hi, > > > > > > regarding qn 4 ie the requirement of > > > VecAssemblyBegin,VecAssemblyEnd, I used VecPlaceArray, > > > VecResetArray to change the values. I did not use Assembly after the 1st > > > time step and it works ok. So that is fine too, right? > > > > Its alright, but probably not optimal. It could result in slower code > > due to all the > > allocation. Its normally better to change the values in place. > > > > Matt > > > > > Thank you! > > > > > > On 12/4/06, Satish Balay < balay at mcs.anl.gov> wrote: > > > > On Sun, 3 Dec 2006, Matthew Knepley wrote: > > > > > > > > > > 1. Are petscscaler the same as real nos.? I am writing in double > > > precision > > > > > > or real(8). So are these 2 interchangeable? (same as petscint and > > > integer). > > > > > > > > > > Yes. > > > > > > > > You can check these defines in include/finclude/petscdef.h > > > > > > > > PetscInt -> integer*4 > > > > PetscScalar -> real*8 > > > > > > > > > > > > > > > 2. while linking in compaq visual fortran, I get the warning > message > > > about > > > > > > conflict library with LIBCMT. Is it important or can I just ignore > it? > > > > > > > > > > This is determined by your configure. Satish will know better how to > > > control > > > > > it. > > > > > > > > There are some warnings because of the way compqaq f90 tries to > > > > workarround some bugs in Visual Studio 6 version of the libraries. It > > > > will be fine as long as all code [PETSc & application] is compiled > > > > with the same set of compiler options, > > > > > > > > > > > > > > > 3. I am writing in f90 free form format. When I modify from fixed > f77 > > > format > > > > > > to f90, it gives me a lot of error, which seems to be the include > file > > > > > > error. So, is it possible to write in f90 format? > > > > > > > > > > Depending on which compiler you use, you might have to give a flag. > For > > > g95 > > > > > it is -ffree-form. > > > > > > > > We'll have to see the error messgaes to determine what the problem is > > > > - however - if you check the PETSc fortran examples - they comply with > > > > both fixed and free from syntax. > > > > > > > > > > 4. I am writing a Navier stokes solver and I'm using PETSC to > solve > > > the > > > > > > poisson eqn. If only the RHS changes with each time step, do I > need to > > > call > > > > > > > > > > > > VecCreateSeq > > > > > > > > > > > > VecAssemblyBegin > > > > > > VecAssemblyEnd > > > > > > VecDestroy > > > > > > > > > > > > at each time step? I don't think I can (or I should) change values > of > > > b > > > > > > after VecAssemblyBegin,VecAssemblyEnd, or can I? > > > > > > > > > > You can just change the values. Call AssemblyBegin/End() after each > > > group > > > > > of changes. > > > > > > > > Another note: - If you change values with VecSetValues() - you'll need > > > > to call VecAssemblyBegin,VecAssemblyEnd. However if > you > > > do > > > > VecGetArray() [or VecGetArrayF0()] - and change values - then you > > > > don't need the calls to VecAssembly... > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > -- > > "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 Tue Dec 5 09:50:28 2006 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 5 Dec 2006 09:50:28 -0600 Subject: Configuration crash - can't start new thread In-Reply-To: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> Message-ID: You have a broken Python installation. You can work around this using the options --useThreads=0. Thanks, Matt On 12/5/06, Ben Tay wrote: > Hi, > > I tried to compile the library on a linux sys (xeon). It gives the error > msg: > > > > ********************************************************************************* > CONFIGURATION CRASH (Please send configure.log to > petsc-maint at mcs.anl.gov) > ********************************************************************************* > > can't start new thread > > File "./config/configure.py", line 172, in petsc_configure > framework = > config.framework.Framework(sys.argv[1:]+['--configModules=PETSc.Configure','--optionsModule=PETSc.compilerOptions'], > loadArgDB = 0) > File > "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/config/framework.py", > line 81, in __init__ > self.argDB['debugSections'] = ['screen'] > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > line 219, in __setitem__ > self.save() > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > line 639, in save > self.saveTimer.start() > File "/usr/lib/python2.2/threading.py", line 396, in > start > _start_new_thread(self.__bootstrap, ()) > > > May I know what's wrong? I also can't find any configure.log file. > > Thank you. > > Regards -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From zonexo at gmail.com Tue Dec 5 10:05:52 2006 From: zonexo at gmail.com (Ben Tay) Date: Wed, 6 Dec 2006 00:05:52 +0800 Subject: Configuration crash - can't start new thread In-Reply-To: References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> Message-ID: <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> Hi, I just tried but it's the same error. Any other suggestion? thanks! On 12/5/06, Matthew Knepley wrote: > > You have a broken Python installation. You can work around this using > the options --useThreads=0. > > Thanks, > > Matt > > On 12/5/06, Ben Tay wrote: > > Hi, > > > > I tried to compile the library on a linux sys (xeon). It gives the error > > msg: > > > > > > > > > ********************************************************************************* > > CONFIGURATION CRASH (Please send configure.log to > > petsc-maint at mcs.anl.gov) > > > ********************************************************************************* > > > > can't start new thread > > > > File "./config/configure.py", line 172, in petsc_configure > > framework = > > config.framework.Framework(sys.argv[1:]+['--configModules= > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], > > loadArgDB = 0) > > File > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > /python/BuildSystem/config/framework.py", > > line 81, in __init__ > > self.argDB['debugSections'] = ['screen'] > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > /python/BuildSystem/RDict.py", > > line 219, in __setitem__ > > self.save() > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > /python/BuildSystem/RDict.py", > > line 639, in save > > self.saveTimer.start() > > File "/usr/lib/python2.2/threading.py", line 396, in > > start > > _start_new_thread(self.__bootstrap, ()) > > > > > > May I know what's wrong? I also can't find any configure.log file. > > > > Thank you. > > > > Regards > > > -- > "Failure has a thousand explanations. Success doesn't need one" -- Sir > Alec Guiness > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Tue Dec 5 10:09:22 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Tue, 5 Dec 2006 10:09:22 -0600 (CST) Subject: Configuration crash - can't start new thread In-Reply-To: <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> Message-ID: What linux is this? Just get python sources from http://python.org/ [sugest python-2.4] - and install your own copy - and try with it. configure python with: ./configure --prefix=${HOME}/python-2.4 make make install And configure PETSc with: ${HOME}/python-2.4/bin/python config/configure.py Satish On Wed, 6 Dec 2006, Ben Tay wrote: > Hi, > > I just tried but it's the same error. Any other suggestion? > > thanks! > > > > > On 12/5/06, Matthew Knepley wrote: > > > > You have a broken Python installation. You can work around this using > > the options --useThreads=0. > > > > Thanks, > > > > Matt > > > > On 12/5/06, Ben Tay wrote: > > > Hi, > > > > > > I tried to compile the library on a linux sys (xeon). It gives the error > > > msg: > > > > > > > > > > > > > > ********************************************************************************* > > > CONFIGURATION CRASH (Please send configure.log to > > > petsc-maint at mcs.anl.gov) > > > > > ********************************************************************************* > > > > > > can't start new thread > > > > > > File "./config/configure.py", line 172, in petsc_configure > > > framework = > > > config.framework.Framework(sys.argv[1:]+['--configModules= > > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], > > > loadArgDB = 0) > > > File > > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > /python/BuildSystem/config/framework.py", > > > line 81, in __init__ > > > self.argDB['debugSections'] = ['screen'] > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > /python/BuildSystem/RDict.py", > > > line 219, in __setitem__ > > > self.save() > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > /python/BuildSystem/RDict.py", > > > line 639, in save > > > self.saveTimer.start() > > > File "/usr/lib/python2.2/threading.py", line 396, in > > > start > > > _start_new_thread(self.__bootstrap, ()) > > > > > > > > > May I know what's wrong? I also can't find any configure.log file. > > > > > > Thank you. > > > > > > Regards > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > Alec Guiness > > > > > From zonexo at gmail.com Tue Dec 5 19:36:27 2006 From: zonexo at gmail.com (Ben Tay) Date: Wed, 6 Dec 2006 09:36:27 +0800 Subject: Configuration crash - can't start new thread In-Reply-To: References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> Message-ID: <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> Hi, sorry, it still can't work. Installation of Python is ok though. the error msg is the same though: ================================================================================= Configuring PETSc to compile on your system ================================================================================= ********************************************************************************* CONFIGURATION CRASH (Please send configure.log to petsc-maint at mcs.anl.gov) ********************************************************************************* can't start new thread File "config/configure.py", line 172, in petsc_configure framework = config.framework.Framework(sys.argv[1:]+['--configModules= PETSc.Configure','--optionsModule=PETSc.compilerOptions'], loadArgDB = 0) File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/config/framework.py", line 81, in __init__ self.argDB['debugSections'] = ['screen'] File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", line 219, in __setitem__ self.save() File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", line 639, in save self.saveTimer.start() File "/nas/home/enduser/g0306332/python-2.4/lib/python2.5/threading.py", line 434, in start _start_new_thread(self.__bootstrap, ()) On 12/6/06, Satish Balay wrote: > > What linux is this? Just get python sources from http://python.org/ > [sugest python-2.4] - and install your own copy - and try with it. > > configure python with: > ./configure --prefix=${HOME}/python-2.4 > make > make install > > And configure PETSc with: > ${HOME}/python-2.4/bin/python config/configure.py > > Satish > > > On Wed, 6 Dec 2006, Ben Tay wrote: > > > Hi, > > > > I just tried but it's the same error. Any other suggestion? > > > > thanks! > > > > > > > > > > On 12/5/06, Matthew Knepley wrote: > > > > > > You have a broken Python installation. You can work around this using > > > the options --useThreads=0. > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/5/06, Ben Tay wrote: > > > > Hi, > > > > > > > > I tried to compile the library on a linux sys (xeon). It gives the > error > > > > msg: > > > > > > > > > > > > > > > > > > > > ********************************************************************************* > > > > CONFIGURATION CRASH (Please send configure.log to > > > > petsc-maint at mcs.anl.gov) > > > > > > > > ********************************************************************************* > > > > > > > > can't start new thread > > > > > > > > File "./config/configure.py", line 172, in petsc_configure > > > > framework = > > > > config.framework.Framework(sys.argv[1:]+['--configModules= > > > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], > > > > loadArgDB = 0) > > > > File > > > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > /python/BuildSystem/config/framework.py", > > > > line 81, in __init__ > > > > self.argDB['debugSections'] = ['screen'] > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > /python/BuildSystem/RDict.py", > > > > line 219, in __setitem__ > > > > self.save() > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > /python/BuildSystem/RDict.py", > > > > line 639, in save > > > > self.saveTimer.start() > > > > File "/usr/lib/python2.2/threading.py", line 396, in > > > > start > > > > _start_new_thread(self.__bootstrap, ()) > > > > > > > > > > > > May I know what's wrong? I also can't find any configure.log file. > > > > > > > > Thank you. > > > > > > > > Regards > > > > > > > > > -- > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > Alec Guiness > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Tue Dec 5 22:49:25 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Tue, 5 Dec 2006 22:49:25 -0600 (CST) Subject: Configuration crash - can't start new thread In-Reply-To: <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> Message-ID: This is wierd. I don't think we've seen this error before. What kind of linux is this running? I'm guessing there is a problem on the system-software side.. [with threads] Satish On Wed, 6 Dec 2006, Ben Tay wrote: > Hi, > > sorry, it still can't work. Installation of Python is ok though. > > the error msg is the same though: > > > ================================================================================= > Configuring PETSc to compile on your > system > ================================================================================= > ********************************************************************************* > CONFIGURATION CRASH (Please send configure.log to > petsc-maint at mcs.anl.gov) > ********************************************************************************* > > can't start new thread > File "config/configure.py", line 172, in petsc_configure > framework = config.framework.Framework(sys.argv[1:]+['--configModules= > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], loadArgDB = 0) > File > "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/config/framework.py", > line 81, in __init__ > self.argDB['debugSections'] = ['screen'] > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > line 219, in __setitem__ > self.save() > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > line 639, in save > self.saveTimer.start() > File "/nas/home/enduser/g0306332/python-2.4/lib/python2.5/threading.py", > line 434, in start > _start_new_thread(self.__bootstrap, ()) > > > > > > > > On 12/6/06, Satish Balay wrote: > > > > What linux is this? Just get python sources from http://python.org/ > > [sugest python-2.4] - and install your own copy - and try with it. > > > > configure python with: > > ./configure --prefix=${HOME}/python-2.4 > > make > > make install > > > > And configure PETSc with: > > ${HOME}/python-2.4/bin/python config/configure.py > > > > Satish > > > > > > On Wed, 6 Dec 2006, Ben Tay wrote: > > > > > Hi, > > > > > > I just tried but it's the same error. Any other suggestion? > > > > > > thanks! > > > > > > > > > > > > > > > On 12/5/06, Matthew Knepley wrote: > > > > > > > > You have a broken Python installation. You can work around this using > > > > the options --useThreads=0. > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/5/06, Ben Tay wrote: > > > > > Hi, > > > > > > > > > > I tried to compile the library on a linux sys (xeon). It gives the > > error > > > > > msg: > > > > > > > > > > > > > > > > > > > > > > > > > > ********************************************************************************* > > > > > CONFIGURATION CRASH (Please send configure.log to > > > > > petsc-maint at mcs.anl.gov) > > > > > > > > > > > ********************************************************************************* > > > > > > > > > > can't start new thread > > > > > > > > > > File "./config/configure.py", line 172, in petsc_configure > > > > > framework = > > > > > config.framework.Framework(sys.argv[1:]+['--configModules= > > > > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], > > > > > loadArgDB = 0) > > > > > File > > > > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > /python/BuildSystem/config/framework.py", > > > > > line 81, in __init__ > > > > > self.argDB['debugSections'] = ['screen'] > > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > /python/BuildSystem/RDict.py", > > > > > line 219, in __setitem__ > > > > > self.save() > > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > /python/BuildSystem/RDict.py", > > > > > line 639, in save > > > > > self.saveTimer.start() > > > > > File "/usr/lib/python2.2/threading.py", line 396, in > > > > > start > > > > > _start_new_thread(self.__bootstrap, ()) > > > > > > > > > > > > > > > May I know what's wrong? I also can't find any configure.log file. > > > > > > > > > > Thank you. > > > > > > > > > > Regards > > > > > > > > > > > > -- > > > > "Failure has a thousand explanations. Success doesn't need one" -- Sir > > > > Alec Guiness > > > > > > > > > > > > > > > > From liuchangjohn at gmail.com Wed Dec 6 00:56:06 2006 From: liuchangjohn at gmail.com (liu chang) Date: Wed, 6 Dec 2006 14:56:06 +0800 Subject: Copying a MPI vector into a small MPI vector Message-ID: <94e43e390612052256q2edf17ffq4af7b94c03325aca@mail.gmail.com> Hi, I'm fairly new to PETSc so excuse me if the problem seems obvious. I'm trying to copy the first m entries of a MPI vector of size n (m < n) into another MPI vector of size m. From the Petsc documentation I think I need to use VecScatter, so I wrote the following code test.cpp: int main(int argc, char *argv[]) { int info; PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL); Vec w, wv; info = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, 100, &w); CHKERRQ(info); info = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, 110, &wv); CHKERRQ(info); IS wv2w; VecScatter s_wv2w; info = ISCreateStride(PETSC_COMM_WORLD, 100, 0, 1, &wv2w); CHKERRQ(info); info = VecScatterCreate(wv, wv2w, w, PETSC_NULL, &s_wv2w); CHKERRQ(info); // actual copying skipped PetscFinalize(); return 0; } The code runs fine on a single process, but when I run it over 2 processes: mpirun -np 2 -machinefile ~/machines.LINUX test The program crashes on the VecScatterCreate() statement: ------------------------------------------------------------------------ Petsc Release Version 2.3.1, Patch 15, Thu Jul 6 21:32:01 CDT 2006 HG revision: dc39078b37aa6becf2c4f8b06facf07566bf5454 See docs/changes/index.html for recent updates. See docs/faq.html for hints about trouble shooting. See docs/index.html for manual pages. ------------------------------------------------------------------------ ... Wed Dec 6 14:52:09 2006 Libraries linked from ... Configure run at Sat Jul 8 15:09:13 2006 Configure options --download-f-blas-lapack=1 --with-mpi-dir=/opt/mpich -with-clanguage=C++ --with-shared ------------------------------------------------------------------------ [0]PETSC ERROR: VecScatterCreate() line 1350 in src/vec/vec/utils/vscat.c [0]PETSC ERROR: Nonconforming object sizes! [0]PETSC ERROR: Local scatter sizes don't match! [0]PETSC ERROR: User provided function() line 20 in test.cpp ------------------------------------------------------------------------ Petsc Release Version 2.3.1, Patch 15, Thu Jul 6 21:32:01 CDT 2006 HG revision: dc39078b37aa6becf2c4f8b06facf07566bf5454 See docs/changes/index.html for recent updates. See docs/faq.html for hints about trouble shooting. See docs/index.html for manual pages. ------------------------------------------------------------------------ ... Wed Dec 6 14:52:39 2006 Libraries linked from ... Configure run at Sat Jul 8 15:09:13 2006 Configure options --download-f-blas-lapack=1 --with-mpi-dir=/opt/mpich -with-clanguage=C++ --with-shared ------------------------------------------------------------------------ [1]PETSC ERROR: VecScatterCreate() line 1350 in src/vec/vec/utils/vscat.c [1]PETSC ERROR: Nonconforming object sizes! [1]PETSC ERROR: Local scatter sizes don't match! [1]PETSC ERROR: User provided function() line 20 in test.cpp So the problem is `local scatter sizes don't match'. I guess it's because some entries need to be passed from one process to the other due to the different layouts of the two vectors. So if VecScatter refuses to do it for me, how can it be done? Any help is greatly appreciated. Liu Chang From bsmith at mcs.anl.gov Wed Dec 6 09:03:23 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 6 Dec 2006 09:03:23 -0600 (CST) Subject: Copying a MPI vector into a small MPI vector In-Reply-To: <94e43e390612052256q2edf17ffq4af7b94c03325aca@mail.gmail.com> References: <94e43e390612052256q2edf17ffq4af7b94c03325aca@mail.gmail.com> Message-ID: This is because the default when you do NOT provide iy (you have PETSC_NULL) is not what you expect. You need instead to explicitly provide the iy, in this case since you want to put them in the first slots of w, just pass the wv2w again as the iy. Barry On Wed, 6 Dec 2006, liu chang wrote: > Hi, I'm fairly new to PETSc so excuse me if the problem seems obvious. > > I'm trying to copy the first m entries of a MPI vector of size n (m < > n) into another MPI vector of size m. From the Petsc documentation I > think I need to use VecScatter, so I wrote the following code > test.cpp: > > int main(int argc, char *argv[]) > { > int info; > PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL); > > Vec w, wv; > info = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, 100, &w); > CHKERRQ(info); > info = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, 110, &wv); > CHKERRQ(info); > > IS wv2w; > VecScatter s_wv2w; > info = ISCreateStride(PETSC_COMM_WORLD, 100, 0, 1, &wv2w); CHKERRQ(info); > info = VecScatterCreate(wv, wv2w, w, PETSC_NULL, &s_wv2w); CHKERRQ(info); > > // actual copying skipped > > PetscFinalize(); > return 0; > } > > The code runs fine on a single process, but when I run it over 2 processes: > > mpirun -np 2 -machinefile ~/machines.LINUX test > > The program crashes on the VecScatterCreate() statement: > > ------------------------------------------------------------------------ > Petsc Release Version 2.3.1, Patch 15, Thu Jul 6 21:32:01 CDT 2006 HG > revision: dc39078b37aa6becf2c4f8b06facf07566bf5454 > See docs/changes/index.html for recent updates. > See docs/faq.html for hints about trouble shooting. > See docs/index.html for manual pages. > ------------------------------------------------------------------------ > ... Wed Dec 6 14:52:09 2006 > Libraries linked from ... > Configure run at Sat Jul 8 15:09:13 2006 > Configure options --download-f-blas-lapack=1 --with-mpi-dir=/opt/mpich > -with-clanguage=C++ --with-shared > ------------------------------------------------------------------------ > [0]PETSC ERROR: VecScatterCreate() line 1350 in src/vec/vec/utils/vscat.c > [0]PETSC ERROR: Nonconforming object sizes! > [0]PETSC ERROR: Local scatter sizes don't match! > [0]PETSC ERROR: User provided function() line 20 in test.cpp > ------------------------------------------------------------------------ > Petsc Release Version 2.3.1, Patch 15, Thu Jul 6 21:32:01 CDT 2006 HG > revision: dc39078b37aa6becf2c4f8b06facf07566bf5454 > See docs/changes/index.html for recent updates. > See docs/faq.html for hints about trouble shooting. > See docs/index.html for manual pages. > ------------------------------------------------------------------------ > ... Wed Dec 6 14:52:39 2006 > Libraries linked from ... > Configure run at Sat Jul 8 15:09:13 2006 > Configure options --download-f-blas-lapack=1 --with-mpi-dir=/opt/mpich > -with-clanguage=C++ --with-shared > ------------------------------------------------------------------------ > [1]PETSC ERROR: VecScatterCreate() line 1350 in src/vec/vec/utils/vscat.c > [1]PETSC ERROR: Nonconforming object sizes! > [1]PETSC ERROR: Local scatter sizes don't match! > [1]PETSC ERROR: User provided function() line 20 in test.cpp > > > So the problem is `local scatter sizes don't match'. I guess it's > because some entries need to be passed from one process to the other > due to the different layouts of the two vectors. So if VecScatter > refuses to do it for me, how can it be done? Any help is greatly > appreciated. > > Liu Chang > > From js2615 at columbia.edu Wed Dec 6 21:24:25 2006 From: js2615 at columbia.edu (Jianing Shi) Date: Wed, 06 Dec 2006 22:24:25 -0500 Subject: DA periodic Message-ID: <1165461865.45778969901a1@cubmail.cc.columbia.edu> I have a question about the usage of periodic DA. 1) In function DACreate2d( ), there is an argument about DAPeriodicType. I assume the mentioned periodicity is for the global array, not for local grid? 2) If I use the periodic type for DA, together with SNES to solve a system, when I implement the FormFunctionLocal, I need to explicitly implement the boundary conditions? Or does DA periodic type has some built-in functionality? Thanks, Jianing From knepley at gmail.com Wed Dec 6 22:29:49 2006 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 6 Dec 2006 22:29:49 -0600 Subject: DA periodic In-Reply-To: <1165461865.45778969901a1@cubmail.cc.columbia.edu> References: <1165461865.45778969901a1@cubmail.cc.columbia.edu> Message-ID: On 12/6/06, Jianing Shi wrote: > I have a question about the usage of periodic DA. > > 1) In function DACreate2d( ), there is an argument about > DAPeriodicType. I assume the mentioned periodicity is for the > global array, not for local grid? Yes. > 2) If I use the periodic type for DA, together with SNES to solve a > system, when I implement the FormFunctionLocal, I need to > explicitly implement the boundary conditions? Or does DA periodic > type has some built-in functionality? I am not sure what boundary conditions you mean. If it is periodic, there should be no conditions on that boundary. Matt > Thanks, > > Jianing -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From liuchangjohn at gmail.com Wed Dec 6 23:27:46 2006 From: liuchangjohn at gmail.com (liu chang) Date: Thu, 7 Dec 2006 13:27:46 +0800 Subject: Copying a MPI vector into a small MPI vector In-Reply-To: References: <94e43e390612052256q2edf17ffq4af7b94c03325aca@mail.gmail.com> Message-ID: <94e43e390612062127v4d8b755dubcb1805ac1246892@mail.gmail.com> On 12/6/06, Barry Smith wrote: > > This is because the default when you do NOT provide iy (you have PETSC_NULL) > is not what you expect. You need instead to explicitly provide the iy, in this case > since you want to put them in the first slots of w, just pass the wv2w again > as the iy. > > Barry > > > On Wed, 6 Dec 2006, liu chang wrote: > > > Hi, I'm fairly new to PETSc so excuse me if the problem seems obvious. > > > > I'm trying to copy the first m entries of a MPI vector of size n (m < > > n) into another MPI vector of size m. From the Petsc documentation I > > think I need to use VecScatter, so I wrote the following code > > test.cpp: > > > > int main(int argc, char *argv[]) > > { > > int info; > > PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL); > > > > Vec w, wv; > > info = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, 100, &w); > > CHKERRQ(info); > > info = VecCreateMPI(PETSC_COMM_WORLD, PETSC_DECIDE, 110, &wv); > > CHKERRQ(info); > > > > IS wv2w; > > VecScatter s_wv2w; > > info = ISCreateStride(PETSC_COMM_WORLD, 100, 0, 1, &wv2w); CHKERRQ(info); > > info = VecScatterCreate(wv, wv2w, w, PETSC_NULL, &s_wv2w); CHKERRQ(info); > > > > // actual copying skipped > > > > PetscFinalize(); > > return 0; > > } > > > > The code runs fine on a single process, but when I run it over 2 processes: > > > > mpirun -np 2 -machinefile ~/machines.LINUX test > > > > The program crashes on the VecScatterCreate() statement: > > > > ------------------------------------------------------------------------ > > Petsc Release Version 2.3.1, Patch 15, Thu Jul 6 21:32:01 CDT 2006 HG > > revision: dc39078b37aa6becf2c4f8b06facf07566bf5454 > > See docs/changes/index.html for recent updates. > > See docs/faq.html for hints about trouble shooting. > > See docs/index.html for manual pages. > > ------------------------------------------------------------------------ > > ... Wed Dec 6 14:52:09 2006 > > Libraries linked from ... > > Configure run at Sat Jul 8 15:09:13 2006 > > Configure options --download-f-blas-lapack=1 --with-mpi-dir=/opt/mpich > > -with-clanguage=C++ --with-shared > > ------------------------------------------------------------------------ > > [0]PETSC ERROR: VecScatterCreate() line 1350 in src/vec/vec/utils/vscat.c > > [0]PETSC ERROR: Nonconforming object sizes! > > [0]PETSC ERROR: Local scatter sizes don't match! > > [0]PETSC ERROR: User provided function() line 20 in test.cpp > > ------------------------------------------------------------------------ > > Petsc Release Version 2.3.1, Patch 15, Thu Jul 6 21:32:01 CDT 2006 HG > > revision: dc39078b37aa6becf2c4f8b06facf07566bf5454 > > See docs/changes/index.html for recent updates. > > See docs/faq.html for hints about trouble shooting. > > See docs/index.html for manual pages. > > ------------------------------------------------------------------------ > > ... Wed Dec 6 14:52:39 2006 > > Libraries linked from ... > > Configure run at Sat Jul 8 15:09:13 2006 > > Configure options --download-f-blas-lapack=1 --with-mpi-dir=/opt/mpich > > -with-clanguage=C++ --with-shared > > ------------------------------------------------------------------------ > > [1]PETSC ERROR: VecScatterCreate() line 1350 in src/vec/vec/utils/vscat.c > > [1]PETSC ERROR: Nonconforming object sizes! > > [1]PETSC ERROR: Local scatter sizes don't match! > > [1]PETSC ERROR: User provided function() line 20 in test.cpp > > > > > > So the problem is `local scatter sizes don't match'. I guess it's > > because some entries need to be passed from one process to the other > > due to the different layouts of the two vectors. So if VecScatter > > refuses to do it for me, how can it be done? Any help is greatly > > appreciated. > > > > Liu Chang > > That works great! Thank you. Liu Chang From js2615 at columbia.edu Wed Dec 6 23:56:54 2006 From: js2615 at columbia.edu (Jianing Shi) Date: Thu, 07 Dec 2006 00:56:54 -0500 Subject: DA periodic In-Reply-To: References: <1165461865.45778969901a1@cubmail.cc.columbia.edu> Message-ID: <1165471014.4577ad2679d95@cubmail.cc.columbia.edu> Thanks for your reply. > > 2) If I use the periodic type for DA, together with SNES to > solve a > > system, when I implement the FormFunctionLocal, I need to > > explicitly implement the boundary conditions? Or does DA > periodic > > type has some built-in functionality? > > I am not sure what boundary conditions you mean. If it is > periodic, > there should be no conditions on that boundary. Well, you are right, not "boundary condition". I was thinking about some short-range interactions between grid points. What I really meant is actually handling the iteractions on the boundary, which should be wrapped around periodically. I can implement that by hand, though just checking if there was something built-in already. Jianing From zonexo at gmail.com Thu Dec 7 04:42:56 2006 From: zonexo at gmail.com (Ben Tay) Date: Thu, 7 Dec 2006 18:42:56 +0800 Subject: Configuration crash - can't start new thread In-Reply-To: References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> Message-ID: <804ab5d40612070242o6cacbd95m629fdc8dfc2f87ec@mail.gmail.com> Hi, It's Redhat. The administrator told me their python ver is 2.2.3. Is that the reason? However, I've already downloaded and installed the new version. but the same problem exist. I wonder if it is because petsc is still using the old version.... On 12/6/06, Satish Balay wrote: > > This is wierd. I don't think we've seen this error before. What kind > of linux is this running? I'm guessing there is a problem on the > system-software side.. [with threads] > > Satish > > On Wed, 6 Dec 2006, Ben Tay wrote: > > > Hi, > > > > sorry, it still can't work. Installation of Python is ok though. > > > > the error msg is the same though: > > > > > > > ================================================================================= > > Configuring PETSc to compile on your > > system > > > ================================================================================= > > > ********************************************************************************* > > CONFIGURATION CRASH (Please send configure.log to > > petsc-maint at mcs.anl.gov) > > > ********************************************************************************* > > > > can't start new thread > > File "config/configure.py", line 172, in petsc_configure > > framework = config.framework.Framework(sys.argv > [1:]+['--configModules= > > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], loadArgDB = > 0) > > File > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > /python/BuildSystem/config/framework.py", > > line 81, in __init__ > > self.argDB['debugSections'] = ['screen'] > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > > line 219, in __setitem__ > > self.save() > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > > line 639, in save > > self.saveTimer.start() > > File "/nas/home/enduser/g0306332/python-2.4 > /lib/python2.5/threading.py", > > line 434, in start > > _start_new_thread(self.__bootstrap, ()) > > > > > > > > > > > > > > > > On 12/6/06, Satish Balay wrote: > > > > > > What linux is this? Just get python sources from http://python.org/ > > > [sugest python-2.4] - and install your own copy - and try with it. > > > > > > configure python with: > > > ./configure --prefix=${HOME}/python-2.4 > > > make > > > make install > > > > > > And configure PETSc with: > > > ${HOME}/python-2.4/bin/python config/configure.py > > > > > > Satish > > > > > > > > > On Wed, 6 Dec 2006, Ben Tay wrote: > > > > > > > Hi, > > > > > > > > I just tried but it's the same error. Any other suggestion? > > > > > > > > thanks! > > > > > > > > > > > > > > > > > > > > On 12/5/06, Matthew Knepley wrote: > > > > > > > > > > You have a broken Python installation. You can work around this > using > > > > > the options --useThreads=0. > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/5/06, Ben Tay wrote: > > > > > > Hi, > > > > > > > > > > > > I tried to compile the library on a linux sys (xeon). It gives > the > > > error > > > > > > msg: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ********************************************************************************* > > > > > > CONFIGURATION CRASH (Please send configure.log to > > > > > > petsc-maint at mcs.anl.gov) > > > > > > > > > > > > > > > ********************************************************************************* > > > > > > > > > > > > can't start new thread > > > > > > > > > > > > File "./config/configure.py", line 172, in petsc_configure > > > > > > framework = > > > > > > config.framework.Framework(sys.argv[1:]+['--configModules= > > > > > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], > > > > > > loadArgDB = 0) > > > > > > File > > > > > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > > /python/BuildSystem/config/framework.py", > > > > > > line 81, in __init__ > > > > > > self.argDB['debugSections'] = ['screen'] > > > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > > /python/BuildSystem/RDict.py", > > > > > > line 219, in __setitem__ > > > > > > self.save() > > > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > > /python/BuildSystem/RDict.py", > > > > > > line 639, in save > > > > > > self.saveTimer.start() > > > > > > File "/usr/lib/python2.2/threading.py", line 396, in > > > > > > start > > > > > > _start_new_thread(self.__bootstrap, ()) > > > > > > > > > > > > > > > > > > May I know what's wrong? I also can't find any configure.logfile. > > > > > > > > > > > > Thank you. > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > -- > > > > > "Failure has a thousand explanations. Success doesn't need one" -- > Sir > > > > > Alec Guiness > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Dec 7 07:33:36 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 7 Dec 2006 07:33:36 -0600 (CST) Subject: DA periodic In-Reply-To: <1165471014.4577ad2679d95@cubmail.cc.columbia.edu> References: <1165461865.45778969901a1@cubmail.cc.columbia.edu> <1165471014.4577ad2679d95@cubmail.cc.columbia.edu> Message-ID: Jianing, There is no "by hand" in PETSc! All you do is acess the next set of grid points to via the indices in the usual way. So in two dimensions to access the values to the "left of x[j][0] use x[j][-1] to the right of x[j][nx-1] use x[j][nx]. (Recall the i,j indices are reversed in the C array syntax, nx is the total number of grid points in the x direction). Here, as an example, I am talking about periodic in X, same thing is true for y and z. (If you have a stencil width of 2 you can acess via x[j][-2]. In other words, don't think at all about the periodicity, just write local loops over the processes domain and everything will work! Barry There is something seriously wrong with PETSc's documentation on periodic DA's. For some reason everyone seems to think it has to be hard. On Thu, 7 Dec 2006, Jianing Shi wrote: > Thanks for your reply. > > > > 2) If I use the periodic type for DA, together with SNES to > > solve a > > > system, when I implement the FormFunctionLocal, I need to > > > explicitly implement the boundary conditions? Or does DA > > periodic > > > type has some built-in functionality? > > > > I am not sure what boundary conditions you mean. If it is > > periodic, > > there should be no conditions on that boundary. > > Well, you are right, not "boundary condition". I was thinking about > some short-range interactions between grid points. What I really > meant is actually handling the iteractions on the boundary, which > should be wrapped around periodically. I can implement that by > hand, though just checking if there was something built-in already. > > Jianing > > From zonexo at gmail.com Thu Dec 7 07:42:35 2006 From: zonexo at gmail.com (Ben Tay) Date: Thu, 7 Dec 2006 21:42:35 +0800 Subject: Sudden random deviation of results Message-ID: <804ab5d40612070542u57cac6cdudc1fb7272c4f9e59@mail.gmail.com> Hi, I have been using a few different Krylov linear solver package such as nspcg,sparsekit and now petsc to solve the linear eqns for my NS solver momentum and poisson eqn. For moving bodies simulation, while solving the poisson eqn, sometimes the result suddenly changes drastically, although the iterations seems to have converged e.g. at the previous time step, everything is fine, but at the next time step, the velocity suddenly explodes from 2-3 to 20-30+. The strange thing is that this deviation happens at different time step for different linear solver package ie for nspcg, it happens at time=20 but for petsc, it happens at time=40. It seems "random" in this sense. Changing the type of solver such as gmres or bcgs does not change the time of deviation. Does anyone know why this is happening? Is it a characteristic of krylov solver to happen once in a while? It does not happen in the stationary body simulation though. -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Dec 7 08:04:25 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 7 Dec 2006 08:04:25 -0600 Subject: Sudden random deviation of results In-Reply-To: <804ab5d40612070542u57cac6cdudc1fb7272c4f9e59@mail.gmail.com> References: <804ab5d40612070542u57cac6cdudc1fb7272c4f9e59@mail.gmail.com> Message-ID: No, this sounds like a bug in the code. You probably are overwriting memory somewhere. Matt On 12/7/06, Ben Tay wrote: > Hi, > > I have been using a few different Krylov linear solver package such as > nspcg,sparsekit and now petsc to solve the linear eqns for my NS solver > momentum and poisson eqn. For moving bodies simulation, while solving the > poisson eqn, sometimes the result suddenly changes drastically, although the > iterations seems to have converged e.g. at the previous time step, > everything is fine, but at the next time step, the velocity suddenly > explodes from 2-3 to 20-30+. > > The strange thing is that this deviation happens at different time step for > different linear solver package ie for nspcg, it happens at time=20 but for > petsc, it happens at time=40. It seems "random" in this sense. Changing the > type of solver such as gmres or bcgs does not change the time of deviation. > > Does anyone know why this is happening? Is it a characteristic of krylov > solver to happen once in a while? It does not happen in the stationary body > simulation though. -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From bsmith at mcs.anl.gov Thu Dec 7 08:36:40 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 7 Dec 2006 08:36:40 -0600 (CST) Subject: Sudden random deviation of results In-Reply-To: <804ab5d40612070542u57cac6cdudc1fb7272c4f9e59@mail.gmail.com> References: <804ab5d40612070542u57cac6cdudc1fb7272c4f9e59@mail.gmail.com> Message-ID: Ben, First make sure that the residual has actually gotten to the tolerance you want. PETSc KSP does NOT stop if the linear system has not converged; you should call KSPGetConvergedReason() after each solve to make sure it has converged (as a quick check you can run with -ksp_converged_reason.) Next try decreasing the KSP tolerance factor a great deal. Does 1) the solution you get for your physics problem look the same for small time (after a few time-steps they will start to drift). 2) the residual blow up at the same time, or later? Barry On Thu, 7 Dec 2006, Ben Tay wrote: > Hi, > > I have been using a few different Krylov linear solver package such as > nspcg,sparsekit and now petsc to solve the linear eqns for my NS solver > momentum and poisson eqn. For moving bodies simulation, while solving the > poisson eqn, sometimes the result suddenly changes drastically, although the > iterations seems to have converged e.g. at the previous time step, > everything is fine, but at the next time step, the velocity suddenly > explodes from 2-3 to 20-30+. > > The strange thing is that this deviation happens at different time step for > different linear solver package ie for nspcg, it happens at time=20 but for > petsc, it happens at time=40. It seems "random" in this sense. Changing the > type of solver such as gmres or bcgs does not change the time of deviation. > > Does anyone know why this is happening? Is it a characteristic of krylov > solver to happen once in a while? It does not happen in the stationary body > simulation though. > From balay at mcs.anl.gov Thu Dec 7 08:53:58 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 7 Dec 2006 08:53:58 -0600 (CST) Subject: Configuration crash - can't start new thread In-Reply-To: <804ab5d40612070242o6cacbd95m629fdc8dfc2f87ec@mail.gmail.com> References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> <804ab5d40612070242o6cacbd95m629fdc8dfc2f87ec@mail.gmail.com> Message-ID: > > File "/nas/home/enduser/g0306332/python-2.4/lib/python2.5/threading.py", > > line 434, in start > > _start_new_thread(self.__bootstrap, ()) No - its using the python - installed at /nas/home/enduser/g0306332/python-2.4 What version of redhat? What do you have for: cat /etc/redhat-release The fact that you get the 'same thread' error with both python-2.5 and python-2.2 - sugests that it could be glibc problem - not python. [perhaps the OS is in a bad state] I'll sugest using a different machine for install. Matt, Looks like this piece if code is ignoring the option '--useThreads=0' - and attempting to use threads. Perhas this should be fixed? Satish On Thu, 7 Dec 2006, Ben Tay wrote: > Hi, > > It's Redhat. The administrator told me their python ver is 2.2.3. Is that > the reason? However, I've already downloaded and installed the new version. > but the same problem exist. I wonder if it is because petsc is still using > the old version.... > > > On 12/6/06, Satish Balay wrote: > > > > This is wierd. I don't think we've seen this error before. What kind > > of linux is this running? I'm guessing there is a problem on the > > system-software side.. [with threads] > > > > Satish > > > > On Wed, 6 Dec 2006, Ben Tay wrote: > > > > > Hi, > > > > > > sorry, it still can't work. Installation of Python is ok though. > > > > > > the error msg is the same though: > > > > > > > > > > > ================================================================================= > > > Configuring PETSc to compile on your > > > system > > > > > ================================================================================= > > > > > ********************************************************************************* > > > CONFIGURATION CRASH (Please send configure.log to > > > petsc-maint at mcs.anl.gov) > > > > > ********************************************************************************* > > > > > > can't start new thread > > > File "config/configure.py", line 172, in petsc_configure > > > framework = config.framework.Framework(sys.argv > > [1:]+['--configModules= > > > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], loadArgDB = > > 0) > > > File > > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > /python/BuildSystem/config/framework.py", > > > line 81, in __init__ > > > self.argDB['debugSections'] = ['screen'] > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > > > line 219, in __setitem__ > > > self.save() > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7/python/BuildSystem/RDict.py", > > > line 639, in save > > > self.saveTimer.start() > > > File "/nas/home/enduser/g0306332/python-2.4 > > /lib/python2.5/threading.py", > > > line 434, in start > > > _start_new_thread(self.__bootstrap, ()) > > > > > > > > > > > > > > > > > > > > > > > > On 12/6/06, Satish Balay wrote: > > > > > > > > What linux is this? Just get python sources from http://python.org/ > > > > [sugest python-2.4] - and install your own copy - and try with it. > > > > > > > > configure python with: > > > > ./configure --prefix=${HOME}/python-2.4 > > > > make > > > > make install > > > > > > > > And configure PETSc with: > > > > ${HOME}/python-2.4/bin/python config/configure.py > > > > > > > > Satish > > > > > > > > > > > > On Wed, 6 Dec 2006, Ben Tay wrote: > > > > > > > > > Hi, > > > > > > > > > > I just tried but it's the same error. Any other suggestion? > > > > > > > > > > thanks! > > > > > > > > > > > > > > > > > > > > > > > > > On 12/5/06, Matthew Knepley wrote: > > > > > > > > > > > > You have a broken Python installation. You can work around this > > using > > > > > > the options --useThreads=0. > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Matt > > > > > > > > > > > > On 12/5/06, Ben Tay wrote: > > > > > > > Hi, > > > > > > > > > > > > > > I tried to compile the library on a linux sys (xeon). It gives > > the > > > > error > > > > > > > msg: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ********************************************************************************* > > > > > > > CONFIGURATION CRASH (Please send configure.log to > > > > > > > petsc-maint at mcs.anl.gov) > > > > > > > > > > > > > > > > > > > ********************************************************************************* > > > > > > > > > > > > > > can't start new thread > > > > > > > > > > > > > > File "./config/configure.py", line 172, in petsc_configure > > > > > > > framework = > > > > > > > config.framework.Framework(sys.argv[1:]+['--configModules= > > > > > > PETSc.Configure','--optionsModule=PETSc.compilerOptions'], > > > > > > > loadArgDB = 0) > > > > > > > File > > > > > > > "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > > > /python/BuildSystem/config/framework.py", > > > > > > > line 81, in __init__ > > > > > > > self.argDB['debugSections'] = ['screen'] > > > > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > > > /python/BuildSystem/RDict.py", > > > > > > > line 219, in __setitem__ > > > > > > > self.save() > > > > > > > File "/nas/hpctmp/g0306332/petsc-2.3.2-p7 > > > > > > /python/BuildSystem/RDict.py", > > > > > > > line 639, in save > > > > > > > self.saveTimer.start() > > > > > > > File "/usr/lib/python2.2/threading.py", line 396, in > > > > > > > start > > > > > > > _start_new_thread(self.__bootstrap, ()) > > > > > > > > > > > > > > > > > > > > > May I know what's wrong? I also can't find any configure.logfile. > > > > > > > > > > > > > > Thank you. > > > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > > > -- > > > > > > "Failure has a thousand explanations. Success doesn't need one" -- > > Sir > > > > > > Alec Guiness > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From c.calonaci at cineca.it Thu Dec 7 09:07:51 2006 From: c.calonaci at cineca.it (Cristiano Calonaci) Date: Thu, 7 Dec 2006 16:07:51 +0100 (MET) Subject: Problem using MatView Message-ID: <45782E47.8030405@cineca.it> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to plot using X a sparse matrix of order 100.000, with about 7.000.000 not zero elements using ierr = PetscViewerDrawOpen(PETSC_COMM_WORLD, NULL, "matrix ATA", PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE, &ataviewer); CHKERRQ(ierr); ...... ierr = MatView(ATA, ataviewer); CHKERRQ(ierr); When I run with one processors all is ok (fast plot), when I run with more processors, for examples 2, the time need to plot becomes infinite. Using gdb I fount that processors zero is always memcpying, #0 0x0000002a96a1b6c6 in memcpy () from /lib64/tls/libc.so.6 #1 0x00000000009cd6ff in PetscMemcpy (a=0x2a9c88f200, b=0x2a9c50b200, n=1362576) at memc.c:102 #2 0x00000000005f29af in MatSetValues_MPIAIJ (mat=0xdec4c0, m=1, im=0x7fbfffe5fc, n=121, in=0x2a9a420328, v=0x2a9758c450, addv=INSERT_VALUES) at mpiaij.c:187 #3 0x000000000052fe23 in MatSetValues (mat=0xdec4c0, m=1, idxm=0x7fbfffe5fc, n=121, idxn=0x2a9a420328, v=0x2a9758c450, addv=INSERT_VALUES) at matrix.c:826 #4 0x00000000005fe647 in MatView_MPIAIJ_ASCIIorDraworSocket (mat=0xdbaa50, viewer=0xd78c90) at mpiaij.c:957 #5 0x00000000005ff229 in MatView_MPIAIJ (mat=0xdbaa50, viewer=0xd78c90) at mpiaij.c:1005 #6 0x000000000052cfa8 in MatView (mat=0xdbaa50, viewer=0xd78c90) at matrix.c:549 here (frame #4) in the MatSetValues /* This is just a temporary matrix, so explicitly using MATMPIAIJ is probably best */ ierr = MatSetType(A,MATMPIAIJ);CHKERRQ(ierr); ierr = MatMPIAIJSetPreallocation(A,0,PETSC_NULL,0,PETSC_NULL);CHKERRQ(ierr); ierr = PetscLogObjectParent(mat,A);CHKERRQ(ierr); /* copy over the A part */ Aloc = (Mat_SeqAIJ*)aij->A->data; m = aij->A->rmap.n; ai = Aloc->i; aj = Aloc->j; a = Aloc->a; row = mat->rmap.rstart; for (i=0; icmap.rstart ;} for (i=0; i References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> <804ab5d40612070242o6cacbd95m629fdc8dfc2f87ec@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Satish Balay wrote: > I'll sugest using a different machine for install. Can you try the following change to python/BuildSystem/RDict.py - and then run configure with the option '--useThreads=0' - and see if it works? Satish ------------------------------------------------ diff -r e6686438867b90e62e969d5f96189924d4bd27f2 RDict.py --- a/RDict.py Thu Dec 07 09:09:11 2006 -0600 +++ b/RDict.py Thu Dec 07 09:09:36 2006 -0600 @@ -624,6 +624,7 @@ Arg class, which wraps the usual value.' def save(self, force = 0): '''Save the dictionary after 5 seconds, ignoring all subsequent calls until the save - Giving force = True will cause an immediate save''' + return 0 if force: self.saveTimer = None # This should be a critical section From knepley at gmail.com Thu Dec 7 09:24:36 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 7 Dec 2006 09:24:36 -0600 Subject: Problem using MatView In-Reply-To: <45782E47.8030405@cineca.it> References: <45782E47.8030405@cineca.it> Message-ID: Yes, the implementation is very bad. It assembles the whole matrix on process 0 before viewing. It is intended for very small matrices only. Fixing would entail rewriting the X viewer to take pieces of the matrix at a time. This is a low priority for us now, but we would gladly accept contributed code. Thanks, Matt On 12/7/06, Cristiano Calonaci wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I'm trying to plot using X a sparse matrix of order 100.000, with > about 7.000.000 not zero elements using > > ierr = PetscViewerDrawOpen(PETSC_COMM_WORLD, NULL, "matrix ATA", > PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE, &ataviewer); > CHKERRQ(ierr); > ...... > ierr = MatView(ATA, ataviewer); CHKERRQ(ierr); > > When I run with one processors all is ok (fast plot), when I run with more > processors, for examples 2, the time need to plot becomes infinite. > > Using gdb I fount that processors zero is always memcpying, > > #0 0x0000002a96a1b6c6 in memcpy () from /lib64/tls/libc.so.6 > #1 0x00000000009cd6ff in PetscMemcpy (a=0x2a9c88f200, b=0x2a9c50b200, > n=1362576) at memc.c:102 > #2 0x00000000005f29af in MatSetValues_MPIAIJ (mat=0xdec4c0, m=1, > im=0x7fbfffe5fc, n=121, in=0x2a9a420328, v=0x2a9758c450, > addv=INSERT_VALUES) at mpiaij.c:187 > #3 0x000000000052fe23 in MatSetValues (mat=0xdec4c0, m=1, > idxm=0x7fbfffe5fc, n=121, idxn=0x2a9a420328, v=0x2a9758c450, > addv=INSERT_VALUES) at matrix.c:826 > #4 0x00000000005fe647 in MatView_MPIAIJ_ASCIIorDraworSocket > (mat=0xdbaa50, viewer=0xd78c90) at mpiaij.c:957 > #5 0x00000000005ff229 in MatView_MPIAIJ (mat=0xdbaa50, viewer=0xd78c90) > at mpiaij.c:1005 > #6 0x000000000052cfa8 in MatView (mat=0xdbaa50, viewer=0xd78c90) at > matrix.c:549 > > here (frame #4) in the MatSetValues > > /* This is just a temporary matrix, so explicitly using MATMPIAIJ is > probably best */ > ierr = MatSetType(A,MATMPIAIJ);CHKERRQ(ierr); > ierr = > MatMPIAIJSetPreallocation(A,0,PETSC_NULL,0,PETSC_NULL);CHKERRQ(ierr); > ierr = PetscLogObjectParent(mat,A);CHKERRQ(ierr); > > /* copy over the A part */ > Aloc = (Mat_SeqAIJ*)aij->A->data; > m = aij->A->rmap.n; ai = Aloc->i; aj = Aloc->j; a = Aloc->a; > row = mat->rmap.rstart; > for (i=0; icmap.rstart ;} > for (i=0; i ierr = > MatSetValues(A,1,&row,ai[i+1]-ai[i],aj,a,INSERT_VALUES);CHKERRQ(ierr); > row++; a += ai[i+1]-ai[i]; aj += ai[i+1]-ai[i]; > } > > I think the problem is a lot of MatSetValues without preallocation > (ierr = > MatMPIAIJSetPreallocation(A,0,PETSC_NULL,0,PETSC_NULL);CHKERRQ(ierr);), > isn't it ? There is a solution ? > > Thaks a lot > > 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 > > iD8DBQFFeC5Hvt08LyoFZwMRAjD8AJ4kp8FPo0kdgbLLg1l6sfjf/AAihQCfewSs > 06+THVFfozPmQi4Ro5um4zM= > =6A1q > -----END PGP SIGNATURE----- > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From bsmith at mcs.anl.gov Thu Dec 7 12:21:39 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 7 Dec 2006 12:21:39 -0600 (CST) Subject: Problem using MatView In-Reply-To: <45782E47.8030405@cineca.it> References: <45782E47.8030405@cineca.it> Message-ID: The code is not scalable for large matrices; I would argue that it doesn't make sense to visualize such large matrices in this way. Each matrix entry is tiny compared to a single pixal on the screen. For PDE problems and most others, the non-zero structure of the matrix is well represented with at most a couple thousand unknowns. So reserve your visualization to matrices that are not so big. Barry We will never make this code scalable, it is a fools errand. On Thu, 7 Dec 2006, Cristiano Calonaci wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I'm trying to plot using X a sparse matrix of order 100.000, with > about 7.000.000 not zero elements using > > ierr = PetscViewerDrawOpen(PETSC_COMM_WORLD, NULL, "matrix ATA", > PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE, PETSC_DECIDE, &ataviewer); > CHKERRQ(ierr); > ...... > ierr = MatView(ATA, ataviewer); CHKERRQ(ierr); > > When I run with one processors all is ok (fast plot), when I run with more > processors, for examples 2, the time need to plot becomes infinite. > > Using gdb I fount that processors zero is always memcpying, > > #0 0x0000002a96a1b6c6 in memcpy () from /lib64/tls/libc.so.6 > #1 0x00000000009cd6ff in PetscMemcpy (a=0x2a9c88f200, b=0x2a9c50b200, > n=1362576) at memc.c:102 > #2 0x00000000005f29af in MatSetValues_MPIAIJ (mat=0xdec4c0, m=1, > im=0x7fbfffe5fc, n=121, in=0x2a9a420328, v=0x2a9758c450, > addv=INSERT_VALUES) at mpiaij.c:187 > #3 0x000000000052fe23 in MatSetValues (mat=0xdec4c0, m=1, > idxm=0x7fbfffe5fc, n=121, idxn=0x2a9a420328, v=0x2a9758c450, > addv=INSERT_VALUES) at matrix.c:826 > #4 0x00000000005fe647 in MatView_MPIAIJ_ASCIIorDraworSocket > (mat=0xdbaa50, viewer=0xd78c90) at mpiaij.c:957 > #5 0x00000000005ff229 in MatView_MPIAIJ (mat=0xdbaa50, viewer=0xd78c90) > at mpiaij.c:1005 > #6 0x000000000052cfa8 in MatView (mat=0xdbaa50, viewer=0xd78c90) at > matrix.c:549 > > here (frame #4) in the MatSetValues > > /* This is just a temporary matrix, so explicitly using MATMPIAIJ is > probably best */ > ierr = MatSetType(A,MATMPIAIJ);CHKERRQ(ierr); > ierr = > MatMPIAIJSetPreallocation(A,0,PETSC_NULL,0,PETSC_NULL);CHKERRQ(ierr); > ierr = PetscLogObjectParent(mat,A);CHKERRQ(ierr); > > /* copy over the A part */ > Aloc = (Mat_SeqAIJ*)aij->A->data; > m = aij->A->rmap.n; ai = Aloc->i; aj = Aloc->j; a = Aloc->a; > row = mat->rmap.rstart; > for (i=0; icmap.rstart ;} > for (i=0; i ierr = > MatSetValues(A,1,&row,ai[i+1]-ai[i],aj,a,INSERT_VALUES);CHKERRQ(ierr); > row++; a += ai[i+1]-ai[i]; aj += ai[i+1]-ai[i]; > } > > I think the problem is a lot of MatSetValues without preallocation > (ierr = > MatMPIAIJSetPreallocation(A,0,PETSC_NULL,0,PETSC_NULL);CHKERRQ(ierr);), > isn't it ? There is a solution ? > > Thaks a lot > > 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 > > iD8DBQFFeC5Hvt08LyoFZwMRAjD8AJ4kp8FPo0kdgbLLg1l6sfjf/AAihQCfewSs > 06+THVFfozPmQi4Ro5um4zM= > =6A1q > -----END PGP SIGNATURE----- > > From fuentes at ices.utexas.edu Thu Dec 7 16:14:25 2006 From: fuentes at ices.utexas.edu (David Fuentes) Date: Thu, 7 Dec 2006 16:14:25 -0600 (CST) Subject: profiling In-Reply-To: References: Message-ID: I would like to create two communicator subgroups of PETSC_COMM_WORLD. Is it possible to use the petsc profiling utilities to profile the two communicator sub-groups individually? thank you, David Fuentes From bsmith at mcs.anl.gov Thu Dec 7 16:49:13 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 7 Dec 2006 16:49:13 -0600 (CST) Subject: profiling In-Reply-To: References: Message-ID: David, Depending on what you wish to do it may be very easy. The logging is all done on a per process basis (each process just logs its stuff). PetscLogPrintSummary() takes as an argument a communicator and summarizes all the data over THAT communicator. So it may be as simple as calling PetscLogPrintSummary() with the subcommunicators you created. Good luck, Barry Now if you have lots of different size subcommunicators that each do a variety of different computations, untangling the information will be much harder. On Thu, 7 Dec 2006, David Fuentes wrote: > > > I would like to create two communicator subgroups of PETSC_COMM_WORLD. > Is it possible to use the petsc profiling utilities to profile the two > communicator sub-groups individually? > > > > thank you, > David Fuentes > > From svm at cfdrc.com Thu Dec 7 17:44:35 2006 From: svm at cfdrc.com (Saikrishna V. Marella) Date: Thu, 7 Dec 2006 17:44:35 -0600 Subject: No subject Message-ID: <002501c71a59$a6814650$10fda8c0@svmwin64> Barry, I tried using -with-precision=matsingle but it gives the following error. Cannot convert PetscScalar* to MatScalar* in assignment.Is there a way to get around this through configure options.. Sai. -- Saikrishna Marella Project Engineer, 215 Wynn Dr. Suite 501, Huntsville AL 35824. CFD Research Corporation Tel:256-726-4954 Fax:(4806) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Saikrishna(Sai) Marella (svm at cfdrc.com).vcf Type: text/x-vcard Size: 420 bytes Desc: not available URL: From bsmith at mcs.anl.gov Thu Dec 7 18:37:40 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 7 Dec 2006 18:37:40 -0600 (CST) Subject: your mail In-Reply-To: <002501c71a59$a6814650$10fda8c0@svmwin64> References: <002501c71a59$a6814650$10fda8c0@svmwin64> Message-ID: Please send all the output from running make to petsc-maint at mcs.anl.gov Barry On Thu, 7 Dec 2006, Saikrishna V. Marella wrote: > Barry, > > > > I tried using -with-precision=matsingle but it gives the following error. > > > > Cannot convert PetscScalar* to MatScalar* in assignment.Is there a way to > get around this through configure options.. > > > > Sai. > > > > -- > > Saikrishna Marella > > Project Engineer, > > 215 Wynn Dr. Suite 501, > > Huntsville AL 35824. > > CFD Research Corporation > > Tel:256-726-4954 Fax:(4806) > > > > From zonexo at gmail.com Fri Dec 8 01:47:05 2006 From: zonexo at gmail.com (Ben Tay) Date: Fri, 8 Dec 2006 15:47:05 +0800 Subject: Sudden random deviation of results In-Reply-To: References: <804ab5d40612070542u57cac6cdudc1fb7272c4f9e59@mail.gmail.com> Message-ID: <804ab5d40612072347l2a879efew9dc54a36a7f6810a@mail.gmail.com> Hi, I have tested my code again, using the checks suggested by Barry. Using KSPGetConvergedReason shows that it has converged. Changing the tol from 1.e-5 to -6 or -7 or even -4 eliminated the explosion of value at that particular time step. However, that is expected since the values are now different. Moreover, for other linear solver package, it does not happen at this particular time step as well. Another strange thing is that suppose the explosion of value happen at t=50. If I store my all my relevent values at t=40 into files and restart my simulation from t=40(instead of t=1) by reading the stored values from the files, the explosion will now not happen at t=50. Hence it seems very random too.... On 12/7/06, Barry Smith wrote: > > > Ben, > > First make sure that the residual has actually gotten > to the tolerance you want. PETSc KSP does NOT stop if the > linear system has not converged; you should call KSPGetConvergedReason() > after each solve to make sure it has converged (as a quick check > you can run with -ksp_converged_reason.) > > Next try decreasing the KSP tolerance factor a great deal. Does > 1) the solution you get for your physics problem look the same for small > time (after a few time-steps they will start to drift). > 2) the residual blow up at the same time, or later? > > Barry > > > On Thu, 7 Dec 2006, Ben Tay wrote: > > > Hi, > > > > I have been using a few different Krylov linear solver package such as > > nspcg,sparsekit and now petsc to solve the linear eqns for my NS solver > > momentum and poisson eqn. For moving bodies simulation, while solving > the > > poisson eqn, sometimes the result suddenly changes drastically, although > the > > iterations seems to have converged e.g. at the previous time step, > > everything is fine, but at the next time step, the velocity suddenly > > explodes from 2-3 to 20-30+. > > > > The strange thing is that this deviation happens at different time step > for > > different linear solver package ie for nspcg, it happens at time=20 but > for > > petsc, it happens at time=40. It seems "random" in this sense. Changing > the > > type of solver such as gmres or bcgs does not change the time of > deviation. > > > > Does anyone know why this is happening? Is it a characteristic of krylov > > solver to happen once in a while? It does not happen in the stationary > body > > simulation though. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Fri Dec 8 07:40:29 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Fri, 8 Dec 2006 07:40:29 -0600 (CST) Subject: Sudden random deviation of results In-Reply-To: <804ab5d40612072347l2a879efew9dc54a36a7f6810a@mail.gmail.com> References: <804ab5d40612070542u57cac6cdudc1fb7272c4f9e59@mail.gmail.com> <804ab5d40612072347l2a879efew9dc54a36a7f6810a@mail.gmail.com> Message-ID: Ben, Try running with a direct solver. -pc_type lu and see how it goes along. (on one process). Barry On Fri, 8 Dec 2006, Ben Tay wrote: > Hi, > > I have tested my code again, using the checks suggested by Barry. Using > KSPGetConvergedReason shows that it has converged. Changing the tol from > 1.e-5 to -6 or -7 or even -4 eliminated the explosion of value at that > particular time step. > > > However, that is expected since the values are now different. Moreover, for > other linear solver package, it does not happen at this particular time step > as well. > > Another strange thing is that suppose the explosion of value happen at t=50. > If I store my all my relevent values at t=40 into files and restart my > simulation from t=40(instead of t=1) by reading the stored values from the > files, the explosion will now not happen at t=50. Hence it seems very random > too.... > > > > On 12/7/06, Barry Smith wrote: > > > > > > Ben, > > > > First make sure that the residual has actually gotten > > to the tolerance you want. PETSc KSP does NOT stop if the > > linear system has not converged; you should call KSPGetConvergedReason() > > after each solve to make sure it has converged (as a quick check > > you can run with -ksp_converged_reason.) > > > > Next try decreasing the KSP tolerance factor a great deal. Does > > 1) the solution you get for your physics problem look the same for small > > time (after a few time-steps they will start to drift). > > 2) the residual blow up at the same time, or later? > > > > Barry > > > > > > On Thu, 7 Dec 2006, Ben Tay wrote: > > > > > Hi, > > > > > > I have been using a few different Krylov linear solver package such as > > > nspcg,sparsekit and now petsc to solve the linear eqns for my NS solver > > > momentum and poisson eqn. For moving bodies simulation, while solving > > the > > > poisson eqn, sometimes the result suddenly changes drastically, although > > the > > > iterations seems to have converged e.g. at the previous time step, > > > everything is fine, but at the next time step, the velocity suddenly > > > explodes from 2-3 to 20-30+. > > > > > > The strange thing is that this deviation happens at different time step > > for > > > different linear solver package ie for nspcg, it happens at time=20 but > > for > > > petsc, it happens at time=40. It seems "random" in this sense. Changing > > the > > > type of solver such as gmres or bcgs does not change the time of > > deviation. > > > > > > Does anyone know why this is happening? Is it a characteristic of krylov > > > solver to happen once in a while? It does not happen in the stationary > > body > > > simulation though. > > > > > > > > From zonexo at gmail.com Fri Dec 8 09:42:44 2006 From: zonexo at gmail.com (Ben Tay) Date: Fri, 8 Dec 2006 23:42:44 +0800 Subject: Error when building with intel mkl 7.21 Message-ID: <804ab5d40612080742h6eee54b5q422b7aaedf350286@mail.gmail.com> Hi, I tried to build the libraries on my school's em64t machines which is supposed to be faster. The compilers are intel cc,fc ver 9. mkl is 7.21.I'm trying to build a shared library. My command is ./config/configure.py --with-vendor-compilers=intel --with-blas-lapack-dir=/opt/intel/mkl721/ --with-mpi=0 --with-x=0 --with-shared during compilation, I can get the following error msg: making shared libraries in /lsftmp/g0306332/petsc-2.3.2-p7 //lib/linux64-nompi-shared building libpetsc.so building libpetscvec.so building libpetscmat.so ld: /usr/local/intel/mkl721cluster/lib/32/libmkl_lapack.a(dgetrf_omp.o): relocation R_X86_64_PC32 against `_mkl_lapack_dgetrf_omp_271__par_loop0' can not be used when making a shared object; recompile with -fPIC ld: final link failed: Bad value make[2]: [shared_linux] Error 1 (ignored) building libpetscdm.so building libpetscksp.so ld: /usr/local/intel/mkl721cluster/lib/32/libmkl_lapack.a(dgeqrf_omp.o): relocation R_X86_64_PC32 against `_mkl_lapack_dgeqrf_301__par_loop0' can not be used when making a shared object; recompile with -fPIC ld: final link failed: Bad value make[2]: [shared_linux] Error 1 (ignored) building libpetscsnes.so building libpetscts.so building libpetsccontrib.so The examples ran ok though. However, when I try to run my own code (which worked on another server), I get the following error msg: petsc_sub.o(.text+0xcb): In function `petsc_solver': /nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:46: undefined reference to `matcreateseqaij_' petsc_sub.o(.text+0x150):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:52: undefined reference to `kspcreate_' petsc_sub.o(.text+0x657):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:105: undefined reference to `matsetvalues_' petsc_sub.o(.text+0x73e):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:110: undefined reference to `matsetvalues_' petsc_sub.o(.text+0x823):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:115: undefined reference to `matsetvalues_' petsc_sub.o(.text+0x90a):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:120: undefined reference to `matsetvalues_' petsc_sub.o(.text+0xa01):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:125: undefined reference to `matsetvalues_' petsc_sub.o(.text+0xafa):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:130: more undefined references to `matsetvalues_' follow petsc_sub.o(.text+0x3501): In function `petsc_solver': /nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:402: undefined reference to `matassemblybegin_' petsc_sub.o(.text+0x3526):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:403: undefined reference to `matassemblyend_' petsc_sub.o(.text+0x356d):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:405: undefined reference to `kspsetoperators_' petsc_sub.o(.text+0x3595):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:407: undefined reference to `kspgetpc_' petsc_sub.o(.text+0x35e4):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:411: undefined reference to `kspsettype_' petsc_sub.o(.text+0x3633):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:416: undefined reference to `pcsettype_' petsc_sub.o(.text+0x364e):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:419: undefined reference to `kspsetfromoptions_' petsc_sub.o(.text+0x36ad):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:425: undefined reference to `kspsettolerances_' petsc_sub.o(.text+0x36e2):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:427: undefined reference to `kspsolve_' petsc_sub.o(.text+0x3704):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:429: undefined reference to `kspgetconvergedreason_' /tmp/ifortuYcl1b.o(.text+0x8f2e): In function `ns2d_c': /nfs/home/enduser/g0306332/ns2d_c/ns2d_c.f90:825: undefined reference to `matdestroy_' /tmp/ifortuYcl1b.o(.text+0x8f4c):/nfs/home/enduser/g0306332/ns2d_c/ns2d_c.f90:827: undefined reference to `kspdestroy_' make: *** [a.out] Error 1 It happens when I'm trying to link all the files together. compiling petsc_sub.F has no problem and I am using the same option as for the examples. Also if I use the downloaded blas/lapack instead of mkl, there is also no problem so I guess the problem is from mkl... Hope someone can help. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Dec 8 11:19:25 2006 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 8 Dec 2006 11:19:25 -0600 Subject: Error when building with intel mkl 7.21 In-Reply-To: <804ab5d40612080742h6eee54b5q422b7aaedf350286@mail.gmail.com> References: <804ab5d40612080742h6eee54b5q422b7aaedf350286@mail.gmail.com> Message-ID: Your MKL is incompatible with shared libraries on 64-bit machines because it was compiled without -fPIC. You need to configure with --with-shared=0. Matt On 12/8/06, Ben Tay wrote: > Hi, > > I tried to build the libraries on my school's em64t machines which is > supposed to be faster. The compilers are intel cc,fc ver 9. mkl is 7.21.I'm > trying to build a shared library. My command is > > ./config/configure.py --with-vendor-compilers=intel > --with-blas-lapack-dir=/opt/intel/mkl721/ --with-mpi=0 > --with-x=0 --with-shared > > during compilation, I can get the following error msg: > > making shared libraries in > /lsftmp/g0306332/petsc-2.3.2-p7//lib/linux64-nompi-shared > building libpetsc.so > building libpetscvec.so > building libpetscmat.so > ld: > /usr/local/intel/mkl721cluster/lib/32/libmkl_lapack.a(dgetrf_omp.o): > relocation R_X86_64_PC32 against > `_mkl_lapack_dgetrf_omp_271__par_loop0' can not be used > when making a shared object; recompile with -fPIC > ld: final link failed: Bad value > make[2]: [shared_linux] Error 1 (ignored) > building libpetscdm.so > building libpetscksp.so > ld: > /usr/local/intel/mkl721cluster/lib/32/libmkl_lapack.a(dgeqrf_omp.o): > relocation R_X86_64_PC32 against > `_mkl_lapack_dgeqrf_301__par_loop0' can not be used when > making a shared object; recompile with -fPIC > ld: final link failed: Bad value > make[2]: [shared_linux] Error 1 (ignored) > building libpetscsnes.so > building libpetscts.so > building libpetsccontrib.so > > The examples ran ok though. However, when I try to run my own code (which > worked on another server), I get the following error msg: > > petsc_sub.o(.text+0xcb): In function `petsc_solver': > /nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:46: undefined > reference to `matcreateseqaij_' > petsc_sub.o(.text+0x150):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:52: > undefined reference to `kspcreate_' > petsc_sub.o(.text+0x657):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:105: > undefined reference to `matsetvalues_' > petsc_sub.o(.text+0x73e):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:110: > undefined reference to `matsetvalues_' > petsc_sub.o(.text+0x823):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:115: > undefined reference to `matsetvalues_' > petsc_sub.o(.text+0x90a):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:120: > undefined reference to `matsetvalues_' > petsc_sub.o(.text+0xa01):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:125: > undefined reference to `matsetvalues_' > petsc_sub.o(.text+0xafa):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:130: > more undefined references to `matsetvalues_' follow > petsc_sub.o(.text+0x3501): In function `petsc_solver': > /nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:402: > undefined reference to `matassemblybegin_' > petsc_sub.o(.text+0x3526):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:403: > undefined reference to `matassemblyend_' > petsc_sub.o(.text+0x356d):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:405: > undefined reference to `kspsetoperators_' > petsc_sub.o(.text+0x3595):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:407: > undefined reference to `kspgetpc_' > petsc_sub.o(.text+0x35e4):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:411: > undefined reference to `kspsettype_' > petsc_sub.o(.text+0x3633):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:416: > undefined reference to `pcsettype_' > petsc_sub.o(.text+0x364e):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:419: > undefined reference to `kspsetfromoptions_' > petsc_sub.o(.text+0x36ad):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:425: > undefined reference to `kspsettolerances_' > petsc_sub.o(.text+0x36e2):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:427: > undefined reference to `kspsolve_' > petsc_sub.o(.text+0x3704):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:429: > undefined reference to `kspgetconvergedreason_' > /tmp/ifortuYcl1b.o(.text+0x8f2e): In function `ns2d_c': > /nfs/home/enduser/g0306332/ns2d_c/ns2d_c.f90:825: undefined > reference to `matdestroy_' > /tmp/ifortuYcl1b.o(.text+0x8f4c):/nfs/home/enduser/g0306332/ns2d_c/ns2d_c.f90:827: > undefined reference to `kspdestroy_' > make: *** [a.out] Error 1 > > It happens when I'm trying to link all the files together. compiling > petsc_sub.F has no problem and I am using the same option as for the > examples. Also if I use the downloaded blas/lapack instead of mkl, there is > also no problem so I guess the problem is from mkl... > > Hope someone can help. Thank you. -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From baagaard at usgs.gov Fri Dec 8 11:36:49 2006 From: baagaard at usgs.gov (Brad Aagaard) Date: Fri, 8 Dec 2006 09:36:49 -0800 Subject: Error when building with intel mkl 7.21 In-Reply-To: References: <804ab5d40612080742h6eee54b5q422b7aaedf350286@mail.gmail.com> Message-ID: <200612080936.49711.baagaard@usgs.gov> Ben- Matt's suggestion of not using shared libraries may work, but it looks to me like PETSc is trying to link 64-bit PETSc libraries against 32-bit MKL libraries (note the directory 32 in the MKL path). I don't know the layout of the MKL tree but you probably need to adjust your configuration line to make sure PETSc finds the 64-bit MKL libraries (assuming you have them). Brad On Friday 08 December 2006 9:19 am, Matthew Knepley wrote: > Your MKL is incompatible with shared libraries on 64-bit machines because > it was compiled without -fPIC. You need to configure with --with-shared=0. > > Matt > > On 12/8/06, Ben Tay wrote: > > Hi, > > > > I tried to build the libraries on my school's em64t machines which is > > supposed to be faster. The compilers are intel cc,fc ver 9. mkl is > > 7.21.I'm trying to build a shared library. My command is > > > > ./config/configure.py --with-vendor-compilers=intel > > --with-blas-lapack-dir=/opt/intel/mkl721/ --with-mpi=0 > > --with-x=0 --with-shared > > > > during compilation, I can get the following error msg: > > > > making shared libraries in > > /lsftmp/g0306332/petsc-2.3.2-p7//lib/linux64-nompi-shared > > building libpetsc.so > > building libpetscvec.so > > building libpetscmat.so > > ld: > > /usr/local/intel/mkl721cluster/lib/32/libmkl_lapack.a(dgetrf_omp.o): > > relocation R_X86_64_PC32 against > > `_mkl_lapack_dgetrf_omp_271__par_loop0' can not be used > > when making a shared object; recompile with -fPIC > > ld: final link failed: Bad value > > make[2]: [shared_linux] Error 1 (ignored) > > building libpetscdm.so > > building libpetscksp.so > > ld: > > /usr/local/intel/mkl721cluster/lib/32/libmkl_lapack.a(dgeqrf_omp.o): > > relocation R_X86_64_PC32 against > > `_mkl_lapack_dgeqrf_301__par_loop0' can not be used when > > making a shared object; recompile with -fPIC > > ld: final link failed: Bad value > > make[2]: [shared_linux] Error 1 (ignored) > > building libpetscsnes.so > > building libpetscts.so > > building libpetsccontrib.so > > > > The examples ran ok though. However, when I try to run my own code (which > > worked on another server), I get the following error msg: > > > > petsc_sub.o(.text+0xcb): In function `petsc_solver': > > /nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:46: undefined > > reference to `matcreateseqaij_' > > petsc_sub.o(.text+0x150):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:52 > >: undefined reference to `kspcreate_' > > petsc_sub.o(.text+0x657):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:10 > >5: undefined reference to `matsetvalues_' > > petsc_sub.o(.text+0x73e):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:11 > >0: undefined reference to `matsetvalues_' > > petsc_sub.o(.text+0x823):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:11 > >5: undefined reference to `matsetvalues_' > > petsc_sub.o(.text+0x90a):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:12 > >0: undefined reference to `matsetvalues_' > > petsc_sub.o(.text+0xa01):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:12 > >5: undefined reference to `matsetvalues_' > > petsc_sub.o(.text+0xafa):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:13 > >0: more undefined references to `matsetvalues_' follow > > petsc_sub.o(.text+0x3501): In function `petsc_solver': > > /nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:402: > > undefined reference to `matassemblybegin_' > > petsc_sub.o(.text+0x3526):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >03: undefined reference to `matassemblyend_' > > petsc_sub.o(.text+0x356d):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >05: undefined reference to `kspsetoperators_' > > petsc_sub.o(.text+0x3595):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >07: undefined reference to `kspgetpc_' > > petsc_sub.o(.text+0x35e4):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >11: undefined reference to `kspsettype_' > > petsc_sub.o(.text+0x3633):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >16: undefined reference to `pcsettype_' > > petsc_sub.o(.text+0x364e):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >19: undefined reference to `kspsetfromoptions_' > > petsc_sub.o(.text+0x36ad):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >25: undefined reference to `kspsettolerances_' > > petsc_sub.o(.text+0x36e2):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >27: undefined reference to `kspsolve_' > > petsc_sub.o(.text+0x3704):/nfs/home/enduser/g0306332/ns2d_c/petsc_sub.F:4 > >29: undefined reference to `kspgetconvergedreason_' > > /tmp/ifortuYcl1b.o(.text+0x8f2e): In function `ns2d_c': > > /nfs/home/enduser/g0306332/ns2d_c/ns2d_c.f90:825: undefined > > reference to `matdestroy_' > > /tmp/ifortuYcl1b.o(.text+0x8f4c):/nfs/home/enduser/g0306332/ns2d_c/ns2d_c > >.f90:827: undefined reference to `kspdestroy_' > > make: *** [a.out] Error 1 > > > > It happens when I'm trying to link all the files together. compiling > > petsc_sub.F has no problem and I am using the same option as for the > > examples. Also if I use the downloaded blas/lapack instead of mkl, there > > is also no problem so I guess the problem is from mkl... > > > > Hope someone can help. Thank you. From js2615 at columbia.edu Sat Dec 9 01:03:33 2006 From: js2615 at columbia.edu (Jianing Shi) Date: Sat, 09 Dec 2006 02:03:33 -0500 Subject: DA Jacobian In-Reply-To: References: Message-ID: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> I have a question about creating the jacobian here. Here is the code I use to create it. ------------------------------------------------------- ierr = DAGetMatrix(user.da,MATAIJ,&J);CHKERRQ(ierr); A = J; ierr = DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); ierr = MatRegisterDAAD();CHKERRQ(ierr); ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); ------------------------------------------------------ I included the head files petscsnes.h petscda.h When I compile it, I got the following linking error: ld: Undefined symbols: _MatCreateDAAD _MatDAADSetCtx _MatDAADSetSNES _MatRegisterDAAD make: [paraImplicitV1] Error 1 (ignored) Not sure what went wrong. Jianing From knepley at gmail.com Sat Dec 9 08:19:57 2006 From: knepley at gmail.com (Matthew Knepley) Date: Sat, 9 Dec 2006 08:19:57 -0600 Subject: DA Jacobian In-Reply-To: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> References: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> Message-ID: Are you really using ADIC? Matt On 12/9/06, Jianing Shi wrote: > I have a question about creating the jacobian here. > Here is the code I use to create it. > > ------------------------------------------------------- > ierr = DAGetMatrix(user.da,MATAIJ,&J);CHKERRQ(ierr); > A = J; > > ierr = > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > ierr = MatRegisterDAAD();CHKERRQ(ierr); > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > ------------------------------------------------------ > > I included the head files > petscsnes.h petscda.h > > When I compile it, I got the following linking error: > > ld: Undefined symbols: > _MatCreateDAAD > _MatDAADSetCtx > _MatDAADSetSNES > _MatRegisterDAAD > make: [paraImplicitV1] Error 1 (ignored) > > Not sure what went wrong. > > Jianing > > -- "Failure has a thousand explanations. Success doesn't need one" -- Sir Alec Guiness From js2615 at columbia.edu Sat Dec 9 11:45:03 2006 From: js2615 at columbia.edu (Jianing Shi) Date: Sat, 09 Dec 2006 12:45:03 -0500 Subject: DA Jacobian In-Reply-To: References: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> Message-ID: <1165686303.457af61f9511c@cubmail.cc.columbia.edu> I just added PETSC_HAVE_ADIC, and seems that the compiler does not complain any more. #if defined(PETSC_HAVE_ADIC) if (adicmf_jacobian) { ierr = DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); ierr = MatRegisterDAAD();CHKERRQ(ierr); ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); } #endif Though what is the trick if I really want to use ADIC? Jianing Quoting Matthew Knepley : > Are you really using ADIC? > > Matt > > On 12/9/06, Jianing Shi wrote: > > I have a question about creating the jacobian here. > > Here is the code I use to create it. > > > > ------------------------------------------------------- > > ierr = DAGetMatrix(user.da,MATAIJ,&J);CHKERRQ(ierr); > > A = J; > > > > ierr = > > > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > > ierr = MatRegisterDAAD();CHKERRQ(ierr); > > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > > ------------------------------------------------------ > > > > I included the head files > > petscsnes.h petscda.h > > > > When I compile it, I got the following linking error: > > > > ld: Undefined symbols: > > _MatCreateDAAD > > _MatDAADSetCtx > > _MatDAADSetSNES > > _MatRegisterDAAD > > make: [paraImplicitV1] Error 1 (ignored) > > > > Not sure what went wrong. > > > > Jianing > > > > > > > -- > "Failure has a thousand explanations. Success doesn't need one" > -- Sir > Alec Guiness > > From knepley at gmail.com Sat Dec 9 11:49:29 2006 From: knepley at gmail.com (Matthew Knepley) Date: Sat, 9 Dec 2006 11:49:29 -0600 Subject: DA Jacobian In-Reply-To: <1165686303.457af61f9511c@cubmail.cc.columbia.edu> References: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> <1165686303.457af61f9511c@cubmail.cc.columbia.edu> Message-ID: ADIC is not able to be freely distributed. You must contact the developers. Matt On 12/9/06, Jianing Shi wrote: > I just added PETSC_HAVE_ADIC, and seems that the compiler does not > complain any more. > > #if defined(PETSC_HAVE_ADIC) > if (adicmf_jacobian) > { > ierr = > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > ierr = MatRegisterDAAD();CHKERRQ(ierr); > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > } > #endif > > Though what is the trick if I really want to use ADIC? > > Jianing > > Quoting Matthew Knepley : > > > Are you really using ADIC? > > > > Matt > > > > On 12/9/06, Jianing Shi wrote: > > > I have a question about creating the jacobian here. > > > Here is the code I use to create it. > > > > > > ------------------------------------------------------- > > > ierr = DAGetMatrix(user.da,MATAIJ,&J);CHKERRQ(ierr); > > > A = J; > > > > > > ierr = > > > > > > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > > > ierr = MatRegisterDAAD();CHKERRQ(ierr); > > > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > > > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > > > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > > > ------------------------------------------------------ > > > > > > I included the head files > > > petscsnes.h petscda.h > > > > > > When I compile it, I got the following linking error: > > > > > > ld: Undefined symbols: > > > _MatCreateDAAD > > > _MatDAADSetCtx > > > _MatDAADSetSNES > > > _MatRegisterDAAD > > > make: [paraImplicitV1] Error 1 (ignored) > > > > > > Not sure what went wrong. > > > > > > Jianing > > > > > > > > > > > > -- > > "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 js2615 at columbia.edu Sun Dec 10 19:57:46 2006 From: js2615 at columbia.edu (Jianing Shi) Date: Sun, 10 Dec 2006 20:57:46 -0500 Subject: DA Jacobian In-Reply-To: <37604ab40612101620o2a4984b5hc6fb541a4ea38a8a@mail.gmail.com> References: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> <1165686303.457af61f9511c@cubmail.cc.columbia.edu> <37604ab40612101620o2a4984b5hc6fb541a4ea38a8a@mail.gmail.com> Message-ID: <1165802266.457cbb1a5dffc@cubmail.cc.columbia.edu> Hi Aron, I have gone through the spatial kernel part, which was indeed a dense matrix on the local communicator. Here for the ADIC, I try to create the Jacobian for the SNES solver. Though Matt told me that ADIC is an advanced functional in the developers' version. Jianing Quoting Aron Ahmadia : > Hi Jianing, > > You are not using ADIC, this isn't the type of matrix you want to > create. You want a dense matrix on the local communicator, not a > DAAD > matrix. > > ~Aron > > On 12/9/06, Jianing Shi wrote: > > I just added PETSC_HAVE_ADIC, and seems that the compiler does > not > > complain any more. > > > > #if defined(PETSC_HAVE_ADIC) > > if (adicmf_jacobian) > > { > > ierr = > > > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > > ierr = MatRegisterDAAD();CHKERRQ(ierr); > > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > > } > > #endif > > > > Though what is the trick if I really want to use ADIC? > > > > Jianing > > > > Quoting Matthew Knepley : > > > > > Are you really using ADIC? > > > > > > Matt > > > > > > On 12/9/06, Jianing Shi wrote: > > > > I have a question about creating the jacobian here. > > > > Here is the code I use to create it. > > > > > > > > ------------------------------------------------------- > > > > ierr = DAGetMatrix(user.da,MATAIJ,&J);CHKERRQ(ierr); > > > > A = J; > > > > > > > > ierr = > > > > > > > > > > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > > > > ierr = MatRegisterDAAD();CHKERRQ(ierr); > > > > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > > > > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > > > > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > > > > ------------------------------------------------------ > > > > > > > > I included the head files > > > > petscsnes.h petscda.h > > > > > > > > When I compile it, I got the following linking error: > > > > > > > > ld: Undefined symbols: > > > > _MatCreateDAAD > > > > _MatDAADSetCtx > > > > _MatDAADSetSNES > > > > _MatRegisterDAAD > > > > make: [paraImplicitV1] Error 1 (ignored) > > > > > > > > Not sure what went wrong. > > > > > > > > Jianing > > > > > > > > > > > > > > > > > -- > > > "Failure has a thousand explanations. Success doesn't need > one" > > > -- Sir > > > Alec Guiness > > > > > > > > > > > > > From aja2111 at columbia.edu Sun Dec 10 18:20:44 2006 From: aja2111 at columbia.edu (Aron Ahmadia) Date: Sun, 10 Dec 2006 19:20:44 -0500 Subject: DA Jacobian In-Reply-To: <1165686303.457af61f9511c@cubmail.cc.columbia.edu> References: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> <1165686303.457af61f9511c@cubmail.cc.columbia.edu> Message-ID: <37604ab40612101620o2a4984b5hc6fb541a4ea38a8a@mail.gmail.com> Hi Jianing, You are not using ADIC, this isn't the type of matrix you want to create. You want a dense matrix on the local communicator, not a DAAD matrix. ~~Aron On 12/9/06, Jianing Shi wrote: > I just added PETSC_HAVE_ADIC, and seems that the compiler does not > complain any more. > > #if defined(PETSC_HAVE_ADIC) > if (adicmf_jacobian) > { > ierr = > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > ierr = MatRegisterDAAD();CHKERRQ(ierr); > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > } > #endif > > Though what is the trick if I really want to use ADIC? > > Jianing > > Quoting Matthew Knepley : > > > Are you really using ADIC? > > > > Matt > > > > On 12/9/06, Jianing Shi wrote: > > > I have a question about creating the jacobian here. > > > Here is the code I use to create it. > > > > > > ------------------------------------------------------- > > > ierr = DAGetMatrix(user.da,MATAIJ,&J);CHKERRQ(ierr); > > > A = J; > > > > > > ierr = > > > > > > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > > > ierr = MatRegisterDAAD();CHKERRQ(ierr); > > > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > > > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > > > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > > > ------------------------------------------------------ > > > > > > I included the head files > > > petscsnes.h petscda.h > > > > > > When I compile it, I got the following linking error: > > > > > > ld: Undefined symbols: > > > _MatCreateDAAD > > > _MatDAADSetCtx > > > _MatDAADSetSNES > > > _MatRegisterDAAD > > > make: [paraImplicitV1] Error 1 (ignored) > > > > > > Not sure what went wrong. > > > > > > Jianing > > > > > > > > > > > > -- > > "Failure has a thousand explanations. Success doesn't need one" > > -- Sir > > Alec Guiness > > > > > > > From aja2111 at columbia.edu Sun Dec 10 21:16:13 2006 From: aja2111 at columbia.edu (Aron Ahmadia) Date: Sun, 10 Dec 2006 22:16:13 -0500 Subject: DA Jacobian In-Reply-To: <1165802266.457cbb1a5dffc@cubmail.cc.columbia.edu> References: <1165647813.457a5fc59350e@cubmail.cc.columbia.edu> <1165686303.457af61f9511c@cubmail.cc.columbia.edu> <37604ab40612101620o2a4984b5hc6fb541a4ea38a8a@mail.gmail.com> <1165802266.457cbb1a5dffc@cubmail.cc.columbia.edu> Message-ID: <37604ab40612101916y5fd93fb4hd13cbead6c5248dc@mail.gmail.com> Dear Jianing, You shouldn't be trying to use ADIC, period. I suggest you try a Jacobian-free method for now (don't set a function for determining the SNES solver's Jacobian) and let PETSc handle this for you. ~~A On 12/10/06, Jianing Shi wrote: > Hi Aron, > > I have gone through the spatial kernel part, which was indeed a > dense matrix on the local communicator. Here for the ADIC, I try > to create the Jacobian for the SNES solver. Though Matt told me > that ADIC is an advanced functional in the developers' version. > > Jianing > > Quoting Aron Ahmadia : > > > Hi Jianing, > > > > You are not using ADIC, this isn't the type of matrix you want to > > create. You want a dense matrix on the local communicator, not a > > DAAD > > matrix. > > > > ~Aron > > > > On 12/9/06, Jianing Shi wrote: > > > I just added PETSC_HAVE_ADIC, and seems that the compiler does > > not > > > complain any more. > > > > > > #if defined(PETSC_HAVE_ADIC) > > > if (adicmf_jacobian) > > > { > > > ierr = > > > > > > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > > > ierr = MatRegisterDAAD();CHKERRQ(ierr); > > > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > > > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > > > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > > > } > > > #endif > > > > > > Though what is the trick if I really want to use ADIC? > > > > > > Jianing > > > > > > Quoting Matthew Knepley : > > > > > > > Are you really using ADIC? > > > > > > > > Matt > > > > > > > > On 12/9/06, Jianing Shi wrote: > > > > > I have a question about creating the jacobian here. > > > > > Here is the code I use to create it. > > > > > > > > > > ------------------------------------------------------- > > > > > ierr = DAGetMatrix(user.da,MATAIJ,&J);CHKERRQ(ierr); > > > > > A = J; > > > > > > > > > > ierr = > > > > > > > > > > > > > > > DASetLocalAdicMFFunction(user.da,admf_FormFunctionLocal);CHKERRQ(ierr); > > > > > ierr = MatRegisterDAAD();CHKERRQ(ierr); > > > > > ierr = MatCreateDAAD(user.da,&A);CHKERRQ(ierr); > > > > > ierr = MatDAADSetSNES(A,snes);CHKERRQ(ierr); > > > > > ierr = MatDAADSetCtx(A,&user);CHKERRQ(ierr); > > > > > ------------------------------------------------------ > > > > > > > > > > I included the head files > > > > > petscsnes.h petscda.h > > > > > > > > > > When I compile it, I got the following linking error: > > > > > > > > > > ld: Undefined symbols: > > > > > _MatCreateDAAD > > > > > _MatDAADSetCtx > > > > > _MatDAADSetSNES > > > > > _MatRegisterDAAD > > > > > make: [paraImplicitV1] Error 1 (ignored) > > > > > > > > > > Not sure what went wrong. > > > > > > > > > > Jianing > > > > > > > > > > > > > > > > > > > > > > -- > > > > "Failure has a thousand explanations. Success doesn't need > > one" > > > > -- Sir > > > > Alec Guiness > > > > > > > > > > > > > > > > > > > > > > From zonexo at gmail.com Mon Dec 11 04:23:22 2006 From: zonexo at gmail.com (Ben Tay) Date: Mon, 11 Dec 2006 18:23:22 +0800 Subject: Configuration crash - can't start new thread In-Reply-To: References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> <804ab5d40612070242o6cacbd95m629fdc8dfc2f87ec@mail.gmail.com> Message-ID: <804ab5d40612110223m7937b928l26993dec96381a34@mail.gmail.com> Hi Satish, Can you explain a bit how to change the RDict.py? I don't understand what you mean. Thank you. On 12/7/06, Satish Balay wrote: > > On Thu, 7 Dec 2006, Satish Balay wrote: > > > I'll sugest using a different machine for install. > > Can you try the following change to python/BuildSystem/RDict.py - and > then run configure with the option '--useThreads=0' - and see if it > works? > > Satish > ------------------------------------------------ > > diff -r e6686438867b90e62e969d5f96189924d4bd27f2 RDict.py > --- a/RDict.py Thu Dec 07 09:09:11 2006 -0600 > +++ b/RDict.py Thu Dec 07 09:09:36 2006 -0600 > @@ -624,6 +624,7 @@ Arg class, which wraps the usual value.' > def save(self, force = 0): > '''Save the dictionary after 5 seconds, ignoring all subsequent calls > until the save > - Giving force = True will cause an immediate save''' > + return 0 > if force: > self.saveTimer = None > # This should be a critical section > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.bathfield at chalmers.se Mon Dec 11 06:58:50 2006 From: nicolas.bathfield at chalmers.se (Nicolas Bathfield) Date: Mon, 11 Dec 2006 13:58:50 +0100 (CET) Subject: dmmg residuals and AMG In-Reply-To: <6732.193.183.3.2.1165840605.squirrel@webmail.chalmers.se> References: <6732.193.183.3.2.1165840605.squirrel@webmail.chalmers.se> Message-ID: <8943.193.183.3.2.1165841930.squirrel@webmail.chalmers.se> Hi, I would like to compare PETSc DMMG convergence to some theoretical convergence rate given by local Fourier analysis for a simple diffusion problem. To do so, I need to extract the residuals after each multigrid iteration. Unfortunately, I only managed to obtain the residuals at the last iteration. Is it possible to get the residual printed out after each multigrid iteration without modifying the source code? Furthermore, I'd like to test the AMG from the PC type from HYPRE (boomeramg). I have already ran --download-hypre while compiling petsc. Is there any example available somewhere? Best regards, Nicolas. -- Nicolas BATHFIELD Chalmers University of Technology Shipping and Marine Technology phone: +46 (0)31 772 1476 fax: +46 (0)31 772 3699 From bsmith at mcs.anl.gov Mon Dec 11 07:53:20 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Mon, 11 Dec 2006 07:53:20 -0600 (CST) Subject: dmmg residuals and AMG In-Reply-To: <8943.193.183.3.2.1165841930.squirrel@webmail.chalmers.se> References: <6732.193.183.3.2.1165840605.squirrel@webmail.chalmers.se> <8943.193.183.3.2.1165841930.squirrel@webmail.chalmers.se> Message-ID: On Mon, 11 Dec 2006, Nicolas Bathfield wrote: > Hi, > > I would like to compare PETSc DMMG convergence to some theoretical > convergence rate given by local Fourier analysis for a simple diffusion > problem. > To do so, I need to extract the residuals after each multigrid iteration. > Unfortunately, I only managed to obtain the residuals at the last iteration. > Is it possible to get the residual printed out after each multigrid > iteration without modifying the source code? Nicolas, -dmmg_ksp_monitor prints the residual after each V/W cycle. -pc_mg_monitor prints the residual norm before and after each smoothing step. BTW: always run with -ksp_view to see exactly what solver options are being used. The defaults are non-standard (e.g. we default to having a Krylov solver turned on for each smoother and the V/W cycle). > > Furthermore, I'd like to test the AMG from the PC type from HYPRE > (boomeramg). I have already ran --download-hypre while compiling petsc. Is > there any example available somewhere? -pc_type hypre -pc_hypre_type boomeramg Run with -help to see the boomeramg options; again use -ksp_view we default to accelerating boomeramg with GMRES which is non-standard. Use -ksp_type richardson to get the usual V/W cycle. Good luck, Barry Why the non-standard defaults? We want to provide a default MG that is as robust (more likely to converge) as possible. Hence we turn on ILU(0) smoothing with GMRES acceleration of the smoother and Krylov method. You can turn off these options one at a time to see the effect on the convergence rate. For model problems the accelerators only improve convergence a little. For more complex problems, for example src/snes/examples/tutorials/ex19.c convergence gets much worse without the accelerators. > > Best regards, > > Nicolas. > -- > Nicolas BATHFIELD > Chalmers University of Technology > Shipping and Marine Technology > phone: +46 (0)31 772 1476 > fax: +46 (0)31 772 3699 > > From balay at mcs.anl.gov Tue Dec 12 17:51:23 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Tue, 12 Dec 2006 17:51:23 -0600 (CST) Subject: Configuration crash - can't start new thread In-Reply-To: <804ab5d40612110223m7937b928l26993dec96381a34@mail.gmail.com> References: <804ab5d40612050626i4a8c9812s96514256b87ac858@mail.gmail.com> <804ab5d40612050805q7d2a488dy66cd3a3e534d6b47@mail.gmail.com> <804ab5d40612051736s5f9602adtc9a68db4c4e4b962@mail.gmail.com> <804ab5d40612070242o6cacbd95m629fdc8dfc2f87ec@mail.gmail.com> <804ab5d40612110223m7937b928l26993dec96381a34@mail.gmail.com> Message-ID: The diff means: - edit python/BuildSystem/RDict.py - add the follwoing line return 0 before the code: if force: Satish On Mon, 11 Dec 2006, Ben Tay wrote: > Hi Satish, > > Can you explain a bit how to change the RDict.py? I don't understand what > you mean. > > Thank you. > > > On 12/7/06, Satish Balay wrote: > > > > On Thu, 7 Dec 2006, Satish Balay wrote: > > > > > I'll sugest using a different machine for install. > > > > Can you try the following change to python/BuildSystem/RDict.py - and > > then run configure with the option '--useThreads=0' - and see if it > > works? > > > > Satish > > ------------------------------------------------ > > > > diff -r e6686438867b90e62e969d5f96189924d4bd27f2 RDict.py > > --- a/RDict.py Thu Dec 07 09:09:11 2006 -0600 > > +++ b/RDict.py Thu Dec 07 09:09:36 2006 -0600 > > @@ -624,6 +624,7 @@ Arg class, which wraps the usual value.' > > def save(self, force = 0): > > '''Save the dictionary after 5 seconds, ignoring all subsequent calls > > until the save > > - Giving force = True will cause an immediate save''' > > + return 0 > > if force: > > self.saveTimer = None > > # This should be a critical section > > > > > > > From zonexo at gmail.com Wed Dec 13 02:34:19 2006 From: zonexo at gmail.com (Ben Tay) Date: Wed, 13 Dec 2006 16:34:19 +0800 Subject: Problem with mpi Message-ID: <804ab5d40612130034t271cfe76kc4c07fb7068c7618@mail.gmail.com> Hi, I have some problems with using mpi. My code works with one server but when I test it on another system, I get the wrong answers. In that system, the mpi is located at /usr/local/topspin/mpi/mpich/. I tried to specify it with --with-mpi-dir but it wasn't able to find during config. I then add --with-mpirun=/usr/local/topspin/mpi/mpich/bin/mpirun_ssh and it compiled but wrong answers when run. May I know what file does it look for if --with-mpi-lib is used? My lib64 directory has libfmpich.a libfmpich_p.a libmpich.a libmpichf90nc_i.a libmpichf90nc_p.so libmpichfsup.a libmpichfsup_p.a libmpich_i.a libmpich_p.so libpmpich++.so libfmpich_i.a libfmpich_p.so libmpichf90_i.a libmpichf90nc_i.so libmpichf90_p.a libmpichfsup_i.a libmpichfsup_p.so libmpich_i.so libmpich.so libfmpich_i.so libfmpich.so libmpichf90_i.so libmpichf90nc_p.a libmpichf90_p.so libmpichfsup_i.so libmpichfsup.so libmpich_p.a libpmpich++.a I then tried to use --download-mpich=yes but the error msg is ********************************************************************************* UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): --------------------------------------------------------------------------------------- Error running configure on MPICH: Could not execute 'cd /nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1;./configure --prefix=/nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1/linux64-mpi-shared CC="icc -fPIC -g " --disable-cxx F90="ifort -fPIC -g " F77="ifort -fPIC -g " --enable-sharedlibs=libtool --without-mpe --with-pm=gforker': Configuring MPICH2 version 1.0.4p1 with '--prefix=/nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2- 1.0.4p1/linux64-mpi-shared' 'CC=icc -fPIC -g ' '--disable-cxx' 'F90=ifort -fPIC -g ' 'F77=ifort -fPIC -g ' '--enable-sharedlibs=libtool' '--without-mpe' '--with-pm=gforker' Executing mpich2prereq in /nfs/lsftmp/g0306332/petsc-2.3.2-p7 /externalpackages/mpich2-1.0.4p1/src/mpid/ch3 with Executing mpich2prereq in /nfs/lsftmp/g0306332/petsc-2.3.2-p7 /externalpackages/mpich2-1.0.4p1/src/mpid/ch3/channels/sock sourcing /nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1 /src/pm/gforker/mpich2prereq checking for gcc... icc -fPIC -g checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether icc -fPIC -g accepts -g... yes checking for icc -fPIC -g option to accept ANSI C... none needed checking for type of weak symbol support... pragma weak checking whether __attribute__ ((weak)) allowed... yes checking for multiple weak symbol support... yes checking whether we are using the GNU Fortran 77 compiler... no checking whether ifort -fPIC -g accepts -g... yes checking how to get verbose linking output from ifort -fPIC -g ... -v checking for Fortran libraries of ifort -fPIC -g ... -L/usr/local/intel/fc9.0/lib -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml -lifport -lifcore -limf -lm -lirc -lgcc_s -lirc_s checking whether C can link with -L/usr/local/intel/fc9.0/lib -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml -lifport -lifcore -limf -lm -lirc -lgcc_s -lirc_s... yes checking for linker for Fortran main programs... Use Fortran to link programs checking for Fortran 77 name mangling... lower underscore checking that f works as the extension for Fortran 90 program... yes checking whether we are using the GNU Fortran 90 compiler... no checking whether ifort -fPIC -g accepts -g... yes checking for extension for Fortran 90 programs... f90 checking whether the Fortran 90 compiler (ifort -fPIC -g ) works... yes checking whether the Fortran 90 compiler (ifort -fPIC -g ) is a cross-compiler... no checking whether Fortran 90 works with Fortran 77... yes checking whether Fortran accepts ! for comments... yes checking for include directory flag for Fortran... -I checking for Fortran 77 flag for library directories... -L checking for which Fortran libraries are needed to link C with Fortran... none checking whether Fortran compiler processes .F files with C preprocessor... yes checking that f works as the extension for Fortran 90 program... yes checking whether we are using the GNU Fortran 90 compiler... (cached) no checking whether ifort -fPIC -g accepts -g... (cached) yes checking for extension for Fortran 90 programs... f90 checking whether the Fortran 90 compiler (ifort -fPIC -g ) works... yes checking whether the Fortran 90 compiler (ifort -fPIC -g ) is a cross-compiler... no checking for Fortran 90 module extension... mod checking for Fortran 90 module include flag... -I checking whether Fortran 90 accepts f90 suffix... yes checking whether Fortran 90 compiler processes .F90 files with C preprocessor... yes checking for f90 compiler vendor... intel checking for perl... /usr/bin/perl checking for ar... ar checking for ranlib... ranlib checking for etags... etags checking for etags argument to specify language... --language=c checking whether global variables handled properly... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether install works... yes checking whether install breaks libraries... no checking whether mkdir -p works... yes checking for make... make checking whether clock skew breaks make... no checking whether make supports include... yes checking whether make allows comments in actions... yes checking for virtual path format... VPATH checking whether make sets CFLAGS... no checking for bash... /bin/sh checking whether /bin/sh supports arrays... yes configure: error: Creating shared libraries using libtool not yet supported ********************************************************************************* May I know what's wrong? Thank you. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Wed Dec 13 08:22:04 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 13 Dec 2006 08:22:04 -0600 (CST) Subject: Problem with mpi In-Reply-To: <804ab5d40612130034t271cfe76kc4c07fb7068c7618@mail.gmail.com> References: <804ab5d40612130034t271cfe76kc4c07fb7068c7618@mail.gmail.com> Message-ID: On Wed, 13 Dec 2006, Ben Tay wrote: > Hi, > > I have some problems with using mpi. My code works with one server but when > I test it on another system, I get the wrong answers. In that system, the > mpi is located at /usr/local/topspin/mpi/mpich/. I tried to specify it with > --with-mpi-dir but it wasn't able to find during config. I then add > --with-mpirun=/usr/local/topspin/mpi/mpich/bin/mpirun_ssh and it > compiled but wrong answers when run. ^^^^^^^^^^^ This could mean anything. What do you mean by wrong answers? Slightly different answers? Hugely different answers? Crashes? > May I know what file does it look for > if --with-mpi-lib is used? My lib64 directory has > > libfmpich.a libfmpich_p.a libmpich.a libmpichf90nc_i.a > libmpichf90nc_p.so libmpichfsup.a libmpichfsup_p.a libmpich_i.a > libmpich_p.so libpmpich++.so > libfmpich_i.a libfmpich_p.so libmpichf90_i.a libmpichf90nc_i.so > libmpichf90_p.a libmpichfsup_i.a libmpichfsup_p.so libmpich_i.so > libmpich.so > libfmpich_i.so libfmpich.so libmpichf90_i.so libmpichf90nc_p.a > libmpichf90_p.so libmpichfsup_i.so libmpichfsup.so libmpich_p.a > libpmpich++.a > > > I then tried to use --download-mpich=yes but the error msg is > > ********************************************************************************* > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > details): > --------------------------------------------------------------------------------------- > Error running configure on MPICH: Could not execute 'cd > /nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1;./configure > --prefix=/nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1/linux64-mpi-shared > CC="icc -fPIC -g " --disable-cxx F90="ifort -fPIC -g " F77="ifort -fPIC > -g " --enable-sharedlibs=libtool --without-mpe --with-pm=gforker': > Configuring MPICH2 version 1.0.4p1 with > '--prefix=/nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2- > 1.0.4p1/linux64-mpi-shared' 'CC=icc -fPIC -g ' '--disable-cxx' 'F90=ifort > -fPIC -g ' 'F77=ifort -fPIC -g ' '--enable-sharedlibs=libtool' > '--without-mpe' '--with-pm=gforker' > Executing mpich2prereq in /nfs/lsftmp/g0306332/petsc-2.3.2-p7 > /externalpackages/mpich2-1.0.4p1/src/mpid/ch3 with > Executing mpich2prereq in /nfs/lsftmp/g0306332/petsc-2.3.2-p7 > /externalpackages/mpich2-1.0.4p1/src/mpid/ch3/channels/sock > sourcing /nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1 > /src/pm/gforker/mpich2prereq > checking for gcc... icc -fPIC -g > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether icc -fPIC -g accepts -g... yes > checking for icc -fPIC -g option to accept ANSI C... none needed > checking for type of weak symbol support... pragma weak > checking whether __attribute__ ((weak)) allowed... yes > checking for multiple weak symbol support... yes > checking whether we are using the GNU Fortran 77 compiler... no > checking whether ifort -fPIC -g accepts -g... yes > checking how to get verbose linking output from ifort -fPIC -g ... -v > checking for Fortran libraries of ifort -fPIC -g ... > -L/usr/local/intel/fc9.0/lib -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ > -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml -lifport > -lifcore -limf -lm -lirc -lgcc_s -lirc_s > checking whether C can link with -L/usr/local/intel/fc9.0/lib > -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ > -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml -lifport > -lifcore -limf -lm -lirc -lgcc_s -lirc_s... yes > checking for linker for Fortran main programs... Use Fortran to link > programs > checking for Fortran 77 name mangling... lower underscore > checking that f works as the extension for Fortran 90 program... yes > checking whether we are using the GNU Fortran 90 compiler... no > checking whether ifort -fPIC -g accepts -g... yes > checking for extension for Fortran 90 programs... f90 > checking whether the Fortran 90 compiler (ifort -fPIC -g ) works... yes > checking whether the Fortran 90 compiler (ifort -fPIC -g ) is a > cross-compiler... no > checking whether Fortran 90 works with Fortran 77... yes > checking whether Fortran accepts ! for comments... yes > checking for include directory flag for Fortran... -I > checking for Fortran 77 flag for library directories... -L > checking for which Fortran libraries are needed to link C with Fortran... > none > checking whether Fortran compiler processes .F files with C preprocessor... > yes > checking that f works as the extension for Fortran 90 program... yes > checking whether we are using the GNU Fortran 90 compiler... (cached) no > checking whether ifort -fPIC -g accepts -g... (cached) yes > checking for extension for Fortran 90 programs... f90 > checking whether the Fortran 90 compiler (ifort -fPIC -g ) works... yes > checking whether the Fortran 90 compiler (ifort -fPIC -g ) is a > cross-compiler... no > checking for Fortran 90 module extension... mod > checking for Fortran 90 module include flag... -I > checking whether Fortran 90 accepts f90 suffix... yes > checking whether Fortran 90 compiler processes .F90 files with C > preprocessor... yes > checking for f90 compiler vendor... intel > checking for perl... /usr/bin/perl > checking for ar... ar > checking for ranlib... ranlib > checking for etags... etags > checking for etags argument to specify language... --language=c > checking whether global variables handled properly... yes > checking for a BSD-compatible install... /usr/bin/install -c > checking whether install works... yes > checking whether install breaks libraries... no > checking whether mkdir -p works... yes > checking for make... make > checking whether clock skew breaks make... no > checking whether make supports include... yes > checking whether make allows comments in actions... yes > checking for virtual path format... VPATH > checking whether make sets CFLAGS... no > checking for bash... /bin/sh > checking whether /bin/sh supports arrays... yes > configure: error: Creating shared libraries using libtool not yet supported > ********************************************************************************* > > May I know what's wrong? > > Thank you. > > Regards > From nicolas.bathfield at chalmers.se Wed Dec 13 08:39:00 2006 From: nicolas.bathfield at chalmers.se (Nicolas Bathfield) Date: Wed, 13 Dec 2006 15:39:00 +0100 (CET) Subject: dmmg residuals and AMG In-Reply-To: References: <6732.193.183.3.2.1165840605.squirrel@webmail.chalmers.se> <8943.193.183.3.2.1165841930.squirrel@webmail.chalmers.se> Message-ID: <34904.129.16.81.46.1166020740.squirrel@webmail.chalmers.se> Dear Barry and Petsc users, I dig into the code to understand a bit better the output from the options -ksp_view -dmmg_ksp_monitor, but I am still confused (There is a printout of ksp/ksp/example/tutorial/ex29.c slightly modified below). What does the first index (0,1,2 or 3)in front of KSP residual represent? -ksp_view gives: MG: type is FULL, levels=3 cycles=1, pre-smooths=1, post-smooths=1; Does that really mean that I perform only 1 multigrid cycle? How can I control the number of cycles and the convergence criteria? Thanks for your help. Best regards, Nicolas. 0 KSP Residual norm 1.421285957034e-02 1 KSP Residual norm 1.609288367464e-03 0 KSP Residual norm 2.699978999993e-01 1 KSP Residual norm 3.406567948849e-02 0 KSP Residual norm 2.101495954238e-02 1 KSP Residual norm 1.846013302069e-03 0 KSP Residual norm 8.326606206788e-04 1 KSP Residual norm 4.344001727320e-05 0 KSP Residual norm 1.577985727128e-02 1 KSP Residual norm 1.969730522207e-03 1 KSP Residual norm 2.116914409872e-02 0 KSP Residual norm 1.029801283683e-01 1 KSP Residual norm 7.594550723847e-03 0 KSP Residual norm 7.254183286194e-03 1 KSP Residual norm 6.000261158570e-04 0 KSP Residual norm 2.966998198077e-01 1 KSP Residual norm 5.201133083048e-02 0 KSP Residual norm 3.786415700595e-02 1 KSP Residual norm 3.901313528873e-03 0 KSP Residual norm 3.502275405186e-03 1 KSP Residual norm 2.803439371866e-04 0 KSP Residual norm 2.150042336470e-02 1 KSP Residual norm 3.280472811048e-03 2 KSP Residual norm 1.206584038156e-04 0 KSP Residual norm 1.010495676349e-01 1 KSP Residual norm 5.373641377818e-03 0 KSP Residual norm 3.177241089754e-03 1 KSP Residual norm 2.956553309307e-04 0 KSP Residual norm 2.439978649540e-01 1 KSP Residual norm 2.775398636052e-02 0 KSP Residual norm 2.197619585488e-02 1 KSP Residual norm 1.465557162804e-03 0 KSP Residual norm 1.119259726469e-03 1 KSP Residual norm 6.758059074616e-05 0 KSP Residual norm 1.390217147343e-02 1 KSP Residual norm 1.994861880977e-03 3 KSP Residual norm 5.385911324388e-07 KSP Object: type: fgmres GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement GMRES: happy breakdown tolerance 1e-30 maximum iterations=10000, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000 right preconditioning PC Object: type: mg MG: type is FULL, levels=3 cycles=1, pre-smooths=1, post-smooths=1 Coarse gride solver -- level 0 ------------------------------- KSP Object:(mg_coarse_) type: preonly maximum iterations=1, initial guess is zero tolerances: relative=1e-05, absolute=1e-50, divergence=10000 left preconditioning PC Object:(mg_coarse_) type: lu LU: out-of-place factorization matrix ordering: nd LU: tolerance for zero pivot 1e-12 LU: factor fill ratio needed 1.54545 Factored matrix follows Matrix Object: type=seqaij, rows=9, cols=9 total: nonzeros=51, allocated nonzeros=51 not using I-node routines linear system matrix = precond matrix: Matrix Object: type=seqaij, rows=9, cols=9 total: nonzeros=33, allocated nonzeros=33 not using I-node routines > > > On Mon, 11 Dec 2006, Nicolas Bathfield wrote: > >> Hi, >> >> I would like to compare PETSc DMMG convergence to some theoretical >> convergence rate given by local Fourier analysis for a simple diffusion >> problem. >> To do so, I need to extract the residuals after each multigrid >> iteration. >> Unfortunately, I only managed to obtain the residuals at the last >> iteration. >> Is it possible to get the residual printed out after each multigrid >> iteration without modifying the source code? > > Nicolas, > > -dmmg_ksp_monitor prints the residual after each V/W cycle. > -pc_mg_monitor > prints the residual norm before and after each smoothing step. > > BTW: always run with -ksp_view to see exactly what solver options > are being used. The defaults are non-standard (e.g. we default to having a > Krylov solver turned on for each smoother and the V/W cycle). > > >> >> Furthermore, I'd like to test the AMG from the PC type from HYPRE >> (boomeramg). I have already ran --download-hypre while compiling petsc. >> Is >> there any example available somewhere? > > -pc_type hypre -pc_hypre_type boomeramg > > Run with -help to see the boomeramg options; again use -ksp_view we > default > to accelerating boomeramg with GMRES which is non-standard. Use -ksp_type > richardson > to get the usual V/W cycle. > > Good luck, > > Barry > > Why the non-standard defaults? We want to provide a default MG that is as > robust > (more likely to converge) as possible. Hence we turn on ILU(0) smoothing > with GMRES > acceleration of the smoother and Krylov method. You can turn off these > options one > at a time to see the effect on the convergence rate. For model problems > the accelerators > only improve convergence a little. For more complex problems, for example > src/snes/examples/tutorials/ex19.c > convergence gets much worse without the accelerators. > >> >> Best regards, >> >> Nicolas. >> -- >> Nicolas BATHFIELD >> Chalmers University of Technology >> Shipping and Marine Technology >> phone: +46 (0)31 772 1476 >> fax: +46 (0)31 772 3699 >> >> > > -- Nicolas BATHFIELD Chalmers University of Technology Shipping and Marine Technology phone: +46 (0)31 772 1476 fax: +46 (0)31 772 3699 From zonexo at gmail.com Wed Dec 13 08:59:52 2006 From: zonexo at gmail.com (Ben Tay) Date: Wed, 13 Dec 2006 22:59:52 +0800 Subject: Problem with mpi In-Reply-To: References: <804ab5d40612130034t271cfe76kc4c07fb7068c7618@mail.gmail.com> Message-ID: <804ab5d40612130659o282f775fp7b75a0b414989ed7@mail.gmail.com> Hi, I can get some answers but they'r all of the wrong values. I'm basically using a sample code to solve the poisson eqn by reading the A matrix and b (rhs) from files. Then the answers (x) are written on a file to check. Using another system (ia32 xeon), I got the correct ans. But using this server (em64t xeon), I've got the ans but this time, they'r all wrong, although they'r still finite e.g. 3.68e-2 compared to 1.56e2 I used ifort,icc 9,intel mkl 8 or blas. the previous sys uses the same software, except that it's ia32. Of cos, the mpi software is also different. Hence I wonder if the correct lib file is used. Thanks. On 12/13/06, Barry Smith wrote: > > > > On Wed, 13 Dec 2006, Ben Tay wrote: > > > Hi, > > > > I have some problems with using mpi. My code works with one server but > when > > I test it on another system, I get the wrong answers. In that system, > the > > mpi is located at /usr/local/topspin/mpi/mpich/. I tried to specify it > with > > --with-mpi-dir but it wasn't able to find during config. I then add > > --with-mpirun=/usr/local/topspin/mpi/mpich/bin/mpirun_ssh and it > > compiled but wrong answers when run. > ^^^^^^^^^^^ > > This could mean anything. What do you mean by wrong answers? Slightly > different answers? Hugely different answers? Crashes? > > > > > > > May I know what file does it look for > > if --with-mpi-lib is used? My lib64 directory has > > > > libfmpich.a libfmpich_p.a libmpich.a libmpichf90nc_i.a > > libmpichf90nc_p.so libmpichfsup.a libmpichfsup_p.a libmpich_i.a > > libmpich_p.so libpmpich++.so > > libfmpich_i.a libfmpich_p.so libmpichf90_i.a libmpichf90nc_i.so > > libmpichf90_p.a libmpichfsup_i.a libmpichfsup_p.so libmpich_i.so > > libmpich.so > > libfmpich_i.so libfmpich.so libmpichf90_i.so libmpichf90nc_p.a > > libmpichf90_p.so libmpichfsup_i.so libmpichfsup.so libmpich_p.a > > libpmpich++.a > > > > > > I then tried to use --download-mpich=yes but the error msg is > > > > > ********************************************************************************* > > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > > details): > > > --------------------------------------------------------------------------------------- > > Error running configure on MPICH: Could not execute 'cd > > /nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2-1.0.4p1 > ;./configure > > --prefix=/nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2- > 1.0.4p1/linux64-mpi-shared > > CC="icc -fPIC -g " --disable-cxx F90="ifort -fPIC -g " > F77="ifort -fPIC > > -g " --enable-sharedlibs=libtool --without-mpe --with-pm=gforker': > > Configuring MPICH2 version 1.0.4p1 with > > '--prefix=/nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2- > > 1.0.4p1/linux64-mpi-shared' 'CC=icc -fPIC -g ' '--disable-cxx' > 'F90=ifort > > -fPIC -g ' 'F77=ifort -fPIC -g ' '--enable-sharedlibs=libtool' > > '--without-mpe' '--with-pm=gforker' > > Executing mpich2prereq in /nfs/lsftmp/g0306332/petsc-2.3.2-p7 > > /externalpackages/mpich2-1.0.4p1/src/mpid/ch3 with > > Executing mpich2prereq in /nfs/lsftmp/g0306332/petsc-2.3.2-p7 > > /externalpackages/mpich2-1.0.4p1/src/mpid/ch3/channels/sock > > sourcing /nfs/lsftmp/g0306332/petsc-2.3.2-p7/externalpackages/mpich2- > 1.0.4p1 > > /src/pm/gforker/mpich2prereq > > checking for gcc... icc -fPIC -g > > checking for C compiler default output file name... a.out > > checking whether the C compiler works... yes > > checking whether we are cross compiling... no > > checking for suffix of executables... > > checking for suffix of object files... o > > checking whether we are using the GNU C compiler... yes > > checking whether icc -fPIC -g accepts -g... yes > > checking for icc -fPIC -g option to accept ANSI C... none needed > > checking for type of weak symbol support... pragma weak > > checking whether __attribute__ ((weak)) allowed... yes > > checking for multiple weak symbol support... yes > > checking whether we are using the GNU Fortran 77 compiler... no > > checking whether ifort -fPIC -g accepts -g... yes > > checking how to get verbose linking output from ifort -fPIC -g ... -v > > checking for Fortran libraries of ifort -fPIC -g ... > > -L/usr/local/intel/fc9.0/lib -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ > > -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml > -lifport > > -lifcore -limf -lm -lirc -lgcc_s -lirc_s > > checking whether C can link with -L/usr/local/intel/fc9.0/lib > > -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ > > -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64 -lsvml > -lifport > > -lifcore -limf -lm -lirc -lgcc_s -lirc_s... yes > > checking for linker for Fortran main programs... Use Fortran to link > > programs > > checking for Fortran 77 name mangling... lower underscore > > checking that f works as the extension for Fortran 90 program... yes > > checking whether we are using the GNU Fortran 90 compiler... no > > checking whether ifort -fPIC -g accepts -g... yes > > checking for extension for Fortran 90 programs... f90 > > checking whether the Fortran 90 compiler (ifort -fPIC -g ) works... > yes > > checking whether the Fortran 90 compiler (ifort -fPIC -g ) is a > > cross-compiler... no > > checking whether Fortran 90 works with Fortran 77... yes > > checking whether Fortran accepts ! for comments... yes > > checking for include directory flag for Fortran... -I > > checking for Fortran 77 flag for library directories... -L > > checking for which Fortran libraries are needed to link C with > Fortran... > > none > > checking whether Fortran compiler processes .F files with C > preprocessor... > > yes > > checking that f works as the extension for Fortran 90 program... yes > > checking whether we are using the GNU Fortran 90 compiler... (cached) no > > checking whether ifort -fPIC -g accepts -g... (cached) yes > > checking for extension for Fortran 90 programs... f90 > > checking whether the Fortran 90 compiler (ifort -fPIC -g ) works... > yes > > checking whether the Fortran 90 compiler (ifort -fPIC -g ) is a > > cross-compiler... no > > checking for Fortran 90 module extension... mod > > checking for Fortran 90 module include flag... -I > > checking whether Fortran 90 accepts f90 suffix... yes > > checking whether Fortran 90 compiler processes .F90 files with C > > preprocessor... yes > > checking for f90 compiler vendor... intel > > checking for perl... /usr/bin/perl > > checking for ar... ar > > checking for ranlib... ranlib > > checking for etags... etags > > checking for etags argument to specify language... --language=c > > checking whether global variables handled properly... yes > > checking for a BSD-compatible install... /usr/bin/install -c > > checking whether install works... yes > > checking whether install breaks libraries... no > > checking whether mkdir -p works... yes > > checking for make... make > > checking whether clock skew breaks make... no > > checking whether make supports include... yes > > checking whether make allows comments in actions... yes > > checking for virtual path format... VPATH > > checking whether make sets CFLAGS... no > > checking for bash... /bin/sh > > checking whether /bin/sh supports arrays... yes > > configure: error: Creating shared libraries using libtool not yet > supported > > > ********************************************************************************* > > > > May I know what's wrong? > > > > Thank you. > > > > Regards > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From randy at geosystem.us Wed Dec 13 10:44:46 2006 From: randy at geosystem.us (Randall Mackie) Date: Wed, 13 Dec 2006 08:44:46 -0800 Subject: Need to scatter from a few of the processors only to the zero processor Message-ID: <45802DFE.2060701@geosystem.us> At the end of my large 3D computation, I compute the results at, say, 20 locations in the entire 3D volume. This calculation doesn't happen on every processor, but only those processors that own that part of the 3D volume. I want to get those results to the zero processor for output, but I'm unsure about the best way to do this. My question is can I define a parallel vector that is smaller than the number of processors, or does that even make sense? Right now, I'm doing the following, and I'm wondering how to do this with VecCreateMPI and scattering the results to the zero processor: ! ! See if computation point is owned by this processor: ! IF (ii >= xs .and. ii <= xs+xm-1 .and. . jj >= ys .and. jj <= ys+ym-1 .and. . kk >= zs .and. kk <= zs+zm-1 ) THEN flg=.true. hyijk=xh(idx+3*row+2) hyijf=xh(idx+3*(row+gxm*gym)+2) hzijk=xh(idx+3*row+3) hziek=xh(idx+3*(row+gxm)+3) etc, do some computations END IF IF (flg .and. rank /= 0) THEN call MPI_Send(esxInterp(iTx,1), 1, MPI_DOUBLE_COMPLEX, 0, 1, . MPI_COMM_WORLD, ierr) ELSE IF (.not. flg .and. rank == 0) THEN call MPI_Recv(esxInterp(iTx,1), 1, MPI_DOUBLE_COMPLEX, . MPI_ANY_SOURCE, 1, PETSC_COMM_WORLD, mpi_status, ierr) END IF -- 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 knepley at gmail.com Wed Dec 13 10:50:10 2006 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 13 Dec 2006 10:50:10 -0600 Subject: Need to scatter from a few of the processors only to the zero processor In-Reply-To: <45802DFE.2060701@geosystem.us> References: <45802DFE.2060701@geosystem.us> Message-ID: Well, I can think of one way right away: 1) Define global vector, which may have size 0 on some procs 2) Put your local calculations in this vector. You may need a few vectors for handling coordinates, and then values, but I will describe just one. 3) Use VecScatterCreateToZero() to send it to proc 0: http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Vec/VecScatterCreateToZero.html There is sample code on that webpage for using it. Matt On 12/13/06, Randall Mackie wrote: > At the end of my large 3D computation, I compute the results at, say, 20 locations > in the entire 3D volume. This calculation doesn't happen on every processor, but > only those processors that own that part of the 3D volume. > > I want to get those results to the zero processor for output, but I'm unsure > about the best way to do this. My question is can I define a parallel vector > that is smaller than the number of processors, or does that even make sense? > > Right now, I'm doing the following, and I'm wondering how to do this with > VecCreateMPI and scattering the results to the zero processor: > > ! > ! See if computation point is owned by this processor: > ! > IF (ii >= xs .and. ii <= xs+xm-1 .and. > . jj >= ys .and. jj <= ys+ym-1 .and. > . kk >= zs .and. kk <= zs+zm-1 ) THEN > > flg=.true. > > hyijk=xh(idx+3*row+2) > hyijf=xh(idx+3*(row+gxm*gym)+2) > hzijk=xh(idx+3*row+3) > hziek=xh(idx+3*(row+gxm)+3) > > etc, do some computations > > END IF > > IF (flg .and. rank /= 0) THEN > > call MPI_Send(esxInterp(iTx,1), 1, MPI_DOUBLE_COMPLEX, 0, 1, > . MPI_COMM_WORLD, ierr) > > ELSE IF (.not. flg .and. rank == 0) THEN > > call MPI_Recv(esxInterp(iTx,1), 1, MPI_DOUBLE_COMPLEX, > . MPI_ANY_SOURCE, 1, PETSC_COMM_WORLD, mpi_status, ierr) > > END IF > > > -- > 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 > > -- One trouble is that despite this system, anyone who reads journals widely and critically is forced to realize that there are scarcely any bars to eventual publication. There seems to be no study too fragmented, no hypothesis too trivial, no literature citation too biased or too egotistical, no design too warped, no methodology too bungled, no presentation of results too inaccurate, too obscure, and too contradictory, no analysis too self-serving, no argument too circular, no conclusions too trifling or too unjustified, and no grammar and syntax too offensive for a paper to end up in print. -- Drummond Rennie From bsmith at mcs.anl.gov Wed Dec 13 11:11:56 2006 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 13 Dec 2006 11:11:56 -0600 (CST) Subject: dmmg residuals and AMG In-Reply-To: <34904.129.16.81.46.1166020740.squirrel@webmail.chalmers.se> References: <6732.193.183.3.2.1165840605.squirrel@webmail.chalmers.se> <8943.193.183.3.2.1165841930.squirrel@webmail.chalmers.se> <34904.129.16.81.46.1166020740.squirrel@webmail.chalmers.se> Message-ID: Nicolas, On Wed, 13 Dec 2006, Nicolas Bathfield wrote: > Dear Barry and Petsc users, > > I dig into the code to understand a bit better the output from the options > -ksp_view -dmmg_ksp_monitor, but I am still confused (There is a printout > of ksp/ksp/example/tutorial/ex29.c slightly modified below). > > -ksp_view gives: > MG: type is FULL, levels=3 cycles=1, pre-smooths=1, post-smooths=1; > Does that really mean that I perform only 1 multigrid cycle? How can I > control the number of cycles and the convergence criteria? The cycles 1 is INSIDE the information for the MG preconditioner. This means that it is using 1 cycle of FULL mg as a PRECONDITIONER inside the outter (FLEXIBLE) GMRES. If you do not want to use the fgmres acceleration then use -ksp_type richardson -pc_mg_type multiplicative and it will do the usual v-cycle multigrid until the ksp convergence tolerance (in your case reduction of residual norm by 1e5) is achieved. To use a W cycle instead use -pc_mg_cycles 2. (I notice I don't have a hook for using 2 V or W cycles as a preconditioner) So in short it is not doing 1 cycle and stopping it is using 1 cycle as a preconditioner for a usual KSP method. > What does the first index (0,1,2 or 3)in front of KSP residual represent? > Sorry the formatting of the output got screwed up in that last release. Here is what it should look like [barry-smiths-computer:snes/examples/tutorials] bsmith% ./ex19 -dmmg_nlevels 3 -dmmg_ksp_monitor -dmmg_snes_monitor lid velocity = 0.00591716, prandtl # = 1, grashof # = 1 0 SNES Function norm 7.886953101160e-02 0 KSP Residual norm 7.886953101160e-02 (initial residual of complete linear system) 0 KSP Residual norm 2.578939596744e+00 (initial residual on level 1 1 KSP Residual norm 8.580502942028e-01 residual after the pre smooth step on level 1 Note it does not print residuals on level 0 coarse grid because a direct LU solver is used (by default) 0 KSP Residual norm 7.094309025479e-01 residual (after the coarse grid correction) on level 1 1 KSP Residual norm 1.957760982966e-01 residual after post-smooth on level 1 0 KSP Residual norm 2.075431534545e+00 initial residual on level 2 1 KSP Residual norm 6.045540957388e-01 residual on level 2 after pre-smooth 0 KSP Residual norm 6.594930640698e-01 initial residual on level 1 after restriction 1 KSP Residual norm 1.873678881899e-01 level 1 after pre-smooth 0 KSP Residual norm 3.181690759952e-01 level 1 after coarse grid correction 1 KSP Residual norm 6.667286758128e-02 level 1 after post-smooth 0 KSP Residual norm 1.612193634389e+00 level 2 after level 1 coarse correction 1 KSP Residual norm 4.428777921897e-01 level 2 after post-smooth 1 KSP Residual norm 2.757385168519e-02 (residual after one iteration of FGMRES on the entire system) 0 KSP Residual norm 2.371988427435e+00 1 KSP Residual norm 4.603841291940e-01 0 KSP Residual norm 9.537098076551e-01 1 KSP Residual norm 2.372055351128e-01 0 KSP Residual norm 2.711798509188e+00 1 KSP Residual norm 6.529602589787e-01 0 KSP Residual norm 1.107566255572e+00 1 KSP Residual norm 2.612091585278e-01 0 KSP Residual norm 3.201409476039e-01 1 KSP Residual norm 8.889931894491e-02 0 KSP Residual norm 1.371722591156e+00 1 KSP Residual norm 4.736289571173e-01 2 KSP Residual norm 6.009911728204e-03 0 KSP Residual norm 2.085355246785e+00 1 KSP Residual norm 3.940644584596e-01 0 KSP Residual norm 7.653134098239e-01 1 KSP Residual norm 1.914404634341e-01 0 KSP Residual norm 2.385479137738e+00 1 KSP Residual norm 5.858823293243e-01 0 KSP Residual norm 1.104077971916e+00 1 KSP Residual norm 2.411330383552e-01 0 KSP Residual norm 2.979088078743e-01 1 KSP Residual norm 5.916390357483e-02 0 KSP Residual norm 1.295627867427e+00 1 KSP Residual norm 4.389707070240e-01 3 KSP Residual norm 4.890428781555e-04 0 KSP Residual norm 2.047523195596e+00 1 KSP Residual norm 4.264677474628e-01 0 KSP Residual norm 1.029983323961e+00 1 KSP Residual norm 2.539427868572e-01 0 KSP Residual norm 2.553639453818e+00 1 KSP Residual norm 5.757990843674e-01 0 KSP Residual norm 1.138585506415e+00 1 KSP Residual norm 2.355704751953e-01 0 KSP Residual norm 3.092827768419e-01 1 KSP Residual norm 6.071447174488e-02 0 KSP Residual norm 1.358066234308e+00 1 KSP Residual norm 4.505697416265e-01 4 KSP Residual norm 2.690993167559e-05 0 KSP Residual norm 1.816339210351e+00 1 KSP Residual norm 4.389412798513e-01 0 KSP Residual norm 1.064334150012e+00 1 KSP Residual norm 2.361933072662e-01 0 KSP Residual norm 2.157389468526e+00 1 KSP Residual norm 5.693236871123e-01 0 KSP Residual norm 9.333422097061e-01 1 KSP Residual norm 2.239182808762e-01 0 KSP Residual norm 3.848098361086e-01 1 KSP Residual norm 1.015246663039e-01 0 KSP Residual norm 1.312503155715e+00 1 KSP Residual norm 4.374736783054e-01 5 KSP Residual norm 2.159855734129e-06 0 KSP Residual norm 1.152776829315e+00 1 KSP Residual norm 2.640188473397e-01 0 KSP Residual norm 3.473379921732e-01 1 KSP Residual norm 6.973067016139e-02 0 KSP Residual norm 1.674499511581e+00 1 KSP Residual norm 3.691885478016e-01 0 KSP Residual norm 5.881350233350e-01 1 KSP Residual norm 1.623887401757e-01 0 KSP Residual norm 1.899371906578e-01 1 KSP Residual norm 5.283607577248e-02 0 KSP Residual norm 6.796871956361e-01 1 KSP Residual norm 2.167234174310e-01 6 KSP Residual norm 3.259317892179e-07 1 SNES Function norm 7.468268333544e-06 > > Thanks for your help. > > Best regards, > > Nicolas. > > 0 KSP Residual norm 1.421285957034e-02 > 1 KSP Residual norm 1.609288367464e-03 > 0 KSP Residual norm 2.699978999993e-01 > 1 KSP Residual norm 3.406567948849e-02 > 0 KSP Residual norm 2.101495954238e-02 > 1 KSP Residual norm 1.846013302069e-03 > 0 KSP Residual norm 8.326606206788e-04 > 1 KSP Residual norm 4.344001727320e-05 > 0 KSP Residual norm 1.577985727128e-02 > 1 KSP Residual norm 1.969730522207e-03 > 1 KSP Residual norm 2.116914409872e-02 > 0 KSP Residual norm 1.029801283683e-01 > 1 KSP Residual norm 7.594550723847e-03 > 0 KSP Residual norm 7.254183286194e-03 > 1 KSP Residual norm 6.000261158570e-04 > 0 KSP Residual norm 2.966998198077e-01 > 1 KSP Residual norm 5.201133083048e-02 > 0 KSP Residual norm 3.786415700595e-02 > 1 KSP Residual norm 3.901313528873e-03 > 0 KSP Residual norm 3.502275405186e-03 > 1 KSP Residual norm 2.803439371866e-04 > 0 KSP Residual norm 2.150042336470e-02 > 1 KSP Residual norm 3.280472811048e-03 > 2 KSP Residual norm 1.206584038156e-04 > 0 KSP Residual norm 1.010495676349e-01 > 1 KSP Residual norm 5.373641377818e-03 > 0 KSP Residual norm 3.177241089754e-03 > 1 KSP Residual norm 2.956553309307e-04 > 0 KSP Residual norm 2.439978649540e-01 > 1 KSP Residual norm 2.775398636052e-02 > 0 KSP Residual norm 2.197619585488e-02 > 1 KSP Residual norm 1.465557162804e-03 > 0 KSP Residual norm 1.119259726469e-03 > 1 KSP Residual norm 6.758059074616e-05 > 0 KSP Residual norm 1.390217147343e-02 > 1 KSP Residual norm 1.994861880977e-03 > 3 KSP Residual norm 5.385911324388e-07 > KSP Object: > type: fgmres > GMRES: restart=30, using Classical (unmodified) Gram-Schmidt > Orthogonalization with no iterative refinement > GMRES: happy breakdown tolerance 1e-30 > maximum iterations=10000, initial guess is zero > tolerances: relative=1e-05, absolute=1e-50, divergence=10000 > right preconditioning > PC Object: > type: mg > MG: type is FULL, levels=3 cycles=1, pre-smooths=1, post-smooths=1 > Coarse gride solver -- level 0 ------------------------------- > KSP Object:(mg_coarse_) > type: preonly > maximum iterations=1, initial guess is zero > tolerances: relative=1e-05, absolute=1e-50, divergence=10000 > left preconditioning > PC Object:(mg_coarse_) > type: lu > LU: out-of-place factorization > matrix ordering: nd > LU: tolerance for zero pivot 1e-12 > LU: factor fill ratio needed 1.54545 > Factored matrix follows > Matrix Object: > type=seqaij, rows=9, cols=9 > total: nonzeros=51, allocated nonzeros=51 > not using I-node routines > linear system matrix = precond matrix: > Matrix Object: > type=seqaij, rows=9, cols=9 > total: nonzeros=33, allocated nonzeros=33 > not using I-node routines > > > > > > > > > On Mon, 11 Dec 2006, Nicolas Bathfield wrote: > > > >> Hi, > >> > >> I would like to compare PETSc DMMG convergence to some theoretical > >> convergence rate given by local Fourier analysis for a simple diffusion > >> problem. > >> To do so, I need to extract the residuals after each multigrid > >> iteration. > >> Unfortunately, I only managed to obtain the residuals at the last > >> iteration. > >> Is it possible to get the residual printed out after each multigrid > >> iteration without modifying the source code? > > > > Nicolas, > > > > -dmmg_ksp_monitor prints the residual after each V/W cycle. > > -pc_mg_monitor > > prints the residual norm before and after each smoothing step. > > > > BTW: always run with -ksp_view to see exactly what solver options > > are being used. The defaults are non-standard (e.g. we default to having a > > Krylov solver turned on for each smoother and the V/W cycle). > > > > > >> > >> Furthermore, I'd like to test the AMG from the PC type from HYPRE > >> (boomeramg). I have already ran --download-hypre while compiling petsc. > >> Is > >> there any example available somewhere? > > > > -pc_type hypre -pc_hypre_type boomeramg > > > > Run with -help to see the boomeramg options; again use -ksp_view we > > default > > to accelerating boomeramg with GMRES which is non-standard. Use -ksp_type > > richardson > > to get the usual V/W cycle. > > > > Good luck, > > > > Barry > > > > Why the non-standard defaults? We want to provide a default MG that is as > > robust > > (more likely to converge) as possible. Hence we turn on ILU(0) smoothing > > with GMRES > > acceleration of the smoother and Krylov method. You can turn off these > > options one > > at a time to see the effect on the convergence rate. For model problems > > the accelerators > > only improve convergence a little. For more complex problems, for example > > src/snes/examples/tutorials/ex19.c > > convergence gets much worse without the accelerators. > > > >> > >> Best regards, > >> > >> Nicolas. > >> -- > >> Nicolas BATHFIELD > >> Chalmers University of Technology > >> Shipping and Marine Technology > >> phone: +46 (0)31 772 1476 > >> fax: +46 (0)31 772 3699 > >> > >> > > > > > > > From bessen at cs.columbia.edu Thu Dec 14 14:16:07 2006 From: bessen at cs.columbia.edu (Arvid Bessen) Date: Thu, 14 Dec 2006 15:16:07 -0500 Subject: QR factorization Message-ID: <097E5F59-ED6D-484A-9DD0-3EC652F9A133@cs.columbia.edu> Hi, does petsc currently support QR factorization? I saw that it is supposedly provided by an interface to the spooles package, however the comment in MatQRFactorSymbolic_SeqAIJSpooles that says SETERRQ(PETSC_ERR_SUP,"QR Factorization is unsupported as the Spooles implementation of QR is invalid."); seems to imply that it is not working. Thanks, Arvid From knepley at gmail.com Thu Dec 14 14:53:39 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 14 Dec 2006 14:53:39 -0600 Subject: QR factorization In-Reply-To: <097E5F59-ED6D-484A-9DD0-3EC652F9A133@cs.columbia.edu> References: <097E5F59-ED6D-484A-9DD0-3EC652F9A133@cs.columbia.edu> Message-ID: No, we have no support for QR since sparse QR does not really exist, and we ignore a lot of dense things since PETSc is not really designed for that. If you want dense parallel QR, use FLAME from UT Austin, for serial use LAPACK. Matt On 12/14/06, Arvid Bessen wrote: > > Hi, > > does petsc currently support QR factorization? > I saw that it is supposedly provided by an interface to the spooles > package, however the comment in MatQRFactorSymbolic_SeqAIJSpooles > that says > SETERRQ(PETSC_ERR_SUP,"QR Factorization is unsupported as the Spooles > implementation of QR is invalid."); > seems to imply that it is not working. > > Thanks, > Arvid > > -- One trouble is that despite this system, anyone who reads journals widely and critically is forced to realize that there are scarcely any bars to eventual publication. There seems to be no study too fragmented, no hypothesis too trivial, no literature citation too biased or too egotistical, no design too warped, no methodology too bungled, no presentation of results too inaccurate, too obscure, and too contradictory, no analysis too self-serving, no argument too circular, no conclusions too trifling or too unjustified, and no grammar and syntax too offensive for a paper to end up in print. -- Drummond Rennie From hzhang at mcs.anl.gov Thu Dec 14 15:39:07 2006 From: hzhang at mcs.anl.gov (Hong Zhang) Date: Thu, 14 Dec 2006 15:39:07 -0600 (CST) Subject: QR factorization In-Reply-To: References: <097E5F59-ED6D-484A-9DD0-3EC652F9A133@cs.columbia.edu> Message-ID: > > > > does petsc currently support QR factorization? No. > > I saw that it is supposedly provided by an interface to the spooles > > package, however the comment in MatQRFactorSymbolic_SeqAIJSpooles > > that says > > SETERRQ(PETSC_ERR_SUP,"QR Factorization is unsupported as the Spooles > > implementation of QR is invalid."); > > seems to imply that it is not working. Spooles' QR doesn't work, so we gave up our interface to it. Hong From asdfgf at ig.com.br Tue Dec 19 07:55:01 2006 From: asdfgf at ig.com.br (Fernando Campos) Date: Tue, 19 Dec 2006 10:55:01 -0300 Subject: Kubuntu Linux + PETSc Question Message-ID: <20061219_135501_034784.asdfgf@ig.com.br> Dear All, I've found that, for my application, the PETSc that comes in Kubuntu Linux 64 is twice faster than the one we can get in the PETSc's site. I want to use Hypre in my application, but I don't know how to use Hypre with the already compiled PETSc library in Kubuntu. Can you give me some hints in this task? Or maybe tell what should be reason for this difference in performance.. maybe I need some flags in order to optimize PETSc downloaded from the site? Thank you. Fernando Campos From berend at chalmers.se Tue Dec 19 08:41:06 2006 From: berend at chalmers.se (Berend van Wachem) Date: Tue, 19 Dec 2006 15:41:06 +0100 Subject: Kubuntu Linux + PETSc Question In-Reply-To: <20061219_135501_034784.asdfgf@ig.com.br> References: <20061219_135501_034784.asdfgf@ig.com.br> Message-ID: <200612191541.06499.berend@chalmers.se> Hi Fernando, Have you tried configuring PETSc with the option --with-debugging=0 That should generate optimized code. For using hypre, you can specify --download-hypre=yes Good luck, Berend. > Dear All, > > I've found that, for my application, the PETSc that comes in Kubuntu Linux > 64 is twice faster than the one we can get in the PETSc's site. I want to > use Hypre in my application, but I don't know how to use Hypre with the > already compiled PETSc library in Kubuntu. Can you give me some hints in > this task? Or maybe tell what should be reason for this difference in > performance.. maybe I need some flags in order to optimize PETSc downloaded > from the site? > > Thank you. > > Fernando Campos From asdfgf at ig.com.br Tue Dec 19 10:39:44 2006 From: asdfgf at ig.com.br (Fernando Campos) Date: Tue, 19 Dec 2006 13:39:44 -0300 Subject: Kubuntu Linux + PETSc Question Message-ID: <20061219_163944_062918.asdfgf@ig.com.br> I tried the option --with-debugging=0 and the performance of my application in the sequential case decreased twice. :) However, in Kumbuntu Linux it is less scalable than when using Rocks Cluster system... I am trying to find out why.. we gave up on Rocks due many problems. Thanks Berend Em (15:41:06), petsc-users at mcs.anl.gov escreveu: >Hi Fernando, > >Have you tried configuring PETSc with the option >--with-debugging=0 > >That should generate optimized code. > >For using hypre, you can specify >--download-hypre=yes > >Good luck, > >Berend. > >> Dear All, >> >> I've found that, for my application, the PETSc that comes in Kubuntu Linux >> 64 is twice faster than the one we can get in the PETSc's site. I want to >> use Hypre in my application, but I don't know how to use Hypre with the >> already compiled PETSc library in Kubuntu. Can you give me some hints in >> this task? Or maybe tell what should be reason for this difference in >> performance.. maybe I need some flags in order to optimize PETSc >downloaded >> from the site? >> >> Thank you. >> >> Fernando Campos > >---------- From aja2111 at columbia.edu Tue Dec 19 11:23:23 2006 From: aja2111 at columbia.edu (Aron Ahmadia) Date: Tue, 19 Dec 2006 12:23:23 -0500 Subject: Kubuntu Linux + PETSc Question In-Reply-To: <200612191541.06499.berend@chalmers.se> References: <20061219_135501_034784.asdfgf@ig.com.br> <200612191541.06499.berend@chalmers.se> Message-ID: <37604ab40612190923q2844a659y31357f1a31860329@mail.gmail.com> Dear Fernando, You'll also want to make sure you're using an optimized blas/lapack for your architecture. I'm guessing the ROCKS cluster kernel is better tuned for scientific computing and network performance than the generic Kubuntu kernel. Have you tried using a similar kernel to the one provided by ROCKS? I'm interested in your results--I've also tinkered a bit with Ubuntu, especially since the advanced intel compilers are available for free on it and not in OS X. ~A On 12/19/06, Berend van Wachem wrote: > Hi Fernando, > > Have you tried configuring PETSc with the option > --with-debugging=0 > > That should generate optimized code. > > For using hypre, you can specify > --download-hypre=yes > > Good luck, > > Berend. > > > Dear All, > > > > I've found that, for my application, the PETSc that comes in Kubuntu Linux > > 64 is twice faster than the one we can get in the PETSc's site. I want to > > use Hypre in my application, but I don't know how to use Hypre with the > > already compiled PETSc library in Kubuntu. Can you give me some hints in > > this task? Or maybe tell what should be reason for this difference in > > performance.. maybe I need some flags in order to optimize PETSc downloaded > > from the site? > > > > Thank you. > > > > Fernando Campos > > From berend at chalmers.se Tue Dec 19 11:36:06 2006 From: berend at chalmers.se (Berend van Wachem) Date: Tue, 19 Dec 2006 18:36:06 +0100 Subject: Kubuntu Linux + PETSc Question In-Reply-To: <37604ab40612190923q2844a659y31357f1a31860329@mail.gmail.com> References: <20061219_135501_034784.asdfgf@ig.com.br> <200612191541.06499.berend@chalmers.se> <37604ab40612190923q2844a659y31357f1a31860329@mail.gmail.com> Message-ID: <200612191836.06256.berend@chalmers.se> Hi, Before I used ATLAS for blas/lapack, which worked nice, but which I didn't get to work with HYPRE. Berend. > Dear Fernando, > > You'll also want to make sure you're using an optimized blas/lapack > for your architecture. > > I'm guessing the ROCKS cluster kernel is better tuned for scientific > computing and network performance than the generic Kubuntu kernel. > Have you tried using a similar kernel to the one provided by ROCKS? > > I'm interested in your results--I've also tinkered a bit with Ubuntu, > especially since the advanced intel compilers are available for free > on it and not in OS X. > > ~A > > On 12/19/06, Berend van Wachem wrote: > > Hi Fernando, > > > > Have you tried configuring PETSc with the option > > --with-debugging=0 > > > > That should generate optimized code. > > > > For using hypre, you can specify > > --download-hypre=yes > > > > Good luck, > > > > Berend. > > > > > Dear All, > > > > > > I've found that, for my application, the PETSc that comes in Kubuntu > > > Linux 64 is twice faster than the one we can get in the PETSc's site. I > > > want to use Hypre in my application, but I don't know how to use Hypre > > > with the already compiled PETSc library in Kubuntu. Can you give me > > > some hints in this task? Or maybe tell what should be reason for this > > > difference in performance.. maybe I need some flags in order to > > > optimize PETSc downloaded from the site? > > > > > > Thank you. > > > > > > Fernando Campos From asdfgf at ig.com.br Tue Dec 19 13:10:29 2006 From: asdfgf at ig.com.br (Fernando Campos) Date: Tue, 19 Dec 2006 16:10:29 -0300 Subject: Kubuntu Linux + PETSc Question Message-ID: <20061219_191029_021580.asdfgf@ig.com.br> Dear Aron, We are using the blas/lapack 64 in the Umbuntu's repository, so I believe they are optimized already. We have used many versions of Rocks clusters but lately we've decided to move to another distribution due many problems related to installation and maintenance of the nodes. Until now Rocks performed better ( when it is working :) ) than generic kernels.. we tried conectiva linux and now ubuntu. I don't know about a kernel similar to Rocks.. one made for scientific computing.. I know there are cluster packages like Oscar and Gluster. The farmer we haven't tried and the latter haven't worked.. Thanks. Em (12:23:23), petsc-users at mcs.anl.gov escreveu: >Dear Fernando, > >You'll also want to make sure you're using an optimized blas/lapack >for your architecture. > >I'm guessing the ROCKS cluster kernel is better tuned for scientific >computing and network performance than the generic Kubuntu kernel. >Have you tried using a similar kernel to the one provided by ROCKS? > >I'm interested in your results--I've also tinkered a bit with Ubuntu, >especially since the advanced intel compilers are available for free >on it and not in OS X. > >~A > >On 12/19/06, Berend van Wachem wrote: >> Hi Fernando, >> >> Have you tried configuring PETSc with the option >> --with-debugging=0 >> >> That should generate optimized code. >> >> For using hypre, you can specify >> --download-hypre=yes >> >> Good luck, >> >> Berend. >> >> > Dear All, >> > >> > I've found that, for my application, the PETSc that comes in Kubuntu >Linux >> > 64 is twice faster than the one we can get in the PETSc's site. I want >to >> > use Hypre in my application, but I don't know how to use Hypre with the >> > already compiled PETSc library in Kubuntu. Can you give me some hints in >> > this task? Or maybe tell what should be reason for this difference in >> > performance.. maybe I need some flags in order to optimize PETSc >downloaded >> > from the site? >> > >> > Thank you. >> > >> > Fernando Campos >> >> > >---------- From misabel at litec.csic.es Thu Dec 21 04:45:15 2006 From: misabel at litec.csic.es (Isabel Gil) Date: Thu, 21 Dec 2006 11:45:15 +0100 Subject: Some error when I try to solve a matricial system Message-ID: <458A65BB.9030006@litec.csic.es> Hello PETSc's users, I have just started to use PETSc and when I try to solve the matricial system I obtain the following error sentences: [0]PETSC ERROR: MatLUFactorNumeric_SeqAIJ() line 538 in src/mat/impls/aij/seq/aijfact.c [0]PETSC ERROR: Detected zero pivot in LU factorization see http://www.mcs.anl.gov/petsc/petsc-2/documentation/troubleshooting.html#ZeroPivot! [0]PETSC ERROR: Zero pivot row 277017 value 2.16144e-10 tolerance 1e-12 * rs 526.244! [0]PETSC ERROR: MatLUFactorNumeric() line 1843 in src/mat/interface/matrix.c [0]PETSC ERROR: PCSetUp_ILU() line 854 in src/ksp/pc/impls/ilu/ilu.c [0]PETSC ERROR: PCSetUp() line 797 in src/ksp/pc/interface/precon.c [0]PETSC ERROR: KSPSetUp() line 232 in src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: PCSetUpOnBlocks_BJacobi_Singleblock() line 747 in src/ksp/pc/impls/bjacobi/bjacobi.c [0]PETSC ERROR: PCSetUpOnBlocks() line 830 in src/ksp/pc/interface/precon.c [0]PETSC ERROR: KSPSetUpOnBlocks() line 156 in src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: KSPSolve() line 344 in src/ksp/ksp/interface/itfunc.c I would be really grateful if you could say to me where the problem could be in order to sort it out. Thanks in advance and best regards Isa From knepley at gmail.com Thu Dec 21 09:25:25 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 21 Dec 2006 09:25:25 -0600 Subject: Some error when I try to solve a matricial system In-Reply-To: <458A65BB.9030006@litec.csic.es> References: <458A65BB.9030006@litec.csic.es> Message-ID: You have a zero pivot in the factorization. This is explained at the link given in the error message. You could try a different preconditioner. Matt On 12/21/06, Isabel Gil wrote: > Hello PETSc's users, > > I have just started to use PETSc and when I try to solve the matricial > system I obtain the following error sentences: > > [0]PETSC ERROR: MatLUFactorNumeric_SeqAIJ() line 538 in > src/mat/impls/aij/seq/aijfact.c > [0]PETSC ERROR: Detected zero pivot in LU factorization > see > http://www.mcs.anl.gov/petsc/petsc-2/documentation/troubleshooting.html#ZeroPivot! > [0]PETSC ERROR: Zero pivot row 277017 value 2.16144e-10 tolerance 1e-12 > * rs 526.244! > [0]PETSC ERROR: MatLUFactorNumeric() line 1843 in src/mat/interface/matrix.c > [0]PETSC ERROR: PCSetUp_ILU() line 854 in src/ksp/pc/impls/ilu/ilu.c > [0]PETSC ERROR: PCSetUp() line 797 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 232 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: PCSetUpOnBlocks_BJacobi_Singleblock() line 747 in > src/ksp/pc/impls/bjacobi/bjacobi.c > [0]PETSC ERROR: PCSetUpOnBlocks() line 830 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUpOnBlocks() line 156 in > src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: KSPSolve() line 344 in src/ksp/ksp/interface/itfunc.c > > I would be really grateful if you could say to me where the problem > could be in order to sort it out. > > Thanks in advance and best regards > Isa > > -- One trouble is that despite this system, anyone who reads journals widely and critically is forced to realize that there are scarcely any bars to eventual publication. There seems to be no study too fragmented, no hypothesis too trivial, no literature citation too biased or too egotistical, no design too warped, no methodology too bungled, no presentation of results too inaccurate, too obscure, and too contradictory, no analysis too self-serving, no argument too circular, no conclusions too trifling or too unjustified, and no grammar and syntax too offensive for a paper to end up in print. -- Drummond Rennie From hzhang at mcs.anl.gov Thu Dec 21 09:26:00 2006 From: hzhang at mcs.anl.gov (Hong Zhang) Date: Thu, 21 Dec 2006 09:26:00 -0600 (CST) Subject: Some error when I try to solve a matricial system In-Reply-To: <458A65BB.9030006@litec.csic.es> References: <458A65BB.9030006@litec.csic.es> Message-ID: Isa, BJacobi LU or ilu can develop zero pivots as you decrease the diagonal block size. You can force it to become positive definite with the runtime option '-sub_pc_factor_shift_positive_definit' or without zero pivots with '-sub_pc_factor_shift_nonzero.' (or -pc_factor_shift_positive_definit/-pc_factor_shift_nonzero for ilu). This might decrease the effectiveness of the preconditioner though. Hong On Thu, 21 Dec 2006, Isabel Gil wrote: > Hello PETSc's users, > > I have just started to use PETSc and when I try to solve the matricial > system I obtain the following error sentences: > > [0]PETSC ERROR: MatLUFactorNumeric_SeqAIJ() line 538 in > src/mat/impls/aij/seq/aijfact.c > [0]PETSC ERROR: Detected zero pivot in LU factorization > see > http://www.mcs.anl.gov/petsc/petsc-2/documentation/troubleshooting.html#ZeroPivot! > [0]PETSC ERROR: Zero pivot row 277017 value 2.16144e-10 tolerance 1e-12 > * rs 526.244! > [0]PETSC ERROR: MatLUFactorNumeric() line 1843 in src/mat/interface/matrix.c > [0]PETSC ERROR: PCSetUp_ILU() line 854 in src/ksp/pc/impls/ilu/ilu.c > [0]PETSC ERROR: PCSetUp() line 797 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 232 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: PCSetUpOnBlocks_BJacobi_Singleblock() line 747 in > src/ksp/pc/impls/bjacobi/bjacobi.c > [0]PETSC ERROR: PCSetUpOnBlocks() line 830 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUpOnBlocks() line 156 in > src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: KSPSolve() line 344 in src/ksp/ksp/interface/itfunc.c > > I would be really grateful if you could say to me where the problem > could be in order to sort it out. > > Thanks in advance and best regards > Isa > > From petsc-maint at mcs.anl.gov Fri Dec 22 14:21:37 2006 From: petsc-maint at mcs.anl.gov (Barry Smith) Date: Fri, 22 Dec 2006 14:21:37 -0600 (CST) Subject: [PETSC #15639] questions regarding using petsc in OpenMP In-Reply-To: References: Message-ID: Jin, I have added support for this to the development version of PETSc http://www-unix.mcs.anl.gov/petsc/petsc-as/developers/index.html see the manual pages for PCOPENMP and PetscOpenMPMerge() and PetscOpenMPSpawn() You will have to replace MPI_Init() with PetscInitialize(). All the uses of MPI_COMM_WORLD with PETSC_COMM_WORLD and then use MatCreateSeqAIJWithArrays() to create the PETSc matrix and KSPCreate() as usual. Then run with the options described in the manual pages and it will just work. Good luck, Barry Access the manual pages on the website at http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/index.html they will not be updated until early Saturday morning. On Thu, 7 Dec 2006, Jin Chen wrote: > The application code is written in Fortran 90. > > > You mean - you are using: 8x16 = 128 procs total? > Yes. But OpenMP only works on 16 processors independently on 8 nodes. > > > However you can have a single MPI_COMM_WORLD with size=128 > > - and then split it up into 8 different communicators each with > > size=16 - as required. You then create PETSc objects on each of these > > communicators. > Yes, this is what I want. But the number of size=16 processors has already > been tied up as one by OpenMP. I want to know how can this be done without > affecting OpenMP? > > Thanks, > > -Jin- > > On Thu, 7 Dec 2006, Satish Balay wrote: > > > On Thu, 7 Dec 2006, Jin Chen wrote: > > > > > > > > Hi > > > > > > I am having a MPI and OpenMP mixed application code. > > > In the circle direction, I have 8 planes, represented by P0 ~ P7 > > > and communicated by MPI. > > > > > > --P0-- > > > / \ > > > P1 P7 > > > / \ > > > P2 P6 > > > \ / > > > P3 P5 > > > \ / > > > --P4-- > > > > > > Inside each plane, I am using OpenMP on a whole computer node. > > > > > > So for this particular case on seaborg, I am using 8 nodes using MPI > > > and 16 threads on each node using OpenMP. > > > > You mean - you are using: 8x16 = 128 procs total? > > > > > > > > Right now the matrix, generated on each node using OpenMP, > > > is so large that it takes forever for superlu_mt to solve. > > > Therefore, I hope we can move to petsc since petsc has more choices. > > > > > > We just want > > > petsc for solving Ax=b inside each plane on each node > > > and independently between nodes, > > > not want to change the whole code. So an interface like this: > > > > > > -geting matrix and rhs from application code > > > -call petsc to solve Ax=b > > > -keep the matrix and preconditioner information in a pointer for next > > > physics > > > time use > > > -return solution and pointers for the matrix and preconditoner to > > > application > > > code > > > > > > is good enough. > > > > > > But petsc uses MPI while the matrix is generated using OpenMP on a whole > > > node, > > > So I need your help to make it work: > > > > > > -how to initialize petsc independently inside each node? > > > Here we want petsc to use all 16 threads as 16 processors > > > -how to creat petsc Mat object object > > > so that the matrix is distributed across the 16 processors? > > > > PETSc is MPI based - and you can't have eight separate MPI > > instances. However you can have a single MPI_COMM_WORLD with size=128 > > - and then split it up into 8 different communicators each with > > size=16 - as required. You then create PETSc objects on each of these > > communicators. > > > > What role will OpenMP play in this modified code? Once the > > mpi_comm_size is changed from 8 to 128 - OpenMP gets affected. You > > might require some workarrounds - so that only one node form the > > sub-communicator [of size=16] does the OpenMP part. > > > > Satish > > > > From petsc-maint at mcs.anl.gov Fri Dec 22 14:21:37 2006 From: petsc-maint at mcs.anl.gov (Barry Smith) Date: Fri, 22 Dec 2006 14:21:37 -0600 (CST) Subject: [PETSC #15639] questions regarding using petsc in OpenMP In-Reply-To: References: Message-ID: Jin, I have added support for this to the development version of PETSc http://www-unix.mcs.anl.gov/petsc/petsc-as/developers/index.html see the manual pages for PCOPENMP and PetscOpenMPMerge() and PetscOpenMPSpawn() You will have to replace MPI_Init() with PetscInitialize(). All the uses of MPI_COMM_WORLD with PETSC_COMM_WORLD and then use MatCreateSeqAIJWithArrays() to create the PETSc matrix and KSPCreate() as usual. Then run with the options described in the manual pages and it will just work. Good luck, Barry Access the manual pages on the website at http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/index.html they will not be updated until early Saturday morning. On Thu, 7 Dec 2006, Jin Chen wrote: > The application code is written in Fortran 90. > > > You mean - you are using: 8x16 = 128 procs total? > Yes. But OpenMP only works on 16 processors independently on 8 nodes. > > > However you can have a single MPI_COMM_WORLD with size=128 > > - and then split it up into 8 different communicators each with > > size=16 - as required. You then create PETSc objects on each of these > > communicators. > Yes, this is what I want. But the number of size=16 processors has already > been tied up as one by OpenMP. I want to know how can this be done without > affecting OpenMP? > > Thanks, > > -Jin- > > On Thu, 7 Dec 2006, Satish Balay wrote: > > > On Thu, 7 Dec 2006, Jin Chen wrote: > > > > > > > > Hi > > > > > > I am having a MPI and OpenMP mixed application code. > > > In the circle direction, I have 8 planes, represented by P0 ~ P7 > > > and communicated by MPI. > > > > > > --P0-- > > > / \ > > > P1 P7 > > > / \ > > > P2 P6 > > > \ / > > > P3 P5 > > > \ / > > > --P4-- > > > > > > Inside each plane, I am using OpenMP on a whole computer node. > > > > > > So for this particular case on seaborg, I am using 8 nodes using MPI > > > and 16 threads on each node using OpenMP. > > > > You mean - you are using: 8x16 = 128 procs total? > > > > > > > > Right now the matrix, generated on each node using OpenMP, > > > is so large that it takes forever for superlu_mt to solve. > > > Therefore, I hope we can move to petsc since petsc has more choices. > > > > > > We just want > > > petsc for solving Ax=b inside each plane on each node > > > and independently between nodes, > > > not want to change the whole code. So an interface like this: > > > > > > -geting matrix and rhs from application code > > > -call petsc to solve Ax=b > > > -keep the matrix and preconditioner information in a pointer for next > > > physics > > > time use > > > -return solution and pointers for the matrix and preconditoner to > > > application > > > code > > > > > > is good enough. > > > > > > But petsc uses MPI while the matrix is generated using OpenMP on a whole > > > node, > > > So I need your help to make it work: > > > > > > -how to initialize petsc independently inside each node? > > > Here we want petsc to use all 16 threads as 16 processors > > > -how to creat petsc Mat object object > > > so that the matrix is distributed across the 16 processors? > > > > PETSc is MPI based - and you can't have eight separate MPI > > instances. However you can have a single MPI_COMM_WORLD with size=128 > > - and then split it up into 8 different communicators each with > > size=16 - as required. You then create PETSc objects on each of these > > communicators. > > > > What role will OpenMP play in this modified code? Once the > > mpi_comm_size is changed from 8 to 128 - OpenMP gets affected. You > > might require some workarrounds - so that only one node form the > > sub-communicator [of size=16] does the OpenMP part. > > > > Satish > > > > From zonexo at gmail.com Fri Dec 22 19:16:08 2006 From: zonexo at gmail.com (Ben Tay) Date: Sat, 23 Dec 2006 09:16:08 +0800 Subject: Some questions regarding PETsc Message-ID: <804ab5d40612221716w7ade7e83p5635e2fa7b88b850@mail.gmail.com> Hi, I have some questions regarding the use of PETsc... 1. Is Intel MKL much faster than the downloaded BLAS/LAPACK? Or is it true only for really large problem? Is ATLAS a good alternative too? 2. Can shared library be use in win32? I tried using --with-shared but after ./configure it still reports shared library disabled Thank you very much Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Dec 22 19:24:16 2006 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 22 Dec 2006 19:24:16 -0600 Subject: Some questions regarding PETsc In-Reply-To: <804ab5d40612221716w7ade7e83p5635e2fa7b88b850@mail.gmail.com> References: <804ab5d40612221716w7ade7e83p5635e2fa7b88b850@mail.gmail.com> Message-ID: On 12/22/06, Ben Tay wrote: > Hi, > > I have some questions regarding the use of PETsc... > > 1. Is Intel MKL much faster than the downloaded BLAS/LAPACK? Or is it true > only for really large problem? Is ATLAS a good alternative too? This depends heavily on the architecture and on the BLAS operations used. I don't think it much faster, but Satish may know better. > 2. Can shared library be use in win32? I tried using --with-shared but after > ./configure it still reports shared library disabled No, we never had the time/manpower to implement the completely different Windows paradigm for dynamic libraries. Matt > Thank you very much > > Regards. -- One trouble is that despite this system, anyone who reads journals widely and critically is forced to realize that there are scarcely any bars to eventual publication. There seems to be no study too fragmented, no hypothesis too trivial, no literature citation too biased or too egotistical, no design too warped, no methodology too bungled, no presentation of results too inaccurate, too obscure, and too contradictory, no analysis too self-serving, no argument too circular, no conclusions too trifling or too unjustified, and no grammar and syntax too offensive for a paper to end up in print. -- Drummond Rennie From balay at mcs.anl.gov Sat Dec 23 02:03:01 2006 From: balay at mcs.anl.gov (Satish Balay) Date: Sat, 23 Dec 2006 00:03:01 -0800 (PST) Subject: Some questions regarding PETsc In-Reply-To: References: <804ab5d40612221716w7ade7e83p5635e2fa7b88b850@mail.gmail.com> Message-ID: On Fri, 22 Dec 2006, Matthew Knepley wrote: > > 1. Is Intel MKL much faster than the downloaded BLAS/LAPACK? Or is it true > > only for really large problem? Is ATLAS a good alternative too? > This depends heavily on the architecture and on the BLAS operations > used. I don't think it much faster, but Satish may know better. Yeah - MKL will be faster. But I don't think one should worry about it for noral use. However if you are interested in obtaining the best performance numbers - perhaps for publishing results - one of the optimzations could be choosing blas with best performance. [higher performing compilers is another choice one could make etc..] > > 2. Can shared library be use in win32? I tried using --with-shared > > but after ./configure it still reports shared library disabled > No, we never had the time/manpower to implement the completely > different Windows paradigm for dynamic libraries. There is a way to build .dll files with cygwin gcc/g77 - but this process is not automated [requires a bit of manual tweaking to get this working]. Satish From zonexo at gmail.com Mon Dec 25 21:08:25 2006 From: zonexo at gmail.com (Ben Tay) Date: Tue, 26 Dec 2006 11:08:25 +0800 Subject: Redundent files in mpich2 Message-ID: <804ab5d40612251908w507e3159i46c6a792de6087ed@mail.gmail.com> Hi, I'm using the downloaded mpich2 in the linux64 server. However, it is taking up quite a lot of space. May I know which are the really important files which I must keep? Which are the redundent files? I'm running out of disk space.... Thank you very much. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Dec 25 23:26:29 2006 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 25 Dec 2006 23:26:29 -0600 Subject: Redundent files in mpich2 In-Reply-To: <804ab5d40612251908w507e3159i46c6a792de6087ed@mail.gmail.com> References: <804ab5d40612251908w507e3159i46c6a792de6087ed@mail.gmail.com> Message-ID: I believe you only have to keep things in the install directory $PETSC_DIR/externalpackages/mpich2-1.0.4/$PETSC_ARCH Matt On 12/25/06, Ben Tay wrote: > Hi, > > I'm using the downloaded mpich2 in the linux64 server. However, it is taking > up quite a lot of space. May I know which are the really important files > which I must keep? Which are the redundent files? I'm running out of disk > space.... > > Thank you very much. > > Regards -- One trouble is that despite this system, anyone who reads journals widely and critically is forced to realize that there are scarcely any bars to eventual publication. There seems to be no study too fragmented, no hypothesis too trivial, no literature citation too biased or too egotistical, no design too warped, no methodology too bungled, no presentation of results too inaccurate, too obscure, and too contradictory, no analysis too self-serving, no argument too circular, no conclusions too trifling or too unjustified, and no grammar and syntax too offensive for a paper to end up in print. -- Drummond Rennie From neckel at in.tum.de Thu Dec 28 07:02:45 2006 From: neckel at in.tum.de (Tobias Neckel) Date: Thu, 28 Dec 2006 14:02:45 +0100 Subject: Matrix addition Message-ID: <4593C075.3050302@in.tum.de> Hi, I have a small (perhaps even silly) question concerning an addition of two matrices. Sorry in advance since I am quite new in using petsc. Currently I am successfully using MatPtAP for the computation of a matrix Q = M^T*A*M with matrices M and A in my C++ code. Now, I need to enlarge the functionality to use two matrices M1 and M2 together with A in order to calculate Q = M1^T*A*M1 + M2^T*A*M2. I have been looking in the manual pages for a routine for adding up two matrices without success. Is there any way to do this and I just didn't see it? Or is there another possibility in order to compute my desired matrix Q? Thank you Tobias From knepley at gmail.com Thu Dec 28 09:54:58 2006 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 28 Dec 2006 09:54:58 -0600 Subject: Matrix addition In-Reply-To: <4593C075.3050302@in.tum.de> References: <4593C075.3050302@in.tum.de> Message-ID: We do have MatAXPY() modeled after BLAS. Matt On 12/28/06, Tobias Neckel wrote: > Hi, > > I have a small (perhaps even silly) question concerning an addition of two matrices. > Sorry in advance since I am quite new in using petsc. > > Currently I am successfully using MatPtAP for the computation of a matrix Q = M^T*A*M > with matrices M and A in my C++ code. > Now, I need to enlarge the functionality to use two matrices M1 and M2 together with > A in order to calculate Q = M1^T*A*M1 + M2^T*A*M2. > > I have been looking in the manual pages for a routine for adding up two matrices > without success. Is there any way to do this and I just didn't see it? Or is there > another possibility in order to compute my desired matrix Q? > > Thank you > Tobias > > -- One trouble is that despite this system, anyone who reads journals widely and critically is forced to realize that there are scarcely any bars to eventual publication. There seems to be no study too fragmented, no hypothesis too trivial, no literature citation too biased or too egotistical, no design too warped, no methodology too bungled, no presentation of results too inaccurate, too obscure, and too contradictory, no analysis too self-serving, no argument too circular, no conclusions too trifling or too unjustified, and no grammar and syntax too offensive for a paper to end up in print. -- Drummond Rennie From zonexo at gmail.com Sun Dec 31 01:31:21 2006 From: zonexo at gmail.com (Ben Tay) Date: Sun, 31 Dec 2006 15:31:21 +0800 Subject: How to code for parallel computing using PETSC in CFD Message-ID: <804ab5d40612302331m1c49689ax88f178dc377412c3@mail.gmail.com> Hi, I'm now trying to modify my source code to enable parallel computing. I tried to use the tutorial example and I managed to get it working. However, in the example, there are a lot of "if"s statement which is not efficient. In my CFD code, I've subroutine meant for corner cells, north, south, east , west and finally internal cells. How should I modify my code then? My current idea is to insert a check statement into each subroutine ie " if II>=Istart and II<=Iend-1 then ...." That's the simplest and least modification required. But does anyone know a better way? Thanks and happy new year to all! -------------- next part -------------- An HTML attachment was scrubbed... URL: