From C.Klaij at marin.nl Fri Jul 2 04:01:54 2010 From: C.Klaij at marin.nl (Klaij, Christiaan) Date: Fri, 2 Jul 2010 09:01:54 +0000 Subject: [petsc-users] PCSide in fortran? Message-ID: Hi, My preconditioner is supposed to be applied to the right, so I would like to use PCSide but I'm confused how to use it in my Fortran code. An example would be most welcome. Chris dr. ir.ChristiaanKlaij CFD Researcher Research & Development E mailto:C.Klaij at marin.nl T +31 317 49 33 44M MARIN 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl ----------------------------- [Insert your disclaimer here] ----------------------------- From bsmith at mcs.anl.gov Fri Jul 2 08:35:39 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Fri, 2 Jul 2010 08:35:39 -0500 Subject: [petsc-users] PCSide in fortran? In-Reply-To: References: Message-ID: <93F3D93B-EAED-45C9-A6AF-D104B8D8133B@mcs.anl.gov> #include "finclude/petsckspdef.h" #include "finclude/petscksp.h" ...... call KSPSetSide(ksp,PC_RIGHT,ierr) On Jul 2, 2010, at 4:01 AM, Klaij, Christiaan wrote: > Hi, > > My preconditioner is supposed to be applied to the right, so I would like to use PCSide but I'm confused how to use it in my Fortran code. An example would be most welcome. > > Chris > > > dr. ir.ChristiaanKlaij > CFD Researcher > Research & Development > E mailto:C.Klaij at marin.nl > T +31 317 49 33 44M > > MARIN > 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands > T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl > > > > ----------------------------- > [Insert your disclaimer here] > ----------------------------- > From xxy113 at psu.edu Fri Jul 2 13:08:14 2010 From: xxy113 at psu.edu (Xuan YU) Date: Fri, 2 Jul 2010 14:08:14 -0400 Subject: [petsc-users] help about my ts program In-Reply-To: <8739wdst9w.fsf@59A2.org> References: <1277248172l.811066l.0l@psu.edu> <87631au043.fsf@59A2.org> <8739wdst9w.fsf@59A2.org> Message-ID: <22E9EC70-6365-45DE-A4D0-5754E43CABF3@psu.edu> On Jun 23, 2010, at 10:44 AM, Jed Brown wrote: > On Wed, 23 Jun 2010 10:22:19 -0400, Xuan YU wrote: >> I got the correct results! Thanks! >> >> Could you please tell me whether I can use TS to solve ODE without >> providing Jacobian matrix? > > Sure, use -snes_mf to solve it without assembling any matrix (linear > systems are solved with an unpreconditioned Krylov method). Note that > this usually will not converge for larger problems. To assemble a > dense > matrix by finite differencing, you can use -snes_fd. If I don't provide Jacobian, it will be: type: euler total number of nonlinear solver iterations=0 total number of linear solver iterations=0 > > To use coloring to compute a sparse matrix efficiently, you have to > know > the sparsity pattern of the Jacobian, try something like (this is > somewhat different in petsc-dev than release). > > ISColoring iscoloring; > ierr = DAGetColoring(rd- > >da,IS_COLORING_GLOBAL,MATAIJ,&iscoloring);CHKERRQ(ierr); > ierr = > MatFDColoringCreate(B,iscoloring,&matfdcoloring);CHKERRQ(ierr); > ierr = ISColoringDestroy(iscoloring);CHKERRQ(ierr); > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode(*) > (void))SNESTSFormFunction,ts);CHKERRQ(ierr); > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > ierr = > SNESSetJacobian > (snes > ,A,B,SNESDefaultComputeJacobianColor,matfdcoloring);CHKERRQ(ierr); > > Jed > Now I added coloring ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr); ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr); ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr); ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr); ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr); ierr=DACreate2d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_STAR, 1,1,PETSC_DECIDE,PETSC_DECIDE, 1,1,PETSC_NULL,PETSC_NULL,&da);CHKERRQ(ierr); DACreateGlobalVector(da,&CV_Y); ierr = DAGetColoring(da,IS_COLORING_GLOBAL,MATAIJ,&iscoloring);CHKERRQ(ierr); DAGetMatrix(da,MATAIJ,&J); MatFDColoringCreate(J,iscoloring,&matfdcoloring); ISColoringDestroy(iscoloring); ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,da);CHKERRQ(ierr); MatFDColoringSetFromOptions(matfdcoloring); TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); ierr = TSSetType(ts,TSPSEUDO);CHKERRQ(ierr); ierr = TSSetInitialTimeStep(ts,0,1.0);CHKERRQ(ierr); ierr = TSSetDuration(ts,cData.EndTime,cData.EndTime);CHKERRQ(ierr); ierr = TSSetFromOptions(ts);CHKERRQ(ierr); ierr = TSSetUp(ts);CHKERRQ(ierr); ierr = TSStep(ts,&its,&ftime);CHKERRQ(ierr); When I run the code, I got the following: [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Floating point exception! [0]PETSC ERROR: User provided compute function generated a Not-a-Number! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 2, Fri Apr 30 20:23:44 CDT 2010 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: ./pihm on a linux-gnu named lionxi.rcc.psu.edu by xxy113 Fri Jul 2 13:53:44 2010 [0]PETSC ERROR: Libraries linked from /gpfs/home/xxy113/soft/petsc-3.1- p2/linux-gnu-c-debug/lib [0]PETSC ERROR: Configure run at Tue May 11 13:53:58 2010 [0]PETSC ERROR: Configure options --with-cc=gcc --download-f-blas- lapack=1 --download-mpich=1 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: SNESSolve_LS() line 168 in src/snes/impls/ls/ls.c [0]PETSC ERROR: SNESSolve() line 2255 in src/snes/interface/snes.c [0]PETSC ERROR: TSStep_Pseudo() line 163 in src/ts/impls/pseudo/ posindep.c [0]PETSC ERROR: TSStep() line 1693 in src/ts/interface/ts.c [0]PETSC ERROR: User provided function() line 216 in /work/petsc/ pihm.c(which is ierr = TSStep(ts,&its,&ftime);CHKERRQ(ierr);) Could you please tell me how to check where is my problem? Xuan YU xxy113 at psu.edu From bsmith at mcs.anl.gov Fri Jul 2 13:12:41 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Fri, 2 Jul 2010 13:12:41 -0500 Subject: [petsc-users] help about my ts program In-Reply-To: <22E9EC70-6365-45DE-A4D0-5754E43CABF3@psu.edu> References: <1277248172l.811066l.0l@psu.edu> <87631au043.fsf@59A2.org> <8739wdst9w.fsf@59A2.org> <22E9EC70-6365-45DE-A4D0-5754E43CABF3@psu.edu> Message-ID: <2BB6256B-6222-44EB-8CBC-AAE8BF465EDA@mcs.anl.gov> You still need to tell it what TS method you want, such as -ts_type beuler It just defaults to euler if you don't tell it anything. Barry On Jul 2, 2010, at 1:08 PM, Xuan YU wrote: > > On Jun 23, 2010, at 10:44 AM, Jed Brown wrote: > >> On Wed, 23 Jun 2010 10:22:19 -0400, Xuan YU wrote: >>> I got the correct results! Thanks! >>> >>> Could you please tell me whether I can use TS to solve ODE without >>> providing Jacobian matrix? >> >> Sure, use -snes_mf to solve it without assembling any matrix (linear >> systems are solved with an unpreconditioned Krylov method). Note that >> this usually will not converge for larger problems. To assemble a dense >> matrix by finite differencing, you can use -snes_fd. > > If I don't provide Jacobian, it will be: type: euler > total number of nonlinear solver iterations=0 > total number of linear solver iterations=0 > > > > > >> >> To use coloring to compute a sparse matrix efficiently, you have to know >> the sparsity pattern of the Jacobian, try something like (this is >> somewhat different in petsc-dev than release). >> >> ISColoring iscoloring; >> ierr = DAGetColoring(rd->da,IS_COLORING_GLOBAL,MATAIJ,&iscoloring);CHKERRQ(ierr); >> ierr = MatFDColoringCreate(B,iscoloring,&matfdcoloring);CHKERRQ(ierr); >> ierr = ISColoringDestroy(iscoloring);CHKERRQ(ierr); >> ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode(*)(void))SNESTSFormFunction,ts);CHKERRQ(ierr); >> ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); >> ierr = SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobianColor,matfdcoloring);CHKERRQ(ierr); >> >> Jed >> > > > Now I added coloring > > ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr); > ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr); > ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr); > ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr); > ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr); > ierr=DACreate2d(PETSC_COMM_WORLD,DA_NONPERIODIC,DA_STENCIL_STAR,1,1,PETSC_DECIDE,PETSC_DECIDE, > 1,1,PETSC_NULL,PETSC_NULL,&da);CHKERRQ(ierr); > DACreateGlobalVector(da,&CV_Y); > ierr = DAGetColoring(da,IS_COLORING_GLOBAL,MATAIJ,&iscoloring);CHKERRQ(ierr); > DAGetMatrix(da,MATAIJ,&J); > MatFDColoringCreate(J,iscoloring,&matfdcoloring); > ISColoringDestroy(iscoloring); > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,da);CHKERRQ(ierr); > MatFDColoringSetFromOptions(matfdcoloring); > TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > ierr = TSSetType(ts,TSPSEUDO);CHKERRQ(ierr); > ierr = TSSetInitialTimeStep(ts,0,1.0);CHKERRQ(ierr); > ierr = TSSetDuration(ts,cData.EndTime,cData.EndTime);CHKERRQ(ierr); > ierr = TSSetFromOptions(ts);CHKERRQ(ierr); > ierr = TSSetUp(ts);CHKERRQ(ierr); > ierr = TSStep(ts,&its,&ftime);CHKERRQ(ierr); > > > When I run the code, I got the following: > > [0]PETSC ERROR: --------------------- Error Message ------------------------------------ > [0]PETSC ERROR: Floating point exception! > [0]PETSC ERROR: User provided compute function generated a Not-a-Number! > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 2, Fri Apr 30 20:23:44 CDT 2010 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: ./pihm on a linux-gnu named lionxi.rcc.psu.edu by xxy113 Fri Jul 2 13:53:44 2010 > [0]PETSC ERROR: Libraries linked from /gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-debug/lib > [0]PETSC ERROR: Configure run at Tue May 11 13:53:58 2010 > [0]PETSC ERROR: Configure options --with-cc=gcc --download-f-blas-lapack=1 --download-mpich=1 > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: SNESSolve_LS() line 168 in src/snes/impls/ls/ls.c > [0]PETSC ERROR: SNESSolve() line 2255 in src/snes/interface/snes.c > [0]PETSC ERROR: TSStep_Pseudo() line 163 in src/ts/impls/pseudo/posindep.c > [0]PETSC ERROR: TSStep() line 1693 in src/ts/interface/ts.c > [0]PETSC ERROR: User provided function() line 216 in /work/petsc/pihm.c(which is ierr = TSStep(ts,&its,&ftime);CHKERRQ(ierr);) > > Could you please tell me how to check where is my problem? > > > Xuan YU > xxy113 at psu.edu > > > > From jed at 59A2.org Fri Jul 2 13:21:42 2010 From: jed at 59A2.org (Jed Brown) Date: Fri, 02 Jul 2010 12:21:42 -0600 Subject: [petsc-users] help about my ts program In-Reply-To: <22E9EC70-6365-45DE-A4D0-5754E43CABF3@psu.edu> References: <1277248172l.811066l.0l@psu.edu> <87631au043.fsf@59A2.org> <8739wdst9w.fsf@59A2.org> <22E9EC70-6365-45DE-A4D0-5754E43CABF3@psu.edu> Message-ID: <878w5tu4ll.fsf@59A2.org> On Fri, 2 Jul 2010 14:08:14 -0400, Xuan YU wrote: > If I don't provide Jacobian, it will be: type: euler > total number of nonlinear solver iterations=0 > total number of linear solver iterations=0 The default TS is the simplest possible integrator, forward Euler. Of course this doesn't do any solves (no SNES) and is not appropriate for stiff systems. Run with -ts_type theta for something more likely to work (and which will use SNES). > [0]PETSC ERROR: Floating point exception! > [0]PETSC ERROR: User provided compute function generated a Not-a-Number! Euler is unstable for your problem, this should have nothing to do with the way you specified the Jacobian. Jed From xxy113 at psu.edu Fri Jul 2 13:44:25 2010 From: xxy113 at psu.edu (Xuan YU) Date: Fri, 2 Jul 2010 14:44:25 -0400 Subject: [petsc-users] help about my ts program In-Reply-To: <878w5tu4ll.fsf@59A2.org> References: <1277248172l.811066l.0l@psu.edu> <87631au043.fsf@59A2.org> <8739wdst9w.fsf@59A2.org> <22E9EC70-6365-45DE-A4D0-5754E43CABF3@psu.edu> <878w5tu4ll.fsf@59A2.org> Message-ID: On Jul 2, 2010, at 2:21 PM, Jed Brown wrote: > On Fri, 2 Jul 2010 14:08:14 -0400, Xuan YU wrote: >> If I don't provide Jacobian, it will be: type: euler >> total number of nonlinear solver >> iterations=0 >> total number of linear solver iterations=0 > > The default TS is the simplest possible integrator, forward Euler. Of > course this doesn't do any solves (no SNES) and is not appropriate for > stiff systems. Run with -ts_type theta for something more likely to > work (and which will use SNES). > >> [0]PETSC ERROR: Floating point exception! >> [0]PETSC ERROR: User provided compute function generated a Not-a- >> Number! > > Euler is unstable for your problem, this should have nothing to do > with > the way you specified the Jacobian. > I tried beuler and pseudo, and I got the errors: >> [0]PETSC ERROR: Floating point exception! >> [0]PETSC ERROR: User provided compute function generated a Not-a- >> Number! [0]PETSC ERROR: User provided function() line 216 in /work/ petsc/pihm.c(which is ierr = TSStep(ts,&its,&ftime);CHKERRQ(ierr);) > Jed > Xuan YU xxy113 at psu.edu From jed at 59A2.org Fri Jul 2 18:57:12 2010 From: jed at 59A2.org (Jed Brown) Date: Fri, 02 Jul 2010 17:57:12 -0600 Subject: [petsc-users] help about my ts program In-Reply-To: References: <1277248172l.811066l.0l@psu.edu> <87631au043.fsf@59A2.org> <8739wdst9w.fsf@59A2.org> <22E9EC70-6365-45DE-A4D0-5754E43CABF3@psu.edu> <878w5tu4ll.fsf@59A2.org> Message-ID: <87wrtdsahz.fsf@59A2.org> On Fri, 2 Jul 2010 14:44:25 -0400, Xuan YU wrote: > > On Jul 2, 2010, at 2:21 PM, Jed Brown wrote: > > > On Fri, 2 Jul 2010 14:08:14 -0400, Xuan YU wrote: > >> If I don't provide Jacobian, it will be: type: euler > >> total number of nonlinear solver > >> iterations=0 > >> total number of linear solver iterations=0 > > > > The default TS is the simplest possible integrator, forward Euler. Of > > course this doesn't do any solves (no SNES) and is not appropriate for > > stiff systems. Run with -ts_type theta for something more likely to > > work (and which will use SNES). > > > >> [0]PETSC ERROR: Floating point exception! > >> [0]PETSC ERROR: User provided compute function generated a Not-a- > >> Number! > > > > Euler is unstable for your problem, this should have nothing to do > > with > > the way you specified the Jacobian. > > > > > I tried beuler and pseudo, and I got the errors: If you have petsc-dev, run in a debugger with -fp_trap to see where the NaN is first computed. Some possibilities include domain error (like negative density), nonlinear instability, and inadequate solution of the linear system. Jed From C.Klaij at marin.nl Mon Jul 5 01:27:05 2010 From: C.Klaij at marin.nl (Klaij, Christiaan) Date: Mon, 5 Jul 2010 06:27:05 +0000 Subject: [petsc-users] PCSide in fortran? Message-ID: Barry, Thanks for pointing that out! It's working now. Chris Date: Fri, 2 Jul 2010 08:35:39 -0500 From: Barry Smith Subject: Re: [petsc-users] PCSide in fortran? To: PETSc users list Message-ID: <93F3D93B-EAED-45C9-A6AF-D104B8D8133B at mcs.anl.gov> Content-Type: text/plain; charset=us-ascii #include "finclude/petsckspdef.h" #include "finclude/petscksp.h" ...... call KSPSetSide(ksp,PC_RIGHT,ierr) dr. ir.ChristiaanKlaij CFD Researcher Research & Development E mailto:C.Klaij at marin.nl T +31 317 49 33 44M MARIN 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl ----------------------------- [Insert your disclaimer here] ----------------------------- From thomas.witkowski at tu-dresden.de Mon Jul 5 08:22:50 2010 From: thomas.witkowski at tu-dresden.de (Thomas Witkowski) Date: Mon, 05 Jul 2010 15:22:50 +0200 Subject: [petsc-users] How to debug problem with MatSetValues Message-ID: <4C31DCAA.7000604@tu-dresden.de> Hi, I've some trouble with matrix values that are set by MatSetValues, but are missing in the final matrix. I can reduce the problem to a 75x75 matrix that is created on four processors. I create it quite simple with: MatCreateMPIAIJ(PETSC_COMM_WORLD, 12, 12, 75, 75, petscMatrix) on p0 MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p1 MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p2 MatCreateMPIAIJ(PETSC_COMM_WORLD, 27, 27, 75, 75, petscMatrix) on p3 On all processors, the values are set with the following command: MatSetValues(petscMatrix, 1, &rowIndex, cols.size(), &(cols[0]), &(values[0]), ADD_VALUES); where rowIndex is an integer, cols is of type std::vector and values if of type std::vector. Before MatSetValues is called, I run over the arrays and print all the entries that are added to the matrix. Finally, MatAssemblyBegin(petscMatrix, MAT_FINAL_ASSEMBLY); MatAssemblyEnd(petscMatrix, MAT_FINAL_ASSEMBLY); are called. To check the matrix, I use the option -mat_view_matlab. Okay, now some of the entries are missing and I've absolute no idea what I did wrong (i.e. entry row 48-col 69, which is only once by rank 3). What is the best way to debug the problem? I use petsc 3.0.0p11, which is compiled in debug mode. My code is also compiled in debug mode and valgrind does not report any errors. Thanks for any suggestions. Thomas From knepley at gmail.com Mon Jul 5 09:11:15 2010 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 5 Jul 2010 16:11:15 +0200 Subject: [petsc-users] How to debug problem with MatSetValues In-Reply-To: <4C31DCAA.7000604@tu-dresden.de> References: <4C31DCAA.7000604@tu-dresden.de> Message-ID: On Mon, Jul 5, 2010 at 3:22 PM, Thomas Witkowski < thomas.witkowski at tu-dresden.de> wrote: > Hi, > > I've some trouble with matrix values that are set by MatSetValues, but are > missing in the final matrix. I can reduce the problem to a 75x75 matrix that > is created on four processors. I create it quite simple with: > > MatCreateMPIAIJ(PETSC_COMM_WORLD, 12, 12, 75, 75, petscMatrix) on p0 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p1 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p2 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 27, 27, 75, 75, petscMatrix) on p3 > > On all processors, the values are set with the following command: > > MatSetValues(petscMatrix, 1, &rowIndex, cols.size(), &(cols[0]), > &(values[0]), ADD_VALUES); > > where rowIndex is an integer, cols is of type std::vector and values > if of type std::vector. Before I do not think this is always kosher. std::vector<> may store values however it wants (perhaps in a contiguous array). std::valarray<> I believe mandates a contiguous array, however even it does not give you access to the explicit pointer (you have to use &v[0] nonsense). Reasons to hate the STL. > MatSetValues is called, I run over the arrays and print all the entries > that are added to the matrix. Finally, > > MatAssemblyBegin(petscMatrix, MAT_FINAL_ASSEMBLY); > MatAssemblyEnd(petscMatrix, MAT_FINAL_ASSEMBLY); > > are called. To check the matrix, I use the option -mat_view_matlab. Okay, > now some of the entries are missing and I've absolute no idea what I did > wrong (i.e. entry row 48-col 69, which is only once by rank 3). What is the > best way to debug the problem? I use petsc 3.0.0p11, which is compiled in > debug mode. My code is also compiled in debug mode and valgrind does not > report any errors. Thanks for any suggestions. MatAssemble and MatView after every insertion. Matt > > Thomas > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From jed at 59A2.org Mon Jul 5 09:21:33 2010 From: jed at 59A2.org (Jed Brown) Date: Mon, 05 Jul 2010 08:21:33 -0600 Subject: [petsc-users] How to debug problem with MatSetValues In-Reply-To: <4C31DCAA.7000604@tu-dresden.de> References: <4C31DCAA.7000604@tu-dresden.de> Message-ID: <87lj9qrouq.fsf@59A2.org> On Mon, 05 Jul 2010 15:22:50 +0200, Thomas Witkowski wrote: > Hi, > > I've some trouble with matrix values that are set by MatSetValues, but > are missing in the final matrix. I can reduce the problem to a 75x75 > matrix that is created on four processors. I create it quite simple with: > > MatCreateMPIAIJ(PETSC_COMM_WORLD, 12, 12, 75, 75, petscMatrix) on p0 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p1 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p2 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 27, 27, 75, 75, petscMatrix) on p3 > > On all processors, the values are set with the following command: > > MatSetValues(petscMatrix, 1, &rowIndex, cols.size(), &(cols[0]), > &(values[0]), ADD_VALUES); > > where rowIndex is an integer, cols is of type std::vector and > values if of type std::vector. Before MatSetValues is called, I > run over the arrays and print all the entries that are added to the > matrix. Finally, > > MatAssemblyBegin(petscMatrix, MAT_FINAL_ASSEMBLY); > MatAssemblyEnd(petscMatrix, MAT_FINAL_ASSEMBLY); > > are called. To check the matrix, I use the option -mat_view_matlab. > Okay, now some of the entries are missing and I've absolute no idea what > I did wrong (i.e. entry row 48-col 69, which is only once by rank 3). Are you checking (49,70) in Matlab (PETSc uses 0-based indexing)? When you say the value is missing, is it equal to zero, or not existent in the sparsity pattern? Can you confirm that MatSetValues is really being called with rowIndex=48 and cols containing 69 (e.g. by setting a breakpoint there)? Matt, std::vector is guaranteed to be contiguous in revisions of C++98 and subsequent draft standards. I think all implementations observe this. http://stackoverflow.com/questions/247738/is-it-safe-to-assume-that-stl-vector-storage-is-always-contiguous Jed From thomas.witkowski at tu-dresden.de Mon Jul 5 09:27:45 2010 From: thomas.witkowski at tu-dresden.de (Thomas Witkowski) Date: Mon, 05 Jul 2010 16:27:45 +0200 Subject: [petsc-users] How to debug problem with MatSetValues In-Reply-To: References: <4C31DCAA.7000604@tu-dresden.de> Message-ID: <4C31EBE1.9080302@tu-dresden.de> Matthew Knepley wrote: > On Mon, Jul 5, 2010 at 3:22 PM, Thomas Witkowski > > wrote: > > Hi, > > I've some trouble with matrix values that are set by MatSetValues, > but are missing in the final matrix. I can reduce the problem to a > 75x75 matrix that is created on four processors. I create it quite > simple with: > > MatCreateMPIAIJ(PETSC_COMM_WORLD, 12, 12, 75, 75, petscMatrix) on p0 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p1 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p2 > MatCreateMPIAIJ(PETSC_COMM_WORLD, 27, 27, 75, 75, petscMatrix) on p3 > > On all processors, the values are set with the following command: > > MatSetValues(petscMatrix, 1, &rowIndex, cols.size(), &(cols[0]), > &(values[0]), ADD_VALUES); > > where rowIndex is an integer, cols is of type std::vector and > values if of type std::vector. Before > > > I do not think this is always kosher. std::vector<> may store values > however it wants (perhaps in a > contiguous array). std::valarray<> I believe mandates a contiguous > array, however even it does not > give you access to the explicit pointer (you have to use &v[0] > nonsense). Reasons to hate the STL. This is guaranteed by the C++ standard, so this shouldn't be the problem: A vector's storage is guaranteed to be contiguous. From ISO 14882, 2nd ed., 23.2.4 [lib.vector]: "The elements of a vector are stored contiguously, meaning that if v is a vector where T is some type other than bool, then it obeys the identity &v[n] == &v[0] + n for all 0 <= n < v.size()." > > > MatSetValues is called, I run over the arrays and print all the > entries that are added to the matrix. Finally, > > MatAssemblyBegin(petscMatrix, MAT_FINAL_ASSEMBLY); > MatAssemblyEnd(petscMatrix, MAT_FINAL_ASSEMBLY); > > are called. To check the matrix, I use the option > -mat_view_matlab. Okay, now some of the entries are missing and > I've absolute no idea what I did wrong (i.e. entry row 48-col 69, > which is only once by rank 3). What is the best way to debug the > problem? I use petsc 3.0.0p11, which is compiled in debug mode. My > code is also compiled in debug mode and valgrind does not report > any errors. Thanks for any suggestions. > > > MatAssemble and MatView after every insertion. Good idea, will try it. Thomas > > Matt > > > > Thomas > > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which > their experiments lead. > -- Norbert Wiener From nemanja.ilic.81 at gmail.com Tue Jul 6 11:43:16 2010 From: nemanja.ilic.81 at gmail.com (=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)) Date: Tue, 6 Jul 2010 18:43:16 +0200 Subject: [petsc-users] Petsc parallel processing from a library, without "mpiexec -np ..." Message-ID: <201007061843.16264.nemanja.ilic.81@gmail.com> Hello, I am currently working on a project involving Petsc library. My core library that uses Petsc has several functionalities that are invoked via function calls. Is there a way to call these functions from another library and to have parallel processing, without using "mpiexec -np ..." command line format? Thank you in advance, Best regards, Nemanja Ilic From jed at 59A2.org Tue Jul 6 12:07:46 2010 From: jed at 59A2.org (Jed Brown) Date: Tue, 06 Jul 2010 11:07:46 -0600 Subject: [petsc-users] Petsc parallel processing from a library, without "mpiexec -np ..." In-Reply-To: <201007061843.16264.nemanja.ilic.81@gmail.com> References: <201007061843.16264.nemanja.ilic.81@gmail.com> Message-ID: <87r5jgr125.fsf@59A2.org> On Tue, 6 Jul 2010 18:43:16 +0200, "=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)" wrote: > Hello, > > I am currently working on a project involving Petsc library. My core > library that uses Petsc has several functionalities that are invoked > via function calls. Is there a way to call these functions from > another library and to have parallel processing, without using > "mpiexec -np ..." command line format? This is more of an MPI question, and it's relatively advanced usage, but you can see the process management chapter (10) of the MPI-2.2 standard. It's often easier to have a parallel program that does most of it's work redundantly (or on process 0), than to have a serial program that "calls" a distributed memory library, since that "call" usually involves spawning processes on remote hosts. Jed From aron.ahmadia at kaust.edu.sa Tue Jul 6 12:13:34 2010 From: aron.ahmadia at kaust.edu.sa (Aron Ahmadia) Date: Tue, 6 Jul 2010 20:13:34 +0300 Subject: [petsc-users] Petsc parallel processing from a library, without "mpiexec -np ..." In-Reply-To: <201007061843.16264.nemanja.ilic.81@gmail.com> References: <201007061843.16264.nemanja.ilic.81@gmail.com> Message-ID: Dear Nemanja, Welcome to PETSc! It is important to note that PETSc's parallel functionality is implemented on top of MPI. Your MPI vendor (Microsoft, MPICH, OpenMPI, etc...) is responsible for providing you the interface for launching your jobs in parallel, PETSc does not care how your MPI jobs are launched. Although mpiexec is the standard on UNIXy-style operating systems and distributions, it is not uncommon to see graphical interfaces for launching these programs in the OS X and Microsoft HPC worlds. I suggest that you raise this question with the implementors/providers of your MPI libraries (PETSc downloads and installs mpich: http://www.mcs.anl.gov/research/projects/mpich2/ for you in many standard configurations). Good luck, Aron On Tue, Jul 6, 2010 at 7:43 PM, ?????? ???? (Nemanja Ilic) < nemanja.ilic.81 at gmail.com> wrote: > Hello, > > I am currently working on a project involving Petsc library. My core > library that uses Petsc has several functionalities that are invoked via > function calls. Is there a way to call these functions from another library > and to have parallel processing, without using "mpiexec -np ..." command > line format? > > Thank you in advance, > Best regards, > Nemanja Ilic > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Tue Jul 6 13:45:11 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Tue, 6 Jul 2010 13:45:11 -0500 (CDT) Subject: [petsc-users] Petsc parallel processing from a library, without "mpiexec -np ..." In-Reply-To: References: <201007061843.16264.nemanja.ilic.81@gmail.com> Message-ID: One additional point: If using 'parallel processing' - then you shouldn't be trying to circumvent this part of MPI standard [mpiexec -n]. And if you are primarily doing sequential stuff - you can build PETSc with '--with-mpi=0' [so MPI is not used. However when working with multiple MPI software packages there could be issues here - so its recommended to use a proper MPI impl like MPICH2 across all these software packages] Satish On Tue, 6 Jul 2010, Aron Ahmadia wrote: > Dear Nemanja, > > Welcome to PETSc! It is important to note that PETSc's parallel > functionality is implemented on top of MPI. Your MPI vendor (Microsoft, > MPICH, OpenMPI, etc...) is responsible for providing you the interface for > launching your jobs in parallel, PETSc does not care how your MPI jobs are > launched. Although mpiexec is the standard on UNIXy-style operating systems > and distributions, it is not uncommon to see graphical interfaces for > launching these programs in the OS X and Microsoft HPC worlds. > > I suggest that you raise this question with the implementors/providers of > your MPI libraries (PETSc downloads and installs mpich: > http://www.mcs.anl.gov/research/projects/mpich2/ for you in many standard > configurations). > > Good luck, > Aron > > On Tue, Jul 6, 2010 at 7:43 PM, ?????? ???? (Nemanja Ilic) < > nemanja.ilic.81 at gmail.com> wrote: > > > Hello, > > > > I am currently working on a project involving Petsc library. My core > > library that uses Petsc has several functionalities that are invoked via > > function calls. Is there a way to call these functions from another library > > and to have parallel processing, without using "mpiexec -np ..." command > > line format? > > > > Thank you in advance, > > Best regards, > > Nemanja Ilic > > > From thomas.witkowski at tu-dresden.de Wed Jul 7 07:20:11 2010 From: thomas.witkowski at tu-dresden.de (Thomas Witkowski) Date: Wed, 07 Jul 2010 14:20:11 +0200 Subject: [petsc-users] How to debug problem with MatSetValues In-Reply-To: <87lj9qrouq.fsf@59A2.org> References: <4C31DCAA.7000604@tu-dresden.de> <87lj9qrouq.fsf@59A2.org> Message-ID: <4C3470FB.6010205@tu-dresden.de> Jed Brown wrote: > On Mon, 05 Jul 2010 15:22:50 +0200, Thomas Witkowski wrote: > >> Hi, >> >> I've some trouble with matrix values that are set by MatSetValues, but >> are missing in the final matrix. I can reduce the problem to a 75x75 >> matrix that is created on four processors. I create it quite simple with: >> >> MatCreateMPIAIJ(PETSC_COMM_WORLD, 12, 12, 75, 75, petscMatrix) on p0 >> MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p1 >> MatCreateMPIAIJ(PETSC_COMM_WORLD, 18, 18, 75, 75, petscMatrix) on p2 >> MatCreateMPIAIJ(PETSC_COMM_WORLD, 27, 27, 75, 75, petscMatrix) on p3 >> >> On all processors, the values are set with the following command: >> >> MatSetValues(petscMatrix, 1, &rowIndex, cols.size(), &(cols[0]), >> &(values[0]), ADD_VALUES); >> >> where rowIndex is an integer, cols is of type std::vector and >> values if of type std::vector. Before MatSetValues is called, I >> run over the arrays and print all the entries that are added to the >> matrix. Finally, >> >> MatAssemblyBegin(petscMatrix, MAT_FINAL_ASSEMBLY); >> MatAssemblyEnd(petscMatrix, MAT_FINAL_ASSEMBLY); >> >> are called. To check the matrix, I use the option -mat_view_matlab. >> Okay, now some of the entries are missing and I've absolute no idea what >> I did wrong (i.e. entry row 48-col 69, which is only once by rank 3). >> > > Are you checking (49,70) in Matlab (PETSc uses 0-based indexing)? When > you say the value is missing, is it equal to zero, or not existent in > the sparsity pattern? > Thanks Jed, I`ve totally forgotten that Matlab indices are 1-based! That was the whole problem. Thomas > Can you confirm that MatSetValues is really being called with > rowIndex=48 and cols containing 69 (e.g. by setting a breakpoint there)? > > > Matt, std::vector is guaranteed to be contiguous in revisions of C++98 > and subsequent draft standards. I think all implementations observe > this. > > http://stackoverflow.com/questions/247738/is-it-safe-to-assume-that-stl-vector-storage-is-always-contiguous > > Jed > > From luke.bloy at gmail.com Wed Jul 7 10:17:42 2010 From: luke.bloy at gmail.com (Luke Bloy) Date: Wed, 07 Jul 2010 11:17:42 -0400 Subject: [petsc-users] Slepc - SVD routines Message-ID: <4C349A96.9070604@gmail.com> Hi, First off I apologize for the slepc question, they don't have a users lists so I'm hoping someone on here might be able to offer some guidance. Problem: I'm working on a graph partitioning problem. Basically I have the laplacian of a large graph and am interested in extracting its connected sub components. An approach is to compute the smallest eigenvalues and eigenvectors of the laplacian matrix. it is known that the lowest eigenvalue of the laplacian is 0, and has a multiplicity of K if the graph has K subcomponents. These subcomponents can be extracted from the smallest eigenvectors. Question: What is the best approach within slepc to attack this problem? I've been using SVD solvers using the LANCOS method to attack this problem, but sometimes have convergence problems. I know one of the smallest eigen vectors is the vector of all ones, and have tried to initialize the svd solver with this vector but this has led to very strange problems. Would I be better off using one of the EPS solvers? If so which can correctly extract multiplicities of eigenvalues? Thanks, Luke From jroman at dsic.upv.es Wed Jul 7 11:33:51 2010 From: jroman at dsic.upv.es (Jose E. Roman) Date: Wed, 7 Jul 2010 18:33:51 +0200 Subject: [petsc-users] Slepc - SVD routines In-Reply-To: <4C349A96.9070604@gmail.com> References: <4C349A96.9070604@gmail.com> Message-ID: On 07/07/2010, Luke Bloy wrote: > Hi, > > First off I apologize for the slepc question, they don't have a users lists so I'm hoping someone on here might be able to offer some guidance. > > Problem: > I'm working on a graph partitioning problem. Basically I have the laplacian of a large graph and am interested in extracting its connected sub components. An approach is to compute the smallest eigenvalues and eigenvectors of the laplacian matrix. it is known that the lowest eigenvalue of the laplacian is 0, and has a multiplicity of K if the graph has K subcomponents. These subcomponents can be extracted from the smallest eigenvectors. > > Question: > What is the best approach within slepc to attack this problem? > > I've been using SVD solvers using the LANCOS method to attack this problem, but sometimes have convergence problems. I know one of the smallest eigen vectors is the vector of all ones, and have tried to initialize the svd solver with this vector but this has led to very strange problems. > > Would I be better off using one of the EPS solvers? If so which can correctly extract multiplicities of eigenvalues? > > Thanks, > Luke SLEPc's example 11 (http://www.grycap.upv.es/slepc/documentation/current/src/examples/ex11.c.html ) computes the Fiedler vector of a graph, i.e., the second eigenvector of the Laplacian (assuming a connected graph). The example uses EPS because for symmetric (semi-)definite matrices the singular value decomposition is equal to the eigendecomposition. In your case, you want to explicitly compute the eigenspace associated to the zero eigenvalue. Then you can simply use ex1.c choosing the smallest eigenvalues (e.g. with the flag -eps_smallest_real). The default EPS solver (Krylov-Schur) shouldn't have any problems with multiple zero eigenvalues. If you can't get it work, contact us at the slepc-maint email address. Regards, Jose From xxy113 at psu.edu Wed Jul 7 11:42:52 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 7 Jul 2010 12:42:52 -0400 Subject: [petsc-users] my code runs too slow Message-ID: Hi, I finite difference Jacobian approximation for my TS model. The size of the vector is 2500. I got the following info with(-ts_view): type: beuler maximum steps=50 maximum time=50 total number of nonlinear solver iterations=647 total number of linear solver iterations=647 SNES Object: type: ls line search variant: SNESLineSearchCubic alpha=0.0001, maxstep=1e+08, minlambda=1e-12 maximum iterations=50, maximum function evaluations=10000 tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 total number of linear solver iterations=50 total number of function evaluations=51 KSP Object: type: gmres 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 left preconditioning using PRECONDITIONED norm type for convergence test PC Object: type: ilu ILU: out-of-place factorization 0 levels of fill tolerance for zero pivot 1e-12 using diagonal shift to prevent zero pivot matrix ordering: natural factor fill ratio given 1, needed 1 Factored matrix follows: Matrix Object: type=seqaij, rows=1830, cols=1830 package used to perform factorization: petsc total: nonzeros=1830, allocated nonzeros=1830 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Matrix Object: type=seqaij, rows=1830, cols=1830 total: nonzeros=1830, allocated nonzeros=29280 total number of mallocs used during MatSetValues calls =1830 not using I-node routines 50 output time step takes me 11.877s. So I guess there is something not appropriate with my Jacobian Matrix. Could you please tell me how to speed up my code? Thanks! Xuan YU xxy113 at psu.edu From balay at mcs.anl.gov Wed Jul 7 11:51:17 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 7 Jul 2010 11:51:17 -0500 (CDT) Subject: [petsc-users] my code runs too slow In-Reply-To: References: Message-ID: > total: nonzeros=1830, allocated nonzeros=29280 > total number of mallocs used during MatSetValues calls =1830 There is something wrong with your preallocation or matrix assembly. You should see zero mallocs for efficient assembly. http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly satish On Wed, 7 Jul 2010, Xuan YU wrote: > Hi, > > I finite difference Jacobian approximation for my TS model. The size of the > vector is 2500. I got the following info with(-ts_view): > > type: beuler > maximum steps=50 > maximum time=50 > total number of nonlinear solver iterations=647 > total number of linear solver iterations=647 > SNES Object: > type: ls > line search variant: SNESLineSearchCubic > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > maximum iterations=50, maximum function evaluations=10000 > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > total number of linear solver iterations=50 > total number of function evaluations=51 > KSP Object: > type: gmres > 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 > left preconditioning > using PRECONDITIONED norm type for convergence test > PC Object: > type: ilu > ILU: out-of-place factorization > 0 levels of fill > tolerance for zero pivot 1e-12 > using diagonal shift to prevent zero pivot > matrix ordering: natural > factor fill ratio given 1, needed 1 > Factored matrix follows: > Matrix Object: > type=seqaij, rows=1830, cols=1830 > package used to perform factorization: petsc > total: nonzeros=1830, allocated nonzeros=1830 > total number of mallocs used during MatSetValues calls =0 > not using I-node routines > linear system matrix = precond matrix: > Matrix Object: > type=seqaij, rows=1830, cols=1830 > total: nonzeros=1830, allocated nonzeros=29280 > total number of mallocs used during MatSetValues calls =1830 > not using I-node routines > > > 50 output time step takes me 11.877s. So I guess there is something not > appropriate with my Jacobian Matrix. Could you please tell me how to speed up > my code? > > Thanks! > > Xuan YU > xxy113 at psu.edu > > > > From xxy113 at psu.edu Wed Jul 7 12:17:09 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 7 Jul 2010 13:17:09 -0400 Subject: [petsc-users] my code runs too slow In-Reply-To: References: Message-ID: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> I made a change: ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, 5,PETSC_NULL,&J);CHKERRQ(ierr); Time of the code did not change much, and got the info: Matrix Object: type=seqaij, rows=1830, cols=1830 total: nonzeros=1830, allocated nonzeros=36600 total number of mallocs used during MatSetValues calls =1830 not using I-node routines On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: >> total: nonzeros=1830, allocated nonzeros=29280 >> total number of mallocs used during MatSetValues calls =1830 > > There is something wrong with your preallocation or matrix > assembly. You should see zero mallocs for efficient assembly. > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > satish > > > On Wed, 7 Jul 2010, Xuan YU wrote: > >> Hi, >> >> I finite difference Jacobian approximation for my TS model. The >> size of the >> vector is 1830. I got the following info with(-ts_view): >> >> type: beuler >> maximum steps=50 >> maximum time=50 >> total number of nonlinear solver iterations=647 >> total number of linear solver iterations=647 >> SNES Object: >> type: ls >> line search variant: SNESLineSearchCubic >> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >> maximum iterations=50, maximum function evaluations=10000 >> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >> total number of linear solver iterations=50 >> total number of function evaluations=51 >> KSP Object: >> type: gmres >> 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 >> left preconditioning >> using PRECONDITIONED norm type for convergence test >> PC Object: >> type: ilu >> ILU: out-of-place factorization >> 0 levels of fill >> tolerance for zero pivot 1e-12 >> using diagonal shift to prevent zero pivot >> matrix ordering: natural >> factor fill ratio given 1, needed 1 >> Factored matrix follows: >> Matrix Object: >> type=seqaij, rows=1830, cols=1830 >> package used to perform factorization: petsc >> total: nonzeros=1830, allocated nonzeros=1830 >> total number of mallocs used during MatSetValues calls =0 >> not using I-node routines >> linear system matrix = precond matrix: >> Matrix Object: >> type=seqaij, rows=1830, cols=1830 >> total: nonzeros=1830, allocated nonzeros=29280 >> total number of mallocs used during MatSetValues calls =1830 >> not using I-node routines >> >> >> 50 output time step takes me 11.877s. So I guess there is something >> not >> appropriate with my Jacobian Matrix. Could you please tell me how >> to speed up >> my code? >> >> Thanks! >> >> Xuan YU >> xxy113 at psu.edu >> >> >> >> > > Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Wed Jul 7 12:51:36 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 7 Jul 2010 12:51:36 -0500 (CDT) Subject: [petsc-users] my code runs too slow In-Reply-To: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> Message-ID: > total: nonzeros=1830 > mallocs used during MatSetValues calls =1830 Looks like you are zero-ing out the non-zero structure - before assembling the matrix. Are you calling MatZeroRows() or MatZeroEntries() or something else - before assembling the matrix? Satish On Wed, 7 Jul 2010, Xuan YU wrote: > I made a change: ierr = > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); > > Time of the code did not change much, and got the info: > Matrix Object: > type=seqaij, rows=1830, cols=1830 > total: nonzeros=1830, allocated nonzeros=36600 > total number of mallocs used during MatSetValues calls =1830 > not using I-node routines > > > > On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: > > > > total: nonzeros=1830, allocated nonzeros=29280 > > > total number of mallocs used during MatSetValues calls =1830 > > > > There is something wrong with your preallocation or matrix > > assembly. You should see zero mallocs for efficient assembly. > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > > > satish > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > Hi, > > > > > > I finite difference Jacobian approximation for my TS model. The size of > > > the > > > vector is 1830. I got the following info with(-ts_view): > > > > > > type: beuler > > > maximum steps=50 > > > maximum time=50 > > > total number of nonlinear solver iterations=647 > > > total number of linear solver iterations=647 > > > SNES Object: > > > type: ls > > > line search variant: SNESLineSearchCubic > > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > > > maximum iterations=50, maximum function evaluations=10000 > > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > > > total number of linear solver iterations=50 > > > total number of function evaluations=51 > > > KSP Object: > > > type: gmres > > > 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 > > > left preconditioning > > > using PRECONDITIONED norm type for convergence test > > > PC Object: > > > type: ilu > > > ILU: out-of-place factorization > > > 0 levels of fill > > > tolerance for zero pivot 1e-12 > > > using diagonal shift to prevent zero pivot > > > matrix ordering: natural > > > factor fill ratio given 1, needed 1 > > > Factored matrix follows: > > > Matrix Object: > > > type=seqaij, rows=1830, cols=1830 > > > package used to perform factorization: petsc > > > total: nonzeros=1830, allocated nonzeros=1830 > > > total number of mallocs used during MatSetValues calls =0 > > > not using I-node routines > > > linear system matrix = precond matrix: > > > Matrix Object: > > > type=seqaij, rows=1830, cols=1830 > > > total: nonzeros=1830, allocated nonzeros=29280 > > > total number of mallocs used during MatSetValues calls =1830 > > > not using I-node routines > > > > > > > > > 50 output time step takes me 11.877s. So I guess there is something not > > > appropriate with my Jacobian Matrix. Could you please tell me how to speed > > > up > > > my code? > > > > > > Thanks! > > > > > > Xuan YU > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > Xuan YU (??) > xxy113 at psu.edu > > > > From xxy113 at psu.edu Wed Jul 7 13:01:57 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 7 Jul 2010 14:01:57 -0400 Subject: [petsc-users] my code runs too slow In-Reply-To: References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> Message-ID: <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, 10,PETSC_NULL,&J);CHKERRQ(ierr); ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*) (void))f,(void*)&appctx);CHKERRQ(ierr); ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); These are the Jacobian related codes. On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: >> total: nonzeros=1830 >> mallocs used during MatSetValues calls =1830 > > Looks like you are zero-ing out the non-zero structure - before > assembling the matrix. > > Are you calling MatZeroRows() or MatZeroEntries() or something else - > before assembling the matrix? > > Satish > > On Wed, 7 Jul 2010, Xuan YU wrote: > >> I made a change: ierr = >> MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); >> >> Time of the code did not change much, and got the info: >> Matrix Object: >> type=seqaij, rows=1830, cols=1830 >> total: nonzeros=1830, allocated nonzeros=36600 >> total number of mallocs used during MatSetValues calls =1830 >> not using I-node routines >> >> >> >> On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: >> >>>> total: nonzeros=1830, allocated nonzeros=29280 >>>> total number of mallocs used during MatSetValues calls =1830 >>> >>> There is something wrong with your preallocation or matrix >>> assembly. You should see zero mallocs for efficient assembly. >>> >>> http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly >>> >>> satish >>> >>> >>> On Wed, 7 Jul 2010, Xuan YU wrote: >>> >>>> Hi, >>>> >>>> I finite difference Jacobian approximation for my TS model. The >>>> size of >>>> the >>>> vector is 1830. I got the following info with(-ts_view): >>>> >>>> type: beuler >>>> maximum steps=50 >>>> maximum time=50 >>>> total number of nonlinear solver iterations=647 >>>> total number of linear solver iterations=647 >>>> SNES Object: >>>> type: ls >>>> line search variant: SNESLineSearchCubic >>>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>>> maximum iterations=50, maximum function evaluations=10000 >>>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>>> total number of linear solver iterations=50 >>>> total number of function evaluations=51 >>>> KSP Object: >>>> type: gmres >>>> 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 >>>> left preconditioning >>>> using PRECONDITIONED norm type for convergence test >>>> PC Object: >>>> type: ilu >>>> ILU: out-of-place factorization >>>> 0 levels of fill >>>> tolerance for zero pivot 1e-12 >>>> using diagonal shift to prevent zero pivot >>>> matrix ordering: natural >>>> factor fill ratio given 1, needed 1 >>>> Factored matrix follows: >>>> Matrix Object: >>>> type=seqaij, rows=1830, cols=1830 >>>> package used to perform factorization: petsc >>>> total: nonzeros=1830, allocated nonzeros=1830 >>>> total number of mallocs used during MatSetValues calls =0 >>>> not using I-node routines >>>> linear system matrix = precond matrix: >>>> Matrix Object: >>>> type=seqaij, rows=1830, cols=1830 >>>> total: nonzeros=1830, allocated nonzeros=29280 >>>> total number of mallocs used during MatSetValues calls =1830 >>>> not using I-node routines >>>> >>>> >>>> 50 output time step takes me 11.877s. So I guess there is >>>> something not >>>> appropriate with my Jacobian Matrix. Could you please tell me how >>>> to speed >>>> up >>>> my code? >>>> >>>> Thanks! >>>> >>>> Xuan YU >>>> xxy113 at psu.edu >>>> >>>> >>>> >>>> >>> >>> >> >> Xuan YU (??) >> xxy113 at psu.edu >> >> >> >> Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Wed Jul 7 13:06:20 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 7 Jul 2010 13:06:20 -0500 (CDT) Subject: [petsc-users] my code runs too slow In-Reply-To: <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> Message-ID: On Wed, 7 Jul 2010, Xuan YU wrote: > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); > ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); This assembly removes the unused space here. Since no values are inserted - it squezes out all of the allocated space. Perhaps you just need to remove these 2 calls as the actual matrix is assembled further down the code. Satish > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode > (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > These are the Jacobian related codes. > > > > > On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: > > > > total: nonzeros=1830 > > > mallocs used during MatSetValues calls =1830 > > > > Looks like you are zero-ing out the non-zero structure - before > > assembling the matrix. > > > > Are you calling MatZeroRows() or MatZeroEntries() or something else - > > before assembling the matrix? > > > > Satish > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > I made a change: ierr = > > > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); > > > > > > Time of the code did not change much, and got the info: > > > Matrix Object: > > > type=seqaij, rows=1830, cols=1830 > > > total: nonzeros=1830, allocated nonzeros=36600 > > > total number of mallocs used during MatSetValues calls =1830 > > > not using I-node routines > > > > > > > > > > > > On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: > > > > > > > > total: nonzeros=1830, allocated nonzeros=29280 > > > > > total number of mallocs used during MatSetValues calls =1830 > > > > > > > > There is something wrong with your preallocation or matrix > > > > assembly. You should see zero mallocs for efficient assembly. > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > > > > > > > satish > > > > > > > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > > > > > Hi, > > > > > > > > > > I finite difference Jacobian approximation for my TS model. The size > > > > > of > > > > > the > > > > > vector is 1830. I got the following info with(-ts_view): > > > > > > > > > > type: beuler > > > > > maximum steps=50 > > > > > maximum time=50 > > > > > total number of nonlinear solver iterations=647 > > > > > total number of linear solver iterations=647 > > > > > SNES Object: > > > > > type: ls > > > > > line search variant: SNESLineSearchCubic > > > > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > > > > > maximum iterations=50, maximum function evaluations=10000 > > > > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > > > > > total number of linear solver iterations=50 > > > > > total number of function evaluations=51 > > > > > KSP Object: > > > > > type: gmres > > > > > 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 > > > > > left preconditioning > > > > > using PRECONDITIONED norm type for convergence test > > > > > PC Object: > > > > > type: ilu > > > > > ILU: out-of-place factorization > > > > > 0 levels of fill > > > > > tolerance for zero pivot 1e-12 > > > > > using diagonal shift to prevent zero pivot > > > > > matrix ordering: natural > > > > > factor fill ratio given 1, needed 1 > > > > > Factored matrix follows: > > > > > Matrix Object: > > > > > type=seqaij, rows=1830, cols=1830 > > > > > package used to perform factorization: petsc > > > > > total: nonzeros=1830, allocated nonzeros=1830 > > > > > total number of mallocs used during MatSetValues calls =0 > > > > > not using I-node routines > > > > > linear system matrix = precond matrix: > > > > > Matrix Object: > > > > > type=seqaij, rows=1830, cols=1830 > > > > > total: nonzeros=1830, allocated nonzeros=29280 > > > > > total number of mallocs used during MatSetValues calls =1830 > > > > > not using I-node routines > > > > > > > > > > > > > > > 50 output time step takes me 11.877s. So I guess there is something > > > > > not > > > > > appropriate with my Jacobian Matrix. Could you please tell me how to > > > > > speed > > > > > up > > > > > my code? > > > > > > > > > > Thanks! > > > > > > > > > > Xuan YU > > > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Xuan YU (??) > > > xxy113 at psu.edu > > > > > > > > > > > > > > Xuan YU (??) > xxy113 at psu.edu > > > > From xxy113 at psu.edu Wed Jul 7 13:13:02 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 7 Jul 2010 14:13:02 -0400 Subject: [petsc-users] my code runs too slow In-Reply-To: References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> Message-ID: <39BC724C-02F0-4B8C-9B1A-0B3FAB69DFCC@psu.edu> On Jul 7, 2010, at 2:06 PM, Satish Balay wrote: > On Wed, 7 Jul 2010, Xuan YU wrote: > >> ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, >> 10,PETSC_NULL,&J);CHKERRQ(ierr); > >> ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >> ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > This assembly removes the unused space here. Since no values are > inserted - it squezes out all of the allocated space. Perhaps you just > need to remove these 2 calls as the actual matrix is assembled further > down the code. > I removed these 2 But got Error Message [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: Not for unassembled matrix! > Satish > >> ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); >> ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); >> ierr = >> MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); >> ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode >> (*)(void))f,(void*)&appctx);CHKERRQ(ierr); >> ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); >> ierr = >> TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); >> >> These are the Jacobian related codes. >> >> >> >> >> On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: >> >>>> total: nonzeros=1830 >>>> mallocs used during MatSetValues calls =1830 >>> >>> Looks like you are zero-ing out the non-zero structure - before >>> assembling the matrix. >>> >>> Are you calling MatZeroRows() or MatZeroEntries() or something >>> else - >>> before assembling the matrix? >>> >>> Satish >>> >>> On Wed, 7 Jul 2010, Xuan YU wrote: >>> >>>> I made a change: ierr = >>>> MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); >>>> >>>> Time of the code did not change much, and got the info: >>>> Matrix Object: >>>> type=seqaij, rows=1830, cols=1830 >>>> total: nonzeros=1830, allocated nonzeros=36600 >>>> total number of mallocs used during MatSetValues calls =1830 >>>> not using I-node routines >>>> >>>> >>>> >>>> On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: >>>> >>>>>> total: nonzeros=1830, allocated nonzeros=29280 >>>>>> total number of mallocs used during MatSetValues calls =1830 >>>>> >>>>> There is something wrong with your preallocation or matrix >>>>> assembly. You should see zero mallocs for efficient assembly. >>>>> >>>>> http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly >>>>> >>>>> satish >>>>> >>>>> >>>>> On Wed, 7 Jul 2010, Xuan YU wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I finite difference Jacobian approximation for my TS model. The >>>>>> size >>>>>> of >>>>>> the >>>>>> vector is 1830. I got the following info with(-ts_view): >>>>>> >>>>>> type: beuler >>>>>> maximum steps=50 >>>>>> maximum time=50 >>>>>> total number of nonlinear solver iterations=647 >>>>>> total number of linear solver iterations=647 >>>>>> SNES Object: >>>>>> type: ls >>>>>> line search variant: SNESLineSearchCubic >>>>>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>>>>> maximum iterations=50, maximum function evaluations=10000 >>>>>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>>>>> total number of linear solver iterations=50 >>>>>> total number of function evaluations=51 >>>>>> KSP Object: >>>>>> type: gmres >>>>>> 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 >>>>>> left preconditioning >>>>>> using PRECONDITIONED norm type for convergence test >>>>>> PC Object: >>>>>> type: ilu >>>>>> ILU: out-of-place factorization >>>>>> 0 levels of fill >>>>>> tolerance for zero pivot 1e-12 >>>>>> using diagonal shift to prevent zero pivot >>>>>> matrix ordering: natural >>>>>> factor fill ratio given 1, needed 1 >>>>>> Factored matrix follows: >>>>>> Matrix Object: >>>>>> type=seqaij, rows=1830, cols=1830 >>>>>> package used to perform factorization: petsc >>>>>> total: nonzeros=1830, allocated nonzeros=1830 >>>>>> total number of mallocs used during MatSetValues calls =0 >>>>>> not using I-node routines >>>>>> linear system matrix = precond matrix: >>>>>> Matrix Object: >>>>>> type=seqaij, rows=1830, cols=1830 >>>>>> total: nonzeros=1830, allocated nonzeros=29280 >>>>>> total number of mallocs used during MatSetValues calls =1830 >>>>>> not using I-node routines >>>>>> >>>>>> >>>>>> 50 output time step takes me 11.877s. So I guess there is >>>>>> something >>>>>> not >>>>>> appropriate with my Jacobian Matrix. Could you please tell me >>>>>> how to >>>>>> speed >>>>>> up >>>>>> my code? >>>>>> >>>>>> Thanks! >>>>>> >>>>>> Xuan YU >>>>>> xxy113 at psu.edu >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> Xuan YU (??) >>>> xxy113 at psu.edu >>>> >>>> >>>> >>>> >> >> Xuan YU (??) >> xxy113 at psu.edu >> >> >> >> Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Jul 7 13:14:41 2010 From: knepley at gmail.com (Matthew Knepley) Date: Wed, 7 Jul 2010 20:14:41 +0200 Subject: [petsc-users] my code runs too slow In-Reply-To: <39BC724C-02F0-4B8C-9B1A-0B3FAB69DFCC@psu.edu> References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> <39BC724C-02F0-4B8C-9B1A-0B3FAB69DFCC@psu.edu> Message-ID: You have to assemble a) after setting values b) before using the matrix Please consult the user examples where this is done correctly and the manual section which explains the assembly process. Matt On Wed, Jul 7, 2010 at 8:13 PM, Xuan YU wrote: > > On Jul 7, 2010, at 2:06 PM, Satish Balay wrote: > > On Wed, 7 Jul 2010, Xuan YU wrote: > > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); > > > ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > > This assembly removes the unused space here. Since no values are > inserted - it squezes out all of the allocated space. Perhaps you just > need to remove these 2 calls as the actual matrix is assembled further > down the code. > > > I removed these 2 > But got Error Message > > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Not for unassembled matrix! > > > > > > Satish > > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode > > (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > > ierr = > TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > > These are the Jacobian related codes. > > > > > > On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: > > > total: nonzeros=1830 > > mallocs used during MatSetValues calls =1830 > > > Looks like you are zero-ing out the non-zero structure - before > > assembling the matrix. > > > Are you calling MatZeroRows() or MatZeroEntries() or something else - > > before assembling the matrix? > > > Satish > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > I made a change: ierr = > > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); > > > Time of the code did not change much, and got the info: > > Matrix Object: > > type=seqaij, rows=1830, cols=1830 > > total: nonzeros=1830, allocated nonzeros=36600 > > total number of mallocs used during MatSetValues calls =1830 > > not using I-node routines > > > > > On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: > > > total: nonzeros=1830, allocated nonzeros=29280 > > total number of mallocs used during MatSetValues calls =1830 > > > There is something wrong with your preallocation or matrix > > assembly. You should see zero mallocs for efficient assembly. > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > > satish > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > Hi, > > > I finite difference Jacobian approximation for my TS model. The size > > of > > the > > vector is 1830. I got the following info with(-ts_view): > > > type: beuler > > maximum steps=50 > > maximum time=50 > > total number of nonlinear solver iterations=647 > > total number of linear solver iterations=647 > > SNES Object: > > type: ls > > line search variant: SNESLineSearchCubic > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > > maximum iterations=50, maximum function evaluations=10000 > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > > total number of linear solver iterations=50 > > total number of function evaluations=51 > > KSP Object: > > type: gmres > > 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 > > left preconditioning > > using PRECONDITIONED norm type for convergence test > > PC Object: > > type: ilu > > ILU: out-of-place factorization > > 0 levels of fill > > tolerance for zero pivot 1e-12 > > using diagonal shift to prevent zero pivot > > matrix ordering: natural > > factor fill ratio given 1, needed 1 > > Factored matrix follows: > > Matrix Object: > > type=seqaij, rows=1830, cols=1830 > > package used to perform factorization: petsc > > total: nonzeros=1830, allocated nonzeros=1830 > > total number of mallocs used during MatSetValues calls =0 > > not using I-node routines > > linear system matrix = precond matrix: > > Matrix Object: > > type=seqaij, rows=1830, cols=1830 > > total: nonzeros=1830, allocated nonzeros=29280 > > total number of mallocs used during MatSetValues calls =1830 > > not using I-node routines > > > > 50 output time step takes me 11.877s. So I guess there is something > > not > > appropriate with my Jacobian Matrix. Could you please tell me how to > > speed > > up > > my code? > > > Thanks! > > > Xuan YU > > xxy113 at psu.edu > > > > > > > > > Xuan YU (??) > > xxy113 at psu.edu > > > > > > > Xuan YU (??) > > xxy113 at psu.edu > > > > > > > Xuan YU (??) > xxy113 at psu.edu > > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Wed Jul 7 13:28:41 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 7 Jul 2010 13:28:41 -0500 (CDT) Subject: [petsc-users] my code runs too slow In-Reply-To: References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> <39BC724C-02F0-4B8C-9B1A-0B3FAB69DFCC@psu.edu> Message-ID: > > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); Perhaps there is a function thats set to compute jacobinan thats not assembling the matrix properly? Also - please dont' truncate error messages - when you send them. Incomplete info is not useful. Satish On Wed, 7 Jul 2010, Matthew Knepley wrote: > You have to assemble > > a) after setting values > > b) before using the matrix > > Please consult the user examples where this is done correctly and the manual > section which explains the assembly process. > > Matt > > On Wed, Jul 7, 2010 at 8:13 PM, Xuan YU wrote: > > > > > On Jul 7, 2010, at 2:06 PM, Satish Balay wrote: > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); > > > > > > ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > > > ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > > > > > This assembly removes the unused space here. Since no values are > > inserted - it squezes out all of the allocated space. Perhaps you just > > need to remove these 2 calls as the actual matrix is assembled further > > down the code. > > > > > > I removed these 2 > > But got Error Message > > > > [0]PETSC ERROR: Object is in wrong state! > > [0]PETSC ERROR: Not for unassembled matrix! > > > > > > > > > > > > Satish > > > > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > > > > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > > > > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > > > > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode > > > > (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > > > > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > > > > ierr = > > TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > > > > > These are the Jacobian related codes. > > > > > > > > > > > > On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: > > > > > > total: nonzeros=1830 > > > > mallocs used during MatSetValues calls =1830 > > > > > > Looks like you are zero-ing out the non-zero structure - before > > > > assembling the matrix. > > > > > > Are you calling MatZeroRows() or MatZeroEntries() or something else - > > > > before assembling the matrix? > > > > > > Satish > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > > I made a change: ierr = > > > > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); > > > > > > Time of the code did not change much, and got the info: > > > > Matrix Object: > > > > type=seqaij, rows=1830, cols=1830 > > > > total: nonzeros=1830, allocated nonzeros=36600 > > > > total number of mallocs used during MatSetValues calls =1830 > > > > not using I-node routines > > > > > > > > > > On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: > > > > > > total: nonzeros=1830, allocated nonzeros=29280 > > > > total number of mallocs used during MatSetValues calls =1830 > > > > > > There is something wrong with your preallocation or matrix > > > > assembly. You should see zero mallocs for efficient assembly. > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > > > > > satish > > > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > > Hi, > > > > > > I finite difference Jacobian approximation for my TS model. The size > > > > of > > > > the > > > > vector is 1830. I got the following info with(-ts_view): > > > > > > type: beuler > > > > maximum steps=50 > > > > maximum time=50 > > > > total number of nonlinear solver iterations=647 > > > > total number of linear solver iterations=647 > > > > SNES Object: > > > > type: ls > > > > line search variant: SNESLineSearchCubic > > > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > > > > maximum iterations=50, maximum function evaluations=10000 > > > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > > > > total number of linear solver iterations=50 > > > > total number of function evaluations=51 > > > > KSP Object: > > > > type: gmres > > > > 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 > > > > left preconditioning > > > > using PRECONDITIONED norm type for convergence test > > > > PC Object: > > > > type: ilu > > > > ILU: out-of-place factorization > > > > 0 levels of fill > > > > tolerance for zero pivot 1e-12 > > > > using diagonal shift to prevent zero pivot > > > > matrix ordering: natural > > > > factor fill ratio given 1, needed 1 > > > > Factored matrix follows: > > > > Matrix Object: > > > > type=seqaij, rows=1830, cols=1830 > > > > package used to perform factorization: petsc > > > > total: nonzeros=1830, allocated nonzeros=1830 > > > > total number of mallocs used during MatSetValues calls =0 > > > > not using I-node routines > > > > linear system matrix = precond matrix: > > > > Matrix Object: > > > > type=seqaij, rows=1830, cols=1830 > > > > total: nonzeros=1830, allocated nonzeros=29280 > > > > total number of mallocs used during MatSetValues calls =1830 > > > > not using I-node routines > > > > > > > > 50 output time step takes me 11.877s. So I guess there is something > > > > not > > > > appropriate with my Jacobian Matrix. Could you please tell me how to > > > > speed > > > > up > > > > my code? > > > > > > Thanks! > > > > > > Xuan YU > > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > Xuan YU (??) > > > > xxy113 at psu.edu > > > > > > > > > > > > > > Xuan YU (??) > > > > xxy113 at psu.edu > > > > > > > > > > > > > > Xuan YU (??) > > xxy113 at psu.edu > > > > > > > > > > > > > From xxy113 at psu.edu Wed Jul 7 13:33:24 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 7 Jul 2010 14:33:24 -0400 Subject: [petsc-users] my code runs too slow In-Reply-To: References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> <39BC724C-02F0-4B8C-9B1A-0B3FAB69DFCC@psu.edu> Message-ID: Sorry, this is the complete one: [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: Not for unassembled matrix! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Development HG revision: fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 21:17:36 2010 -0500 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: ./pihm on a arch-linu named lionxi.rcc.psu.edu by xxy113 Wed Jul 7 14:32:11 2010 [0]PETSC ERROR: Libraries linked from /gpfs/home/xxy113/soft/petsc-dev/ arch-linux-gnu-c-debug/lib [0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 [0]PETSC ERROR: Configure options --download-f-blas-lapack=1 -- download-mpich=1 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: MatGetColoring() line 491 in src/mat/color/color.c [0]PETSC ERROR: VecRestoreArrayPrivate3() line 201 in /work/petsc/pihm.c On Jul 7, 2010, at 2:28 PM, Satish Balay wrote: >>> ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > > Perhaps there is a function thats set to compute jacobinan thats not > assembling the matrix properly? > > Also - please dont' truncate error messages - when you send > them. Incomplete info is not useful. > > Satish > > On Wed, 7 Jul 2010, Matthew Knepley wrote: > >> You have to assemble >> >> a) after setting values >> >> b) before using the matrix >> >> Please consult the user examples where this is done correctly and >> the manual >> section which explains the assembly process. >> >> Matt >> >> On Wed, Jul 7, 2010 at 8:13 PM, Xuan YU wrote: >> >>> >>> On Jul 7, 2010, at 2:06 PM, Satish Balay wrote: >>> >>> On Wed, 7 Jul 2010, Xuan YU wrote: >>> >>> ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, >>> 10,PETSC_NULL,&J);CHKERRQ(ierr); >>> >>> >>> ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >>> >>> ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >>> >>> >>> This assembly removes the unused space here. Since no values are >>> inserted - it squezes out all of the allocated space. Perhaps you >>> just >>> need to remove these 2 calls as the actual matrix is assembled >>> further >>> down the code. >>> >>> >>> I removed these 2 >>> But got Error Message >>> >>> [0]PETSC ERROR: Object is in wrong state! >>> [0]PETSC ERROR: Not for unassembled matrix! >>> >>> >>> >>> >>> >>> Satish >>> >>> ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); >>> >>> ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); >>> >>> ierr = >>> MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); >>> >>> ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode >>> >>> (*)(void))f,(void*)&appctx);CHKERRQ(ierr); >>> >>> ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); >>> >>> ierr = >>> TSSetRHSJacobian >>> (ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); >>> >>> >>> These are the Jacobian related codes. >>> >>> >>> >>> >>> >>> On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: >>> >>> >>> total: nonzeros=1830 >>> >>> mallocs used during MatSetValues calls =1830 >>> >>> >>> Looks like you are zero-ing out the non-zero structure - before >>> >>> assembling the matrix. >>> >>> >>> Are you calling MatZeroRows() or MatZeroEntries() or something >>> else - >>> >>> before assembling the matrix? >>> >>> >>> Satish >>> >>> >>> On Wed, 7 Jul 2010, Xuan YU wrote: >>> >>> >>> I made a change: ierr = >>> >>> MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); >>> >>> >>> Time of the code did not change much, and got the info: >>> >>> Matrix Object: >>> >>> type=seqaij, rows=1830, cols=1830 >>> >>> total: nonzeros=1830, allocated nonzeros=36600 >>> >>> total number of mallocs used during MatSetValues calls =1830 >>> >>> not using I-node routines >>> >>> >>> >>> >>> On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: >>> >>> >>> total: nonzeros=1830, allocated nonzeros=29280 >>> >>> total number of mallocs used during MatSetValues calls =1830 >>> >>> >>> There is something wrong with your preallocation or matrix >>> >>> assembly. You should see zero mallocs for efficient assembly. >>> >>> >>> >>> http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly >>> >>> >>> satish >>> >>> >>> >>> On Wed, 7 Jul 2010, Xuan YU wrote: >>> >>> >>> Hi, >>> >>> >>> I finite difference Jacobian approximation for my TS model. The size >>> >>> of >>> >>> the >>> >>> vector is 1830. I got the following info with(-ts_view): >>> >>> >>> type: beuler >>> >>> maximum steps=50 >>> >>> maximum time=50 >>> >>> total number of nonlinear solver iterations=647 >>> >>> total number of linear solver iterations=647 >>> >>> SNES Object: >>> >>> type: ls >>> >>> line search variant: SNESLineSearchCubic >>> >>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>> >>> maximum iterations=50, maximum function evaluations=10000 >>> >>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>> >>> total number of linear solver iterations=50 >>> >>> total number of function evaluations=51 >>> >>> KSP Object: >>> >>> type: gmres >>> >>> 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 >>> >>> left preconditioning >>> >>> using PRECONDITIONED norm type for convergence test >>> >>> PC Object: >>> >>> type: ilu >>> >>> ILU: out-of-place factorization >>> >>> 0 levels of fill >>> >>> tolerance for zero pivot 1e-12 >>> >>> using diagonal shift to prevent zero pivot >>> >>> matrix ordering: natural >>> >>> factor fill ratio given 1, needed 1 >>> >>> Factored matrix follows: >>> >>> Matrix Object: >>> >>> type=seqaij, rows=1830, cols=1830 >>> >>> package used to perform factorization: petsc >>> >>> total: nonzeros=1830, allocated nonzeros=1830 >>> >>> total number of mallocs used during MatSetValues calls =0 >>> >>> not using I-node routines >>> >>> linear system matrix = precond matrix: >>> >>> Matrix Object: >>> >>> type=seqaij, rows=1830, cols=1830 >>> >>> total: nonzeros=1830, allocated nonzeros=29280 >>> >>> total number of mallocs used during MatSetValues calls =1830 >>> >>> not using I-node routines >>> >>> >>> >>> 50 output time step takes me 11.877s. So I guess there is something >>> >>> not >>> >>> appropriate with my Jacobian Matrix. Could you please tell me how to >>> >>> speed >>> >>> up >>> >>> my code? >>> >>> >>> Thanks! >>> >>> >>> Xuan YU >>> >>> xxy113 at psu.edu >>> >>> >>> >>> >>> >>> >>> >>> >>> Xuan YU (??) >>> >>> xxy113 at psu.edu >>> >>> >>> >>> >>> >>> >>> Xuan YU (??) >>> >>> xxy113 at psu.edu >>> >>> >>> >>> >>> >>> >>> Xuan YU (??) >>> xxy113 at psu.edu >>> >>> >>> >>> >>> >> >> >> Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Wed Jul 7 13:36:58 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 7 Jul 2010 13:36:58 -0500 (CDT) Subject: [petsc-users] my code runs too slow In-Reply-To: References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> <39BC724C-02F0-4B8C-9B1A-0B3FAB69DFCC@psu.edu> Message-ID: What function are you using to compute jacobian? Perhaps you are missing MatAssembly() calls in that function? Or reordering the code as follows should work - but the correct location for MatAssembly() calls are in the routine you are using for assembling the jacobian. Satish >>>>>>>>> ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); <<<<<< On Wed, 7 Jul 2010, Xuan YU wrote: > Sorry, this is the complete one: > > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Not for unassembled matrix! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Development HG revision: > fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 21:17:36 2010 > -0500 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: ./pihm on a arch-linu named lionxi.rcc.psu.edu by xxy113 Wed > Jul 7 14:32:11 2010 > [0]PETSC ERROR: Libraries linked from > /gpfs/home/xxy113/soft/petsc-dev/arch-linux-gnu-c-debug/lib > [0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 > [0]PETSC ERROR: Configure options --download-f-blas-lapack=1 > --download-mpich=1 > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: MatGetColoring() line 491 in src/mat/color/color.c > [0]PETSC ERROR: VecRestoreArrayPrivate3() line 201 in /work/petsc/pihm.c > > On Jul 7, 2010, at 2:28 PM, Satish Balay wrote: > > > > > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > > > > Perhaps there is a function thats set to compute jacobinan thats not > > assembling the matrix properly? > > > > Also - please dont' truncate error messages - when you send > > them. Incomplete info is not useful. > > > > Satish > > > > On Wed, 7 Jul 2010, Matthew Knepley wrote: > > > > > You have to assemble > > > > > > a) after setting values > > > > > > b) before using the matrix > > > > > > Please consult the user examples where this is done correctly and the > > > manual > > > section which explains the assembly process. > > > > > > Matt > > > > > > On Wed, Jul 7, 2010 at 8:13 PM, Xuan YU wrote: > > > > > > > > > > > On Jul 7, 2010, at 2:06 PM, Satish Balay wrote: > > > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > > > > ierr = > > > > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); > > > > > > > > > > > > ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > > > > > > > ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > > > > > > > > > > > This assembly removes the unused space here. Since no values are > > > > inserted - it squezes out all of the allocated space. Perhaps you just > > > > need to remove these 2 calls as the actual matrix is assembled further > > > > down the code. > > > > > > > > > > > > I removed these 2 > > > > But got Error Message > > > > > > > > [0]PETSC ERROR: Object is in wrong state! > > > > [0]PETSC ERROR: Not for unassembled matrix! > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > > > > > > > > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > > > > > > > > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > > > > > > > > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode > > > > > > > > (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > > > > > > > > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > > > > > > > > ierr = > > > > TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > > > > > > > > > > > These are the Jacobian related codes. > > > > > > > > > > > > > > > > > > > > > > > > On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: > > > > > > > > > > > > total: nonzeros=1830 > > > > > > > > mallocs used during MatSetValues calls =1830 > > > > > > > > > > > > Looks like you are zero-ing out the non-zero structure - before > > > > > > > > assembling the matrix. > > > > > > > > > > > > Are you calling MatZeroRows() or MatZeroEntries() or something else - > > > > > > > > before assembling the matrix? > > > > > > > > > > > > Satish > > > > > > > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > > > > > > > > I made a change: ierr = > > > > > > > > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); > > > > > > > > > > > > Time of the code did not change much, and got the info: > > > > > > > > Matrix Object: > > > > > > > > type=seqaij, rows=1830, cols=1830 > > > > > > > > total: nonzeros=1830, allocated nonzeros=36600 > > > > > > > > total number of mallocs used during MatSetValues calls =1830 > > > > > > > > not using I-node routines > > > > > > > > > > > > > > > > > > > > On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: > > > > > > > > > > > > total: nonzeros=1830, allocated nonzeros=29280 > > > > > > > > total number of mallocs used during MatSetValues calls =1830 > > > > > > > > > > > > There is something wrong with your preallocation or matrix > > > > > > > > assembly. You should see zero mallocs for efficient assembly. > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > > > > > > > > > > > satish > > > > > > > > > > > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > > > > > > > > > Hi, > > > > > > > > > > > > I finite difference Jacobian approximation for my TS model. The size > > > > > > > > of > > > > > > > > the > > > > > > > > vector is 1830. I got the following info with(-ts_view): > > > > > > > > > > > > type: beuler > > > > > > > > maximum steps=50 > > > > > > > > maximum time=50 > > > > > > > > total number of nonlinear solver iterations=647 > > > > > > > > total number of linear solver iterations=647 > > > > > > > > SNES Object: > > > > > > > > type: ls > > > > > > > > line search variant: SNESLineSearchCubic > > > > > > > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > > > > > > > > maximum iterations=50, maximum function evaluations=10000 > > > > > > > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > > > > > > > > total number of linear solver iterations=50 > > > > > > > > total number of function evaluations=51 > > > > > > > > KSP Object: > > > > > > > > type: gmres > > > > > > > > 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 > > > > > > > > left preconditioning > > > > > > > > using PRECONDITIONED norm type for convergence test > > > > > > > > PC Object: > > > > > > > > type: ilu > > > > > > > > ILU: out-of-place factorization > > > > > > > > 0 levels of fill > > > > > > > > tolerance for zero pivot 1e-12 > > > > > > > > using diagonal shift to prevent zero pivot > > > > > > > > matrix ordering: natural > > > > > > > > factor fill ratio given 1, needed 1 > > > > > > > > Factored matrix follows: > > > > > > > > Matrix Object: > > > > > > > > type=seqaij, rows=1830, cols=1830 > > > > > > > > package used to perform factorization: petsc > > > > > > > > total: nonzeros=1830, allocated nonzeros=1830 > > > > > > > > total number of mallocs used during MatSetValues calls =0 > > > > > > > > not using I-node routines > > > > > > > > linear system matrix = precond matrix: > > > > > > > > Matrix Object: > > > > > > > > type=seqaij, rows=1830, cols=1830 > > > > > > > > total: nonzeros=1830, allocated nonzeros=29280 > > > > > > > > total number of mallocs used during MatSetValues calls =1830 > > > > > > > > not using I-node routines > > > > > > > > > > > > > > > > 50 output time step takes me 11.877s. So I guess there is something > > > > > > > > not > > > > > > > > appropriate with my Jacobian Matrix. Could you please tell me how to > > > > > > > > speed > > > > > > > > up > > > > > > > > my code? > > > > > > > > > > > > Thanks! > > > > > > > > > > > > Xuan YU > > > > > > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Xuan YU (???@) > > > > > > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > > > > > > > > > > > Xuan YU (???@) > > > > > > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > > > > > > > > > > > Xuan YU (???@) > > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Xuan YU (???@) > xxy113 at psu.edu > > > > From xxy113 at psu.edu Wed Jul 7 13:54:15 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 7 Jul 2010 14:54:15 -0400 Subject: [petsc-users] my code runs too slow In-Reply-To: References: <270D8A4C-962C-4BC9-B66C-729CE3CE1A6D@psu.edu> <7E13072C-3058-45F2-A357-A7131E4350D9@psu.edu> <39BC724C-02F0-4B8C-9B1A-0B3FAB69DFCC@psu.edu> Message-ID: <171FC5EE-B8D3-4524-BB2B-2D02D343DDC6@psu.edu> Reordering does work. But it went back to beginning. Info is shown below. I want to follow the example(http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-2.3.3/src/ts/examples/tutorials/ex7.c.html ) ierr = TSSetRHSJacobian (ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring);CHKERRQ(ierr); I thought this code can compute Jacobian. Actually, I have not write the Jacobian function yet. Does it necessary to speed up the code? TS Object: type: beuler maximum steps=50 maximum time=50 total number of nonlinear solver iterations=647 total number of linear solver iterations=647 SNES Object: type: ls line search variant: SNESLineSearchCubic alpha=0.0001, maxstep=1e+08, minlambda=1e-12 maximum iterations=50, maximum function evaluations=10000 tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 total number of linear solver iterations=50 total number of function evaluations=51 KSP Object: type: gmres 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 left preconditioning using PRECONDITIONED norm type for convergence test PC Object: type: ilu ILU: out-of-place factorization 0 levels of fill tolerance for zero pivot 1e-12 using diagonal shift to prevent zero pivot matrix ordering: natural factor fill ratio given 1, needed 1 Factored matrix follows: Matrix Object: type=seqaij, rows=1830, cols=1830 package used to perform factorization: petsc total: nonzeros=1830, allocated nonzeros=1830 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Matrix Object: type=seqaij, rows=1830, cols=1830 total: nonzeros=1830, allocated nonzeros=45750 total number of mallocs used during MatSetValues calls =1830 not using I-node routines On Jul 7, 2010, at 2:36 PM, Satish Balay wrote: > What function are you using to compute jacobian? Perhaps you are > missing MatAssembly() calls in that function? > > > Or reordering the code as follows should work - but the correct > location for MatAssembly() calls are in the routine you are using for > assembling the jacobian. > > Satish > >>>>>>>>>> > > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, > 10,PETSC_NULL,&J);CHKERRQ(ierr); > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > > ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); > > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*) > (void))f,(void*)&appctx);CHKERRQ(ierr); > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > ierr = > TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > <<<<<< > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > >> Sorry, this is the complete one: >> >> [0]PETSC ERROR: --------------------- Error Message >> ------------------------------------ >> [0]PETSC ERROR: Object is in wrong state! >> [0]PETSC ERROR: Not for unassembled matrix! >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: Petsc Development HG revision: >> fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 >> 21:17:36 2010 >> -0500 >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> [0]PETSC ERROR: See docs/index.html for manual pages. >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: ./pihm on a arch-linu named lionxi.rcc.psu.edu by >> xxy113 Wed >> Jul 7 14:32:11 2010 >> [0]PETSC ERROR: Libraries linked from >> /gpfs/home/xxy113/soft/petsc-dev/arch-linux-gnu-c-debug/lib >> [0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 >> [0]PETSC ERROR: Configure options --download-f-blas-lapack=1 >> --download-mpich=1 >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: MatGetColoring() line 491 in src/mat/color/color.c >> [0]PETSC ERROR: VecRestoreArrayPrivate3() line 201 in /work/petsc/ >> pihm.c >> >> On Jul 7, 2010, at 2:28 PM, Satish Balay wrote: >> >>>>> ierr = >>>>> SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); >>> >>> Perhaps there is a function thats set to compute jacobinan thats not >>> assembling the matrix properly? >>> >>> Also - please dont' truncate error messages - when you send >>> them. Incomplete info is not useful. >>> >>> Satish >>> >>> On Wed, 7 Jul 2010, Matthew Knepley wrote: >>> >>>> You have to assemble >>>> >>>> a) after setting values >>>> >>>> b) before using the matrix >>>> >>>> Please consult the user examples where this is done correctly and >>>> the >>>> manual >>>> section which explains the assembly process. >>>> >>>> Matt >>>> >>>> On Wed, Jul 7, 2010 at 8:13 PM, Xuan YU wrote: >>>> >>>>> >>>>> On Jul 7, 2010, at 2:06 PM, Satish Balay wrote: >>>>> >>>>> On Wed, 7 Jul 2010, Xuan YU wrote: >>>>> >>>>> ierr = >>>>> MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, >>>>> 10,PETSC_NULL,&J);CHKERRQ(ierr); >>>>> >>>>> >>>>> ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >>>>> >>>>> ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); >>>>> >>>>> >>>>> This assembly removes the unused space here. Since no values are >>>>> inserted - it squezes out all of the allocated space. Perhaps >>>>> you just >>>>> need to remove these 2 calls as the actual matrix is assembled >>>>> further >>>>> down the code. >>>>> >>>>> >>>>> I removed these 2 >>>>> But got Error Message >>>>> >>>>> [0]PETSC ERROR: Object is in wrong state! >>>>> [0]PETSC ERROR: Not for unassembled matrix! >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Satish >>>>> >>>>> ierr = >>>>> SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); >>>>> >>>>> ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); >>>>> >>>>> ierr = >>>>> MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); >>>>> >>>>> ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode >>>>> >>>>> (*)(void))f,(void*)&appctx);CHKERRQ(ierr); >>>>> >>>>> ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); >>>>> >>>>> ierr = >>>>> TSSetRHSJacobian >>>>> (ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); >>>>> >>>>> >>>>> These are the Jacobian related codes. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: >>>>> >>>>> >>>>> total: nonzeros=1830 >>>>> >>>>> mallocs used during MatSetValues calls =1830 >>>>> >>>>> >>>>> Looks like you are zero-ing out the non-zero structure - before >>>>> >>>>> assembling the matrix. >>>>> >>>>> >>>>> Are you calling MatZeroRows() or MatZeroEntries() or something >>>>> else - >>>>> >>>>> before assembling the matrix? >>>>> >>>>> >>>>> Satish >>>>> >>>>> >>>>> On Wed, 7 Jul 2010, Xuan YU wrote: >>>>> >>>>> >>>>> I made a change: ierr = >>>>> >>>>> MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, >>>>> 5,PETSC_NULL,&J);CHKERRQ(ierr); >>>>> >>>>> >>>>> Time of the code did not change much, and got the info: >>>>> >>>>> Matrix Object: >>>>> >>>>> type=seqaij, rows=1830, cols=1830 >>>>> >>>>> total: nonzeros=1830, allocated nonzeros=36600 >>>>> >>>>> total number of mallocs used during MatSetValues calls =1830 >>>>> >>>>> not using I-node routines >>>>> >>>>> >>>>> >>>>> >>>>> On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: >>>>> >>>>> >>>>> total: nonzeros=1830, allocated nonzeros=29280 >>>>> >>>>> total number of mallocs used during MatSetValues calls =1830 >>>>> >>>>> >>>>> There is something wrong with your preallocation or matrix >>>>> >>>>> assembly. You should see zero mallocs for efficient assembly. >>>>> >>>>> >>>>> >>>>> http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly >>>>> >>>>> >>>>> satish >>>>> >>>>> >>>>> >>>>> On Wed, 7 Jul 2010, Xuan YU wrote: >>>>> >>>>> >>>>> Hi, >>>>> >>>>> >>>>> I finite difference Jacobian approximation for my TS model. The >>>>> size >>>>> >>>>> of >>>>> >>>>> the >>>>> >>>>> vector is 1830. I got the following info with(-ts_view): >>>>> >>>>> >>>>> type: beuler >>>>> >>>>> maximum steps=50 >>>>> >>>>> maximum time=50 >>>>> >>>>> total number of nonlinear solver iterations=647 >>>>> >>>>> total number of linear solver iterations=647 >>>>> >>>>> SNES Object: >>>>> >>>>> type: ls >>>>> >>>>> line search variant: SNESLineSearchCubic >>>>> >>>>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>>>> >>>>> maximum iterations=50, maximum function evaluations=10000 >>>>> >>>>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>>>> >>>>> total number of linear solver iterations=50 >>>>> >>>>> total number of function evaluations=51 >>>>> >>>>> KSP Object: >>>>> >>>>> type: gmres >>>>> >>>>> 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 >>>>> >>>>> left preconditioning >>>>> >>>>> using PRECONDITIONED norm type for convergence test >>>>> >>>>> PC Object: >>>>> >>>>> type: ilu >>>>> >>>>> ILU: out-of-place factorization >>>>> >>>>> 0 levels of fill >>>>> >>>>> tolerance for zero pivot 1e-12 >>>>> >>>>> using diagonal shift to prevent zero pivot >>>>> >>>>> matrix ordering: natural >>>>> >>>>> factor fill ratio given 1, needed 1 >>>>> >>>>> Factored matrix follows: >>>>> >>>>> Matrix Object: >>>>> >>>>> type=seqaij, rows=1830, cols=1830 >>>>> >>>>> package used to perform factorization: petsc >>>>> >>>>> total: nonzeros=1830, allocated nonzeros=1830 >>>>> >>>>> total number of mallocs used during MatSetValues calls =0 >>>>> >>>>> not using I-node routines >>>>> >>>>> linear system matrix = precond matrix: >>>>> >>>>> Matrix Object: >>>>> >>>>> type=seqaij, rows=1830, cols=1830 >>>>> >>>>> total: nonzeros=1830, allocated nonzeros=29280 >>>>> >>>>> total number of mallocs used during MatSetValues calls =1830 >>>>> >>>>> not using I-node routines >>>>> >>>>> >>>>> >>>>> 50 output time step takes me 11.877s. So I guess there is >>>>> something >>>>> >>>>> not >>>>> >>>>> appropriate with my Jacobian Matrix. Could you please tell me >>>>> how to >>>>> >>>>> speed >>>>> >>>>> up >>>>> >>>>> my code? >>>>> >>>>> >>>>> Thanks! >>>>> >>>>> >>>>> Xuan YU >>>>> >>>>> xxy113 at psu.edu >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Xuan YU (??) >>>>> >>>>> xxy113 at psu.edu >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Xuan YU (??) >>>>> >>>>> xxy113 at psu.edu >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Xuan YU (??) >>>>> xxy113 at psu.edu >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >> >> Xuan YU (??) >> xxy113 at psu.edu >> >> >> >> Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhyshr at mcs.anl.gov Wed Jul 7 14:02:20 2010 From: abhyshr at mcs.anl.gov (abhyshr at mcs.anl.gov) Date: Wed, 7 Jul 2010 14:02:20 -0500 (CDT) Subject: [petsc-users] my code runs too slow In-Reply-To: <28237149.1472851278529039073.JavaMail.root@zimbra> Message-ID: <4253280.1473111278529340119.JavaMail.root@zimbra> If you want to use the PETSc to compute the jacobian via finite differencing then here's the sequence of calls ierr = SNESComputeDefaultJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); ierr = ISColoringDestroy(iscoloring);CHKERRQ(ierr); ...you missed this ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); if you are using your own jacobian evaluation then use SNESSetJacobian followed by SNESComputeJacobian instead of SNESComputeDefaultJacobian. Shri ----- "Xuan YU" wrote: > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > These are the Jacobian related codes. > > > > On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: total: nonzeros=1830 > mallocs used during MatSetValues calls =1830 > > Looks like you are zero-ing out the non-zero structure - before > assembling the matrix. > > Are you calling MatZeroRows() or MatZeroEntries() or something else - > before assembling the matrix? > > Satish > > On Wed, 7 Jul 2010, Xuan YU wrote: > > I made a change: ierr = > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); > > Time of the code did not change much, and got the info: > Matrix Object: > type=seqaij, rows=1830, cols=1830 > total: nonzeros=1830, allocated nonzeros=36600 > total number of mallocs used during MatSetValues calls =1830 > not using I-node routines > > > > On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: > > total: nonzeros=1830, allocated nonzeros=29280 > total number of mallocs used during MatSetValues calls =1830 > > There is something wrong with your preallocation or matrix > assembly. You should see zero mallocs for efficient assembly. > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > satish > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > Hi, > > I finite difference Jacobian approximation for my TS model. The size of > the > vector is 1830. I got the following info with(-ts_view): > > type: beuler > maximum steps=50 > maximum time=50 > total number of nonlinear solver iterations=647 > total number of linear solver iterations=647 > SNES Object: > type: ls > line search variant: SNESLineSearchCubic > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > maximum iterations=50, maximum function evaluations=10000 > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > total number of linear solver iterations=50 > total number of function evaluations=51 > KSP Object: > type: gmres > 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 > left preconditioning > using PRECONDITIONED norm type for convergence test > PC Object: > type: ilu > ILU: out-of-place factorization > 0 levels of fill > tolerance for zero pivot 1e-12 > using diagonal shift to prevent zero pivot > matrix ordering: natural > factor fill ratio given 1, needed 1 > Factored matrix follows: > Matrix Object: > type=seqaij, rows=1830, cols=1830 > package used to perform factorization: petsc > total: nonzeros=1830, allocated nonzeros=1830 > total number of mallocs used during MatSetValues calls =0 > not using I-node routines > linear system matrix = precond matrix: > Matrix Object: > type=seqaij, rows=1830, cols=1830 > total: nonzeros=1830, allocated nonzeros=29280 > total number of mallocs used during MatSetValues calls =1830 > not using I-node routines > > > 50 output time step takes me 11.877s. So I guess there is something not > appropriate with my Jacobian Matrix. Could you please tell me how to speed > up > my code? > > Thanks! > > Xuan YU > xxy113 at psu.edu > > > > > > > > Xuan YU (??) > xxy113 at psu.edu > > > > > > > > Xuan YU ( ?? ) xxy113 at psu.edu > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abhyshr at mcs.anl.gov Wed Jul 7 14:26:24 2010 From: abhyshr at mcs.anl.gov (abhyshr at mcs.anl.gov) Date: Wed, 7 Jul 2010 14:26:24 -0500 (CDT) Subject: [petsc-users] my code runs too slow In-Reply-To: <4546400.1474311278530722175.JavaMail.root@zimbra> Message-ID: <26583483.1474351278530784825.JavaMail.root@zimbra> Use TSComputeDefaultJacobian instead of SNESComputeDefaultJacobian if you want to use TS objects only. > ierr = TSComputeDefaultJacobian(ts,t,CV_Y,&J,&J,&flag,PETSC_NULL);CHKERRQ(ierr); > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > ierr = ISColoringDestroy(iscoloring);CHKERRQ(ierr); ...you missed this > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); Shri > ----- "Xuan YU" wrote: > > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); ierr = MatAssemblyBegin(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = MatAssemblyEnd(J,MAT_FINAL_ASSEMBLY);CHKERRQ(ierr); ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > These are the Jacobian related codes. > > > > > > > > On Jul 7, 2010, at 1:51 PM, Satish Balay wrote: total: nonzeros=1830 > > mallocs used during MatSetValues calls =1830 > > > > Looks like you are zero-ing out the non-zero structure - before > > assembling the matrix. > > > > Are you calling MatZeroRows() or MatZeroEntries() or something else - > > before assembling the matrix? > > > > Satish > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > I made a change: ierr = > > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,5,PETSC_NULL,&J);CHKERRQ(ierr); > > > > Time of the code did not change much, and got the info: > > Matrix Object: > > type=seqaij, rows=1830, cols=1830 > > total: nonzeros=1830, allocated nonzeros=36600 > > total number of mallocs used during MatSetValues calls =1830 > > not using I-node routines > > > > > > > > On Jul 7, 2010, at 12:51 PM, Satish Balay wrote: > > > > total: nonzeros=1830, allocated nonzeros=29280 > > total number of mallocs used during MatSetValues calls =1830 > > > > There is something wrong with your preallocation or matrix > > assembly. You should see zero mallocs for efficient assembly. > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly > > > > satish > > > > > > On Wed, 7 Jul 2010, Xuan YU wrote: > > > > Hi, > > > > I finite difference Jacobian approximation for my TS model. The size of > > the > > vector is 1830. I got the following info with(-ts_view): > > > > type: beuler > > maximum steps=50 > > maximum time=50 > > total number of nonlinear solver iterations=647 > > total number of linear solver iterations=647 > > SNES Object: > > type: ls > > line search variant: SNESLineSearchCubic > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > > maximum iterations=50, maximum function evaluations=10000 > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > > total number of linear solver iterations=50 > > total number of function evaluations=51 > > KSP Object: > > type: gmres > > 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 > > left preconditioning > > using PRECONDITIONED norm type for convergence test > > PC Object: > > type: ilu > > ILU: out-of-place factorization > > 0 levels of fill > > tolerance for zero pivot 1e-12 > > using diagonal shift to prevent zero pivot > > matrix ordering: natural > > factor fill ratio given 1, needed 1 > > Factored matrix follows: > > Matrix Object: > > type=seqaij, rows=1830, cols=1830 > > package used to perform factorization: petsc > > total: nonzeros=1830, allocated nonzeros=1830 > > total number of mallocs used during MatSetValues calls =0 > > not using I-node routines > > linear system matrix = precond matrix: > > Matrix Object: > > type=seqaij, rows=1830, cols=1830 > > total: nonzeros=1830, allocated nonzeros=29280 > > total number of mallocs used during MatSetValues calls =1830 > > not using I-node routines > > > > > > 50 output time step takes me 11.877s. So I guess there is something not > > appropriate with my Jacobian Matrix. Could you please tell me how to speed > > up > > my code? > > > > Thanks! > > > > Xuan YU > > xxy113 at psu.edu > > > > > > > > > > > > > > > > Xuan YU (??) > > xxy113 at psu.edu > > > > > > > > > > > > > > > > Xuan YU ( ?? ) xxy113 at psu.edu > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.crumly at Colorado.EDU Thu Jul 8 12:06:09 2010 From: daniel.crumly at Colorado.EDU (Daniel L Crumly) Date: Thu, 8 Jul 2010 11:06:09 -0600 Subject: [petsc-users] MatMult with factored matrix Message-ID: <000601cb1ebf$dccf96d0$966ec470$@Crumly@colorado.edu> Hello all - Is there a recommended way to multiply a factored matrix by a vector (effectively MatMult where the matrix is a factored matrix or preconditioner)? Specifically, I would like to get take the ILU factorization of a matrix, then multiply a vector by this approximation. What I currently have is: ierr = PCGetType(pc, &pctype);CHKERRQ(ierr); if (strcmp(pctype, PCILU) == 0 || strcmp(pctype, PCICC) == 0) { ierr = PCFactorGetMatrix(pc, &M);CHKERRQ(ierr); ierr = MatMult(M, x, Mx);CHKERRQ(ierr); } which throws the runtime error (I'm currently using PETSc 3.0.0-p8.): [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: Not for factored matrix! [0]PETSC ERROR: ------------------------------------------------------------------------ Any suggestions are greatly appreciated, thank you. Daniel "The Plaid Mentat" Crumly Daniel.Crumly at colorado.edu -------- I give you the desert chameleon, whose ability to blend itself into the background tells you all you need to know about the roots of ecology and the foundations of a personal identity. --Book of Diatribes from the Hayt Chronicle ----Herbert, Frank. Children of Dune 28. From knepley at gmail.com Thu Jul 8 12:09:51 2010 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 8 Jul 2010 19:09:51 +0200 Subject: [petsc-users] MatMult with factored matrix In-Reply-To: <5656913007881337350@unknownmsgid> References: <5656913007881337350@unknownmsgid> Message-ID: On Thu, Jul 8, 2010 at 7:06 PM, Daniel L Crumly wrote: > Hello all - > > Is there a recommended way to multiply a factored matrix by a vector > (effectively MatMult where the matrix is a factored matrix or > preconditioner)? Specifically, I would like to get take the ILU > factorization of a matrix, then multiply a vector by this approximation. > Do you actually want the action, or the action of the inverse? We only provide the action of the inverse http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSolve.html Matt > What I currently have is: > > ierr = PCGetType(pc, &pctype);CHKERRQ(ierr); > if (strcmp(pctype, PCILU) == 0 || strcmp(pctype, PCICC) == 0) { > ierr = PCFactorGetMatrix(pc, &M);CHKERRQ(ierr); > ierr = MatMult(M, x, Mx);CHKERRQ(ierr); > } > > which throws the runtime error (I'm currently using PETSc 3.0.0-p8.): > > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Not for factored matrix! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > > Any suggestions are greatly appreciated, thank you. > > Daniel "The Plaid Mentat" Crumly > Daniel.Crumly at colorado.edu > -------- > I give you the desert chameleon, whose ability to blend itself into the > background tells you all you need to know about the roots of ecology and > the > foundations of a personal identity. > --Book of Diatribes from the Hayt Chronicle > ----Herbert, Frank. Children of Dune 28. > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.crumly at Colorado.EDU Thu Jul 8 12:18:05 2010 From: daniel.crumly at Colorado.EDU (Daniel L Crumly) Date: Thu, 8 Jul 2010 11:18:05 -0600 Subject: [petsc-users] MatMult with factored matrix In-Reply-To: References: <5656913007881337350@unknownmsgid> Message-ID: <000a01cb1ec1$878a2490$969e6db0$@Crumly@colorado.edu> Thank you for the quick reply - I actually do want the action of the factored matrix (or preconditioner) on a vector. Is there a recommended workaround? Thanks Daniel "The Plaid Mentat" Crumly Daniel.Crumly at colorado.edu -------- I give you the desert chameleon, whose ability to blend itself into the background tells you all you need to know about the roots of ecology and the foundations of a personal identity. --Book of Diatribes from the Hayt Chronicle ----Herbert, Frank. Children of Dune 28. From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Matthew Knepley Sent: Thursday, July 08, 2010 11:10 AM To: PETSc users list Subject: Re: [petsc-users] MatMult with factored matrix On Thu, Jul 8, 2010 at 7:06 PM, Daniel L Crumly wrote: Hello all - Is there a recommended way to multiply a factored matrix by a vector (effectively MatMult where the matrix is a factored matrix or preconditioner)? Specifically, I would like to get take the ILU factorization of a matrix, then multiply a vector by this approximation. Do you actually want the action, or the action of the inverse? We only provide the action of the inverse http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpag es/Mat/MatSolve.html Matt What I currently have is: ierr = PCGetType(pc, &pctype);CHKERRQ(ierr); if (strcmp(pctype, PCILU) == 0 || strcmp(pctype, PCICC) == 0) { ierr = PCFactorGetMatrix(pc, &M);CHKERRQ(ierr); ierr = MatMult(M, x, Mx);CHKERRQ(ierr); } which throws the runtime error (I'm currently using PETSc 3.0.0-p8.): [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: Not for factored matrix! [0]PETSC ERROR: ------------------------------------------------------------------------ Any suggestions are greatly appreciated, thank you. Daniel "The Plaid Mentat" Crumly Daniel.Crumly at colorado.edu -------- I give you the desert chameleon, whose ability to blend itself into the background tells you all you need to know about the roots of ecology and the foundations of a personal identity. --Book of Diatribes from the Hayt Chronicle ----Herbert, Frank. Children of Dune 28. -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Thu Jul 8 12:21:32 2010 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 8 Jul 2010 19:21:32 +0200 Subject: [petsc-users] MatMult with factored matrix In-Reply-To: <-7257680055488543303@unknownmsgid> References: <5656913007881337350@unknownmsgid> <-7257680055488543303@unknownmsgid> Message-ID: On Thu, Jul 8, 2010 at 7:18 PM, Daniel L Crumly wrote: > Thank you for the quick reply - I actually do want the action of the > factored matrix (or preconditioner) on a vector. Is there a recommended > workaround? > Not really. You would only need this for incomplete facotrization, and neither the serial PETSc version, nor any of the 3rd party solvers implement this. Its usually possible to reformulate without it. Matt > > > Thanks > > > > Daniel "The Plaid Mentat" Crumly > > Daniel.Crumly at colorado.edu > > -------- > > I give you the desert chameleon, whose ability to blend itself into the > background tells you all you need to know about the roots of ecology and the > foundations of a personal identity. > > --Book of Diatribes from the Hayt Chronicle > > ----Herbert, Frank. Children of Dune 28. > > > > *From:* petsc-users-bounces at mcs.anl.gov [mailto: > petsc-users-bounces at mcs.anl.gov] *On Behalf Of *Matthew Knepley > *Sent:* Thursday, July 08, 2010 11:10 AM > *To:* PETSc users list > *Subject:* Re: [petsc-users] MatMult with factored matrix > > > > On Thu, Jul 8, 2010 at 7:06 PM, Daniel L Crumly < > daniel.crumly at colorado.edu> wrote: > > Hello all - > > Is there a recommended way to multiply a factored matrix by a vector > (effectively MatMult where the matrix is a factored matrix or > preconditioner)? Specifically, I would like to get take the ILU > factorization of a matrix, then multiply a vector by this approximation. > > > > Do you actually want the action, or the action of the inverse? We only > provide > > the action of the inverse > > > > > http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSolve.html > > > > Matt > > > > What I currently have is: > > ierr = PCGetType(pc, &pctype);CHKERRQ(ierr); > if (strcmp(pctype, PCILU) == 0 || strcmp(pctype, PCICC) == 0) { > ierr = PCFactorGetMatrix(pc, &M);CHKERRQ(ierr); > ierr = MatMult(M, x, Mx);CHKERRQ(ierr); > } > > which throws the runtime error (I'm currently using PETSc 3.0.0-p8.): > > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Not for factored matrix! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > > Any suggestions are greatly appreciated, thank you. > > Daniel "The Plaid Mentat" Crumly > Daniel.Crumly at colorado.edu > -------- > I give you the desert chameleon, whose ability to blend itself into the > background tells you all you need to know about the roots of ecology and > the > foundations of a personal identity. > --Book of Diatribes from the Hayt Chronicle > ----Herbert, Frank. Children of Dune 28. > > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Jul 8 13:19:35 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 8 Jul 2010 11:19:35 -0700 Subject: [petsc-users] MatMult with factored matrix In-Reply-To: <000a01cb1ec1$878a2490$969e6db0$@Crumly@colorado.edu> References: <5656913007881337350@unknownmsgid> <000a01cb1ec1$878a2490$969e6db0$@Crumly@colorado.edu> Message-ID: On Jul 8, 2010, at 10:18 AM, Daniel L Crumly wrote: > Thank you for the quick reply - I actually do want the action of the factored matrix (or preconditioner) on a vector. Is there a recommended workaround? If A =approx L*U then applying the preconditioner involves triangular solves of L and U and use MatSolve() to do this. If you want to actually apply L*U we don't have code for this, as Matt mentioned. But note that right, left or split (symmetric) preconditioning do not need the application of L or U only the triangular solves. If you want to form the product L*U to see how "far" from A it is we don't have code for that, you could write a new routine that directly access the data structure and does the product for you, but since it is not needed for traditional linear solvers we don't provide such a thing. Barry > > Thanks > > Daniel "The Plaid Mentat" Crumly > Daniel.Crumly at colorado.edu > -------- > I give you the desert chameleon, whose ability to blend itself into the background tells you all you need to know about the roots of ecology and the foundations of a personal identity. > --Book of Diatribes from the Hayt Chronicle > ----Herbert, Frank. Children of Dune 28. > > From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Matthew Knepley > Sent: Thursday, July 08, 2010 11:10 AM > To: PETSc users list > Subject: Re: [petsc-users] MatMult with factored matrix > > On Thu, Jul 8, 2010 at 7:06 PM, Daniel L Crumly wrote: > Hello all - > > Is there a recommended way to multiply a factored matrix by a vector > (effectively MatMult where the matrix is a factored matrix or > preconditioner)? Specifically, I would like to get take the ILU > factorization of a matrix, then multiply a vector by this approximation. > > Do you actually want the action, or the action of the inverse? We only provide > the action of the inverse > > http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSolve.html > > Matt > > What I currently have is: > > ierr = PCGetType(pc, &pctype);CHKERRQ(ierr); > if (strcmp(pctype, PCILU) == 0 || strcmp(pctype, PCICC) == 0) { > ierr = PCFactorGetMatrix(pc, &M);CHKERRQ(ierr); > ierr = MatMult(M, x, Mx);CHKERRQ(ierr); > } > > which throws the runtime error (I'm currently using PETSc 3.0.0-p8.): > > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Not for factored matrix! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > > Any suggestions are greatly appreciated, thank you. > > Daniel "The Plaid Mentat" Crumly > Daniel.Crumly at colorado.edu > -------- > I give you the desert chameleon, whose ability to blend itself into the > background tells you all you need to know about the roots of ecology and the > foundations of a personal identity. > --Book of Diatribes from the Hayt Chronicle > ----Herbert, Frank. Children of Dune 28. > > > > > > -- > What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. > -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Thu Jul 8 16:19:00 2010 From: luke.bloy at gmail.com (Luke Bloy) Date: Thu, 08 Jul 2010 17:19:00 -0400 Subject: [petsc-users] Slepc - SVD routines In-Reply-To: References: <4C349A96.9070604@gmail.com> Message-ID: <4C3640C4.1060907@gmail.com> Hi thanks for the responses, Jose, I switched to the EPS approach that you suggested but am having difficulties with convergence, once i move beyond some basic test matrices. I'm trying to put together a basic test which might help some I'll post it once i get it together. Thanks again -Luke On 07/07/2010 12:33 PM, Jose E. Roman wrote: > On 07/07/2010, Luke Bloy wrote: > > >> Hi, >> >> First off I apologize for the slepc question, they don't have a users lists so I'm hoping someone on here might be able to offer some guidance. >> >> Problem: >> I'm working on a graph partitioning problem. Basically I have the laplacian of a large graph and am interested in extracting its connected sub components. An approach is to compute the smallest eigenvalues and eigenvectors of the laplacian matrix. it is known that the lowest eigenvalue of the laplacian is 0, and has a multiplicity of K if the graph has K subcomponents. These subcomponents can be extracted from the smallest eigenvectors. >> >> Question: >> What is the best approach within slepc to attack this problem? >> >> I've been using SVD solvers using the LANCOS method to attack this problem, but sometimes have convergence problems. I know one of the smallest eigen vectors is the vector of all ones, and have tried to initialize the svd solver with this vector but this has led to very strange problems. >> >> Would I be better off using one of the EPS solvers? If so which can correctly extract multiplicities of eigenvalues? >> >> Thanks, >> Luke >> > SLEPc's example 11 (http://www.grycap.upv.es/slepc/documentation/current/src/examples/ex11.c.html ) computes the Fiedler vector of a graph, i.e., the second eigenvector of the Laplacian (assuming a connected graph). > > The example uses EPS because for symmetric (semi-)definite matrices the singular value decomposition is equal to the eigendecomposition. > > In your case, you want to explicitly compute the eigenspace associated to the zero eigenvalue. Then you can simply use ex1.c choosing the smallest eigenvalues (e.g. with the flag -eps_smallest_real). The default EPS solver (Krylov-Schur) shouldn't have any problems with multiple zero eigenvalues. > > If you can't get it work, contact us at the slepc-maint email address. > > Regards, > Jose > > From daniel.crumly at Colorado.EDU Thu Jul 8 17:17:32 2010 From: daniel.crumly at Colorado.EDU (Daniel L Crumly) Date: Thu, 8 Jul 2010 16:17:32 -0600 Subject: [petsc-users] MatMult with factored matrix In-Reply-To: References: <5656913007881337350@unknownmsgid> <000a01cb1ec1$878a2490$969e6db0$@Crumly@colorado.edu> Message-ID: <001b01cb1eeb$5c752500$155f6f00$@Crumly@colorado.edu> Matt and Barry - thank you for your replies. While I was hoping to avoid accessing the matrix directly, I do appreciate the advice. Have Fun Daniel "The Plaid Mentat" Crumly Daniel.Crumly at colorado.edu -------- I give you the desert chameleon, whose ability to blend itself into the background tells you all you need to know about the roots of ecology and the foundations of a personal identity. --Book of Diatribes from the Hayt Chronicle ----Herbert, Frank. Children of Dune 28. From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Barry Smith Sent: Thursday, July 08, 2010 12:20 PM To: PETSc users list Subject: Re: [petsc-users] MatMult with factored matrix On Jul 8, 2010, at 10:18 AM, Daniel L Crumly wrote: Thank you for the quick reply - I actually do want the action of the factored matrix (or preconditioner) on a vector. Is there a recommended workaround? If A =approx L*U then applying the preconditioner involves triangular solves of L and U and use MatSolve() to do this. If you want to actually apply L*U we don't have code for this, as Matt mentioned. But note that right, left or split (symmetric) preconditioning do not need the application of L or U only the triangular solves. If you want to form the product L*U to see how "far" from A it is we don't have code for that, you could write a new routine that directly access the data structure and does the product for you, but since it is not needed for traditional linear solvers we don't provide such a thing. Barry Thanks Daniel "The Plaid Mentat" Crumly Daniel.Crumly at colorado.edu -------- I give you the desert chameleon, whose ability to blend itself into the background tells you all you need to know about the roots of ecology and the foundations of a personal identity. --Book of Diatribes from the Hayt Chronicle ----Herbert, Frank. Children of Dune 28. From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Matthew Knepley Sent: Thursday, July 08, 2010 11:10 AM To: PETSc users list Subject: Re: [petsc-users] MatMult with factored matrix On Thu, Jul 8, 2010 at 7:06 PM, Daniel L Crumly wrote: Hello all - Is there a recommended way to multiply a factored matrix by a vector (effectively MatMult where the matrix is a factored matrix or preconditioner)? Specifically, I would like to get take the ILU factorization of a matrix, then multiply a vector by this approximation. Do you actually want the action, or the action of the inverse? We only provide the action of the inverse http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpag es/Mat/MatSolve.html Matt What I currently have is: ierr = PCGetType(pc, &pctype);CHKERRQ(ierr); if (strcmp(pctype, PCILU) == 0 || strcmp(pctype, PCICC) == 0) { ierr = PCFactorGetMatrix(pc, &M);CHKERRQ(ierr); ierr = MatMult(M, x, Mx);CHKERRQ(ierr); } which throws the runtime error (I'm currently using PETSc 3.0.0-p8.): [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: Not for factored matrix! [0]PETSC ERROR: ------------------------------------------------------------------------ Any suggestions are greatly appreciated, thank you. Daniel "The Plaid Mentat" Crumly Daniel.Crumly at colorado.edu -------- I give you the desert chameleon, whose ability to blend itself into the background tells you all you need to know about the roots of ecology and the foundations of a personal identity. --Book of Diatribes from the Hayt Chronicle ----Herbert, Frank. Children of Dune 28. -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From nemanja.ilic.81 at gmail.com Thu Jul 8 17:42:41 2010 From: nemanja.ilic.81 at gmail.com (=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)) Date: Fri, 9 Jul 2010 00:42:41 +0200 Subject: [petsc-users] Collective abort of all ranks Message-ID: <201007090042.41369.nemanja.ilic.81@gmail.com> Hello, I am developing a PETSc application and I encountered the following problem: My parallel program does everything ok, finishes the meaningful job, and near the end it breaks with the following line: "rank 0 in job 17 wg_49925 caused collective abort of all ranks exit status of rank 0: killed by signal 9" It happends regardless of number of processes in the job. Here is the ending of the function 'calculate' which does the work: ".... // write result to file PetscViewer viewer; ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD, output_file_name, &viewer); CHKERRQ(ierr); ierr = PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_COMMON); CHKERRQ(ierr); ierr = VecView(bp, viewer); CHKERRQ(ierr); // clean-up ierr = MatDestroy(Ap); CHKERRQ(ierr); ierr = VecDestroy(bp); CHKERRQ(ierr); ierr = VecDestroy(xp); CHKERRQ(ierr); free(col); free(row); free(row_values); return b;" The file 'viewer' is outputed correctly. When 'calculate' finishes the finalization function gets called: "ierr = PetscFinalize(); CHKERRQ(ierr);" Does anyone have any idea to why my program breaks? Thank you in advance, Best regards, Nemanja Ilic PS Sorry if this is not the right place for my question :) From bsmith at mcs.anl.gov Thu Jul 8 21:59:08 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 8 Jul 2010 21:59:08 -0500 Subject: [petsc-users] Collective abort of all ranks In-Reply-To: <201007090042.41369.nemanja.ilic.81@gmail.com> References: <201007090042.41369.nemanja.ilic.81@gmail.com> Message-ID: <20C1C2E9-F168-4D35-8708-E962469E9542@mcs.anl.gov> Take out the CHKERRQ() AFTER the PetscFinalize() that may be the problem. If not, I think you are basically stuck running in the debugger to see what is generating the message. barry On Jul 8, 2010, at 5:42 PM, ?????? ???? (Nemanja Ilic) wrote: > Hello, > > I am developing a PETSc application and I encountered the following problem: > My parallel program does everything ok, finishes the meaningful job, and near the end it breaks with the following line: > > "rank 0 in job 17 wg_49925 caused collective abort of all ranks > exit status of rank 0: killed by signal 9" > > It happends regardless of number of processes in the job. > > Here is the ending of the function 'calculate' which does the work: > > ".... > // write result to file > PetscViewer viewer; > ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD, output_file_name, &viewer); CHKERRQ(ierr); > ierr = PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_COMMON); CHKERRQ(ierr); > ierr = VecView(bp, viewer); CHKERRQ(ierr); > > > // clean-up > ierr = MatDestroy(Ap); CHKERRQ(ierr); > ierr = VecDestroy(bp); CHKERRQ(ierr); > ierr = VecDestroy(xp); CHKERRQ(ierr); > > free(col); > free(row); > free(row_values); > > return b;" > > The file 'viewer' is outputed correctly. > When 'calculate' finishes the finalization function gets called: > "ierr = PetscFinalize(); CHKERRQ(ierr);" > > Does anyone have any idea to why my program breaks? > > Thank you in advance, > Best regards, > Nemanja Ilic > > PS > Sorry if this is not the right place for my question :) From knepley at gmail.com Fri Jul 9 05:43:23 2010 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 9 Jul 2010 12:43:23 +0200 Subject: [petsc-users] Collective abort of all ranks In-Reply-To: <201007090042.41369.nemanja.ilic.81@gmail.com> References: <201007090042.41369.nemanja.ilic.81@gmail.com> Message-ID: On Fri, Jul 9, 2010 at 12:42 AM, ?????? ???? (Nemanja Ilic) < nemanja.ilic.81 at gmail.com> wrote: > Hello, > > I am developing a PETSc application and I encountered the following > problem: > My parallel program does everything ok, finishes the meaningful job, and > near the end it breaks with the following line: > > "rank 0 in job 17 wg_49925 caused collective abort of all ranks > exit status of rank 0: killed by signal 9" > > It happends regardless of number of processes in the job. > > Here is the ending of the function 'calculate' which does the work: > > ".... > // write result to file > PetscViewer viewer; > ierr = PetscViewerASCIIOpen(PETSC_COMM_WORLD, output_file_name, > &viewer); CHKERRQ(ierr); > ierr = PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_COMMON); > CHKERRQ(ierr); > ierr = VecView(bp, viewer); CHKERRQ(ierr); > > > // clean-up > ierr = MatDestroy(Ap); CHKERRQ(ierr); > ierr = VecDestroy(bp); CHKERRQ(ierr); > ierr = VecDestroy(xp); CHKERRQ(ierr); > > free(col); > free(row); > free(row_values); > Did you malloc() or PetscMalloc() these? You cannot free() stuff you get from PetscMalloc(). Matt > return b;" > > The file 'viewer' is outputed correctly. > When 'calculate' finishes the finalization function gets called: > "ierr = PetscFinalize(); CHKERRQ(ierr);" > > Does anyone have any idea to why my program breaks? > > Thank you in advance, > Best regards, > Nemanja Ilic > > PS > Sorry if this is not the right place for my question :) > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From vkuhlem at emory.edu Fri Jul 9 07:55:28 2010 From: vkuhlem at emory.edu (Verena Kuhlemann) Date: Fri, 9 Jul 2010 08:55:28 -0400 Subject: [petsc-users] ksp/pc nonzero initial guess Message-ID: Hello, I am trying to solve a linear system with GMRES and a preconditioner. I need a nonzero initial guess and tried to do so by using KSPSetInitialGuessNonzero(ksp,PETSC_TRUE); and PCSetInitialGuessNonzero(pc,PETSC_TRUE); Without a preconditioner (setting: PCSetType(pc,PCNONE)) it works and my nonzero initial guess is used. But if I try to use a preconditioner the solver always zeroes out the initial guess. I would greatly appreciate any help. Thanks, Verena Here is the relevant part of my code: KSPCreate(PETSC_COMM_WORLD,&ksp); KSPSetInitialGuessNonzero(ksp,PETSC_TRUE); KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN); KSPGetPC(ksp,&pc); PCSetInitialGuessNonzero(pc,PETSC_TRUE); -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Fri Jul 9 08:00:55 2010 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 9 Jul 2010 15:00:55 +0200 Subject: [petsc-users] ksp/pc nonzero initial guess In-Reply-To: References: Message-ID: On Fri, Jul 9, 2010 at 2:55 PM, Verena Kuhlemann wrote: > Hello, > > I am trying to solve a linear system with GMRES and a preconditioner. > I need a nonzero initial guess and tried to do so by using > > KSPSetInitialGuessNonzero(ksp,PETSC_TRUE); > > and PCSetInitialGuessNonzero(pc,PETSC_TRUE); > > > Without a preconditioner (setting: PCSetType(pc,PCNONE)) it works and > > my nonzero initial guess is used. But if I try to use a preconditioner > > the solver always zeroes out the initial guess. > 1) You only need to call to KSP 2) How do you determine that the guess is not used? I try it in PETSc examples and it works fine. It would be helpful to include a small example. Matt > I would greatly appreciate any help. > > Thanks, > > Verena > > > Here is the relevant part of my code: > > KSPCreate(PETSC_COMM_WORLD,&ksp); > > KSPSetInitialGuessNonzero(ksp,PETSC_TRUE); > > > KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN); > > KSPGetPC(ksp,&pc); > > PCSetInitialGuessNonzero(pc,PETSC_TRUE); > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From frafridr at gmail.com Fri Jul 9 09:57:50 2010 From: frafridr at gmail.com (Frantisek Fridrich) Date: Fri, 9 Jul 2010 16:57:50 +0200 Subject: [petsc-users] Compiling PETSc 3.1-p3, gcc-4.4.4 Message-ID: Hello. Please could anybody help me? I compiled PETSc 3.1-p3 in Scientific Linux 5, gcc-4.4.4 with options: =========================================================== beg --prefix=${P_petsc_INSTALL} \ --with-external-packages-dir=${P_extpckg_INSTALL} \ --PETSC_ARCH=${PETSC_ARCH} \ --PETSC_DIR=${PETSC_DIR} \ --with-clanguage=c++ \ --with-c-support=yes \ --with-shared=yes \ --with-large-file-io=yes \ --CFLAGS=${CFLAGS} \ --CXXFLAGS=${CXXFLAGS} \ --FFLAGS=${FCFLAGS} \ --with-ar=ar \ --AR_FLAGS=cr \ --with-ranlib=ranlib \ --COPTFLAGS=${COPTFLAGS} \ --CXXOPTFLAGS=${CXXOPTFLAGS} \ --FOPTFLAGS=${FOPTFLAGS} \ --with-mpi-dir=${P_MPI_INSTALL} \ --with-mpi-shared=yes \ --with-spooles=yes \ --download-spooles=yes \ --with-blas-lapack-dir=${ATLAS} \ --with-blacs=yes \ --download-blacs=yes \ --with-parmetis=yes \ --with-parmetis-dir=${P_parmetis_INSTALL} \ --with-scalapack=yes \ --download-scalapack=yes \ --with-mumps=yes \ --download-mumps=yes \ --with-hypre=yes \ --with-hypre-dir=${P_hypre_INSTALL} \ --with-umfpack=yes \ --download-umfpack=yes \ =========================================================== end I got 1600 lines of the following warnings: =========================================================== beg ../Source/umf_analyze.c: In function ?umf_i_analyze?: ../Source/umf_analyze.c:94: warning: ignoring #pragma ivdep ../Source/umf_analyze.c:581: warning: ignoring #pragma novector ../Source/umf_analyze.c: In function ?umf_l_analyze?: ../Source/umf_analyze.c:94: warning: ignoring #pragma ivdep ../Source/umf_blas3_update.c: In function ?umfdi_blas3_update?: ../Source/umf_blas3_update.c:81: warning: ignoring #pragma ivdep ../Source/umf_blas3_update.c:100: warning: passing argument 1 of ?dtrsm_? discards qualifiers from pointer target type ../Source/cholmod_blas.h:243: note: expected ?char *? but argument is of type ?const char *? ../Source/umf_blas3_update.c:100: warning: passing argument 2 of ?dtrsm_? discards qualifiers from pointer target type ../Source/cholmod_blas.h:243: note: expected ?char *? but argument is of type ?const char *? ../Source/umfpack_report_info.c: In function ?umfpack_di_report_info?: ../Source/umfpack_report_info.c:403: warning: passing argument 1 of ?print_ratio? discards qualifiers from pointer target type ../Source/umfpack_report_info.c:33: note: expected ?char *? but argument is of type ?const char *? ../Source/umfpack_report_info.c:403: warning: passing argument 2 of ?print_ratio? discards qualifiers from pointer target type ../Source/umfpack_report_info.c:33: note: expected ?char *? but argument is of type ?const char *? ../Source/umfpack_report_info.c:405: warning: passing argument 1 of ?print_ratio? discards qualifiers from pointer target type ../Source/umfpack_report_info.c:33: note: expected ?char *? but argument is of type ?const char *? ../Source/umf_blas3_update.c:152: warning: ignoring #pragma ivdep ../Source/umf_create_element.c: In function ?copy_column?: ../Source/umf_create_element.c:31: warning: ignoring #pragma ivdep ../Source/umf_create_element.c: In function ?umfdl_create_element?: ../Source/umfpack_report_info.c:403: warning: passing argument 1 of ?print_ratio? discards qualifiers from pointer target type ../Source/umfpack_report_info.c:33: note: expected ?char *? but argument is of type ?const char *? ../Source/umfpack_report_info.c:403: warning: passing argument 2 of ?print_ratio? discards qualifiers from pointer target type ../Source/umfpack_report_info.c:33: note: expected ?char *? but argument is of type ?const char *? ../Source/umfpack_report_info.c:405: warning: passing argument 1 of ?print_ratio? discards qualifiers from pointer target type ../Source/umfpack_report_info.c:33: note: expected ?char *? but argument is of type ?const char *? umfpack_zl_demo.c:547: warning: format ?%ld? expects type ?long int?, but argument 2 has type ?long long int? umfpack_zl_demo.c:547: warning: format ?%ld? expects type ?long int?, but argument 3 has type ?long long int? umfpack_zl_demo.c:719: warning: passing argument 1 of ?error? discards qualifiers from pointer target type umfpack_zl_demo.c:75: note: expected ?char *? but argument is of type ?const char *? umfpack_zl_demo.c:728: warning: passing argument 1 of ?error? discards qualifiers from pointer target type umfpack_zl_demo.c:75: note: expected ?char *? but argument is of type ?const char *? make[1]: [run] Error 1 (ignored) make[1]: [run] Error 1 (ignored) make[1]: [run] Error 1 (ignored) make[1]: [run] Error 1 (ignored) ********End of Output of running make on UMFPACK ******* =========================================================== end When running DOLFIN 0.9.8 demos I got error: =========================================================== beg Newton iteration 8: r (abs) = 1.509e-14 (tol = 1.000e-10) r (rel) = 3.674e-15 (tol = 1.000e-09) Newton solver finished in 8 iterations and 8 linear solver iterations. Plot active, press 'q' to continue. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors [0]PETSC ERROR: likely location of problem given in stack below [0]PETSC ERROR: --------------------- Stack Frames ------------------------------------ [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available, [0]PETSC ERROR: INSTEAD the line number of the start of the function [0]PETSC ERROR: is given. [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Signal received! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 3, Fri Jun 4 15:34:52 CDT 2010 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Unknown Name on a linux-gnu named juniper by fridrich Fri Jul 9 11:27:30 2010 [0]PETSC ERROR: Libraries linked from /home/rose/OpenMPI/openmpi-1.4.2/utils/petsc-3.1-p3/lib [0]PETSC ERROR: Configure run at Thu Jul 8 19:49:50 2010 [0]PETSC ERROR: Configure options --prefix=/home/rose/OpenMPI/openmpi-1.4.2/utils/petsc-3.1-p3 --with-external-packages-dir=/home/rose/OpenMPI/openmpi-1.4.2/utilsRepo/petsc-3.1-p3/petscUtilsRepo --PETSC_ARCH=linux-gnu --PETSC_DIR=/home/rose/OpenMPI/openmpi-1.4.2/utilsRepo/petsc-3.1-p3/petsc-3.1-p3 --with-clanguage=c++ --with-c-support=yes --with-shared=yes --with-large-file-io=yes --CFLAGS= -Wall -march=opteron -m64 -O2 -fno-reorder-blocks -fno-reorder-functions -pipe -fPIC --CXXFLAGS= -Wall -march=opteron -m64 -O2 -fno-reorder-blocks -fno-reorder-functions -pipe -fPIC --FFLAGS= -Wall -march=opteron -m64 -O2 -fno-reorder-blocks -fno-reorder-functions -pipe -fPIC --with-ar=ar --AR_FLAGS=cr --with-ranlib=ranlib --COPTFLAGS= -O2 -fno-reorder-blocks -fno-reorder-functions --CXXOPTFLAGS= -O2 -fno-reorder-blocks -fno-reorder-functions --FOPTFLAGS= -O2 -fno-reorder-blocks -fno-reorder-functions --with-mpi-dir=/home/rose/OpenMPI/openmpi-1.4.2/install --with-mpi-shared=yes --with-spooles=yes --download-spooles=yes --with-blas-lapack-dir=/home/rose/OpenMPI/openmpi-1.4.2/utils/atlas-3.9.24/lib --with-blacs=yes --download-blacs=yes --with-parmetis=yes --with-parmetis-dir=/home/rose/OpenMPI/openmpi-1.4.2/utils/ParMetis-3.1.1 --with-scalapack=yes --download-scalapack=yes --with-mumps=yes --download-mumps=yes --with-hypre=yes --with-hypre-dir=/home/rose/OpenMPI/openmpi-1.4.2/utils/hypre-2.6.0b --with-umfpack=yes --download-umfpack=yes [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file -------------------------------------------------------------------------- =========================================================== end Thank you for response. Frantisek From knepley at gmail.com Fri Jul 9 10:41:06 2010 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 9 Jul 2010 17:41:06 +0200 Subject: [petsc-users] Compiling PETSc 3.1-p3, gcc-4.4.4 In-Reply-To: References: Message-ID: 1) With any error report you MUST send configure.log, or we know nothing about your build. Send it to petsc-maint at mcs.anl.gov 2) Where are the error lines from UMFPack coming from? Not from the PETSc build. 3) I have no idea why Dolfin segfaults. YOu should mail the Dolfin list Matt On Fri, Jul 9, 2010 at 4:57 PM, Frantisek Fridrich wrote: > Hello. > > Please could anybody help me? > > I compiled PETSc 3.1-p3 in Scientific Linux 5, gcc-4.4.4 with options: > =========================================================== beg > --prefix=${P_petsc_INSTALL} \ > --with-external-packages-dir=${P_extpckg_INSTALL} \ > --PETSC_ARCH=${PETSC_ARCH} \ > --PETSC_DIR=${PETSC_DIR} \ > --with-clanguage=c++ \ > --with-c-support=yes \ > --with-shared=yes \ > --with-large-file-io=yes \ > --CFLAGS=${CFLAGS} \ > --CXXFLAGS=${CXXFLAGS} \ > --FFLAGS=${FCFLAGS} \ > --with-ar=ar \ > --AR_FLAGS=cr \ > --with-ranlib=ranlib \ > --COPTFLAGS=${COPTFLAGS} \ > --CXXOPTFLAGS=${CXXOPTFLAGS} \ > --FOPTFLAGS=${FOPTFLAGS} \ > --with-mpi-dir=${P_MPI_INSTALL} \ > --with-mpi-shared=yes \ > --with-spooles=yes \ > --download-spooles=yes \ > --with-blas-lapack-dir=${ATLAS} \ > --with-blacs=yes \ > --download-blacs=yes \ > --with-parmetis=yes \ > --with-parmetis-dir=${P_parmetis_INSTALL} \ > --with-scalapack=yes \ > --download-scalapack=yes \ > --with-mumps=yes \ > --download-mumps=yes \ > --with-hypre=yes \ > --with-hypre-dir=${P_hypre_INSTALL} \ > --with-umfpack=yes \ > --download-umfpack=yes \ > =========================================================== end > > I got 1600 lines of the following warnings: > =========================================================== beg > ../Source/umf_analyze.c: In function ?umf_i_analyze?: > ../Source/umf_analyze.c:94: warning: ignoring #pragma ivdep > ../Source/umf_analyze.c:581: warning: ignoring #pragma novector > ../Source/umf_analyze.c: In function ?umf_l_analyze?: > ../Source/umf_analyze.c:94: warning: ignoring #pragma ivdep > > > ../Source/umf_blas3_update.c: In function ?umfdi_blas3_update?: > ../Source/umf_blas3_update.c:81: warning: ignoring #pragma ivdep > ../Source/umf_blas3_update.c:100: warning: passing argument 1 of > ?dtrsm_? discards qualifiers from pointer target type > ../Source/cholmod_blas.h:243: note: expected ?char *? but argument is > of type ?const char *? > ../Source/umf_blas3_update.c:100: warning: passing argument 2 of > ?dtrsm_? discards qualifiers from pointer target type > ../Source/cholmod_blas.h:243: note: expected ?char *? but argument is > of type ?const char *? > > > ../Source/umfpack_report_info.c: In function ?umfpack_di_report_info?: > ../Source/umfpack_report_info.c:403: warning: passing argument 1 of > ?print_ratio? discards qualifiers from pointer target type > ../Source/umfpack_report_info.c:33: note: expected ?char *? but > argument is of type ?const char *? > ../Source/umfpack_report_info.c:403: warning: passing argument 2 of > ?print_ratio? discards qualifiers from pointer target type > ../Source/umfpack_report_info.c:33: note: expected ?char *? but > argument is of type ?const char *? > ../Source/umfpack_report_info.c:405: warning: passing argument 1 of > ?print_ratio? discards qualifiers from pointer target type > ../Source/umfpack_report_info.c:33: note: expected ?char *? but > argument is of type ?const char *? > > > ../Source/umf_blas3_update.c:152: warning: ignoring #pragma ivdep > ../Source/umf_create_element.c: In function ?copy_column?: > ../Source/umf_create_element.c:31: warning: ignoring #pragma ivdep > ../Source/umf_create_element.c: In function ?umfdl_create_element?: > > ../Source/umfpack_report_info.c:403: warning: passing argument 1 of > ?print_ratio? discards qualifiers from pointer target type > ../Source/umfpack_report_info.c:33: note: expected ?char *? but > argument is of type ?const char *? > ../Source/umfpack_report_info.c:403: warning: passing argument 2 of > ?print_ratio? discards qualifiers from pointer target type > ../Source/umfpack_report_info.c:33: note: expected ?char *? but > argument is of type ?const char *? > ../Source/umfpack_report_info.c:405: warning: passing argument 1 of > ?print_ratio? discards qualifiers from pointer target type > ../Source/umfpack_report_info.c:33: note: expected ?char *? but > argument is of type ?const char *? > > umfpack_zl_demo.c:547: warning: format ?%ld? expects type ?long int?, > but argument 2 has type ?long long int? > umfpack_zl_demo.c:547: warning: format ?%ld? expects type ?long int?, > but argument 3 has type ?long long int? > > umfpack_zl_demo.c:719: warning: passing argument 1 of ?error? discards > qualifiers from pointer target type > umfpack_zl_demo.c:75: note: expected ?char *? but argument is of type > ?const char *? > umfpack_zl_demo.c:728: warning: passing argument 1 of ?error? discards > qualifiers from pointer target type > umfpack_zl_demo.c:75: note: expected ?char *? but argument is of type > ?const char *? > make[1]: [run] Error 1 (ignored) > make[1]: [run] Error 1 (ignored) > make[1]: [run] Error 1 (ignored) > make[1]: [run] Error 1 (ignored) > ********End of Output of running make on UMFPACK ******* > =========================================================== end > > When running DOLFIN 0.9.8 demos I got error: > =========================================================== beg > Newton iteration 8: r (abs) = 1.509e-14 (tol = 1.000e-10) r (rel) > = 3.674e-15 (tol = 1.000e-09) > Newton solver finished in 8 iterations and 8 linear solver iterations. > Plot active, press 'q' to continue. > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, > probably memory access out of range > [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger > [0]PETSC ERROR: or see > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC > ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to > find memory corruption errors > [0]PETSC ERROR: likely location of problem given in stack below > [0]PETSC ERROR: --------------------- Stack Frames > ------------------------------------ > [0]PETSC ERROR: Note: The EXACT line numbers in the stack are not > available, > [0]PETSC ERROR: INSTEAD the line number of the start of the function > [0]PETSC ERROR: is given. > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Signal received! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 3, Fri Jun 4 > 15:34:52 CDT 2010 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Unknown Name on a linux-gnu named juniper by fridrich > Fri Jul 9 11:27:30 2010 > [0]PETSC ERROR: Libraries linked from > /home/rose/OpenMPI/openmpi-1.4.2/utils/petsc-3.1-p3/lib > [0]PETSC ERROR: Configure run at Thu Jul 8 19:49:50 2010 > [0]PETSC ERROR: Configure options > --prefix=/home/rose/OpenMPI/openmpi-1.4.2/utils/petsc-3.1-p3 > > --with-external-packages-dir=/home/rose/OpenMPI/openmpi-1.4.2/utilsRepo/petsc-3.1-p3/petscUtilsRepo > --PETSC_ARCH=linux-gnu > > --PETSC_DIR=/home/rose/OpenMPI/openmpi-1.4.2/utilsRepo/petsc-3.1-p3/petsc-3.1-p3 > --with-clanguage=c++ --with-c-support=yes --with-shared=yes > --with-large-file-io=yes --CFLAGS= -Wall -march=opteron -m64 -O2 > -fno-reorder-blocks -fno-reorder-functions -pipe -fPIC --CXXFLAGS= > -Wall -march=opteron -m64 -O2 -fno-reorder-blocks > -fno-reorder-functions -pipe -fPIC --FFLAGS= -Wall -march=opteron -m64 > -O2 -fno-reorder-blocks -fno-reorder-functions -pipe -fPIC > --with-ar=ar --AR_FLAGS=cr --with-ranlib=ranlib --COPTFLAGS= -O2 > -fno-reorder-blocks -fno-reorder-functions --CXXOPTFLAGS= -O2 > -fno-reorder-blocks -fno-reorder-functions --FOPTFLAGS= -O2 > -fno-reorder-blocks -fno-reorder-functions > --with-mpi-dir=/home/rose/OpenMPI/openmpi-1.4.2/install > --with-mpi-shared=yes --with-spooles=yes --download-spooles=yes > > --with-blas-lapack-dir=/home/rose/OpenMPI/openmpi-1.4.2/utils/atlas-3.9.24/lib > --with-blacs=yes --download-blacs=yes --with-parmetis=yes > --with-parmetis-dir=/home/rose/OpenMPI/openmpi-1.4.2/utils/ParMetis-3.1.1 > --with-scalapack=yes --download-scalapack=yes --with-mumps=yes > --download-mumps=yes --with-hypre=yes > --with-hypre-dir=/home/rose/OpenMPI/openmpi-1.4.2/utils/hypre-2.6.0b > --with-umfpack=yes --download-umfpack=yes > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: User provided function() line 0 in unknown directory > unknown file > -------------------------------------------------------------------------- > =========================================================== end > > Thank you for response. > Frantisek > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From xy2102 at columbia.edu Sat Jul 10 23:50:30 2010 From: xy2102 at columbia.edu ((Rebecca) Xuefei YUAN) Date: Sun, 11 Jul 2010 00:50:30 -0400 Subject: [petsc-users] hand-coded Jacobian Message-ID: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> Dear all, If testing the hand coded Jacobian, the ratio is 1e-10, but the difference is 1e-4, would this be some mistakes in Jacobian? Thanks, R -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 From jed at 59A2.org Sun Jul 11 05:37:24 2010 From: jed at 59A2.org (Jed Brown) Date: Sun, 11 Jul 2010 12:37:24 +0200 Subject: [petsc-users] hand-coded Jacobian In-Reply-To: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> Message-ID: <87sk3qnw2j.fsf@59A2.org> On Sun, 11 Jul 2010 00:50:30 -0400, "(Rebecca) Xuefei YUAN" wrote: > Dear all, > > If testing the hand coded Jacobian, the ratio is 1e-10, but the > difference is 1e-4, would this be some mistakes in Jacobian? This is fine, it just means that your matrix hasn't been scaled to O(1). Jed From xy2102 at columbia.edu Sun Jul 11 19:30:11 2010 From: xy2102 at columbia.edu ((Rebecca) Xuefei YUAN) Date: Sun, 11 Jul 2010 20:30:11 -0400 Subject: [petsc-users] hand-coded Jacobian In-Reply-To: <87sk3qnw2j.fsf@59A2.org> References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> <87sk3qnw2j.fsf@59A2.org> Message-ID: <20100711203011.pu2hyqxxscss0g0w@cubmail.cc.columbia.edu> Dear Jed, Thanks a lot! R Quoting Jed Brown : > On Sun, 11 Jul 2010 00:50:30 -0400, "(Rebecca) Xuefei YUAN" > wrote: >> Dear all, >> >> If testing the hand coded Jacobian, the ratio is 1e-10, but the >> difference is 1e-4, would this be some mistakes in Jacobian? > > This is fine, it just means that your matrix hasn't been scaled to O(1). > > Jed > > -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 From patdevelop at gmail.com Mon Jul 12 01:49:55 2010 From: patdevelop at gmail.com (Patrick Sunter) Date: Mon, 12 Jul 2010 16:49:55 +1000 Subject: [petsc-users] Small suggestion - update docs to include "-options_file" Message-ID: Hi there, just would like to make a suggestion to update the PETSc documentation to specify how the "-options_file" command line argument works. The only reference to it I could find in the PETSc docs was on the 2.0.16 changes list page. Since this feature is used pretty heavily by our group when customising e.g. multigrid solvers, it would be nice in the docs of our code to be able to link to a PETSc document about this as a definitive source. thanks, Patrick. -- Patrick Sunter VPAC Senior Computational Software Developer - AuScope Monash SAM Project Monash University Adjunct Research Associate (School of Mathematical Sciences) Room 301, Building 28 Monash University VIC 3800 Australia Ph: +61 (0)3 9905 4468 For VPAC/AuScope admin issues email: patrick at vpac.org For AuScope software development email: patdevelop at gmail.com From knepley at gmail.com Mon Jul 12 10:38:06 2010 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 12 Jul 2010 17:38:06 +0200 Subject: [petsc-users] Small suggestion - update docs to include "-options_file" In-Reply-To: References: Message-ID: I have added this to the PetscOptionsInsert() manpage. Matt On Mon, Jul 12, 2010 at 8:49 AM, Patrick Sunter wrote: > Hi there, > > just would like to make a suggestion to update the PETSc documentation > to specify how the "-options_file" command line argument works. > > The only reference to it I could find in the PETSc docs was on the > 2.0.16 changes list page. > > Since this feature is used pretty heavily by our group when > customising e.g. multigrid solvers, it would be nice in the docs of > our code to be able to link to a PETSc document about this as a > definitive source. > > thanks, Patrick. > -- > Patrick Sunter > > VPAC Senior Computational Software Developer - AuScope Monash SAM Project > Monash University Adjunct Research Associate (School of Mathematical > Sciences) > > Room 301, Building 28 > Monash University VIC 3800 > Australia > > Ph: +61 (0)3 9905 4468 > > For VPAC/AuScope admin issues email: patrick at vpac.org > For AuScope software development email: patdevelop at gmail.com > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From xxy113 at psu.edu Mon Jul 12 11:50:54 2010 From: xxy113 at psu.edu (Xuan YU) Date: Mon, 12 Jul 2010 12:50:54 -0400 Subject: [petsc-users] does it help if I reorder the Vector Message-ID: Hi, all For a vector of 1800 variables, I have 1800 equations like y(i)'=y(y1,y2,...,yn,t), but RHSfunction only have 5 y(j), so if I put related y(i) next to each other, the RHSfunction will become more banded, and Jacobian Matrix will be more banded also, the time consumption will go down. Am I right? Thanks! Xuan YU xxy113 at psu.edu From knepley at gmail.com Mon Jul 12 13:12:53 2010 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 12 Jul 2010 20:12:53 +0200 Subject: [petsc-users] does it help if I reorder the Vector In-Reply-To: References: Message-ID: Generally, yes. Matt On Mon, Jul 12, 2010 at 6:50 PM, Xuan YU wrote: > Hi, all > > For a vector of 1800 variables, I have 1800 equations like > y(i)'=y(y1,y2,...,yn,t), but RHSfunction only have 5 y(j), so if I put > related y(i) next to each other, the RHSfunction will become more banded, > and Jacobian Matrix will be more banded also, the time consumption will go > down. Am I right? > > Thanks! > > Xuan YU > xxy113 at psu.edu > > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From patdevelop at gmail.com Mon Jul 12 19:25:36 2010 From: patdevelop at gmail.com (Patrick Sunter) Date: Tue, 13 Jul 2010 10:25:36 +1000 Subject: [petsc-users] Small suggestion - update docs to include "-options_file" In-Reply-To: References: Message-ID: Thanks Matt :- the only other section I thought might be appropriate would be the manual section "1.2 Running PETSc Programs" that mentions a few options. -- Pat. On Tue, Jul 13, 2010 at 1:38 AM, Matthew Knepley wrote: > I have added this to the PetscOptionsInsert() manpage. > ?? Matt > > On Mon, Jul 12, 2010 at 8:49 AM, Patrick Sunter > wrote: >> >> Hi there, >> >> just would like to make a suggestion to update the PETSc documentation >> to specify how the "-options_file" command line argument works. >> >> The only reference to it I could find in the PETSc docs was on the >> 2.0.16 changes list page. >> >> Since this feature is used pretty heavily by our group when >> customising e.g. multigrid solvers, it would be nice in the docs of >> our code to be able to link to a PETSc document about this as a >> definitive source. >> >> thanks, Patrick. >> -- >> Patrick Sunter >> >> VPAC Senior Computational Software Developer - AuScope Monash SAM Project >> Monash University Adjunct Research Associate (School of Mathematical >> Sciences) >> >> Room 301, Building 28 >> Monash University VIC 3800 >> Australia >> >> Ph: +61 (0)3 9905 4468 >> >> For VPAC/AuScope admin issues email: patrick at vpac.org >> For AuScope software development email: patdevelop at gmail.com > > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > -- Patrick Sunter VPAC Senior Computational Software Developer - AuScope Monash SAM Project Monash University Adjunct Research Associate (School of Mathematical Sciences) Room 301, Building 28 Monash University VIC 3800 Australia Ph: +61 (0)3 9905 4468 For VPAC/AuScope admin issues email: patrick at vpac.org For AuScope software development email: patdevelop at gmail.com From knepley at gmail.com Mon Jul 12 19:36:28 2010 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 12 Jul 2010 19:36:28 -0500 Subject: [petsc-users] Small suggestion - update docs to include "-options_file" In-Reply-To: References: Message-ID: Changed. Matt On Mon, Jul 12, 2010 at 7:25 PM, Patrick Sunter wrote: > Thanks Matt :- the only other section I thought might be appropriate > would be the manual section "1.2 Running PETSc Programs" that mentions > a few options. > > -- Pat. > > On Tue, Jul 13, 2010 at 1:38 AM, Matthew Knepley > wrote: > > I have added this to the PetscOptionsInsert() manpage. > > Matt > > > > On Mon, Jul 12, 2010 at 8:49 AM, Patrick Sunter > > wrote: > >> > >> Hi there, > >> > >> just would like to make a suggestion to update the PETSc documentation > >> to specify how the "-options_file" command line argument works. > >> > >> The only reference to it I could find in the PETSc docs was on the > >> 2.0.16 changes list page. > >> > >> Since this feature is used pretty heavily by our group when > >> customising e.g. multigrid solvers, it would be nice in the docs of > >> our code to be able to link to a PETSc document about this as a > >> definitive source. > >> > >> thanks, Patrick. > >> -- > >> Patrick Sunter > >> > >> VPAC Senior Computational Software Developer - AuScope Monash SAM > Project > >> Monash University Adjunct Research Associate (School of Mathematical > >> Sciences) > >> > >> Room 301, Building 28 > >> Monash University VIC 3800 > >> Australia > >> > >> Ph: +61 (0)3 9905 4468 > >> > >> For VPAC/AuScope admin issues email: patrick at vpac.org > >> For AuScope software development email: patdevelop at gmail.com > > > > > > > > -- > > What most experimenters take for granted before they begin their > experiments > > is infinitely more interesting than any results to which their > experiments > > lead. > > -- Norbert Wiener > > > > > > -- > Patrick Sunter > > VPAC Senior Computational Software Developer - AuScope Monash SAM Project > Monash University Adjunct Research Associate (School of Mathematical > Sciences) > > Room 301, Building 28 > Monash University VIC 3800 > Australia > > Ph: +61 (0)3 9905 4468 > > For VPAC/AuScope admin issues email: patrick at vpac.org > For AuScope software development email: patdevelop at gmail.com > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From xy2102 at columbia.edu Tue Jul 13 21:23:51 2010 From: xy2102 at columbia.edu ((Rebecca) Xuefei YUAN) Date: Tue, 13 Jul 2010 22:23:51 -0400 Subject: [petsc-users] hand-coded Jacobian In-Reply-To: <87sk3qnw2j.fsf@59A2.org> References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> <87sk3qnw2j.fsf@59A2.org> Message-ID: <20100713222351.1l9adahm0w4csc0o@cubmail.cc.columbia.edu> Dear Jed, What happens if the finite difference Jacobian and hand coded Jacobian are very close to each other for the constant vector 1 and -1 (the second and third sets), but are very different for the first set as: Norm of matrix ratio 0.0076637 difference 3.21475 Norm of matrix ratio 2.90621e-10 difference 1.21909e-07 Norm of matrix ratio 1.71734e-10 difference 7.20388e-08 in the output file of the -snes_test_display? Thanks a lot! Rebecca Quoting Jed Brown : > On Sun, 11 Jul 2010 00:50:30 -0400, "(Rebecca) Xuefei YUAN" > wrote: >> Dear all, >> >> If testing the hand coded Jacobian, the ratio is 1e-10, but the >> difference is 1e-4, would this be some mistakes in Jacobian? > > This is fine, it just means that your matrix hasn't been scaled to O(1). > > Jed > > -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 From jed at 59A2.org Wed Jul 14 04:05:31 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 14 Jul 2010 11:05:31 +0200 Subject: [petsc-users] hand-coded Jacobian In-Reply-To: <20100713222351.1l9adahm0w4csc0o@cubmail.cc.columbia.edu> References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> <87sk3qnw2j.fsf@59A2.org> <20100713222351.1l9adahm0w4csc0o@cubmail.cc.columbia.edu> Message-ID: <87zkxumo10.fsf@59A2.org> On Tue, 13 Jul 2010 22:23:51 -0400, "(Rebecca) Xuefei YUAN" wrote: > Dear Jed, > > What happens if the finite difference Jacobian and hand coded Jacobian > are very close to each other for the constant vector 1 and -1 (the > second and third sets), but are very different for the first set as: > > Norm of matrix ratio 0.0076637 difference 3.21475 > > Norm of matrix ratio 2.90621e-10 difference 1.21909e-07 > > Norm of matrix ratio 1.71734e-10 difference 7.20388e-08 > > in the output file of the -snes_test_display? This of course means that your analytic Jacobian decays to being correct when applied to small perturbations of the constant, but not when applied to other states. What sort of nonlinearity is in your function? Jed From jarunan at ascomp.ch Thu Jul 15 05:07:40 2010 From: jarunan at ascomp.ch (jarunan at ascomp.ch) Date: Thu, 15 Jul 2010 12:07:40 +0200 Subject: [petsc-users] How to get Version In-Reply-To: <87zkxumo10.fsf@59A2.org> References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> <87sk3qnw2j.fsf@59A2.org> <20100713222351.1l9adahm0w4csc0o@cubmail.cc.columbia.edu> <87zkxumo10.fsf@59A2.org> Message-ID: <20100715120740.01nn6xbog0cwks4w@webmail.ascomp.ch> Hello, I want to get version of Petsc but the command PetscGetVersion is not supported in Fortran. Is there another command I can use for Fortran? Thanks Jarunan -- Jarunan Panyasantisuk Development Engineer ASCOMP GmbH, Technoparkstr. 1 CH-8005 Zurich, Switzerland Phone : +41 44 445 4072 Fax : +41 44 445 4075 E-mail: jarunan at ascomp.ch www.ascomp.ch -- Profiles: http://www.hydrocarbons-technology.com/contractors/instrumentation/ascomp/ Top News: http://www.energy.gov/news/9011.htm (ASCOMP is an associate member of the Consortium) Training: http://ascomp.ch/training.html From jed at 59A2.org Thu Jul 15 08:50:08 2010 From: jed at 59A2.org (Jed Brown) Date: Thu, 15 Jul 2010 15:50:08 +0200 Subject: [petsc-users] How to get Version In-Reply-To: <20100715120740.01nn6xbog0cwks4w@webmail.ascomp.ch> References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> <87sk3qnw2j.fsf@59A2.org> <20100713222351.1l9adahm0w4csc0o@cubmail.cc.columbia.edu> <87zkxumo10.fsf@59A2.org> <20100715120740.01nn6xbog0cwks4w@webmail.ascomp.ch> Message-ID: <87iq4gn9bj.fsf@59A2.org> On Thu, 15 Jul 2010 12:07:40 +0200, jarunan at ascomp.ch wrote: > > Hello, > > I want to get version of Petsc but the command PetscGetVersion is not > supported in Fortran. Is there another command I can use for Fortran? #if (PETSC_VERSION_RELEASE == 1) #define PetscGetVersion(version,len) PetscSNPrintf(version,len,"Petsc Release Version %d.%d.%d, Patch %d, %s ", \ PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR, \ PETSC_VERSION_PATCH,PETSC_VERSION_PATCH_DATE) #else #define PetscGetVersion(version,len) PetscSNPrintf(version,len,"Petsc Development HG revision: %s HG Date: %s", \ PETSC_VERSION_HG, PETSC_VERSION_DATE_HG) #endif These are defined from Fortran as well so you can build a string of your liking. Jed From balay at mcs.anl.gov Thu Jul 15 10:02:04 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 15 Jul 2010 10:02:04 -0500 (CDT) Subject: [petsc-users] How to get Version In-Reply-To: <87iq4gn9bj.fsf@59A2.org> References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> <87sk3qnw2j.fsf@59A2.org> <20100713222351.1l9adahm0w4csc0o@cubmail.cc.columbia.edu> <87zkxumo10.fsf@59A2.org> <20100715120740.01nn6xbog0cwks4w@webmail.ascomp.ch> <87iq4gn9bj.fsf@59A2.org> Message-ID: For eg: #if (PETSC_VERSION_RELEASE == 1) write(6,25) PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR,PETSC_VERSION_SUBMINOR,PETSC_VERSION_PATCH 25 format('PETSc Release Version: ',i1,'.',i1,'.',i1,' Patch:',i2) #else write(6,25) 25 format('PETSc Development Version: ', & & PETSC_VERSION_HG) #endif Satish On Thu, 15 Jul 2010, Jed Brown wrote: > On Thu, 15 Jul 2010 12:07:40 +0200, jarunan at ascomp.ch wrote: > > > > Hello, > > > > I want to get version of Petsc but the command PetscGetVersion is not > > supported in Fortran. Is there another command I can use for Fortran? > > #if (PETSC_VERSION_RELEASE == 1) > #define PetscGetVersion(version,len) PetscSNPrintf(version,len,"Petsc Release Version %d.%d.%d, Patch %d, %s ", \ > PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR, \ > PETSC_VERSION_PATCH,PETSC_VERSION_PATCH_DATE) > #else > #define PetscGetVersion(version,len) PetscSNPrintf(version,len,"Petsc Development HG revision: %s HG Date: %s", \ > PETSC_VERSION_HG, PETSC_VERSION_DATE_HG) > #endif > > These are defined from Fortran as well so you can build a string of your liking. > > Jed > From jarunan at ascomp.ch Thu Jul 15 10:36:44 2010 From: jarunan at ascomp.ch (jarunan at ascomp.ch) Date: Thu, 15 Jul 2010 17:36:44 +0200 Subject: [petsc-users] How to get Version In-Reply-To: References: <20100711005030.n2mnitm9wksc44w4@cubmail.cc.columbia.edu> <87sk3qnw2j.fsf@59A2.org> <20100713222351.1l9adahm0w4csc0o@cubmail.cc.columbia.edu> <87zkxumo10.fsf@59A2.org> <20100715120740.01nn6xbog0cwks4w@webmail.ascomp.ch> <87iq4gn9bj.fsf@59A2.org> Message-ID: <20100715173644.pnsux460cgw888kw@webmail.ascomp.ch> Thanks a lot Jarunan Quoting Satish Balay : > For eg: > > #if (PETSC_VERSION_RELEASE == 1) > write(6,25) > PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR,PETSC_VERSION_SUBMINOR,PETSC_VERSION_PATCH > 25 format('PETSc Release Version: ',i1,'.',i1,'.',i1,' Patch:',i2) > #else > write(6,25) > 25 format('PETSc Development Version: ', & > & PETSC_VERSION_HG) > > #endif > > Satish > > > On Thu, 15 Jul 2010, Jed Brown wrote: > >> On Thu, 15 Jul 2010 12:07:40 +0200, jarunan at ascomp.ch wrote: >> > >> > Hello, >> > >> > I want to get version of Petsc but the command PetscGetVersion is not >> > supported in Fortran. Is there another command I can use for Fortran? >> >> #if (PETSC_VERSION_RELEASE == 1) >> #define PetscGetVersion(version,len) >> PetscSNPrintf(version,len,"Petsc Release Version %d.%d.%d, Patch >> %d, %s ", \ >> >> PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR, \ >> >> PETSC_VERSION_PATCH,PETSC_VERSION_PATCH_DATE) >> #else >> #define PetscGetVersion(version,len) >> PetscSNPrintf(version,len,"Petsc Development HG revision: %s HG >> Date: %s", \ >> PETSC_VERSION_HG, >> PETSC_VERSION_DATE_HG) >> #endif >> >> These are defined from Fortran as well so you can build a string of >> your liking. >> >> Jed >> > > -- Jarunan Panyasantisuk Development Engineer ASCOMP GmbH, Technoparkstr. 1 CH-8005 Zurich, Switzerland Phone : +41 44 445 4072 Fax : +41 44 445 4075 E-mail: jarunan at ascomp.ch www.ascomp.ch -- Profiles: http://www.hydrocarbons-technology.com/contractors/instrumentation/ascomp/ Top News: http://www.energy.gov/news/9011.htm (ASCOMP is an associate member of the Consortium) Training: http://ascomp.ch/training.html From f.denner09 at imperial.ac.uk Fri Jul 16 10:31:09 2010 From: f.denner09 at imperial.ac.uk (Denner, Fabian) Date: Fri, 16 Jul 2010 16:31:09 +0100 Subject: [petsc-users] Vector including ghost pattern Message-ID: Hi everybody, I have the following problem with the handling of a 3D mesh with mixed element types. I aim to build vectors containing the ghost pattern for the mesh of a parallel CFD simulation. Inspired by the example "dm/ao/examples/tutorials/ex2.c" the connectivity information, represented by the element neighbors, is stored in two arrays - one array ja[] containing the neighbor element indices and the other array ia[] (of length n+1) containing the "start" index for each element in array ja[] (compare example below or adjacency graph in "dm/ao/examples/tutorials/ex2.c"). The neighbors of my local elements, elements assigned to the present process, and the neighbors of my ghost elements are stored in different pairs of arrays. Element indices: index[0 1 2 3 4 5 6 7 .... n] Neighbour element indices: ja[3 5 6 11 57 311 41 0 5 67 ..... 532 106] "Start"-position of neighour indices in array ja[]: ia[0 3 7 11 13 .... 1503] The issue appears when I try to cast the arrays in a vector with ghost pattern. When I create a vector with VecCreateGhost, deliver my global neighbor arrays and update my ghost pattern, the data will be lost, since the number of neighbors varies for each element. Subsequently, I can't loop over my ghost neighbors anymore. Is there any different handling of connectivity/adjacency information or is there an opportunity to "prepare" the data in an alternative way? Best regards, Fabian Denner From bsmith at mcs.anl.gov Fri Jul 16 10:56:53 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Fri, 16 Jul 2010 10:56:53 -0500 Subject: [petsc-users] Vector including ghost pattern In-Reply-To: References: Message-ID: On Jul 16, 2010, at 10:31 AM, Denner, Fabian wrote: > Hi everybody, > > I have the following problem with the handling of a 3D mesh with mixed element types. I aim to build vectors containing the ghost pattern for the mesh of a parallel CFD simulation. Inspired by the example "dm/ao/examples/tutorials/ex2.c" the connectivity information, represented by the element neighbors, is stored in two arrays - one array ja[] containing the neighbor element indices and the other array ia[] (of length n+1) containing the "start" index for each element in array ja[] (compare example below or adjacency graph in "dm/ao/examples/tutorials/ex2.c"). The neighbors of my local elements, elements assigned to the present process, and the neighbors of my ghost elements are stored in different pairs of arrays. > > Element indices: index[0 1 2 3 4 5 6 7 .... n] > Neighbour element indices: ja[3 5 6 11 57 311 41 0 5 67 ..... 532 106] > "Start"-position of neighour indices in array ja[]: ia[0 3 7 11 13 .... 1503] > > The issue appears when I try to cast the arrays in a vector with ghost pattern. When I create a vector with VecCreateGhost, deliver my global neighbor arrays and update my ghost pattern, the data will be lost, since the number of neighbors varies for each element. Hmm, VecCreateGhost() doesn't say anything about the number of neighbors or elements. You are free to set any number of ghost points associated with things. So it is up to you to assign the appropriate ghost points etc. Perhaps if you are a bit more explicit in your question we could answer it better? Barry > Subsequently, I can't loop over my ghost neighbors anymore. Is there any different handling of connectivity/adjacency information or is there an opportunity to "prepare" the data in an alternative way? > > Best regards, > Fabian Denner From f.denner09 at imperial.ac.uk Fri Jul 16 11:27:09 2010 From: f.denner09 at imperial.ac.uk (Denner, Fabian) Date: Fri, 16 Jul 2010 17:27:09 +0100 Subject: [petsc-users] Vector including ghost pattern In-Reply-To: References: , Message-ID: Hi. Let me try to explain it with a more detailed example. I have the two arrays of my local element connectivity information (local elements are elements stored on the current rank), with the neighbor element indices in array jaLocal[] and the "start"-position for each element in jaLocal[] stored in array iaLocal. jaLocal: [3 6 17 23 38 9 0 5 6 8 10 11 ...] iaLocal: [0 3 7 11 13 17 21 ....] The same I have for my ghost elements. I added also a sample of the ghost element index array to explain it a bit better. indexGhost: [256 453 301 ...] jaGhost: [465 204 461 299 213 ....] iaGhost: [0 4 8 12 16 19 ....] If I like to cast this data in to a vector with ghost pattern, I have to call the following commands (which could look like that): VecCreateGhost(PETSC_COMM_WORLD, (1 + elemLocal.n), PETSC_DECIDE, (1 + elemGhost.n), tempPtr, &elemVec.neighborPtr); setVecGhost(elemGlobal.neighborPtr, elemVec.neighborPtr, size, rank); To set the ghost values, I have to call setVecGhost with a global (all elements, not only local) assembly of my data, which gathers the right data. Let's go back to the sample arrays of the ghost elements. Obviously, the positions of the neighbor elements of element 256 (which is the first element in the ghost arrays) does not start at position 0 in jaGlobal[] (an equivalent global array of the connectivity) but for instance at position 1087. Therefore, the vector creation fails or the a segmentation violation appears. Hopefully, this description was a bit clearer. Thanks a lot! Fabian ________________________________________ From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] On Behalf Of Barry Smith [bsmith at mcs.anl.gov] Sent: 16 July 2010 16:56 To: PETSc users list Subject: Re: [petsc-users] Vector including ghost pattern On Jul 16, 2010, at 10:31 AM, Denner, Fabian wrote: > Hi everybody, > > I have the following problem with the handling of a 3D mesh with mixed element types. I aim to build vectors containing the ghost pattern for the mesh of a parallel CFD simulation. Inspired by the example "dm/ao/examples/tutorials/ex2.c" the connectivity information, represented by the element neighbors, is stored in two arrays - one array ja[] containing the neighbor element indices and the other array ia[] (of length n+1) containing the "start" index for each element in array ja[] (compare example below or adjacency graph in "dm/ao/examples/tutorials/ex2.c"). The neighbors of my local elements, elements assigned to the present process, and the neighbors of my ghost elements are stored in different pairs of arrays. > > Element indices: index[0 1 2 3 4 5 6 7 .... n] > Neighbour element indices: ja[3 5 6 11 57 311 41 0 5 67 ..... 532 106] > "Start"-position of neighour indices in array ja[]: ia[0 3 7 11 13 .... 1503] > > The issue appears when I try to cast the arrays in a vector with ghost pattern. When I create a vector with VecCreateGhost, deliver my global neighbor arrays and update my ghost pattern, the data will be lost, since the number of neighbors varies for each element. Hmm, VecCreateGhost() doesn't say anything about the number of neighbors or elements. You are free to set any number of ghost points associated with things. So it is up to you to assign the appropriate ghost points etc. Perhaps if you are a bit more explicit in your question we could answer it better? Barry > Subsequently, I can't loop over my ghost neighbors anymore. Is there any different handling of connectivity/adjacency information or is there an opportunity to "prepare" the data in an alternative way? > > Best regards, > Fabian Denner From bsmith at mcs.anl.gov Fri Jul 16 21:48:08 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Fri, 16 Jul 2010 21:48:08 -0500 Subject: [petsc-users] Vector including ghost pattern In-Reply-To: References: , Message-ID: On Jul 16, 2010, at 11:27 AM, Denner, Fabian wrote: > Hi. > > Let me try to explain it with a more detailed example. > I have the two arrays of my local element connectivity information (local elements are elements stored on the current rank), with the neighbor element indices in array jaLocal[] and the "start"-position for each element in jaLocal[] stored in array iaLocal. > > > jaLocal: [3 6 17 23 38 9 0 5 6 8 10 11 ...] > iaLocal: [0 3 7 11 13 17 21 ....] > > The same I have for my ghost elements. I added also a sample of the ghost element index array to explain it a bit better. > > indexGhost: [256 453 301 ...] > > jaGhost: [465 204 461 299 213 ....] > iaGhost: [0 4 8 12 16 19 ....] > > If I like to cast this data in to a vector with ghost pattern, I have to call the following commands (which could look like that): > > VecCreateGhost(PETSC_COMM_WORLD, (1 + elemLocal.n), PETSC_DECIDE, (1 + elemGhost.n), tempPtr, &elemVec.neighborPtr); What is tempPtr? > setVecGhost(elemGlobal.neighborPtr, elemVec.neighborPtr, size, rank); I have no idea what the function setVecGhost() is? Is it in PETSc, where? Something else. Barry > > To set the ghost values, I have to call setVecGhost with a global (all elements, not only local) assembly of my data, which gathers the right data. > Let's go back to the sample arrays of the ghost elements. Obviously, the positions of the neighbor elements of element 256 (which is the first element in the ghost arrays) does not start at position 0 in jaGlobal[] (an equivalent global array of the connectivity) but for instance at position 1087. Therefore, the vector creation fails or the a segmentation violation appears. > > Hopefully, this description was a bit clearer. > > Thanks a lot! > Fabian > > ________________________________________ > From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] On Behalf Of Barry Smith [bsmith at mcs.anl.gov] > Sent: 16 July 2010 16:56 > To: PETSc users list > Subject: Re: [petsc-users] Vector including ghost pattern > > On Jul 16, 2010, at 10:31 AM, Denner, Fabian wrote: > >> Hi everybody, >> >> I have the following problem with the handling of a 3D mesh with mixed element types. I aim to build vectors containing the ghost pattern for the mesh of a parallel CFD simulation. Inspired by the example "dm/ao/examples/tutorials/ex2.c" the connectivity information, represented by the element neighbors, is stored in two arrays - one array ja[] containing the neighbor element indices and the other array ia[] (of length n+1) containing the "start" index for each element in array ja[] (compare example below or adjacency graph in "dm/ao/examples/tutorials/ex2.c"). The neighbors of my local elements, elements assigned to the present process, and the neighbors of my ghost elements are stored in different pairs of arrays. >> >> Element indices: index[0 1 2 3 4 5 6 7 .... n] >> Neighbour element indices: ja[3 5 6 11 57 311 41 0 5 67 ..... 532 106] >> "Start"-position of neighour indices in array ja[]: ia[0 3 7 11 13 .... 1503] >> >> The issue appears when I try to cast the arrays in a vector with ghost pattern. When I create a vector with VecCreateGhost, deliver my global neighbor arrays and update my ghost pattern, the data will be lost, since the number of neighbors varies for each element. > > Hmm, VecCreateGhost() doesn't say anything about the number of neighbors or elements. You are free to set any number of ghost points associated with things. So it is up to you to assign the appropriate ghost points etc. > > Perhaps if you are a bit more explicit in your question we could answer it better? > > Barry > >> Subsequently, I can't loop over my ghost neighbors anymore. Is there any different handling of connectivity/adjacency information or is there an opportunity to "prepare" the data in an alternative way? >> >> Best regards, >> Fabian Denner > From dominik at itis.ethz.ch Sun Jul 18 15:58:10 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Sun, 18 Jul 2010 22:58:10 +0200 Subject: [petsc-users] configure problems Message-ID: Dear all, I am trying to configure petsc 3.1p3 under Windows 7 64 bit using MSVC 2010 Express. I get the errors listed below. According to google this is quite exotic. I will be grateful for any hints. Regards. Dominik $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=linux-gnu-c-release --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 --with-parmetis=1 --down load-parmetis=1 --with-x=0 --with-debugging=0 =============================================================================== Configuring PETSc to compile on your system =============================================================================== TESTING: configureExternalPackagesDir from config.framework(config/BuildSystem/config/framework.py:829) TESTING: configureDebuggers from PETSc.utilities.debuggers(config/PETSc/utilities/debuggers.py:22) TESTING: configureMake from PETSc.utilities.Make(config/PETSc/utilities/Make.py:21) TESTING: configureCLanguage from PETSc.utilities.languages(config/PETSc/utilities/languages.py:43) TESTING: configureLanguageSupport from PETSc.utilities.languages(config/PETSc/utilities/languages.py:49) TESTING: configureExternC from PETSc.utilities.languages(config/PETSc/utilities/languages.py:66) TESTING: configureFortranLanguage from PETSc.utilities.languages(config/PETSc/utilities/languages.py:72) TESTING: configureMkdir from config.programs(config/BuildSystem/config/programs.py:21) TESTING: configurePrograms from config.programs(config/BuildSystem/config/programs.py:43) 0 [main] python 216 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent : 0x360000 != 0x3C0000 0 [main] python 4740 fork: child 216 - died waiting for dll loading, errno 11 Exception AttributeError: AttributeError("Popen3 instance has no attribute 'pid'",) in > i gnored ******************************************************************************* UNABLE to EXECUTE BINARIES for config/configure.py ------------------------------------------------------------------------------- [Errno 11] Resource temporarily unavailable ******************************************************************************* From dominik at itis.ethz.ch Sun Jul 18 16:10:07 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Sun, 18 Jul 2010 23:10:07 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: Message-ID: I am sorry I pasted the wrong configure command, the correct one does have --with-cc='win32fe cl' in addition. On Sun, Jul 18, 2010 at 10:58 PM, Dominik Szczerba wrote: > Dear all, > > I am trying to configure petsc 3.1p3 under Windows 7 64 bit using MSVC > 2010 Express. I get the errors listed below. According to google this > is quite exotic. I will be grateful for any hints. > Regards. > Dominik > > $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=linux-gnu-c-release > --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 > --with-parmetis=1 --down > load-parmetis=1 --with-x=0 --with-debugging=0 > =============================================================================== > ? ? ? ? ? ? Configuring PETSc to compile on your system > =============================================================================== > TESTING: configureExternalPackagesDir from > config.framework(config/BuildSystem/config/framework.py:829) > TESTING: configureDebuggers from > PETSc.utilities.debuggers(config/PETSc/utilities/debuggers.py:22) > TESTING: configureMake from > PETSc.utilities.Make(config/PETSc/utilities/Make.py:21) > TESTING: configureCLanguage from > PETSc.utilities.languages(config/PETSc/utilities/languages.py:43) > TESTING: configureLanguageSupport from > PETSc.utilities.languages(config/PETSc/utilities/languages.py:49) > TESTING: configureExternC from > PETSc.utilities.languages(config/PETSc/utilities/languages.py:66) > TESTING: configureFortranLanguage from > PETSc.utilities.languages(config/PETSc/utilities/languages.py:72) > TESTING: configureMkdir from > config.programs(config/BuildSystem/config/programs.py:21) > TESTING: configurePrograms from > config.programs(config/BuildSystem/config/programs.py:43) > ? ? ?0 [main] python 216 C:\cygwin\bin\python.exe: *** fatal error - > unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to > same address as parent > : 0x360000 != 0x3C0000 > ? ? ?0 [main] python 4740 fork: child 216 - died waiting for dll > loading, errno 11 > Exception AttributeError: AttributeError("Popen3 instance has no > attribute 'pid'",) in instance at 0x7eb63f2c>> i > gnored > ******************************************************************************* > ? ? ? ? ? ? ? ? ? ?UNABLE to EXECUTE BINARIES for config/configure.py > ------------------------------------------------------------------------------- > [Errno 11] Resource temporarily unavailable > ******************************************************************************* > From dominik at itis.ethz.ch Sun Jul 18 16:10:50 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Sun, 18 Jul 2010 23:10:50 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: Message-ID: (but the error stays the same) On Sun, Jul 18, 2010 at 11:10 PM, Dominik Szczerba wrote: > I am sorry I pasted the wrong configure command, the correct one does > have --with-cc='win32fe cl' in addition. > > On Sun, Jul 18, 2010 at 10:58 PM, Dominik Szczerba wrote: >> Dear all, >> >> I am trying to configure petsc 3.1p3 under Windows 7 64 bit using MSVC >> 2010 Express. I get the errors listed below. According to google this >> is quite exotic. I will be grateful for any hints. >> Regards. >> Dominik >> >> $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=linux-gnu-c-release >> --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 >> --with-parmetis=1 --down >> load-parmetis=1 --with-x=0 --with-debugging=0 >> =============================================================================== >> ? ? ? ? ? ? Configuring PETSc to compile on your system >> =============================================================================== >> TESTING: configureExternalPackagesDir from >> config.framework(config/BuildSystem/config/framework.py:829) >> TESTING: configureDebuggers from >> PETSc.utilities.debuggers(config/PETSc/utilities/debuggers.py:22) >> TESTING: configureMake from >> PETSc.utilities.Make(config/PETSc/utilities/Make.py:21) >> TESTING: configureCLanguage from >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:43) >> TESTING: configureLanguageSupport from >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:49) >> TESTING: configureExternC from >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:66) >> TESTING: configureFortranLanguage from >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:72) >> TESTING: configureMkdir from >> config.programs(config/BuildSystem/config/programs.py:21) >> TESTING: configurePrograms from >> config.programs(config/BuildSystem/config/programs.py:43) >> ? ? ?0 [main] python 216 C:\cygwin\bin\python.exe: *** fatal error - >> unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to >> same address as parent >> : 0x360000 != 0x3C0000 >> ? ? ?0 [main] python 4740 fork: child 216 - died waiting for dll >> loading, errno 11 >> Exception AttributeError: AttributeError("Popen3 instance has no >> attribute 'pid'",) in > instance at 0x7eb63f2c>> i >> gnored >> ******************************************************************************* >> ? ? ? ? ? ? ? ? ? ?UNABLE to EXECUTE BINARIES for config/configure.py >> ------------------------------------------------------------------------------- >> [Errno 11] Resource temporarily unavailable >> ******************************************************************************* >> > From knepley at gmail.com Sun Jul 18 16:34:30 2010 From: knepley at gmail.com (Matthew Knepley) Date: Sun, 18 Jul 2010 16:34:30 -0500 Subject: [petsc-users] configure problems In-Reply-To: References: Message-ID: This is a Cygwin Python error (a fork() fails). I would consider reinstalling Cygwin. In my experience, it is not very stable. I wish we did not have to use it. Matt On Sun, Jul 18, 2010 at 4:10 PM, Dominik Szczerba wrote: > (but the error stays the same) > > On Sun, Jul 18, 2010 at 11:10 PM, Dominik Szczerba > wrote: > > I am sorry I pasted the wrong configure command, the correct one does > > have --with-cc='win32fe cl' in addition. > > > > On Sun, Jul 18, 2010 at 10:58 PM, Dominik Szczerba > wrote: > >> Dear all, > >> > >> I am trying to configure petsc 3.1p3 under Windows 7 64 bit using MSVC > >> 2010 Express. I get the errors listed below. According to google this > >> is quite exotic. I will be grateful for any hints. > >> Regards. > >> Dominik > >> > >> $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=linux-gnu-c-release > >> --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 > >> --with-parmetis=1 --down > >> load-parmetis=1 --with-x=0 --with-debugging=0 > >> > =============================================================================== > >> Configuring PETSc to compile on your system > >> > =============================================================================== > >> TESTING: configureExternalPackagesDir from > >> config.framework(config/BuildSystem/config/framework.py:829) > >> TESTING: configureDebuggers from > >> PETSc.utilities.debuggers(config/PETSc/utilities/debuggers.py:22) > >> TESTING: configureMake from > >> PETSc.utilities.Make(config/PETSc/utilities/Make.py:21) > >> TESTING: configureCLanguage from > >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:43) > >> TESTING: configureLanguageSupport from > >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:49) > >> TESTING: configureExternC from > >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:66) > >> TESTING: configureFortranLanguage from > >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:72) > >> TESTING: configureMkdir from > >> config.programs(config/BuildSystem/config/programs.py:21) > >> TESTING: configurePrograms from > >> config.programs(config/BuildSystem/config/programs.py:43) > >> 0 [main] python 216 C:\cygwin\bin\python.exe: *** fatal error - > >> unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to > >> same address as parent > >> : 0x360000 != 0x3C0000 > >> 0 [main] python 4740 fork: child 216 - died waiting for dll > >> loading, errno 11 > >> Exception AttributeError: AttributeError("Popen3 instance has no > >> attribute 'pid'",) in >> instance at 0x7eb63f2c>> i > >> gnored > >> > ******************************************************************************* > >> UNABLE to EXECUTE BINARIES for config/configure.py > >> > ------------------------------------------------------------------------------- > >> [Errno 11] Resource temporarily unavailable > >> > ******************************************************************************* > >> > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.denner09 at imperial.ac.uk Mon Jul 19 06:25:33 2010 From: f.denner09 at imperial.ac.uk (Denner, Fabian) Date: Mon, 19 Jul 2010 12:25:33 +0100 Subject: [petsc-users] Vector including ghost pattern In-Reply-To: References: , , Message-ID: Hi everyone, thanks Barry you are right, I messed it up. The setVecGhost() function is my own function. Find below a revised explanation of my problem and an adjusted and simplified example. Some remarks for a clearer understanding. The connectivity information of the mesh is generally stored in a pair of arrays, ia[] and ja[] (similar to example "dm/ao/examples/tutorials/ex2.c"). The array ja[] contains the indices of the neighbor elements. The array ia[] contains the start-position in array ja[] for each element and has the length numberOfElements+1. For instance, if there are 3 elements the connectivity information could look as followed: ja[] is [45 12 34 8 101 23 4 49 95] and ia[] is [0 2 5 9]. This means the elements with the indices 45 and 12 are neighbors of the first element, the elements 34, 8 and 101 are neighbors of the second element and so on. To be able to loop over the neighbor elements the array ia[] needs to contain numberOfElements+1 positions, with the total number of neighbors stored in the last position. Since the mesh handling is supposed to work in parallel the mesh is distributed to several processors. Therefore, the mesh is stored in "local" arrays, containing the mesh (vertices, faces, elements) information which is local to that processor, and in "ghost" arrays, containing the mesh information of neighboring entities stored on a different processor. To use for example the VecScatter functions I would like to cast this connectivity information into vectors. Unfortunately I couldn't find an opportunity to set the "ghost" information in the vector for array ia[] right, since it gathers the information from the "global" representation and thus I can't loop over the ghost elements anymore because the neighbors of a particular element are most likely stored in a different position of the "global" array than in the "ghost" array. VecCreateGhost(PETSC_COMM_WORLD, (1+numberLocalElements), PETSC_DECIDE, (1 + numberGhostElements), iaGhost, &vec); VecGetOwnershipRange(vec, &start, &end); for (i = start; i < end; i++) { value = (double) iaGlobal[i]; VecSetValues(vec, 1, &i, &value, INSERT_VALUES); } VecAssemblyBegin(vec); VecAssemblyEnd(vec); VecGhostUpdateBegin(vec, INSERT_VALUES, SCATTER_FORWARD); VecGhostUpdateEnd(vec, INSERT_VALUES, SCATTER_FORWARD); Does anyone have an idea how to solve the problem or did anyone have a similar problem before? Best regards and thanks in advance, Fabian ________________________________________ From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] On Behalf Of Barry Smith [bsmith at mcs.anl.gov] Sent: 17 July 2010 03:48 To: PETSc users list Subject: Re: [petsc-users] Vector including ghost pattern On Jul 16, 2010, at 11:27 AM, Denner, Fabian wrote: > Hi. > > Let me try to explain it with a more detailed example. > I have the two arrays of my local element connectivity information (local elements are elements stored on the current rank), with the neighbor element indices in array jaLocal[] and the "start"-position for each element in jaLocal[] stored in array iaLocal. > > > jaLocal: [3 6 17 23 38 9 0 5 6 8 10 11 ...] > iaLocal: [0 3 7 11 13 17 21 ....] > > The same I have for my ghost elements. I added also a sample of the ghost element index array to explain it a bit better. > > indexGhost: [256 453 301 ...] > > jaGhost: [465 204 461 299 213 ....] > iaGhost: [0 4 8 12 16 19 ....] > > If I like to cast this data in to a vector with ghost pattern, I have to call the following commands (which could look like that): > > VecCreateGhost(PETSC_COMM_WORLD, (1 + elemLocal.n), PETSC_DECIDE, (1 + elemGhost.n), tempPtr, &elemVec.neighborPtr); What is tempPtr? > setVecGhost(elemGlobal.neighborPtr, elemVec.neighborPtr, size, rank); I have no idea what the function setVecGhost() is? Is it in PETSc, where? Something else. Barry > > To set the ghost values, I have to call setVecGhost with a global (all elements, not only local) assembly of my data, which gathers the right data. > Let's go back to the sample arrays of the ghost elements. Obviously, the positions of the neighbor elements of element 256 (which is the first element in the ghost arrays) does not start at position 0 in jaGlobal[] (an equivalent global array of the connectivity) but for instance at position 1087. Therefore, the vector creation fails or the a segmentation violation appears. > > Hopefully, this description was a bit clearer. > > Thanks a lot! > Fabian > > ________________________________________ > From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] On Behalf Of Barry Smith [bsmith at mcs.anl.gov] > Sent: 16 July 2010 16:56 > To: PETSc users list > Subject: Re: [petsc-users] Vector including ghost pattern > > On Jul 16, 2010, at 10:31 AM, Denner, Fabian wrote: > >> Hi everybody, >> >> I have the following problem with the handling of a 3D mesh with mixed element types. I aim to build vectors containing the ghost pattern for the mesh of a parallel CFD simulation. Inspired by the example "dm/ao/examples/tutorials/ex2.c" the connectivity information, represented by the element neighbors, is stored in two arrays - one array ja[] containing the neighbor element indices and the other array ia[] (of length n+1) containing the "start" index for each element in array ja[] (compare example below or adjacency graph in "dm/ao/examples/tutorials/ex2.c"). The neighbors of my local elements, elements assigned to the present process, and the neighbors of my ghost elements are stored in different pairs of arrays. >> >> Element indices: index[0 1 2 3 4 5 6 7 .... n] >> Neighbour element indices: ja[3 5 6 11 57 311 41 0 5 67 ..... 532 106] >> "Start"-position of neighour indices in array ja[]: ia[0 3 7 11 13 .... 1503] >> >> The issue appears when I try to cast the arrays in a vector with ghost pattern. When I create a vector with VecCreateGhost, deliver my global neighbor arrays and update my ghost pattern, the data will be lost, since the number of neighbors varies for each element. > > Hmm, VecCreateGhost() doesn't say anything about the number of neighbors or elements. You are free to set any number of ghost points associated with things. So it is up to you to assign the appropriate ghost points etc. > > Perhaps if you are a bit more explicit in your question we could answer it better? > > Barry > >> Subsequently, I can't loop over my ghost neighbors anymore. Is there any different handling of connectivity/adjacency information or is there an opportunity to "prepare" the data in an alternative way? >> >> Best regards, >> Fabian Denner > From craig at tanistech.com Mon Jul 19 13:50:03 2010 From: craig at tanistech.com (Craig Tanis) Date: Mon, 19 Jul 2010 14:50:03 -0400 Subject: [petsc-users] parallel complex preconditioner needed Message-ID: I'm looking for a parallel preconditioner for a complex linear system. For smaller serial runs, the built-in ILU has been great. I've used hypre (euclid) on real matrices, but that suite is apparently only for reals. What are my options for these big complex systems? Thanks, Craig Tanis From dominik at itis.ethz.ch Mon Jul 19 17:29:26 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Tue, 20 Jul 2010 00:29:26 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: Message-ID: Thanks a lot for a useful hint. I have reinstalled cygwin, now with the older python (2.5.x instead of 2.6.x). The configure process now starts, but terminates complaining about downloading mpich. I will look into manual installation tomorrow. Meanwhile, what do you make of CMake? It has been adopted by several large packages... What steps would I have to take to port Petsc to Cmake (not supporting downloading and compilation of external packages in the initial attempt)? Regards, Dominik On Sun, Jul 18, 2010 at 11:34 PM, Matthew Knepley wrote: > This is a Cygwin Python error (a fork() fails). I would consider > reinstalling > Cygwin. In my experience, it is not very stable. I wish we did not have to > use it. > ?? Matt > > On Sun, Jul 18, 2010 at 4:10 PM, Dominik Szczerba > wrote: >> >> (but the error stays the same) >> >> On Sun, Jul 18, 2010 at 11:10 PM, Dominik Szczerba >> wrote: >> > I am sorry I pasted the wrong configure command, the correct one does >> > have --with-cc='win32fe cl' in addition. >> > >> > On Sun, Jul 18, 2010 at 10:58 PM, Dominik Szczerba >> > wrote: >> >> Dear all, >> >> >> >> I am trying to configure petsc 3.1p3 under Windows 7 64 bit using MSVC >> >> 2010 Express. I get the errors listed below. According to google this >> >> is quite exotic. I will be grateful for any hints. >> >> Regards. >> >> Dominik >> >> >> >> $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=linux-gnu-c-release >> >> --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 >> >> --with-parmetis=1 --down >> >> load-parmetis=1 --with-x=0 --with-debugging=0 >> >> >> >> =============================================================================== >> >> ? ? ? ? ? ? Configuring PETSc to compile on your system >> >> >> >> =============================================================================== >> >> TESTING: configureExternalPackagesDir from >> >> config.framework(config/BuildSystem/config/framework.py:829) >> >> TESTING: configureDebuggers from >> >> PETSc.utilities.debuggers(config/PETSc/utilities/debuggers.py:22) >> >> TESTING: configureMake from >> >> PETSc.utilities.Make(config/PETSc/utilities/Make.py:21) >> >> TESTING: configureCLanguage from >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:43) >> >> TESTING: configureLanguageSupport from >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:49) >> >> TESTING: configureExternC from >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:66) >> >> TESTING: configureFortranLanguage from >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:72) >> >> TESTING: configureMkdir from >> >> config.programs(config/BuildSystem/config/programs.py:21) >> >> TESTING: configurePrograms from >> >> config.programs(config/BuildSystem/config/programs.py:43) >> >> ? ? ?0 [main] python 216 C:\cygwin\bin\python.exe: *** fatal error - >> >> unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to >> >> same address as parent >> >> : 0x360000 != 0x3C0000 >> >> ? ? ?0 [main] python 4740 fork: child 216 - died waiting for dll >> >> loading, errno 11 >> >> Exception AttributeError: AttributeError("Popen3 instance has no >> >> attribute 'pid'",) in > >> instance at 0x7eb63f2c>> i >> >> gnored >> >> >> >> ******************************************************************************* >> >> ? ? ? ? ? ? ? ? ? ?UNABLE to EXECUTE BINARIES for config/configure.py >> >> >> >> ------------------------------------------------------------------------------- >> >> [Errno 11] Resource temporarily unavailable >> >> >> >> ******************************************************************************* >> >> >> > > > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > From knepley at gmail.com Mon Jul 19 17:37:18 2010 From: knepley at gmail.com (Matthew Knepley) Date: Tue, 20 Jul 2010 08:37:18 +1000 Subject: [petsc-users] configure problems In-Reply-To: References: Message-ID: On Tue, Jul 20, 2010 at 8:29 AM, Dominik Szczerba wrote: > Thanks a lot for a useful hint. I have reinstalled cygwin, now with > the older python (2.5.x instead of 2.6.x). The configure process now > starts, but terminates complaining about downloading mpich. I will > look into manual installation tomorrow. > If you do not send the error and log, there is absolutely no way we can help you. > Meanwhile, what do you make of CMake? It has been adopted by several > large packages... > I think CMake is a piece of crap. Jed does not. He has a prelim CMake for PETSc. What steps would I have to take to port Petsc to Cmake (not supporting > downloading and compilation of external packages in the initial > attempt)? > This would do you absolutely no good. Even Jed's thing needs all the information that the configure provides. CMake is exactly what it says, make. It does no configuration (or build of other packages like MPICH). Matt > Regards, > Dominik > > > On Sun, Jul 18, 2010 at 11:34 PM, Matthew Knepley > wrote: > > This is a Cygwin Python error (a fork() fails). I would consider > > reinstalling > > Cygwin. In my experience, it is not very stable. I wish we did not have > to > > use it. > > Matt > > > > On Sun, Jul 18, 2010 at 4:10 PM, Dominik Szczerba > > wrote: > >> > >> (but the error stays the same) > >> > >> On Sun, Jul 18, 2010 at 11:10 PM, Dominik Szczerba < > dominik at itis.ethz.ch> > >> wrote: > >> > I am sorry I pasted the wrong configure command, the correct one does > >> > have --with-cc='win32fe cl' in addition. > >> > > >> > On Sun, Jul 18, 2010 at 10:58 PM, Dominik Szczerba > >> > wrote: > >> >> Dear all, > >> >> > >> >> I am trying to configure petsc 3.1p3 under Windows 7 64 bit using > MSVC > >> >> 2010 Express. I get the errors listed below. According to google this > >> >> is quite exotic. I will be grateful for any hints. > >> >> Regards. > >> >> Dominik > >> >> > >> >> $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=linux-gnu-c-release > >> >> --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 > >> >> --with-parmetis=1 --down > >> >> load-parmetis=1 --with-x=0 --with-debugging=0 > >> >> > >> >> > =============================================================================== > >> >> Configuring PETSc to compile on your system > >> >> > >> >> > =============================================================================== > >> >> TESTING: configureExternalPackagesDir from > >> >> config.framework(config/BuildSystem/config/framework.py:829) > >> >> TESTING: configureDebuggers from > >> >> PETSc.utilities.debuggers(config/PETSc/utilities/debuggers.py:22) > >> >> TESTING: configureMake from > >> >> PETSc.utilities.Make(config/PETSc/utilities/Make.py:21) > >> >> TESTING: configureCLanguage from > >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:43) > >> >> TESTING: configureLanguageSupport from > >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:49) > >> >> TESTING: configureExternC from > >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:66) > >> >> TESTING: configureFortranLanguage from > >> >> PETSc.utilities.languages(config/PETSc/utilities/languages.py:72) > >> >> TESTING: configureMkdir from > >> >> config.programs(config/BuildSystem/config/programs.py:21) > >> >> TESTING: configurePrograms from > >> >> config.programs(config/BuildSystem/config/programs.py:43) > >> >> 0 [main] python 216 C:\cygwin\bin\python.exe: *** fatal error - > >> >> unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to > >> >> same address as parent > >> >> : 0x360000 != 0x3C0000 > >> >> 0 [main] python 4740 fork: child 216 - died waiting for dll > >> >> loading, errno 11 > >> >> Exception AttributeError: AttributeError("Popen3 instance has no > >> >> attribute 'pid'",) in >> >> instance at 0x7eb63f2c>> i > >> >> gnored > >> >> > >> >> > ******************************************************************************* > >> >> UNABLE to EXECUTE BINARIES for config/configure.py > >> >> > >> >> > ------------------------------------------------------------------------------- > >> >> [Errno 11] Resource temporarily unavailable > >> >> > >> >> > ******************************************************************************* > >> >> > >> > > > > > > > > > -- > > What most experimenters take for granted before they begin their > experiments > > is infinitely more interesting than any results to which their > experiments > > lead. > > -- Norbert Wiener > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From jed at 59A2.org Mon Jul 19 17:39:33 2010 From: jed at 59A2.org (Jed Brown) Date: Tue, 20 Jul 2010 00:39:33 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: Message-ID: <87tynvjdui.fsf@59A2.org> On Tue, 20 Jul 2010 00:29:26 +0200, Dominik Szczerba wrote: > Thanks a lot for a useful hint. I have reinstalled cygwin, now with > the older python (2.5.x instead of 2.6.x). The configure process now > starts, but terminates complaining about downloading mpich. I will > look into manual installation tomorrow. > Meanwhile, what do you make of CMake? It has been adopted by several > large packages... > What steps would I have to take to port Petsc to Cmake (not supporting > downloading and compilation of external packages in the initial > attempt)? Petsc-dev has preliminary support for CMake, it doesn't try to do it's own configuration, but just picks up what PETSc's configure discovers. See the "Experimental build systems" section: http://www.mcs.anl.gov/petsc/petsc-as/developers/index.html I'll make it more tranparent soon, the extra steps were useful for debugging, but can be eliminated for most users. Jed From jed at 59A2.org Mon Jul 19 17:44:54 2010 From: jed at 59A2.org (Jed Brown) Date: Tue, 20 Jul 2010 00:44:54 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: Message-ID: <87r5izjdll.fsf@59A2.org> On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley wrote: > This would do you absolutely no good. Even Jed's thing needs all the > information that the configure provides. CMake is exactly what it > says, make. It does no configuration This isn't true, CMake isn't a build system at all, it does configuration and produces build files for another tool (like make or an IDE). I see no point in maintaining duplicate configuration systems, and CMake's scripting language is so attrocious that "replacing" BuildSystem with CMake script would be a disaster. It's cross-compilation support is also a bit weak, and there are a pile of other things that it does poorly (mostly related to pathologically dysfunctional "Find*.cmake" modules). That doesn't mean it isn't useful for producing build files. Jed From jed at 59A2.org Tue Jul 20 05:30:15 2010 From: jed at 59A2.org (Jed Brown) Date: Tue, 20 Jul 2010 12:30:15 +0200 Subject: [petsc-users] parallel complex preconditioner needed In-Reply-To: References: Message-ID: <87oce2jvig.fsf@59A2.org> On Mon, 19 Jul 2010 14:50:03 -0400, Craig Tanis wrote: > I'm looking for a parallel preconditioner for a complex linear system. > For smaller serial runs, the built-in ILU has been great. > > I've used hypre (euclid) on real matrices, but that suite is > apparently only for reals. What are my options for these big complex > systems? What problem are you solving? Many of the direct solvers work with complex scalars, the algebraic multigrid packages are currently lacking in this regard. If the problem is sufficiently small, you can use a parallel direct solver, otherwise you'll need some sort of domain decomposition method (e.g. -pc_type asm). If ILU is working well for you, direct subdomain solves are probably not important. You may still need a coarse level, there are many ways to do this, but they are problem dependent. Jed From craig at tanistech.com Tue Jul 20 10:06:53 2010 From: craig at tanistech.com (Craig Tanis) Date: Tue, 20 Jul 2010 11:06:53 -0400 Subject: [petsc-users] parallel complex preconditioner needed In-Reply-To: <87oce2jvig.fsf@59A2.org> References: <87oce2jvig.fsf@59A2.org> Message-ID: <300AF56A-3F3E-491C-99AB-8024E98DB647@tanistech.com> This is a frequency domain EM simulation. I think my main problem is interpreting the options available.. PETSc apparently has a built-in direct solver, which is how ILU works on a single processor, right? Are the parallel direct solvers in some 3rd party package,like hypre, that I need to install separately? Do I somehow specify a direct solver to use for the built-in ILU ? thanks, -craig On Jul 20, 2010, at 6:30 AM, Jed Brown wrote: > On Mon, 19 Jul 2010 14:50:03 -0400, Craig Tanis wrote: >> I'm looking for a parallel preconditioner for a complex linear system. >> For smaller serial runs, the built-in ILU has been great. >> >> I've used hypre (euclid) on real matrices, but that suite is >> apparently only for reals. What are my options for these big complex >> systems? > > What problem are you solving? Many of the direct solvers work with > complex scalars, the algebraic multigrid packages are currently lacking > in this regard. If the problem is sufficiently small, you can use a > parallel direct solver, otherwise you'll need some sort of domain > decomposition method (e.g. -pc_type asm). If ILU is working well for > you, direct subdomain solves are probably not important. You may still > need a coarse level, there are many ways to do this, but they are > problem dependent. > > Jed From jed at 59A2.org Tue Jul 20 10:18:18 2010 From: jed at 59A2.org (Jed Brown) Date: Tue, 20 Jul 2010 17:18:18 +0200 Subject: [petsc-users] parallel complex preconditioner needed In-Reply-To: <300AF56A-3F3E-491C-99AB-8024E98DB647@tanistech.com> References: <87oce2jvig.fsf@59A2.org> <300AF56A-3F3E-491C-99AB-8024E98DB647@tanistech.com> Message-ID: <87iq4aji6d.fsf@59A2.org> On Tue, 20 Jul 2010 11:06:53 -0400, Craig Tanis wrote: > This is a frequency domain EM simulation. This is an especially difficult problem if you have large jumps in coefficients. > I think my main problem is interpreting the options available.. PETSc > apparently has a built-in direct solver, which is how ILU works on a > single processor, right? The I in ILU stands for Incomplete. The direct solver is LU which you can access with -pc_type lu. > Are the parallel direct solvers in some 3rd party package,like hypre, > that I need to install separately? Do I somehow specify a direct > solver to use for the built-in ILU ? Yes, the native LU is not parallel, you can get one with --download-{blacs,scalapack,mumps} or --download-superlu_dist, and -pc_type lu -pc_factor_mat_solver_package mumps (or superlu_dist). To try a 1-level domain decomposition method, run with -pc_type asm, check the -help options under -pc_asm_*, and control the subdomain solver with -sub_{ksp,pc}_* Jed From bsmith at mcs.anl.gov Tue Jul 20 13:01:24 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 20 Jul 2010 13:01:24 -0500 Subject: [petsc-users] Vector including ghost pattern In-Reply-To: References: , , Message-ID: <241F5FE7-9D93-4977-8055-2B2C7BB81E3C@mcs.anl.gov> Are you doing 1) finite element type calculations, for example using a traditional nodal basis? 2) traditional finite volume calculations where you have for example degrees of freedom associated with each cell? and need to do computations across faces? 3) something else? I am still having trouble getting a grasp on what the problem is, so more information may be helpful. Barry On Jul 19, 2010, at 6:25 AM, Denner, Fabian wrote: > Hi everyone, > > thanks Barry you are right, I messed it up. The setVecGhost() function is my own function. Find below a revised explanation of my problem and an adjusted and simplified example. > > Some remarks for a clearer understanding. The connectivity information of the mesh is generally stored in a pair of arrays, ia[] and ja[] (similar to example "dm/ao/examples/tutorials/ex2.c"). The array ja[] contains the indices of the neighbor elements. The array ia[] contains the start-position in array ja[] for each element and has the length numberOfElements+1. For instance, if there are 3 elements the connectivity information could look as followed: ja[] is [45 12 34 8 101 23 4 49 95] and ia[] is [0 2 5 9]. This means the elements with the indices 45 and 12 are neighbors of the first element, the elements 34, 8 and 101 are neighbors of the second element and so on. To be able to loop over the neighbor elements the array ia[] needs to contain numberOfElements+1 positions, with the total number of neighbors stored in the last position. > Since the mesh handling is supposed to work in parallel the mesh is distributed to several processors. Therefore, the mesh is stored in "local" arrays, containing the mesh (vertices, faces, elements) information which is local to that processor, and in "ghost" arrays, containing the mesh information of neighboring entities stored on a different processor. To use for example the VecScatter functions I would like to cast this connectivity information into vectors. Unfortunately I couldn't find an opportunity to set the "ghost" information in the vector for array ia[] right, since it gathers the information from the "global" representation and thus I can't loop over the ghost elements anymore because the neighbors of a particular element are most likely stored in a different position of the "global" array than in the "ghost" array. > > VecCreateGhost(PETSC_COMM_WORLD, (1+numberLocalElements), PETSC_DECIDE, (1 + numberGhostElements), iaGhost, &vec); > > VecGetOwnershipRange(vec, &start, &end); > for (i = start; i < end; i++) > { > value = (double) iaGlobal[i]; > VecSetValues(vec, 1, &i, &value, INSERT_VALUES); > } > > VecAssemblyBegin(vec); > VecAssemblyEnd(vec); > > VecGhostUpdateBegin(vec, INSERT_VALUES, SCATTER_FORWARD); > VecGhostUpdateEnd(vec, INSERT_VALUES, SCATTER_FORWARD); > > > Does anyone have an idea how to solve the problem or did anyone have a similar problem before? > > Best regards and thanks in advance, > Fabian > > ________________________________________ > From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] On Behalf Of Barry Smith [bsmith at mcs.anl.gov] > Sent: 17 July 2010 03:48 > To: PETSc users list > Subject: Re: [petsc-users] Vector including ghost pattern > > On Jul 16, 2010, at 11:27 AM, Denner, Fabian wrote: > >> Hi. >> >> Let me try to explain it with a more detailed example. >> I have the two arrays of my local element connectivity information (local elements are elements stored on the current rank), with the neighbor element indices in array jaLocal[] and the "start"-position for each element in jaLocal[] stored in array iaLocal. >> >> >> jaLocal: [3 6 17 23 38 9 0 5 6 8 10 11 ...] >> iaLocal: [0 3 7 11 13 17 21 ....] >> >> The same I have for my ghost elements. I added also a sample of the ghost element index array to explain it a bit better. >> >> indexGhost: [256 453 301 ...] >> >> jaGhost: [465 204 461 299 213 ....] >> iaGhost: [0 4 8 12 16 19 ....] >> >> If I like to cast this data in to a vector with ghost pattern, I have to call the following commands (which could look like that): >> >> VecCreateGhost(PETSC_COMM_WORLD, (1 + elemLocal.n), PETSC_DECIDE, (1 + elemGhost.n), tempPtr, &elemVec.neighborPtr); > > What is tempPtr? > >> setVecGhost(elemGlobal.neighborPtr, elemVec.neighborPtr, size, rank); > > I have no idea what the function setVecGhost() is? Is it in PETSc, where? Something else. > > Barry > >> >> To set the ghost values, I have to call setVecGhost with a global (all elements, not only local) assembly of my data, which gathers the right data. >> Let's go back to the sample arrays of the ghost elements. Obviously, the positions of the neighbor elements of element 256 (which is the first element in the ghost arrays) does not start at position 0 in jaGlobal[] (an equivalent global array of the connectivity) but for instance at position 1087. Therefore, the vector creation fails or the a segmentation violation appears. >> >> Hopefully, this description was a bit clearer. >> >> Thanks a lot! >> Fabian >> >> ________________________________________ >> From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] On Behalf Of Barry Smith [bsmith at mcs.anl.gov] >> Sent: 16 July 2010 16:56 >> To: PETSc users list >> Subject: Re: [petsc-users] Vector including ghost pattern >> >> On Jul 16, 2010, at 10:31 AM, Denner, Fabian wrote: >> >>> Hi everybody, >>> >>> I have the following problem with the handling of a 3D mesh with mixed element types. I aim to build vectors containing the ghost pattern for the mesh of a parallel CFD simulation. Inspired by the example "dm/ao/examples/tutorials/ex2.c" the connectivity information, represented by the element neighbors, is stored in two arrays - one array ja[] containing the neighbor element indices and the other array ia[] (of length n+1) containing the "start" index for each element in array ja[] (compare example below or adjacency graph in "dm/ao/examples/tutorials/ex2.c"). The neighbors of my local elements, elements assigned to the present process, and the neighbors of my ghost elements are stored in different pairs of arrays. >>> >>> Element indices: index[0 1 2 3 4 5 6 7 .... n] >>> Neighbour element indices: ja[3 5 6 11 57 311 41 0 5 67 ..... 532 106] >>> "Start"-position of neighour indices in array ja[]: ia[0 3 7 11 13 .... 1503] >>> >>> The issue appears when I try to cast the arrays in a vector with ghost pattern. When I create a vector with VecCreateGhost, deliver my global neighbor arrays and update my ghost pattern, the data will be lost, since the number of neighbors varies for each element. >> >> Hmm, VecCreateGhost() doesn't say anything about the number of neighbors or elements. You are free to set any number of ghost points associated with things. So it is up to you to assign the appropriate ghost points etc. >> >> Perhaps if you are a bit more explicit in your question we could answer it better? >> >> Barry >> >>> Subsequently, I can't loop over my ghost neighbors anymore. Is there any different handling of connectivity/adjacency information or is there an opportunity to "prepare" the data in an alternative way? >>> >>> Best regards, >>> Fabian Denner >> > From dominik at itis.ethz.ch Wed Jul 21 09:31:13 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Wed, 21 Jul 2010 16:31:13 +0200 Subject: [petsc-users] configure problems In-Reply-To: <87r5izjdll.fsf@59A2.org> References: <87r5izjdll.fsf@59A2.org> Message-ID: Coming back to the original problem: I tried to compile MPICH2 myself and failed because of wrong version of automake in Cygwin. I then installed the Windows binary available on the mpich2 webpage. I configure petsc with: $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-mpi-dir='/cygdrive/c/Program Files/MPICH2' --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 to hear at the end (of a very long configuration process...): sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib Executing: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib sh: Warning: win32fe: File Not Found: /cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib cl : Command line warning D9002 : ignoring unknown option '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' conftest.obj : error LNK2019: unresolved external symbol _MPI_Init referenced in function _main C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error LNK1120: 1 unresolved externals Any directions why would the configuration look for a nonexistent library? The contents of the installation folder are: $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ total 808 drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. -rwx------+ 1 SYSTEM SYSTEM 4644 2010-02-22 17:13 TraceInput.lib -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 cxx.lib -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 fmpich2.lib -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 fmpich2g.lib -rwx------+ 1 SYSTEM SYSTEM 1936 2010-02-22 17:13 irlog2rlog.lib -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 mpe.lib -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 mpi.lib -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 rlog.lib Best regards, Dominik On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown wrote: > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley wrote: >> This would do you absolutely no good. Even Jed's thing needs all the >> information that the configure provides. CMake is exactly what it >> says, make. It does no configuration > > This isn't true, CMake isn't a build system at all, it does > configuration and produces build files for another tool (like make or an > IDE). ?I see no point in maintaining duplicate configuration systems, > and CMake's scripting language is so attrocious that "replacing" > BuildSystem with CMake script would be a disaster. ?It's > cross-compilation support is also a bit weak, and there are a pile of > other things that it does poorly (mostly related to pathologically > dysfunctional "Find*.cmake" modules). ?That doesn't mean it isn't useful > for producing build files. > > Jed > > From balay at mcs.anl.gov Wed Jul 21 11:09:00 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 21 Jul 2010 11:09:00 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <87r5izjdll.fsf@59A2.org> Message-ID: Try: ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 If it fails - send us configure.log at petsc-maint at mcs.anl.gov BTW: What do you have in your LIB env variable? [MS search this path for libraries by default] echo $LIB Satish On Wed, 21 Jul 2010, Dominik Szczerba wrote: > Coming back to the original problem: I tried to compile MPICH2 myself > and failed because of wrong version of automake in Cygwin. I then > installed the Windows binary available on the mpich2 webpage. I > configure petsc with: > > $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > --download-c-blas-lapack=1 --with-mpi-dir='/cygdrive/c/Program > Files/MPICH2' --with-x=0 --with-debugging=0 --with-cc='win32fe cl' > --with-fc=0 > > to hear at the end (of a very long configuration process...): > > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > Executing: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > Files/MPICH2/lib/amd64/msmpi.lib > cl : Command line warning D9002 : ignoring unknown option > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > referenced in function _main > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > LNK1120: 1 unresolved externals > > Any directions why would the configuration look for a nonexistent > library? The contents of the installation folder are: > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > total 808 > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > -rwx------+ 1 SYSTEM SYSTEM 4644 2010-02-22 17:13 TraceInput.lib > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 cxx.lib > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 fmpich2.lib > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 fmpich2g.lib > -rwx------+ 1 SYSTEM SYSTEM 1936 2010-02-22 17:13 irlog2rlog.lib > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 mpe.lib > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 mpi.lib > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 rlog.lib > > Best regards, > Dominik > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown wrote: > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley wrote: > >> This would do you absolutely no good. Even Jed's thing needs all the > >> information that the configure provides. CMake is exactly what it > >> says, make. It does no configuration > > > > This isn't true, CMake isn't a build system at all, it does > > configuration and produces build files for another tool (like make or an > > IDE). ?I see no point in maintaining duplicate configuration systems, > > and CMake's scripting language is so attrocious that "replacing" > > BuildSystem with CMake script would be a disaster. ?It's > > cross-compilation support is also a bit weak, and there are a pile of > > other things that it does poorly (mostly related to pathologically > > dysfunctional "Find*.cmake" modules). ?That doesn't mean it isn't useful > > for producing build files. > > > > Jed > > > > > From vkuhlem at emory.edu Wed Jul 21 11:27:41 2010 From: vkuhlem at emory.edu (Verena Kuhlemann) Date: Wed, 21 Jul 2010 12:27:41 -0400 Subject: [petsc-users] mat function: A+A^T Message-ID: Is there a Mat function that computes A+A^T? I couldn't find one, but maybe I missed it. Thanks, Verena -------------- next part -------------- An HTML attachment was scrubbed... URL: From jed at 59A2.org Wed Jul 21 11:37:14 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 21 Jul 2010 18:37:14 +0200 Subject: [petsc-users] mat function: A+A^T In-Reply-To: References: Message-ID: <87d3uglrk5.fsf@59A2.org> On Wed, 21 Jul 2010 12:27:41 -0400, Verena Kuhlemann wrote: > Is there a Mat function that computes A+A^T? > I couldn't find one, but maybe I missed it. /* B = A + A^T */ MatTranspose(A,MAT_INITIAL_MATRIX,&B); MatAXPY(B,1.0,A,DIFFERENT_NONZERO_PATTERN); You can use SAME_NONZERO_PATTERN if the matrix is structurally symmetric. Jed From dominik at itis.ethz.ch Wed Jul 21 16:08:30 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Wed, 21 Jul 2010 23:08:30 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <87r5izjdll.fsf@59A2.org> Message-ID: I assume you mean in addition --with-mpi=0, else I am expecting an error message. Configure did not bring up any errors: Compilers: C Compiler: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -MT -wd4996 Linkers: Static linker: /usr/bin/ar cr BLAS/LAPACK: -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2clapack -L/cygdrive/c/Users/Dominik/P rograms/petsc-3.1-p3/win64-msvc-release/lib -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2cblas PETSc: PETSC_ARCH: win64-msvc-release PETSC_DIR: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 Clanguage: C Scalar type: real Precision: double Memory alignment: 16 shared libraries: disabled dynamic libraries: disabled xxx=========================================================================xxx Configure stage complete. Now build PETSc libraries with: make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 PETSC_ARCH=win64-msvc-release all xxx=========================================================================xxx Building was also successful. Test run OK (with 1 MPI process) My LIB: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib; Many thanks for any hints how to get a usable MPICH2 installation, Dominik On Wed, Jul 21, 2010 at 6:09 PM, Satish Balay wrote: > Try: > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 --with-cc='win32fe > cl' --with-fc=0 > > If it fails - send us configure.log at petsc-maint at mcs.anl.gov > > BTW: What do you have in your LIB env variable? [MS search this path for > libraries by default] > > echo $LIB > > Satish > > On Wed, 21 Jul 2010, Dominik Szczerba wrote: > > > Coming back to the original problem: I tried to compile MPICH2 myself > > and failed because of wrong version of automake in Cygwin. I then > > installed the Windows binary available on the mpich2 webpage. I > > configure petsc with: > > > > $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > --download-c-blas-lapack=1 --with-mpi-dir='/cygdrive/c/Program > > Files/MPICH2' --with-x=0 --with-debugging=0 --with-cc='win32fe cl' > > --with-fc=0 > > > > to hear at the end (of a very long configuration process...): > > > > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > Executing: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > Files/MPICH2/lib/amd64/msmpi.lib > > cl : Command line warning D9002 : ignoring unknown option > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > > referenced in function _main > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > > LNK1120: 1 unresolved externals > > > > Any directions why would the configuration look for a nonexistent > > library? The contents of the installation folder are: > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > total 808 > > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > > -rwx------+ 1 SYSTEM SYSTEM 4644 2010-02-22 17:13 TraceInput.lib > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 cxx.lib > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 fmpich2.lib > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 fmpich2g.lib > > -rwx------+ 1 SYSTEM SYSTEM 1936 2010-02-22 17:13 irlog2rlog.lib > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 mpe.lib > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 mpi.lib > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 rlog.lib > > > > Best regards, > > Dominik > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown wrote: > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > wrote: > > >> This would do you absolutely no good. Even Jed's thing needs all the > > >> information that the configure provides. CMake is exactly what it > > >> says, make. It does no configuration > > > > > > This isn't true, CMake isn't a build system at all, it does > > > configuration and produces build files for another tool (like make or > an > > > IDE). I see no point in maintaining duplicate configuration systems, > > > and CMake's scripting language is so attrocious that "replacing" > > > BuildSystem with CMake script would be a disaster. It's > > > cross-compilation support is also a bit weak, and there are a pile of > > > other things that it does poorly (mostly related to pathologically > > > dysfunctional "Find*.cmake" modules). That doesn't mean it isn't > useful > > > for producing build files. > > > > > > Jed > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Wed Jul 21 16:26:54 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 21 Jul 2010 16:26:54 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <87r5izjdll.fsf@59A2.org> Message-ID: On Wed, 21 Jul 2010, Dominik Szczerba wrote: > I assume you mean in addition --with-mpi=0, else I am expecting an error > message. I meant without --with-mpi=0 [or any other MPI option]. In this case configure searches in default paths [assuming MPICH2 was installed in standard location]. Looks like it didn't work for you. So - can you send the corresponding configure.log to petsc-maint? Satish > Configure did not bring up any errors: > > Compilers: > C Compiler: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -MT > -wd4996 > Linkers: > Static linker: /usr/bin/ar cr > BLAS/LAPACK: > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2clapack -L/cygdrive/c/Users/Dominik/P > rograms/petsc-3.1-p3/win64-msvc-release/lib > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2cblas > PETSc: > PETSC_ARCH: win64-msvc-release > PETSC_DIR: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > Clanguage: C > Scalar type: real > Precision: double > Memory alignment: 16 > shared libraries: disabled > dynamic libraries: disabled > xxx=========================================================================xxx > Configure stage complete. Now build PETSc libraries with: > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > PETSC_ARCH=win64-msvc-release all > xxx=========================================================================xxx > > Building was also successful. Test run OK (with 1 MPI process) > > My LIB: > > C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program > Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft > SDKs\Windows\v6.0A\lib; > > Many thanks for any hints how to get a usable MPICH2 installation, > Dominik > > On Wed, Jul 21, 2010 at 6:09 PM, Satish Balay wrote: > > > Try: > > > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 --with-cc='win32fe > > cl' --with-fc=0 > > > > If it fails - send us configure.log at petsc-maint at mcs.anl.gov > > > > BTW: What do you have in your LIB env variable? [MS search this path for > > libraries by default] > > > > echo $LIB > > > > Satish > > > > On Wed, 21 Jul 2010, Dominik Szczerba wrote: > > > > > Coming back to the original problem: I tried to compile MPICH2 myself > > > and failed because of wrong version of automake in Cygwin. I then > > > installed the Windows binary available on the mpich2 webpage. I > > > configure petsc with: > > > > > > $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > > --download-c-blas-lapack=1 --with-mpi-dir='/cygdrive/c/Program > > > Files/MPICH2' --with-x=0 --with-debugging=0 --with-cc='win32fe cl' > > > --with-fc=0 > > > > > > to hear at the end (of a very long configuration process...): > > > > > > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > Executing: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > Files/MPICH2/lib/amd64/msmpi.lib > > > cl : Command line warning D9002 : ignoring unknown option > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > > > referenced in function _main > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > > > LNK1120: 1 unresolved externals > > > > > > Any directions why would the configuration look for a nonexistent > > > library? The contents of the installation folder are: > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > total 808 > > > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > > > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > > > -rwx------+ 1 SYSTEM SYSTEM 4644 2010-02-22 17:13 TraceInput.lib > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 cxx.lib > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 fmpich2.lib > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 fmpich2g.lib > > > -rwx------+ 1 SYSTEM SYSTEM 1936 2010-02-22 17:13 irlog2rlog.lib > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 mpe.lib > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 mpi.lib > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 rlog.lib > > > > > > Best regards, > > > Dominik > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown wrote: > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > wrote: > > > >> This would do you absolutely no good. Even Jed's thing needs all the > > > >> information that the configure provides. CMake is exactly what it > > > >> says, make. It does no configuration > > > > > > > > This isn't true, CMake isn't a build system at all, it does > > > > configuration and produces build files for another tool (like make or > > an > > > > IDE). I see no point in maintaining duplicate configuration systems, > > > > and CMake's scripting language is so attrocious that "replacing" > > > > BuildSystem with CMake script would be a disaster. It's > > > > cross-compilation support is also a bit weak, and there are a pile of > > > > other things that it does poorly (mostly related to pathologically > > > > dysfunctional "Find*.cmake" modules). That doesn't mean it isn't > > useful > > > > for producing build files. > > > > > > > > Jed > > > > > > > > > > > > > > From dominik at itis.ethz.ch Wed Jul 21 17:07:01 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 00:07:01 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <87r5izjdll.fsf@59A2.org> Message-ID: OK. Now the configuration breaks with the ending: ******************************************************************************* UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): ------------------------------------------------------------------------------- You must specify a path for MPI with --with-mpi-dir= If you do not want MPI, then give --with-mpi=0 You might also consider using --download-mpi instead ******************************************************************************* I am posting the whole log to the other list. Thanks, Dominik On Wed, Jul 21, 2010 at 11:26 PM, Satish Balay wrote: > On Wed, 21 Jul 2010, Dominik Szczerba wrote: > > > I assume you mean in addition --with-mpi=0, else I am expecting an error > > message. > > I meant without --with-mpi=0 [or any other MPI option]. In this case > configure searches in default paths [assuming MPICH2 was installed in > standard location]. > > Looks like it didn't work for you. So - can you send the corresponding > configure.log to petsc-maint? > > Satish > > > Configure did not bring up any errors: > > > > Compilers: > > C Compiler: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > -MT > > -wd4996 > > Linkers: > > Static linker: /usr/bin/ar cr > > BLAS/LAPACK: > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > -lf2clapack -L/cygdrive/c/Users/Dominik/P > > rograms/petsc-3.1-p3/win64-msvc-release/lib > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > -lf2cblas > > PETSc: > > PETSC_ARCH: win64-msvc-release > > PETSC_DIR: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > Clanguage: C > > Scalar type: real > > Precision: double > > Memory alignment: 16 > > shared libraries: disabled > > dynamic libraries: disabled > > > xxx=========================================================================xxx > > Configure stage complete. Now build PETSc libraries with: > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > PETSC_ARCH=win64-msvc-release all > > > xxx=========================================================================xxx > > > > Building was also successful. Test run OK (with 1 MPI process) > > > > My LIB: > > > > C:\Program Files (x86)\Microsoft Visual Studio > 9.0\VC\ATLMFC\LIB;C:\Program > > Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft > > SDKs\Windows\v6.0A\lib; > > > > Many thanks for any hints how to get a usable MPICH2 installation, > > Dominik > > > > On Wed, Jul 21, 2010 at 6:09 PM, Satish Balay wrote: > > > > > Try: > > > > > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > --with-cc='win32fe > > > cl' --with-fc=0 > > > > > > If it fails - send us configure.log at petsc-maint at mcs.anl.gov > > > > > > BTW: What do you have in your LIB env variable? [MS search this path > for > > > libraries by default] > > > > > > echo $LIB > > > > > > Satish > > > > > > On Wed, 21 Jul 2010, Dominik Szczerba wrote: > > > > > > > Coming back to the original problem: I tried to compile MPICH2 myself > > > > and failed because of wrong version of automake in Cygwin. I then > > > > installed the Windows binary available on the mpich2 webpage. I > > > > configure petsc with: > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > > > --download-c-blas-lapack=1 --with-mpi-dir='/cygdrive/c/Program > > > > Files/MPICH2' --with-x=0 --with-debugging=0 --with-cc='win32fe cl' > > > > --with-fc=0 > > > > > > > > to hear at the end (of a very long configuration process...): > > > > > > > > sh: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > Executing: > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > cl : Command line warning D9002 : ignoring unknown option > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > > > > referenced in function _main > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > > > > LNK1120: 1 unresolved externals > > > > > > > > Any directions why would the configuration look for a nonexistent > > > > library? The contents of the installation folder are: > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > total 808 > > > > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > > > > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 2010-02-22 17:13 TraceInput.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 cxx.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 fmpich2.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 fmpich2g.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 2010-02-22 17:13 irlog2rlog.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 mpe.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 mpi.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 rlog.lib > > > > > > > > Best regards, > > > > Dominik > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown wrote: > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley < > knepley at gmail.com> > > > wrote: > > > > >> This would do you absolutely no good. Even Jed's thing needs all > the > > > > >> information that the configure provides. CMake is exactly what it > > > > >> says, make. It does no configuration > > > > > > > > > > This isn't true, CMake isn't a build system at all, it does > > > > > configuration and produces build files for another tool (like make > or > > > an > > > > > IDE). I see no point in maintaining duplicate configuration > systems, > > > > > and CMake's scripting language is so attrocious that "replacing" > > > > > BuildSystem with CMake script would be a disaster. It's > > > > > cross-compilation support is also a bit weak, and there are a pile > of > > > > > other things that it does poorly (mostly related to pathologically > > > > > dysfunctional "Find*.cmake" modules). That doesn't mean it isn't > > > useful > > > > > for producing build files. > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lizs at mail.uc.edu Wed Jul 21 18:19:33 2010 From: lizs at mail.uc.edu (Li, Zhisong (lizs)) Date: Wed, 21 Jul 2010 23:19:33 +0000 Subject: [petsc-users] Is it possible to use global variables in Petsc code? Message-ID: <88D7E3BB7E1960428303E760100374510FA4165A@BL2PRD0103MB055.prod.exchangelabs.com> Hi, Petsc Team, I wonder if we can utilize a global variable when using PETSc, such as a declaration and definition in the main function: extern PetscScalar x, y, z; x = 1.0; This should be a regular usage in ANSI C and will help a lot when we have user-defined functions. If it can work, then it will easily replace those functions like DAGetInfo( ) and save running time. But I don't see any examples of using this in PETSc before. And I've tried this but it doesn't work or cannot pass the compiling check. Thank you. Zhisong Li -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at mcs.anl.gov Wed Jul 21 18:35:57 2010 From: sean at mcs.anl.gov (Sean Farley) Date: Wed, 21 Jul 2010 18:35:57 -0500 Subject: [petsc-users] Is it possible to use global variables in Petsc code? In-Reply-To: <88D7E3BB7E1960428303E760100374510FA4165A@BL2PRD0103MB055.prod.exchangelabs.com> References: <88D7E3BB7E1960428303E760100374510FA4165A@BL2PRD0103MB055.prod.exchangelabs.com> Message-ID: > > save running time. > You will see no measurable difference in runtime by using global variables (as opposed to calling a function). If you are worried about performance at this level, then you should consider writing your code in assembly. To verify, try running any of the many helpful examples in PETSc with the option -log_summary to see where most of the time is being spent. You should concentrate on improving your solver or discretization method to improve your program's speed. But I don't see any examples of using this in PETSc before. And I've tried > this but it doesn't work or cannot pass the compiling check. > There is a reason people don't use global variables in writing code, and that is extendability and robustness. You will waste FAR more time debugging code with global variables than you would ever see in the (nonexistent) speedup. Sean -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Wed Jul 21 18:41:57 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 21 Jul 2010 18:41:57 -0500 Subject: [petsc-users] Is it possible to use global variables in Petsc code? In-Reply-To: <88D7E3BB7E1960428303E760100374510FA4165A@BL2PRD0103MB055.prod.exchangelabs.com> References: <88D7E3BB7E1960428303E760100374510FA4165A@BL2PRD0103MB055.prod.exchangelabs.com> Message-ID: <437AE179-EB16-4C27-A6D0-D69EC5F5EDEE@mcs.anl.gov> Since a PETSc C program is just C, you can, of course, use global variables like you can in any C program. We recommend against programming in this way.; any good book on programming should explain why it is a bad idea from the point of view of program maintainability and extensibility. Given that 99+% of PETSc program run time is taken inside long running routines like matrix and vector operations the overhead of function calls like DAGetInfo() is so small that it is going to be un-measurable, you are trading a more understandable, maintainable and extensible program for a microscopic improvement in run time. Barry On Jul 21, 2010, at 6:19 PM, Li, Zhisong (lizs) wrote: > Hi, Petsc Team, > > I wonder if we can utilize a global variable when using PETSc, such as a declaration and definition in the main function: > > extern PetscScalar x, y, z; > x = 1.0; > > This should be a regular usage in ANSI C and will help a lot when we have user-defined functions. If it can work, then it will easily replace those functions like DAGetInfo( ) and save running time. But I don't see any examples of using this in PETSc before. And I've tried this but it doesn't work or cannot pass the compiling check. > > > Thank you. > > > Zhisong Li -------------- next part -------------- An HTML attachment was scrubbed... URL: From xxy113 at psu.edu Wed Jul 21 18:52:23 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 21 Jul 2010 19:52:23 -0400 Subject: [petsc-users] TSDefaultComputeJacobian Message-ID: Hi, In SNES, Petsc can compute Jacobian by: ierr = SNESSetJacobian (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); How about TS? I don't want to provide Jacobian function by myself, but I didn't find something like TSDefaultComputeJacobian. Many thanks! Xuan YU xxy113 at psu.edu From jed at 59A2.org Wed Jul 21 19:04:17 2010 From: jed at 59A2.org (Jed Brown) Date: Thu, 22 Jul 2010 02:04:17 +0200 Subject: [petsc-users] TSDefaultComputeJacobian In-Reply-To: References: Message-ID: <871vawl6v2.fsf@59A2.org> On Wed, 21 Jul 2010 19:52:23 -0400, Xuan YU wrote: > Hi, > > In SNES, Petsc can compute Jacobian by: > > ierr = > SNESSetJacobian > (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); > > How about TS? I don't want to provide Jacobian function by myself, but > I didn't find something like TSDefaultComputeJacobian. You can use -snes_fd (or -snes_mf or -snes_mf_operator) with TS. Programmatically, TSGetSNES(ts,&snes); SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobian,ts); Jed From xxy113 at psu.edu Wed Jul 21 20:43:29 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 21 Jul 2010 21:43:29 -0400 Subject: [petsc-users] TSDefaultComputeJacobian References: <871vawl6v2.fsf@59A2.org> Message-ID: <888B3804-C939-4456-A736-5CAC17019C0F@psu.edu> Begin forwarded message: > From: Jed Brown > Date: July 21, 2010 8:04:17 PM EDT > To: Xuan YU , PETSc users list > > Subject: Re: [petsc-users] TSDefaultComputeJacobian > > On Wed, 21 Jul 2010 19:52:23 -0400, Xuan YU wrote: >> Hi, >> >> In SNES, Petsc can compute Jacobian by: >> >> ierr = >> SNESSetJacobian >> (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); >> >> How about TS? I don't want to provide Jacobian function by myself, >> but >> I didn't find something like TSDefaultComputeJacobian. > > You can use -snes_fd (or -snes_mf or -snes_mf_operator) with TS. > Programmatically, > > TSGetSNES(ts,&snes); > SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobian,ts); > I have already tried this function. I want to use Finite Difference Jacobian Approximations So, before I call the function: MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); I should assemble J. I tried to use SNESComputeJacobian(snes,x,&J,&J,&flag) to assemble J. Here is the code ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N, 10,PETSC_NULL,&J);CHKERRQ(ierr); ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr); ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr); ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr); ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr); ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr); ierr = TSSetType(ts,TSBEULER);CHKERRQ(ierr); ierr = TSGetSNES(ts,&ts_snes); ierr= SNESSetJacobian (ts_snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); MatStructure flag; ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); ISColoringDestroy(iscoloring); ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); But I got the error: [0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Object is in wrong state! [0]PETSC ERROR: Must call SNESSetFunction() before SNESComputeFunction(), likely called from SNESSolve().! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Development HG revision: fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 21:17:36 2010 -0500 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: ./pihm on a arch-linu named kernighan.aset.psu.edu by xxy113 Wed Jul 21 21:35:01 2010 [0]PETSC ERROR: Libraries linked from /gpfs/home/xxy113/soft/petsc-dev/ arch-linux-gnu-c-debug/lib [0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 [0]PETSC ERROR: Configure options --download-f-blas-lapack=1 -- download-mpich=1 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: SNESComputeFunction() line 1180 in src/snes/interface/ snes.c [0]PETSC ERROR: SNESDefaultComputeJacobian() line 77 in src/snes/ interface/snesj.c [0]PETSC ERROR: SNESComputeJacobian() line 1264 in src/snes/interface/ snes.c [0]PETSC ERROR: VecRestoreArrayPrivate3() line 234 in /work/petsc/pihm.c > Jed > -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Jul 21 20:50:20 2010 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 22 Jul 2010 11:50:20 +1000 Subject: [petsc-users] TSDefaultComputeJacobian In-Reply-To: <888B3804-C939-4456-A736-5CAC17019C0F@psu.edu> References: <871vawl6v2.fsf@59A2.org> <888B3804-C939-4456-A736-5CAC17019C0F@psu.edu> Message-ID: Yes, you have setup the Jacobian function, but you never setup the residual function, which is what the error is complaining about. Matt On Thu, Jul 22, 2010 at 11:43 AM, Xuan YU wrote: > > > Begin forwarded message: > > *From: *Jed Brown > *Date: *July 21, 2010 8:04:17 PM EDT > *To: *Xuan YU , PETSc users list > *Subject: **Re: [petsc-users] TSDefaultComputeJacobian* > > On Wed, 21 Jul 2010 19:52:23 -0400, Xuan YU wrote: > > Hi, > > > In SNES, Petsc can compute Jacobian by: > > > ierr = > > SNESSetJacobian > > (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); > > > How about TS? I don't want to provide Jacobian function by myself, but > > I didn't find something like TSDefaultComputeJacobian. > > > You can use -snes_fd (or -snes_mf or -snes_mf_operator) with TS. > Programmatically, > > TSGetSNES(ts,&snes); > > SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobian,ts); > > > I have already tried this function. > > I want to use Finite Difference Jacobian Approximations > > So, before I call the > function: MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); I > should assemble J. I tried to use SNESComputeJacobian(snes,x,&J,&J,&flag) to > assemble J. > > Here is the code > > > > ierr = > MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); > ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr); > ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr); > ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr); > ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr); > ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr); > ierr = TSSetType(ts,TSBEULER);CHKERRQ(ierr); > ierr = TSGetSNES(ts,&ts_snes); > ierr= > SNESSetJacobian(ts_snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); > MatStructure flag; > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > ierr = > MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > ISColoringDestroy(iscoloring); > > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode > (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > ierr = > TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > But I got the error: > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Must call SNESSetFunction() before SNESComputeFunction(), > likely called from SNESSolve().! > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Development HG revision: > fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 21:17:36 2010 > -0500 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: ./pihm on a arch-linu named kernighan.aset.psu.edu by > xxy113 Wed Jul 21 21:35:01 2010 > [0]PETSC ERROR: Libraries linked from > /gpfs/home/xxy113/soft/petsc-dev/arch-linux-gnu-c-debug/lib > [0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 > [0]PETSC ERROR: Configure options --download-f-blas-lapack=1 > --download-mpich=1 > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: SNESComputeFunction() line 1180 in > src/snes/interface/snes.c > [0]PETSC ERROR: SNESDefaultComputeJacobian() line 77 in > src/snes/interface/snesj.c > [0]PETSC ERROR: SNESComputeJacobian() line 1264 in > src/snes/interface/snes.c > [0]PETSC ERROR: VecRestoreArrayPrivate3() line 234 in /work/petsc/pihm.c > > > > Jed > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From xxy113 at psu.edu Wed Jul 21 21:25:54 2010 From: xxy113 at psu.edu (XUAN YU) Date: Wed, 21 Jul 2010 22:25:54 -0400 Subject: [petsc-users] TSDefaultComputeJacobian In-Reply-To: AANLkTil9trdFLbiVCqDB5Ffa9F3a7urP16dN3C_3bJTp@mail.gmail.com References: <871vawl6v2.fsf@59A2.org> <888B3804-C939-4456-A736-5CAC17019C0F@psu.edu> Message-ID: <1279765554l.630828l.0l@psu.edu> ---------------- Forwarded Message ---------------- From: Matthew Knepley Date: Wed, Jul 21, 2010 09:50 PM Subject: Re: [petsc-users] TSDefaultComputeJacobian To: PETSc users list Yes, you have setup the Jacobian function, but you never setup the residual function, which is what the error is complaining about. ----------------------------------------- Could you please give me some suggestions about how to setup residual function? Is there some example? Matt On Thu, Jul 22, 2010 at 11:43 AM, Xuan YU <<#>> wrote: >> >> >>Begin forwarded message: > > > From: Jed Brown <<#>> > Date: July 21, 2010 8:04:17 PM EDT > To: Xuan YU <<#>>, PETSc users list <<#>> > Subject: Re: [petsc-users] TSDefaultComputeJacobian > > >On Wed, 21 Jul 2010 19:52:23 -0400, Xuan YU <<#>> wrote: >Hi, > > In SNES, Petsc can compute Jacobian by: > > ierr = > SNESSetJacobian > (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); > > How about TS? I don't want to provide Jacobian function by myself, but > I didn't find something like TSDefaultComputeJacobian. > >You can use -snes_fd (or -snes_mf or -snes_mf_operator) with TS. > Programmatically, > > TSGetSNES(ts,&snes); > > SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobian,ts); > > > > >I have already tried this function. > > >I want to use Finite Difference Jacobian Approximations > > >So, before I call the function: MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); I should assemble J. I tried to use SNESComputeJacobian(snes,x,&J,&J,&flag) to assemble J. > > >Here is the code > > > > > > > > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); > ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr); > ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr); > ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr); > ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr); > ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr); > ierr = TSSetType(ts,TSBEULER);CHKERRQ(ierr); > ierr = TSGetSNES(ts,&ts_snes); > ierr= SNESSetJacobian(ts_snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); > MatStructure flag; > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > ISColoringDestroy(iscoloring); > > > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > But I got the error: > >[0]PETSC ERROR: --------------------- Error Message ------------------------------------ >[0]PETSC ERROR: Object is in wrong state! >[0]PETSC ERROR: Must call SNESSetFunction() before SNESComputeFunction(), likely called from SNESSolve().! >[0]PETSC ERROR: ------------------------------------------------------------------------ >[0]PETSC ERROR: Petsc Development HG revision: fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 21:17:36 2010 -0500 >[0]PETSC ERROR: See docs/changes/index.html for recent updates. >[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >[0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: ------------------------------------------------------------------------ >[0]PETSC ERROR: ./pihm on a arch-linu named by xxy113 Wed Jul 21 21:35:01 2010 >[0]PETSC ERROR: Libraries linked from /gpfs/home/xxy113/soft/petsc-dev/arch-linux-gnu-c-debug/lib >[0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 >[0]PETSC ERROR: Configure options --download-f-blas-lapack=1 --download-mpich=1 >[0]PETSC ERROR: ------------------------------------------------------------------------ >[0]PETSC ERROR: SNESComputeFunction() line 1180 in src/snes/interface/snes.c >[0]PETSC ERROR: SNESDefaultComputeJacobian() line 77 in src/snes/interface/snesj.c >[0]PETSC ERROR: SNESComputeJacobian() line 1264 in src/snes/interface/snes.c >[0]PETSC ERROR: VecRestoreArrayPrivate3() line 234 in /work/petsc/pihm.c > > > > > > >Jed > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Wed Jul 21 21:35:57 2010 From: knepley at gmail.com (Matthew Knepley) Date: Thu, 22 Jul 2010 12:35:57 +1000 Subject: [petsc-users] TSDefaultComputeJacobian In-Reply-To: <1279765554l.630828l.0l@psu.edu> References: <871vawl6v2.fsf@59A2.org> <888B3804-C939-4456-A736-5CAC17019C0F@psu.edu> <1279765554l.630828l.0l@psu.edu> Message-ID: http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/TS/TSSetRHSFunction.html Matt On Thu, Jul 22, 2010 at 12:25 PM, XUAN YU wrote: > > > ---------------- Forwarded Message ---------------- > From: Matthew Knepley > Date: Wed, Jul 21, 2010 09:50 PM > Subject: Re: [petsc-users] TSDefaultComputeJacobian > To: PETSc users list > > Yes, you have setup the Jacobian function, but you never setup the residual > function, which > is what the error is complaining about. > > ----------------------------------------- > > > Could you please give me some suggestions about how to setup residual > function? Is there some example? > > > > > > Matt > > On Thu, Jul 22, 2010 at 11:43 AM, Xuan YU > > wrote: > >> >> >> Begin forwarded message: >> >> *From: *Jed Brown > >> *Date: *July 21, 2010 8:04:17 PM EDT >> *To: *Xuan YU >, PETSc users list < >> petsc-users at mcs.anl.gov <#129f7f8b5b43d140_>> >> *Subject: **Re: [petsc-users] TSDefaultComputeJacobian* >> >> On Wed, 21 Jul 2010 19:52:23 -0400, Xuan YU > >> wrote: >> >> Hi, >> >> >> In SNES, Petsc can compute Jacobian by: >> >> >> ierr = >> >> SNESSetJacobian >> >> (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); >> >> >> How about TS? I don't want to provide Jacobian function by myself, but >> >> I didn't find something like TSDefaultComputeJacobian. >> >> >> You can use -snes_fd (or -snes_mf or -snes_mf_operator) with TS. >> Programmatically, >> >> TSGetSNES(ts,&snes); >> >> SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobian,ts); >> >> >> I have already tried this function. >> >> I want to use Finite Difference Jacobian Approximations >> >> So, before I call the >> function: MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); I >> should assemble J. I tried to use SNESComputeJacobian(snes,x,&J,&J,&flag) to >> assemble J. >> >> Here is the code >> >> >> >> ierr = >> MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); >> ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr); >> ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr); >> ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr); >> ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr); >> ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr); >> ierr = TSSetType(ts,TSBEULER);CHKERRQ(ierr); >> ierr = TSGetSNES(ts,&ts_snes); >> ierr= >> SNESSetJacobian(ts_snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); >> MatStructure flag; >> ierr = >> SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); >> ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); >> ierr = >> MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); >> ISColoringDestroy(iscoloring); >> >> ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode >> (*)(void))f,(void*)&appctx);CHKERRQ(ierr); >> ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); >> ierr = >> TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); >> >> But I got the error: >> [0]PETSC ERROR: --------------------- Error Message >> ------------------------------------ >> [0]PETSC ERROR: Object is in wrong state! >> [0]PETSC ERROR: Must call SNESSetFunction() before SNESComputeFunction(), >> likely called from SNESSolve().! >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: Petsc Development HG revision: >> fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 21:17:36 2010 >> -0500 >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> [0]PETSC ERROR: See docs/index.html for manual pages. >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: ./pihm on a arch-linu named kernighan.aset.psu.edu by >> xxy113 Wed Jul 21 21:35:01 2010 >> [0]PETSC ERROR: Libraries linked from >> /gpfs/home/xxy113/soft/petsc-dev/arch-linux-gnu-c-debug/lib >> [0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 >> [0]PETSC ERROR: Configure options --download-f-blas-lapack=1 >> --download-mpich=1 >> [0]PETSC ERROR: >> ------------------------------------------------------------------------ >> [0]PETSC ERROR: SNESComputeFunction() line 1180 in >> src/snes/interface/snes.c >> [0]PETSC ERROR: SNESDefaultComputeJacobian() line 77 in >> src/snes/interface/snesj.c >> [0]PETSC ERROR: SNESComputeJacobian() line 1264 in >> src/snes/interface/snes.c >> [0]PETSC ERROR: VecRestoreArrayPrivate3() line 234 in /work/petsc/pihm.c >> >> >> >> Jed >> >> >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Wed Jul 21 21:38:53 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 21 Jul 2010 21:38:53 -0500 Subject: [petsc-users] TSDefaultComputeJacobian In-Reply-To: <888B3804-C939-4456-A736-5CAC17019C0F@psu.edu> References: <871vawl6v2.fsf@59A2.org> <888B3804-C939-4456-A736-5CAC17019C0F@psu.edu> Message-ID: <0EC74421-4244-41F9-8BBE-FFC09AD2F7DB@mcs.anl.gov> On Jul 21, 2010, at 8:43 PM, Xuan YU wrote: > > > Begin forwarded message: > >> From: Jed Brown >> Date: July 21, 2010 8:04:17 PM EDT >> To: Xuan YU , PETSc users list >> Subject: Re: [petsc-users] TSDefaultComputeJacobian >> >> On Wed, 21 Jul 2010 19:52:23 -0400, Xuan YU wrote: >>> Hi, >>> >>> In SNES, Petsc can compute Jacobian by: >>> >>> ierr = >>> SNESSetJacobian >>> (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); >>> >>> How about TS? I don't want to provide Jacobian function by myself, but >>> I didn't find something like TSDefaultComputeJacobian. >> >> You can use -snes_fd (or -snes_mf or -snes_mf_operator) with TS. >> Programmatically, >> >> TSGetSNES(ts,&snes); >> SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobian,ts); >> > > I have already tried this function. > > I want to use Finite Difference Jacobian Approximations > > So, before I call the function: MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); I should assemble J. I tried to use SNESComputeJacobian(snes,x,&J,&J,&flag) to assemble J. > > Here is the code > > > > ierr = MatCreateSeqAIJ(PETSC_COMM_SELF,N,N,10,PETSC_NULL,&J);CHKERRQ(ierr); > ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr); > ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr); > ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr); > ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr); > ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr); > ierr = TSSetType(ts,TSBEULER);CHKERRQ(ierr); > ierr = TSGetSNES(ts,&ts_snes); > ierr= SNESSetJacobian(ts_snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr); > MatStructure flag; > ierr = SNESComputeJacobian(ts_snes,CV_Y,&J,&J,&flag);CHKERRQ(ierr); Don't call this here; SNES is not ready to compute Jacobians so cannot. Just call SNESDefaultComputeJacobian() with appropriate arguments directly. > ierr = MatGetColoring(J,MATCOLORINGSL,&iscoloring);CHKERRQ(ierr); This will not do what you want here. The default Jacobian is dense so the coloring is one color per column so the coloring does not help at all. Just bite the bullet and figure out the nonzero pattern of the Jacobian yourself and don't try to use SNESDefaultComputeJacobian() to "cheat" and figure it out for you. If you know the code in your RHS function then you know the nonzero pattern of the Jacobian. It is just a matter of writing the code that produces it. Barry > ierr = MatFDColoringCreate(J,iscoloring,&matfdcoloring);CHKERRQ(ierr); > ISColoringDestroy(iscoloring); > > ierr = MatFDColoringSetFunction(matfdcoloring,(PetscErrorCode (*)(void))f,(void*)&appctx);CHKERRQ(ierr); > ierr = MatFDColoringSetFromOptions(matfdcoloring);CHKERRQ(ierr); > ierr = TSSetRHSJacobian(ts,J,J,TSDefaultComputeJacobianColor,matfdcoloring); > > But I got the error: > [0]PETSC ERROR: --------------------- Error Message ------------------------------------ > [0]PETSC ERROR: Object is in wrong state! > [0]PETSC ERROR: Must call SNESSetFunction() before SNESComputeFunction(), likely called from SNESSolve().! > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: Petsc Development HG revision: fdc7be12de37b8a400b6e561de9850bcc7e79f4f HG Date: Fri Jul 02 21:17:36 2010 -0500 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: ./pihm on a arch-linu named kernighan.aset.psu.edu by xxy113 Wed Jul 21 21:35:01 2010 > [0]PETSC ERROR: Libraries linked from /gpfs/home/xxy113/soft/petsc-dev/arch-linux-gnu-c-debug/lib > [0]PETSC ERROR: Configure run at Sun Jul 4 14:09:16 2010 > [0]PETSC ERROR: Configure options --download-f-blas-lapack=1 --download-mpich=1 > [0]PETSC ERROR: ------------------------------------------------------------------------ > [0]PETSC ERROR: SNESComputeFunction() line 1180 in src/snes/interface/snes.c > [0]PETSC ERROR: SNESDefaultComputeJacobian() line 77 in src/snes/interface/snesj.c > [0]PETSC ERROR: SNESComputeJacobian() line 1264 in src/snes/interface/snes.c > [0]PETSC ERROR: VecRestoreArrayPrivate3() line 234 in /work/petsc/pihm.c > > > >> Jed >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mossaiby at yahoo.com Thu Jul 22 03:07:57 2010 From: mossaiby at yahoo.com (Farshid Mossaiby) Date: Thu, 22 Jul 2010 01:07:57 -0700 (PDT) Subject: [petsc-users] configure problems In-Reply-To: Message-ID: <537339.10706.qm@web52207.mail.re2.yahoo.com> I doubt 'cl' can interpret Cygwin paths: cl : Command line warning D9002 : ignoring unknown option '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' Shouldn't win32fe convert this path first? Hope this helps. --- On Wed, 7/21/10, Dominik Szczerba wrote: > From: Dominik Szczerba > Subject: Re: [petsc-users] configure problems > To: "PETSc users list" > Date: Wednesday, July 21, 2010, 7:01 PM > Coming back to the original problem: > I tried to compile MPICH2 myself > and failed because of wrong version of automake in Cygwin. > I then > installed the Windows binary available on the mpich2 > webpage. I > configure petsc with: > > $ ./config/configure.py PETSC_DIR=$PWD > PETSC_ARCH=win64-msvc-release > --download-c-blas-lapack=1 > --with-mpi-dir='/cygdrive/c/Program > Files/MPICH2' --with-x=0 --with-debugging=0 > --with-cc='win32fe cl' > --with-fc=0 > > to hear at the end (of a very long configuration > process...): > > sh: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl? -o conftest.exe? ? -MT -wd4996? > conftest.o? /cygdrive/c/Program\ > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > Executing: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl? -o conftest.exe? ? -MT -wd4996? > conftest.o? /cygdrive/c/Program\ > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > Files/MPICH2/lib/amd64/msmpi.lib > cl : Command line warning D9002 : ignoring unknown option > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > conftest.obj : error LNK2019: unresolved external symbol > _MPI_Init > referenced in function _main > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > error > LNK1120: 1 unresolved externals > > Any directions why would the configuration look for a > nonexistent > library? The contents of the installation folder are: > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > total 808 > drwx------+ 1 SYSTEM SYSTEM???4096 > 2010-07-21 15:54 . > drwx------+ 1 SYSTEM SYSTEM???4096 > 2010-07-21 15:54 .. > -rwx------+ 1 SYSTEM SYSTEM???4644 > 2010-02-22 17:13 TraceInput.lib > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > cxx.lib > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > fmpich2.lib > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > fmpich2g.lib > -rwx------+ 1 SYSTEM SYSTEM???1936 > 2010-02-22 17:13 irlog2rlog.lib > -rwx------+ 1 SYSTEM SYSTEM? 10430 2010-02-22 16:30 > mpe.lib > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > mpi.lib > -rwx------+ 1 SYSTEM SYSTEM? 61286 2010-02-22 16:30 > rlog.lib > > Best regards, > Dominik > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > wrote: > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > wrote: > >> This would do you absolutely no good. Even Jed's > thing needs all the > >> information that the configure provides. CMake is > exactly what it > >> says, make. It does no configuration > > > > This isn't true, CMake isn't a build system at all, it > does > > configuration and produces build files for another > tool (like make or an > > IDE). ?I see no point in maintaining duplicate > configuration systems, > > and CMake's scripting language is so attrocious that > "replacing" > > BuildSystem with CMake script would be a disaster. > ?It's > > cross-compilation support is also a bit weak, and > there are a pile of > > other things that it does poorly (mostly related to > pathologically > > dysfunctional "Find*.cmake" modules). ?That doesn't > mean it isn't useful > > for producing build files. > > > > Jed > > > > > From dominik at itis.ethz.ch Thu Jul 22 06:53:27 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 13:53:27 +0200 Subject: [petsc-users] configure problems In-Reply-To: <537339.10706.qm@web52207.mail.re2.yahoo.com> References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: I originally started with the native path, but I got an immediate complaint that I am better off using cygwin syntax.... On Thu, Jul 22, 2010 at 10:07 AM, Farshid Mossaiby wrote: > I doubt 'cl' can interpret Cygwin paths: > > cl : Command line warning D9002 : ignoring unknown option > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > Shouldn't win32fe convert this path first? > > Hope this helps. > > --- On Wed, 7/21/10, Dominik Szczerba wrote: > > > From: Dominik Szczerba > > Subject: Re: [petsc-users] configure problems > > To: "PETSc users list" > > Date: Wednesday, July 21, 2010, 7:01 PM > > Coming back to the original problem: > > I tried to compile MPICH2 myself > > and failed because of wrong version of automake in Cygwin. > > I then > > installed the Windows binary available on the mpich2 > > webpage. I > > configure petsc with: > > > > $ ./config/configure.py PETSC_DIR=$PWD > > PETSC_ARCH=win64-msvc-release > > --download-c-blas-lapack=1 > > --with-mpi-dir='/cygdrive/c/Program > > Files/MPICH2' --with-x=0 --with-debugging=0 > > --with-cc='win32fe cl' > > --with-fc=0 > > > > to hear at the end (of a very long configuration > > process...): > > > > sh: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl -o conftest.exe -MT -wd4996 > > conftest.o /cygdrive/c/Program\ > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > Executing: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl -o conftest.exe -MT -wd4996 > > conftest.o /cygdrive/c/Program\ > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > Files/MPICH2/lib/amd64/msmpi.lib > > cl : Command line warning D9002 : ignoring unknown option > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > conftest.obj : error LNK2019: unresolved external symbol > > _MPI_Init > > referenced in function _main > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > error > > LNK1120: 1 unresolved externals > > > > Any directions why would the configuration look for a > > nonexistent > > library? The contents of the installation folder are: > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > total 808 > > drwx------+ 1 SYSTEM SYSTEM 4096 > > 2010-07-21 15:54 . > > drwx------+ 1 SYSTEM SYSTEM 4096 > > 2010-07-21 15:54 .. > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > 2010-02-22 17:13 TraceInput.lib > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > cxx.lib > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > fmpich2.lib > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > fmpich2g.lib > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > 2010-02-22 17:13 irlog2rlog.lib > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > mpe.lib > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > mpi.lib > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > rlog.lib > > > > Best regards, > > Dominik > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > wrote: > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > wrote: > > >> This would do you absolutely no good. Even Jed's > > thing needs all the > > >> information that the configure provides. CMake is > > exactly what it > > >> says, make. It does no configuration > > > > > > This isn't true, CMake isn't a build system at all, it > > does > > > configuration and produces build files for another > > tool (like make or an > > > IDE). I see no point in maintaining duplicate > > configuration systems, > > > and CMake's scripting language is so attrocious that > > "replacing" > > > BuildSystem with CMake script would be a disaster. > > It's > > > cross-compilation support is also a bit weak, and > > there are a pile of > > > other things that it does poorly (mostly related to > > pathologically > > > dysfunctional "Find*.cmake" modules). That doesn't > > mean it isn't useful > > > for producing build files. > > > > > > Jed > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 22 08:45:46 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 08:45:46 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: <537339.10706.qm@web52207.mail.re2.yahoo.com> References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > Files/MPICH2/lib/amd64/msmpi.lib Looks like - if win32fe doesn't find the file - it doesn't try to convert the path. This is not the cause of his configure failure. The primary issue is: [which is much ahead in configure.log] >>>>>>>>>>> sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ Files/MPICH2/lib/mpi.lib Ws2_32.lib Executing: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ Files/MPICH2/lib/mpi.lib Ws2_32.lib sh: conftest.obj : error LNK2019: unresolved external symbol _MPI_Init referenced in function _main^M C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error LNK1120: 1 unresolved externals^M <<<<<<<<<<< Here cl is finding the correct library - but not MPI_Init symbol in it. For whatever reason - libmpi.lib is not compatible. Satish On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > I doubt 'cl' can interpret Cygwin paths: > > cl : Command line warning D9002 : ignoring unknown option > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > Shouldn't win32fe convert this path first? > > Hope this helps. > > --- On Wed, 7/21/10, Dominik Szczerba wrote: > > > From: Dominik Szczerba > > Subject: Re: [petsc-users] configure problems > > To: "PETSc users list" > > Date: Wednesday, July 21, 2010, 7:01 PM > > Coming back to the original problem: > > I tried to compile MPICH2 myself > > and failed because of wrong version of automake in Cygwin. > > I then > > installed the Windows binary available on the mpich2 > > webpage. I > > configure petsc with: > > > > $ ./config/configure.py PETSC_DIR=$PWD > > PETSC_ARCH=win64-msvc-release > > --download-c-blas-lapack=1 > > --with-mpi-dir='/cygdrive/c/Program > > Files/MPICH2' --with-x=0 --with-debugging=0 > > --with-cc='win32fe cl' > > --with-fc=0 > > > > to hear at the end (of a very long configuration > > process...): > > > > sh: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl? -o conftest.exe? ? -MT -wd4996? > > conftest.o? /cygdrive/c/Program\ > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > Executing: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl? -o conftest.exe? ? -MT -wd4996? > > conftest.o? /cygdrive/c/Program\ > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > Files/MPICH2/lib/amd64/msmpi.lib > > cl : Command line warning D9002 : ignoring unknown option > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > conftest.obj : error LNK2019: unresolved external symbol > > _MPI_Init > > referenced in function _main > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > error > > LNK1120: 1 unresolved externals > > > > Any directions why would the configuration look for a > > nonexistent > > library? The contents of the installation folder are: > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > total 808 > > drwx------+ 1 SYSTEM SYSTEM???4096 > > 2010-07-21 15:54 . > > drwx------+ 1 SYSTEM SYSTEM???4096 > > 2010-07-21 15:54 .. > > -rwx------+ 1 SYSTEM SYSTEM???4644 > > 2010-02-22 17:13 TraceInput.lib > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > cxx.lib > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > fmpich2.lib > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > fmpich2g.lib > > -rwx------+ 1 SYSTEM SYSTEM???1936 > > 2010-02-22 17:13 irlog2rlog.lib > > -rwx------+ 1 SYSTEM SYSTEM? 10430 2010-02-22 16:30 > > mpe.lib > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > mpi.lib > > -rwx------+ 1 SYSTEM SYSTEM? 61286 2010-02-22 16:30 > > rlog.lib > > > > Best regards, > > Dominik > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > wrote: > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > wrote: > > >> This would do you absolutely no good. Even Jed's > > thing needs all the > > >> information that the configure provides. CMake is > > exactly what it > > >> says, make. It does no configuration > > > > > > This isn't true, CMake isn't a build system at all, it > > does > > > configuration and produces build files for another > > tool (like make or an > > > IDE). ?I see no point in maintaining duplicate > > configuration systems, > > > and CMake's scripting language is so attrocious that > > "replacing" > > > BuildSystem with CMake script would be a disaster. > > ?It's > > > cross-compilation support is also a bit weak, and > > there are a pile of > > > other things that it does poorly (mostly related to > > pathologically > > > dysfunctional "Find*.cmake" modules). ?That doesn't > > mean it isn't useful > > > for producing build files. > > > > > > Jed > > > > > > > > > > > > From dominik at itis.ethz.ch Thu Jul 22 08:58:24 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 15:58:24 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Many thanks for your precious feedback. My MPICH install is 64 bit but it seems that for some reason 32 bit VC compiler is invoked (I have both 32 and 64 installed). I am clarifying with a local MSVC expert how to control this, will update you later today. Dominik On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay wrote: > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > Files/MPICH2/lib/amd64/msmpi.lib > > Looks like - if win32fe doesn't find the file - it doesn't try to > convert the path. This is not the cause of his configure failure. > > The primary issue is: [which is much ahead in configure.log] > > >>>>>>>>>>> > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > Files/MPICH2/lib/mpi.lib Ws2_32.lib > Executing: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > Files/MPICH2/lib/mpi.lib Ws2_32.lib > sh: conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > referenced in function _main^M > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error LNK1120: > 1 unresolved externals^M > <<<<<<<<<<< > > Here cl is finding the correct library - but not MPI_Init symbol in it. > For whatever reason - libmpi.lib is not compatible. > > Satish > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > I doubt 'cl' can interpret Cygwin paths: > > > > cl : Command line warning D9002 : ignoring unknown option > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > Shouldn't win32fe convert this path first? > > > > Hope this helps. > > > > --- On Wed, 7/21/10, Dominik Szczerba wrote: > > > > > From: Dominik Szczerba > > > Subject: Re: [petsc-users] configure problems > > > To: "PETSc users list" > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > Coming back to the original problem: > > > I tried to compile MPICH2 myself > > > and failed because of wrong version of automake in Cygwin. > > > I then > > > installed the Windows binary available on the mpich2 > > > webpage. I > > > configure petsc with: > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > PETSC_ARCH=win64-msvc-release > > > --download-c-blas-lapack=1 > > > --with-mpi-dir='/cygdrive/c/Program > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > --with-cc='win32fe cl' > > > --with-fc=0 > > > > > > to hear at the end (of a very long configuration > > > process...): > > > > > > sh: > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl -o conftest.exe -MT -wd4996 > > > conftest.o /cygdrive/c/Program\ > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > Executing: > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl -o conftest.exe -MT -wd4996 > > > conftest.o /cygdrive/c/Program\ > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > Files/MPICH2/lib/amd64/msmpi.lib > > > cl : Command line warning D9002 : ignoring unknown option > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > conftest.obj : error LNK2019: unresolved external symbol > > > _MPI_Init > > > referenced in function _main > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > > error > > > LNK1120: 1 unresolved externals > > > > > > Any directions why would the configuration look for a > > > nonexistent > > > library? The contents of the installation folder are: > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > total 808 > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > 2010-07-21 15:54 . > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > 2010-07-21 15:54 .. > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > 2010-02-22 17:13 TraceInput.lib > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > cxx.lib > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > fmpich2.lib > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > fmpich2g.lib > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > 2010-02-22 17:13 irlog2rlog.lib > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > mpe.lib > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > mpi.lib > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > rlog.lib > > > > > > Best regards, > > > Dominik > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > > wrote: > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > wrote: > > > >> This would do you absolutely no good. Even Jed's > > > thing needs all the > > > >> information that the configure provides. CMake is > > > exactly what it > > > >> says, make. It does no configuration > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > does > > > > configuration and produces build files for another > > > tool (like make or an > > > > IDE). I see no point in maintaining duplicate > > > configuration systems, > > > > and CMake's scripting language is so attrocious that > > > "replacing" > > > > BuildSystem with CMake script would be a disaster. > > > It's > > > > cross-compilation support is also a bit weak, and > > > there are a pile of > > > > other things that it does poorly (mostly related to > > > pathologically > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > mean it isn't useful > > > > for producing build files. > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 22 09:13:33 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 09:13:33 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: On Thu, 22 Jul 2010, Dominik Szczerba wrote: > Many thanks for your precious feedback. > My MPICH install is 64 bit but it seems that for some reason 32 bit VC > compiler is invoked (I have both 32 and 64 installed). As mentioned - whichever compiler is first in the PATH is used cl > I am clarifying with a local MSVC expert how to control this, will update > you later today. One way to control this - is to run the desired 'build env' cmd - as mentioned in the installation instructions. http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows Satish > Dominik > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay wrote: > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > Looks like - if win32fe doesn't find the file - it doesn't try to > > convert the path. This is not the cause of his configure failure. > > > > The primary issue is: [which is much ahead in configure.log] > > > > >>>>>>>>>>> > > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > Executing: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > sh: conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > > referenced in function _main^M > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error LNK1120: > > 1 unresolved externals^M > > <<<<<<<<<<< > > > > Here cl is finding the correct library - but not MPI_Init symbol in it. > > For whatever reason - libmpi.lib is not compatible. > > > > Satish > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > Shouldn't win32fe convert this path first? > > > > > > Hope this helps. > > > > > > --- On Wed, 7/21/10, Dominik Szczerba wrote: > > > > > > > From: Dominik Szczerba > > > > Subject: Re: [petsc-users] configure problems > > > > To: "PETSc users list" > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > Coming back to the original problem: > > > > I tried to compile MPICH2 myself > > > > and failed because of wrong version of automake in Cygwin. > > > > I then > > > > installed the Windows binary available on the mpich2 > > > > webpage. I > > > > configure petsc with: > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > PETSC_ARCH=win64-msvc-release > > > > --download-c-blas-lapack=1 > > > > --with-mpi-dir='/cygdrive/c/Program > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > --with-cc='win32fe cl' > > > > --with-fc=0 > > > > > > > > to hear at the end (of a very long configuration > > > > process...): > > > > > > > > sh: > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl -o conftest.exe -MT -wd4996 > > > > conftest.o /cygdrive/c/Program\ > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > Executing: > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl -o conftest.exe -MT -wd4996 > > > > conftest.o /cygdrive/c/Program\ > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > cl : Command line warning D9002 : ignoring unknown option > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > _MPI_Init > > > > referenced in function _main > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > > > error > > > > LNK1120: 1 unresolved externals > > > > > > > > Any directions why would the configuration look for a > > > > nonexistent > > > > library? The contents of the installation folder are: > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > total 808 > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > 2010-07-21 15:54 . > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > 2010-07-21 15:54 .. > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > 2010-02-22 17:13 TraceInput.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > cxx.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > fmpich2.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > fmpich2g.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > mpe.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > mpi.lib > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > rlog.lib > > > > > > > > Best regards, > > > > Dominik > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > > > wrote: > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > wrote: > > > > >> This would do you absolutely no good. Even Jed's > > > > thing needs all the > > > > >> information that the configure provides. CMake is > > > > exactly what it > > > > >> says, make. It does no configuration > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > does > > > > > configuration and produces build files for another > > > > tool (like make or an > > > > > IDE). I see no point in maintaining duplicate > > > > configuration systems, > > > > > and CMake's scripting language is so attrocious that > > > > "replacing" > > > > > BuildSystem with CMake script would be a disaster. > > > > It's > > > > > cross-compilation support is also a bit weak, and > > > > there are a pile of > > > > > other things that it does poorly (mostly related to > > > > pathologically > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > mean it isn't useful > > > > > for producing build files. > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From filippo.spiga at disco.unimib.it Thu Jul 22 09:32:56 2010 From: filippo.spiga at disco.unimib.it (Filippo Spiga) Date: Thu, 22 Jul 2010 10:32:56 -0400 Subject: [petsc-users] Missing symbols in libpetscts.h Message-ID: <4C485698.6050502@disco.unimib.it> Dear all, I'm trying to compile PETSc 3.0.0-p12 and PETSc 3.1-p3. The compilation ends without visible problems. However when I compile my software these error appears ../../../myApp/src/timeDepSolver.cpp:13: warning: deprecated conversion from string constant to 'char*' ../../../myApp/src/timeDepSolver.cpp: In member function 'virtual int TimeDependentSolver::run()': ../../../myApp/src/timeDepSolver.cpp:145: error: 'TSSetIFunction' was not declared in this scope ../../../myApp/src/timeDepSolver.cpp:146: error: 'TSSetIJacobian' was not declared in this scope ../../../myApp/src/timeDepSolver.cpp:150: error: 'TSTHETA' was not declared in this scope [...] For both versions, "make test" ends successfully. If I look inside the static library I don't see 'TSSetIFunction', 'TSSetIJacobian' and 'TSTHETA'. $ nm ~/local_install/lib/libpetscts.a | grep TSSetIJacobian $ I configured and compiled the package use these steps: $ export PETSC_DIR=`pwd` $ export PETSC_ARCH=linux-gnu-c-debug $ export CXX=$HOME/local_install/bin/mpicxx $ export CC=$HOME/local_install/bin/mpicc $ export FC=$HOME/local_install/bin/mpif77 $ python config/configure.py --prefix=$HOME/local_install --with-debugging=1 --with-fortran-kernels=1 --with-mpi-shared=0 --with-shared=0 --with-dynamic=0 --with-batch=0 --with-x=1 --with-mpi=$HOME/local_install --with-windows-graphics=0 --with-memcmp-ok --download-hypre=1 --download-spooles=1 --download-plapack=1 --download-mumps=1 --download-spai=1 --download-blacs=1 --download-triangle=1 --download-f-blas-lapack=1 --download-umfpack=1 --download-sowing=1 --download-c2html=1 --download-superlu_dist=1 --download-parmetis=1 --download-scalapack=1 --download-prometheus=1 --download-superlu=1 $ PETSC_ARCH=linux-gnu-c-debug; export PETSC_ARCH $ PETSC_DIR=$HOME/packages/petsc-3.0.0-p12; export PETSC_DIR $ make all (MPI is mpich2, latest stable version. It works.) What's wrong? Thank you very much in advance for your support. Regards -- =============================================================== Filippo SPIGA MSc, HPC and GRID Technologist tel.: +39 340 8387735 skype: filippo.spiga =============================================================== ?Nobody will drive us out of Cantor's paradise.? -- David Hilbert ***** "Please note this message and any attachment are CONFIDENTIAL and may be privileged or otherwise protected from disclosure. The contents are not to be disclosed to anyone other than the addressee. Unauthorized recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission." From balay at mcs.anl.gov Thu Jul 22 09:37:23 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 09:37:23 -0500 (CDT) Subject: [petsc-users] Missing symbols in libpetscts.h In-Reply-To: <4C485698.6050502@disco.unimib.it> References: <4C485698.6050502@disco.unimib.it> Message-ID: TSSetIFunction() doesn't exist in petsc-3.0.0. The same code will not work with both versions of petsc. You should stick with one version [i.e the latest ..] Satish On Thu, 22 Jul 2010, Filippo Spiga wrote: > Dear all, > I'm trying to compile PETSc 3.0.0-p12 and PETSc 3.1-p3. The compilation > ends without visible problems. However when I compile my software these error > appears > > ../../../myApp/src/timeDepSolver.cpp:13: warning: deprecated conversion from > string constant to 'char*' > ../../../myApp/src/timeDepSolver.cpp: In member function 'virtual int > TimeDependentSolver::run()': > ../../../myApp/src/timeDepSolver.cpp:145: error: 'TSSetIFunction' was not > declared in this scope > ../../../myApp/src/timeDepSolver.cpp:146: error: 'TSSetIJacobian' was not > declared in this scope > ../../../myApp/src/timeDepSolver.cpp:150: error: 'TSTHETA' was not declared in > this scope > [...] > > For both versions, "make test" ends successfully. If I look inside the static > library I don't see 'TSSetIFunction', 'TSSetIJacobian' and 'TSTHETA'. > > $ nm ~/local_install/lib/libpetscts.a | grep TSSetIJacobian > $ > > I configured and compiled the package use these steps: > > $ export PETSC_DIR=`pwd` > $ export PETSC_ARCH=linux-gnu-c-debug > > $ export CXX=$HOME/local_install/bin/mpicxx > $ export CC=$HOME/local_install/bin/mpicc > $ export FC=$HOME/local_install/bin/mpif77 > > $ python config/configure.py --prefix=$HOME/local_install --with-debugging=1 > --with-fortran-kernels=1 --with-mpi-shared=0 --with-shared=0 --with-dynamic=0 > --with-batch=0 --with-x=1 --with-mpi=$HOME/local_install > --with-windows-graphics=0 --with-memcmp-ok --download-hypre=1 > --download-spooles=1 --download-plapack=1 --download-mumps=1 --download-spai=1 > --download-blacs=1 --download-triangle=1 --download-f-blas-lapack=1 > --download-umfpack=1 --download-sowing=1 --download-c2html=1 > --download-superlu_dist=1 --download-parmetis=1 --download-scalapack=1 > --download-prometheus=1 --download-superlu=1 > > $ PETSC_ARCH=linux-gnu-c-debug; export PETSC_ARCH > $ PETSC_DIR=$HOME/packages/petsc-3.0.0-p12; export PETSC_DIR > > $ make all > > (MPI is mpich2, latest stable version. It works.) > > What's wrong? > > Thank you very much in advance for your support. > > Regards > > > From dominik at itis.ethz.ch Thu Jul 22 14:59:05 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 21:59:05 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Dear all, The problem was apparently that I was trying to configure Petsc under the 32 bit terminal with the 64 bit MPI system installation. I managed to invoke the 64 bit terminal and configure and build Petsc as follows: ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 (with the official MPICH2 64bitinstallation): MPI: Includes: -I/cygdrive/c/Program\ Files/MPICH2/include Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ Files/MPICH2/lib/mpi.lib However, I am getting errors when executing "make test": (errors below) Any ideas how to proceed? (I clicked some 'yes when Windows popped up a yes/no security window) Regards, Dominik $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 PETSC_ARCH=win64-msvc-release test Running test examples to verify correct installation Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 MPI process See http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html Error while connecting to host, No connection could be made because the target machine actively refused it. (10061) Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points Unable to connect to 'Tharsis:8676', sock error: Error = -1 Possible error running C/C++ src/snes/examples/tutorials/ex19 with 2 MPI processes See http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html Error while connecting to host, No connection could be made because the target machine actively refused it. (10061) Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points Unable to connect to 'Tharsis:8676', sock error: Error = -1 Completed test examples On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay wrote: > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > Many thanks for your precious feedback. > > My MPICH install is 64 bit but it seems that for some reason 32 bit VC > > compiler is invoked (I have both 32 and 64 installed). > > As mentioned - whichever compiler is first in the PATH is used > cl > > > I am clarifying with a local MSVC expert how to control this, will update > > you later today. > > One way to control this - is to run the desired 'build env' cmd - as > mentioned in the installation instructions. > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > Satish > > > Dominik > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay wrote: > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > Looks like - if win32fe doesn't find the file - it doesn't try to > > > convert the path. This is not the cause of his configure failure. > > > > > > The primary issue is: [which is much ahead in configure.log] > > > > > > >>>>>>>>>>> > > > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl > > > -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > Executing: > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > -o > > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > sh: conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > > > referenced in function _main^M > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > LNK1120: > > > 1 unresolved externals^M > > > <<<<<<<<<<< > > > > > > Here cl is finding the correct library - but not MPI_Init symbol in it. > > > For whatever reason - libmpi.lib is not compatible. > > > > > > Satish > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > Hope this helps. > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba wrote: > > > > > > > > > From: Dominik Szczerba > > > > > Subject: Re: [petsc-users] configure problems > > > > > To: "PETSc users list" > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > Coming back to the original problem: > > > > > I tried to compile MPICH2 myself > > > > > and failed because of wrong version of automake in Cygwin. > > > > > I then > > > > > installed the Windows binary available on the mpich2 > > > > > webpage. I > > > > > configure petsc with: > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > PETSC_ARCH=win64-msvc-release > > > > > --download-c-blas-lapack=1 > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > --with-cc='win32fe cl' > > > > > --with-fc=0 > > > > > > > > > > to hear at the end (of a very long configuration > > > > > process...): > > > > > > > > > > sh: > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > cl -o conftest.exe -MT -wd4996 > > > > > conftest.o /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > Executing: > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > cl -o conftest.exe -MT -wd4996 > > > > > conftest.o /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > > _MPI_Init > > > > > referenced in function _main > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > > > > error > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > Any directions why would the configuration look for a > > > > > nonexistent > > > > > library? The contents of the installation folder are: > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > total 808 > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > 2010-07-21 15:54 . > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > 2010-07-21 15:54 .. > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > cxx.lib > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > fmpich2.lib > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > fmpich2g.lib > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > mpe.lib > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > mpi.lib > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > rlog.lib > > > > > > > > > > Best regards, > > > > > Dominik > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > > > > wrote: > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > wrote: > > > > > >> This would do you absolutely no good. Even Jed's > > > > > thing needs all the > > > > > >> information that the configure provides. CMake is > > > > > exactly what it > > > > > >> says, make. It does no configuration > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > > does > > > > > > configuration and produces build files for another > > > > > tool (like make or an > > > > > > IDE). I see no point in maintaining duplicate > > > > > configuration systems, > > > > > > and CMake's scripting language is so attrocious that > > > > > "replacing" > > > > > > BuildSystem with CMake script would be a disaster. > > > > > It's > > > > > > cross-compilation support is also a bit weak, and > > > > > there are a pile of > > > > > > other things that it does poorly (mostly related to > > > > > pathologically > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > mean it isn't useful > > > > > > for producing build files. > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 22 15:09:29 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 15:09:29 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Try running manually. MPICH2 install by default insists on passwd - and this process isn't handled by petsc scripts properly. [or use '--with-mpiexec=mpiexec --localonly'] Satish On Thu, 22 Jul 2010, Dominik Szczerba wrote: > Dear all, > > The problem was apparently that I was trying to configure Petsc under the 32 > bit terminal with the 64 bit MPI system installation. > > I managed to invoke the 64 bit terminal and configure and build Petsc as > follows: > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 --with-cc='win32fe > cl' --with-fc=0 > > (with the official MPICH2 64bitinstallation): > > MPI: > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ > Files/MPICH2/lib/mpi.lib > > However, I am getting errors when executing "make test": (errors below) > Any ideas how to proceed? (I clicked some 'yes when Windows popped up a > yes/no security window) > > Regards, > Dominik > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > PETSC_ARCH=win64-msvc-release test > Running test examples to verify correct installation > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 MPI > process > See http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > Error while connecting to host, No connection could be made because the > target machine actively refused it. (10061) > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > Unable to connect to 'Tharsis:8676', > sock error: Error = -1 > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 2 MPI > processes > See http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > Error while connecting to host, No connection could be made because the > target machine actively refused it. (10061) > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > Unable to connect to 'Tharsis:8676', > sock error: Error = -1 > > Completed test examples > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay wrote: > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > Many thanks for your precious feedback. > > > My MPICH install is 64 bit but it seems that for some reason 32 bit VC > > > compiler is invoked (I have both 32 and 64 installed). > > > > As mentioned - whichever compiler is first in the PATH is used > > cl > > > > > I am clarifying with a local MSVC expert how to control this, will update > > > you later today. > > > > One way to control this - is to run the desired 'build env' cmd - as > > mentioned in the installation instructions. > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > Satish > > > > > Dominik > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay wrote: > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > Looks like - if win32fe doesn't find the file - it doesn't try to > > > > convert the path. This is not the cause of his configure failure. > > > > > > > > The primary issue is: [which is much ahead in configure.log] > > > > > > > > >>>>>>>>>>> > > > > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl > > > > -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > Executing: > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > -o > > > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > sh: conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > > > > referenced in function _main^M > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > > LNK1120: > > > > 1 unresolved externals^M > > > > <<<<<<<<<<< > > > > > > > > Here cl is finding the correct library - but not MPI_Init symbol in it. > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > Satish > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > Hope this helps. > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba wrote: > > > > > > > > > > > From: Dominik Szczerba > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > To: "PETSc users list" > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > Coming back to the original problem: > > > > > > I tried to compile MPICH2 myself > > > > > > and failed because of wrong version of automake in Cygwin. > > > > > > I then > > > > > > installed the Windows binary available on the mpich2 > > > > > > webpage. I > > > > > > configure petsc with: > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > --download-c-blas-lapack=1 > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > --with-cc='win32fe cl' > > > > > > --with-fc=0 > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > process...): > > > > > > > > > > > > sh: > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > Executing: > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > > > _MPI_Init > > > > > > referenced in function _main > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > > > > > error > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > nonexistent > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > total 808 > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > 2010-07-21 15:54 . > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > 2010-07-21 15:54 .. > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > cxx.lib > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > fmpich2.lib > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > fmpich2g.lib > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > mpe.lib > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > mpi.lib > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > rlog.lib > > > > > > > > > > > > Best regards, > > > > > > Dominik > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > > > > > wrote: > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > wrote: > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > thing needs all the > > > > > > >> information that the configure provides. CMake is > > > > > > exactly what it > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > > > does > > > > > > > configuration and produces build files for another > > > > > > tool (like make or an > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > configuration systems, > > > > > > > and CMake's scripting language is so attrocious that > > > > > > "replacing" > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > It's > > > > > > > cross-compilation support is also a bit weak, and > > > > > > there are a pile of > > > > > > > other things that it does poorly (mostly related to > > > > > > pathologically > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > mean it isn't useful > > > > > > > for producing build files. > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From balay at mcs.anl.gov Thu Jul 22 15:11:21 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 15:11:21 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Should have said: cd src/ksp/ksp/examples/tutorials make ex2 mpiexec -n 2 ./ex2.exe mpiexec -localonly -n 2 ./ex2.exe Satish On Thu, 22 Jul 2010, Satish Balay wrote: > Try running manually. MPICH2 install by default insists on passwd - > and this process isn't handled by petsc scripts properly. > > [or use '--with-mpiexec=mpiexec --localonly'] > > Satish > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > Dear all, > > > > The problem was apparently that I was trying to configure Petsc under the 32 > > bit terminal with the 64 bit MPI system installation. > > > > I managed to invoke the 64 bit terminal and configure and build Petsc as > > follows: > > > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 --with-cc='win32fe > > cl' --with-fc=0 > > > > (with the official MPICH2 64bitinstallation): > > > > MPI: > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ > > Files/MPICH2/lib/mpi.lib > > > > However, I am getting errors when executing "make test": (errors below) > > Any ideas how to proceed? (I clicked some 'yes when Windows popped up a > > yes/no security window) > > > > Regards, > > Dominik > > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > PETSC_ARCH=win64-msvc-release test > > Running test examples to verify correct installation > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 MPI > > process > > See http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > Error while connecting to host, No connection could be made because the > > target machine actively refused it. (10061) > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > > Unable to connect to 'Tharsis:8676', > > sock error: Error = -1 > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 2 MPI > > processes > > See http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > Error while connecting to host, No connection could be made because the > > target machine actively refused it. (10061) > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > > Unable to connect to 'Tharsis:8676', > > sock error: Error = -1 > > > > Completed test examples > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay wrote: > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > Many thanks for your precious feedback. > > > > My MPICH install is 64 bit but it seems that for some reason 32 bit VC > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > As mentioned - whichever compiler is first in the PATH is used > > > cl > > > > > > > I am clarifying with a local MSVC expert how to control this, will update > > > > you later today. > > > > > > One way to control this - is to run the desired 'build env' cmd - as > > > mentioned in the installation instructions. > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > Satish > > > > > > > Dominik > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay wrote: > > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > Looks like - if win32fe doesn't find the file - it doesn't try to > > > > > convert the path. This is not the cause of his configure failure. > > > > > > > > > > The primary issue is: [which is much ahead in configure.log] > > > > > > > > > > >>>>>>>>>>> > > > > > sh: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl > > > > > -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > Executing: > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > > -o > > > > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > sh: conftest.obj : error LNK2019: unresolved external symbol _MPI_Init > > > > > referenced in function _main^M > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > > > LNK1120: > > > > > 1 unresolved externals^M > > > > > <<<<<<<<<<< > > > > > > > > > > Here cl is finding the correct library - but not MPI_Init symbol in it. > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > Satish > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba wrote: > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > To: "PETSc users list" > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > Coming back to the original problem: > > > > > > > I tried to compile MPICH2 myself > > > > > > > and failed because of wrong version of automake in Cygwin. > > > > > > > I then > > > > > > > installed the Windows binary available on the mpich2 > > > > > > > webpage. I > > > > > > > configure petsc with: > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > --download-c-blas-lapack=1 > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > --with-cc='win32fe cl' > > > > > > > --with-fc=0 > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > process...): > > > > > > > > > > > > > > sh: > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > Executing: > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > > > > _MPI_Init > > > > > > > referenced in function _main > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > > > > > > error > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > > nonexistent > > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > total 808 > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > 2010-07-21 15:54 . > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > 2010-07-21 15:54 .. > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > > cxx.lib > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > > fmpich2.lib > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > > fmpich2g.lib > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > > mpe.lib > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > > mpi.lib > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > > rlog.lib > > > > > > > > > > > > > > Best regards, > > > > > > > Dominik > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > > > > > > wrote: > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > > > wrote: > > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > > thing needs all the > > > > > > > >> information that the configure provides. CMake is > > > > > > > exactly what it > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > > > > does > > > > > > > > configuration and produces build files for another > > > > > > > tool (like make or an > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > configuration systems, > > > > > > > > and CMake's scripting language is so attrocious that > > > > > > > "replacing" > > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > > It's > > > > > > > > cross-compilation support is also a bit weak, and > > > > > > > there are a pile of > > > > > > > > other things that it does poorly (mostly related to > > > > > > > pathologically > > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > > mean it isn't useful > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From dominik at itis.ethz.ch Thu Jul 22 15:17:19 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 22:17:19 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Hmmm I get the following errors: $ cd src/ksp/ksp/examples/tutorials Dominik at Tharsis/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials $ make ex2 makefile:16: /conf/variables: No such file or directory makefile:17: /conf/rules: No such file or directory makefile:856: /conf/test: No such file or directory make: *** No rule to make target `/conf/test'. Stop. On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay wrote: > Should have said: > > cd src/ksp/ksp/examples/tutorials > make ex2 > mpiexec -n 2 ./ex2.exe > mpiexec -localonly -n 2 ./ex2.exe > > Satish > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > Try running manually. MPICH2 install by default insists on passwd - > > and this process isn't handled by petsc scripts properly. > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > Satish > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > Dear all, > > > > > > The problem was apparently that I was trying to configure Petsc under > the 32 > > > bit terminal with the 64 bit MPI system installation. > > > > > > I managed to invoke the 64 bit terminal and configure and build Petsc > as > > > follows: > > > > > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > --with-cc='win32fe > > > cl' --with-fc=0 > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > MPI: > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ > > > Files/MPICH2/lib/mpi.lib > > > > > > However, I am getting errors when executing "make test": (errors below) > > > Any ideas how to proceed? (I clicked some 'yes when Windows popped up a > > > yes/no security window) > > > > > > Regards, > > > Dominik > > > > > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > PETSC_ARCH=win64-msvc-release test > > > Running test examples to verify correct installation > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 > MPI > > > process > > > See > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > Error while connecting to host, No connection could be made because the > > > target machine actively refused it. (10061) > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > points > > > Unable to connect to 'Tharsis:8676', > > > sock error: Error = -1 > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 2 > MPI > > > processes > > > See > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > Error while connecting to host, No connection could be made because the > > > target machine actively refused it. (10061) > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > points > > > Unable to connect to 'Tharsis:8676', > > > sock error: Error = -1 > > > > > > Completed test examples > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay > wrote: > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > Many thanks for your precious feedback. > > > > > My MPICH install is 64 bit but it seems that for some reason 32 bit > VC > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > As mentioned - whichever compiler is first in the PATH is used > > > > cl > > > > > > > > > I am clarifying with a local MSVC expert how to control this, will > update > > > > > you later today. > > > > > > > > One way to control this - is to run the desired 'build env' cmd - as > > > > mentioned in the installation instructions. > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > Satish > > > > > > > > > Dominik > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay > wrote: > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it doesn't try to > > > > > > convert the path. This is not the cause of his configure failure. > > > > > > > > > > > > The primary issue is: [which is much ahead in configure.log] > > > > > > > > > > > > >>>>>>>>>>> > > > > > > sh: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl > > > > > > -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > Executing: > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > > > -o > > > > > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > sh: conftest.obj : error LNK2019: unresolved external symbol > _MPI_Init > > > > > > referenced in function _main^M > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > > > > LNK1120: > > > > > > 1 unresolved externals^M > > > > > > <<<<<<<<<<< > > > > > > > > > > > > Here cl is finding the correct library - but not MPI_Init symbol > in it. > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > Satish > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba > wrote: > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > To: "PETSc users list" > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > Coming back to the original problem: > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > and failed because of wrong version of automake in Cygwin. > > > > > > > > I then > > > > > > > > installed the Windows binary available on the mpich2 > > > > > > > > webpage. I > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > --with-cc='win32fe cl' > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > process...): > > > > > > > > > > > > > > > > sh: > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > Executing: > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > > > > > _MPI_Init > > > > > > > > referenced in function _main > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > > > > > > > error > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > > > nonexistent > > > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > total 808 > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > 2010-07-21 15:54 . > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > > > cxx.lib > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > > > fmpich2.lib > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > > > fmpich2g.lib > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > > > mpe.lib > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > > > mpi.lib > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > Best regards, > > > > > > > > Dominik > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > > > > > > > wrote: > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > > > > > wrote: > > > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > > > thing needs all the > > > > > > > > >> information that the configure provides. CMake is > > > > > > > > exactly what it > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > > > > > does > > > > > > > > > configuration and produces build files for another > > > > > > > > tool (like make or an > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > configuration systems, > > > > > > > > > and CMake's scripting language is so attrocious that > > > > > > > > "replacing" > > > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > > > It's > > > > > > > > > cross-compilation support is also a bit weak, and > > > > > > > > there are a pile of > > > > > > > > > other things that it does poorly (mostly related to > > > > > > > > pathologically > > > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > > > mean it isn't useful > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 22 15:23:08 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 15:23:08 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally these are set as env variables] make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 PETSC_ARCH=win64-msvc-release ex2 Satish On Thu, 22 Jul 2010, Dominik Szczerba wrote: > Hmmm I get the following errors: > > $ cd src/ksp/ksp/examples/tutorials > > Dominik at Tharsis/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > $ make ex2 > makefile:16: /conf/variables: No such file or directory > makefile:17: /conf/rules: No such file or directory > makefile:856: /conf/test: No such file or directory > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay wrote: > > > Should have said: > > > > cd src/ksp/ksp/examples/tutorials > > make ex2 > > mpiexec -n 2 ./ex2.exe > > mpiexec -localonly -n 2 ./ex2.exe > > > > Satish > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > Try running manually. MPICH2 install by default insists on passwd - > > > and this process isn't handled by petsc scripts properly. > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > Satish > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > Dear all, > > > > > > > > The problem was apparently that I was trying to configure Petsc under > > the 32 > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > I managed to invoke the 64 bit terminal and configure and build Petsc > > as > > > > follows: > > > > > > > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > > --with-cc='win32fe > > > > cl' --with-fc=0 > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > MPI: > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > However, I am getting errors when executing "make test": (errors below) > > > > Any ideas how to proceed? (I clicked some 'yes when Windows popped up a > > > > yes/no security window) > > > > > > > > Regards, > > > > Dominik > > > > > > > > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > PETSC_ARCH=win64-msvc-release test > > > > Running test examples to verify correct installation > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 > > MPI > > > > process > > > > See > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > Error while connecting to host, No connection could be made because the > > > > target machine actively refused it. (10061) > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > > points > > > > Unable to connect to 'Tharsis:8676', > > > > sock error: Error = -1 > > > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with 2 > > MPI > > > > processes > > > > See > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > Error while connecting to host, No connection could be made because the > > > > target machine actively refused it. (10061) > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > > points > > > > Unable to connect to 'Tharsis:8676', > > > > sock error: Error = -1 > > > > > > > > Completed test examples > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay > > wrote: > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > My MPICH install is 64 bit but it seems that for some reason 32 bit > > VC > > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > > > As mentioned - whichever compiler is first in the PATH is used > > > > > cl > > > > > > > > > > > I am clarifying with a local MSVC expert how to control this, will > > update > > > > > > you later today. > > > > > > > > > > One way to control this - is to run the desired 'build env' cmd - as > > > > > mentioned in the installation instructions. > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > Satish > > > > > > > > > > > Dominik > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay > > wrote: > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it doesn't try to > > > > > > > convert the path. This is not the cause of his configure failure. > > > > > > > > > > > > > > The primary issue is: [which is much ahead in configure.log] > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > sh: > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > cl > > > > > > > -o conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > Executing: > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > > > > -o > > > > > > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > sh: conftest.obj : error LNK2019: unresolved external symbol > > _MPI_Init > > > > > > > referenced in function _main^M > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal error > > > > > LNK1120: > > > > > > > 1 unresolved externals^M > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > Here cl is finding the correct library - but not MPI_Init symbol > > in it. > > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba > > wrote: > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > To: "PETSc users list" > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > Coming back to the original problem: > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > and failed because of wrong version of automake in Cygwin. > > > > > > > > > I then > > > > > > > > > installed the Windows binary available on the mpich2 > > > > > > > > > webpage. I > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > Executing: > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > > > > > > _MPI_Init > > > > > > > > > referenced in function _main > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > > > > > > > > error > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > > > > nonexistent > > > > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > > total 808 > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > > > > cxx.lib > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > > > > fmpich2.lib > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > > > > fmpich2g.lib > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > > > > mpe.lib > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > > > > mpi.lib > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown > > > > > > > > > wrote: > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > > > > thing needs all the > > > > > > > > > >> information that the configure provides. CMake is > > > > > > > > > exactly what it > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > > > > > > does > > > > > > > > > > configuration and produces build files for another > > > > > > > > > tool (like make or an > > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > > configuration systems, > > > > > > > > > > and CMake's scripting language is so attrocious that > > > > > > > > > "replacing" > > > > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > > > > It's > > > > > > > > > > cross-compilation support is also a bit weak, and > > > > > > > > > there are a pile of > > > > > > > > > > other things that it does poorly (mostly related to > > > > > > > > > pathologically > > > > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > > > > mean it isn't useful > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From dominik at itis.ethz.ch Thu Jul 22 15:44:10 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 22:44:10 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Thanks a lot. But now there is no meaningful output... Dominik at Tharsis/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 PETSC_ARCH=win64-msvc-release ex2 /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o ex2.o -c -MT -wd4996 -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve -I/cygdrive/c/Users/Dominik/Programs/ petsc-3.1-p3/win64-msvc-release/include -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include -I/cygdrive/c/Program Files/MPICH2/include -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c ex2.c /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -MT -wd4996 -o ex2 ex2.o -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -L/cygdrive/c/Users/Dominik/P rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2clapack -lf2cblas /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib / cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib Kernel32.lib Ws2_32.lib /usr/bin/rm -f ex2.o On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay wrote: > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally these are > set as env variables] > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > PETSC_ARCH=win64-msvc-release ex2 > > Satish > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > Hmmm I get the following errors: > > > > $ cd src/ksp/ksp/examples/tutorials > > > > Dominik at Tharsis > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > $ make ex2 > > makefile:16: /conf/variables: No such file or directory > > makefile:17: /conf/rules: No such file or directory > > makefile:856: /conf/test: No such file or directory > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay > wrote: > > > > > Should have said: > > > > > > cd src/ksp/ksp/examples/tutorials > > > make ex2 > > > mpiexec -n 2 ./ex2.exe > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > Satish > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > Try running manually. MPICH2 install by default insists on passwd - > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > Satish > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > Dear all, > > > > > > > > > > The problem was apparently that I was trying to configure Petsc > under > > > the 32 > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > I managed to invoke the 64 bit terminal and configure and build > Petsc > > > as > > > > > follows: > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > > > --with-cc='win32fe > > > > > cl' --with-fc=0 > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > MPI: > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > However, I am getting errors when executing "make test": (errors > below) > > > > > Any ideas how to proceed? (I clicked some 'yes when Windows popped > up a > > > > > yes/no security window) > > > > > > > > > > Regards, > > > > > Dominik > > > > > > > > > > > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > PETSC_ARCH=win64-msvc-release test > > > > > Running test examples to verify correct installation > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with > 1 > > > MPI > > > > > process > > > > > See > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > Error while connecting to host, No connection could be made because > the > > > > > target machine actively refused it. (10061) > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > > > points > > > > > Unable to connect to 'Tharsis:8676', > > > > > sock error: Error = -1 > > > > > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with > 2 > > > MPI > > > > > processes > > > > > See > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > Error while connecting to host, No connection could be made because > the > > > > > target machine actively refused it. (10061) > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > > > points > > > > > Unable to connect to 'Tharsis:8676', > > > > > sock error: Error = -1 > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay > > > wrote: > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > My MPICH install is 64 bit but it seems that for some reason 32 > bit > > > VC > > > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > > > > > As mentioned - whichever compiler is first in the PATH is used > > > > > > cl > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to control this, > will > > > update > > > > > > > you later today. > > > > > > > > > > > > One way to control this - is to run the desired 'build env' cmd - > as > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > Satish > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > balay at mcs.anl.gov> > > > wrote: > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it doesn't > try to > > > > > > > > convert the path. This is not the cause of his configure > failure. > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in configure.log] > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > sh: > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > cl > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > /cygdrive/c/Program\ > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > Executing: > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > > > > > -o > > > > > > > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > sh: conftest.obj : error LNK2019: unresolved external symbol > > > _MPI_Init > > > > > > > > referenced in function _main^M > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > error > > > > > > LNK1120: > > > > > > > > 1 unresolved externals^M > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not MPI_Init > symbol > > > in it. > > > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > dominik at itis.ethz.ch> > > > wrote: > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > To: "PETSc users list" > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > and failed because of wrong version of automake in > Cygwin. > > > > > > > > > > I then > > > > > > > > > > installed the Windows binary available on the mpich2 > > > > > > > > > > webpage. I > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > Executing: > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > > > > > > > _MPI_Init > > > > > > > > > > referenced in function _main > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > fatal > > > > > > > > > > error > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > > > > > nonexistent > > > > > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > > > total 808 > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > > > > > cxx.lib > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > > > > > fmpich2.lib > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > > > > > fmpich2g.lib > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > > > > > mpe.lib > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > > > > > mpi.lib > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > jed at 59a2.org> > > > > > > > > > > wrote: > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > > > > > thing needs all the > > > > > > > > > > >> information that the configure provides. CMake is > > > > > > > > > > exactly what it > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > > > > > > > does > > > > > > > > > > > configuration and produces build files for another > > > > > > > > > > tool (like make or an > > > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > > > configuration systems, > > > > > > > > > > > and CMake's scripting language is so attrocious that > > > > > > > > > > "replacing" > > > > > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > > > > > It's > > > > > > > > > > > cross-compilation support is also a bit weak, and > > > > > > > > > > there are a pile of > > > > > > > > > > > other things that it does poorly (mostly related to > > > > > > > > > > pathologically > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > > > > > mean it isn't useful > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 22 15:45:55 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 15:45:55 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: On Thu, 22 Jul 2010, Dominik Szczerba wrote: > Thanks a lot. > But now there is no meaningful output... What do you mean? Have you run the examples manually? You just show the 'compile' step - which looks successful. > > > > mpiexec -n 2 ./ex2.exe > > > > mpiexec -localonly -n 2 ./ex2.exe Satish > > Dominik at Tharsis/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > PETSC_ARCH=win64-msvc-release ex2 > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > ex2.o -c -MT -wd4996 > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > -I/cygdrive/c/Users/Dominik/Programs/ > petsc-3.1-p3/win64-msvc-release/include > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > -I/cygdrive/c/Program Files/MPICH2/include > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > ex2.c > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -MT > -wd4996 -o ex2 ex2.o > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -L/cygdrive/c/Users/Dominik/P > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2clapack -lf2cblas /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib / > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib Kernel32.lib > Ws2_32.lib > /usr/bin/rm -f ex2.o > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay wrote: > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally these are > > set as env variables] > > > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > PETSC_ARCH=win64-msvc-release ex2 > > > > Satish > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > Hmmm I get the following errors: > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > Dominik at Tharsis > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > $ make ex2 > > > makefile:16: /conf/variables: No such file or directory > > > makefile:17: /conf/rules: No such file or directory > > > makefile:856: /conf/test: No such file or directory > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay > > wrote: > > > > > > > Should have said: > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > make ex2 > > > > mpiexec -n 2 ./ex2.exe > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > Satish > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > Try running manually. MPICH2 install by default insists on passwd - > > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > Satish > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > Dear all, > > > > > > > > > > > > The problem was apparently that I was trying to configure Petsc > > under > > > > the 32 > > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > > > I managed to invoke the 64 bit terminal and configure and build > > Petsc > > > > as > > > > > > follows: > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > > > > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > > > > --with-cc='win32fe > > > > > > cl' --with-fc=0 > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > MPI: > > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > /cygdrive/c/Program\ > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > However, I am getting errors when executing "make test": (errors > > below) > > > > > > Any ideas how to proceed? (I clicked some 'yes when Windows popped > > up a > > > > > > yes/no security window) > > > > > > > > > > > > Regards, > > > > > > Dominik > > > > > > > > > > > > > > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > Running test examples to verify correct installation > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with > > 1 > > > > MPI > > > > > > process > > > > > > See > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > Error while connecting to host, No connection could be made because > > the > > > > > > target machine actively refused it. (10061) > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > > > > points > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > sock error: Error = -1 > > > > > > > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 with > > 2 > > > > MPI > > > > > > processes > > > > > > See > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > Error while connecting to host, No connection could be made because > > the > > > > > > target machine actively refused it. (10061) > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > > > > points > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > sock error: Error = -1 > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay > > > > wrote: > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > My MPICH install is 64 bit but it seems that for some reason 32 > > bit > > > > VC > > > > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the PATH is used > > > > > > > cl > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to control this, > > will > > > > update > > > > > > > > you later today. > > > > > > > > > > > > > > One way to control this - is to run the desired 'build env' cmd - > > as > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > balay at mcs.anl.gov> > > > > wrote: > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it doesn't > > try to > > > > > > > > > convert the path. This is not the cause of his configure > > failure. > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in configure.log] > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > sh: > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > cl > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > /cygdrive/c/Program\ > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > Executing: > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > > > > > > -o > > > > > > > > > conftest.exe -MT -wd4996 conftest.o /cygdrive/c/Program\ > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved external symbol > > > > _MPI_Init > > > > > > > > > referenced in function _main^M > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : fatal > > error > > > > > > > LNK1120: > > > > > > > > > 1 unresolved externals^M > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not MPI_Init > > symbol > > > > in it. > > > > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > dominik at itis.ethz.ch> > > > > wrote: > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > > To: "PETSc users list" > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > and failed because of wrong version of automake in > > Cygwin. > > > > > > > > > > > I then > > > > > > > > > > > installed the Windows binary available on the mpich2 > > > > > > > > > > > webpage. I > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > sh: Warning: win32fe: File Not Found: /cygdrive/c/Program > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown option > > > > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > conftest.obj : error LNK2019: unresolved external symbol > > > > > > > > > > > _MPI_Init > > > > > > > > > > > referenced in function _main > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > fatal > > > > > > > > > > > error > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > > > > > > nonexistent > > > > > > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > > > > total 808 > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > > > > > > cxx.lib > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > > > > > > mpe.lib > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > > > > > > mpi.lib > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > > jed at 59a2.org> > > > > > > > > > > > wrote: > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > > > > > > thing needs all the > > > > > > > > > > > >> information that the configure provides. CMake is > > > > > > > > > > > exactly what it > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, it > > > > > > > > > > > does > > > > > > > > > > > > configuration and produces build files for another > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > > > > configuration systems, > > > > > > > > > > > > and CMake's scripting language is so attrocious that > > > > > > > > > > > "replacing" > > > > > > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > > > > > > It's > > > > > > > > > > > > cross-compilation support is also a bit weak, and > > > > > > > > > > > there are a pile of > > > > > > > > > > > > other things that it does poorly (mostly related to > > > > > > > > > > > pathologically > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From dominik at itis.ethz.ch Thu Jul 22 15:51:59 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 22:51:59 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: I tried: $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -np 4 ./ex2 Error while connecting to host, No connection could be made because the target machine actively refused it. (10061) Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points Unable to connect to 'Tharsis:8676', sock error: Error = -1 I have clicked YES in the Windows Firewall requester.... Appreciating any hints... On Thu, Jul 22, 2010 at 10:45 PM, Satish Balay wrote: > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > Thanks a lot. > > But now there is no meaningful output... > > What do you mean? Have you run the examples manually? You just show the > 'compile' step - which looks successful. > > > > > > mpiexec -n 2 ./ex2.exe > > > > > mpiexec -localonly -n 2 ./ex2.exe > > Satish > > > > > Dominik at Tharsis > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > PETSC_ARCH=win64-msvc-release ex2 > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > > ex2.o -c -MT -wd4996 > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > > -I/cygdrive/c/Users/Dominik/Programs/ > > petsc-3.1-p3/win64-msvc-release/include > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > > -I/cygdrive/c/Program Files/MPICH2/include > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > > ex2.c > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > -MT > > -wd4996 -o ex2 ex2.o > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > -L/cygdrive/c/Users/Dominik/P > > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > -lf2clapack -lf2cblas /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib / > > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ > > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib Kernel32.lib > > Ws2_32.lib > > /usr/bin/rm -f ex2.o > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay > wrote: > > > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally these > are > > > set as env variables] > > > > > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > Satish > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > Hmmm I get the following errors: > > > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > > > Dominik at Tharsis > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > $ make ex2 > > > > makefile:16: /conf/variables: No such file or directory > > > > makefile:17: /conf/rules: No such file or directory > > > > makefile:856: /conf/test: No such file or directory > > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay > > > wrote: > > > > > > > > > Should have said: > > > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > > make ex2 > > > > > mpiexec -n 2 ./ex2.exe > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > Satish > > > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > > > Try running manually. MPICH2 install by default insists on passwd > - > > > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > > > Satish > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > The problem was apparently that I was trying to configure Petsc > > > under > > > > > the 32 > > > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > > > > > I managed to invoke the 64 bit terminal and configure and build > > > Petsc > > > > > as > > > > > > > follows: > > > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD > PETSC_ARCH=win64-msvc-release > > > > > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > > > > > --with-cc='win32fe > > > > > > > cl' --with-fc=0 > > > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > > > MPI: > > > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > > > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > /cygdrive/c/Program\ > > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > > > However, I am getting errors when executing "make test": > (errors > > > below) > > > > > > > Any ideas how to proceed? (I clicked some 'yes when Windows > popped > > > up a > > > > > > > yes/no security window) > > > > > > > > > > > > > > Regards, > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > $ make > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > > Running test examples to verify correct installation > > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 > with > > > 1 > > > > > MPI > > > > > > > process > > > > > > > See > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > Error while connecting to host, No connection could be made > because > > > the > > > > > > > target machine actively refused it. (10061) > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all > end > > > > > points > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 > with > > > 2 > > > > > MPI > > > > > > > processes > > > > > > > See > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > Error while connecting to host, No connection could be made > because > > > the > > > > > > > target machine actively refused it. (10061) > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all > end > > > > > points > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay < > balay at mcs.anl.gov> > > > > > wrote: > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > > My MPICH install is 64 bit but it seems that for some > reason 32 > > > bit > > > > > VC > > > > > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the PATH is > used > > > > > > > > cl > > > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to control > this, > > > will > > > > > update > > > > > > > > > you later today. > > > > > > > > > > > > > > > > One way to control this - is to run the desired 'build env' > cmd - > > > as > > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > > balay at mcs.anl.gov> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > /cygdrive/c/Program > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it > doesn't > > > try to > > > > > > > > > > convert the path. This is not the cause of his configure > > > failure. > > > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in > configure.log] > > > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > > sh: > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > cl > > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > > /cygdrive/c/Program\ > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > Executing: > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl > > > > > > > > -o > > > > > > > > > > conftest.exe -MT -wd4996 conftest.o > /cygdrive/c/Program\ > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved external > symbol > > > > > _MPI_Init > > > > > > > > > > referenced in function _main^M > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > fatal > > > error > > > > > > > > LNK1120: > > > > > > > > > > 1 unresolved externals^M > > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not MPI_Init > > > symbol > > > > > in it. > > > > > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown > option > > > > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > > dominik at itis.ethz.ch> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > > > To: "PETSc users list" > > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > > and failed because of wrong version of automake in > > > Cygwin. > > > > > > > > > > > > I then > > > > > > > > > > > > installed the Windows binary available on the mpich2 > > > > > > > > > > > > webpage. I > > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > /cygdrive/c/Program > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown > option > > > > > > > > > > > > '/cygdrive/c/Program > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > conftest.obj : error LNK2019: unresolved external > symbol > > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > referenced in function _main > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > fatal > > > > > > > > > > > > error > > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > > > > > > > nonexistent > > > > > > > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > > > > > total 808 > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > > > > > > > cxx.lib > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > > > > > > > mpe.lib > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > > > > > > > mpi.lib > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > > > jed at 59a2.org> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > > > > > > > thing needs all the > > > > > > > > > > > > >> information that the configure provides. CMake is > > > > > > > > > > > > exactly what it > > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, > it > > > > > > > > > > > > does > > > > > > > > > > > > > configuration and produces build files for another > > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > > > > > configuration systems, > > > > > > > > > > > > > and CMake's scripting language is so attrocious > that > > > > > > > > > > > > "replacing" > > > > > > > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > > > > > > > It's > > > > > > > > > > > > > cross-compilation support is also a bit weak, and > > > > > > > > > > > > there are a pile of > > > > > > > > > > > > > other things that it does poorly (mostly related to > > > > > > > > > > > > pathologically > > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 22 15:52:42 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 15:52:42 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: Have you tried 'mpiexec -localonly'? Satish On Thu, 22 Jul 2010, Dominik Szczerba wrote: > I tried: > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -np 4 ./ex2 > Error while connecting to host, No connection could be made because the > target machine actively refused it. (10061) > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > Unable to connect to 'Tharsis:8676', > sock error: Error = -1 > > I have clicked YES in the Windows Firewall requester.... > > Appreciating any hints... > > > On Thu, Jul 22, 2010 at 10:45 PM, Satish Balay wrote: > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > Thanks a lot. > > > But now there is no meaningful output... > > > > What do you mean? Have you run the examples manually? You just show the > > 'compile' step - which looks successful. > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > Satish > > > > > > > > Dominik at Tharsis > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > PETSC_ARCH=win64-msvc-release ex2 > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > > > ex2.o -c -MT -wd4996 > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > > > -I/cygdrive/c/Users/Dominik/Programs/ > > > petsc-3.1-p3/win64-msvc-release/include > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > > > -I/cygdrive/c/Program Files/MPICH2/include > > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > > > ex2.c > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > > -MT > > > -wd4996 -o ex2 ex2.o > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > -L/cygdrive/c/Users/Dominik/P > > > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > -lf2clapack -lf2cblas /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib / > > > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib /cygdrive/c/Program\ > > > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib Kernel32.lib > > > Ws2_32.lib > > > /usr/bin/rm -f ex2.o > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay > > wrote: > > > > > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally these > > are > > > > set as env variables] > > > > > > > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > Satish > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > Hmmm I get the following errors: > > > > > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > > > > > Dominik at Tharsis > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > $ make ex2 > > > > > makefile:16: /conf/variables: No such file or directory > > > > > makefile:17: /conf/rules: No such file or directory > > > > > makefile:856: /conf/test: No such file or directory > > > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay > > > > wrote: > > > > > > > > > > > Should have said: > > > > > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > > > make ex2 > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > Satish > > > > > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > > > > > Try running manually. MPICH2 install by default insists on passwd > > - > > > > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > The problem was apparently that I was trying to configure Petsc > > > > under > > > > > > the 32 > > > > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > > > > > > > I managed to invoke the 64 bit terminal and configure and build > > > > Petsc > > > > > > as > > > > > > > > follows: > > > > > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD > > PETSC_ARCH=win64-msvc-release > > > > > > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > > > > > > --with-cc='win32fe > > > > > > > > cl' --with-fc=0 > > > > > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > > > > > MPI: > > > > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > > > > Library: /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2.lib > > > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > /cygdrive/c/Program\ > > > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > > > > > However, I am getting errors when executing "make test": > > (errors > > > > below) > > > > > > > > Any ideas how to proceed? (I clicked some 'yes when Windows > > popped > > > > up a > > > > > > > > yes/no security window) > > > > > > > > > > > > > > > > Regards, > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > $ make > > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > > > Running test examples to verify correct installation > > > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 > > with > > > > 1 > > > > > > MPI > > > > > > > > process > > > > > > > > See > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > Error while connecting to host, No connection could be made > > because > > > > the > > > > > > > > target machine actively refused it. (10061) > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all > > end > > > > > > points > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > Possible error running C/C++ src/snes/examples/tutorials/ex19 > > with > > > > 2 > > > > > > MPI > > > > > > > > processes > > > > > > > > See > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > Error while connecting to host, No connection could be made > > because > > > > the > > > > > > > > target machine actively refused it. (10061) > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all > > end > > > > > > points > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay < > > balay at mcs.anl.gov> > > > > > > wrote: > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > > > My MPICH install is 64 bit but it seems that for some > > reason 32 > > > > bit > > > > > > VC > > > > > > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the PATH is > > used > > > > > > > > > cl > > > > > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to control > > this, > > > > will > > > > > > update > > > > > > > > > > you later today. > > > > > > > > > > > > > > > > > > One way to control this - is to run the desired 'build env' > > cmd - > > > > as > > > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > > > balay at mcs.anl.gov> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > /cygdrive/c/Program > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it > > doesn't > > > > try to > > > > > > > > > > > convert the path. This is not the cause of his configure > > > > failure. > > > > > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in > > configure.log] > > > > > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > > > sh: > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > cl > > > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > > > /cygdrive/c/Program\ > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl > > > > > > > > > -o > > > > > > > > > > > conftest.exe -MT -wd4996 conftest.o > > /cygdrive/c/Program\ > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved external > > symbol > > > > > > _MPI_Init > > > > > > > > > > > referenced in function _main^M > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > fatal > > > > error > > > > > > > > > LNK1120: > > > > > > > > > > > 1 unresolved externals^M > > > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not MPI_Init > > > > symbol > > > > > > in it. > > > > > > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown > > option > > > > > > > > > > > > '/cygdrive/c/Program Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > > > dominik at itis.ethz.ch> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > > > > To: "PETSc users list" > > > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > > > and failed because of wrong version of automake in > > > > Cygwin. > > > > > > > > > > > > > I then > > > > > > > > > > > > > installed the Windows binary available on the mpich2 > > > > > > > > > > > > > webpage. I > > > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > /cygdrive/c/Program > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown > > option > > > > > > > > > > > > > '/cygdrive/c/Program > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > conftest.obj : error LNK2019: unresolved external > > symbol > > > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > referenced in function _main > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > fatal > > > > > > > > > > > > > error > > > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration look for a > > > > > > > > > > > > > nonexistent > > > > > > > > > > > > > library? The contents of the installation folder are: > > > > > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > > > > > > total 808 > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 17:09 > > > > > > > > > > > > > cxx.lib > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 17:11 > > > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 17:13 > > > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 16:30 > > > > > > > > > > > > > mpe.lib > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 16:29 > > > > > > > > > > > > > mpi.lib > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 16:30 > > > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > > > > jed at 59a2.org> > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew Knepley > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > >> This would do you absolutely no good. Even Jed's > > > > > > > > > > > > > thing needs all the > > > > > > > > > > > > > >> information that the configure provides. CMake is > > > > > > > > > > > > > exactly what it > > > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at all, > > it > > > > > > > > > > > > > does > > > > > > > > > > > > > > configuration and produces build files for another > > > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > > > > > > configuration systems, > > > > > > > > > > > > > > and CMake's scripting language is so attrocious > > that > > > > > > > > > > > > > "replacing" > > > > > > > > > > > > > > BuildSystem with CMake script would be a disaster. > > > > > > > > > > > > > It's > > > > > > > > > > > > > > cross-compilation support is also a bit weak, and > > > > > > > > > > > > > there are a pile of > > > > > > > > > > > > > > other things that it does poorly (mostly related to > > > > > > > > > > > > > pathologically > > > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That doesn't > > > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From dominik at itis.ethz.ch Thu Jul 22 15:58:20 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Thu, 22 Jul 2010 22:58:20 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: With no luck.... $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -np 4 ./ex2 Unknown option: -d Error while connecting to host, No connection could be made because the target machine actively refused it. (10061) Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points Unable to connect to 'Tharsis:8676', sock error: Error = -1 ReadFile() failed, error 109 unable to start the local smpd manager. On Thu, Jul 22, 2010 at 10:52 PM, Satish Balay wrote: > Have you tried 'mpiexec -localonly'? > > Satish > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > I tried: > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -np 4 ./ex2 > > Error while connecting to host, No connection could be made because the > > target machine actively refused it. (10061) > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > > Unable to connect to 'Tharsis:8676', > > sock error: Error = -1 > > > > I have clicked YES in the Windows Firewall requester.... > > > > Appreciating any hints... > > > > > > On Thu, Jul 22, 2010 at 10:45 PM, Satish Balay > wrote: > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > Thanks a lot. > > > > But now there is no meaningful output... > > > > > > What do you mean? Have you run the examples manually? You just show the > > > 'compile' step - which looks successful. > > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > Satish > > > > > > > > > > > Dominik at Tharsis > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl -o > > > > ex2.o -c -MT -wd4996 > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > > > > -I/cygdrive/c/Users/Dominik/Programs/ > > > > petsc-3.1-p3/win64-msvc-release/include > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > > > > -I/cygdrive/c/Program Files/MPICH2/include > > > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > > > > ex2.c > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > cl > > > -MT > > > > -wd4996 -o ex2 ex2.o > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > -L/cygdrive/c/Users/Dominik/P > > > > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > -lf2clapack -lf2cblas /cygdrive/c/Program\ > Files/MPICH2/lib/fmpich2.lib / > > > > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > /cygdrive/c/Program\ > > > > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib > Kernel32.lib > > > > Ws2_32.lib > > > > /usr/bin/rm -f ex2.o > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay > > > wrote: > > > > > > > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally > these > > > are > > > > > set as env variables] > > > > > > > > > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > > > Satish > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > Hmmm I get the following errors: > > > > > > > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > $ make ex2 > > > > > > makefile:16: /conf/variables: No such file or directory > > > > > > makefile:17: /conf/rules: No such file or directory > > > > > > makefile:856: /conf/test: No such file or directory > > > > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay < > balay at mcs.anl.gov> > > > > > wrote: > > > > > > > > > > > > > Should have said: > > > > > > > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > > > > make ex2 > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > > > > > > > Try running manually. MPICH2 install by default insists on > passwd > > > - > > > > > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > > > The problem was apparently that I was trying to configure > Petsc > > > > > under > > > > > > > the 32 > > > > > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > > > > > > > > > I managed to invoke the 64 bit terminal and configure and > build > > > > > Petsc > > > > > > > as > > > > > > > > > follows: > > > > > > > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > > > > > > > --with-cc='win32fe > > > > > > > > > cl' --with-fc=0 > > > > > > > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > > > > > > > MPI: > > > > > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > > > > > Library: /cygdrive/c/Program\ > Files/MPICH2/lib/fmpich2.lib > > > > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > > /cygdrive/c/Program\ > > > > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > > > > > > > However, I am getting errors when executing "make test": > > > (errors > > > > > below) > > > > > > > > > Any ideas how to proceed? (I clicked some 'yes when Windows > > > popped > > > > > up a > > > > > > > > > yes/no security window) > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > $ make > > > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > > > > Running test examples to verify correct installation > > > > > > > > > Possible error running C/C++ > src/snes/examples/tutorials/ex19 > > > with > > > > > 1 > > > > > > > MPI > > > > > > > > > process > > > > > > > > > See > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > Error while connecting to host, No connection could be made > > > because > > > > > the > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused > all > > > end > > > > > > > points > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > Possible error running C/C++ > src/snes/examples/tutorials/ex19 > > > with > > > > > 2 > > > > > > > MPI > > > > > > > > > processes > > > > > > > > > See > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > Error while connecting to host, No connection could be made > > > because > > > > > the > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused > all > > > end > > > > > > > points > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay < > > > balay at mcs.anl.gov> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > > > > My MPICH install is 64 bit but it seems that for some > > > reason 32 > > > > > bit > > > > > > > VC > > > > > > > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the PATH is > > > used > > > > > > > > > > cl > > > > > > > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to control > > > this, > > > > > will > > > > > > > update > > > > > > > > > > > you later today. > > > > > > > > > > > > > > > > > > > > One way to control this - is to run the desired 'build > env' > > > cmd - > > > > > as > > > > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > > > > balay at mcs.anl.gov> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > /cygdrive/c/Program > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it > > > doesn't > > > > > try to > > > > > > > > > > > > convert the path. This is not the cause of his > configure > > > > > failure. > > > > > > > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in > > > configure.log] > > > > > > > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > > > > sh: > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > cl > > > > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl > > > > > > > > > > -o > > > > > > > > > > > > conftest.exe -MT -wd4996 conftest.o > > > /cygdrive/c/Program\ > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved external > > > symbol > > > > > > > _MPI_Init > > > > > > > > > > > > referenced in function _main^M > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > fatal > > > > > error > > > > > > > > > > LNK1120: > > > > > > > > > > > > 1 unresolved externals^M > > > > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not > MPI_Init > > > > > symbol > > > > > > > in it. > > > > > > > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown > > > option > > > > > > > > > > > > > '/cygdrive/c/Program > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > > > > dominik at itis.ethz.ch> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > > > > > To: "PETSc users list" > > > > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > > > > and failed because of wrong version of automake > in > > > > > Cygwin. > > > > > > > > > > > > > > I then > > > > > > > > > > > > > > installed the Windows binary available on the > mpich2 > > > > > > > > > > > > > > webpage. I > > > > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > /cygdrive/c/Program > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring > unknown > > > option > > > > > > > > > > > > > > '/cygdrive/c/Program > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > conftest.obj : error LNK2019: unresolved external > > > symbol > > > > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > referenced in function _main > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > fatal > > > > > > > > > > > > > > error > > > > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration look > for a > > > > > > > > > > > > > > nonexistent > > > > > > > > > > > > > > library? The contents of the installation folder > are: > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > > > > > > > total 808 > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 > 17:09 > > > > > > > > > > > > > > cxx.lib > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 > 17:11 > > > > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 > 17:13 > > > > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 > 16:30 > > > > > > > > > > > > > > mpe.lib > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 > 16:29 > > > > > > > > > > > > > > mpi.lib > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 > 16:30 > > > > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > > > > > jed at 59a2.org> > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew > Knepley > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > >> This would do you absolutely no good. Even > Jed's > > > > > > > > > > > > > > thing needs all the > > > > > > > > > > > > > > >> information that the configure provides. CMake > is > > > > > > > > > > > > > > exactly what it > > > > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at > all, > > > it > > > > > > > > > > > > > > does > > > > > > > > > > > > > > > configuration and produces build files for > another > > > > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > > > > > > > configuration systems, > > > > > > > > > > > > > > > and CMake's scripting language is so attrocious > > > that > > > > > > > > > > > > > > "replacing" > > > > > > > > > > > > > > > BuildSystem with CMake script would be a > disaster. > > > > > > > > > > > > > > It's > > > > > > > > > > > > > > > cross-compilation support is also a bit weak, > and > > > > > > > > > > > > > > there are a pile of > > > > > > > > > > > > > > > other things that it does poorly (mostly > related to > > > > > > > > > > > > > > pathologically > > > > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That > doesn't > > > > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 22 16:12:43 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 22 Jul 2010 16:12:43 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: I see the follwing following with mpiexec/MPICH2 [default install/configuration]. If it doesn't work this way for you then check with MPICH2 developers - on the correct way to use the MPICH2 version you've installed. Satish -------------- sbalay at ps3 ~/junk $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -n 4 ./cpi.exe User credentials needed to launch processes: account (domain\user) [PS3\sbalay]: password: Process 2 on ps3 Process 3 on ps3 Process 1 on ps3 pi is approximately 3.1416009869231249, Error is 0.0000083333333318 wall clock time = 0.003559 Process 0 on ps3 sbalay at ps3 ~/junk $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -n 4 ./cpi.exe Process 2 on ps3 Process 3 on ps3 Process 1 on ps3 pi is approximately 3.1416009869231249, Error is 0.0000083333333318 wall clock time = 0.003310 Process 0 on ps3 sbalay at ps3 ~/junk On Thu, 22 Jul 2010, Dominik Szczerba wrote: > With no luck.... > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -np 4 ./ex2 > Unknown option: -d > Error while connecting to host, No connection could be made because the > target machine actively refused it. (10061) > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > Unable to connect to 'Tharsis:8676', > sock error: Error = -1 > > ReadFile() failed, error 109 > unable to start the local smpd manager. > > > > > > > > > > On Thu, Jul 22, 2010 at 10:52 PM, Satish Balay wrote: > > > Have you tried 'mpiexec -localonly'? > > > > Satish > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > I tried: > > > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -np 4 ./ex2 > > > Error while connecting to host, No connection could be made because the > > > target machine actively refused it. (10061) > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > > > Unable to connect to 'Tharsis:8676', > > > sock error: Error = -1 > > > > > > I have clicked YES in the Windows Firewall requester.... > > > > > > Appreciating any hints... > > > > > > > > > On Thu, Jul 22, 2010 at 10:45 PM, Satish Balay > > wrote: > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > Thanks a lot. > > > > > But now there is no meaningful output... > > > > > > > > What do you mean? Have you run the examples manually? You just show the > > > > 'compile' step - which looks successful. > > > > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > Satish > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl -o > > > > > ex2.o -c -MT -wd4996 > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > > > > > -I/cygdrive/c/Users/Dominik/Programs/ > > > > > petsc-3.1-p3/win64-msvc-release/include > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > > > > > -I/cygdrive/c/Program Files/MPICH2/include > > > > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > > > > > ex2.c > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > cl > > > > -MT > > > > > -wd4996 -o ex2 ex2.o > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > -L/cygdrive/c/Users/Dominik/P > > > > > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > -lf2clapack -lf2cblas /cygdrive/c/Program\ > > Files/MPICH2/lib/fmpich2.lib / > > > > > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib > > Kernel32.lib > > > > > Ws2_32.lib > > > > > /usr/bin/rm -f ex2.o > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay > > > > wrote: > > > > > > > > > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally > > these > > > > are > > > > > > set as env variables] > > > > > > > > > > > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > > > > > Satish > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > Hmmm I get the following errors: > > > > > > > > > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > > $ make ex2 > > > > > > > makefile:16: /conf/variables: No such file or directory > > > > > > > makefile:17: /conf/rules: No such file or directory > > > > > > > makefile:856: /conf/test: No such file or directory > > > > > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay < > > balay at mcs.anl.gov> > > > > > > wrote: > > > > > > > > > > > > > > > Should have said: > > > > > > > > > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > > > > > make ex2 > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > > > > > > > > > Try running manually. MPICH2 install by default insists on > > passwd > > > > - > > > > > > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > > > > > The problem was apparently that I was trying to configure > > Petsc > > > > > > under > > > > > > > > the 32 > > > > > > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > > > > > > > > > > > I managed to invoke the 64 bit terminal and configure and > > build > > > > > > Petsc > > > > > > > > as > > > > > > > > > > follows: > > > > > > > > > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > --download-c-blas-lapack=1 --with-x=0 --with-debugging=0 > > > > > > > > --with-cc='win32fe > > > > > > > > > > cl' --with-fc=0 > > > > > > > > > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > > > > > > > > > MPI: > > > > > > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > > > > > > Library: /cygdrive/c/Program\ > > Files/MPICH2/lib/fmpich2.lib > > > > > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > > > /cygdrive/c/Program\ > > > > > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > > > > > > > > > However, I am getting errors when executing "make test": > > > > (errors > > > > > > below) > > > > > > > > > > Any ideas how to proceed? (I clicked some 'yes when Windows > > > > popped > > > > > > up a > > > > > > > > > > yes/no security window) > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ make > > > > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > > > > > Running test examples to verify correct installation > > > > > > > > > > Possible error running C/C++ > > src/snes/examples/tutorials/ex19 > > > > with > > > > > > 1 > > > > > > > > MPI > > > > > > > > > > process > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > Error while connecting to host, No connection could be made > > > > because > > > > > > the > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused > > all > > > > end > > > > > > > > points > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > Possible error running C/C++ > > src/snes/examples/tutorials/ex19 > > > > with > > > > > > 2 > > > > > > > > MPI > > > > > > > > > > processes > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > Error while connecting to host, No connection could be made > > > > because > > > > > > the > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused > > all > > > > end > > > > > > > > points > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay < > > > > balay at mcs.anl.gov> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > > > > > My MPICH install is 64 bit but it seems that for some > > > > reason 32 > > > > > > bit > > > > > > > > VC > > > > > > > > > > > > compiler is invoked (I have both 32 and 64 installed). > > > > > > > > > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the PATH is > > > > used > > > > > > > > > > > cl > > > > > > > > > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to control > > > > this, > > > > > > will > > > > > > > > update > > > > > > > > > > > > you later today. > > > > > > > > > > > > > > > > > > > > > > One way to control this - is to run the desired 'build > > env' > > > > cmd - > > > > > > as > > > > > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > > > > > balay at mcs.anl.gov> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > /cygdrive/c/Program > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - it > > > > doesn't > > > > > > try to > > > > > > > > > > > > > convert the path. This is not the cause of his > > configure > > > > > > failure. > > > > > > > > > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in > > > > configure.log] > > > > > > > > > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > > > > > sh: > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > cl > > > > > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl > > > > > > > > > > > -o > > > > > > > > > > > > > conftest.exe -MT -wd4996 conftest.o > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved external > > > > symbol > > > > > > > > _MPI_Init > > > > > > > > > > > > > referenced in function _main^M > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > fatal > > > > > > error > > > > > > > > > > > LNK1120: > > > > > > > > > > > > > 1 unresolved externals^M > > > > > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not > > MPI_Init > > > > > > symbol > > > > > > > > in it. > > > > > > > > > > > > > For whatever reason - libmpi.lib is not compatible. > > > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring unknown > > > > option > > > > > > > > > > > > > > '/cygdrive/c/Program > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > > > > > dominik at itis.ethz.ch> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > > > > > > To: "PETSc users list" > > > > > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > > > > > and failed because of wrong version of automake > > in > > > > > > Cygwin. > > > > > > > > > > > > > > > I then > > > > > > > > > > > > > > > installed the Windows binary available on the > > mpich2 > > > > > > > > > > > > > > > webpage. I > > > > > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long configuration > > > > > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > /cygdrive/c/Program > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring > > unknown > > > > option > > > > > > > > > > > > > > > '/cygdrive/c/Program > > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > conftest.obj : error LNK2019: unresolved external > > > > symbol > > > > > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > > referenced in function _main > > > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > > fatal > > > > > > > > > > > > > > > error > > > > > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration look > > for a > > > > > > > > > > > > > > > nonexistent > > > > > > > > > > > > > > > library? The contents of the installation folder > > are: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ Files/MPICH2/lib/ > > > > > > > > > > > > > > > total 808 > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 > > 17:09 > > > > > > > > > > > > > > > cxx.lib > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 > > 17:11 > > > > > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 > > 17:13 > > > > > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 > > 16:30 > > > > > > > > > > > > > > > mpe.lib > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 > > 16:29 > > > > > > > > > > > > > > > mpi.lib > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 > > 16:30 > > > > > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > > > > > > jed at 59a2.org> > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew > > Knepley > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > >> This would do you absolutely no good. Even > > Jed's > > > > > > > > > > > > > > > thing needs all the > > > > > > > > > > > > > > > >> information that the configure provides. CMake > > is > > > > > > > > > > > > > > > exactly what it > > > > > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system at > > all, > > > > it > > > > > > > > > > > > > > > does > > > > > > > > > > > > > > > > configuration and produces build files for > > another > > > > > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > > > > > IDE). I see no point in maintaining duplicate > > > > > > > > > > > > > > > configuration systems, > > > > > > > > > > > > > > > > and CMake's scripting language is so attrocious > > > > that > > > > > > > > > > > > > > > "replacing" > > > > > > > > > > > > > > > > BuildSystem with CMake script would be a > > disaster. > > > > > > > > > > > > > > > It's > > > > > > > > > > > > > > > > cross-compilation support is also a bit weak, > > and > > > > > > > > > > > > > > > there are a pile of > > > > > > > > > > > > > > > > other things that it does poorly (mostly > > related to > > > > > > > > > > > > > > > pathologically > > > > > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That > > doesn't > > > > > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From dominik at itis.ethz.ch Fri Jul 23 04:56:58 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 23 Jul 2010 11:56:58 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: OK so to conclude this thread, on Windows I need to run the command line window in Administrator mode, and start the daemon as : /cygdrive/c/Program\ Files/MPICH2/bin/smpd.exe -install then mpiexec works and 'make test' in petsc source behaves as expected (login/password needed). Will now try to build a version with hypre and parmetis. Many thanks for your support. Regards, Dominik On Thu, Jul 22, 2010 at 11:12 PM, Satish Balay wrote: > I see the follwing following with mpiexec/MPICH2 [default > install/configuration]. If it doesn't work this way for you then check > with MPICH2 developers - on the correct way to use the MPICH2 version > you've installed. > > Satish > -------------- > > sbalay at ps3 ~/junk > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -n 4 ./cpi.exe > User credentials needed to launch processes: > account (domain\user) [PS3\sbalay]: > password: > Process 2 on ps3 > Process 3 on ps3 > Process 1 on ps3 > pi is approximately 3.1416009869231249, Error is 0.0000083333333318 > wall clock time = 0.003559 > Process 0 on ps3 > > sbalay at ps3 ~/junk > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -n 4 > ./cpi.exe > Process 2 on ps3 > Process 3 on ps3 > Process 1 on ps3 > pi is approximately 3.1416009869231249, Error is 0.0000083333333318 > wall clock time = 0.003310 > Process 0 on ps3 > > sbalay at ps3 ~/junk > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > With no luck.... > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -np 4 > ./ex2 > > Unknown option: -d > > Error while connecting to host, No connection could be made because the > > target machine actively refused it. (10061) > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > > Unable to connect to 'Tharsis:8676', > > sock error: Error = -1 > > > > ReadFile() failed, error 109 > > unable to start the local smpd manager. > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:52 PM, Satish Balay > wrote: > > > > > Have you tried 'mpiexec -localonly'? > > > > > > Satish > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > I tried: > > > > > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -np 4 ./ex2 > > > > Error while connecting to host, No connection could be made because > the > > > > target machine actively refused it. (10061) > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > points > > > > Unable to connect to 'Tharsis:8676', > > > > sock error: Error = -1 > > > > > > > > I have clicked YES in the Windows Firewall requester.... > > > > > > > > Appreciating any hints... > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:45 PM, Satish Balay > > > wrote: > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > Thanks a lot. > > > > > > But now there is no meaningful output... > > > > > > > > > > What do you mean? Have you run the examples manually? You just show > the > > > > > 'compile' step - which looks successful. > > > > > > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl -o > > > > > > ex2.o -c -MT -wd4996 > > > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > > > > > > -I/cygdrive/c/Users/Dominik/Programs/ > > > > > > petsc-3.1-p3/win64-msvc-release/include > > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > > > > > > -I/cygdrive/c/Program Files/MPICH2/include > > > > > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > > > > > > ex2.c > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > cl > > > > > -MT > > > > > > -wd4996 -o ex2 ex2.o > > > > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > > -L/cygdrive/c/Users/Dominik/P > > > > > > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > > > > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > > -lf2clapack -lf2cblas /cygdrive/c/Program\ > > > Files/MPICH2/lib/fmpich2.lib / > > > > > > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > /cygdrive/c/Program\ > > > > > > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib > > > Kernel32.lib > > > > > > Ws2_32.lib > > > > > > /usr/bin/rm -f ex2.o > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay < > balay at mcs.anl.gov> > > > > > wrote: > > > > > > > > > > > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally > > > these > > > > > are > > > > > > > set as env variables] > > > > > > > > > > > > > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > Hmmm I get the following errors: > > > > > > > > > > > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > > > $ make ex2 > > > > > > > > makefile:16: /conf/variables: No such file or directory > > > > > > > > makefile:17: /conf/rules: No such file or directory > > > > > > > > makefile:856: /conf/test: No such file or directory > > > > > > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay < > > > balay at mcs.anl.gov> > > > > > > > wrote: > > > > > > > > > > > > > > > > > Should have said: > > > > > > > > > > > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > > > > > > make ex2 > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > > > > > > > > > > > Try running manually. MPICH2 install by default insists > on > > > passwd > > > > > - > > > > > > > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > > > > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > > > > > > > The problem was apparently that I was trying to > configure > > > Petsc > > > > > > > under > > > > > > > > > the 32 > > > > > > > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > > > > > > > > > > > > > I managed to invoke the 64 bit terminal and configure > and > > > build > > > > > > > Petsc > > > > > > > > > as > > > > > > > > > > > follows: > > > > > > > > > > > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > --download-c-blas-lapack=1 --with-x=0 > --with-debugging=0 > > > > > > > > > --with-cc='win32fe > > > > > > > > > > > cl' --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > > > > > > > > > > > MPI: > > > > > > > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > > > > > > > Library: /cygdrive/c/Program\ > > > Files/MPICH2/lib/fmpich2.lib > > > > > > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > > > > > > > > > > > However, I am getting errors when executing "make > test": > > > > > (errors > > > > > > > below) > > > > > > > > > > > Any ideas how to proceed? (I clicked some 'yes when > Windows > > > > > popped > > > > > > > up a > > > > > > > > > > > yes/no security window) > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ make > > > > > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > > > > > > Running test examples to verify correct installation > > > > > > > > > > > Possible error running C/C++ > > > src/snes/examples/tutorials/ex19 > > > > > with > > > > > > > 1 > > > > > > > > > MPI > > > > > > > > > > > process > > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > > Error while connecting to host, No connection could be > made > > > > > because > > > > > > > the > > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, > exhaused > > > all > > > > > end > > > > > > > > > points > > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > > > Possible error running C/C++ > > > src/snes/examples/tutorials/ex19 > > > > > with > > > > > > > 2 > > > > > > > > > MPI > > > > > > > > > > > processes > > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > > Error while connecting to host, No connection could be > made > > > > > because > > > > > > > the > > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, > exhaused > > > all > > > > > end > > > > > > > > > points > > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay < > > > > > balay at mcs.anl.gov> > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > > > > > > My MPICH install is 64 bit but it seems that for > some > > > > > reason 32 > > > > > > > bit > > > > > > > > > VC > > > > > > > > > > > > > compiler is invoked (I have both 32 and 64 > installed). > > > > > > > > > > > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the > PATH is > > > > > used > > > > > > > > > > > > cl > > > > > > > > > > > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to > control > > > > > this, > > > > > > > will > > > > > > > > > update > > > > > > > > > > > > > you later today. > > > > > > > > > > > > > > > > > > > > > > > > One way to control this - is to run the desired > 'build > > > env' > > > > > cmd - > > > > > > > as > > > > > > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > > > > > > balay at mcs.anl.gov> > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > > /cygdrive/c/Program > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - > it > > > > > doesn't > > > > > > > try to > > > > > > > > > > > > > > convert the path. This is not the cause of his > > > configure > > > > > > > failure. > > > > > > > > > > > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in > > > > > configure.log] > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > > > > > > sh: > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > cl > > > > > > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > cl > > > > > > > > > > > > -o > > > > > > > > > > > > > > conftest.exe -MT -wd4996 conftest.o > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved > external > > > > > symbol > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > referenced in function _main^M > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > fatal > > > > > > > error > > > > > > > > > > > > LNK1120: > > > > > > > > > > > > > > 1 unresolved externals^M > > > > > > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not > > > MPI_Init > > > > > > > symbol > > > > > > > > > in it. > > > > > > > > > > > > > > For whatever reason - libmpi.lib is not > compatible. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring > unknown > > > > > option > > > > > > > > > > > > > > > '/cygdrive/c/Program > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > > > > > > dominik at itis.ethz.ch> > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > > > > > > > To: "PETSc users list" < > petsc-users at mcs.anl.gov> > > > > > > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > > > > > > and failed because of wrong version of > automake > > > in > > > > > > > Cygwin. > > > > > > > > > > > > > > > > I then > > > > > > > > > > > > > > > > installed the Windows binary available on the > > > mpich2 > > > > > > > > > > > > > > > > webpage. I > > > > > > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long > configuration > > > > > > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > > /cygdrive/c/Program > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring > > > unknown > > > > > option > > > > > > > > > > > > > > > > '/cygdrive/c/Program > > > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > conftest.obj : error LNK2019: unresolved > external > > > > > symbol > > > > > > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > > > referenced in function _main > > > > > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > > > fatal > > > > > > > > > > > > > > > > error > > > > > > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration > look > > > for a > > > > > > > > > > > > > > > > nonexistent > > > > > > > > > > > > > > > > library? The contents of the installation > folder > > > are: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ > Files/MPICH2/lib/ > > > > > > > > > > > > > > > > total 808 > > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 > > > 17:09 > > > > > > > > > > > > > > > > cxx.lib > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 > > > 17:11 > > > > > > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 > > > 17:13 > > > > > > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 > > > 16:30 > > > > > > > > > > > > > > > > mpe.lib > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 > > > 16:29 > > > > > > > > > > > > > > > > mpi.lib > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 > > > 16:30 > > > > > > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > > > > > > > jed at 59a2.org> > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew > > > Knepley > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> This would do you absolutely no good. Even > > > Jed's > > > > > > > > > > > > > > > > thing needs all the > > > > > > > > > > > > > > > > >> information that the configure provides. > CMake > > > is > > > > > > > > > > > > > > > > exactly what it > > > > > > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system > at > > > all, > > > > > it > > > > > > > > > > > > > > > > does > > > > > > > > > > > > > > > > > configuration and produces build files for > > > another > > > > > > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > > > > > > IDE). I see no point in maintaining > duplicate > > > > > > > > > > > > > > > > configuration systems, > > > > > > > > > > > > > > > > > and CMake's scripting language is so > attrocious > > > > > that > > > > > > > > > > > > > > > > "replacing" > > > > > > > > > > > > > > > > > BuildSystem with CMake script would be a > > > disaster. > > > > > > > > > > > > > > > > It's > > > > > > > > > > > > > > > > > cross-compilation support is also a bit > weak, > > > and > > > > > > > > > > > > > > > > there are a pile of > > > > > > > > > > > > > > > > > other things that it does poorly (mostly > > > related to > > > > > > > > > > > > > > > > pathologically > > > > > > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That > > > doesn't > > > > > > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From filippo.spiga at disco.unimib.it Fri Jul 23 07:47:39 2010 From: filippo.spiga at disco.unimib.it (Filippo Spiga) Date: Fri, 23 Jul 2010 08:47:39 -0400 Subject: [petsc-users] Missing symbols in libpetscts.h In-Reply-To: References: <4C485698.6050502@disco.unimib.it> Message-ID: <4C498F6B.5000005@disco.unimib.it> Dear Satish, thanks for you reply. Anyway not in all case the libpetscts.{a, so} is compiled. Is there a specific option of the configure that build this specific PETSc library? It is also possible that I miss something else or my environment is not "clean".... Once again, thank you very much. -------- Original Message -------- Subject: Re: [petsc-users] Missing symbols in libpetscts.h From: Satish Balay To: filippo.spiga at disco.unimib.it, PETSc users list Date: 22/07/10 10.37 > TSSetIFunction() doesn't exist in petsc-3.0.0. The same code will not > work with both versions of petsc. > > You should stick with one version [i.e the latest .. -- =============================================================== Filippo SPIGA MSc, HPC and GRID Technologist tel.: +39 340 8387735 skype: filippo.spiga =============================================================== ?Nobody will drive us out of Cantor's paradise.? -- David Hilbert From jed at 59A2.org Fri Jul 23 08:59:08 2010 From: jed at 59A2.org (Jed Brown) Date: Fri, 23 Jul 2010 15:59:08 +0200 Subject: [petsc-users] Missing symbols in libpetscts.h In-Reply-To: <4C498F6B.5000005@disco.unimib.it> References: <4C485698.6050502@disco.unimib.it> <4C498F6B.5000005@disco.unimib.it> Message-ID: <87ocdyjo43.fsf@59A2.org> On Fri, 23 Jul 2010 08:47:39 -0400, Filippo Spiga wrote: > Dear Satish, > thanks for you reply. Anyway not in all case the libpetscts.{a, > so} is compiled. Is there a specific option of the configure that build > this specific PETSc library? It is also possible that I miss something > else or my environment is not "clean".... PETSc 3.1 uses a single library by default, so you have to link libpetsc (e.g. -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc). If you want separate libraries for each of the components, you can configure --with-single-library=0. Note that in this case there is no libpetsc.so, but there is a libpetscsys.so. If you use this option, you will have to link all the components up to the level you are actually using. Jed Note: there is no significant penalty from using the single library even if you don't use all the components (e.g. no SNES or TS) because those pages won't actually be faulted when your application is loaded (shared libs) and the symbols won't be included when you link statically. Separate libraries are useful for PETSc developers to prevent accidentally creating circular dependencies. From balay at mcs.anl.gov Fri Jul 23 09:06:37 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 23 Jul 2010 09:06:37 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: On Fri, 23 Jul 2010, Dominik Szczerba wrote: > OK so to conclude this thread, on Windows I need to run the command line > window in Administrator mode, and start the daemon as : > > /cygdrive/c/Program\ Files/MPICH2/bin/smpd.exe -install > > then mpiexec works and 'make test' in petsc source behaves as expected > (login/password needed). > > Will now try to build a version with hypre and parmetis. These packages don't build with MS compilers. If you need them - suggest using GNU compilers. Satish > > Many thanks for your support. > > Regards, > Dominik > > On Thu, Jul 22, 2010 at 11:12 PM, Satish Balay wrote: > > > I see the follwing following with mpiexec/MPICH2 [default > > install/configuration]. If it doesn't work this way for you then check > > with MPICH2 developers - on the correct way to use the MPICH2 version > > you've installed. > > > > Satish > > -------------- > > > > sbalay at ps3 ~/junk > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -n 4 ./cpi.exe > > User credentials needed to launch processes: > > account (domain\user) [PS3\sbalay]: > > password: > > Process 2 on ps3 > > Process 3 on ps3 > > Process 1 on ps3 > > pi is approximately 3.1416009869231249, Error is 0.0000083333333318 > > wall clock time = 0.003559 > > Process 0 on ps3 > > > > sbalay at ps3 ~/junk > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -n 4 > > ./cpi.exe > > Process 2 on ps3 > > Process 3 on ps3 > > Process 1 on ps3 > > pi is approximately 3.1416009869231249, Error is 0.0000083333333318 > > wall clock time = 0.003310 > > Process 0 on ps3 > > > > sbalay at ps3 ~/junk > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > With no luck.... > > > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -np 4 > > ./ex2 > > > Unknown option: -d > > > Error while connecting to host, No connection could be made because the > > > target machine actively refused it. (10061) > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end points > > > Unable to connect to 'Tharsis:8676', > > > sock error: Error = -1 > > > > > > ReadFile() failed, error 109 > > > unable to start the local smpd manager. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:52 PM, Satish Balay > > wrote: > > > > > > > Have you tried 'mpiexec -localonly'? > > > > > > > > Satish > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > I tried: > > > > > > > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -np 4 ./ex2 > > > > > Error while connecting to host, No connection could be made because > > the > > > > > target machine actively refused it. (10061) > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > > points > > > > > Unable to connect to 'Tharsis:8676', > > > > > sock error: Error = -1 > > > > > > > > > > I have clicked YES in the Windows Firewall requester.... > > > > > > > > > > Appreciating any hints... > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:45 PM, Satish Balay > > > > wrote: > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > Thanks a lot. > > > > > > > But now there is no meaningful output... > > > > > > > > > > > > What do you mean? Have you run the examples manually? You just show > > the > > > > > > 'compile' step - which looks successful. > > > > > > > > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > > $ make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl -o > > > > > > > ex2.o -c -MT -wd4996 > > > > > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > > > > > > > -I/cygdrive/c/Users/Dominik/Programs/ > > > > > > > petsc-3.1-p3/win64-msvc-release/include > > > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > > > > > > > -I/cygdrive/c/Program Files/MPICH2/include > > > > > > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > > > > > > > ex2.c > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > cl > > > > > > -MT > > > > > > > -wd4996 -o ex2 ex2.o > > > > > > > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > > > -L/cygdrive/c/Users/Dominik/P > > > > > > > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > > > > > > > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > > > -lf2clapack -lf2cblas /cygdrive/c/Program\ > > > > Files/MPICH2/lib/fmpich2.lib / > > > > > > > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > /cygdrive/c/Program\ > > > > > > > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib > > > > Kernel32.lib > > > > > > > Ws2_32.lib > > > > > > > /usr/bin/rm -f ex2.o > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay < > > balay at mcs.anl.gov> > > > > > > wrote: > > > > > > > > > > > > > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. [normally > > > > these > > > > > > are > > > > > > > > set as env variables] > > > > > > > > > > > > > > > > make PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > Hmmm I get the following errors: > > > > > > > > > > > > > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > > > > $ make ex2 > > > > > > > > > makefile:16: /conf/variables: No such file or directory > > > > > > > > > makefile:17: /conf/rules: No such file or directory > > > > > > > > > makefile:856: /conf/test: No such file or directory > > > > > > > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay < > > > > balay at mcs.anl.gov> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > Should have said: > > > > > > > > > > > > > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > > > > > > > make ex2 > > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > > > > > > > > > > > > > Try running manually. MPICH2 install by default insists > > on > > > > passwd > > > > > > - > > > > > > > > > > > and this process isn't handled by petsc scripts properly. > > > > > > > > > > > > > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > > > > > > > > > The problem was apparently that I was trying to > > configure > > > > Petsc > > > > > > > > under > > > > > > > > > > the 32 > > > > > > > > > > > > bit terminal with the 64 bit MPI system installation. > > > > > > > > > > > > > > > > > > > > > > > > I managed to invoke the 64 bit terminal and configure > > and > > > > build > > > > > > > > Petsc > > > > > > > > > > as > > > > > > > > > > > > follows: > > > > > > > > > > > > > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > --download-c-blas-lapack=1 --with-x=0 > > --with-debugging=0 > > > > > > > > > > --with-cc='win32fe > > > > > > > > > > > > cl' --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > > > > > > > > > > > > > MPI: > > > > > > > > > > > > Includes: -I/cygdrive/c/Program\ Files/MPICH2/include > > > > > > > > > > > > Library: /cygdrive/c/Program\ > > > > Files/MPICH2/lib/fmpich2.lib > > > > > > > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > > > > > > > > > > > > > However, I am getting errors when executing "make > > test": > > > > > > (errors > > > > > > > > below) > > > > > > > > > > > > Any ideas how to proceed? (I clicked some 'yes when > > Windows > > > > > > popped > > > > > > > > up a > > > > > > > > > > > > yes/no security window) > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ make > > > > > > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > > > > > > > Running test examples to verify correct installation > > > > > > > > > > > > Possible error running C/C++ > > > > src/snes/examples/tutorials/ex19 > > > > > > with > > > > > > > > 1 > > > > > > > > > > MPI > > > > > > > > > > > > process > > > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > > > Error while connecting to host, No connection could be > > made > > > > > > because > > > > > > > > the > > > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, > > exhaused > > > > all > > > > > > end > > > > > > > > > > points > > > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > > > > > Possible error running C/C++ > > > > src/snes/examples/tutorials/ex19 > > > > > > with > > > > > > > > 2 > > > > > > > > > > MPI > > > > > > > > > > > > processes > > > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > > > Error while connecting to host, No connection could be > > made > > > > > > because > > > > > > > > the > > > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, > > exhaused > > > > all > > > > > > end > > > > > > > > > > points > > > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay < > > > > > > balay at mcs.anl.gov> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > > > > > > > My MPICH install is 64 bit but it seems that for > > some > > > > > > reason 32 > > > > > > > > bit > > > > > > > > > > VC > > > > > > > > > > > > > > compiler is invoked (I have both 32 and 64 > > installed). > > > > > > > > > > > > > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the > > PATH is > > > > > > used > > > > > > > > > > > > > cl > > > > > > > > > > > > > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to > > control > > > > > > this, > > > > > > > > will > > > > > > > > > > update > > > > > > > > > > > > > > you later today. > > > > > > > > > > > > > > > > > > > > > > > > > > One way to control this - is to run the desired > > 'build > > > > env' > > > > > > cmd - > > > > > > > > as > > > > > > > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > > > > > > > balay at mcs.anl.gov> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > > > /cygdrive/c/Program > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file - > > it > > > > > > doesn't > > > > > > > > try to > > > > > > > > > > > > > > > convert the path. This is not the cause of his > > > > configure > > > > > > > > failure. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in > > > > > > configure.log] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > cl > > > > > > > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > cl > > > > > > > > > > > > > -o > > > > > > > > > > > > > > > conftest.exe -MT -wd4996 conftest.o > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved > > external > > > > > > symbol > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > > referenced in function _main^M > > > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > > fatal > > > > > > > > error > > > > > > > > > > > > > LNK1120: > > > > > > > > > > > > > > > 1 unresolved externals^M > > > > > > > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but not > > > > MPI_Init > > > > > > > > symbol > > > > > > > > > > in it. > > > > > > > > > > > > > > > For whatever reason - libmpi.lib is not > > compatible. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring > > unknown > > > > > > option > > > > > > > > > > > > > > > > '/cygdrive/c/Program > > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > > > > > > > dominik at itis.ethz.ch> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba > > > > > > > > > > > > > > > > > > > Subject: Re: [petsc-users] configure problems > > > > > > > > > > > > > > > > > To: "PETSc users list" < > > petsc-users at mcs.anl.gov> > > > > > > > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > > > > > > > and failed because of wrong version of > > automake > > > > in > > > > > > > > Cygwin. > > > > > > > > > > > > > > > > > I then > > > > > > > > > > > > > > > > > installed the Windows binary available on the > > > > mpich2 > > > > > > > > > > > > > > > > > webpage. I > > > > > > > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > > > > > > > Files/MPICH2' --with-x=0 --with-debugging=0 > > > > > > > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long > > configuration > > > > > > > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib Ws2_32.lib > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > > > /cygdrive/c/Program > > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring > > > > unknown > > > > > > option > > > > > > > > > > > > > > > > > '/cygdrive/c/Program > > > > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > conftest.obj : error LNK2019: unresolved > > external > > > > > > symbol > > > > > > > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > > > > referenced in function _main > > > > > > > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > > > > fatal > > > > > > > > > > > > > > > > > error > > > > > > > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any directions why would the configuration > > look > > > > for a > > > > > > > > > > > > > > > > > nonexistent > > > > > > > > > > > > > > > > > library? The contents of the installation > > folder > > > > are: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ > > Files/MPICH2/lib/ > > > > > > > > > > > > > > > > > total 808 > > > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 2010-02-22 > > > > 17:09 > > > > > > > > > > > > > > > > > cxx.lib > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 2010-02-22 > > > > 17:11 > > > > > > > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 2010-02-22 > > > > 17:13 > > > > > > > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 2010-02-22 > > > > 16:30 > > > > > > > > > > > > > > > > > mpe.lib > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 2010-02-22 > > > > 16:29 > > > > > > > > > > > > > > > > > mpi.lib > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 2010-02-22 > > > > 16:30 > > > > > > > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed Brown < > > > > > > > > jed at 59a2.org> > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, Matthew > > > > Knepley > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > >> This would do you absolutely no good. Even > > > > Jed's > > > > > > > > > > > > > > > > > thing needs all the > > > > > > > > > > > > > > > > > >> information that the configure provides. > > CMake > > > > is > > > > > > > > > > > > > > > > > exactly what it > > > > > > > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build system > > at > > > > all, > > > > > > it > > > > > > > > > > > > > > > > > does > > > > > > > > > > > > > > > > > > configuration and produces build files for > > > > another > > > > > > > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > > > > > > > IDE). I see no point in maintaining > > duplicate > > > > > > > > > > > > > > > > > configuration systems, > > > > > > > > > > > > > > > > > > and CMake's scripting language is so > > attrocious > > > > > > that > > > > > > > > > > > > > > > > > "replacing" > > > > > > > > > > > > > > > > > > BuildSystem with CMake script would be a > > > > disaster. > > > > > > > > > > > > > > > > > It's > > > > > > > > > > > > > > > > > > cross-compilation support is also a bit > > weak, > > > > and > > > > > > > > > > > > > > > > > there are a pile of > > > > > > > > > > > > > > > > > > other things that it does poorly (mostly > > > > related to > > > > > > > > > > > > > > > > > pathologically > > > > > > > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). That > > > > doesn't > > > > > > > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From balay at mcs.anl.gov Fri Jul 23 09:08:58 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 23 Jul 2010 09:08:58 -0500 (CDT) Subject: [petsc-users] Missing symbols in libpetscts.h In-Reply-To: <87ocdyjo43.fsf@59A2.org> References: <4C485698.6050502@disco.unimib.it> <4C498F6B.5000005@disco.unimib.it> <87ocdyjo43.fsf@59A2.org> Message-ID: On Fri, 23 Jul 2010, Jed Brown wrote: > On Fri, 23 Jul 2010 08:47:39 -0400, Filippo Spiga wrote: > > Dear Satish, > > thanks for you reply. Anyway not in all case the libpetscts.{a, > > so} is compiled. Is there a specific option of the configure that build > > this specific PETSc library? It is also possible that I miss something > > else or my environment is not "clean".... > > PETSc 3.1 uses a single library by default, so you have to link libpetsc > (e.g. -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc). If you want separate > libraries for each of the components, you can configure > --with-single-library=0. Note that in this case there is no > libpetsc.so, but there is a libpetscsys.so. If you use this option, you > will have to link all the components up to the level you are actually > using. > > Jed > > Note: there is no significant penalty from using the single library even > if you don't use all the components (e.g. no SNES or TS) because those > pages won't actually be faulted when your application is loaded (shared > libs) and the symbols won't be included when you link statically. > Separate libraries are useful for PETSc developers to prevent > accidentally creating circular dependencies. And if you use PETSc makefiles - you wont' have to manage this difference - or force only one type of build [both will work with the same user makefile] Satish From dominik at itis.ethz.ch Fri Jul 23 09:52:20 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 23 Jul 2010 16:52:20 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: On Fri, Jul 23, 2010 at 4:06 PM, Satish Balay wrote: > On Fri, 23 Jul 2010, Dominik Szczerba wrote: > > > OK so to conclude this thread, on Windows I need to run the command line > > window in Administrator mode, and start the daemon as : > > > > /cygdrive/c/Program\ Files/MPICH2/bin/smpd.exe -install > > > > then mpiexec works and 'make test' in petsc source behaves as expected > > (login/password needed). > > > > Will now try to build a version with hypre and parmetis. > > These packages don't build with MS compilers. If you need them - > suggest using GNU compilers. > > Satish > > Do you mean mixing Petsc built with MS compilers with hypre/parmetis built with cygwin's gcc? Will it work? Dominik > > > > > Many thanks for your support. > > > > Regards, > > Dominik > > > > On Thu, Jul 22, 2010 at 11:12 PM, Satish Balay > wrote: > > > > > I see the follwing following with mpiexec/MPICH2 [default > > > install/configuration]. If it doesn't work this way for you then check > > > with MPICH2 developers - on the correct way to use the MPICH2 version > > > you've installed. > > > > > > Satish > > > -------------- > > > > > > sbalay at ps3 ~/junk > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -n 4 ./cpi.exe > > > User credentials needed to launch processes: > > > account (domain\user) [PS3\sbalay]: > > > password: > > > Process 2 on ps3 > > > Process 3 on ps3 > > > Process 1 on ps3 > > > pi is approximately 3.1416009869231249, Error is 0.0000083333333318 > > > wall clock time = 0.003559 > > > Process 0 on ps3 > > > > > > sbalay at ps3 ~/junk > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -n 4 > > > ./cpi.exe > > > Process 2 on ps3 > > > Process 3 on ps3 > > > Process 1 on ps3 > > > pi is approximately 3.1416009869231249, Error is 0.0000083333333318 > > > wall clock time = 0.003310 > > > Process 0 on ps3 > > > > > > sbalay at ps3 ~/junk > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > With no luck.... > > > > > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -localonly -np 4 > > > ./ex2 > > > > Unknown option: -d > > > > Error while connecting to host, No connection could be made because > the > > > > target machine actively refused it. (10061) > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all end > points > > > > Unable to connect to 'Tharsis:8676', > > > > sock error: Error = -1 > > > > > > > > ReadFile() failed, error 109 > > > > unable to start the local smpd manager. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:52 PM, Satish Balay > > > wrote: > > > > > > > > > Have you tried 'mpiexec -localonly'? > > > > > > > > > > Satish > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > I tried: > > > > > > > > > > > > $ /cygdrive/c/Program\ Files/MPICH2/bin/mpiexec.exe -np 4 ./ex2 > > > > > > Error while connecting to host, No connection could be made > because > > > the > > > > > > target machine actively refused it. (10061) > > > > > > Connect on sock (host=Tharsis, port=8676) failed, exhaused all > end > > > points > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > sock error: Error = -1 > > > > > > > > > > > > I have clicked YES in the Windows Firewall requester.... > > > > > > > > > > > > Appreciating any hints... > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:45 PM, Satish Balay < > balay at mcs.anl.gov> > > > > > wrote: > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > Thanks a lot. > > > > > > > > But now there is no meaningful output... > > > > > > > > > > > > > > What do you mean? Have you run the examples manually? You just > show > > > the > > > > > > > 'compile' step - which looks successful. > > > > > > > > > > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > > > $ make > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > cl -o > > > > > > > > ex2.o -c -MT -wd4996 > > > > > > > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/dm/mesh/sieve > > > > > > > > -I/cygdrive/c/Users/Dominik/Programs/ > > > > > > > > petsc-3.1-p3/win64-msvc-release/include > > > > > > > > -I/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/include > > > > > > > > -I/cygdrive/c/Program Files/MPICH2/include > > > > > > > > -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c > > > > > > > > ex2.c > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > cl > > > > > > > -MT > > > > > > > > -wd4996 -o ex2 ex2.o > > > > > > > > > > > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > > > > -L/cygdrive/c/Users/Dominik/P > > > > > > > > rograms/petsc-3.1-p3/win64-msvc-release/lib -lpetsc > > > > > > > > > > > > > > > > > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > > > > > > > > -lf2clapack -lf2cblas /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/fmpich2.lib / > > > > > > > > cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > > /cygdrive/c/Program\ > > > > > > > > Files/MPICH2/lib/mpi.lib Gdi32.lib User32.lib Advapi32.lib > > > > > Kernel32.lib > > > > > > > > Ws2_32.lib > > > > > > > > /usr/bin/rm -f ex2.o > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:23 PM, Satish Balay < > > > balay at mcs.anl.gov> > > > > > > > wrote: > > > > > > > > > > > > > > > > > Sorry - you need PETSC_ARCH and PETSC_DIR with make. > [normally > > > > > these > > > > > > > are > > > > > > > > > set as env variables] > > > > > > > > > > > > > > > > > > make > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > > PETSC_ARCH=win64-msvc-release ex2 > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > Hmmm I get the following errors: > > > > > > > > > > > > > > > > > > > > $ cd src/ksp/ksp/examples/tutorials > > > > > > > > > > > > > > > > > > > > Dominik at Tharsis > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/src/ksp/ksp/examples/tutorials > > > > > > > > > > $ make ex2 > > > > > > > > > > makefile:16: /conf/variables: No such file or directory > > > > > > > > > > makefile:17: /conf/rules: No such file or directory > > > > > > > > > > makefile:856: /conf/test: No such file or directory > > > > > > > > > > make: *** No rule to make target `/conf/test'. Stop. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 10:11 PM, Satish Balay < > > > > > balay at mcs.anl.gov> > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > Should have said: > > > > > > > > > > > > > > > > > > > > > > cd src/ksp/ksp/examples/tutorials > > > > > > > > > > > make ex2 > > > > > > > > > > > mpiexec -n 2 ./ex2.exe > > > > > > > > > > > mpiexec -localonly -n 2 ./ex2.exe > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Satish Balay wrote: > > > > > > > > > > > > > > > > > > > > > > > Try running manually. MPICH2 install by default > insists > > > on > > > > > passwd > > > > > > > - > > > > > > > > > > > > and this process isn't handled by petsc scripts > properly. > > > > > > > > > > > > > > > > > > > > > > > > [or use '--with-mpiexec=mpiexec --localonly'] > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > > > > > > > > > > > The problem was apparently that I was trying to > > > configure > > > > > Petsc > > > > > > > > > under > > > > > > > > > > > the 32 > > > > > > > > > > > > > bit terminal with the 64 bit MPI system > installation. > > > > > > > > > > > > > > > > > > > > > > > > > > I managed to invoke the 64 bit terminal and > configure > > > and > > > > > build > > > > > > > > > Petsc > > > > > > > > > > > as > > > > > > > > > > > > > follows: > > > > > > > > > > > > > > > > > > > > > > > > > > ./config/configure.py PETSC_DIR=$PWD > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > > --download-c-blas-lapack=1 --with-x=0 > > > --with-debugging=0 > > > > > > > > > > > --with-cc='win32fe > > > > > > > > > > > > > cl' --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > > > (with the official MPICH2 64bitinstallation): > > > > > > > > > > > > > > > > > > > > > > > > > > MPI: > > > > > > > > > > > > > Includes: -I/cygdrive/c/Program\ > Files/MPICH2/include > > > > > > > > > > > > > Library: /cygdrive/c/Program\ > > > > > Files/MPICH2/lib/fmpich2.lib > > > > > > > > > > > > > /cygdrive/c/Program\ Files/MPICH2/lib/fmpich2g.lib > > > > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib > > > > > > > > > > > > > > > > > > > > > > > > > > However, I am getting errors when executing "make > > > test": > > > > > > > (errors > > > > > > > > > below) > > > > > > > > > > > > > Any ideas how to proceed? (I clicked some 'yes when > > > Windows > > > > > > > popped > > > > > > > > > up a > > > > > > > > > > > > > yes/no security window) > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ make > > > > > > > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release test > > > > > > > > > > > > > Running test examples to verify correct > installation > > > > > > > > > > > > > Possible error running C/C++ > > > > > src/snes/examples/tutorials/ex19 > > > > > > > with > > > > > > > > > 1 > > > > > > > > > > > MPI > > > > > > > > > > > > > process > > > > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > > > > Error while connecting to host, No connection could > be > > > made > > > > > > > because > > > > > > > > > the > > > > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, > > > exhaused > > > > > all > > > > > > > end > > > > > > > > > > > points > > > > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > > > > > > > Possible error running C/C++ > > > > > src/snes/examples/tutorials/ex19 > > > > > > > with > > > > > > > > > 2 > > > > > > > > > > > MPI > > > > > > > > > > > > > processes > > > > > > > > > > > > > See > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html > > > > > > > > > > > > > Error while connecting to host, No connection could > be > > > made > > > > > > > because > > > > > > > > > the > > > > > > > > > > > > > target machine actively refused it. (10061) > > > > > > > > > > > > > Connect on sock (host=Tharsis, port=8676) failed, > > > exhaused > > > > > all > > > > > > > end > > > > > > > > > > > points > > > > > > > > > > > > > Unable to connect to 'Tharsis:8676', > > > > > > > > > > > > > sock error: Error = -1 > > > > > > > > > > > > > > > > > > > > > > > > > > Completed test examples > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 4:13 PM, Satish Balay < > > > > > > > balay at mcs.anl.gov> > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Dominik Szczerba wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for your precious feedback. > > > > > > > > > > > > > > > My MPICH install is 64 bit but it seems that > for > > > some > > > > > > > reason 32 > > > > > > > > > bit > > > > > > > > > > > VC > > > > > > > > > > > > > > > compiler is invoked (I have both 32 and 64 > > > installed). > > > > > > > > > > > > > > > > > > > > > > > > > > > > As mentioned - whichever compiler is first in the > > > PATH is > > > > > > > used > > > > > > > > > > > > > > cl > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I am clarifying with a local MSVC expert how to > > > control > > > > > > > this, > > > > > > > > > will > > > > > > > > > > > update > > > > > > > > > > > > > > > you later today. > > > > > > > > > > > > > > > > > > > > > > > > > > > > One way to control this - is to run the desired > > > 'build > > > > > env' > > > > > > > cmd - > > > > > > > > > as > > > > > > > > > > > > > > mentioned in the installation instructions. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://www.mcs.anl.gov/petsc/petsc-as/documentation/installation.html#Windows > > > > > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Jul 22, 2010 at 3:45 PM, Satish Balay < > > > > > > > > > balay at mcs.anl.gov> > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > > > > /cygdrive/c/Program > > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Looks like - if win32fe doesn't find the file > - > > > it > > > > > > > doesn't > > > > > > > > > try to > > > > > > > > > > > > > > > > convert the path. This is not the cause of > his > > > > > configure > > > > > > > > > failure. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The primary issue is: [which is much ahead in > > > > > > > configure.log] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>>>>>>>>>> > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > cl > > > > > > > > > > > > > > > > -o conftest.exe -MT -wd4996 conftest.o > > > > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > cl > > > > > > > > > > > > > > -o > > > > > > > > > > > > > > > > conftest.exe -MT -wd4996 conftest.o > > > > > > > /cygdrive/c/Program\ > > > > > > > > > > > > > > > > Files/MPICH2/lib/mpi.lib Ws2_32.lib > > > > > > > > > > > > > > > > sh: conftest.obj : error LNK2019: unresolved > > > external > > > > > > > symbol > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > > > referenced in function _main^M > > > > > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > > > fatal > > > > > > > > > error > > > > > > > > > > > > > > LNK1120: > > > > > > > > > > > > > > > > 1 unresolved externals^M > > > > > > > > > > > > > > > > <<<<<<<<<<< > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Here cl is finding the correct library - but > not > > > > > MPI_Init > > > > > > > > > symbol > > > > > > > > > > > in it. > > > > > > > > > > > > > > > > For whatever reason - libmpi.lib is not > > > compatible. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Satish > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, 22 Jul 2010, Farshid Mossaiby wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I doubt 'cl' can interpret Cygwin paths: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : ignoring > > > unknown > > > > > > > option > > > > > > > > > > > > > > > > > '/cygdrive/c/Program > > > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Shouldn't win32fe convert this path first? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- On Wed, 7/21/10, Dominik Szczerba < > > > > > > > > > dominik at itis.ethz.ch> > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From: Dominik Szczerba < > dominik at itis.ethz.ch > > > > > > > > > > > > > > > > > > > > > > Subject: Re: [petsc-users] configure > problems > > > > > > > > > > > > > > > > > > To: "PETSc users list" < > > > petsc-users at mcs.anl.gov> > > > > > > > > > > > > > > > > > > Date: Wednesday, July 21, 2010, 7:01 PM > > > > > > > > > > > > > > > > > > Coming back to the original problem: > > > > > > > > > > > > > > > > > > I tried to compile MPICH2 myself > > > > > > > > > > > > > > > > > > and failed because of wrong version of > > > automake > > > > > in > > > > > > > > > Cygwin. > > > > > > > > > > > > > > > > > > I then > > > > > > > > > > > > > > > > > > installed the Windows binary available on > the > > > > > mpich2 > > > > > > > > > > > > > > > > > > webpage. I > > > > > > > > > > > > > > > > > > configure petsc with: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ./config/configure.py PETSC_DIR=$PWD > > > > > > > > > > > > > > > > > > PETSC_ARCH=win64-msvc-release > > > > > > > > > > > > > > > > > > --download-c-blas-lapack=1 > > > > > > > > > > > > > > > > > > --with-mpi-dir='/cygdrive/c/Program > > > > > > > > > > > > > > > > > > Files/MPICH2' --with-x=0 > --with-debugging=0 > > > > > > > > > > > > > > > > > > --with-cc='win32fe cl' > > > > > > > > > > > > > > > > > > --with-fc=0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to hear at the end (of a very long > > > configuration > > > > > > > > > > > > > > > > > > process...): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > sh: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > Ws2_32.lib > > > > > > > > > > > > > > > > > > Executing: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe > > > > > > > > > > > > > > > > > > cl -o conftest.exe -MT -wd4996 > > > > > > > > > > > > > > > > > > conftest.o /cygdrive/c/Program\ > > > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > Ws2_32.lib > > > > > > > > > > > > > > > > > > sh: Warning: win32fe: File Not Found: > > > > > > > /cygdrive/c/Program > > > > > > > > > > > > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib > > > > > > > > > > > > > > > > > > cl : Command line warning D9002 : > ignoring > > > > > unknown > > > > > > > option > > > > > > > > > > > > > > > > > > '/cygdrive/c/Program > > > > > > > Files/MPICH2/lib/amd64/msmpi.lib' > > > > > > > > > > > > > > > > > > conftest.obj : error LNK2019: unresolved > > > external > > > > > > > symbol > > > > > > > > > > > > > > > > > > _MPI_Init > > > > > > > > > > > > > > > > > > referenced in function _main > > > > > > > > > > > > > > > > > > > > > > > C:\Users\Dominik\Programs\PETSC-~1.1-P\conftest.exe : > > > > > > > > > fatal > > > > > > > > > > > > > > > > > > error > > > > > > > > > > > > > > > > > > LNK1120: 1 unresolved externals > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Any directions why would the > configuration > > > look > > > > > for a > > > > > > > > > > > > > > > > > > nonexistent > > > > > > > > > > > > > > > > > > library? The contents of the installation > > > folder > > > > > are: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ ls -la /cygdrive/c/Program\ > > > Files/MPICH2/lib/ > > > > > > > > > > > > > > > > > > total 808 > > > > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > > > > 2010-07-21 15:54 . > > > > > > > > > > > > > > > > > > drwx------+ 1 SYSTEM SYSTEM 4096 > > > > > > > > > > > > > > > > > > 2010-07-21 15:54 .. > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 4644 > > > > > > > > > > > > > > > > > > 2010-02-22 17:13 TraceInput.lib > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 322820 > 2010-02-22 > > > > > 17:09 > > > > > > > > > > > > > > > > > > cxx.lib > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 131316 > 2010-02-22 > > > > > 17:11 > > > > > > > > > > > > > > > > > > fmpich2.lib > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 136382 > 2010-02-22 > > > > > 17:13 > > > > > > > > > > > > > > > > > > fmpich2g.lib > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 1936 > > > > > > > > > > > > > > > > > > 2010-02-22 17:13 irlog2rlog.lib > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 10430 > 2010-02-22 > > > > > 16:30 > > > > > > > > > > > > > > > > > > mpe.lib > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 132128 > 2010-02-22 > > > > > 16:29 > > > > > > > > > > > > > > > > > > mpi.lib > > > > > > > > > > > > > > > > > > -rwx------+ 1 SYSTEM SYSTEM 61286 > 2010-02-22 > > > > > 16:30 > > > > > > > > > > > > > > > > > > rlog.lib > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > > > Dominik > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 20, 2010 at 12:44 AM, Jed > Brown < > > > > > > > > > jed at 59a2.org> > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > On Tue, 20 Jul 2010 08:37:18 +1000, > Matthew > > > > > Knepley > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > >> This would do you absolutely no good. > Even > > > > > Jed's > > > > > > > > > > > > > > > > > > thing needs all the > > > > > > > > > > > > > > > > > > >> information that the configure > provides. > > > CMake > > > > > is > > > > > > > > > > > > > > > > > > exactly what it > > > > > > > > > > > > > > > > > > >> says, make. It does no configuration > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This isn't true, CMake isn't a build > system > > > at > > > > > all, > > > > > > > it > > > > > > > > > > > > > > > > > > does > > > > > > > > > > > > > > > > > > > configuration and produces build files > for > > > > > another > > > > > > > > > > > > > > > > > > tool (like make or an > > > > > > > > > > > > > > > > > > > IDE). I see no point in maintaining > > > duplicate > > > > > > > > > > > > > > > > > > configuration systems, > > > > > > > > > > > > > > > > > > > and CMake's scripting language is so > > > attrocious > > > > > > > that > > > > > > > > > > > > > > > > > > "replacing" > > > > > > > > > > > > > > > > > > > BuildSystem with CMake script would be > a > > > > > disaster. > > > > > > > > > > > > > > > > > > It's > > > > > > > > > > > > > > > > > > > cross-compilation support is also a bit > > > weak, > > > > > and > > > > > > > > > > > > > > > > > > there are a pile of > > > > > > > > > > > > > > > > > > > other things that it does poorly > (mostly > > > > > related to > > > > > > > > > > > > > > > > > > pathologically > > > > > > > > > > > > > > > > > > > dysfunctional "Find*.cmake" modules). > That > > > > > doesn't > > > > > > > > > > > > > > > > > > mean it isn't useful > > > > > > > > > > > > > > > > > > > for producing build files. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Jed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Fri Jul 23 10:15:50 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 23 Jul 2010 10:15:50 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: On Fri, 23 Jul 2010, Dominik Szczerba wrote: > On Fri, Jul 23, 2010 at 4:06 PM, Satish Balay wrote: > > > On Fri, 23 Jul 2010, Dominik Szczerba wrote: > > > > > OK so to conclude this thread, on Windows I need to run the command line > > > window in Administrator mode, and start the daemon as : > > > > > > /cygdrive/c/Program\ Files/MPICH2/bin/smpd.exe -install > > > > > > then mpiexec works and 'make test' in petsc source behaves as expected > > > (login/password needed). > > > > > > Will now try to build a version with hypre and parmetis. > > > > These packages don't build with MS compilers. If you need them - > > suggest using GNU compilers. > > > > Satish > > > > > Do you mean mixing Petsc built with MS compilers with hypre/parmetis built > with cygwin's gcc? > Will it work? Mixing diferent compilers [esp MS & gnu on windows] will not work. I mean: if you really need hypre on windows - then use gnu compilers for everything [petsc+mpi+hypre etc..] Or just stick with linux.. Satish From dominik at itis.ethz.ch Fri Jul 23 13:14:31 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 23 Jul 2010 20:14:31 +0200 Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: On Fri, Jul 23, 2010 at 5:15 PM, Satish Balay wrote: > On Fri, 23 Jul 2010, Dominik Szczerba wrote: > > > On Fri, Jul 23, 2010 at 4:06 PM, Satish Balay wrote: > > > > > On Fri, 23 Jul 2010, Dominik Szczerba wrote: > > > > > > > OK so to conclude this thread, on Windows I need to run the command > line > > > > window in Administrator mode, and start the daemon as : > > > > > > > > /cygdrive/c/Program\ Files/MPICH2/bin/smpd.exe -install > > > > > > > > then mpiexec works and 'make test' in petsc source behaves as > expected > > > > (login/password needed). > > > > > > > > Will now try to build a version with hypre and parmetis. > > > > > > These packages don't build with MS compilers. If you need them - > > > suggest using GNU compilers. > > > > > > Satish > > > > > > > > Do you mean mixing Petsc built with MS compilers with hypre/parmetis > built > > with cygwin's gcc? > > Will it work? > > > Mixing diferent compilers [esp MS & gnu on windows] will not work. I > mean: if you really need hypre on windows - then use gnu compilers for > everything [petsc+mpi+hypre etc..] > > Or just stick with linux.. > > Unfortunately, I need also a Windows version and I will leave the cygwin option as the last resort. For the moment I managed to successfully build petsc with --with-parmetis=1 --download-parmetis=1. When using --download-hypre=1 configure fails complaining about missing mpi.h, which is surprising. I was wondering what you meant with "These packages don't build with MS compilers": dependence on some core unix functionality or the lack of the appropriate project/build script. Regards, Dominik > Satish > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Fri Jul 23 13:16:52 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Fri, 23 Jul 2010 13:16:52 -0500 (CDT) Subject: [petsc-users] configure problems In-Reply-To: References: <537339.10706.qm@web52207.mail.re2.yahoo.com> Message-ID: On Fri, 23 Jul 2010, Dominik Szczerba wrote: > Unfortunately, I need also a Windows version and I will leave the cygwin > option as the last resort. > For the moment I managed to successfully build petsc with --with-parmetis=1 > --download-parmetis=1. When using --download-hypre=1 configure fails > complaining about missing mpi.h, which is surprising. > I was wondering what you meant with "These packages don't build with MS > compilers": dependence on some core unix functionality or the lack of the > appropriate project/build script. You'll have to check with hypre developers about windows install. Satish From dominik at itis.ethz.ch Sun Jul 25 16:10:09 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Sun, 25 Jul 2010 23:10:09 +0200 Subject: [petsc-users] petsc with hypre on Windows Message-ID: Hi, I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler (MSVC 2008) with: ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 I also managed to build hypre-2.6.0b separately myself using the same compiler. Now the last problem is to build petsc with this external package (--download-hypre will fail). I add to the above configure line: --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ but the configuration fails with: ******************************************************************************* UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): ------------------------------------------------------------------------------- C++ error! mpi.h could not be located at: ['/cygdrive/c/Program Files/MPICH2/include'] ******************************************************************************* This error is clearly wrong as: $ ls -la '/cygdrive/c/Program Files/MPICH2/include' total 309 drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h Inspecting the log file shows: Executing: g++ -c -o conftest.o -Wall -Wwrite-strings -Wno-strict-aliasing -O -I/cygdrive/c/Program\ Files/MPICH2/include conftest.cc I think the error is in the white space in "Program Files". I failed to convince hypre to use the default system installation of MPICH. I *had* to make a hardcopy in C: to avoid the white space. I am sending the log to the maintainters, just in case, because I saw more errors there too. Any help is greatly appreciated. Regards, Dominik -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik at itis.ethz.ch Mon Jul 26 03:40:52 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Mon, 26 Jul 2010 10:40:52 +0200 Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: References: Message-ID: I just reinstalled MPICH to C: (and not the default location Program FIles). I also followed Barry and added --with-cxx="win32fe cl" Now I am getting errors when linking to hypre. BOTH hypre and petsc are compiled with MSVC 2008 64bit (configured with cygwin). The library is called libHYPRE.a, and as I watched it compile 'cl' was used for compilation. It failed to link (*.lib not found) as *.a so I renamed it to libHYPRE.lib. Now the error is: Executing: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o conftest.exe -MT -wd4996 conftest.o -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program s/petsc-3.1-p3/win64-msvc-release/lib -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2clapack -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -L/c ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2cblas Ws2_32.lib sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : warning LNK4003: invalid library format; library ignored I configured with: --with-mpi-dir=/cygdrive/c/MPICH2/ --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ but: $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib total 8624 drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib How can I go on from here? Regards, Dominik On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba wrote: > Hi, > > I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler > (MSVC 2008) with: > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 > --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 > > I also managed to build hypre-2.6.0b separately myself using the same > compiler. Now the last problem is to build petsc with this external package > (--download-hypre will fail). I add to the above configure line: > > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > but the configuration fails with: > > > ******************************************************************************* > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > details): > > ------------------------------------------------------------------------------- > C++ error! mpi.h could not be located at: ['/cygdrive/c/Program > Files/MPICH2/include'] > > ******************************************************************************* > > This error is clearly wrong as: > > $ ls -la '/cygdrive/c/Program Files/MPICH2/include' > total 309 > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h > -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h > -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h > -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h > -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h > -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h > -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h > -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h > -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h > -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod > -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod > -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod > -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod > -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h > -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h > -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h > > Inspecting the log file shows: > > Executing: g++ -c -o conftest.o -Wall -Wwrite-strings -Wno-strict-aliasing > -O -I/cygdrive/c/Program\ Files/MPICH2/include conftest.cc > > I think the error is in the white space in "Program Files". I failed to > convince hypre to use the default system installation of MPICH. I *had* to > make a hardcopy in C: to avoid the white space. > > I am sending the log to the maintainters, just in case, because I saw more > errors there too. > > Any help is greatly appreciated. > > Regards, > Dominik > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mossaiby at yahoo.com Mon Jul 26 03:49:55 2010 From: mossaiby at yahoo.com (Farshid Mossaiby) Date: Mon, 26 Jul 2010 01:49:55 -0700 (PDT) Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: Message-ID: <886479.60344.qm@web52202.mail.re2.yahoo.com> I would check the format of the library with 'dumpbin' tool, available from Visual Studio command propmpt. ? Hope this helps to identify the problem. --- On Mon, 7/26/10, Dominik Szczerba wrote: From: Dominik Szczerba Subject: Re: [petsc-users] petsc with hypre on Windows To: "PETSc users list" Date: Monday, July 26, 2010, 1:10 PM I just reinstalled MPICH to C: (and not the default location Program FIles). I also followed Barry and added --with-cxx="win32fe cl" Now I am getting errors when linking to hypre. BOTH hypre and petsc are compiled with MSVC 2008 64bit (configured with cygwin). The library is called libHYPRE.a, and as I watched it compile 'cl' was used for compilation. It failed to link (*.lib not found) as *.a so I renamed it to libHYPRE.lib. Now the error is: Executing: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl? -o conftest.exe??? -MT -wd4996? conftest.o? -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program s/petsc-3.1-p3/win64-msvc-release/lib -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2clapack -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -L/c ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2cblas Ws2_32.lib sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : warning LNK4003: invalid library format; library ignored I configured with: --with-mpi-dir=/cygdrive/c/MPICH2/ --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ but: $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib total 8624 drwxr-xr-x+ 1 Dominik None?????? 0 2010-07-26 10:17 . drwxr-xr-x+ 1 Dominik None?????? 0 2010-07-23 23:07 .. -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib How can I go on from here? Regards, Dominik On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba wrote: Hi, I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler (MSVC 2008) with: ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 I also managed to build hypre-2.6.0b separately myself using the same compiler. Now the last problem is to build petsc with this external package (--download-hypre will fail). I add to the above configure line: --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ but the configuration fails with: ******************************************************************************* ???????? UNABLE to CONFIGURE with GIVEN OPTIONS??? (see configure.log for details): ------------------------------------------------------------------------------- C++ error! mpi.h could not be located at: ['/cygdrive/c/Program Files/MPICH2/include'] ******************************************************************************* This error is clearly wrong as: $ ls -la '/cygdrive/c/Program Files/MPICH2/include' total 309 drwx------+ 1 SYSTEM SYSTEM? 4096 2010-07-21 15:54 . drwx------+ 1 SYSTEM SYSTEM? 4096 2010-07-21 15:54 .. -rwx------+ 1 SYSTEM SYSTEM? 4776 2007-11-02 15:50 clog_commset.h -rwx------+ 1 SYSTEM SYSTEM?? 696 2007-11-02 15:50 clog_const.h -rwx------+ 1 SYSTEM SYSTEM?? 731 2010-02-22 16:22 clog_inttypes.h -rwx------+ 1 SYSTEM SYSTEM? 1272 2007-11-02 15:50 clog_uuid.h -rwx------+ 1 SYSTEM SYSTEM?? 437 2007-11-02 15:50 mpe.h -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h -rwx------+ 1 SYSTEM SYSTEM? 1833 2007-11-02 15:50 mpe_logf.h -rwx------+ 1 SYSTEM SYSTEM? 1159 2007-11-02 15:50 mpe_misc.h -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h -rwx------+ 1 SYSTEM SYSTEM? 2439 2010-02-22 17:11 mpi.mod -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod -rwx------+ 1 SYSTEM SYSTEM? 8417 2010-02-22 17:11 mpi_sizeofs.mod -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h Inspecting the log file shows: Executing: g++ -c -o conftest.o? -Wall -Wwrite-strings -Wno-strict-aliasing -O??? -I/cygdrive/c/Program\ Files/MPICH2/include conftest.cc I think the error is in the white space in "Program Files". I failed to convince hypre to use the default system installation of MPICH. I *had* to make a hardcopy in C: to avoid the white space. I am sending the log to the maintainters, just in case, because I saw more errors there too. Any help is greatly appreciated. Regards, Dominik -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik at itis.ethz.ch Mon Jul 26 04:04:01 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Mon, 26 Jul 2010 11:04:01 +0200 Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: <886479.60344.qm@web52202.mail.re2.yahoo.com> References: <886479.60344.qm@web52202.mail.re2.yahoo.com> Message-ID: Very helpful! So even though 'cl' was used to compile the linking somehow not. Will clarify with the hypre team and come back. Thanks, Dominik $ dumpbin.exe libHYPRE.lib Microsoft (R) COFF/PE Dumper Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file libHYPRE.lib File Type: LIBRARY libHYPRE.lib : warning LNK4003: invalid library format; library ignored Summary 1BC69 .bss D6A .data 16F1C .debug$S 6F71 .drectve 13B60 .pdata 29B48 .rdata 1444 .rdata$r 30B3CB .text 1D660 .xdata On Mon, Jul 26, 2010 at 10:49 AM, Farshid Mossaiby wrote: > I would check the format of the library with 'dumpbin' tool, available from > Visual Studio command propmpt. > > Hope this helps to identify the problem. > > --- On *Mon, 7/26/10, Dominik Szczerba * wrote: > > > From: Dominik Szczerba > Subject: Re: [petsc-users] petsc with hypre on Windows > To: "PETSc users list" > Date: Monday, July 26, 2010, 1:10 PM > > > I just reinstalled MPICH to C: (and not the default location Program > FIles). I also followed Barry and added --with-cxx="win32fe cl" > > Now I am getting errors when linking to hypre. BOTH hypre and petsc are > compiled with MSVC 2008 64bit (configured with cygwin). The library is > called libHYPRE.a, and as I watched it compile 'cl' was used for > compilation. It failed to link (*.lib not found) as *.a so I renamed it to > libHYPRE.lib. Now the error is: > > Executing: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > conftest.exe -MT -wd4996 conftest.o > -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri > ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE > /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib > /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program > s/petsc-3.1-p3/win64-msvc-release/lib > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2clapack > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -L/c > ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2cblas Ws2_32.lib > sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : > warning LNK4003: invalid library format; library ignored > > I configured with: > --with-mpi-dir=/cygdrive/c/MPICH2/ > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > but: > > $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib > total 8624 > drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . > drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. > -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib > > How can I go on from here? > > Regards, > Dominik > > On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba > > wrote: > > Hi, > > I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler > (MSVC 2008) with: > > ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 > --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 > > I also managed to build hypre-2.6.0b separately myself using the same > compiler. Now the last problem is to build petsc with this external package > (--download-hypre will fail). I add to the above configure line: > > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > but the configuration fails with: > > > ******************************************************************************* > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > details): > > ------------------------------------------------------------------------------- > C++ error! mpi.h could not be located at: ['/cygdrive/c/Program > Files/MPICH2/include'] > > ******************************************************************************* > > This error is clearly wrong as: > > $ ls -la '/cygdrive/c/Program Files/MPICH2/include' > total 309 > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h > -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h > -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h > -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h > -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h > -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h > -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h > -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h > -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h > -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod > -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod > -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod > -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod > -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h > -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h > -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h > > Inspecting the log file shows: > > Executing: g++ -c -o conftest.o -Wall -Wwrite-strings -Wno-strict-aliasing > -O -I/cygdrive/c/Program\ Files/MPICH2/include conftest.cc > > I think the error is in the white space in "Program Files". I failed to > convince hypre to use the default system installation of MPICH. I *had* to > make a hardcopy in C: to avoid the white space. > > I am sending the log to the maintainters, just in case, because I saw more > errors there too. > > Any help is greatly appreciated. > > Regards, > Dominik > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From knepley at gmail.com Mon Jul 26 04:12:24 2010 From: knepley at gmail.com (Matthew Knepley) Date: Mon, 26 Jul 2010 19:12:24 +1000 Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: References: Message-ID: This is what we mean when we say that Hypre does not support Windows. It really doesn't. You can try mailing their list, but I do not anticipate a response other than "We do not support Windows". The build system is completely broken for this platform, as you have experienced. So, my conclusion would be to a) switch packages to something that does support Windows or b) switch platforms to something that Hypre supports Thanks, Matt On Mon, Jul 26, 2010 at 6:40 PM, Dominik Szczerba wrote: > I just reinstalled MPICH to C: (and not the default location Program > FIles). I also followed Barry and added --with-cxx="win32fe cl" > > Now I am getting errors when linking to hypre. BOTH hypre and petsc are > compiled with MSVC 2008 64bit (configured with cygwin). The library is > called libHYPRE.a, and as I watched it compile 'cl' was used for > compilation. It failed to link (*.lib not found) as *.a so I renamed it to > libHYPRE.lib. Now the error is: > > Executing: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > conftest.exe -MT -wd4996 conftest.o > -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri > ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE > /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib > /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program > s/petsc-3.1-p3/win64-msvc-release/lib > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2clapack > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -L/c > ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2cblas Ws2_32.lib > sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : > warning LNK4003: invalid library format; library ignored > > I configured with: > --with-mpi-dir=/cygdrive/c/MPICH2/ > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > but: > > $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib > total 8624 > drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . > drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. > -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib > > How can I go on from here? > > Regards, > Dominik > > On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba wrote: > >> Hi, >> >> I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler >> (MSVC 2008) with: >> >> ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release >> --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 >> --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 >> >> I also managed to build hypre-2.6.0b separately myself using the same >> compiler. Now the last problem is to build petsc with this external package >> (--download-hypre will fail). I add to the above configure line: >> >> >> --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ >> >> but the configuration fails with: >> >> >> ******************************************************************************* >> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for >> details): >> >> ------------------------------------------------------------------------------- >> C++ error! mpi.h could not be located at: ['/cygdrive/c/Program >> Files/MPICH2/include'] >> >> ******************************************************************************* >> >> This error is clearly wrong as: >> >> $ ls -la '/cygdrive/c/Program Files/MPICH2/include' >> total 309 >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. >> -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h >> -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h >> -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h >> -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h >> -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h >> -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h >> -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h >> -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h >> -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h >> -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod >> -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod >> -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod >> -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod >> -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h >> -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h >> -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h >> >> Inspecting the log file shows: >> >> Executing: g++ -c -o conftest.o -Wall -Wwrite-strings >> -Wno-strict-aliasing -O -I/cygdrive/c/Program\ Files/MPICH2/include >> conftest.cc >> >> I think the error is in the white space in "Program Files". I failed to >> convince hypre to use the default system installation of MPICH. I *had* to >> make a hardcopy in C: to avoid the white space. >> >> I am sending the log to the maintainters, just in case, because I saw more >> errors there too. >> >> Any help is greatly appreciated. >> >> Regards, >> Dominik >> > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From zonexo at gmail.com Mon Jul 26 07:00:23 2010 From: zonexo at gmail.com (Wee-Beng TAY) Date: Mon, 26 Jul 2010 20:00:23 +0800 Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: References: Message-ID: <4C4D78D7.5000502@gmail.com> Hi all, I actually tried compiling hypre 2.6b using windows. I can't remember which version I'm using (Vs2005, 2008) but I followed the instructions carefully and it worked. Compiling, linking in IDE are also ok. However, only the C code work. The fortran code just can't work, even after much help from the developers. Only the 2.6b version works with windows. However, I have not tried using both hypre and PETSc in windows. Thank you very much and have a nice day! Yours sincerely, Wee-Beng Tay On 7/26/2010 5:12 PM, Matthew Knepley wrote: > This is what we mean when we say that Hypre does not support Windows. > It really doesn't. You > can try mailing their list, but I do not anticipate a response other > than "We do not support Windows". > The build system is completely broken for this platform, as you have > experienced. So, my conclusion > would be to > > a) switch packages to something that does support Windows > > or > > b) switch platforms to something that Hypre supports > > Thanks, > > Matt > > On Mon, Jul 26, 2010 at 6:40 PM, Dominik Szczerba > > wrote: > > I just reinstalled MPICH to C: (and not the default location > Program FIles). I also followed Barry and added > --with-cxx="win32fe cl" > > Now I am getting errors when linking to hypre. BOTH hypre and > petsc are compiled with MSVC 2008 64bit (configured with cygwin). > The library is called libHYPRE.a, and as I watched it compile 'cl' > was used for compilation. It failed to link (*.lib not found) as > *.a so I renamed it to libHYPRE.lib. Now the error is: > > Executing: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl > -o conftest.exe -MT -wd4996 conftest.o > -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib > -L/cygdri > ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE > /cygdrive/c/MPICH2/lib/fmpich2.lib > /cygdrive/c/MPICH2/lib/fmpich2g.lib /cygdrive/c/MPICH2/lib/mpi.lib > -L/cygdrive/c/Users/Dominik/Program > s/petsc-3.1-p3/win64-msvc-release/lib > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2clapack > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -L/c > ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2cblas Ws2_32.lib > sh: > C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : > warning LNK4003: invalid library format; library ignored > > I configured with: > --with-mpi-dir=/cygdrive/c/MPICH2/ > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > but: > > $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib > total 8624 > drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . > drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. > -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib > > How can I go on from here? > > Regards, > Dominik > > On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba > > wrote: > > Hi, > > I am able to build petsc-3.1-p3 on Windows 7 64bit using > native compiler (MSVC 2008) with: > > ./config/configure.py PETSC_DIR=$PWD > PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 > --with-parmetis=1 --download-parmetis=1 --with-x=0 > --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 > > I also managed to build hypre-2.6.0b separately myself using > the same compiler. Now the last problem is to build petsc with > this external package (--download-hypre will fail). I add to > the above configure line: > > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > but the configuration fails with: > > ******************************************************************************* > UNABLE to CONFIGURE with GIVEN OPTIONS (see > configure.log for details): > ------------------------------------------------------------------------------- > C++ error! mpi.h could not be located at: > ['/cygdrive/c/Program Files/MPICH2/include'] > ******************************************************************************* > > This error is clearly wrong as: > > $ ls -la '/cygdrive/c/Program Files/MPICH2/include' > total 309 > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h > -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h > -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h > -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h > -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h > -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h > -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h > -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h > -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h > -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod > -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod > -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 > mpi_constants.mod > -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod > -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h > -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h > -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h > > Inspecting the log file shows: > > Executing: g++ -c -o conftest.o -Wall -Wwrite-strings > -Wno-strict-aliasing -O -I/cygdrive/c/Program\ > Files/MPICH2/include conftest.cc > > I think the error is in the white space in "Program Files". I > failed to convince hypre to use the default system > installation of MPICH. I *had* to make a hardcopy in C: to > avoid the white space. > > I am sending the log to the maintainters, just in case, > because I saw more errors there too. > > Any help is greatly appreciated. > > Regards, > Dominik > > > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which > their experiments lead. > -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From xxy113 at psu.edu Mon Jul 26 14:49:22 2010 From: xxy113 at psu.edu (Xuan YU) Date: Mon, 26 Jul 2010 15:49:22 -0400 Subject: [petsc-users] about speed Message-ID: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> Hi, I am using TS solving a nonlinear problem. I created an approximate data structure for Jacobian matrix to be used with matcoloring, my MatFDColoringView is like this: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 1.png Type: image/png Size: 17458 bytes Desc: not available URL: -------------- next part -------------- But the speed of code is too slow than what I expected. Only 10 time step costs 11seconds! What's wrong with my code? How can I speed up? Thanks! This is the ts_view result. TS Object: type: beuler maximum steps=100 maximum time=10 total number of nonlinear solver iterations=186 total number of linear solver iterations=423 SNES Object: type: ls line search variant: SNESLineSearchCubic alpha=0.0001, maxstep=1e+08, minlambda=1e-12 maximum iterations=50, maximum function evaluations=10000 tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 total number of linear solver iterations=1 total number of function evaluations=19 KSP Object: type: gmres 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 left preconditioning using PRECONDITIONED norm type for convergence test PC Object: type: ilu ILU: out-of-place factorization 0 levels of fill tolerance for zero pivot 1e-12 using diagonal shift to prevent zero pivot matrix ordering: natural factor fill ratio given 1, needed 1 Factored matrix follows: Matrix Object: type=seqaij, rows=1838, cols=1838 package used to perform factorization: petsc total: nonzeros=8464, allocated nonzeros=8464 total number of mallocs used during MatSetValues calls =0 not using I-node routines linear system matrix = precond matrix: Matrix Object: type=seqaij, rows=1838, cols=1838 total: nonzeros=8464, allocated nonzeros=9745 total number of mallocs used during MatSetValues calls =37 not using I-node routines Xuan YU xxy113 at psu.edu From bsmith at mcs.anl.gov Mon Jul 26 14:53:14 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Mon, 26 Jul 2010 14:53:14 -0500 Subject: [petsc-users] about speed In-Reply-To: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> Message-ID: ./configure an optimized version of PETSc (that is with the ./configure flag of --with-debugging=0) and run with -log_summary to get a summary of where it is spending the time. This will give you a better idea of why it is taking so long. Barry On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: > Hi, > > I am using TS solving a nonlinear problem. I created an approximate data structure for Jacobian matrix to be used with matcoloring, my MatFDColoringView is like this: > > > But the speed of code is too slow than what I expected. Only 10 time step costs 11seconds! > > What's wrong with my code? How can I speed up? > > Thanks! > > This is the ts_view result. > > TS Object: > type: beuler > maximum steps=100 > maximum time=10 > total number of nonlinear solver iterations=186 > total number of linear solver iterations=423 > SNES Object: > type: ls > line search variant: SNESLineSearchCubic > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > maximum iterations=50, maximum function evaluations=10000 > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > total number of linear solver iterations=1 > total number of function evaluations=19 > KSP Object: > type: gmres > 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 > left preconditioning > using PRECONDITIONED norm type for convergence test > PC Object: > type: ilu > ILU: out-of-place factorization > 0 levels of fill > tolerance for zero pivot 1e-12 > using diagonal shift to prevent zero pivot > matrix ordering: natural > factor fill ratio given 1, needed 1 > Factored matrix follows: > Matrix Object: > type=seqaij, rows=1838, cols=1838 > package used to perform factorization: petsc > total: nonzeros=8464, allocated nonzeros=8464 > total number of mallocs used during MatSetValues calls =0 > not using I-node routines > linear system matrix = precond matrix: > Matrix Object: > type=seqaij, rows=1838, cols=1838 > total: nonzeros=8464, allocated nonzeros=9745 > total number of mallocs used during MatSetValues calls =37 > not using I-node routines > > > Xuan YU > xxy113 at psu.edu > > > > From xxy113 at psu.edu Mon Jul 26 16:00:52 2010 From: xxy113 at psu.edu (Xuan YU) Date: Mon, 26 Jul 2010 17:00:52 -0400 Subject: [petsc-users] about speed In-Reply-To: References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> Message-ID: On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: > > ./configure an optimized version of PETSc (that is with the ./ > configure flag of --with-debugging=0) ./configure --with -debugging=0 it says I should config/configure.py --with-mpi=0 --with-debugging=no --download-f-blas-lapack=1 so I did this. When I compile my code again, I got: gcc -Wall -Wwrite-strings -Wno-strict-aliasing -O -o pihm pihm.o f.o read_alloc.o initialize.o is_sm_et.o update.o print.o -Wl,-rpath,/gpfs/ home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -L/gpfs/home/xxy113/ soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lpetsc -lX11 -Wl,-rpath,/ gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -L/gpfs/home/ xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lflapack -lfblas -lm -L/ usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lgcc_s -lgfortran -lm -lm - ldl -lgcc_s -ldl /usr/bin/ld: cannot find -lpetsc collect2: ld returned 1 exit status > and run with -log_summary to get a summary of where it is spending > the time. > This will give you a better idea of why it is taking so long. > > Barry > > On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: > >> Hi, >> >> I am using TS solving a nonlinear problem. I created an approximate >> data structure for Jacobian matrix to be used with matcoloring, my >> MatFDColoringView is like this: >> >> >> But the speed of code is too slow than what I expected. Only 10 >> time step costs 11seconds! >> >> What's wrong with my code? How can I speed up? >> >> Thanks! >> >> This is the ts_view result. >> >> TS Object: >> type: beuler >> maximum steps=100 >> maximum time=10 >> total number of nonlinear solver iterations=186 >> total number of linear solver iterations=423 >> SNES Object: >> type: ls >> line search variant: SNESLineSearchCubic >> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >> maximum iterations=50, maximum function evaluations=10000 >> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >> total number of linear solver iterations=1 >> total number of function evaluations=19 >> KSP Object: >> type: gmres >> 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 >> left preconditioning >> using PRECONDITIONED norm type for convergence test >> PC Object: >> type: ilu >> ILU: out-of-place factorization >> 0 levels of fill >> tolerance for zero pivot 1e-12 >> using diagonal shift to prevent zero pivot >> matrix ordering: natural >> factor fill ratio given 1, needed 1 >> Factored matrix follows: >> Matrix Object: >> type=seqaij, rows=1838, cols=1838 >> package used to perform factorization: petsc >> total: nonzeros=8464, allocated nonzeros=8464 >> total number of mallocs used during MatSetValues calls =0 >> not using I-node routines >> linear system matrix = precond matrix: >> Matrix Object: >> type=seqaij, rows=1838, cols=1838 >> total: nonzeros=8464, allocated nonzeros=9745 >> total number of mallocs used during MatSetValues calls =37 >> not using I-node routines >> >> >> Xuan YU >> xxy113 at psu.edu >> >> >> >> > > Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Mon Jul 26 16:15:30 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Mon, 26 Jul 2010 16:15:30 -0500 (CDT) Subject: [petsc-users] about speed In-Reply-To: References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> Message-ID: Perhaps you missed a step here. After 'configure' you shoud do 'make all' to rebuild the PETSc libraries. Then you should try 'make test' to verify the build. After that - attempt to build your code. satish On Mon, 26 Jul 2010, Xuan YU wrote: > > On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: > > > > > ./configure an optimized version of PETSc (that is with the ./configure > > flag of --with-debugging=0) > > ./configure --with -debugging=0 > it says I should config/configure.py --with-mpi=0 --with-debugging=no > --download-f-blas-lapack=1 > so I did this. > > When I compile my code again, I got: > > gcc -Wall -Wwrite-strings -Wno-strict-aliasing -O -o pihm pihm.o f.o > read_alloc.o initialize.o is_sm_et.o update.o print.o > -Wl,-rpath,/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib > -L/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lpetsc -lX11 > -Wl,-rpath,/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib > -L/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/lib -lflapack -lfblas > -lm -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lgcc_s -lgfortran -lm -lm > -ldl -lgcc_s -ldl > /usr/bin/ld: cannot find -lpetsc > collect2: ld returned 1 exit status > > > > > > and run with -log_summary to get a summary of where it is spending the time. > > > > > > This will give you a better idea of why it is taking so long. > > > > Barry > > > > On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: > > > > > Hi, > > > > > > I am using TS solving a nonlinear problem. I created an approximate data > > > structure for Jacobian matrix to be used with matcoloring, my > > > MatFDColoringView is like this: > > > > > > > > > But the speed of code is too slow than what I expected. Only 10 time step > > > costs 11seconds! > > > > > > What's wrong with my code? How can I speed up? > > > > > > Thanks! > > > > > > This is the ts_view result. > > > > > > TS Object: > > > type: beuler > > > maximum steps=100 > > > maximum time=10 > > > total number of nonlinear solver iterations=186 > > > total number of linear solver iterations=423 > > > SNES Object: > > > type: ls > > > line search variant: SNESLineSearchCubic > > > alpha=0.0001, maxstep=1e+08, minlambda=1e-12 > > > maximum iterations=50, maximum function evaluations=10000 > > > tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 > > > total number of linear solver iterations=1 > > > total number of function evaluations=19 > > > KSP Object: > > > type: gmres > > > 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 > > > left preconditioning > > > using PRECONDITIONED norm type for convergence test > > > PC Object: > > > type: ilu > > > ILU: out-of-place factorization > > > 0 levels of fill > > > tolerance for zero pivot 1e-12 > > > using diagonal shift to prevent zero pivot > > > matrix ordering: natural > > > factor fill ratio given 1, needed 1 > > > Factored matrix follows: > > > Matrix Object: > > > type=seqaij, rows=1838, cols=1838 > > > package used to perform factorization: petsc > > > total: nonzeros=8464, allocated nonzeros=8464 > > > total number of mallocs used during MatSetValues calls =0 > > > not using I-node routines > > > linear system matrix = precond matrix: > > > Matrix Object: > > > type=seqaij, rows=1838, cols=1838 > > > total: nonzeros=8464, allocated nonzeros=9745 > > > total number of mallocs used during MatSetValues calls =37 > > > not using I-node routines > > > > > > > > > Xuan YU > > > xxy113 at psu.edu > > > > > > > > > > > > > > > > > > Xuan YU (??) > xxy113 at psu.edu > > > > From xxy113 at psu.edu Mon Jul 26 17:50:45 2010 From: xxy113 at psu.edu (Xuan YU) Date: Mon, 26 Jul 2010 18:50:45 -0400 Subject: [petsc-users] about speed In-Reply-To: References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> Message-ID: On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: > > ./configure an optimized version of PETSc (that is with the ./ > configure flag of --with-debugging=0) and run with -log_summary to > get a summary of where it is spending the time. This will give you a > better idea of why it is taking so long. Does my log summary means the finite difference Jacobian approximation is not good? Should I write analytic jacobian function(that will be a huge amount of work)? -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 3.png Type: image/png Size: 23543 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 4.png Type: image/png Size: 67304 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 5.png Type: image/png Size: 44994 bytes Desc: not available URL: -------------- next part -------------- > > Barry > > On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: > >> Hi, >> >> I am using TS solving a nonlinear problem. I created an approximate >> data structure for Jacobian matrix to be used with matcoloring, my >> MatFDColoringView is like this: >> >> >> But the speed of code is too slow than what I expected. Only 10 >> time step costs 11seconds! >> >> What's wrong with my code? How can I speed up? >> >> Thanks! >> >> This is the ts_view result. >> >> TS Object: >> type: beuler >> maximum steps=100 >> maximum time=10 >> total number of nonlinear solver iterations=186 >> total number of linear solver iterations=423 >> SNES Object: >> type: ls >> line search variant: SNESLineSearchCubic >> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >> maximum iterations=50, maximum function evaluations=10000 >> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >> total number of linear solver iterations=1 >> total number of function evaluations=19 >> KSP Object: >> type: gmres >> 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 >> left preconditioning >> using PRECONDITIONED norm type for convergence test >> PC Object: >> type: ilu >> ILU: out-of-place factorization >> 0 levels of fill >> tolerance for zero pivot 1e-12 >> using diagonal shift to prevent zero pivot >> matrix ordering: natural >> factor fill ratio given 1, needed 1 >> Factored matrix follows: >> Matrix Object: >> type=seqaij, rows=1838, cols=1838 >> package used to perform factorization: petsc >> total: nonzeros=8464, allocated nonzeros=8464 >> total number of mallocs used during MatSetValues calls =0 >> not using I-node routines >> linear system matrix = precond matrix: >> Matrix Object: >> type=seqaij, rows=1838, cols=1838 >> total: nonzeros=8464, allocated nonzeros=9745 >> total number of mallocs used during MatSetValues calls =37 >> not using I-node routines >> >> >> Xuan YU >> xxy113 at psu.edu >> >> >> >> > > Xuan YU xxy113 at psu.edu From bsmith at mcs.anl.gov Mon Jul 26 20:51:16 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Mon, 26 Jul 2010 20:51:16 -0500 Subject: [petsc-users] about speed In-Reply-To: References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> Message-ID: <2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov> 1) The function evaluations are taking a lot of time; the problem is not with the Jacobian differencing it is that each function evaluation needed by the differencing is slow 2) There are a huge number of SNESFunctionEvaluations, much much more then I would expect, like 10 per nonlinear solve. Barry On Jul 26, 2010, at 5:50 PM, Xuan YU wrote: > > On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: > >> >> ./configure an optimized version of PETSc (that is with the ./configure flag of --with-debugging=0) and run with -log_summary to get a summary of where it is spending the time. This will give you a better idea of why it is taking so long. > > Does my log summary means the finite difference Jacobian approximation is not good? Should I write analytic jacobian function(that will be a huge amount of work)? > > > > > > > > >> >> Barry >> >> On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: >> >>> Hi, >>> >>> I am using TS solving a nonlinear problem. I created an approximate data structure for Jacobian matrix to be used with matcoloring, my MatFDColoringView is like this: >>> >>> >>> But the speed of code is too slow than what I expected. Only 10 time step costs 11seconds! >>> >>> What's wrong with my code? How can I speed up? >>> >>> Thanks! >>> >>> This is the ts_view result. >>> >>> TS Object: >>> type: beuler >>> maximum steps=100 >>> maximum time=10 >>> total number of nonlinear solver iterations=186 >>> total number of linear solver iterations=423 >>> SNES Object: >>> type: ls >>> line search variant: SNESLineSearchCubic >>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>> maximum iterations=50, maximum function evaluations=10000 >>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>> total number of linear solver iterations=1 >>> total number of function evaluations=19 >>> KSP Object: >>> type: gmres >>> 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 >>> left preconditioning >>> using PRECONDITIONED norm type for convergence test >>> PC Object: >>> type: ilu >>> ILU: out-of-place factorization >>> 0 levels of fill >>> tolerance for zero pivot 1e-12 >>> using diagonal shift to prevent zero pivot >>> matrix ordering: natural >>> factor fill ratio given 1, needed 1 >>> Factored matrix follows: >>> Matrix Object: >>> type=seqaij, rows=1838, cols=1838 >>> package used to perform factorization: petsc >>> total: nonzeros=8464, allocated nonzeros=8464 >>> total number of mallocs used during MatSetValues calls =0 >>> not using I-node routines >>> linear system matrix = precond matrix: >>> Matrix Object: >>> type=seqaij, rows=1838, cols=1838 >>> total: nonzeros=8464, allocated nonzeros=9745 >>> total number of mallocs used during MatSetValues calls =37 >>> not using I-node routines >>> >>> >>> Xuan YU >>> xxy113 at psu.edu >>> >>> >>> >>> >> >> > > Xuan YU > xxy113 at psu.edu > > > > From xxy113 at psu.edu Tue Jul 27 08:22:33 2010 From: xxy113 at psu.edu (Xuan YU) Date: Tue, 27 Jul 2010 09:22:33 -0400 Subject: [petsc-users] about speed In-Reply-To: <2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov> References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> <2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov> Message-ID: On Jul 26, 2010, at 9:51 PM, Barry Smith wrote: > > 1) The function evaluations are taking a lot of time; the problem > is not with the Jacobian differencing it is that each function > evaluation needed by the differencing is slow > When I use cvode solve the same preoblem, function evaluations takes 41.42% of total time. And the total time consumption is much less than Petsc.( 5.657seconds VS 2 minutes 33.726 seconds) > 2) There are a huge number of SNESFunctionEvaluations, much much > more then I would expect, like 10 per nonlinear solve. > What is the possible reason for this case? > Barry > > > On Jul 26, 2010, at 5:50 PM, Xuan YU wrote: > >> >> On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: >> >>> >>> ./configure an optimized version of PETSc (that is with the ./ >>> configure flag of --with-debugging=0) and run with -log_summary to >>> get a summary of where it is spending the time. This will give you >>> a better idea of why it is taking so long. >> >> Does my log summary means the finite difference Jacobian >> approximation is not good? Should I write analytic jacobian >> function(that will be a huge amount of work)? >> >> >> >> >> >> >> >> >>> >>> Barry >>> >>> On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: >>> >>>> Hi, >>>> >>>> I am using TS solving a nonlinear problem. I created an >>>> approximate data structure for Jacobian matrix to be used with >>>> matcoloring, my MatFDColoringView is like this: >>>> >>>> >>>> But the speed of code is too slow than what I expected. Only 10 >>>> time step costs 11seconds! >>>> >>>> What's wrong with my code? How can I speed up? >>>> >>>> Thanks! >>>> >>>> This is the ts_view result. >>>> >>>> TS Object: >>>> type: beuler >>>> maximum steps=100 >>>> maximum time=10 >>>> total number of nonlinear solver iterations=186 >>>> total number of linear solver iterations=423 >>>> SNES Object: >>>> type: ls >>>> line search variant: SNESLineSearchCubic >>>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>>> maximum iterations=50, maximum function evaluations=10000 >>>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>>> total number of linear solver iterations=1 >>>> total number of function evaluations=19 >>>> KSP Object: >>>> type: gmres >>>> 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 >>>> left preconditioning >>>> using PRECONDITIONED norm type for convergence test >>>> PC Object: >>>> type: ilu >>>> ILU: out-of-place factorization >>>> 0 levels of fill >>>> tolerance for zero pivot 1e-12 >>>> using diagonal shift to prevent zero pivot >>>> matrix ordering: natural >>>> factor fill ratio given 1, needed 1 >>>> Factored matrix follows: >>>> Matrix Object: >>>> type=seqaij, rows=1838, cols=1838 >>>> package used to perform factorization: petsc >>>> total: nonzeros=8464, allocated nonzeros=8464 >>>> total number of mallocs used during MatSetValues calls =0 >>>> not using I-node routines >>>> linear system matrix = precond matrix: >>>> Matrix Object: >>>> type=seqaij, rows=1838, cols=1838 >>>> total: nonzeros=8464, allocated nonzeros=9745 >>>> total number of mallocs used during MatSetValues calls =37 >>>> not using I-node routines >>>> >>>> >>>> Xuan YU >>>> xxy113 at psu.edu >>>> >>>> >>>> >>>> >>> >>> >> >> Xuan YU >> xxy113 at psu.edu >> >> >> >> > > From filippo.spiga at disco.unimib.it Tue Jul 27 09:36:52 2010 From: filippo.spiga at disco.unimib.it (Filippo Spiga) Date: Tue, 27 Jul 2010 10:36:52 -0400 Subject: [petsc-users] stable/development version, discriminate using "PETSC_VERSION_RELEASE" variable Message-ID: <4C4EEF04.7090906@disco.unimib.it> Dear PETSc users, due to the fact that a I would to use both stable and developer version of PETSc libraries, can I SAFELY use the variable "PETSC_VERSION_RELEASE" defined into "petscversion.h" file? '1' indicate a stable version, '0' indicate the developer one. right? Regards -- =============================================================== Filippo SPIGA MSc, HPC and GRID Technologist tel.: +39 340 8387735 skype: filippo.spiga =============================================================== ?Nobody will drive us out of Cantor's paradise.? -- David Hilbert From bsmith at mcs.anl.gov Tue Jul 27 09:47:35 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 27 Jul 2010 09:47:35 -0500 Subject: [petsc-users] about speed In-Reply-To: References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> <2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov> Message-ID: <1D2A8E60-D943-475E-9E66-C5E76780D2FC@mcs.anl.gov> What happens when you use sundials from PETSc. Use -ts_type sundials? Run also with -log_summary and compare the number of function evaluations, timesteps etc Without knowing more information about what sundials/cvode is doing there is no way to know why it is much faster. Could be larger time-steps, less function evaluations, etc. Barry On Jul 27, 2010, at 8:22 AM, Xuan YU wrote: > > On Jul 26, 2010, at 9:51 PM, Barry Smith wrote: > >> >> 1) The function evaluations are taking a lot of time; the problem is not with the Jacobian differencing it is that each function evaluation needed by the differencing is slow >> > > When I use cvode solve the same preoblem, function evaluations takes 41.42% of total time. And the total time consumption is much less than Petsc.( 5.657seconds VS 2 minutes 33.726 seconds) > > > > >> 2) There are a huge number of SNESFunctionEvaluations, much much more then I would expect, like 10 per nonlinear solve. >> > > What is the possible reason for this case? > > > >> Barry >> >> >> On Jul 26, 2010, at 5:50 PM, Xuan YU wrote: >> >>> >>> On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: >>> >>>> >>>> ./configure an optimized version of PETSc (that is with the ./configure flag of --with-debugging=0) and run with -log_summary to get a summary of where it is spending the time. This will give you a better idea of why it is taking so long. >>> >>> Does my log summary means the finite difference Jacobian approximation is not good? Should I write analytic jacobian function(that will be a huge amount of work)? >>> >>> >>> >>> >>> >>> >>> >>> >>>> >>>> Barry >>>> >>>> On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: >>>> >>>>> Hi, >>>>> >>>>> I am using TS solving a nonlinear problem. I created an approximate data structure for Jacobian matrix to be used with matcoloring, my MatFDColoringView is like this: >>>>> >>>>> >>>>> But the speed of code is too slow than what I expected. Only 10 time step costs 11seconds! >>>>> >>>>> What's wrong with my code? How can I speed up? >>>>> >>>>> Thanks! >>>>> >>>>> This is the ts_view result. >>>>> >>>>> TS Object: >>>>> type: beuler >>>>> maximum steps=100 >>>>> maximum time=10 >>>>> total number of nonlinear solver iterations=186 >>>>> total number of linear solver iterations=423 >>>>> SNES Object: >>>>> type: ls >>>>> line search variant: SNESLineSearchCubic >>>>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>>>> maximum iterations=50, maximum function evaluations=10000 >>>>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>>>> total number of linear solver iterations=1 >>>>> total number of function evaluations=19 >>>>> KSP Object: >>>>> type: gmres >>>>> 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 >>>>> left preconditioning >>>>> using PRECONDITIONED norm type for convergence test >>>>> PC Object: >>>>> type: ilu >>>>> ILU: out-of-place factorization >>>>> 0 levels of fill >>>>> tolerance for zero pivot 1e-12 >>>>> using diagonal shift to prevent zero pivot >>>>> matrix ordering: natural >>>>> factor fill ratio given 1, needed 1 >>>>> Factored matrix follows: >>>>> Matrix Object: >>>>> type=seqaij, rows=1838, cols=1838 >>>>> package used to perform factorization: petsc >>>>> total: nonzeros=8464, allocated nonzeros=8464 >>>>> total number of mallocs used during MatSetValues calls =0 >>>>> not using I-node routines >>>>> linear system matrix = precond matrix: >>>>> Matrix Object: >>>>> type=seqaij, rows=1838, cols=1838 >>>>> total: nonzeros=8464, allocated nonzeros=9745 >>>>> total number of mallocs used during MatSetValues calls =37 >>>>> not using I-node routines >>>>> >>>>> >>>>> Xuan YU >>>>> xxy113 at psu.edu >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> Xuan YU >>> xxy113 at psu.edu >>> >>> >>> >>> >> >> > From bsmith at mcs.anl.gov Tue Jul 27 09:50:24 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 27 Jul 2010 09:50:24 -0500 Subject: [petsc-users] stable/development version, discriminate using "PETSC_VERSION_RELEASE" variable In-Reply-To: <4C4EEF04.7090906@disco.unimib.it> References: <4C4EEF04.7090906@disco.unimib.it> Message-ID: <53AF68AE-72A0-4AB0-BC81-FBA1058B01FE@mcs.anl.gov> Yes, Barry On Jul 27, 2010, at 9:36 AM, Filippo Spiga wrote: > Dear PETSc users, > due to the fact that a I would to use both stable and developer version of PETSc libraries, can I SAFELY use the variable "PETSC_VERSION_RELEASE" defined into "petscversion.h" file? > > '1' indicate a stable version, '0' indicate the developer one. right? > > Regards > > -- > > =============================================================== > Filippo SPIGA MSc, HPC and GRID Technologist > tel.: +39 340 8387735 skype: filippo.spiga > =============================================================== > > ?Nobody will drive us out of Cantor's paradise.? > -- David Hilbert > From xxy113 at psu.edu Tue Jul 27 10:11:55 2010 From: xxy113 at psu.edu (Xuan YU) Date: Tue, 27 Jul 2010 11:11:55 -0400 Subject: [petsc-users] about speed In-Reply-To: <1D2A8E60-D943-475E-9E66-C5E76780D2FC@mcs.anl.gov> References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> <2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov> <1D2A8E60-D943-475E-9E66-C5E76780D2FC@mcs.anl.gov> Message-ID: On Jul 27, 2010, at 10:47 AM, Barry Smith wrote: > > What happens when you use sundials from PETSc. Use -ts_type > sundials? Run also with -log_summary and compare the number of > function evaluations, timesteps etc > I did use sundials from PETSc. I used Sundials directly. I though Petsc may much faster than sundails, so I tried Petsc. > Without knowing more information about what sundials/cvode is doing > there is no way to know why it is much faster. Could be larger time- > steps, less function evaluations, etc. > > Barry > > On Jul 27, 2010, at 8:22 AM, Xuan YU wrote: > >> >> On Jul 26, 2010, at 9:51 PM, Barry Smith wrote: >> >>> >>> 1) The function evaluations are taking a lot of time; the problem >>> is not with the Jacobian differencing it is that each function >>> evaluation needed by the differencing is slow >>> >> >> When I use cvode solve the same preoblem, function evaluations >> takes 41.42% of total time. And the total time consumption is much >> less than Petsc.( 5.657seconds VS 2 minutes 33.726 seconds) >> >> >> >> >>> 2) There are a huge number of SNESFunctionEvaluations, much much >>> more then I would expect, like 10 per nonlinear solve. >>> >> >> What is the possible reason for this case? >> >> >> >>> Barry >>> >>> >>> On Jul 26, 2010, at 5:50 PM, Xuan YU wrote: >>> >>>> >>>> On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: >>>> >>>>> >>>>> ./configure an optimized version of PETSc (that is with the ./ >>>>> configure flag of --with-debugging=0) and run with -log_summary >>>>> to get a summary of where it is spending the time. This will >>>>> give you a better idea of why it is taking so long. >>>> >>>> Does my log summary means the finite difference Jacobian >>>> approximation is not good? Should I write analytic jacobian >>>> function(that will be a huge amount of work)? >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>> >>>>> Barry >>>>> >>>>> On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I am using TS solving a nonlinear problem. I created an >>>>>> approximate data structure for Jacobian matrix to be used with >>>>>> matcoloring, my MatFDColoringView is like this: >>>>>> >>>>>> >>>>>> But the speed of code is too slow than what I expected. Only 10 >>>>>> time step costs 11seconds! >>>>>> >>>>>> What's wrong with my code? How can I speed up? >>>>>> >>>>>> Thanks! >>>>>> >>>>>> This is the ts_view result. >>>>>> >>>>>> TS Object: >>>>>> type: beuler >>>>>> maximum steps=100 >>>>>> maximum time=10 >>>>>> total number of nonlinear solver iterations=186 >>>>>> total number of linear solver iterations=423 >>>>>> SNES Object: >>>>>> type: ls >>>>>> line search variant: SNESLineSearchCubic >>>>>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>>>>> maximum iterations=50, maximum function evaluations=10000 >>>>>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>>>>> total number of linear solver iterations=1 >>>>>> total number of function evaluations=19 >>>>>> KSP Object: >>>>>> type: gmres >>>>>> 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 >>>>>> left preconditioning >>>>>> using PRECONDITIONED norm type for convergence test >>>>>> PC Object: >>>>>> type: ilu >>>>>> ILU: out-of-place factorization >>>>>> 0 levels of fill >>>>>> tolerance for zero pivot 1e-12 >>>>>> using diagonal shift to prevent zero pivot >>>>>> matrix ordering: natural >>>>>> factor fill ratio given 1, needed 1 >>>>>> Factored matrix follows: >>>>>> Matrix Object: >>>>>> type=seqaij, rows=1838, cols=1838 >>>>>> package used to perform factorization: petsc >>>>>> total: nonzeros=8464, allocated nonzeros=8464 >>>>>> total number of mallocs used during MatSetValues calls =0 >>>>>> not using I-node routines >>>>>> linear system matrix = precond matrix: >>>>>> Matrix Object: >>>>>> type=seqaij, rows=1838, cols=1838 >>>>>> total: nonzeros=8464, allocated nonzeros=9745 >>>>>> total number of mallocs used during MatSetValues calls =37 >>>>>> not using I-node routines >>>>>> >>>>>> >>>>>> Xuan YU >>>>>> xxy113 at psu.edu >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> Xuan YU >>>> xxy113 at psu.edu >>>> >>>> >>>> >>>> >>> >>> >> > > Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Tue Jul 27 10:26:09 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 27 Jul 2010 10:26:09 -0500 Subject: [petsc-users] about speed In-Reply-To: References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu> <2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov> <1D2A8E60-D943-475E-9E66-C5E76780D2FC@mcs.anl.gov> Message-ID: <1B625E97-D5B0-42B1-A5F8-3DA214AA8932@mcs.anl.gov> On Jul 27, 2010, at 10:11 AM, Xuan YU wrote: > > On Jul 27, 2010, at 10:47 AM, Barry Smith wrote: > >> >> What happens when you use sundials from PETSc. Use -ts_type sundials? Run also with -log_summary and compare the number of function evaluations, timesteps etc >> > > I did use sundials from PETSc. I used Sundials directly. I though Petsc may much faster than sundails, so I tried Petsc. But you can use sundials directly from PETSc and then you can make a comparison to see why sundials is much faster. Barry > > > > >> Without knowing more information about what sundials/cvode is doing there is no way to know why it is much faster. Could be larger time-steps, less function evaluations, etc. >> > > >> Barry >> >> On Jul 27, 2010, at 8:22 AM, Xuan YU wrote: >> >>> >>> On Jul 26, 2010, at 9:51 PM, Barry Smith wrote: >>> >>>> >>>> 1) The function evaluations are taking a lot of time; the problem is not with the Jacobian differencing it is that each function evaluation needed by the differencing is slow >>>> >>> >>> When I use cvode solve the same preoblem, function evaluations takes 41.42% of total time. And the total time consumption is much less than Petsc.( 5.657seconds VS 2 minutes 33.726 seconds) >>> >>> >>> >>> >>>> 2) There are a huge number of SNESFunctionEvaluations, much much more then I would expect, like 10 per nonlinear solve. >>>> >>> >>> What is the possible reason for this case? >>> >>> >>> >>>> Barry >>>> >>>> >>>> On Jul 26, 2010, at 5:50 PM, Xuan YU wrote: >>>> >>>>> >>>>> On Jul 26, 2010, at 3:53 PM, Barry Smith wrote: >>>>> >>>>>> >>>>>> ./configure an optimized version of PETSc (that is with the ./configure flag of --with-debugging=0) and run with -log_summary to get a summary of where it is spending the time. This will give you a better idea of why it is taking so long. >>>>> >>>>> Does my log summary means the finite difference Jacobian approximation is not good? Should I write analytic jacobian function(that will be a huge amount of work)? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> >>>>>> Barry >>>>>> >>>>>> On Jul 26, 2010, at 2:49 PM, Xuan YU wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I am using TS solving a nonlinear problem. I created an approximate data structure for Jacobian matrix to be used with matcoloring, my MatFDColoringView is like this: >>>>>>> >>>>>>> >>>>>>> But the speed of code is too slow than what I expected. Only 10 time step costs 11seconds! >>>>>>> >>>>>>> What's wrong with my code? How can I speed up? >>>>>>> >>>>>>> Thanks! >>>>>>> >>>>>>> This is the ts_view result. >>>>>>> >>>>>>> TS Object: >>>>>>> type: beuler >>>>>>> maximum steps=100 >>>>>>> maximum time=10 >>>>>>> total number of nonlinear solver iterations=186 >>>>>>> total number of linear solver iterations=423 >>>>>>> SNES Object: >>>>>>> type: ls >>>>>>> line search variant: SNESLineSearchCubic >>>>>>> alpha=0.0001, maxstep=1e+08, minlambda=1e-12 >>>>>>> maximum iterations=50, maximum function evaluations=10000 >>>>>>> tolerances: relative=1e-08, absolute=1e-50, solution=1e-08 >>>>>>> total number of linear solver iterations=1 >>>>>>> total number of function evaluations=19 >>>>>>> KSP Object: >>>>>>> type: gmres >>>>>>> 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 >>>>>>> left preconditioning >>>>>>> using PRECONDITIONED norm type for convergence test >>>>>>> PC Object: >>>>>>> type: ilu >>>>>>> ILU: out-of-place factorization >>>>>>> 0 levels of fill >>>>>>> tolerance for zero pivot 1e-12 >>>>>>> using diagonal shift to prevent zero pivot >>>>>>> matrix ordering: natural >>>>>>> factor fill ratio given 1, needed 1 >>>>>>> Factored matrix follows: >>>>>>> Matrix Object: >>>>>>> type=seqaij, rows=1838, cols=1838 >>>>>>> package used to perform factorization: petsc >>>>>>> total: nonzeros=8464, allocated nonzeros=8464 >>>>>>> total number of mallocs used during MatSetValues calls =0 >>>>>>> not using I-node routines >>>>>>> linear system matrix = precond matrix: >>>>>>> Matrix Object: >>>>>>> type=seqaij, rows=1838, cols=1838 >>>>>>> total: nonzeros=8464, allocated nonzeros=9745 >>>>>>> total number of mallocs used during MatSetValues calls =37 >>>>>>> not using I-node routines >>>>>>> >>>>>>> >>>>>>> Xuan YU >>>>>>> xxy113 at psu.edu >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> Xuan YU >>>>> xxy113 at psu.edu >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >> >> > > Xuan YU (??) > xxy113 at psu.edu > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chun.SUN at 3ds.com Tue Jul 27 14:34:32 2010 From: Chun.SUN at 3ds.com (SUN Chun) Date: Tue, 27 Jul 2010 15:34:32 -0400 Subject: [petsc-users] jacobi before ilu with shifting In-Reply-To: <1B625E97-D5B0-42B1-A5F8-3DA214AA8932@mcs.anl.gov> References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu><2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov><1D2A8E60-D943-475E-9E66-C5E76780D2FC@mcs.anl.gov> <1B625E97-D5B0-42B1-A5F8-3DA214AA8932@mcs.anl.gov> Message-ID: <2545DC7A42DF804AAAB2ADA5043D57DA9EC4D8@CORP-CLT-EXB01.ds> Hi Petsc dev, I couldn't figure out this preconditioner setting... I want to do BJACOBI + ILU on each block with shifting, but before ILU I want to apply a diagonal scaling to my LHS. What I've been trying to do is: -pc_type bjacobi -sub_pc_type composite -sub_pc_composite_type multiplicative -sub_pc_composite_pcs jacobi,ilu then I don't know where to add -pc_factor_shift_positive_definite I've tried adding "sub_", "sub_pc_composite_" prefixes to that but non worked. I wonder if the whole idea of using composite is wrong. Where should I scale it? Where should I specify shifting? Thanks, Chun This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systemes does not accept or assume any liability or responsibility for any use of or reliance on this email.For other languages, go to http://www.3ds.com/terms/email-disclaimer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Tue Jul 27 14:50:18 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 27 Jul 2010 14:50:18 -0500 Subject: [petsc-users] jacobi before ilu with shifting In-Reply-To: <2545DC7A42DF804AAAB2ADA5043D57DA9EC4D8@CORP-CLT-EXB01.ds> References: <3AD3A4CA-1201-4AB9-9AD7-224AFB90C317@psu.edu><2CD51C9A-3330-4875-8506-72E2B7A8F318@mcs.anl.gov><1D2A8E60-D943-475E-9E66-C5E76780D2FC@mcs.anl.gov> <1B625E97-D5B0-42B1-A5F8-3DA214AA8932@mcs.anl.gov> <2545DC7A42DF804AAAB2ADA5043D57DA9EC4D8@CORP-CLT-EXB01.ds> Message-ID: Run with -help | grep shift to see what the exact name of the prefix/option is Barry On Jul 27, 2010, at 2:34 PM, SUN Chun wrote: > Hi Petsc dev, > > I couldn't figure out this preconditioner setting... I want to do BJACOBI + ILU on each block with shifting, but before ILU I want to apply a diagonal scaling to my LHS. What I've been trying to do is: > > -pc_type bjacobi > -sub_pc_type composite > -sub_pc_composite_type multiplicative > -sub_pc_composite_pcs jacobi,ilu > > then I don't know where to add -pc_factor_shift_positive_definite I've tried adding "sub_", "sub_pc_composite_" prefixes to that but non worked. > > I wonder if the whole idea of using composite is wrong. Where should I scale it? Where should I specify shifting? > > Thanks, > Chun > This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. > If you are not one of the named recipients or have received this email in error, > (i) you should not read, disclose, or copy it, > (ii) please notify sender of your receipt by reply email and delete this email and all attachments, > (iii) Dassault Systemes does not accept or assume any liability or responsibility for any use of or reliance on this email. > For other languages, Click Here -------------- next part -------------- An HTML attachment was scrubbed... URL: From xxy113 at psu.edu Tue Jul 27 16:48:12 2010 From: xxy113 at psu.edu (Xuan YU) Date: Tue, 27 Jul 2010 17:48:12 -0400 Subject: [petsc-users] run sundials from Petsc Message-ID: Hi, I run config/configure.py --download-sundials=1 make all make test and then, when I compile the code, there is no error but pihm.o: In function `main': pihm.c:(.text+0x1148): undefined reference to `TSSundialsSetType' pihm.c:(.text+0x116d): undefined reference to `TSSundialsSetTolerance' collect2: ld returned 1 exit status Does this mean that I didn't install sundials correctly? Xuan YU xxy113 at psu.edu From jed at 59A2.org Tue Jul 27 16:59:13 2010 From: jed at 59A2.org (Jed Brown) Date: Tue, 27 Jul 2010 23:59:13 +0200 Subject: [petsc-users] run sundials from Petsc In-Reply-To: References: Message-ID: <87hbjkio26.fsf@59A2.org> On Tue, 27 Jul 2010 17:48:12 -0400, Xuan YU wrote: > Hi, > > I run config/configure.py --download-sundials=1 > make all > make test > > and then, when I compile the code, there is no error but > pihm.o: In function `main': > pihm.c:(.text+0x1148): undefined reference to `TSSundialsSetType' > pihm.c:(.text+0x116d): undefined reference to `TSSundialsSetTolerance' > collect2: ld returned 1 exit status > > Does this mean that I didn't install sundials correctly? What happens when you cd $PETSC_DIR/src/ts/examples/tutorials make ex4 ./ex4 -ts_type sundials How are you linking PETSc? I wonder if you're linking a different build than you just configured. Jed From xxy113 at psu.edu Tue Jul 27 17:14:46 2010 From: xxy113 at psu.edu (Xuan YU) Date: Tue, 27 Jul 2010 18:14:46 -0400 Subject: [petsc-users] run sundials from Petsc In-Reply-To: <87hbjkio26.fsf@59A2.org> References: <87hbjkio26.fsf@59A2.org> Message-ID: <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> On Jul 27, 2010, at 5:59 PM, Jed Brown wrote: > On Tue, 27 Jul 2010 17:48:12 -0400, Xuan YU wrote: >> Hi, >> >> I run config/configure.py --download-sundials=1 >> make all >> make test >> >> and then, when I compile the code, there is no error but >> pihm.o: In function `main': >> pihm.c:(.text+0x1148): undefined reference to `TSSundialsSetType' >> pihm.c:(.text+0x116d): undefined reference to >> `TSSundialsSetTolerance' >> collect2: ld returned 1 exit status >> >> Does this mean that I didn't install sundials correctly? > > What happens when you > > cd $PETSC_DIR/src/ts/examples/tutorials > make ex4 > ./ex4 -ts_type sundials > It works well. > How are you linking PETSc? I wonder if you're linking a different > build > than you just configured. > my "PETSC_DIR = " is the same to that of makefile of ex4 > Jed > Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jed at 59A2.org Tue Jul 27 17:22:38 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 00:22:38 +0200 Subject: [petsc-users] run sundials from Petsc In-Reply-To: <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> Message-ID: <876300imz5.fsf@59A2.org> On Tue, 27 Jul 2010 18:14:46 -0400, Xuan YU wrote: > > How are you linking PETSc? I wonder if you're linking a different > > build > > than you just configured. > > > > my "PETSC_DIR = " is the same to that of makefile of ex4 What about your PETSC_ARCH? Can you compare the link lines (what is actually output to the terminal) from that example and from yours? Jed From xxy113 at psu.edu Tue Jul 27 17:39:39 2010 From: xxy113 at psu.edu (Xuan YU) Date: Tue, 27 Jul 2010 18:39:39 -0400 Subject: [petsc-users] run sundials from Petsc In-Reply-To: <876300imz5.fsf@59A2.org> References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> Message-ID: On Jul 27, 2010, at 6:22 PM, Jed Brown wrote: > On Tue, 27 Jul 2010 18:14:46 -0400, Xuan YU wrote: >>> How are you linking PETSc? I wonder if you're linking a different >>> build >>> than you just configured. >>> >> >> my "PETSC_DIR = " is the same to that of makefile of ex4 > > What about your PETSC_ARCH? PETSC_ARCH =linux-gnu-c-opt > Can you compare the link lines (what is > actually output to the terminal) from that example and from yours? > example: /gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-debug/bin/ mpicc -o ex4.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -g3 -I/ gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-debug/include -I/gpfs/ home/xxy113/soft/petsc-3.1-p2/include -I/gpfs/home/xxy113/soft/ petsc-3.1-p2/linux-gnu-c-debug/include -D__INSDIR__=src/ts/examples/ tutorials/ ex4.c my: gcc -o f.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -O -I/ gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/include -I/gpfs/ home/xxy113/soft/petsc-3.1-p2/include -I/gpfs/home/xxy113/soft/ petsc-3.1-p2/include/mpiuni -D__INSDIR__=/work/petsc/ f.c > Jed > Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From xy2102 at columbia.edu Tue Jul 27 19:36:11 2010 From: xy2102 at columbia.edu ((Rebecca) Xuefei YUAN) Date: Tue, 27 Jul 2010 20:36:11 -0400 Subject: [petsc-users] Could DMComposite handle two vectors with different grid sizes. Message-ID: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> Dear all, If I have two different vectors (with different dof, stencil width and grid sizes), could I use DMComposite to handle this? The following is the piece of code for assemble this DMComposite in DMMG. tempparameters.mxfield = 5; tempparameters.myfield = 5; tempparameters.mxgrid = tempparameters.mxfield+1; tempparameters.mygrid = tempparameters.myfield+1; ierr = DMMGCreate(comm, tempparameters.numberOfLevels, &appCtx, &dmmg);CHKERRQ(ierr); ierr = DMCompositeCreate(comm,&packer);CHKERRQ(ierr); ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxfield, tempparameters.myfield, PETSC_DECIDE, PETSC_DECIDE, 4, 3, PETSC_NULL, PETSC_NULL, &da_fff);CHKERRQ(ierr); ierr = DASetFieldName(da_fff, 0, "phi");CHKERRQ(ierr); ierr = DASetFieldName(da_fff, 1, "vz");CHKERRQ(ierr); ierr = DASetFieldName(da_fff, 2, "psi");CHKERRQ(ierr); ierr = DASetFieldName(da_fff, 3, "bz");CHKERRQ(ierr); ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxgrid, tempparameters.mygrid, PETSC_DECIDE, PETSC_DECIDE, 1, tempparameters.gridStencilWidth, PETSC_NULL, PETSC_NULL, &da_ggg);CHKERRQ(ierr); ierr = DASetFieldName(da_ggg, 0, "disp");CHKERRQ(ierr); ierr = DMCompositeAddDM(packer,(DM)da_fff);CHKERRQ(ierr); ierr = DMCompositeAddDM(packer,(DM)da_ggg);CHKERRQ(ierr); ierr = DMCompositeAddArray(packer,0,1);CHKERRQ(ierr); ierr = DMMGSetDM(dmmg, (DM)packer);CHKERRQ(ierr); ierr = DADestroy(da_fff);CHKERRQ(ierr); ierr = DADestroy(da_ggg);CHKERRQ(ierr); ......................................................... ierr = DMCompositeDestroy(packer);CHKERRQ(ierr); ierr = DMMGDestroy(dmmg);CHKERRQ(ierr); I understand that for numberOfLevels(nl)>1, the grid size difference is no longer 1, but 3(nl=2), 5(nl=3), could I use DMComposite to handle such a case successfully? I was not able to get examples for such a case, is there any? Thanks a lot! -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 From balay at mcs.anl.gov Tue Jul 27 19:40:56 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Tue, 27 Jul 2010 19:40:56 -0500 (CDT) Subject: [petsc-users] run sundials from Petsc In-Reply-To: References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> Message-ID: You list one compile with linux-gnu-c-debug - and the other with linux-gnu-c-opt. Looks like you rebuilt linux-gnu-c-debug with sundials - but not linux-gnu-c-opt build. Satish On Tue, 27 Jul 2010, Xuan YU wrote: > > On Jul 27, 2010, at 6:22 PM, Jed Brown wrote: > > > On Tue, 27 Jul 2010 18:14:46 -0400, Xuan YU wrote: > > > > How are you linking PETSc? I wonder if you're linking a different > > > > build > > > > than you just configured. > > > > > > > > > > my "PETSC_DIR = " is the same to that of makefile of ex4 > > > > What about your PETSC_ARCH? > > PETSC_ARCH =linux-gnu-c-opt > > > > Can you compare the link lines (what is > > actually output to the terminal) from that example and from yours? > > > > example: /gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-debug/bin/mpicc -o > ex4.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -g3 > -I/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-debug/include > -I/gpfs/home/xxy113/soft/petsc-3.1-p2/include > -I/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-debug/include > -D__INSDIR__=src/ts/examples/tutorials/ ex4.c > > my: gcc -o f.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -O > -I/gpfs/home/xxy113/soft/petsc-3.1-p2/linux-gnu-c-opt/include > -I/gpfs/home/xxy113/soft/petsc-3.1-p2/include > -I/gpfs/home/xxy113/soft/petsc-3.1-p2/include/mpiuni -D__INSDIR__=/work/petsc/ > f.c > > > > > Jed > > > > Xuan YU (??) > xxy113 at psu.edu > > > > From bsmith at mcs.anl.gov Tue Jul 27 20:29:31 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 27 Jul 2010 20:29:31 -0500 Subject: [petsc-users] Could DMComposite handle two vectors with different grid sizes. In-Reply-To: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> References: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> Message-ID: What you are doing below looks ok. This builds the DM and DMMG. See tutorials/multiphysics/mp1.c for an example that uses SNES to solve a nonlinear equation on the grids. Barry On Jul 27, 2010, at 7:36 PM, (Rebecca) Xuefei YUAN wrote: > Dear all, > > If I have two different vectors (with different dof, stencil width and grid sizes), could I use DMComposite to handle this? > > The following is the piece of code for assemble this DMComposite in DMMG. > > tempparameters.mxfield = 5; > tempparameters.myfield = 5; > > tempparameters.mxgrid = tempparameters.mxfield+1; > tempparameters.mygrid = tempparameters.myfield+1; > > ierr = DMMGCreate(comm, tempparameters.numberOfLevels, &appCtx, &dmmg);CHKERRQ(ierr); > > ierr = DMCompositeCreate(comm,&packer);CHKERRQ(ierr); > > ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxfield, tempparameters.myfield, PETSC_DECIDE, PETSC_DECIDE, 4, 3, PETSC_NULL, PETSC_NULL, &da_fff);CHKERRQ(ierr); > ierr = DASetFieldName(da_fff, 0, "phi");CHKERRQ(ierr); > ierr = DASetFieldName(da_fff, 1, "vz");CHKERRQ(ierr); > ierr = DASetFieldName(da_fff, 2, "psi");CHKERRQ(ierr); > ierr = DASetFieldName(da_fff, 3, "bz");CHKERRQ(ierr); > ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxgrid, tempparameters.mygrid, PETSC_DECIDE, PETSC_DECIDE, 1, tempparameters.gridStencilWidth, PETSC_NULL, PETSC_NULL, &da_ggg);CHKERRQ(ierr); > ierr = DASetFieldName(da_ggg, 0, "disp");CHKERRQ(ierr); > > ierr = DMCompositeAddDM(packer,(DM)da_fff);CHKERRQ(ierr); > ierr = DMCompositeAddDM(packer,(DM)da_ggg);CHKERRQ(ierr); > ierr = DMCompositeAddArray(packer,0,1);CHKERRQ(ierr); > > ierr = DMMGSetDM(dmmg, (DM)packer);CHKERRQ(ierr); > > ierr = DADestroy(da_fff);CHKERRQ(ierr); > ierr = DADestroy(da_ggg);CHKERRQ(ierr); > > ......................................................... > > ierr = DMCompositeDestroy(packer);CHKERRQ(ierr); > ierr = DMMGDestroy(dmmg);CHKERRQ(ierr); > > > I understand that for numberOfLevels(nl)>1, the grid size difference is no longer 1, but 3(nl=2), 5(nl=3), could I use DMComposite to handle such a case successfully? > > I was not able to get examples for such a case, is there any? > > Thanks a lot! > > > > -- > (Rebecca) Xuefei YUAN > Department of Applied Physics and Applied Mathematics > Columbia University > Tel:917-399-8032 > www.columbia.edu/~xy2102 > From xy2102 at columbia.edu Tue Jul 27 21:46:09 2010 From: xy2102 at columbia.edu ((Rebecca) Xuefei YUAN) Date: Tue, 27 Jul 2010 22:46:09 -0400 Subject: [petsc-users] Could DMComposite handle two vectors with different grid sizes. In-Reply-To: References: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> Message-ID: <20100727224609.7kun6b1zc4s0w480@cubmail.cc.columbia.edu> Dear Barry, Thanks a lot for your reply. Cheers, Rebecca Quoting Barry Smith : > > > What you are doing below looks ok. This builds the DM and DMMG. > See tutorials/multiphysics/mp1.c for an example that uses SNES to > solve a nonlinear equation on the grids. > > Barry > > > > On Jul 27, 2010, at 7:36 PM, (Rebecca) Xuefei YUAN wrote: > >> Dear all, >> >> If I have two different vectors (with different dof, stencil width >> and grid sizes), could I use DMComposite to handle this? >> >> The following is the piece of code for assemble this DMComposite in DMMG. >> >> tempparameters.mxfield = 5; >> tempparameters.myfield = 5; >> >> tempparameters.mxgrid = tempparameters.mxfield+1; >> tempparameters.mygrid = tempparameters.myfield+1; >> >> ierr = DMMGCreate(comm, tempparameters.numberOfLevels, &appCtx, >> &dmmg);CHKERRQ(ierr); >> >> ierr = DMCompositeCreate(comm,&packer);CHKERRQ(ierr); >> >> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, >> tempparameters.mxfield, tempparameters.myfield, PETSC_DECIDE, >> PETSC_DECIDE, 4, 3, PETSC_NULL, PETSC_NULL, &da_fff);CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 0, "phi");CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 1, "vz");CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 2, "psi");CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 3, "bz");CHKERRQ(ierr); >> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, >> tempparameters.mxgrid, tempparameters.mygrid, PETSC_DECIDE, >> PETSC_DECIDE, 1, tempparameters.gridStencilWidth, PETSC_NULL, >> PETSC_NULL, &da_ggg);CHKERRQ(ierr); >> ierr = DASetFieldName(da_ggg, 0, "disp");CHKERRQ(ierr); >> >> ierr = DMCompositeAddDM(packer,(DM)da_fff);CHKERRQ(ierr); >> ierr = DMCompositeAddDM(packer,(DM)da_ggg);CHKERRQ(ierr); >> ierr = DMCompositeAddArray(packer,0,1);CHKERRQ(ierr); >> >> ierr = DMMGSetDM(dmmg, (DM)packer);CHKERRQ(ierr); >> >> ierr = DADestroy(da_fff);CHKERRQ(ierr); >> ierr = DADestroy(da_ggg);CHKERRQ(ierr); >> >> ......................................................... >> >> ierr = DMCompositeDestroy(packer);CHKERRQ(ierr); >> ierr = DMMGDestroy(dmmg);CHKERRQ(ierr); >> >> >> I understand that for numberOfLevels(nl)>1, the grid size >> difference is no longer 1, but 3(nl=2), 5(nl=3), could I use >> DMComposite to handle such a case successfully? >> >> I was not able to get examples for such a case, is there any? >> >> Thanks a lot! >> >> >> >> -- >> (Rebecca) Xuefei YUAN >> Department of Applied Physics and Applied Mathematics >> Columbia University >> Tel:917-399-8032 >> www.columbia.edu/~xy2102 >> > > > -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 From xy2102 at columbia.edu Tue Jul 27 22:11:09 2010 From: xy2102 at columbia.edu ((Rebecca) Xuefei YUAN) Date: Tue, 27 Jul 2010 23:11:09 -0400 Subject: [petsc-users] Could DMComposite handle two vectors with different grid sizes. In-Reply-To: References: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> Message-ID: <20100727231109.9m83g5wxcscos0gc@cubmail.cc.columbia.edu> Dear Barry, I went over the mp1.c as the multi physics example. However, what I concerned is not addressed in that example. My concern is that will it be fine if the grid size for the different das are different. The different grid sizes of da_A and da_B are coming from the fact that they share the same physical domain, but the computational domain are slightly different due to that problem A has the Neumann boundary condition (giving that the computational domain is half spacing extended from the physical domain, each point is expressed at the center of the cell) and problem B has the Dirichlet boundary condition (giving that the computational domain is the same as the physical domain, each point is expressed at the node of the cell.) Thus, problem A ALWAYS needs 1 more grid in each direction than problem B at each level. If the coarsest grid has the difference 1(mA - mB = 1) in each direction, according to the algorithm for multigrid, the next finer level has the difference of ((2*mA-1) - (2*mB-1) = 2(mA-mB) = 2) in each direction, the next level has the difference of ((2*(2*mA-1)-1) - (2*(2*mB-1)-1) = 4*(mA-mB) = 4) in each direction. Because there is only half spacing being extended from the physical domain as the computational domain for problem A, the abandonNumber of grid is 1-1=0 for nl=1, 2-1=1 for nl=2 and 4-1=3 for nl=3. To keep those extra points in the residual function and Jacobian, I applied the Neumann boundary condition for those points (mirror with the interior points). Will this procedure be fine for such a multi physics problem? Thanks very much! Rebecca Quoting Barry Smith : > > > What you are doing below looks ok. This builds the DM and DMMG. > See tutorials/multiphysics/mp1.c for an example that uses SNES to > solve a nonlinear equation on the grids. > > Barry > > > > On Jul 27, 2010, at 7:36 PM, (Rebecca) Xuefei YUAN wrote: > >> Dear all, >> >> If I have two different vectors (with different dof, stencil width >> and grid sizes), could I use DMComposite to handle this? >> >> The following is the piece of code for assemble this DMComposite in DMMG. >> >> tempparameters.mxfield = 5; >> tempparameters.myfield = 5; >> >> tempparameters.mxgrid = tempparameters.mxfield+1; >> tempparameters.mygrid = tempparameters.myfield+1; >> >> ierr = DMMGCreate(comm, tempparameters.numberOfLevels, &appCtx, >> &dmmg);CHKERRQ(ierr); >> >> ierr = DMCompositeCreate(comm,&packer);CHKERRQ(ierr); >> >> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, >> tempparameters.mxfield, tempparameters.myfield, PETSC_DECIDE, >> PETSC_DECIDE, 4, 3, PETSC_NULL, PETSC_NULL, &da_fff);CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 0, "phi");CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 1, "vz");CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 2, "psi");CHKERRQ(ierr); >> ierr = DASetFieldName(da_fff, 3, "bz");CHKERRQ(ierr); >> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, >> tempparameters.mxgrid, tempparameters.mygrid, PETSC_DECIDE, >> PETSC_DECIDE, 1, tempparameters.gridStencilWidth, PETSC_NULL, >> PETSC_NULL, &da_ggg);CHKERRQ(ierr); >> ierr = DASetFieldName(da_ggg, 0, "disp");CHKERRQ(ierr); >> >> ierr = DMCompositeAddDM(packer,(DM)da_fff);CHKERRQ(ierr); >> ierr = DMCompositeAddDM(packer,(DM)da_ggg);CHKERRQ(ierr); >> ierr = DMCompositeAddArray(packer,0,1);CHKERRQ(ierr); >> >> ierr = DMMGSetDM(dmmg, (DM)packer);CHKERRQ(ierr); >> >> ierr = DADestroy(da_fff);CHKERRQ(ierr); >> ierr = DADestroy(da_ggg);CHKERRQ(ierr); >> >> ......................................................... >> >> ierr = DMCompositeDestroy(packer);CHKERRQ(ierr); >> ierr = DMMGDestroy(dmmg);CHKERRQ(ierr); >> >> >> I understand that for numberOfLevels(nl)>1, the grid size >> difference is no longer 1, but 3(nl=2), 5(nl=3), could I use >> DMComposite to handle such a case successfully? >> >> I was not able to get examples for such a case, is there any? >> >> Thanks a lot! >> >> >> >> -- >> (Rebecca) Xuefei YUAN >> Department of Applied Physics and Applied Mathematics >> Columbia University >> Tel:917-399-8032 >> www.columbia.edu/~xy2102 >> > > > -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 From bsmith at mcs.anl.gov Tue Jul 27 22:14:45 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 27 Jul 2010 22:14:45 -0500 Subject: [petsc-users] Could DMComposite handle two vectors with different grid sizes. In-Reply-To: <20100727231109.9m83g5wxcscos0gc@cubmail.cc.columbia.edu> References: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> <20100727231109.9m83g5wxcscos0gc@cubmail.cc.columbia.edu> Message-ID: <16059391-3013-46FA-99F0-D9667FEE1010@mcs.anl.gov> DMComposite doesn't say that the different DAs have to have the same dimensions, they can have different sizes, number of grid points etc Barry On Jul 27, 2010, at 10:11 PM, (Rebecca) Xuefei YUAN wrote: > Dear Barry, > > I went over the mp1.c as the multi physics example. However, what I concerned is not addressed in that example. My concern is that will it be fine if the grid size for the different das are different. > > The different grid sizes of da_A and da_B are coming from the fact that they share the same physical domain, but the computational domain are slightly different due to that problem A has the Neumann boundary condition (giving that the computational domain is half spacing extended from the physical domain, each point is expressed at the center of the cell) and problem B has the Dirichlet boundary condition (giving that the computational domain is the same as the physical domain, each point is expressed at the node of the cell.) Thus, problem A ALWAYS needs 1 more grid in each direction than problem B at each level. > > If the coarsest grid has the difference 1(mA - mB = 1) in each direction, according to the algorithm for multigrid, the next finer level has the difference of ((2*mA-1) - (2*mB-1) = 2(mA-mB) = 2) in each direction, the next level has the difference of ((2*(2*mA-1)-1) - (2*(2*mB-1)-1) = 4*(mA-mB) = 4) in each direction. Because there is only half spacing being extended from the physical domain as the computational domain for problem A, the abandonNumber of grid is 1-1=0 for nl=1, 2-1=1 for nl=2 and 4-1=3 for nl=3. > > To keep those extra points in the residual function and Jacobian, I applied the Neumann boundary condition for those points (mirror with the interior points). > > Will this procedure be fine for such a multi physics problem? > > Thanks very much! > > Rebecca > > > > > Quoting Barry Smith : > >> >> >> What you are doing below looks ok. This builds the DM and DMMG. See tutorials/multiphysics/mp1.c for an example that uses SNES to solve a nonlinear equation on the grids. >> >> Barry >> >> >> >> On Jul 27, 2010, at 7:36 PM, (Rebecca) Xuefei YUAN wrote: >> >>> Dear all, >>> >>> If I have two different vectors (with different dof, stencil width and grid sizes), could I use DMComposite to handle this? >>> >>> The following is the piece of code for assemble this DMComposite in DMMG. >>> >>> tempparameters.mxfield = 5; >>> tempparameters.myfield = 5; >>> >>> tempparameters.mxgrid = tempparameters.mxfield+1; >>> tempparameters.mygrid = tempparameters.myfield+1; >>> >>> ierr = DMMGCreate(comm, tempparameters.numberOfLevels, &appCtx, &dmmg);CHKERRQ(ierr); >>> >>> ierr = DMCompositeCreate(comm,&packer);CHKERRQ(ierr); >>> >>> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxfield, tempparameters.myfield, PETSC_DECIDE, PETSC_DECIDE, 4, 3, PETSC_NULL, PETSC_NULL, &da_fff);CHKERRQ(ierr); >>> ierr = DASetFieldName(da_fff, 0, "phi");CHKERRQ(ierr); >>> ierr = DASetFieldName(da_fff, 1, "vz");CHKERRQ(ierr); >>> ierr = DASetFieldName(da_fff, 2, "psi");CHKERRQ(ierr); >>> ierr = DASetFieldName(da_fff, 3, "bz");CHKERRQ(ierr); >>> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxgrid, tempparameters.mygrid, PETSC_DECIDE, PETSC_DECIDE, 1, tempparameters.gridStencilWidth, PETSC_NULL, PETSC_NULL, &da_ggg);CHKERRQ(ierr); >>> ierr = DASetFieldName(da_ggg, 0, "disp");CHKERRQ(ierr); >>> >>> ierr = DMCompositeAddDM(packer,(DM)da_fff);CHKERRQ(ierr); >>> ierr = DMCompositeAddDM(packer,(DM)da_ggg);CHKERRQ(ierr); >>> ierr = DMCompositeAddArray(packer,0,1);CHKERRQ(ierr); >>> >>> ierr = DMMGSetDM(dmmg, (DM)packer);CHKERRQ(ierr); >>> >>> ierr = DADestroy(da_fff);CHKERRQ(ierr); >>> ierr = DADestroy(da_ggg);CHKERRQ(ierr); >>> >>> ......................................................... >>> >>> ierr = DMCompositeDestroy(packer);CHKERRQ(ierr); >>> ierr = DMMGDestroy(dmmg);CHKERRQ(ierr); >>> >>> >>> I understand that for numberOfLevels(nl)>1, the grid size difference is no longer 1, but 3(nl=2), 5(nl=3), could I use DMComposite to handle such a case successfully? >>> >>> I was not able to get examples for such a case, is there any? >>> >>> Thanks a lot! >>> >>> >>> >>> -- >>> (Rebecca) Xuefei YUAN >>> Department of Applied Physics and Applied Mathematics >>> Columbia University >>> Tel:917-399-8032 >>> www.columbia.edu/~xy2102 >>> >> >> >> > > > > -- > (Rebecca) Xuefei YUAN > Department of Applied Physics and Applied Mathematics > Columbia University > Tel:917-399-8032 > www.columbia.edu/~xy2102 > From xy2102 at columbia.edu Tue Jul 27 22:55:06 2010 From: xy2102 at columbia.edu ((Rebecca) Xuefei YUAN) Date: Tue, 27 Jul 2010 23:55:06 -0400 Subject: [petsc-users] Could DMComposite handle two vectors with different grid sizes. In-Reply-To: <16059391-3013-46FA-99F0-D9667FEE1010@mcs.anl.gov> References: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> <20100727231109.9m83g5wxcscos0gc@cubmail.cc.columbia.edu> <16059391-3013-46FA-99F0-D9667FEE1010@mcs.anl.gov> Message-ID: <20100727235506.mm0ke8s2tcc8s0w0@cubmail.cc.columbia.edu> Dear Barry, Yes, you are right. I looked up into the examples and found this one http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/snes/examples/tutorials/ex31.c.html However, I was not able to run this one with the options '-snes_mf', is there any problem on that? Thanks a lot! Rebecca Quoting Barry Smith : > > DMComposite doesn't say that the different DAs have to have the > same dimensions, they can have different sizes, number of grid > points etc > > Barry > > On Jul 27, 2010, at 10:11 PM, (Rebecca) Xuefei YUAN wrote: > >> Dear Barry, >> >> I went over the mp1.c as the multi physics example. However, what I >> concerned is not addressed in that example. My concern is that >> will it be fine if the grid size for the different das are >> different. >> >> The different grid sizes of da_A and da_B are coming from the fact >> that they share the same physical domain, but the computational >> domain are slightly different due to that problem A has the Neumann >> boundary condition (giving that the computational domain is half >> spacing extended from the physical domain, each point is expressed >> at the center of the cell) and problem B has the Dirichlet boundary >> condition (giving that the computational domain is the same as the >> physical domain, each point is expressed at the node of the cell.) >> Thus, problem A ALWAYS needs 1 more grid in each direction than >> problem B at each level. >> >> If the coarsest grid has the difference 1(mA - mB = 1) in each >> direction, according to the algorithm for multigrid, the next finer >> level has the difference of ((2*mA-1) - (2*mB-1) = 2(mA-mB) = 2) >> in each direction, the next level has the difference of >> ((2*(2*mA-1)-1) - (2*(2*mB-1)-1) = 4*(mA-mB) = 4) in each >> direction. Because there is only half spacing being extended from >> the physical domain as the computational domain for problem A, the >> abandonNumber of grid is 1-1=0 for nl=1, 2-1=1 for nl=2 and 4-1=3 >> for nl=3. >> >> To keep those extra points in the residual function and Jacobian, I >> applied the Neumann boundary condition for those points (mirror >> with the interior points). >> >> Will this procedure be fine for such a multi physics problem? >> >> Thanks very much! >> >> Rebecca >> >> >> >> >> Quoting Barry Smith : >> >>> >>> >>> What you are doing below looks ok. This builds the DM and DMMG. >>> See tutorials/multiphysics/mp1.c for an example that uses SNES >>> to solve a nonlinear equation on the grids. >>> >>> Barry >>> >>> >>> >>> On Jul 27, 2010, at 7:36 PM, (Rebecca) Xuefei YUAN wrote: >>> >>>> Dear all, >>>> >>>> If I have two different vectors (with different dof, stencil >>>> width and grid sizes), could I use DMComposite to handle this? >>>> >>>> The following is the piece of code for assemble this DMComposite in DMMG. >>>> >>>> tempparameters.mxfield = 5; >>>> tempparameters.myfield = 5; >>>> >>>> tempparameters.mxgrid = tempparameters.mxfield+1; >>>> tempparameters.mygrid = tempparameters.myfield+1; >>>> >>>> ierr = DMMGCreate(comm, tempparameters.numberOfLevels, &appCtx, >>>> &dmmg);CHKERRQ(ierr); >>>> >>>> ierr = DMCompositeCreate(comm,&packer);CHKERRQ(ierr); >>>> >>>> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, >>>> tempparameters.mxfield, tempparameters.myfield, PETSC_DECIDE, >>>> PETSC_DECIDE, 4, 3, PETSC_NULL, PETSC_NULL, &da_fff);CHKERRQ(ierr); >>>> ierr = DASetFieldName(da_fff, 0, "phi");CHKERRQ(ierr); >>>> ierr = DASetFieldName(da_fff, 1, "vz");CHKERRQ(ierr); >>>> ierr = DASetFieldName(da_fff, 2, "psi");CHKERRQ(ierr); >>>> ierr = DASetFieldName(da_fff, 3, "bz");CHKERRQ(ierr); >>>> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, >>>> tempparameters.mxgrid, tempparameters.mygrid, PETSC_DECIDE, >>>> PETSC_DECIDE, 1, tempparameters.gridStencilWidth, PETSC_NULL, >>>> PETSC_NULL, &da_ggg);CHKERRQ(ierr); >>>> ierr = DASetFieldName(da_ggg, 0, "disp");CHKERRQ(ierr); >>>> >>>> ierr = DMCompositeAddDM(packer,(DM)da_fff);CHKERRQ(ierr); >>>> ierr = DMCompositeAddDM(packer,(DM)da_ggg);CHKERRQ(ierr); >>>> ierr = DMCompositeAddArray(packer,0,1);CHKERRQ(ierr); >>>> >>>> ierr = DMMGSetDM(dmmg, (DM)packer);CHKERRQ(ierr); >>>> >>>> ierr = DADestroy(da_fff);CHKERRQ(ierr); >>>> ierr = DADestroy(da_ggg);CHKERRQ(ierr); >>>> >>>> ......................................................... >>>> >>>> ierr = DMCompositeDestroy(packer);CHKERRQ(ierr); >>>> ierr = DMMGDestroy(dmmg);CHKERRQ(ierr); >>>> >>>> >>>> I understand that for numberOfLevels(nl)>1, the grid size >>>> difference is no longer 1, but 3(nl=2), 5(nl=3), could I use >>>> DMComposite to handle such a case successfully? >>>> >>>> I was not able to get examples for such a case, is there any? >>>> >>>> Thanks a lot! >>>> >>>> >>>> >>>> -- >>>> (Rebecca) Xuefei YUAN >>>> Department of Applied Physics and Applied Mathematics >>>> Columbia University >>>> Tel:917-399-8032 >>>> www.columbia.edu/~xy2102 >>>> >>> >>> >>> >> >> >> >> -- >> (Rebecca) Xuefei YUAN >> Department of Applied Physics and Applied Mathematics >> Columbia University >> Tel:917-399-8032 >> www.columbia.edu/~xy2102 >> > > > -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 From bsmith at mcs.anl.gov Tue Jul 27 23:19:04 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Tue, 27 Jul 2010 23:19:04 -0500 Subject: [petsc-users] Could DMComposite handle two vectors with different grid sizes. In-Reply-To: <20100727235506.mm0ke8s2tcc8s0w0@cubmail.cc.columbia.edu> References: <20100727203611.ynjipf5i884o40co@cubmail.cc.columbia.edu> <20100727231109.9m83g5wxcscos0gc@cubmail.cc.columbia.edu> <16059391-3013-46FA-99F0-D9667FEE1010@mcs.anl.gov> <20100727235506.mm0ke8s2tcc8s0w0@cubmail.cc.columbia.edu> Message-ID: That example could be broken. Please, please never never never say vague things like "I was not able to run this one with the options '-snes_mf'," there is zero chance that we can answer such a question. What, specifically goes wrong, cut and paste the entire error message. We have no magic way of know what of the six billion possible things that could go wrong, did go wrong when you ran it, we cannot see your screen. Barry On Jul 27, 2010, at 10:55 PM, (Rebecca) Xuefei YUAN wrote: > Dear Barry, > > Yes, you are right. I looked up into the examples and found this one > > http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/snes/examples/tutorials/ex31.c.html > > However, I was not able to run this one with the options '-snes_mf', is there any problem on that? > > Thanks a lot! > > Rebecca > Quoting Barry Smith : > >> >> DMComposite doesn't say that the different DAs have to have the same dimensions, they can have different sizes, number of grid points etc >> >> Barry >> >> On Jul 27, 2010, at 10:11 PM, (Rebecca) Xuefei YUAN wrote: >> >>> Dear Barry, >>> >>> I went over the mp1.c as the multi physics example. However, what I concerned is not addressed in that example. My concern is that will it be fine if the grid size for the different das are different. >>> >>> The different grid sizes of da_A and da_B are coming from the fact that they share the same physical domain, but the computational domain are slightly different due to that problem A has the Neumann boundary condition (giving that the computational domain is half spacing extended from the physical domain, each point is expressed at the center of the cell) and problem B has the Dirichlet boundary condition (giving that the computational domain is the same as the physical domain, each point is expressed at the node of the cell.) Thus, problem A ALWAYS needs 1 more grid in each direction than problem B at each level. >>> >>> If the coarsest grid has the difference 1(mA - mB = 1) in each direction, according to the algorithm for multigrid, the next finer level has the difference of ((2*mA-1) - (2*mB-1) = 2(mA-mB) = 2) in each direction, the next level has the difference of ((2*(2*mA-1)-1) - (2*(2*mB-1)-1) = 4*(mA-mB) = 4) in each direction. Because there is only half spacing being extended from the physical domain as the computational domain for problem A, the abandonNumber of grid is 1-1=0 for nl=1, 2-1=1 for nl=2 and 4-1=3 for nl=3. >>> >>> To keep those extra points in the residual function and Jacobian, I applied the Neumann boundary condition for those points (mirror with the interior points). >>> >>> Will this procedure be fine for such a multi physics problem? >>> >>> Thanks very much! >>> >>> Rebecca >>> >>> >>> >>> >>> Quoting Barry Smith : >>> >>>> >>>> >>>> What you are doing below looks ok. This builds the DM and DMMG. See tutorials/multiphysics/mp1.c for an example that uses SNES to solve a nonlinear equation on the grids. >>>> >>>> Barry >>>> >>>> >>>> >>>> On Jul 27, 2010, at 7:36 PM, (Rebecca) Xuefei YUAN wrote: >>>> >>>>> Dear all, >>>>> >>>>> If I have two different vectors (with different dof, stencil width and grid sizes), could I use DMComposite to handle this? >>>>> >>>>> The following is the piece of code for assemble this DMComposite in DMMG. >>>>> >>>>> tempparameters.mxfield = 5; >>>>> tempparameters.myfield = 5; >>>>> >>>>> tempparameters.mxgrid = tempparameters.mxfield+1; >>>>> tempparameters.mygrid = tempparameters.myfield+1; >>>>> >>>>> ierr = DMMGCreate(comm, tempparameters.numberOfLevels, &appCtx, &dmmg);CHKERRQ(ierr); >>>>> >>>>> ierr = DMCompositeCreate(comm,&packer);CHKERRQ(ierr); >>>>> >>>>> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxfield, tempparameters.myfield, PETSC_DECIDE, PETSC_DECIDE, 4, 3, PETSC_NULL, PETSC_NULL, &da_fff);CHKERRQ(ierr); >>>>> ierr = DASetFieldName(da_fff, 0, "phi");CHKERRQ(ierr); >>>>> ierr = DASetFieldName(da_fff, 1, "vz");CHKERRQ(ierr); >>>>> ierr = DASetFieldName(da_fff, 2, "psi");CHKERRQ(ierr); >>>>> ierr = DASetFieldName(da_fff, 3, "bz");CHKERRQ(ierr); >>>>> ierr = DACreate2d(comm,DA_NONPERIODIC,DA_STENCIL_BOX, tempparameters.mxgrid, tempparameters.mygrid, PETSC_DECIDE, PETSC_DECIDE, 1, tempparameters.gridStencilWidth, PETSC_NULL, PETSC_NULL, &da_ggg);CHKERRQ(ierr); >>>>> ierr = DASetFieldName(da_ggg, 0, "disp");CHKERRQ(ierr); >>>>> >>>>> ierr = DMCompositeAddDM(packer,(DM)da_fff);CHKERRQ(ierr); >>>>> ierr = DMCompositeAddDM(packer,(DM)da_ggg);CHKERRQ(ierr); >>>>> ierr = DMCompositeAddArray(packer,0,1);CHKERRQ(ierr); >>>>> >>>>> ierr = DMMGSetDM(dmmg, (DM)packer);CHKERRQ(ierr); >>>>> >>>>> ierr = DADestroy(da_fff);CHKERRQ(ierr); >>>>> ierr = DADestroy(da_ggg);CHKERRQ(ierr); >>>>> >>>>> ......................................................... >>>>> >>>>> ierr = DMCompositeDestroy(packer);CHKERRQ(ierr); >>>>> ierr = DMMGDestroy(dmmg);CHKERRQ(ierr); >>>>> >>>>> >>>>> I understand that for numberOfLevels(nl)>1, the grid size difference is no longer 1, but 3(nl=2), 5(nl=3), could I use DMComposite to handle such a case successfully? >>>>> >>>>> I was not able to get examples for such a case, is there any? >>>>> >>>>> Thanks a lot! >>>>> >>>>> >>>>> >>>>> -- >>>>> (Rebecca) Xuefei YUAN >>>>> Department of Applied Physics and Applied Mathematics >>>>> Columbia University >>>>> Tel:917-399-8032 >>>>> www.columbia.edu/~xy2102 >>>>> >>>> >>>> >>>> >>> >>> >>> >>> -- >>> (Rebecca) Xuefei YUAN >>> Department of Applied Physics and Applied Mathematics >>> Columbia University >>> Tel:917-399-8032 >>> www.columbia.edu/~xy2102 >>> >> >> >> > > > > -- > (Rebecca) Xuefei YUAN > Department of Applied Physics and Applied Mathematics > Columbia University > Tel:917-399-8032 > www.columbia.edu/~xy2102 > From darach at tchpc.tcd.ie Wed Jul 28 07:08:59 2010 From: darach at tchpc.tcd.ie (Darach Golden) Date: Wed, 28 Jul 2010 13:08:59 +0100 Subject: [petsc-users] ksp/dmmg laplace examples Message-ID: <20100728120859.GB819@tchpc.tcd.ie> Hi, I am planning on implementing a basic 3D Poisson solver using petsc -- preferably using the DMMG interface to multigrid with finite difference. Initially I'm using Dirichlet boundary conditions. To get started I've been looking at the following multigrid examples in 1D, 2D and 3D respectively 1) $PETSC_DIR/src/ksp/ksp/examples/tutorials/ex25.c 2) $PETSC_DIR/src/ksp/ksp/examples/tutorials/ex29.c 3) $PETSC_DIR/src/ksp/ksp/examples/tutorials/ex22.c In each of these cases I've set any constants in the code so that the problem is reduced to the basic laplacian/poisson I have some questions about the finite difference formulation. The questions may very well be naive so apologies in advance for that. If they are, could you point me off to some standard reference/examples/slides? In each of the examples above, the linear system to be solved seems to contain entries for the total number of nodes (including boundary nodes), with rows associated with boundary nodes containing values on the diagonal only (in the Dirichlet case). Is this correct? It's these diagonal matrix values that are confusing me: 1) ex25 -------------------------------------------------------- Partial differential equation d (1 + e*sine(2*pi*k*x)) d u = 1, 0 < x < 1, -- --- dx dx with boundary conditions u = 0 for x = 0, x = 1 -------------------------------------------------------- In ComputeMatrix() the diagonal values in the matrix associated with boundary nodes seem to be 2.0, and the rows associated with internal nodes are divided by h. while in ComputeRHS(), the RHS appears to be multiplied by h, Why is the value 2.0 in the diagonal? 2) ex29 -------------------------------------------------------- Inhomogeneous Laplacian in 2D. Modeled by the partial differential equation div \rho grad u = f, 0 < x,y < 1, with forcing function f = e^{-(1 - x)^2/\nu} e^{-(1 - y)^2/\nu} with Dirichlet boundary conditions u = f(x,y) for x = 0, x = 1, y = 0, y = 1 -------------------------------------------------------- The RHS seems to be multiplied by hx * hy, while the values on the diagonal appear to be 2.0*rho*((hx/hy) + (hy/hx)) where I take rho=1. Why is this? Also, is the forcing function in ComputeRHS() f = e^{-(1 - x)^2/\nu} e^{-(1 - y)^2/\nu}? 3) ex22 -------------------------------------------------------- Laplacian in 3D. Modeled by the partial differential equation - Laplacian u = 1,0 < x,y,z < 1, with boundary conditions u = 1 for x = 0, x = 1, y = 0, y = 1, z = 0, z = 1. -------------------------------------------------------- The RHS seems to be multiplied by hx*hy*hz, while the values on the diagonals (associated with boundary nodes) appear to be 2.0*((hx*hy/hz) + (hx*hz/hy) + (hy*hz/hx)). Why? Darach From xxy113 at psu.edu Wed Jul 28 09:17:30 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 28 Jul 2010 10:17:30 -0400 Subject: [petsc-users] sundials and beuler Message-ID: <375FBC73-8900-43AA-948D-D874A3114994@psu.edu> Hi I am running the example: src/ts/examples/tutorials/ex4.c For this example, why sundials(./ex4 -ts_type sundials) only output the first time step and the last time step, but beuler can output every time step? How can I make sundials output every time step? Thanks! From rxk at cfdrc.com Wed Jul 28 09:20:46 2010 From: rxk at cfdrc.com (Ravi Kannan) Date: Wed, 28 Jul 2010 09:20:46 -0500 Subject: [petsc-users] OPENMP in PETSc Message-ID: <000001cb2e60$13af3a20$3b0dae60$@com> Dear all, Can anyone tell, whether PETSc uses (or has) OPENMP provision. In addition, how does it compare with parallel systems with multi-core architecture. Based on some literature search, my understanding is that MPI has poor scalability in multi-core systems, due to the Ethernet switch. Thanks Ravi _________________________________________ Dr. Ravi Kannan CFD Research Corporation Research Engineer 256.726.4851 rxk at cfdrc.com http://ravikannan.jimdo.com/ _________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hzhang at mcs.anl.gov Wed Jul 28 10:15:40 2010 From: hzhang at mcs.anl.gov (Hong Zhang) Date: Wed, 28 Jul 2010 10:15:40 -0500 Subject: [petsc-users] sundials and beuler In-Reply-To: <375FBC73-8900-43AA-948D-D874A3114994@psu.edu> References: <375FBC73-8900-43AA-948D-D874A3114994@psu.edu> Message-ID: Run ex4 with '-ts_type sundials -nox -ts_sundials_monitor_steps' Hong On Wed, Jul 28, 2010 at 9:17 AM, Xuan YU wrote: > Hi > > I am running the example: src/ts/examples/tutorials/ex4.c > > For this example, ?why sundials(./ex4 -ts_type sundials) only output the > first time step and the last time step, but beuler can output every time > step? > > How can I make sundials output every time step? > > Thanks! > From jed at 59A2.org Wed Jul 28 10:27:35 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 17:27:35 +0200 Subject: [petsc-users] ksp/dmmg laplace examples In-Reply-To: <20100728120859.GB819@tchpc.tcd.ie> References: <20100728120859.GB819@tchpc.tcd.ie> Message-ID: <87zkxbhbiw.fsf@59A2.org> On Wed, 28 Jul 2010 13:08:59 +0100, Darach Golden wrote: > In each of the examples above, the linear system to be solved seems to > contain entries for the total number of nodes (including boundary > nodes), with rows associated with boundary nodes containing values on > the diagonal only (in the Dirichlet case). Is this correct? Yes. For simple problems, especially on unstructured grids these nodes can be eleminated, but they are usually left in for structured grids or for hybrid conditions or conditions that change over time. > It's these diagonal matrix values that are confusing me: Note that you can scale this any way you like and you will get the same solution. The problem is volume weighted (somewhat important for geometric multigrid, happens automatically with FEM) and the boundary conditions are scaled to produce similar diagonal entrios to nearby nodes. To explain the exact values, note that Laplace produces diagonal entries of magnitude 2 d h^d \sum_{i=1}^d 1/h_d^2 in d dimensions. See src/snes/examples/tutorials/ex48.c for a nonlinear vector problem in a finite element context. Jed From jed at 59A2.org Wed Jul 28 10:43:51 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 17:43:51 +0200 Subject: [petsc-users] OPENMP in PETSc In-Reply-To: <000001cb2e60$13af3a20$3b0dae60$@com> References: <000001cb2e60$13af3a20$3b0dae60$@com> Message-ID: <87wrsfhars.fsf@59A2.org> On Wed, 28 Jul 2010 09:20:46 -0500, "Ravi Kannan" wrote: > Can anyone tell, whether PETSc uses (or has) OPENMP provision. You are free to use OpenMP in user code (like function evaluation and Jacobian assembly). There is some basic support in PCOPENMP. > In addition, how does it compare with parallel systems with multi-core > architecture. Based on some literature search, my understanding is > that MPI has poor scalability in multi-core systems, due to the > Ethernet switch. Modern MPI implementations don't use Ethernet for self-sends, instead they map shared memory around. Even when they talk over TCP, it's on the kernel loopback device and so it never goes to the Ethernet device, but is more expensive to copy through the kernel. They can also use RDMA provided by the HCA on e.g. an InfiniBand divice to do the sends and receives without a context switch. I've heard some people observe this being faster than mapping shared memory for certain problems, but it's usually not. NUMA is an important complication, the mapping of physical pages (which your program doesn't directly contral) is crucial to performance. This happens automatically with MPI (through affinity settings), but needs some careful tuning with OpenMP. In particular, it is very easy to fault pages on a different socket from where you later use them, causing mysterious slowdowns by a factor at least as large as the number of sockets. For problems that admit domain-decomposition strategies, it's not clear that OpenMP is generally faster than MPI, the reliable memory performance that you get from MPI should not be underestimated. Like anything, it's problem and hardware dependent. Jed From xxy113 at psu.edu Wed Jul 28 10:41:56 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 28 Jul 2010 11:41:56 -0400 Subject: [petsc-users] sundials and beuler In-Reply-To: References: <375FBC73-8900-43AA-948D-D874A3114994@psu.edu> Message-ID: <2376B6AF-1480-4B6A-9363-933DC6B1BB0B@psu.edu> On Jul 28, 2010, at 11:15 AM, Hong Zhang wrote: > Run ex4 with '-ts_type sundials -nox -ts_sundials_monitor_steps' > it does output all the time steps. But they are different in time beuler Timestep 0: time = 0, 2-norm error = 1.01507e-15, max norm error = 3.10862e-15 Timestep 1: time = 0.000143637, 2-norm error = 0.00112483, max norm error = 0.00162124 Timestep 2: time = 0.000287274, 2-norm error = 0.00213968, max norm error = 0.00308653 Timestep 3: time = 0.000430911, 2-norm error = 0.00305264, max norm error = 0.0044073 Timestep 4: time = 0.000574548, 2-norm error = 0.00387125, max norm error = 0.00559423 Timestep 5: time = 0.000718184, 2-norm error = 0.0046026, max norm error = 0.00665731 Timestep 6: time = 0.000861821, 2-norm error = 0.00525327, max norm error = 0.00760586 Timestep 7: time = 0.00100546, 2-norm error = 0.00582943, max norm error = 0.00844859 Timestep 8: time = 0.0011491, 2-norm error = 0.00633684, max norm error = 0.00919364 Timestep 9: time = 0.00129273, 2-norm error = 0.00678087, max norm error = 0.00984859 sundials Timestep 0: time = 0, 2-norm error = 1.01507e-15, max norm error = 3.10862e-15 Timestep 1: time = 4.23858e-06, 2-norm error = 9.80672e-06, max norm error = 1.41163e-05 Timestep 2: time = 8.47716e-06, 2-norm error = 1.95841e-05, max norm error = 2.8191e-05 Timestep 3: time = 1.94633e-05, 2-norm error = 4.45115e-05, max norm error = 6.40773e-05 Timestep 4: time = 3.04494e-05, 2-norm error = 6.80772e-05, max norm error = 9.80074e-05 Timestep 5: time = 4.14354e-05, 2-norm error = 9.10699e-05, max norm error = 0.000131116 Timestep 6: time = 5.24215e-05, 2-norm error = 0.000113753, max norm error = 0.000163784 Timestep 7: time = 7.6572e-05, 2-norm error = 0.000162885, max norm error = 0.000234557 Timestep 8: time = 0.000135787, 2-norm error = 0.000278648, max norm error = 0.000401418 Timestep 9: time = 0.000195002, 2-norm error = 0.000388956, max norm error = 0.000560541 Can I custom the output time of sundials? > Hong > > On Wed, Jul 28, 2010 at 9:17 AM, Xuan YU wrote: >> Hi >> >> I am running the example: src/ts/examples/tutorials/ex4.c >> >> For this example, why sundials(./ex4 -ts_type sundials) only >> output the >> first time step and the last time step, but beuler can output every >> time >> step? >> >> How can I make sundials output every time step? >> >> Thanks! >> > Xuan YU (??) xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From nemanja.ilic.81 at gmail.com Wed Jul 28 10:52:59 2010 From: nemanja.ilic.81 at gmail.com (=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)) Date: Wed, 28 Jul 2010 17:52:59 +0200 Subject: [petsc-users] Calculate determinant in PETSc Message-ID: <201007281752.59700.nemanja.ilic.81@gmail.com> Hello, Is there an easy way to calculate determinant in PETSc? I thought it could be done with MatNorm(), but I get bad results. Is there another way? Thank you in advance, Best regards, Nemanja Ilic From jed at 59A2.org Wed Jul 28 10:56:11 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 17:56:11 +0200 Subject: [petsc-users] sundials and beuler In-Reply-To: <2376B6AF-1480-4B6A-9363-933DC6B1BB0B@psu.edu> References: <375FBC73-8900-43AA-948D-D874A3114994@psu.edu> <2376B6AF-1480-4B6A-9363-933DC6B1BB0B@psu.edu> Message-ID: <87tynjha78.fsf@59A2.org> On Wed, 28 Jul 2010 11:41:56 -0400, Xuan YU wrote: > Can I custom the output time of sundials? Sundials uses adaptive step size (and orders). You might be able to fake it into doing constant step sizes by resetting things via TSSetPostStep(), but it's not designed to be used that way. They are different integrators and you should expect them to take a different number of steps with a different cost per step. What matters in the end is the cost to integrate a certain period of time to a certain accuracy. Jed From jed at 59A2.org Wed Jul 28 11:30:10 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 18:30:10 +0200 Subject: [petsc-users] Calculate determinant in PETSc In-Reply-To: <201007281752.59700.nemanja.ilic.81@gmail.com> References: <201007281752.59700.nemanja.ilic.81@gmail.com> Message-ID: <87r5inh8ml.fsf@59A2.org> On Wed, 28 Jul 2010 17:52:59 +0200, "=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)" wrote: > Hello, > > Is there an easy way to calculate determinant in PETSc? I thought it could be done with MatNorm(), but I get bad results. Is there another way? The standard way, as for dense matrices, is to compute an LU decomposition and look at diagonal of your factor. There are other ways to approximate it, for example, see this talk http://www4.ncsu.edu/~ipsen/ps/slides_iwasep.pdf or perhaps this method using sparse approximate inverses. http://arxiv.org/abs/hep-lat/0008007 Ask here if you need advice for implementing any of these methods. Jed From bsmith at mcs.anl.gov Wed Jul 28 11:31:12 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 28 Jul 2010 11:31:12 -0500 Subject: [petsc-users] Calculate determinant in PETSc In-Reply-To: <201007281752.59700.nemanja.ilic.81@gmail.com> References: <201007281752.59700.nemanja.ilic.81@gmail.com> Message-ID: <7277FA87-8B72-46A0-9938-7E97860A343F@mcs.anl.gov> The determinant can be computed from the LU factorization of a matrix (http://en.wikipedia.org/wiki/Determinant). We don't have code that can automatically pull out the appropriate values but it shouldn't be too hard to write. If you are running sequentially then you can just use PETS's LU factorization and then access the underlying data structure to pull out the diagonal entries. If you want in parallel you could use MUMPS or SuperLU_Dist() and then pull out the diagonals from their data structure (a bit of work to figure out how to do that). Is this what you are looking for? Barry On Jul 28, 2010, at 10:52 AM, ?????? ???? (Nemanja Ilic) wrote: > Hello, > > Is there an easy way to calculate determinant in PETSc? I thought it could be done with MatNorm(), but I get bad results. Is there another way? > > Thank you in advance, > Best regards, > Nemanja Ilic From nemanja.ilic.81 at gmail.com Wed Jul 28 11:40:26 2010 From: nemanja.ilic.81 at gmail.com (=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)) Date: Wed, 28 Jul 2010 18:40:26 +0200 Subject: [petsc-users] Calculate determinant in PETSc In-Reply-To: <7277FA87-8B72-46A0-9938-7E97860A343F@mcs.anl.gov> References: <201007281752.59700.nemanja.ilic.81@gmail.com> <7277FA87-8B72-46A0-9938-7E97860A343F@mcs.anl.gov> Message-ID: <201007281840.26948.nemanja.ilic.81@gmail.com> Thank you both, I'll try to do it by LU factoring and pulling out the diagonal values. Nemanja On Wednesday 28 July 2010 18:31:12 Barry Smith wrote: > > The determinant can be computed from the LU factorization of a matrix (http://en.wikipedia.org/wiki/Determinant). We don't have code that can automatically pull out the appropriate values but it shouldn't be too hard to write. If you are running sequentially then you can just use PETS's LU factorization and then access the underlying data structure to pull out the diagonal entries. If you want in parallel you could use MUMPS or SuperLU_Dist() and then pull out the diagonals from their data structure (a bit of work to figure out how to do that). > > Is this what you are looking for? > > Barry > > On Jul 28, 2010, at 10:52 AM, ?????? ???? (Nemanja Ilic) wrote: > > > Hello, > > > > Is there an easy way to calculate determinant in PETSc? I thought it could be done with MatNorm(), but I get bad results. Is there another way? > > > > Thank you in advance, > > Best regards, > > Nemanja Ilic > > From nemanja.ilic.81 at gmail.com Wed Jul 28 12:18:43 2010 From: nemanja.ilic.81 at gmail.com (=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)) Date: Wed, 28 Jul 2010 19:18:43 +0200 Subject: [petsc-users] Calculate determinant in PETSc - MatAssemblyEnd breaks In-Reply-To: <7277FA87-8B72-46A0-9938-7E97860A343F@mcs.anl.gov> References: <201007281752.59700.nemanja.ilic.81@gmail.com> <7277FA87-8B72-46A0-9938-7E97860A343F@mcs.anl.gov> Message-ID: <201007281918.43450.nemanja.ilic.81@gmail.com> Hello, I did the LU factorization and then pulled out diagonal from the matrix, but the code breaks. It breaks on the MatAssemblyEnd after the followin lines: "ierr = MatLUFactor(Ap, perm, iperm, &info);CHKERRQ(ierr); ierr = MatSetUnfactored(Ap); ierr = MatAssemblyBegin(Ap, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ierr = MatAssemblyEnd(Ap, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);" I attached my code. Thank you in advance for any help. Best regards, Nemanja -------------- next part -------------- A non-text attachment was scrubbed... Name: math_get_matrix_determinant.c Type: text/x-csrc Size: 4435 bytes Desc: not available URL: From jed at 59A2.org Wed Jul 28 12:46:14 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 09:46:14 -0800 Subject: [petsc-users] Calculate determinant in PETSc - MatAssemblyEnd breaks In-Reply-To: <201007281918.43450.nemanja.ilic.81@gmail.com> References: <201007281752.59700.nemanja.ilic.81@gmail.com> <7277FA87-8B72-46A0-9938-7E97860A343F@mcs.anl.gov> <201007281918.43450.nemanja.ilic.81@gmail.com> Message-ID: <87aapbh53t.fsf@59A2.org> On Wed, 28 Jul 2010 19:18:43 +0200, "=?utf-8?b?0J3QtdC80LDRmtCwINCY0LvQuNGb?= (Nemanja Ilic)" wrote: > Hello, > > I did the LU factorization and then pulled out diagonal from the matrix, but the code breaks. It breaks on the MatAssemblyEnd after the followin lines: You really need to tell us how it breaks (send the whole error message), it's rare that we can tell you what is wrong from "it breaks". > // now populate matrix > ierr = MatAssemblyBegin(Ap, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ierr = MatAssemblyEnd(Ap, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); [...] > ierr = MatLUFactor(Ap, perm, iperm, &info);CHKERRQ(ierr); This is not the correct interface, you have to use MatGetFactor first, you don't call MatLUFactor on the matrix you just assembled. Read the user's manual and/or look at an example http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/mat/examples/tutorials/ex13.c.html Jed From bsmith at mcs.anl.gov Wed Jul 28 13:08:28 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 28 Jul 2010 13:08:28 -0500 Subject: [petsc-users] Calculate determinant in PETSc - MatAssemblyEnd breaks In-Reply-To: <201007281918.43450.nemanja.ilic.81@gmail.com> References: <201007281752.59700.nemanja.ilic.81@gmail.com> <7277FA87-8B72-46A0-9938-7E97860A343F@mcs.anl.gov> <201007281918.43450.nemanja.ilic.81@gmail.com> Message-ID: <41B93E09-EA93-4A64-82DB-D7ED39BE36B3@mcs.anl.gov> On Jul 28, 2010, at 12:18 PM, ?????? ???? (Nemanja Ilic) wrote: > Hello, > > I did the LU factorization and then pulled out diagonal from the matrix, but the code breaks. It breaks on the MatAssemblyEnd after the followin lines: > "ierr = MatLUFactor(Ap, perm, iperm, &info);CHKERRQ(ierr); You shouldn't be doing this stuff below. Once you have Ap factored you need to access the data structure directly look in src/mat/impls/aij/seq/aij.h for the data structures to get the diagonals out. > ierr = MatSetUnfactored(Ap); > ierr = MatAssemblyBegin(Ap, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ierr = MatAssemblyEnd(Ap, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);" > > I attached my code. > > Thank you in advance for any help. > > Best regards, > Nemanja > From bsmith at mcs.anl.gov Wed Jul 28 13:51:11 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 28 Jul 2010 13:51:11 -0500 Subject: [petsc-users] ksp/dmmg laplace examples In-Reply-To: <87zkxbhbiw.fsf@59A2.org> References: <20100728120859.GB819@tchpc.tcd.ie> <87zkxbhbiw.fsf@59A2.org> Message-ID: <3FE1B777-1E94-4C85-8E9F-01AF804F3533@mcs.anl.gov> Darach, Jed's answer is essentially complete, I'll just expand on it a little in case it is not completely clear and because I like to hear myself type. The diagonal scaling we choose is completely dictated by the fact that we want to use geometric multigrid as our solver. For geometric multigrid to work well the coarse grid corrections need to be (approximate) PROJECTIONS of the error onto the coarser grid space. They cannot be 10 times the projection or 1/2 times a projection, this means the scaling is important. When one uses the Galerkin finite element methods the coarse grid space is actually a subspace of the fine grid space so the coarse grid correction is automatically a projection of the error. With finite differences this need not be the case (it depends on how you scale the matrix). Thus in our examples that use finite differences (we have finite difference examples because they are easy to write and understand) we use a scaling that MATCHES the scaling one would get if one used Galerkin finite elements. For example, in 1d finite elements gives you \integral grad u * grad v = \integral v * f where the integrals are over (for example) piecewise linear finite element basis functions. Now grad a basis function is order 1/h so the left hand side scaling is h * 1/h * 1/h = 1/h the scaling on the right hand side is h (since the support of each basis function is of size h). For 3d finite elements again grad a basis function is 1/h but now the integral is over are region of size h*h*h so the left hand side scaling is h*h*h* 1/h * 1/h and the right side scaling is h*h*h. This gives the basic scaling of the matrix. Now to do the scaling of the rows of the matrix that correspond to Dirichlet boundary conditions we scale them in the same way as the other diagonals of the matrix. Barry On Jul 28, 2010, at 10:27 AM, Jed Brown wrote: > On Wed, 28 Jul 2010 13:08:59 +0100, Darach Golden wrote: >> In each of the examples above, the linear system to be solved seems to >> contain entries for the total number of nodes (including boundary >> nodes), with rows associated with boundary nodes containing values on >> the diagonal only (in the Dirichlet case). Is this correct? > > Yes. For simple problems, especially on unstructured grids these nodes > can be eleminated, but they are usually left in for structured grids or > for hybrid conditions or conditions that change over time. > >> It's these diagonal matrix values that are confusing me: > > Note that you can scale this any way you like and you will get the same > solution. The problem is volume weighted (somewhat important for > geometric multigrid, happens automatically with FEM) and the boundary > conditions are scaled to produce similar diagonal entrios to nearby > nodes. To explain the exact values, note that Laplace produces diagonal > entries of magnitude > > 2 d h^d \sum_{i=1}^d 1/h_d^2 > > in d dimensions. See src/snes/examples/tutorials/ex48.c for a nonlinear > vector problem in a finite element context. > > Jed From xxy113 at psu.edu Wed Jul 28 13:55:58 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 28 Jul 2010 14:55:58 -0400 Subject: [petsc-users] run sundials from Petsc In-Reply-To: References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> Message-ID: <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> On Jul 27, 2010, at 8:40 PM, Satish Balay wrote: > You list one compile with linux-gnu-c-debug - and the other with > linux-gnu-c-opt. > You are right! How can I build sundials in linux-gun-c-opt? I want to run it without debugging option. > Looks like you rebuilt linux-gnu-c-debug with sundials - but not > linux-gnu-c-opt build. > > Satish > From jed at 59A2.org Wed Jul 28 14:05:36 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 11:05:36 -0800 Subject: [petsc-users] run sundials from Petsc In-Reply-To: <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> Message-ID: <877hkfh1fj.fsf@59A2.org> On Wed, 28 Jul 2010 14:55:58 -0400, Xuan YU wrote: > How can I build sundials in linux-gun-c-opt? linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download-sundials && make PETSC_ARCH=linux-gnu-c-opt all test Jed From xxy113 at psu.edu Wed Jul 28 16:01:34 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 28 Jul 2010 17:01:34 -0400 Subject: [petsc-users] run sundials from Petsc In-Reply-To: <877hkfh1fj.fsf@59A2.org> References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> <877hkfh1fj.fsf@59A2.org> Message-ID: <46F43AD6-D5EB-4C0C-8BAF-58AF46988DD9@psu.edu> On Jul 28, 2010, at 3:05 PM, Jed Brown wrote: > On Wed, 28 Jul 2010 14:55:58 -0400, Xuan YU wrote: >> How can I build sundials in linux-gun-c-opt? > > linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- > sundials && make PETSC_ARCH=linux-gnu-c-opt all test > Why this happens? $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- sundials=1 --downlaod-mpi=1 --download-f-blas-lapack=1 = = = = = = = ======================================================================== Configuring PETSc to compile on your system = = = = = = = ======================================================================== = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ================ WARNING! Compiling PETSc with no debugging, this should only be done for timing and production runs. All development should be done when configured using --with- debugging=1 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ================================ TESTING: configureLibrary from PETSc.packages.sundials(config/ BuildSystem/config/package.py:370) ******************************************************************************* UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): ------------------------------------------------------------------------------- Did not find package MPI needed by sundials. Enable the package using --with-mpi ******************************************************************************* > Jed > From jed at 59A2.org Wed Jul 28 16:07:31 2010 From: jed at 59A2.org (Jed Brown) Date: Wed, 28 Jul 2010 13:07:31 -0800 Subject: [petsc-users] run sundials from Petsc In-Reply-To: <46F43AD6-D5EB-4C0C-8BAF-58AF46988DD9@psu.edu> References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> <877hkfh1fj.fsf@59A2.org> <46F43AD6-D5EB-4C0C-8BAF-58AF46988DD9@psu.edu> Message-ID: <87tynjfh7w.fsf@59A2.org> On Wed, 28 Jul 2010 17:01:34 -0400, Xuan YU wrote: > > On Jul 28, 2010, at 3:05 PM, Jed Brown wrote: > > > On Wed, 28 Jul 2010 14:55:58 -0400, Xuan YU wrote: > >> How can I build sundials in linux-gun-c-opt? > > > > linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- > > sundials && make PETSC_ARCH=linux-gnu-c-opt all test > > > Why this happens? > > $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- > sundials=1 --downlaod-mpi=1 --download-f-blas-lapack=1 ^^^^^^^^ Try spelling it --download-mpi, not --downlaod-mpi. Jed From xxy113 at psu.edu Wed Jul 28 16:13:36 2010 From: xxy113 at psu.edu (Xuan YU) Date: Wed, 28 Jul 2010 17:13:36 -0400 Subject: [petsc-users] run sundials from Petsc In-Reply-To: <87tynjfh7w.fsf@59A2.org> References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> <877hkfh1fj.fsf@59A2.org> <46F43AD6-D5EB-4C0C-8BAF-58AF46988DD9@psu.edu> <87tynjfh7w.fsf@59A2.org> Message-ID: On Jul 28, 2010, at 5:07 PM, Jed Brown wrote: > On Wed, 28 Jul 2010 17:01:34 -0400, Xuan YU wrote: >> >> On Jul 28, 2010, at 3:05 PM, Jed Brown wrote: >> >>> On Wed, 28 Jul 2010 14:55:58 -0400, Xuan YU wrote: >>>> How can I build sundials in linux-gun-c-opt? >>> >>> linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- >>> sundials && make PETSC_ARCH=linux-gnu-c-opt all test >>> >> Why this happens? >> >> $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- >> sundials=1 --downlaod-mpi=1 --download-f-blas-lapack=1 > > ^^^^^^^^ > > Try spelling it --download-mpi, not --downlaod-mpi. $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- sundials=1 --download-mpi=1 --download-f-blas-lapack=1 = = = = = = = ======================================================================== Configuring PETSc to compile on your system = = = = = = = ======================================================================== = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ================ WARNING! Compiling PETSc with no debugging, this should only be done for timing and production runs. All development should be done when configured using --with- debugging=1 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ================================ TESTING: configureLibrary from PETSc.packages.sundials(config/ BuildSystem/config/package.py:370) ******************************************************************************* UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): ------------------------------------------------------------------------------- Did not find package MPI needed by sundials. Enable the package using --with-mpi ******************************************************************************* > > Jed > From balay at mcs.anl.gov Wed Jul 28 16:22:55 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Wed, 28 Jul 2010 16:22:55 -0500 (CDT) Subject: [petsc-users] run sundials from Petsc In-Reply-To: References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> <877hkfh1fj.fsf@59A2.org> <46F43AD6-D5EB-4C0C-8BAF-58AF46988DD9@psu.edu> <87tynjfh7w.fsf@59A2.org> Message-ID: Perhaps your previous build is with --with-mpi=0 Just do: ./configure --download-sundials=1 --download-mpi=1 --download-f-blas-lapack=1 --with-debugging=0 PETSC_ARCH=linux-gnu-c-opt Satish On Wed, 28 Jul 2010, Xuan YU wrote: > > On Jul 28, 2010, at 5:07 PM, Jed Brown wrote: > > > On Wed, 28 Jul 2010 17:01:34 -0400, Xuan YU wrote: > > > > > > On Jul 28, 2010, at 3:05 PM, Jed Brown wrote: > > > > > > > On Wed, 28 Jul 2010 14:55:58 -0400, Xuan YU wrote: > > > > > How can I build sundials in linux-gun-c-opt? > > > > > > > > linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- > > > > sundials && make PETSC_ARCH=linux-gnu-c-opt all test > > > > > > > Why this happens? > > > > > > $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- > > > sundials=1 --downlaod-mpi=1 --download-f-blas-lapack=1 > > > > ^^^^^^^^ > > > > Try spelling it --download-mpi, not --downlaod-mpi. > > > $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download-sundials=1 > --download-mpi=1 --download-f-blas-lapack=1 > =============================================================================== > Configuring PETSc to compile on your system > =============================================================================== > =============================================================================== > WARNING! Compiling PETSc with no debugging, this should > only be done for timing and production runs. All development should > be done when configured using --with-debugging=1 > =============================================================================== > TESTING: configureLibrary from > PETSc.packages.sundials(config/BuildSystem/config/package.py:370) > ******************************************************************************* > UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for > details): > ------------------------------------------------------------------------------- > Did not find package MPI needed by sundials. > Enable the package using --with-mpi > ******************************************************************************* > > > > > > > > Jed > > > From bsmith at mcs.anl.gov Wed Jul 28 16:42:55 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Wed, 28 Jul 2010 16:42:55 -0500 Subject: [petsc-users] run sundials from Petsc In-Reply-To: References: <87hbjkio26.fsf@59A2.org> <578470CE-8C35-4AAC-A001-DCAF48F2995D@psu.edu> <876300imz5.fsf@59A2.org> <323D49F2-FF8E-442C-90DB-FFC4E68F4932@psu.edu> <877hkfh1fj.fsf@59A2.org> <46F43AD6-D5EB-4C0C-8BAF-58AF46988DD9@psu.edu> <87tynjfh7w.fsf@59A2.org> Message-ID: <2CDEE573-19CA-4C93-BF17-12835C92A4DD@mcs.anl.gov> --download-mpich NOT --download-mpi Barry On Jul 28, 2010, at 4:22 PM, Satish Balay wrote: > Perhaps your previous build is with --with-mpi=0 > > Just do: > > ./configure --download-sundials=1 --download-mpi=1 --download-f-blas-lapack=1 --with-debugging=0 PETSC_ARCH=linux-gnu-c-opt > > Satish > > On Wed, 28 Jul 2010, Xuan YU wrote: > >> >> On Jul 28, 2010, at 5:07 PM, Jed Brown wrote: >> >>> On Wed, 28 Jul 2010 17:01:34 -0400, Xuan YU wrote: >>>> >>>> On Jul 28, 2010, at 3:05 PM, Jed Brown wrote: >>>> >>>>> On Wed, 28 Jul 2010 14:55:58 -0400, Xuan YU wrote: >>>>>> How can I build sundials in linux-gun-c-opt? >>>>> >>>>> linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- >>>>> sundials && make PETSC_ARCH=linux-gnu-c-opt all test >>>>> >>>> Why this happens? >>>> >>>> $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download- >>>> sundials=1 --downlaod-mpi=1 --download-f-blas-lapack=1 >>> >>> ^^^^^^^^ >>> >>> Try spelling it --download-mpi, not --downlaod-mpi. >> >> >> $ linux-gnu-c-opt/conf/reconfigure-linux-gnu-c-opt.py --download-sundials=1 >> --download-mpi=1 --download-f-blas-lapack=1 >> =============================================================================== >> Configuring PETSc to compile on your system >> =============================================================================== >> =============================================================================== >> WARNING! Compiling PETSc with no debugging, this should >> only be done for timing and production runs. All development should >> be done when configured using --with-debugging=1 >> =============================================================================== >> TESTING: configureLibrary from >> PETSc.packages.sundials(config/BuildSystem/config/package.py:370) >> ******************************************************************************* >> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for >> details): >> ------------------------------------------------------------------------------- >> Did not find package MPI needed by sundials. >> Enable the package using --with-mpi >> ******************************************************************************* >> >> >> >> >>> >>> Jed >>> >> > From nmoran at thphys.nuim.ie Thu Jul 29 06:07:00 2010 From: nmoran at thphys.nuim.ie (Niall Moran) Date: Thu, 29 Jul 2010 12:07:00 +0100 Subject: [petsc-users] MPI_Attr_delete from MatDestroy Message-ID: Hi, I am getting some errors from a code that uses PETSc and SLEPc to diagonalise matrices in parallel. The code has been working fine on many machines but is giving problems on a Cray XT4 machine. The PETSc sparse matrix type MPIAIJ is used to store the matrix and then the SLEPc Krylov-Schur solver is used to iteratively diagonalise. For each run the dimension of the matrices diagonalised can vary wildly from tens or hundreds of rows to hundreds of millions of rows. Even though the smaller matrices can be computed easily on a single core I wanted to be able to perform all calculations from a single run. When running on thousands of processors SLEPc does not like it when you have more cores than rows in the matrix. To overcome this I create a new communicator with a sensible amount of cores before each diagonalisation and free it afterwards. When running four processors on four nodes of the cray XT4 machine for the case of a single diagonalisation of a matrix of dimension 4096 everything works however for a case with a single diagonalisation of a matrix with dimension 16.7 million the diagonalisation works correctly but the following errors are produced afterwards. Fatal error in MPI_Attr_delete: Invalid communicator, error stack: MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed MPI_Attr_delete(86).: Invalid communicator aborting job: Fatal error in MPI_Attr_delete: Invalid communicator, error stack: MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed MPI_Attr_delete(86).: Invalid communicator aborting job: Fatal error in MPI_Attr_delete: Invalid communicator, error stack: MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed MPI_Attr_delete(86).: Invalid communicator aborting job: Fatal error in MPI_Attr_delete: Invalid communicator, error stack: MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed MPI_Attr_delete(86).: Invalid communicator In both cases the new communicator created will be made up of all four processors. The only function that calls MPI_Attr_delete seems to be the MatDestroy function which is called after the diagonalisation. The structure of the code and order of relevant calls is as follows: SlepcInitialize(&argc,&argv,(char*)0,help); //SLEPc initialisation which in turn calls PETSc initialisation routine. loop over diagonalisations to be performed { Mat A; //matrix data structure //code to create new communicator MPI_Comm comm_world = PETSC_COMM_WORLD; MPI_Comm new_comm; MPI_Group processes_being_used; MPI_Group global_group; int number_relevant_ranks = 0; int *relevant_ranks; //code to determine number and allocate and populate relevant_ranks array. MPI_Comm_group(comm_world,&global_group); MPI_Group_incl(global_group,number_relevant_ranks,relevant_ranks,&processes_being_used); MPI_Comm_create(comm_world,processes_being_used,&new_comm); MPI_Group_free(&processes_being_used); MPI_Group_free(&global_group); //code to create and populate matrix ierr = MatCreate(new_comm,&A);CHKERRQ(ierr); ierr = MatSetSizes(A, local_rows, PETSC_DECIDE, global_rows ,global_columns);CHKERRQ(ierr); ierr = MatSetType(A,MATMPIAIJ);CHKERRQ(ierr); MatMPIAIJSetPreallocation(A,1,d_nnz ,0, o_nnz );CHKERRQ(ierr); ierr = MatSetValues(A, 1, &row_idx, val_count, cols, values, ADD_VALUES); CHKERRQ(ierr); ierr = MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); ierr = MatAssemblyEnd(A, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); //code to create and run eigensolver EPS eps; ierr = EPSCreate(new_comm,&eps);CHKERRQ(ierr); ierr = EPSSetOperators(eps,A,PETSC_NULL);CHKERRQ(ierr); //tell solver that A is the operator. ierr = EPSSetProblemType(eps, EPS_HEP);CHKERRQ(ierr); //specify that this is a hermitian eigenproblem. ierr = EPSSolve(eps);CHKERRQ(ierr); // run the eigen problem solver. ierr = EPSGetConverged(eps,&eigenvalues_converged);CHKERRQ(ierr); // retrieve eigenvalues and vectors. //cleanup state ierr = EPSDestroy(eps);CHKERRQ(ierr); ierr = MatDestroy(A);CHKERRQ(ierr); MPI_Comm_free(&new_comm); //free the communicator } I have tried inserting a barrier between the MatDestroy and MPI_Comm_free to no avail and also added check to ensure the communicator is not null before calling MatDestroy. if ( new_comm != MPI_COMM_NULL ) ... At this stage I am confused as to how best to proceed. I have been considering adding a MACRO that will revert back to using PETSC_COMM_WORLD for everything. However the fact that the smaller size is working and not the larger one is confusing me. I have also considered memory errors. I do not have direct access to this machine and not sure how many debugging or memory checking tools can be used. Any suggestions or ideas are appreciated. Regards, Niall. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jroman at dsic.upv.es Thu Jul 29 08:37:35 2010 From: jroman at dsic.upv.es (Jose E. Roman) Date: Thu, 29 Jul 2010 15:37:35 +0200 Subject: [petsc-users] MPI_Attr_delete from MatDestroy In-Reply-To: References: Message-ID: On 29/07/2010, Niall Moran wrote: > Hi, > > I am getting some errors from a code that uses PETSc and SLEPc to diagonalise matrices in parallel. The code has been working fine on many machines but is giving problems on a Cray XT4 machine. The PETSc sparse matrix type MPIAIJ is used to store the matrix and then the SLEPc Krylov-Schur solver is used to iteratively diagonalise. For each run the dimension of the matrices diagonalised can vary wildly from tens or hundreds of rows to hundreds of millions of rows. Even though the smaller matrices can be computed easily on a single core I wanted to be able to perform all calculations from a single run. When running on thousands of processors SLEPc does not like it when you have more cores than rows in the matrix. In slepc-dev I have made a fix for the case when the number of rows assigned to one of the processes is zero. In slepc-3.0.0 I don't see this problem. Jose > To overcome this I create a new communicator with a sensible amount of cores before each diagonalisation and free it afterwards. When running four processors on four nodes of the cray XT4 machine for the case of a single diagonalisation of a matrix of dimension 4096 everything works however for a case with a single diagonalisation of a matrix with dimension 16.7 million the diagonalisation works correctly but the following errors are produced afterwards. > > Fatal error in MPI_Attr_delete: Invalid communicator, error stack: > MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed > MPI_Attr_delete(86).: Invalid communicator > aborting job: > Fatal error in MPI_Attr_delete: Invalid communicator, error stack: > MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed > MPI_Attr_delete(86).: Invalid communicator > aborting job: > Fatal error in MPI_Attr_delete: Invalid communicator, error stack: > MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed > MPI_Attr_delete(86).: Invalid communicator > aborting job: > Fatal error in MPI_Attr_delete: Invalid communicator, error stack: > MPI_Attr_delete(114): MPI_Attr_delete(comm=0x84000003, keyval=-1539309567) failed > MPI_Attr_delete(86).: Invalid communicator > > In both cases the new communicator created will be made up of all four processors. The only function that calls MPI_Attr_delete seems to be the MatDestroy function which is called after the diagonalisation. > The structure of the code and order of relevant calls is as follows: > > SlepcInitialize(&argc,&argv,(char*)0,help); //SLEPc initialisation which in turn calls PETSc initialisation routine. > loop over diagonalisations to be performed { > Mat A; //matrix data structure > > //code to create new communicator > MPI_Comm comm_world = PETSC_COMM_WORLD; > MPI_Comm new_comm; > MPI_Group processes_being_used; > MPI_Group global_group; > int number_relevant_ranks = 0; > int *relevant_ranks; > //code to determine number and allocate and populate relevant_ranks array. > MPI_Comm_group(comm_world,&global_group); > MPI_Group_incl(global_group,number_relevant_ranks,relevant_ranks,&processes_being_used); > MPI_Comm_create(comm_world,processes_being_used,&new_comm); > MPI_Group_free(&processes_being_used); > MPI_Group_free(&global_group); > > //code to create and populate matrix > ierr = MatCreate(new_comm,&A);CHKERRQ(ierr); > ierr = MatSetSizes(A, local_rows, PETSC_DECIDE, global_rows ,global_columns);CHKERRQ(ierr); > ierr = MatSetType(A,MATMPIAIJ);CHKERRQ(ierr); > MatMPIAIJSetPreallocation(A,1,d_nnz ,0, o_nnz );CHKERRQ(ierr); > ierr = MatSetValues(A, 1, &row_idx, val_count, cols, values, ADD_VALUES); CHKERRQ(ierr); > ierr = MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > ierr = MatAssemblyEnd(A, MAT_FINAL_ASSEMBLY); CHKERRQ(ierr); > > //code to create and run eigensolver > EPS eps; > ierr = EPSCreate(new_comm,&eps);CHKERRQ(ierr); > ierr = EPSSetOperators(eps,A,PETSC_NULL);CHKERRQ(ierr); //tell solver that A is the operator. > ierr = EPSSetProblemType(eps, EPS_HEP);CHKERRQ(ierr); //specify that this is a hermitian eigenproblem. > ierr = EPSSolve(eps);CHKERRQ(ierr); // run the eigen problem solver. > ierr = EPSGetConverged(eps,&eigenvalues_converged);CHKERRQ(ierr); > // retrieve eigenvalues and vectors. > > //cleanup state > ierr = EPSDestroy(eps);CHKERRQ(ierr); > ierr = MatDestroy(A);CHKERRQ(ierr); > MPI_Comm_free(&new_comm); //free the communicator > } > > I have tried inserting a barrier between the MatDestroy and MPI_Comm_free to no avail and also added check to ensure the communicator is not null before calling MatDestroy. > if ( new_comm != MPI_COMM_NULL ) ... > > At this stage I am confused as to how best to proceed. I have been considering adding a MACRO that will revert back to using PETSC_COMM_WORLD for everything. However the fact that the smaller size is working and not the larger one is confusing me. I have also considered memory errors. I do not have direct access to this machine and not sure how many debugging or memory checking tools can be used. Any suggestions or ideas are appreciated. > > Regards, > > Niall. > > From nmoran at thphys.nuim.ie Thu Jul 29 08:45:00 2010 From: nmoran at thphys.nuim.ie (Niall Moran) Date: Thu, 29 Jul 2010 14:45:00 +0100 Subject: [petsc-users] MPI_Attr_delete from MatDestroy In-Reply-To: References: Message-ID: <4A3224FB-079B-44C2-A12A-B17CB018214A@thphys.nuim.ie> On 29 Jul 2010, at 14:37, Jose E. Roman wrote: >> I am getting some errors from a code that uses PETSc and SLEPc to diagonalise matrices in parallel. The code has been working fine on many machines but is giving problems on a Cray XT4 machine. The PETSc sparse matrix type MPIAIJ is used to store the matrix and then the SLEPc Krylov-Schur solver is used to iteratively diagonalise. For each run the dimension of the matrices diagonalised can vary wildly from tens or hundreds of rows to hundreds of millions of rows. Even though the smaller matrices can be computed easily on a single core I wanted to be able to perform all calculations from a single run. When running on thousands of processors SLEPc does not like it when you have more cores than rows in the matrix. > > In slepc-dev I have made a fix for the case when the number of rows assigned to one of the processes is zero. In slepc-3.0.0 I don't see this problem. > Jose Thanks for making me aware of this Jose. I no longer need to create my own communicators. I have also realised that the runs that were failing with this message were using the -eps_monitor argument. So not using this argument solves the problem as well. This argument did not make any difference on other platforms though. Niall. From xxy113 at psu.edu Thu Jul 29 10:32:21 2010 From: xxy113 at psu.edu (Xuan YU) Date: Thu, 29 Jul 2010 11:32:21 -0400 Subject: [petsc-users] sundials vs beuler Message-ID: <2420D95E-2799-4677-9AA6-C3DAE28F2DDC@psu.edu> Hi I solve my problem with TS, but different type: beuler and sundials, time consumption changes dramatically. (time of beuler is 1m12s, time of sundials is 1.8s). I was told that sundials can not control the minimum time step, so the performance will be slower. TS_type: beuler -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 7.png Type: image/png Size: 39595 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 8.png Type: image/png Size: 54314 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 9.png Type: image/png Size: 23359 bytes Desc: not available URL: -------------- next part -------------- sundials: -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 3.png Type: image/png Size: 39793 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 4.png Type: image/png Size: 35449 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Picture 5.png Type: image/png Size: 23544 bytes Desc: not available URL: -------------- next part -------------- Xuan YU xxy113 at psu.edu From jed at 59A2.org Thu Jul 29 11:13:56 2010 From: jed at 59A2.org (Jed Brown) Date: Thu, 29 Jul 2010 08:13:56 -0800 Subject: [petsc-users] sundials vs beuler In-Reply-To: <2420D95E-2799-4677-9AA6-C3DAE28F2DDC@psu.edu> References: <2420D95E-2799-4677-9AA6-C3DAE28F2DDC@psu.edu> Message-ID: <87lj8ufepn.fsf@59A2.org> On Thu, 29 Jul 2010 11:32:21 -0400, Xuan YU wrote: > Hi > > > I solve my problem with TS, but different type: beuler and sundials, > time consumption changes dramatically. (time of beuler is 1m12s, time > of sundials is 1.8s). BEULER takes 4181 steps, Sundials takes very few (can't tell exactly from -log_summary, run with -ts_view for details). Have you checked the accuracy of the result? > I was told that sundials can not control the minimum time step, so the > performance will be slower. The maximum time step might be more of an issue here. CVode actually does allow setting this, but PETSc's interface doesn't currently expose it. I just added it to petsc-dev so you may want to try that. Jed From keita at cray.com Thu Jul 29 11:11:34 2010 From: keita at cray.com (Keita Teranishi) Date: Thu, 29 Jul 2010 11:11:34 -0500 Subject: [petsc-users] MPI_Attr_delete from MatDestroy In-Reply-To: <4A3224FB-079B-44C2-A12A-B17CB018214A@thphys.nuim.ie> References: <4A3224FB-079B-44C2-A12A-B17CB018214A@thphys.nuim.ie> Message-ID: <5D6E0DF460ACF34C88644E1EA91DCD0D01A9ECF222@CFEXMBX.americas.cray.com> Niall, Please report your problem to the system administrator of the machine you are using. I am interested in why PETSc fails with -eps_monitor on XT. Thanks, ================================ ?Keita Teranishi ?Scientific Library Group ?Cray, Inc. ?keita at cray.com ================================ -----Original Message----- From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Niall Moran Sent: Thursday, July 29, 2010 8:45 AM To: PETSc users list Subject: Re: [petsc-users] MPI_Attr_delete from MatDestroy On 29 Jul 2010, at 14:37, Jose E. Roman wrote: >> I am getting some errors from a code that uses PETSc and SLEPc to diagonalise matrices in parallel. The code has been working fine on many machines but is giving problems on a Cray XT4 machine. The PETSc sparse matrix type MPIAIJ is used to store the matrix and then the SLEPc Krylov-Schur solver is used to iteratively diagonalise. For each run the dimension of the matrices diagonalised can vary wildly from tens or hundreds of rows to hundreds of millions of rows. Even though the smaller matrices can be computed easily on a single core I wanted to be able to perform all calculations from a single run. When running on thousands of processors SLEPc does not like it when you have more cores than rows in the matrix. > > In slepc-dev I have made a fix for the case when the number of rows assigned to one of the processes is zero. In slepc-3.0.0 I don't see this problem. > Jose Thanks for making me aware of this Jose. I no longer need to create my own communicators. I have also realised that the runs that were failing with this message were using the -eps_monitor argument. So not using this argument solves the problem as well. This argument did not make any difference on other platforms though. Niall. From nmoran at thphys.nuim.ie Thu Jul 29 12:35:05 2010 From: nmoran at thphys.nuim.ie (Niall Moran) Date: Thu, 29 Jul 2010 18:35:05 +0100 Subject: [petsc-users] MPI_Attr_delete from MatDestroy In-Reply-To: <5D6E0DF460ACF34C88644E1EA91DCD0D01A9ECF222@CFEXMBX.americas.cray.com> References: <4A3224FB-079B-44C2-A12A-B17CB018214A@thphys.nuim.ie> <5D6E0DF460ACF34C88644E1EA91DCD0D01A9ECF222@CFEXMBX.americas.cray.com> Message-ID: <9F43A433-59D0-4C20-8956-FC411A0F2CE6@thphys.nuim.ie> Hi Keita, I am afraid that I do not have direct access to the machine in question nor do I have a line of communication to the administrative team. I do not envisage there being issues with -eps_monitor in standard usage. However I am creating a new communicator and using this. I have encountered problems in the past with options like -mat_view_matrix when using a communicator other than PETSC_COMM_WORLD. I think the fact that this happens for -eps_monitor on the XT and not on the other platforms I tried is down to differences in the MPI implementation present and not any fault with the system. Regards, Niall. On 29 Jul 2010, at 17:11, Keita Teranishi wrote: > Niall, > > Please report your problem to the system administrator of the machine you are using. I am interested in why PETSc fails with -eps_monitor on XT. > > Thanks, > ================================ > Keita Teranishi > Scientific Library Group > Cray, Inc. > keita at cray.com > ================================ > > > -----Original Message----- > From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Niall Moran > Sent: Thursday, July 29, 2010 8:45 AM > To: PETSc users list > Subject: Re: [petsc-users] MPI_Attr_delete from MatDestroy > > On 29 Jul 2010, at 14:37, Jose E. Roman wrote: >>> I am getting some errors from a code that uses PETSc and SLEPc to diagonalise matrices in parallel. The code has been working fine on many machines but is giving problems on a Cray XT4 machine. The PETSc sparse matrix type MPIAIJ is used to store the matrix and then the SLEPc Krylov-Schur solver is used to iteratively diagonalise. For each run the dimension of the matrices diagonalised can vary wildly from tens or hundreds of rows to hundreds of millions of rows. Even though the smaller matrices can be computed easily on a single core I wanted to be able to perform all calculations from a single run. When running on thousands of processors SLEPc does not like it when you have more cores than rows in the matrix. >> >> In slepc-dev I have made a fix for the case when the number of rows assigned to one of the processes is zero. In slepc-3.0.0 I don't see this problem. >> Jose > > Thanks for making me aware of this Jose. I no longer need to create my own communicators. I have also realised that the runs that were failing with this message were using the -eps_monitor argument. So not using this argument solves the problem as well. This argument did not make any difference on other platforms though. > > Niall. From xxy113 at psu.edu Thu Jul 29 14:19:19 2010 From: xxy113 at psu.edu (Xuan YU) Date: Thu, 29 Jul 2010 15:19:19 -0400 Subject: [petsc-users] sundials interface Message-ID: <09BC2AF7-EF21-4450-AE94-B9D53E30F682@psu.edu> Hi, Could you please tell me the interface of CVodeSetMaxStep and CVodeSetInitStep in Petsc? I failed to find them in the page http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/src/ts/impls/implicit/sundials/sundials.c.html Thanks! Xuan YU xxy113 at psu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From fischej at umich.edu Thu Jul 29 14:34:55 2010 From: fischej at umich.edu (John-Michael Fischer) Date: Thu, 29 Jul 2010 15:34:55 -0400 Subject: [petsc-users] Odd errors on MatCreate call Message-ID: Hi, when I call MatCreate() in my program I get Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000028 0x00000001003866a0 in PetscCookieRegister () which backtraces to (I've censored some of the filenames) (gdb) backtrace #0 0x00000001003866a0 in PetscCookieRegister () at XXXXXX #1 0x00000001002c3a1e in MatMFFDInitializePackage () at XXXXXX #2 0x00000001001443d9 in MatInitializePackage () at XXXXXX #3 0x00000001002caff6 in MatCreate () at XXXXXX My matcreate call is very standard, nothing fancy. If I create a test program (completely separate from this codebase) that only includes petscmat.h I can create, insert, and read from MATMPIDENSE matricies just fine. Based on this test, I would assume PETSC is installed properly. Any thoughts on why I would be getting errors creating a Mat in this program? What is PetscCookieRegister about? Thanks! John-Michael Fischer University of Michigan Nuclear Engineering and Radiological Sciences From recrusader at gmail.com Thu Jul 29 15:06:40 2010 From: recrusader at gmail.com (Yujie) Date: Thu, 29 Jul 2010 15:06:40 -0500 Subject: [petsc-users] loading huge matrix with MatLoad in parallel implementation Message-ID: Dear PETSc developers, When the program based on PETSc runs in parallel mode, how much size of the matrix can MatLoad load? Does the program need to save the whole matrix in one CPU, or is each CPU in charge of the part of the matrix? For example, I have one matrix of ~30G. There are two CPUs on each nodes with totally16G memory. I have 8 nodes. I use 16CPUs for running. Can I load this matrix using MatLoad? Thanks a lot. Regards, Yujie From bsmith at mcs.anl.gov Thu Jul 29 15:16:48 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 29 Jul 2010 15:16:48 -0500 Subject: [petsc-users] Odd errors on MatCreate call In-Reply-To: References: Message-ID: First guess is that you don't call PetscInitialize() in your program (that has to be called before any PETSc calls). Barry On Jul 29, 2010, at 2:34 PM, John-Michael Fischer wrote: > Hi, when I call MatCreate() in my program I get > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000028 > 0x00000001003866a0 in PetscCookieRegister () > > which backtraces to (I've censored some of the filenames) > (gdb) backtrace > #0 0x00000001003866a0 in PetscCookieRegister () at XXXXXX > #1 0x00000001002c3a1e in MatMFFDInitializePackage () at XXXXXX > #2 0x00000001001443d9 in MatInitializePackage () at XXXXXX > #3 0x00000001002caff6 in MatCreate () at XXXXXX > > > My matcreate call is very standard, nothing fancy. > > If I create a test program (completely separate from this codebase) that only includes petscmat.h I can create, insert, and read from MATMPIDENSE matricies just fine. Based on this test, I would assume PETSC is installed properly. Any thoughts on why I would be getting errors creating a Mat in this program? What is PetscCookieRegister about? > > Thanks! > John-Michael Fischer > University of Michigan > Nuclear Engineering and Radiological Sciences From bsmith at mcs.anl.gov Thu Jul 29 15:27:28 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 29 Jul 2010 15:27:28 -0500 Subject: [petsc-users] loading huge matrix with MatLoad in parallel implementation In-Reply-To: References: Message-ID: <706B43AA-80DB-4348-B0EB-56590CB27E40@mcs.anl.gov> On Jul 29, 2010, at 3:06 PM, Yujie wrote: > Dear PETSc developers, > > When the program based on PETSc runs in parallel mode, how much size > of the matrix can MatLoad load? Currently the limit is that each individual process cannot hold more then 2 billion nonzeros when using MatLoad(). So if you have more processes you can hold as big a matrix as you want. Within a few days PETSc-dev will eliminate this limit (which comes from how we use MPI). But you need to ./configure PETSc with the option --with-64-bit-indices and need an operating system that supports 64 bit points (which you likely have). > Does the program need to save the whole matrix in one CPU, No, absolutely NOT. Barry > or is each > CPU in charge of the part of the matrix? > > For example, I have one matrix of ~30G. There are two CPUs on each > nodes with totally16G memory. I have 8 nodes. I use 16CPUs for > running. Can I load this matrix using MatLoad? Thanks a lot. > > Regards, > Yujie From recrusader at gmail.com Thu Jul 29 15:30:43 2010 From: recrusader at gmail.com (Yujie) Date: Thu, 29 Jul 2010 15:30:43 -0500 Subject: [petsc-users] loading huge matrix with MatLoad in parallel implementation In-Reply-To: <706B43AA-80DB-4348-B0EB-56590CB27E40@mcs.anl.gov> References: <706B43AA-80DB-4348-B0EB-56590CB27E40@mcs.anl.gov> Message-ID: Thanks, Barry. I use X86_64 CPU, do I need to use "--with-64-bit-indices"? Regards, Yujie On Thu, Jul 29, 2010 at 3:27 PM, Barry Smith wrote: > > On Jul 29, 2010, at 3:06 PM, Yujie wrote: > >> Dear PETSc developers, >> >> When the program based on PETSc runs in parallel mode, how much size >> of the matrix can MatLoad load? > > ? Currently the limit is that each individual process cannot hold more then 2 billion nonzeros when using MatLoad(). So if you have more processes you can hold as big a matrix as you want. Within a few days PETSc-dev will eliminate this limit (which comes from how we use MPI). > > ?But you need to ./configure PETSc with the option --with-64-bit-indices and need an operating system that supports 64 bit points (which you likely have). > >> Does the program need to save the whole matrix in one CPU, > > ?No, absolutely NOT. > > > ?Barry > > >> or is each >> CPU in charge of the part of the matrix? >> >> For example, I have one matrix of ~30G. There are two CPUs on each >> nodes with totally16G memory. I have 8 nodes. I use 16CPUs for >> running. Can I load this matrix using MatLoad? Thanks a lot. >> >> Regards, >> Yujie > > From bsmith at mcs.anl.gov Thu Jul 29 15:32:59 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 29 Jul 2010 15:32:59 -0500 Subject: [petsc-users] loading huge matrix with MatLoad in parallel implementation In-Reply-To: References: <706B43AA-80DB-4348-B0EB-56590CB27E40@mcs.anl.gov> Message-ID: <9F0AF30C-17DC-42FD-BFFF-BD1BB9B984C4@mcs.anl.gov> On Jul 29, 2010, at 3:30 PM, Yujie wrote: > Thanks, Barry. I use X86_64 CPU, do I need to use "--with-64-bit-indices"? Yes, and when you save the binary matrices you need to make sure the integers you save into the binary file are 64 bit. (If you use MatView() to save the matrices this just means that the PETSc uses to save the matrices has to have been built with --with-64-bit-indices Barry > > Regards, > Yujie > > On Thu, Jul 29, 2010 at 3:27 PM, Barry Smith wrote: >> >> On Jul 29, 2010, at 3:06 PM, Yujie wrote: >> >>> Dear PETSc developers, >>> >>> When the program based on PETSc runs in parallel mode, how much size >>> of the matrix can MatLoad load? >> >> Currently the limit is that each individual process cannot hold more then 2 billion nonzeros when using MatLoad(). So if you have more processes you can hold as big a matrix as you want. Within a few days PETSc-dev will eliminate this limit (which comes from how we use MPI). >> >> But you need to ./configure PETSc with the option --with-64-bit-indices and need an operating system that supports 64 bit points (which you likely have). >> >>> Does the program need to save the whole matrix in one CPU, >> >> No, absolutely NOT. >> >> >> Barry >> >> >>> or is each >>> CPU in charge of the part of the matrix? >>> >>> For example, I have one matrix of ~30G. There are two CPUs on each >>> nodes with totally16G memory. I have 8 nodes. I use 16CPUs for >>> running. Can I load this matrix using MatLoad? Thanks a lot. >>> >>> Regards, >>> Yujie >> >> From recrusader at gmail.com Thu Jul 29 15:45:49 2010 From: recrusader at gmail.com (Yujie) Date: Thu, 29 Jul 2010 15:45:49 -0500 Subject: [petsc-users] loading huge matrix with MatLoad in parallel implementation In-Reply-To: <9F0AF30C-17DC-42FD-BFFF-BD1BB9B984C4@mcs.anl.gov> References: <706B43AA-80DB-4348-B0EB-56590CB27E40@mcs.anl.gov> <9F0AF30C-17DC-42FD-BFFF-BD1BB9B984C4@mcs.anl.gov> Message-ID: Got it. Thanks a lot. Regards, Yujie On Thu, Jul 29, 2010 at 3:32 PM, Barry Smith wrote: > > On Jul 29, 2010, at 3:30 PM, Yujie wrote: > >> Thanks, Barry. I use X86_64 CPU, do I need to use "--with-64-bit-indices"? > > ? Yes, and when you save the binary matrices you need to make sure the integers you save into the binary file are 64 bit. (If you use MatView() to save the matrices this just means that the PETSc uses to save the matrices has to have been built with --with-64-bit-indices > > ? Barry > >> >> Regards, >> Yujie >> >> On Thu, Jul 29, 2010 at 3:27 PM, Barry Smith wrote: >>> >>> On Jul 29, 2010, at 3:06 PM, Yujie wrote: >>> >>>> Dear PETSc developers, >>>> >>>> When the program based on PETSc runs in parallel mode, how much size >>>> of the matrix can MatLoad load? >>> >>> ? Currently the limit is that each individual process cannot hold more then 2 billion nonzeros when using MatLoad(). So if you have more processes you can hold as big a matrix as you want. Within a few days PETSc-dev will eliminate this limit (which comes from how we use MPI). >>> >>> ?But you need to ./configure PETSc with the option --with-64-bit-indices and need an operating system that supports 64 bit points (which you likely have). >>> >>>> Does the program need to save the whole matrix in one CPU, >>> >>> ?No, absolutely NOT. >>> >>> >>> ?Barry >>> >>> >>>> or is each >>>> CPU in charge of the part of the matrix? >>>> >>>> For example, I have one matrix of ~30G. There are two CPUs on each >>>> nodes with totally16G memory. I have 8 nodes. I use 16CPUs for >>>> running. Can I load this matrix using MatLoad? Thanks a lot. >>>> >>>> Regards, >>>> Yujie >>> >>> > > From knepley at gmail.com Thu Jul 29 16:06:29 2010 From: knepley at gmail.com (Matthew Knepley) Date: Fri, 30 Jul 2010 05:06:29 +0800 Subject: [petsc-users] sundials interface In-Reply-To: <09BC2AF7-EF21-4450-AE94-B9D53E30F682@psu.edu> References: <09BC2AF7-EF21-4450-AE94-B9D53E30F682@psu.edu> Message-ID: They are only in petsc-dev, not the 3.0 release. Matt On Fri, Jul 30, 2010 at 3:19 AM, Xuan YU wrote: > Hi, > > Could you please tell me the interface of CVodeSetMaxStep > and CVodeSetInitStep in Petsc? > > I failed to find them in the page > http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/src/ts/impls/implicit/sundials/sundials.c.html > > Thanks! > > > Xuan YU > xxy113 at psu.edu > > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik at itis.ethz.ch Thu Jul 29 19:06:26 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 30 Jul 2010 02:06:26 +0200 Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: <4C4D78D7.5000502@gmail.com> References: <4C4D78D7.5000502@gmail.com> Message-ID: I have now managed to properly compile hypre natively and petsc configures correctly with it. However, I get errors during building. As requested I am sending win64-msvc-release/conf/configure.log to petsc-maint at mcs.anl.gov Any hints are appreciated. Dominik mhyp.c C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(165) : error C2143: syntax error : missing ';' before 'type' C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : error C2275: 'hypre_AuxParCSRMatrix' : illegal use of this type as an expression C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\include\_hypre_IJ_mv.h(82) : see declaration of 'hypre_AuxParCSRMatrix' C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : error C2065: 'aux_matrix' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2275: 'hypre_CSRMatrix' : illegal use of this type as an expression c:\users\dominik\programs\hypre-2.6.0b\src\hypre\include\seq_mv.h(62) : see declaration of 'hypre_CSRMatrix' C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2065: 'hdiag' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2065: 'hoffd' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2100: illegal indirection C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : error C2065: 'par_matrix' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : warning C4047: '=' : 'int' differs in levels of indirection from 'hypre_ParCSRMatrix *' C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : error C2065: 'aux_matrix' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : warning C4047: '=' : 'int' differs in levels of indirection from 'hypre_AuxParCSRMatrix *' C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2065: 'hdiag' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2065: 'par_matrix' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2223: left of '->diag' must point to struct/union C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2065: 'hoffd' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2065: 'par_matrix' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2223: left of '->offd' must point to struct/union C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2065: 'hdiag' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2223: left of '->i' must point to struct/union C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2198: 'PetscMemcpy' : too few arguments for call C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2065: 'hdiag' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2223: left of '->j' must point to struct/union C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2198: 'PetscMemcpy' : too few arguments for call C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2065: 'hdiag' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2223: left of '->data' must point to struct/union C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2198: 'PetscMemcpy' : too few arguments for call C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : error C2065: 'aux_matrix' : undeclared identifier C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : error C2223: left of '->need_aux' must point to struct/union LINK : fatal error LNK1181: cannot open input file 'mhyp.o' On Mon, Jul 26, 2010 at 2:00 PM, Wee-Beng TAY wrote: > Hi all, > > I actually tried compiling hypre 2.6b using windows. I can't remember which > version I'm using (Vs2005, 2008) but I followed the instructions carefully > and it worked. Compiling, linking in IDE are also ok. However, only the C > code work. The fortran code just can't work, even after much help from the > developers. > > Only the 2.6b version works with windows. However, I have not tried using > both hypre and PETSc in windows. > > Thank you very much and have a nice day! > > Yours sincerely, > > Wee-Beng Tay > > > On 7/26/2010 5:12 PM, Matthew Knepley wrote: > > This is what we mean when we say that Hypre does not support Windows. It > really doesn't. You > can try mailing their list, but I do not anticipate a response other than > "We do not support Windows". > The build system is completely broken for this platform, as you have > experienced. So, my conclusion > would be to > > a) switch packages to something that does support Windows > > or > > b) switch platforms to something that Hypre supports > > Thanks, > > Matt > > On Mon, Jul 26, 2010 at 6:40 PM, Dominik Szczerba wrote: > >> I just reinstalled MPICH to C: (and not the default location Program >> FIles). I also followed Barry and added --with-cxx="win32fe cl" >> >> Now I am getting errors when linking to hypre. BOTH hypre and petsc are >> compiled with MSVC 2008 64bit (configured with cygwin). The library is >> called libHYPRE.a, and as I watched it compile 'cl' was used for >> compilation. It failed to link (*.lib not found) as *.a so I renamed it to >> libHYPRE.lib. Now the error is: >> >> Executing: >> /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o >> conftest.exe -MT -wd4996 conftest.o >> -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri >> ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE >> /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib >> /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program >> s/petsc-3.1-p3/win64-msvc-release/lib >> -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib >> -lf2clapack >> -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib >> -L/c >> ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib >> -lf2cblas Ws2_32.lib >> sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : >> warning LNK4003: invalid library format; library ignored >> >> I configured with: >> --with-mpi-dir=/cygdrive/c/MPICH2/ >> --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ >> >> but: >> >> $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib >> total 8624 >> drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . >> drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. >> -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib >> >> How can I go on from here? >> >> Regards, >> Dominik >> >> On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba wrote: >> >>> Hi, >>> >>> I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler >>> (MSVC 2008) with: >>> >>> ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release >>> --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 >>> --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 >>> >>> I also managed to build hypre-2.6.0b separately myself using the same >>> compiler. Now the last problem is to build petsc with this external package >>> (--download-hypre will fail). I add to the above configure line: >>> >>> >>> --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ >>> >>> but the configuration fails with: >>> >>> >>> ******************************************************************************* >>> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for >>> details): >>> >>> ------------------------------------------------------------------------------- >>> C++ error! mpi.h could not be located at: ['/cygdrive/c/Program >>> Files/MPICH2/include'] >>> >>> ******************************************************************************* >>> >>> This error is clearly wrong as: >>> >>> $ ls -la '/cygdrive/c/Program Files/MPICH2/include' >>> total 309 >>> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . >>> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. >>> -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h >>> -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h >>> -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h >>> -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h >>> -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h >>> -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h >>> -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h >>> -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h >>> -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h >>> -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod >>> -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod >>> -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod >>> -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod >>> -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h >>> -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h >>> -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h >>> >>> Inspecting the log file shows: >>> >>> Executing: g++ -c -o conftest.o -Wall -Wwrite-strings >>> -Wno-strict-aliasing -O -I/cygdrive/c/Program\ Files/MPICH2/include >>> conftest.cc >>> >>> I think the error is in the white space in "Program Files". I failed to >>> convince hypre to use the default system installation of MPICH. I *had* to >>> make a hardcopy in C: to avoid the white space. >>> >>> I am sending the log to the maintainters, just in case, because I saw >>> more errors there too. >>> >>> Any help is greatly appreciated. >>> >>> Regards, >>> Dominik >>> >> >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsmith at mcs.anl.gov Thu Jul 29 19:21:23 2010 From: bsmith at mcs.anl.gov (Barry Smith) Date: Thu, 29 Jul 2010 19:21:23 -0500 Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: References: <4C4D78D7.5000502@gmail.com> Message-ID: Are you sure the version of hypre you installed is the version that works with the version of PETSc you are installing. Check config/PETSc/packages/hypre.py for the version that it needs Barry On Jul 29, 2010, at 7:06 PM, Dominik Szczerba wrote: > I have now managed to properly compile hypre natively and petsc configures correctly with it. > However, I get errors during building. > As requested I am sending win64-msvc-release/conf/configure.log to petsc-maint at mcs.anl.gov > Any hints are appreciated. > > Dominik > > mhyp.c > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(165) : error C2143: syntax error : missing ';' before 'type' > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : error C2275: 'hypre_AuxParCSRMatrix' : illegal use of this type as an expression > C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\include\_hypre_IJ_mv.h(82) : see declaration of 'hypre_AuxParCSRMatrix' > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : error C2065: 'aux_matrix' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2275: 'hypre_CSRMatrix' : illegal use of this type as an expression > c:\users\dominik\programs\hypre-2.6.0b\src\hypre\include\seq_mv.h(62) : see declaration of 'hypre_CSRMatrix' > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2065: 'hdiag' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2065: 'hoffd' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2100: illegal indirection > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : error C2065: 'par_matrix' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : warning C4047: '=' : 'int' differs in levels of indirection from 'hypre_ParCSRMatrix *' > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : error C2065: 'aux_matrix' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : warning C4047: '=' : 'int' differs in levels of indirection from 'hypre_AuxParCSRMatrix *' > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2065: 'hdiag' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2065: 'par_matrix' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2223: left of '->diag' must point to struct/union > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2065: 'hoffd' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2065: 'par_matrix' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2223: left of '->offd' must point to struct/union > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2065: 'hdiag' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2223: left of '->i' must point to struct/union > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2198: 'PetscMemcpy' : too few arguments for call > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2065: 'hdiag' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2223: left of '->j' must point to struct/union > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2198: 'PetscMemcpy' : too few arguments for call > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2065: 'hdiag' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2223: left of '->data' must point to struct/union > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2198: 'PetscMemcpy' : too few arguments for call > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : error C2065: 'aux_matrix' : undeclared identifier > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : error C2223: left of '->need_aux' must point to struct/union > LINK : fatal error LNK1181: cannot open input file 'mhyp.o' > > > > On Mon, Jul 26, 2010 at 2:00 PM, Wee-Beng TAY wrote: > Hi all, > > I actually tried compiling hypre 2.6b using windows. I can't remember which version I'm using (Vs2005, 2008) but I followed the instructions carefully and it worked. Compiling, linking in IDE are also ok. However, only the C code work. The fortran code just can't work, even after much help from the developers. > > Only the 2.6b version works with windows. However, I have not tried using both hypre and PETSc in windows. > Thank you very much and have a nice day! > > Yours sincerely, > > Wee-Beng Tay > > On 7/26/2010 5:12 PM, Matthew Knepley wrote: >> >> This is what we mean when we say that Hypre does not support Windows. It really doesn't. You >> can try mailing their list, but I do not anticipate a response other than "We do not support Windows". >> The build system is completely broken for this platform, as you have experienced. So, my conclusion >> would be to >> >> a) switch packages to something that does support Windows >> >> or >> >> b) switch platforms to something that Hypre supports >> >> Thanks, >> >> Matt >> >> On Mon, Jul 26, 2010 at 6:40 PM, Dominik Szczerba wrote: >> I just reinstalled MPICH to C: (and not the default location Program FIles). I also followed Barry and added --with-cxx="win32fe cl" >> >> Now I am getting errors when linking to hypre. BOTH hypre and petsc are compiled with MSVC 2008 64bit (configured with cygwin). The library is called libHYPRE.a, and as I watched it compile 'cl' was used for compilation. It failed to link (*.lib not found) as *.a so I renamed it to libHYPRE.lib. Now the error is: >> >> Executing: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o conftest.exe -MT -wd4996 conftest.o -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri >> ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program >> s/petsc-3.1-p3/win64-msvc-release/lib -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2clapack -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -L/c >> ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2cblas Ws2_32.lib >> sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : warning LNK4003: invalid library format; library ignored >> >> I configured with: >> --with-mpi-dir=/cygdrive/c/MPICH2/ --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ >> >> but: >> >> $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib >> total 8624 >> drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . >> drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. >> -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib >> >> How can I go on from here? >> >> Regards, >> Dominik >> >> On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba wrote: >> Hi, >> >> I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler (MSVC 2008) with: >> >> ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 >> >> I also managed to build hypre-2.6.0b separately myself using the same compiler. Now the last problem is to build petsc with this external package (--download-hypre will fail). I add to the above configure line: >> >> --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ >> >> but the configuration fails with: >> >> ******************************************************************************* >> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): >> ------------------------------------------------------------------------------- >> C++ error! mpi.h could not be located at: ['/cygdrive/c/Program Files/MPICH2/include'] >> ******************************************************************************* >> >> This error is clearly wrong as: >> >> $ ls -la '/cygdrive/c/Program Files/MPICH2/include' >> total 309 >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. >> -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h >> -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h >> -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h >> -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h >> -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h >> -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h >> -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h >> -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h >> -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h >> -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod >> -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod >> -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod >> -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod >> -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h >> -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h >> -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h >> >> Inspecting the log file shows: >> >> Executing: g++ -c -o conftest.o -Wall -Wwrite-strings -Wno-strict-aliasing -O -I/cygdrive/c/Program\ Files/MPICH2/include conftest.cc >> >> I think the error is in the white space in "Program Files". I failed to convince hypre to use the default system installation of MPICH. I *had* to make a hardcopy in C: to avoid the white space. >> >> I am sending the log to the maintainters, just in case, because I saw more errors there too. >> >> Any help is greatly appreciated. >> >> Regards, >> Dominik >> >> >> >> >> -- >> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. >> -- Norbert Wiener > -------------- next part -------------- An HTML attachment was scrubbed... URL: From balay at mcs.anl.gov Thu Jul 29 19:40:18 2010 From: balay at mcs.anl.gov (Satish Balay) Date: Thu, 29 Jul 2010 19:40:18 -0500 (CDT) Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: References: <4C4D78D7.5000502@gmail.com> Message-ID: The log says its hypre-2.6.0b. [which is correct for petsc-3.1] So I suspect either petsc sources or hypre sources were modified - thus causing this breakage in compile. Satish ----- Configure Options: --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-mpi-dir=/cygdrive/c/MPICH2 --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ --with-parmetis=1 --download-parmetis=1 --with-x=0 --with-debugging=0 --with-cc="win32fe cl" --with-cxx="win32fe cl" --with-fc=0 --useThreads=0 On Thu, 29 Jul 2010, Barry Smith wrote: > > Are you sure the version of hypre you installed is the version that works with the version of PETSc you are installing. Check config/PETSc/packages/hypre.py for the version that it needs > > Barry > > On Jul 29, 2010, at 7:06 PM, Dominik Szczerba wrote: > > > I have now managed to properly compile hypre natively and petsc configures correctly with it. > > However, I get errors during building. > > As requested I am sending win64-msvc-release/conf/configure.log to petsc-maint at mcs.anl.gov > > Any hints are appreciated. > > > > Dominik > > > > mhyp.c > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(165) : error C2143: syntax error : missing ';' before 'type' > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : error C2275: 'hypre_AuxParCSRMatrix' : illegal use of this type as an expression > > C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\include\_hypre_IJ_mv.h(82) : see declaration of 'hypre_AuxParCSRMatrix' > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : error C2065: 'aux_matrix' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2275: 'hypre_CSRMatrix' : illegal use of this type as an expression > > c:\users\dominik\programs\hypre-2.6.0b\src\hypre\include\seq_mv.h(62) : see declaration of 'hypre_CSRMatrix' > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2065: 'hdiag' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2065: 'hoffd' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : error C2100: illegal indirection > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : error C2065: 'par_matrix' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : warning C4047: '=' : 'int' differs in levels of indirection from 'hypre_ParCSRMatrix *' > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : error C2065: 'aux_matrix' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : warning C4047: '=' : 'int' differs in levels of indirection from 'hypre_AuxParCSRMatrix *' > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2065: 'hdiag' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2065: 'par_matrix' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : error C2223: left of '->diag' must point to struct/union > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2065: 'hoffd' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2065: 'par_matrix' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : error C2223: left of '->offd' must point to struct/union > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2065: 'hdiag' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2223: left of '->i' must point to struct/union > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : error C2198: 'PetscMemcpy' : too few arguments for call > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2065: 'hdiag' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2223: left of '->j' must point to struct/union > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : error C2198: 'PetscMemcpy' : too few arguments for call > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2065: 'hdiag' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2223: left of '->data' must point to struct/union > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : error C2198: 'PetscMemcpy' : too few arguments for call > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : error C2065: 'aux_matrix' : undeclared identifier > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : error C2223: left of '->need_aux' must point to struct/union > > LINK : fatal error LNK1181: cannot open input file 'mhyp.o' > > > > > > > > On Mon, Jul 26, 2010 at 2:00 PM, Wee-Beng TAY wrote: > > Hi all, > > > > I actually tried compiling hypre 2.6b using windows. I can't remember which version I'm using (Vs2005, 2008) but I followed the instructions carefully and it worked. Compiling, linking in IDE are also ok. However, only the C code work. The fortran code just can't work, even after much help from the developers. > > > > Only the 2.6b version works with windows. However, I have not tried using both hypre and PETSc in windows. > > Thank you very much and have a nice day! > > > > Yours sincerely, > > > > Wee-Beng Tay > > > > On 7/26/2010 5:12 PM, Matthew Knepley wrote: > >> > >> This is what we mean when we say that Hypre does not support Windows. It really doesn't. You > >> can try mailing their list, but I do not anticipate a response other than "We do not support Windows". > >> The build system is completely broken for this platform, as you have experienced. So, my conclusion > >> would be to > >> > >> a) switch packages to something that does support Windows > >> > >> or > >> > >> b) switch platforms to something that Hypre supports > >> > >> Thanks, > >> > >> Matt > >> > >> On Mon, Jul 26, 2010 at 6:40 PM, Dominik Szczerba wrote: > >> I just reinstalled MPICH to C: (and not the default location Program FIles). I also followed Barry and added --with-cxx="win32fe cl" > >> > >> Now I am getting errors when linking to hypre. BOTH hypre and petsc are compiled with MSVC 2008 64bit (configured with cygwin). The library is called libHYPRE.a, and as I watched it compile 'cl' was used for compilation. It failed to link (*.lib not found) as *.a so I renamed it to libHYPRE.lib. Now the error is: > >> > >> Executing: /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o conftest.exe -MT -wd4996 conftest.o -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri > >> ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program > >> s/petsc-3.1-p3/win64-msvc-release/lib -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2clapack -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -L/c > >> ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib -lf2cblas Ws2_32.lib > >> sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : warning LNK4003: invalid library format; library ignored > >> > >> I configured with: > >> --with-mpi-dir=/cygdrive/c/MPICH2/ --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > >> > >> but: > >> > >> $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib > >> total 8624 > >> drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . > >> drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. > >> -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib > >> > >> How can I go on from here? > >> > >> Regards, > >> Dominik > >> > >> On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba wrote: > >> Hi, > >> > >> I am able to build petsc-3.1-p3 on Windows 7 64bit using native compiler (MSVC 2008) with: > >> > >> ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 > >> > >> I also managed to build hypre-2.6.0b separately myself using the same compiler. Now the last problem is to build petsc with this external package (--download-hypre will fail). I add to the above configure line: > >> > >> --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > >> > >> but the configuration fails with: > >> > >> ******************************************************************************* > >> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): > >> ------------------------------------------------------------------------------- > >> C++ error! mpi.h could not be located at: ['/cygdrive/c/Program Files/MPICH2/include'] > >> ******************************************************************************* > >> > >> This error is clearly wrong as: > >> > >> $ ls -la '/cygdrive/c/Program Files/MPICH2/include' > >> total 309 > >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > >> -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h > >> -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h > >> -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h > >> -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h > >> -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h > >> -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h > >> -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h > >> -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h > >> -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h > >> -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod > >> -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod > >> -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod > >> -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod > >> -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h > >> -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h > >> -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h > >> > >> Inspecting the log file shows: > >> > >> Executing: g++ -c -o conftest.o -Wall -Wwrite-strings -Wno-strict-aliasing -O -I/cygdrive/c/Program\ Files/MPICH2/include conftest.cc > >> > >> I think the error is in the white space in "Program Files". I failed to convince hypre to use the default system installation of MPICH. I *had* to make a hardcopy in C: to avoid the white space. > >> > >> I am sending the log to the maintainters, just in case, because I saw more errors there too. > >> > >> Any help is greatly appreciated. > >> > >> Regards, > >> Dominik > >> > >> > >> > >> > >> -- > >> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. > >> -- Norbert Wiener > > > > From dominik at itis.ethz.ch Fri Jul 30 04:12:53 2010 From: dominik at itis.ethz.ch (Dominik Szczerba) Date: Fri, 30 Jul 2010 11:12:53 +0200 Subject: [petsc-users] petsc with hypre on Windows In-Reply-To: References: <4C4D78D7.5000502@gmail.com> Message-ID: As Satish noted, I am using the expected version 2.6b. I could not see any changes in the latest hypre tarball and the automatically downloaded linux version that compiles properly. But I have sent the diff to the maint list. I am compiling hypre natively on Windows 7 64 bit using Visual Studio 2008 compiler and linker. Dumpbin does not complain anymore as before, reporting a valid library. I can compile hypre examples (NOT following their apparently broken way described in the documentation) and I can independently link to this library myself using the native cl.exe/link.exe compiler/linker. The created executables do not reveal any dependencies to Cygwin, according to the Dependency Walker. I see no reason whatsoever to assume something is wrong here. So as far as I can tell the problem is with Petsc. I am glad to offer any testing needed. PS. Actually, the libraries are being created despite the compilation failure (see below). Is there a way to quickly check the validity of the hypre part? Directory of C:\Users\Dominik\Programs\petsc-3.1-p3\win64-msvc-release\lib 30.07.2010 02:01 . 30.07.2010 02:01 .. 30.07.2010 01:32 1'233'774 libf2cblas.lib 30.07.2010 01:34 13'624'086 libf2clapack.lib 30.07.2010 01:35 554'358 libmetis.lib 30.07.2010 01:35 473'324 libparmetis.lib 30.07.2010 02:01 17'916'714 libpetsc.lib 5 File(s) 33'802'256 bytes 2 Dir(s) 831'127'900'160 bytes free Regards, Dominik On Fri, Jul 30, 2010 at 2:40 AM, Satish Balay wrote: > The log says its hypre-2.6.0b. [which is correct for petsc-3.1] > > So I suspect either petsc sources or hypre sources were modified - thus > causing > this breakage in compile. > > Satish > > ----- > Configure Options: --configModules=PETSc.Configure > --optionsModule=PETSc.compilerOptions > PETSC_DIR=/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3 > PETSC_ARCH=win64-msvc-release --download-c-blas-lapack=1 > --with-mpi-dir=/cygdrive/c/MPICH2 > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > --with-parmetis=1 --download-parmetis=1 --with-x=0 --with-debugging=0 > --with-cc="win32fe cl" --with-cxx="win32fe cl" --with-fc=0 --useThreads=0 > > > > On Thu, 29 Jul 2010, Barry Smith wrote: > > > > > Are you sure the version of hypre you installed is the version that > works with the version of PETSc you are installing. Check > config/PETSc/packages/hypre.py for the version that it needs > > > > Barry > > > > On Jul 29, 2010, at 7:06 PM, Dominik Szczerba wrote: > > > > > I have now managed to properly compile hypre natively and petsc > configures correctly with it. > > > However, I get errors during building. > > > As requested I am sending win64-msvc-release/conf/configure.log to > petsc-maint at mcs.anl.gov > > > Any hints are appreciated. > > > > > > Dominik > > > > > > mhyp.c > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(165) : > error C2143: syntax error : missing ';' before 'type' > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : > error C2275: 'hypre_AuxParCSRMatrix' : illegal use of this type as an > expression > > > > C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\include\_hypre_IJ_mv.h(82) : > see declaration of 'hypre_AuxParCSRMatrix' > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(166) : > error C2065: 'aux_matrix' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : > error C2275: 'hypre_CSRMatrix' : illegal use of this type as an expression > > > > c:\users\dominik\programs\hypre-2.6.0b\src\hypre\include\seq_mv.h(62) : see > declaration of 'hypre_CSRMatrix' > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : > error C2065: 'hdiag' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : > error C2065: 'hoffd' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(167) : > error C2100: illegal indirection > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : > error C2065: 'par_matrix' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(176) : > warning C4047: '=' : 'int' differs in levels of indirection from > 'hypre_ParCSRMatrix *' > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : > error C2065: 'aux_matrix' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(177) : > warning C4047: '=' : 'int' differs in levels of indirection from > 'hypre_AuxParCSRMatrix *' > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : > error C2065: 'hdiag' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : > error C2065: 'par_matrix' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(178) : > error C2223: left of '->diag' must point to struct/union > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : > error C2065: 'hoffd' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : > error C2065: 'par_matrix' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(179) : > error C2223: left of '->offd' must point to struct/union > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : > error C2065: 'hdiag' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : > error C2223: left of '->i' must point to struct/union > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : > warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(185) : > error C2198: 'PetscMemcpy' : too few arguments for call > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : > error C2065: 'hdiag' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : > error C2223: left of '->j' must point to struct/union > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : > warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(186) : > error C2198: 'PetscMemcpy' : too few arguments for call > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : > error C2065: 'hdiag' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : > error C2223: left of '->data' must point to struct/union > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : > warning C4022: 'PetscMemcpy' : pointer mismatch for actual parameter 2 > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(187) : > error C2198: 'PetscMemcpy' : too few arguments for call > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : > error C2065: 'aux_matrix' : undeclared identifier > > > C:\Users\Dominik\Programs\PETSC-~3.1-P\src\dm\da\utils\mhyp.c(189) : > error C2223: left of '->need_aux' must point to struct/union > > > LINK : fatal error LNK1181: cannot open input file 'mhyp.o' > > > > > > > > > > > > On Mon, Jul 26, 2010 at 2:00 PM, Wee-Beng TAY > wrote: > > > Hi all, > > > > > > I actually tried compiling hypre 2.6b using windows. I can't remember > which version I'm using (Vs2005, 2008) but I followed the instructions > carefully and it worked. Compiling, linking in IDE are also ok. However, > only the C code work. The fortran code just can't work, even after much help > from the developers. > > > > > > Only the 2.6b version works with windows. However, I have not tried > using both hypre and PETSc in windows. > > > Thank you very much and have a nice day! > > > > > > Yours sincerely, > > > > > > Wee-Beng Tay > > > > > > On 7/26/2010 5:12 PM, Matthew Knepley wrote: > > >> > > >> This is what we mean when we say that Hypre does not support Windows. > It really doesn't. You > > >> can try mailing their list, but I do not anticipate a response other > than "We do not support Windows". > > >> The build system is completely broken for this platform, as you have > experienced. So, my conclusion > > >> would be to > > >> > > >> a) switch packages to something that does support Windows > > >> > > >> or > > >> > > >> b) switch platforms to something that Hypre supports > > >> > > >> Thanks, > > >> > > >> Matt > > >> > > >> On Mon, Jul 26, 2010 at 6:40 PM, Dominik Szczerba < > dominik at itis.ethz.ch> wrote: > > >> I just reinstalled MPICH to C: (and not the default location Program > FIles). I also followed Barry and added --with-cxx="win32fe cl" > > >> > > >> Now I am getting errors when linking to hypre. BOTH hypre and petsc > are compiled with MSVC 2008 64bit (configured with cygwin). The library is > called libHYPRE.a, and as I watched it compile 'cl' was used for > compilation. It failed to link (*.lib not found) as *.a so I renamed it to > libHYPRE.lib. Now the error is: > > >> > > >> Executing: > /cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/bin/win32fe/win32fe cl -o > conftest.exe -MT -wd4996 conftest.o > -L/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -L/cygdri > > >> ve/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib -lHYPRE > /cygdrive/c/MPICH2/lib/fmpich2.lib /cygdrive/c/MPICH2/lib/fmpich2g.lib > /cygdrive/c/MPICH2/lib/mpi.lib -L/cygdrive/c/Users/Dominik/Program > > >> s/petsc-3.1-p3/win64-msvc-release/lib > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2clapack > -L/cygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -L/c > > >> ygdrive/c/Users/Dominik/Programs/petsc-3.1-p3/win64-msvc-release/lib > -lf2cblas Ws2_32.lib > > >> sh: C:\Users\Dominik\Programs\HYPRE-~1.0B\src\hypre\lib\libHYPRE.lib : > warning LNK4003: invalid library format; library ignored > > >> > > >> I configured with: > > >> --with-mpi-dir=/cygdrive/c/MPICH2/ > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > >> > > >> but: > > >> > > >> $ ls -la /cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/lib > > >> total 8624 > > >> drwxr-xr-x+ 1 Dominik None 0 2010-07-26 10:17 . > > >> drwxr-xr-x+ 1 Dominik None 0 2010-07-23 23:07 .. > > >> -rw-r--r--+ 1 Dominik None 8830476 2010-07-23 23:13 libHYPRE.lib > > >> > > >> How can I go on from here? > > >> > > >> Regards, > > >> Dominik > > >> > > >> On Sun, Jul 25, 2010 at 11:10 PM, Dominik Szczerba < > dominik at itis.ethz.ch> wrote: > > >> Hi, > > >> > > >> I am able to build petsc-3.1-p3 on Windows 7 64bit using native > compiler (MSVC 2008) with: > > >> > > >> ./config/configure.py PETSC_DIR=$PWD PETSC_ARCH=win64-msvc-release > --download-c-blas-lapack=1 --with-parmetis=1 --download-parmetis=1 > --with-x=0 --with-debugging=0 --with-cc='win32fe cl' --with-fc=0 > > >> > > >> I also managed to build hypre-2.6.0b separately myself using the same > compiler. Now the last problem is to build petsc with this external package > (--download-hypre will fail). I add to the above configure line: > > >> > > >> > --with-hypre-dir=/cygdrive/c/Users/Dominik/Programs/hypre-2.6.0b/src/hypre/ > > >> > > >> but the configuration fails with: > > >> > > >> > ******************************************************************************* > > >> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log > for details): > > >> > ------------------------------------------------------------------------------- > > >> C++ error! mpi.h could not be located at: ['/cygdrive/c/Program > Files/MPICH2/include'] > > >> > ******************************************************************************* > > >> > > >> This error is clearly wrong as: > > >> > > >> $ ls -la '/cygdrive/c/Program Files/MPICH2/include' > > >> total 309 > > >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 . > > >> drwx------+ 1 SYSTEM SYSTEM 4096 2010-07-21 15:54 .. > > >> -rwx------+ 1 SYSTEM SYSTEM 4776 2007-11-02 15:50 clog_commset.h > > >> -rwx------+ 1 SYSTEM SYSTEM 696 2007-11-02 15:50 clog_const.h > > >> -rwx------+ 1 SYSTEM SYSTEM 731 2010-02-22 16:22 clog_inttypes.h > > >> -rwx------+ 1 SYSTEM SYSTEM 1272 2007-11-02 15:50 clog_uuid.h > > >> -rwx------+ 1 SYSTEM SYSTEM 437 2007-11-02 15:50 mpe.h > > >> -rwx------+ 1 SYSTEM SYSTEM 11021 2008-01-28 13:59 mpe_log.h > > >> -rwx------+ 1 SYSTEM SYSTEM 1833 2007-11-02 15:50 mpe_logf.h > > >> -rwx------+ 1 SYSTEM SYSTEM 1159 2007-11-02 15:50 mpe_misc.h > > >> -rwx------+ 1 SYSTEM SYSTEM 55623 2010-02-22 16:22 mpi.h > > >> -rwx------+ 1 SYSTEM SYSTEM 2439 2010-02-22 17:11 mpi.mod > > >> -rwx------+ 1 SYSTEM SYSTEM 14731 2010-02-22 17:11 mpi_base.mod > > >> -rwx------+ 1 SYSTEM SYSTEM 35003 2010-02-22 17:11 mpi_constants.mod > > >> -rwx------+ 1 SYSTEM SYSTEM 8417 2010-02-22 17:11 mpi_sizeofs.mod > > >> -rwx------+ 1 SYSTEM SYSTEM 97301 2010-02-22 16:22 mpicxx.h > > >> -rwx------+ 1 SYSTEM SYSTEM 18610 2010-02-22 16:22 mpif.h > > >> -rwx------+ 1 SYSTEM SYSTEM 16765 2010-02-22 16:22 mpio.h > > >> > > >> Inspecting the log file shows: > > >> > > >> Executing: g++ -c -o conftest.o -Wall -Wwrite-strings > -Wno-strict-aliasing -O -I/cygdrive/c/Program\ Files/MPICH2/include > conftest.cc > > >> > > >> I think the error is in the white space in "Program Files". I failed > to convince hypre to use the default system installation of MPICH. I *had* > to make a hardcopy in C: to avoid the white space. > > >> > > >> I am sending the log to the maintainters, just in case, because I saw > more errors there too. > > >> > > >> Any help is greatly appreciated. > > >> > > >> Regards, > > >> Dominik > > >> > > >> > > >> > > >> > > >> -- > > >> What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > > >> -- Norbert Wiener > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bourdin at lsu.edu Fri Jul 30 19:13:43 2010 From: bourdin at lsu.edu (Blaise Bourdin) Date: Fri, 30 Jul 2010 19:13:43 -0500 Subject: [petsc-users] VTKViewer with petsc4py Message-ID: Hi, Is PetscViewerSetFormat implemented in petsc4py (I am using petsc-3.1-p3 and petsc4py-1.1)? I am trying to save a DA and Vec in vtk format, but can't figure out the python equivalent to PetscViewerSetFormat(VTKViewer,PETSC_VIEWER_ASCII_VTK). My C code would be ierr = PetscViewerCreate(PETSC_COMM_WORLD,&VTKViewer);CHKERRQ(ierr); ierr = PetscViewerSetType(VTKViewer,PETSC_VIEWER_ASCII);CHKERRQ(ierr); ierr = PetscViewerFileSetName(VTKViewer,filename);CHKERRQ(ierr); ierr = PetscViewerSetFormat(VTKViewer,PETSC_VIEWER_ASCII_VTK);CHKERRQ(ierr); ierr = DAView(da,VTKViewer);CHKERRQ(ierr); ierr = VecView(U,VTKViewer);CHKERRQ(ierr); What would be the python equivalent? Thanks Blaise -- Department of Mathematics and Center for Computation & Technology Louisiana State University, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin From dalcinl at gmail.com Fri Jul 30 21:10:13 2010 From: dalcinl at gmail.com (Lisandro Dalcin) Date: Fri, 30 Jul 2010 23:10:13 -0300 Subject: [petsc-users] VTKViewer with petsc4py In-Reply-To: References: Message-ID: On 30 July 2010 21:13, Blaise Bourdin wrote: > Hi, > > Is PetscViewerSetFormat implemented in petsc4py (I am using petsc-3.1-p3 and petsc4py-1.1)? Viewer.setFormat() is certainly available. > I am trying to save a DA and Vec in vtk format, but can't figure out the python equivalent to > PetscViewerSetFormat(VTKViewer,PETSC_VIEWER_ASCII_VTK). > However, it seems I missed to add Viewer.Format.ASCII_VTK. As a workaround, you could do: viewer.setFormat(11) # "11" is the corresponding enum value from petscviewer.h Alternatively, you could monkeypatch like below at the beginning of your code: from petsc4py import PETSc PETSc.Viewer.Format.ASCII_VTK = 11 > My C code would be > ?ierr = PetscViewerCreate(PETSC_COMM_WORLD,&VTKViewer);CHKERRQ(ierr); > ?ierr = PetscViewerSetType(VTKViewer,PETSC_VIEWER_ASCII);CHKERRQ(ierr); > ?ierr = PetscViewerFileSetName(VTKViewer,filename);CHKERRQ(ierr); > ?ierr = PetscViewerSetFormat(VTKViewer,PETSC_VIEWER_ASCII_VTK);CHKERRQ(ierr); > > ?ierr = DAView(da,VTKViewer);CHKERRQ(ierr); > ?ierr = VecView(U,VTKViewer);CHKERRQ(ierr); > > What would be the python equivalent? > vtkviewer = PETSc.Viewer().create(PETSc.COMM_WORLD) vtkviewer.setType('ascii') # or pass PETSc.Viewer.Type.ASCII vtkviewer.setFileName(filename) vtkviewer.setFromat(PETSc.Viewer.Format.ASCII_VTK) # of course, requires previous hack. However, this way is simpler: vtkviewer = PETSc.Viewer().createASCII( filename, format=PETSc.Viewer.Format.ASCII_VTK, comm= PETSc.COMM_WORLD) PS: I'll add the missing format enumerate ASAP to petsc4py-dev, branch release-1-1. I'm near to make a micro release with a bunch of fixes, I?m just waiting for Cython 0.13 to be released. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169 From bourdin at lsu.edu Fri Jul 30 21:50:20 2010 From: bourdin at lsu.edu (Blaise Bourdin) Date: Fri, 30 Jul 2010 21:50:20 -0500 Subject: [petsc-users] VTKViewer with petsc4py In-Reply-To: References: Message-ID: <1DF77FAA-5D77-4903-AD77-4BB5DAC2ED84@lsu.edu> Great! that works. Now my problem is with DASetUniformCoordinates or DASetCoordinates. Do they exist in petsc4py? I can't see them when I do a dir(da). Thanks, Blaise On Jul 30, 2010, at 9:10 PM, Lisandro Dalcin wrote: > On 30 July 2010 21:13, Blaise Bourdin wrote: >> Hi, >> >> Is PetscViewerSetFormat implemented in petsc4py (I am using petsc-3.1-p3 and petsc4py-1.1)? > > Viewer.setFormat() is certainly available. > >> I am trying to save a DA and Vec in vtk format, but can't figure out the python equivalent to >> PetscViewerSetFormat(VTKViewer,PETSC_VIEWER_ASCII_VTK). >> > > However, it seems I missed to add Viewer.Format.ASCII_VTK. As a > workaround, you could do: > > viewer.setFormat(11) # "11" is the corresponding enum value from petscviewer.h > > Alternatively, you could monkeypatch like below at the beginning of your code: > > from petsc4py import PETSc > PETSc.Viewer.Format.ASCII_VTK = 11 > > >> My C code would be >> ierr = PetscViewerCreate(PETSC_COMM_WORLD,&VTKViewer);CHKERRQ(ierr); >> ierr = PetscViewerSetType(VTKViewer,PETSC_VIEWER_ASCII);CHKERRQ(ierr); >> ierr = PetscViewerFileSetName(VTKViewer,filename);CHKERRQ(ierr); >> ierr = PetscViewerSetFormat(VTKViewer,PETSC_VIEWER_ASCII_VTK);CHKERRQ(ierr); >> >> ierr = DAView(da,VTKViewer);CHKERRQ(ierr); >> ierr = VecView(U,VTKViewer);CHKERRQ(ierr); >> >> What would be the python equivalent? >> > > vtkviewer = PETSc.Viewer().create(PETSc.COMM_WORLD) > vtkviewer.setType('ascii') # or pass PETSc.Viewer.Type.ASCII > vtkviewer.setFileName(filename) > vtkviewer.setFromat(PETSc.Viewer.Format.ASCII_VTK) # of course, > requires previous hack. > > > However, this way is simpler: > > vtkviewer = PETSc.Viewer().createASCII( > filename, format=PETSc.Viewer.Format.ASCII_VTK, > comm= PETSc.COMM_WORLD) > > > PS: I'll add the missing format enumerate ASAP to petsc4py-dev, > branch release-1-1. I'm near to make a micro release with a bunch of > fixes, I?m just waiting for Cython 0.13 to be released. > > -- > Lisandro Dalcin > --------------- > CIMEC (INTEC/CONICET-UNL) > Predio CONICET-Santa Fe > Colectora RN 168 Km 472, Paraje El Pozo > Tel: +54-342-4511594 (ext 1011) > Tel/Fax: +54-342-4511169 -- Department of Mathematics and Center for Computation & Technology Louisiana State University, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin From dalcinl at gmail.com Fri Jul 30 22:05:21 2010 From: dalcinl at gmail.com (Lisandro Dalcin) Date: Sat, 31 Jul 2010 00:05:21 -0300 Subject: [petsc-users] VTKViewer with petsc4py In-Reply-To: <1DF77FAA-5D77-4903-AD77-4BB5DAC2ED84@lsu.edu> References: <1DF77FAA-5D77-4903-AD77-4BB5DAC2ED84@lsu.edu> Message-ID: On 30 July 2010 23:50, Blaise Bourdin wrote: > Great! that works. > > Now my problem is with DASetUniformCoordinates or DASetCoordinates. Do they exist in petsc4py? I can't see them when I do a dir(da). > No, they are not available. However, adding them should be really easy. Not sure iff I'll be able to do that this weekend. In any case, I'll have to ask you to "hg clone http://path/to/petsc4py-dev" and "hg update release-1.1". If you can beat me and add the missing calls, patches are going to be very welcome. PS: The DA support is somewhat unfinished, I've never used DA's too much. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169 From bourdin at lsu.edu Fri Jul 30 23:01:11 2010 From: bourdin at lsu.edu (Blaise Bourdin) Date: Fri, 30 Jul 2010 23:01:11 -0500 Subject: [petsc-users] VTKViewer with petsc4py In-Reply-To: References: <1DF77FAA-5D77-4903-AD77-4BB5DAC2ED84@lsu.edu> Message-ID: <5D140BC9-DA0E-42A3-8507-6A6E9F1E8D3F@lsu.edu> > On 30 July 2010 23:50, Blaise Bourdin wrote: >> Great! that works. >> >> Now my problem is with DASetUniformCoordinates or DASetCoordinates. Do they exist in petsc4py? I can't see them when I do a dir(da). >> > > No, they are not available. However, adding them should be really > easy. Not sure iff I'll be able to do that this weekend. In any case, > I'll have to ask you to "hg clone http://path/to/petsc4py-dev" and "hg > update release-1.1". If you can beat me and add the missing calls, > patches are going to be very welcome. Here is the patch for DASetUniformCoordinates I don't really know what I am doing, but it seems reasonable. I'll work on the others this weekend. diff -r 493264e77f7c src/PETSc/DA.pyx --- a/src/PETSc/DA.pyx Thu Jul 08 12:51:39 2010 -0300 +++ b/src/PETSc/DA.pyx Fri Jul 30 22:58:33 2010 -0500 @@ -287,6 +287,8 @@ cdef class DA(Object): CHKERR( DALocalToLocalBegin(self.da, vl.vec, im, vlg.vec) ) CHKERR( DALocalToLocalEnd (self.da, vl.vec, im, vlg.vec) ) + def setUniformCoordinates(self, xmin, xmax, ymin, ymax, zmin, zmax): + CHKERR( DASetUniformCoordinates(self.da, xmin, xmax, ymin, ymax, zmin, zmax) ) # def getAO(self): diff -r 493264e77f7c src/PETSc/petscda.pxi --- a/src/PETSc/petscda.pxi Thu Jul 08 12:51:39 2010 -0300 +++ b/src/PETSc/petscda.pxi Fri Jul 30 22:58:33 2010 -0500 @@ -56,10 +56,10 @@ cdef extern from "petscda.h" nogil: PetscInt*,PetscInt*,PetscInt*, PetscInt*,PetscInt*,PetscInt*) - #int DASetUniformCoordinates(PetscDA, - # PetscReal,PetscReal, - # PetscReal,PetscReal, - # PetscReal,PetscReal) + int DASetUniformCoordinates(PetscDA, + PetscReal,PetscReal, + PetscReal,PetscReal, + PetscReal,PetscReal) #int DASetCoordinates(PetscDA,PetscVec) #int DAGetCoordinates(PetscDA,PetscVec*) #int DAGetGhostedCoordinates(PetscDA,PetscVec*) > > PS: The DA support is somewhat unfinished, I've never used DA's too much. I don't need much. I just need to read a few tecplot files, do some basic post-processing and save them. What you have should be enough, once the coordinates stuff is added. Blaise -- Department of Mathematics and Center for Computation & Technology Louisiana State University, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin