Re: [petsc-users] Error of MatMPIAIJSetPreallocation

2021-01-15 Thread Qin Lu via petsc-users
large?   Barry On Jan 14, 2021, at 4:13 PM, Matthew Knepley wrote: On Thu, Jan 14, 2021 at 4:38 PM Qin Lu wrote: Hi Matthew, Thanks for your response! Does CHKERRQ work for FORTRAN-90? Yes, see the examples.  I linked my program with debug version of Petsc lib and got more error messages as

Re: [petsc-users] Error of MatMPIAIJSetPreallocation

2021-01-14 Thread Qin Lu via petsc-users
, Jan 14, 2021 at 11:58 AM Qin Lu via petsc-users wrote: Hello, My program got error 55 from calling MatMPIAIJSetPreallocation with Petsc version 3.12.5, what does this error mean? Interestingly, the same program using an older version 3.4.2 works fine. I did make necessary interface change in my

[petsc-users] Error of MatMPIAIJSetPreallocation

2021-01-14 Thread Qin Lu via petsc-users
Hello, My program got error 55 from calling MatMPIAIJSetPreallocation with Petsc version 3.12.5, what does this error mean? Interestingly, the same program using an older version 3.4.2 works fine. I did make necessary interface change in my program when I upgraded to 3.12.5.  Thanks in advance f

Re: [petsc-users] Zero diagonal term for direct solver

2020-07-09 Thread Qin Lu via petsc-users
means that zero got filled in during the factorization) On Jul 8, 2020, at 2:11 PM, Mark Adams wrote: On Wed, Jul 8, 2020 at 2:43 PM Qin Lu via petsc-users wrote: Hello, I am using the Petsc native direct solver (with KSPPREONLY and PCLU) to solver a small Linear equation system. The matrix ha

[petsc-users] Zero diagonal term for direct solver

2020-07-08 Thread Qin Lu via petsc-users
Hello, I am using the Petsc native direct solver (with KSPPREONLY and PCLU) to solver a small Linear equation system. The matrix has a couple of diagonal terms with value 0, which makes the solver fail. Then I set a very small value (e.g., 1e-10) at these terms and the solver works. Can this cau

Re: [petsc-users] Direct linear solver in Petsc

2020-06-12 Thread Qin Lu via petsc-users
external solvers have much more elaborate implements of sparse factorizations and solve but those elaborations are for getting higher performance on large problems.    For dense matrices PETSc uses the LAPACK solver which does fine at those sizes.    Barry On Jun 12, 2020, at 12:33 PM, Qin Lu via

Re: [petsc-users] Direct linear solver in Petsc

2020-06-12 Thread Qin Lu via petsc-users
Thanks Matthew and Mark! Qin On Friday, June 12, 2020, 12:22:08 PM CDT, Mark Adams wrote: On Fri, Jun 12, 2020 at 12:56 PM Qin Lu via petsc-users wrote: Hello, I plan to solve a small sparse linear equation system using the direct solver, since the number of unknowns is small

[petsc-users] Direct linear solver in Petsc

2020-06-12 Thread Qin Lu via petsc-users
Hello, I plan to solve a small sparse linear equation system using the direct solver, since the number of unknowns is small (less than 1000). Here I got a few questions: 1. Is there a general guide line on the size of the system that direct solver is more efficient than iterative solver?2. Is th

Re: [petsc-users] Petsc not work in Windows-10

2020-03-31 Thread Qin Lu via petsc-users
h On Tue, 31 Mar 2020, Matthew Knepley wrote: > On Tue, Mar 31, 2020 at 2:42 PM Qin Lu via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > > My program has multiple files in a single directory, and there are some > > other dependencies. Are you talking about

Re: [petsc-users] Petsc not work in Windows-10

2020-03-31 Thread Qin Lu via petsc-users
: Is your code a single source file?  multiple sourcefiles in a single dir? any external dependencies other than petsc? If possible - try compiling your code with petsc makefile. Does the code run correctly this way? Satish On Tue, 31 Mar 2020, Qin Lu via petsc-users wrote: >  I built

Re: [petsc-users] Petsc not work in Windows-10

2020-03-31 Thread Qin Lu via petsc-users
via petsc-users wrote: > Try PETSc examples with KSPCreate() - do they run correctly? > > How do you build your code - do you use petsc formatted makefile? > > Look for differences. Also run your code in valgrind on linux. Or you need to > debug further on windows.. > >

Re: [petsc-users] Petsc not work in Windows-10

2020-03-31 Thread Qin Lu via petsc-users
debugger to determine the problem. [If your code can compile on linux - I'll also suggest running it with valgrind] Satish On Tue, 31 Mar 2020, Qin Lu wrote: >  Hello, > I moved Intel-MPI libs to a directory without space, now the > configuration/build of Petsc-3.12.4 worked with

Re: [petsc-users] Petsc not work in Windows-10

2020-03-31 Thread Qin Lu via petsc-users
> Best regards, > > Jacob Faibussowitsch > (Jacob Fai - booss - oh - vitch) > Cell: (312) 694-3391 > > > On Mar 30, 2020, at 9:18 PM, Satish Balay via petsc-users > > wrote: > > > > On Mon, 30 Mar 2020, Matthew Knepley wrote: > > > >>

Re: [petsc-users] Petsc not work in Windows-10

2020-03-30 Thread Qin Lu via petsc-users
yes its free to download And PETSc does work with Intel-MPI. It might be a separate download/install. [so I can't say if what you have is the correct install of IntelMPI or not] Check the builds we use for testing - for ex: config/examples/arch-ci-mswin-*.py Satish On Mon, 30 Mar 202

[petsc-users] Petsc not work in Windows-10

2020-03-30 Thread Qin Lu via petsc-users
Hello, I am trying to build Petsc-3.4.2 in my Windows-10 workstation using Cygwin, with Intel-2018 compilers and MKL, and MPICH2. The configuration/compilation/installation seem to finish without problem, but test program (ex19) failed since it could not find a shared lib. Then I linked the li

Re: [petsc-users] Solve of subdomains without connections

2014-08-25 Thread Qin Lu
What if I use -pc_type asm? Will the communication be avoided in this special case? Thanks, Qin From: Barry Smith To: Qin Lu Cc: Petsc-users Sent: Monday, August 25, 2014 8:19 PM Subject: Re: [petsc-users] Solve of subdomains without connections On

[petsc-users] Solve of subdomains without connections

2014-08-25 Thread Qin Lu
Hello, I am using PETSc ksp solver to solve a problem on a physical domain. The domain is splitted to subdomains in such a way that there is no connections between them, but I still have to solve the whole domain as a single linear system. My questions are: 1. Does PETSc detect that the matri

[petsc-users] Solve of subdomains without connections

2014-08-25 Thread Qin Lu
Hello,   I am using PETSc ksp solver to solve a problem on a physical domain. The domain is splitted to subdomains in such a way that there is no connections between them, but I still have to solve the whole domain as a single linear system. My questions are:   1. Does PETSc detect that the matr

Re: [petsc-users] Partition of parallel AIJ sparce matrix

2014-07-31 Thread Qin Lu
Barry,   If I understand you correctly, I should number all unknowns owned by a process contiguously before I construct the matrix, right?   Thanks, Qin   From: Barry Smith To: Qin Lu Cc: Matthew Knepley ; petsc-users Sent: Thursday, July 31, 2014 10:46

Re: [petsc-users] Partition of parallel AIJ sparce matrix

2014-07-31 Thread Qin Lu
mined before parallel  partitioning, is this (just renumbering rows) Ok?   Thanks, Qin From: Barry Smith To: Qin Lu Cc: Matthew Knepley ; petsc-users Sent: Wednesday, July 30, 2014 7:37 PM Subject: Re: [petsc-users] Partition of parallel AIJ sparce matrix On Jul 30, 2014, at 3:59 PM

Re: [petsc-users] Partition of parallel AIJ sparce matrix

2014-07-30 Thread Qin Lu
Renumbering row will make an unknown not associate with its row (equation), will this affect the solver performance? For example, will the infill pattern change in ILU factorization?   Thanks, Qin  From: Matthew Knepley To: Qin Lu Cc: Barry Smith ; petsc

Re: [petsc-users] Partition of parallel AIJ sparce matrix

2014-07-30 Thread Qin Lu
, if subdomain 1 (assigned to process 1) owns unknowns 1 and 3 (associated with equation 1 and 3), subdomain 2 (assigned to process 2) owns unknowns 2 and 4 (associated with equation 2 and 4) , how can I make each process own consecutive rows?   Thanks, Qin From: Barry Smith To: Qin Lu Cc

[petsc-users] Partition of parallel AIJ sparce matrix

2014-07-30 Thread Qin Lu
Hello,   Does a process have to own consecutive rows of the matrix? For example, suppose the global AIJ is 4x4, partitioned by 2 processes. Does process 1 have to own  rows 1 and 2, process 2 own rows 3 and 4? Or process1 may own rows 1 and 3, and process 2 own row 2 and 4?   Thanks a lot for you

Re: [petsc-users] Combining preconditioners

2014-06-28 Thread Qin Lu
by 100. It seems to me we need a prolongation matrix P to make Ay possible, that is, w1 = x - APy. If this is the case, how can I pass P to PETSc? Thanks, Qin From: Barry Smith To: Qin Lu Cc: petsc-users Sent: Saturday, June 28, 2014 2:44 PM Subject: Re

Re: [petsc-users] Combining preconditioners

2014-06-28 Thread Qin Lu
ction (mapping) matrix/vector? Thanks, Qin From: Barry Smith To: Qin Lu Cc: petsc-users Sent: Saturday, June 28, 2014 12:53 PM Subject: Re: [petsc-users] Combining preconditioners On Jun 28, 2014, at 12:43 PM, Qin Lu wrote: > 1. About using PCCOMP

Re: [petsc-users] Combining preconditioners

2014-06-28 Thread Qin Lu
ioner matrices be the same as the full matrix? 2. If I use PCFIELDSPLIT, does it also need PCCOMPOSITE to define multiple preconditioners? Thanks  a lot, Qin From: Barry Smith To: Qin Lu Cc: petsc-users Sent: Friday, June 27, 2014 11:41 PM Subject: Re: [petsc-

[petsc-users] Combining preconditioners

2014-06-27 Thread Qin Lu
Hello, I would like to combine two preconditioners in PETSc linear solver. The first preconditioner is user defined, the second one is just PETSc ILU, and the residual is updated after application of each preconditioner (the multiplicative form). There are two questions: 1. Shall I use PCShell

Re: [petsc-users] About parallel performance

2014-06-02 Thread Qin Lu
?   Thanks, Qin From: Barry Smith To: Qin Lu Cc: petsc-users Sent: Thursday, May 29, 2014 5:46 PM Subject: Re: [petsc-users] About parallel performance   For the parallel case a perfect machine would have twice the memory bandwidth when using 2 cores as

Re: [petsc-users] About parallel performance

2014-05-29 Thread Qin Lu
Barry,   Thanks a lot for the info! I know now what was the problem.    Qin From: Barry Smith To: Qin Lu Cc: petsc-users Sent: Thursday, May 29, 2014 5:46 PM Subject: Re: [petsc-users] About parallel performance   For the parallel case a perfect

Re: [petsc-users] About parallel performance

2014-05-29 Thread Qin Lu
Thanks a lot! I will try that.   Qin  From: Matthew Knepley To: Qin Lu Cc: Barry Smith ; petsc-users Sent: Thursday, May 29, 2014 5:45 PM Subject: Re: [petsc-users] About parallel performance On Thu, May 29, 2014 at 5:40 PM, Qin Lu wrote: Is this

Re: [petsc-users] About parallel performance

2014-05-29 Thread Qin Lu
: Matthew Knepley To: Qin Lu Cc: Barry Smith ; petsc-users Sent: Thursday, May 29, 2014 5:27 PM Subject: Re: [petsc-users] About parallel performance On Thu, May 29, 2014 at 5:15 PM, Qin Lu wrote: Barry, >  >How did you read the test results? For a machine good for parallism, should

Re: [petsc-users] About parallel performance

2014-05-29 Thread Qin Lu
lib (MPICH2) that was not built correctly? Many thanks, Qin   - Original Message - From: Barry Smith To: Qin Lu ; petsc-users Cc: Sent: Thursday, May 29, 2014 4:54 PM Subject: Re: [petsc-users] About parallel performance   In that PETSc version BasicVersion is actually the MPI streams

Re: [petsc-users] About parallel performance

2014-05-29 Thread Qin Lu
s I need a more efficient parallel preconditioner. Do you have any suggestions for that? Many thanks, Qin - Original Message - From: Barry Smith To: Qin Lu Cc: "petsc-users@mcs.anl.gov" Sent: Thursday, May 29, 2014 2:12 PM Subject: Re: [petsc-users] About parallel performanc

[petsc-users] About parallel performance

2014-05-29 Thread Qin Lu
Hello, I implemented PETSc parallel linear solver in a program, the implementation is basically the same as /src/ksp/ksp/examples/tutorials/ex2.c, i.e., I preallocated the MatMPIAIJ, and let PETSc partition the matrix through MatGetOwnershipRange. However, a few tests shows the parallel solver

Re: [petsc-users] ILUTP in PETSc

2014-05-14 Thread Qin Lu
e the fastest with PETSc's ILU for my cases)?   Thanks, Qin From: Barry Smith To: Qin Lu Cc: Xiaoye S. Li ; "petsc-users@mcs.anl.gov" Sent: Tuesday, May 13, 2014 8:31 PM Subject: Re: [petsc-users] ILUTP in PETSc   Works fine for me. 

Re: [petsc-users] ILUTP in PETSc

2014-05-13 Thread Qin Lu
.   Thanks a lot, Qin  - Original Message - From: Barry Smith To: Qin Lu Cc: Xiaoye S. Li ; "petsc-users@mcs.anl.gov" Sent: Monday, May 12, 2014 5:11 PM Subject: Re: [petsc-users] ILUTP in PETSc   See for example: http://www.mcs.anl.gov/petsc/petsc-current/

Re: [petsc-users] ILUTP in PETSc

2014-05-12 Thread Qin Lu
or the command line options would work?     Many thanks, Qin     From: Xiaoye S. Li To: Barry Smith Cc: Qin Lu ; "petsc-users@mcs.anl.gov" Sent: Friday, May 2, 2014 3:40 PM Subject: Re: [petsc-users] ILUTP in PETSc The sequential SuperLU has ILUTP implementation, not in parallel

Re: [petsc-users] ILUTP in PETSc

2014-05-03 Thread Qin Lu
Thanks a lot for both of you! Qin From: Xiaoye S. Li To: Barry Smith Cc: Qin Lu ; "petsc-users@mcs.anl.gov" Sent: Friday, May 2, 2014 3:40 PM Subject: Re: [petsc-users] ILUTP in PETSc The sequential SuperLU has ILUTP implementation, not i

[petsc-users] ILUTP in PETSc

2014-05-02 Thread Qin Lu
Hello, I am interested in using ILUTP preconditioner with PETSc linear solver. There is an online doc https://fs.hlrs.de/projects/par/par_prog_ws/pdf/petsc_nersc01_short.pdf that mentioned it is available in PETSc with other packages (page 62-63). Is there any instructions or examples on how t

[petsc-users] 2-stage preconditioner

2014-04-22 Thread Qin Lu
Hello,   I need to implement a 2-stage preconditioner using PETSc linear solver:   1. The first stage uses a user-provided preconditioner routine. It seems I can set it with PCShellSetApply. 2. The second stage uses PETSc's ILU.   Shall I just call this two preconditioners in sequence, or there is

Re: [petsc-users] Building PETSc with Intel mpi

2014-03-24 Thread Qin Lu
It turns out the machine's Linux/glibc versions are too old. The configure passed the error after I switched to a new machine.   Thanks a lot, Qin From: Barry Smith To: Qin Lu Cc: petsc-users Sent: Saturday, March 22, 2014 5:30 PM Subject: Re: [

Re: [petsc-users] Building PETSc with Intel mpi

2014-03-22 Thread Qin Lu
From: Satish Balay To: Qin Lu Cc: Barry Smith ; petsc-users Sent: Saturday, March 22, 2014 12:09 AM Subject: Re: [petsc-users] Building PETSc with Intel mpi > --with-mpi-dir=/apps/compilers/intel_2013/impi/4.1.0.024/intel64 > --with-mpi-compilers=0 Does this mpi not come with mpicc

Re: [petsc-users] KSPSolve crash

2014-03-19 Thread Qin Lu
om command line in the failing workstations since I am not allowd to install VS debuger in them.   Thanks for any info,   Qin From: "Balay, Satish" To: "Smith, Barry F." ; Qin Lu Cc: petsc-users Sent: Thursday, March 13, 2014 4:25 PM Subje

Re: [petsc-users] KSPSolve crash

2014-03-13 Thread Qin Lu
Yes, it crashed without any printout. It always crashes at the first call to KSPSolve. Currently I only has a release version of petsc lib although my program has debug version.   Thanks, Qin - Original Message - From: Barry Smith To: Qin Lu Cc: petsc-users Sent: Thursday, March 13

Re: [petsc-users] KSPSolve crash

2014-03-13 Thread Qin Lu
I forget to mention: it crashed in Win-7 only, while it runs fine in Linux.   Qin - Original Message - From: Qin Lu To: petsc-users Cc: Sent: Thursday, March 13, 2014 2:43 PM Subject: [petsc-users] KSPSolve crash PETSc team, I have a program using PETSc linear solver (using KSPBCG

[petsc-users] KSPSolve crash

2014-03-13 Thread Qin Lu
PETSc team, I have a program using PETSc linear solver (using KSPBCG with PCILU level 0).  But with one case it crashed inside KSPSolve without any error message. I have tested this program with many other cases successfully. Could you debug PETSc with the linear system? I can send you the matri

[petsc-users] Ouput matrix and rhs to files

2014-03-06 Thread Qin Lu
Hello,   Are there any PETSc subroutines to output the matrix and right-hand-side to files in CRS for MATLAB format? There seems to be PetscViewerASCIIOpen subroutine, does it also output rhs? Is there any example code for this?   Many thanks, Qin

Re: [petsc-users] Eigenvalues calculations in PETSc

2014-02-26 Thread Qin Lu
From: Matthew Knepley To: Qin Lu Cc: "petsc-users@mcs.anl.gov" Sent: Wednesday, February 26, 2014 4:46 PM Subject: Re: [petsc-users] Eigenvalues calculations in PETSc On Wed, Feb 26, 2014 at 2:41 PM, Qin Lu wrote: Hello, > >I need to find the

[petsc-users] Eigenvalues calculations in PETSc

2014-02-26 Thread Qin Lu
Hello, I need to find the spectrum of the a large linear system (over 100,000 unknowns). Option -ksp_compute_eigenvalues_explicitly ran out of memory since the matrix is too big, then -ksp_compute_eigenvalues only gave a small number of eigenvalues (around 30). My questions are: 1. Is the numb

Re: [petsc-users] RCM for ILU?

2014-02-18 Thread Qin Lu
Do you mean using "-pc_factor_mat_ordering_type  wbm"? It does not seem to be in the manual. What exactly is it? I will try it anyway.   Many thanks, Qin On Tuesday, February 18, 2014 10:11 AM, Jed Brown wrote: Qin Lu writes: > RCM did not help much for my case. This ca

Re: [petsc-users] RCM for ILU?

2014-02-18 Thread Qin Lu
information is appreciated.   Thanks, Qin On Friday, February 14, 2014 1:30 PM, Qin Lu wrote: Thanks a lot!   Qin On Friday, February 14, 2014 11:16 AM, Jed Brown wrote: Qin Lu writes: > Barry and Jed, >   > Nice to know that! Is there a corresponding function call to set RCM?

Re: [petsc-users] RCM for ILU?

2014-02-14 Thread Qin Lu
Thanks a lot!   Qin On Friday, February 14, 2014 11:16 AM, Jed Brown wrote: Qin Lu writes: > Barry and Jed, >   > Nice to know that! Is there a corresponding function call to set RCM? $ ./ex2 -pc_factor_mat_ordering_type rcm -help | grep -A1 mat_ordering   -pc_factor_mat_orde

Re: [petsc-users] RCM for ILU?

2014-02-14 Thread Qin Lu
Barry and Jed,   Nice to know that! Is there a corresponding function call to set RCM?   Thanks, Qin On Friday, February 14, 2014 10:20 AM, Jed Brown wrote: Qin Lu writes: > Hello, >   > Is the RCM reordering available for ILU preconditioner in PETSc? The manual > says RCM w

[petsc-users] RCM for ILU?

2014-02-14 Thread Qin Lu
Hello,   Is the RCM reordering available for ILU preconditioner in PETSc? The manual says RCM works with LU factorization, but it does not mention it for preconditioners.   If not, is there any reordering method working for ILU in PETSc, or the users have to do the work outside PETSc?   Thanks

Re: [petsc-users] Delfated Krylov solver in PETSc

2014-02-13 Thread Qin Lu
Jed,   Thanks a lot for the useful info!   Qin On Thursday, February 13, 2014 3:29 PM, Jed Brown wrote: Qin Lu writes: > It seems there is a deflated GMRES solver in PETSc (KSPDGMRES), This uses approximate eigen-functions as deflation vectors.  There are many other ways to cho

Re: [petsc-users] Delfated Krylov solver in PETSc

2014-02-13 Thread Qin Lu
n Thursday, February 13, 2014 1:07 PM, Jed Brown wrote: Qin Lu writes: > Hello, > > Is there a deflated Krylov solver available in PETSc? See the discussion here: http://lists.mcs.anl.gov/pipermail/petsc-dev/2013-March/011393.html Let us know if you have any follow-up questions.

[petsc-users] Delfated Krylov solver in PETSc

2014-02-13 Thread Qin Lu
Hello, Is there a deflated Krylov solver available in PETSc? If yes, what is the corresponding solver name when calling KSPSetType? Does it work with any existing preconditioners? Many thanks for your info! Regards, Qin   

Re: [petsc-users] Building Linux 32-bit PETSc lib

2014-01-10 Thread Qin Lu
--useThreads=0 resolved the problem. Many thanks!   Qin On Friday, January 10, 2014 9:55 AM, Satish Balay wrote: On Fri, 10 Jan 2014, Qin Lu wrote: > Hello, >   > Since my Linux workstation does not have internet access, I downloaded > hypre-2.9.1a.tar.gz and used > --do

Re: [petsc-users] Building Linux 32-bit PETSc lib

2014-01-09 Thread Qin Lu
> On Thu, Jan 9, 2014 at 3:32 PM, Qin Lu wrote: > > > Can I specify the what version of Hypre to download? Do I need to use > > --with-hypre=1 and specify --with-hypre-dir? It will be nice if you may > > point me to a sample setting of configure options using --download-hy

Re: [petsc-users] Building Linux 32-bit PETSc lib

2014-01-09 Thread Qin Lu
: On Thu, Jan 9, 2014 at 3:05 PM, Qin Lu wrote: Is the linker ld compitable with Intel compilers? >  >If I use --download-hypre=1, will it download the 32-bit Hypre lib that is >consistent with my MPI lib and my PETSc lib built with Intel compilers? It will build it from source.

Re: [petsc-users] Building Linux 32-bit PETSc lib

2014-01-09 Thread Qin Lu
[ld] doesn't appear to like the hypre library you built. What do you have for: file /d/dev01/qlu/Lib/hypre-2.8.0b/LINUX_32/lib/libHYPRE.a Why not use --download-hypre=1 ? Satish On Thu, 9 Jan 2014, Qin Lu wrote: > Now it got new problem later in configure: it does not like the H

Re: [petsc-users] Building Linux 32-bit PETSc lib

2014-01-09 Thread Qin Lu
tmp/petsc-3SW45q/config.setCompilers/conftest: error while loading shared > libraries: libirc.so: wrong ELF class: ELFCLASS64 > > Because the -Bstatic are stripped from the link line the wrong libirc.so gets > picked up by the linker resulting in the runtime error. > > I

Re: [petsc-users] .petscrc in Windows

2013-12-11 Thread Qin Lu
ndows does not allow the file name start with "."   The content of the file is very simple: -pc_type jacobi On Wednesday, December 11, 2013 1:26 PM, Qin Lu wrote: Thanks, Satish!   Qin On Wednesday, December 11, 2013 12:27 PM, Satish Balay wrote: On Wed, 11 Dec 2013, Qin Lu

Re: [petsc-users] .petscrc in Windows

2013-12-11 Thread Qin Lu
Thanks, Satish!   Qin On Wednesday, December 11, 2013 12:27 PM, Satish Balay wrote: On Wed, 11 Dec 2013, Qin Lu wrote: > Hello, >   > PETSc can read options from .petscrc file at home directory in Linux. Can it > do the same thing in Windows? What is the file name and wh

[petsc-users] .petscrc in Windows

2013-12-11 Thread Qin Lu
Hello,   PETSc can read options from .petscrc file at home directory in Linux. Can it do the same thing in Windows? What is the file name and where the file should be placed?   Many thanks for your help, Qin

[petsc-users] CPU time of PETSc

2013-12-06 Thread Qin Lu
Hello,   I am using serial PETSc linear solver in a serial Fortran program, which uses function CPU_TIME() to count cpu time. In Windows-7, the cpu time turns out to be 2 to 3 times as much as elapse time. My questions are:   1. Does PETSc internally use multi-thread even though I configured it w

Re: [petsc-users] Specify -O2 for PETSc build in Windows

2013-11-26 Thread Qin Lu
='-O2 -QxW' CXXOPTFLAGS='-O2 -QxW' FOPTFLAGS='-O2 -QxW' ..... Satish On Tue, 26 Nov 2013, Qin Lu wrote: > Hello, > > I was trying to build PETSc using Intel compiler with -O2 optimization option > in Windows-7, but somehow it was override by -O3

[petsc-users] Specify -O2 for PETSc build in Windows

2013-11-26 Thread Qin Lu
Hello, I was trying to build PETSc using Intel compiler with -O2 optimization option in Windows-7, but somehow it was override by -O3 during make. My configure options are as follows: ./configure --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions --with-cc="win32fe icl -O2"

Re: [petsc-users] --with-hypre-dir did not work for petsc configure in Win-7

2013-11-07 Thread Qin Lu
via petsc configure? I see no point in replying any further. Its a waste of time.. Satish On Thu, 7 Nov 2013, Qin Lu wrote: > I managed to build hypre-2.8.0b with cygwin (instead of cmake) and it worked, > but have no idea why it created libhypre.a rather than libhypre.lib. From > hypr

Re: [petsc-users] --with-hypre-dir did not work for petsc configure in Win-7

2013-11-07 Thread Qin Lu
configure should not care how hypre was built, right? I tried to rename libhypre.a to libhypre.lib (for testing purpose) but got the same error. Thank, Qin  On Thursday, November 7, 2013 9:20 AM, Satish Balay wrote: On Thu, 7 Nov 2013, Qin Lu wrote: > Satish, >   > I tried what you

Re: [petsc-users] --with-hypre-dir did not work for petsc configure in Win-7

2013-11-06 Thread Qin Lu
piler option 3. specify hypre with --with-hypre-include and --with-hypre-lib options 4. send us the following [so we know whats there - and why configure is not finding it] ls -R /cygdrive/c/Lib/hypre-2.8.0b-win64-release Satish On Wed, 6 Nov 2013, Qin Lu wrote: > Hello, >   > I ha

Re: [petsc-users] Directory name with space used by hypre configure

2013-11-06 Thread Qin Lu
tion instructions on how to install it on windows. Satish On Wed, 6 Nov 2013, Qin Lu wrote: > I tried to put the MPICH2 under a directory without space, but the Intel C++ > compiler icl could not find the mpi.h file even if I set the path for the > compiler (-I/cygdrive/c/cygwin_cache

Re: [petsc-users] Directory name with space used by hypre configure

2013-11-06 Thread Qin Lu
te: > >    Reinstall the MPI in a location without spaces in the directory name. > > On Nov 5, 2013, at 9:41 AM, Qin Lu wrote: > > > Hello, > > I am trying to build hypre in Windows 7 (using cygwin) since it will be > > included in my PETSc lib. The configure opti

[petsc-users] Directory name with space used by hypre configure

2013-11-05 Thread Qin Lu
Hello, I am trying to build hypre in Windows 7 (using cygwin) since it will be included in my PETSc lib. The configure options of hypre contains directory such as: ./configure --with-MPI-include="/cygdrive/c/Program Files/mpich2x64/include" Somehow hypre's configure took this directory as two sep

Re: [petsc-users] MatSetValues vs. MatSetValue

2013-11-04 Thread Qin Lu
MatSetValue() on each.   If, for some nonstandard uncommon situation one truly generates one matrix entry at a time then it would be fine to call MatSetValue() with that one entry.   Barry On Nov 4, 2013, at 9:01 AM, Qin Lu wrote: > Hello, >  > I need to set values of a sparse matrix. I

[petsc-users] MatSetValues vs. MatSetValue

2013-11-04 Thread Qin Lu
Hello,   I need to set values of a sparse matrix. Is setting coefficients row by row using MatSetValues more efficient than setting setting coefficient one by one using MatSetValue? Is MatSetValues implemented by looping over each entry of the input array calling MatSetValue?   Thanks a lot for

Re: [petsc-users] Use parallel PETSc linear solver in a sequential program

2013-10-31 Thread Qin Lu
so on. But when calling MatSetValues, each coefficient should use GLOBAL (instead of local) row/column index (as showed in sample code ex2.c), right? Thanks, Qin On Thursday, October 31, 2013 4:07 PM, Jed Brown wrote: Qin Lu writes: > Jed, >   > What about MatCreateSeqAIJWit

Re: [petsc-users] Use parallel PETSc linear solver in a sequential program

2013-10-31 Thread Qin Lu
processors using MPI, or PETSc has any subroutines to do this job?   Thanks, Qin On Thursday, October 31, 2013 3:50 PM, Jed Brown wrote: Qin Lu writes: > Jed,   Thanks a lot for your nice suggestions. The CRS matrix has > already been created by the program and I don't want to change

Re: [petsc-users] Use parallel PETSc linear solver in a sequential program

2013-10-31 Thread Qin Lu
ly to MatCreateSeqAIJWithArrays or MatCreateMPIAIJWithArrays, especially when the matrix is big?   Thanks, Qin On Thursday, October 31, 2013 3:07 PM, Jed Brown wrote: Qin Lu writes: > Hello, > > I have successfully installed a sequential PETSc's linear solver in a > sequenti

[petsc-users] Use parallel PETSc linear solver in a sequential program

2013-10-31 Thread Qin Lu
Hello, I have successfully installed a sequential PETSc's linear solver in a sequential program. The matrix has been created in CSR format and it was passed to  MatCreateSeqAIJWithArrays (instead of using MatSetValues). Now I want to use a parallel PETSc solver in the same sequential program,

Re: [petsc-users] Could not find make when building PETSc in Windows 7

2013-10-30 Thread Qin Lu
Satish, I just got chance to try your two suggestions and the errors are gone! Many thanks, Qin On Wednesday, October 30, 2013 6:59 PM, Satish Balay wrote: On Mon, 28 Oct 2013, Satish Balay wrote: > > >  "/usr/bin/ar: petscvecmod.o: No such file or directory > < > > Mostlikely this

Re: [petsc-users] Could not find make when building PETSc in Windows 7

2013-10-28 Thread Qin Lu
- and rerun configure && make Satish On Mon, 28 Oct 2013, Qin Lu wrote: > Hi, >   > The configuration seemed to work, then I ran "make all" but got errors such > as "grep: Cannot open file > '/dev/fs/C/cygdrive/c/cygwin_cache/petsc-3.4.3/include/petscv

Re: [petsc-users] Could not find make when building PETSc in Windows 7

2013-10-24 Thread Qin Lu
should be /cygdrive/C/cygwin64/bin (or with some other drive letter in between where cygwin is installed). Chetan > -Original Message- > From: petsc-users-boun...@mcs.anl.gov > [mailto:petsc-users-boun...@mcs.anl.gov] On Behalf Of Qin Lu > Sent: Thursday, October 24, 2013 8

Re: [petsc-users] Could not find make when building PETSc in Windows 7

2013-10-24 Thread Qin Lu
hu, 24 Oct 2013, Satish Balay wrote: > On Thu, 24 Oct 2013, Qin Lu wrote: > > > Jed, > >   > > As I mentioned, I did add C:\cygwin64\bin (where make.exe is) to Path, > > You shouldn't have to do this. Perhaps cygwin is not setup properly. > > Als

Re: [petsc-users] Could not find make when building PETSc in Windows 7

2013-10-24 Thread Qin Lu
gested: adding --download-make in confugure, it gave the same error.   Thanks, Qin On Thursday, October 24, 2013 10:36 AM, Jed Brown wrote: Qin Lu writes: > Hello, > > I am trying to build PETSc in Windows 7 with following steps: > > 1. Installed cygwin 64-bit with pytho

[petsc-users] Could not find make when building PETSc in Windows 7

2013-10-24 Thread Qin Lu
Hello, I am trying to build PETSc in Windows 7 with following steps: 1. Installed cygwin 64-bit with python, make and other default packages under C:\cygwin64 2. Added C:\cygwin64\bin to Windows environmental variable Path. 3. Downloaded and unzipped PETSc 3.4.2. 4. Run mintty.exe to open a cygw