Re: [petsc-users] MatSeqBAIJSetPreallocation

2020-06-04 Thread Sanjay Govindjee

Thanks Mark.

Very helpful and explains why my other PETSC_NULL_INTEGER uses are still 
functioning
and why in some places I have PETSC_NULL_INTEGER(1).  I guess I can 
replace the latter with PETSC_DEFAULT_INTEGER for a cleaner look.


On 6/4/20 3:58 PM, Mark Adams wrote:



On Thu, Jun 4, 2020 at 6:41 PM Sanjay Govindjee > wrote:


thanks, that did it.  now I am wondering about all the other
PETSC_NULL_INTEGER instances in
my code.  how should I be thinking about PETSC_NULL_INTEGER 



I would think it's an integer array/pointer in C.

and
PETSC_DEFAULT_INTEGER,


and an integer in C.

so that I know that I am using the correct one?

On 6/4/20 3:16 PM, Satish Balay wrote:
> On Thu, 4 Jun 2020, Sanjay Govindjee wrote:
>
>> I'm moving from 3.10 to 3.13 and ran into a compilation problem
with
>> MatSeqBAIJSetPreallocation( ).
>> The manual page shows:
>>
>> PetscErrorCode
>>


>> MatSeqBAIJSetPreallocation
>>

(Mat
>>


>> B,PetscInt
>>


>> bs,PetscInt
>>


>> nz,const PetscInt
>>


>> nnz[])
>>
>>
>> Which I think is the way it was before but my code is now
tossing a compile
>> error
>>
>>
>>     65 |  & PETSC_NULL_INTEGER,mr(np(246)),
>>    | 1
>> Error: Rank mismatch in argument 'c' at (1) (scalar and rank-1)
>>
>>
>> The full line looks like:
>>          call MatSeqBAIJSetPreallocation(Mmat,nsbk,
>>      & PETSC_NULL_INTEGER,mr(np(246)),
> I think this should be PETSC_DEFAULT_INTEGER.
>
> Previously there were no Interface definitions - so no error
checks by the compiler.
>
> Satish
>
>>      & ierr)
>>
>> Any suggestions on what I've messed up?
>> -sanjay
>>
>>





Re: [petsc-users] Running example problem

2020-06-04 Thread Satish Balay via petsc-users
1. its best if you can send us text [i.e copy/paste from screen, or logfiles] - 
instead of screenshots

2. Normally - you need to do

'make check' - and not 'make test'

3. Since I don't have the log - I don't know why this test was run  
mat/tests/ex78_1 needs datafiles which are not part of the distribution. [so 
normally it shouldn't be run in this situation]

You can assume the PETSc build is fine - and use it.

Satish

On Thu, 4 Jun 2020, Fazlul Huq wrote:

> "make all test" gives the attached summary.
> 
> Looks like only one problem failed.
> All the others passed.
> 
> Thanks.
> Sincerely,
> Huq
> 
> On Thu, Jun 4, 2020 at 12:27 PM Satish Balay  wrote:
> 
> > Should work
> >
> > If it fails -  send us corresponding configure.log
> >
> > Satish
> >
> > On Thu, 4 Jun 2020, Fazlul Huq wrote:
> >
> > > I think it's okay to have a separate version of hypre for PETSc.
> > > So, what I understand is I have to do,
> > >
> > > ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> > > --download-mpich --download-fblaslapack --download-hypre
> > > make all test
> > >
> > > Is that all?
> > > Am I missing something?
> > >
> > > Thank you.
> > > Sincerely,
> > > Huq
> > >
> > >
> > > On Thu, Jun 4, 2020 at 11:04 AM Satish Balay  wrote:
> > >
> > > > Its best to use --download-hypre with PETSc configure - it installs a
> > > > compatible version of hypre.
> > > >
> > > > If you have a pre-installed hypre, you'l have to:
> > > > - make sure its compatible version
> > > > - its built with the same MPI, compilers etc as PETSc
> > > > - you can use --with-hypre-dir option with PETSc configure
> > > >
> > > > Satish
> > > >
> > > > On Thu, 4 Jun 2020, Fazlul Huq wrote:
> > > >
> > > > > I have HYPRE installed in my machine.
> > > > > Ithink, I need to compile PETSc with HYPRE.
> > > > > I'm not clear about how to do that?
> > > > >
> > > > > Thank you.
> > > > > Sincerely,
> > > > > Huq
> > > > >
> > > > > On Thu, Jun 4, 2020 at 10:13 AM Matthew Knepley 
> > > > wrote:
> > > > >
> > > > > > On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq 
> > wrote:
> > > > > >
> > > > > >> Thank you.
> > > > > >> Working now.
> > > > > >>
> > > > > >> I think to run the following command I need to configure PETSc
> > with
> > > > HYPRE.
> > > > > >> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type
> > > > > >> boomerang
> > > > > >>
> > > > > >> If I am right, can you please guide me how to configure with
> > HYPRE and
> > > > > >> run the above command?
> > > > > >>
> > > > > >
> > > > > > --download-hypre
> > > > > >
> > > > > >   Thanks,
> > > > > >
> > > > > >  Matt
> > > > > >
> > > > > >
> > > > > >> Thank you.
> > > > > >> Sincerely,
> > > > > >> Huq
> > > > > >>
> > > > > >> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley  > >
> > > > wrote:
> > > > > >>
> > > > > >>>
> > > > > >>> On Thu, Jun 4, 2020 at 9:19 AM Dave May  > >
> > > > wrote:
> > > > > >>>
> > > > > 
> > > > > 
> > > > >  On Thu, 4 Jun 2020 at 14:17, Dave May 
> > > > wrote:
> > > > > 
> > > > > >
> > > > > >
> > > > > > On Thu, 4 Jun 2020 at 14:15, Matthew Knepley <
> > knep...@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > >> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq 
> > > > wrote:
> > > > > >>
> > > > > >>> Somehow, make is not working.
> > > > > >>> Please find the attachment herewith for the terminal readout.
> > > > > >>>
> > > > > >>
> > > > > >> Since you built with PETSC_ARCH=linux-gnu, you need that in
> > your
> > > > > >> environment.
> > > > > >>
> > > > > >
> > > > > > Or just do
> > > > > >
> > > > > > make ex5 PETSC_ARCH=linux-gnu
> > > > > >
> > > > > 
> > > > >  sorry I hit send without checking your png)
> > > > >  The command should be
> > > > > 
> > > > >  make ex5 PETSC_ARCH=arch-linux2-c-debug
> > > > > 
> > > > > >>>
> > > > > >>> No, your first one was right.
> > > > > >>>
> > > > > >>>Matt
> > > > > >>>
> > > > > >>>
> > > > > 
> > > > > >
> > > > > >
> > > > > >>
> > > > > >>   Thanks,
> > > > > >>
> > > > > >>  Matt
> > > > > >>
> > > > > >>
> > > > > >>> Thank you.
> > > > > >>>
> > > > > >>> Sincerely,
> > > > > >>> Huq
> > > > > >>>
> > > > > >>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley <
> > > > knep...@gmail.com>
> > > > > >>> wrote:
> > > > > >>>
> > > > >  On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq <
> > huq2...@gmail.com>
> > > > >  wrote:
> > > > > 
> > > > > > Hello,
> > > > > >
> > > > > > I have a very preliminary question!
> > > > > > I think I have installed PETSc correctly cause I got
> > following
> > > > on
> > > > > > the terminal:
> > > > > >
> > > > > > Command:
> > > > > > make PETSC_DIR=/home/huq2090/petsc-3.10.2
> > PETSC_ARCH=linux-gnu
> > > > > > check
> > > > > > Response:
> > > > 

Re: [petsc-users] MatSeqBAIJSetPreallocation

2020-06-04 Thread Mark Adams
On Thu, Jun 4, 2020 at 6:41 PM Sanjay Govindjee  wrote:

> thanks, that did it.  now I am wondering about all the other
> PETSC_NULL_INTEGER instances in
> my code.  how should I be thinking about PETSC_NULL_INTEGER


I would think it's an integer array/pointer in C.


> and
> PETSC_DEFAULT_INTEGER,
>

and an integer in C.


> so that I know that I am using the correct one?
>
> On 6/4/20 3:16 PM, Satish Balay wrote:
> > On Thu, 4 Jun 2020, Sanjay Govindjee wrote:
> >
> >> I'm moving from 3.10 to 3.13 and ran into a compilation problem with
> >> MatSeqBAIJSetPreallocation( ).
> >> The manual page shows:
> >>
> >> PetscErrorCode
> >> <
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscErrorCode.html#PetscErrorCode
> >
> >> MatSeqBAIJSetPreallocation
> >> <
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSeqBAIJSetPreallocation.html#MatSeqBAIJSetPreallocation
> >(Mat
> >> <
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/Mat.html#Mat
> >
> >> B,PetscInt
> >> <
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt
> >
> >> bs,PetscInt
> >> <
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt
> >
> >> nz,const PetscInt
> >> <
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt
> >
> >> nnz[])
> >>
> >>
> >> Which I think is the way it was before but my code is now tossing a
> compile
> >> error
> >>
> >>
> >> 65 |  & PETSC_NULL_INTEGER,mr(np(246)),
> >>| 1
> >> Error: Rank mismatch in argument 'c' at (1) (scalar and rank-1)
> >>
> >>
> >> The full line looks like:
> >>  call MatSeqBAIJSetPreallocation(Mmat,nsbk,
> >>  & PETSC_NULL_INTEGER,mr(np(246)),
> > I think this should be PETSC_DEFAULT_INTEGER.
> >
> > Previously there were no Interface definitions - so no error checks by
> the compiler.
> >
> > Satish
> >
> >>  & ierr)
> >>
> >> Any suggestions on what I've messed up?
> >> -sanjay
> >>
> >>
>
>


Re: [petsc-users] MatSeqBAIJSetPreallocation

2020-06-04 Thread Sanjay Govindjee
thanks, that did it.  now I am wondering about all the other 
PETSC_NULL_INTEGER instances in
my code.  how should I be thinking about PETSC_NULL_INTEGER and 
PETSC_DEFAULT_INTEGER,

so that I know that I am using the correct one?

On 6/4/20 3:16 PM, Satish Balay wrote:

On Thu, 4 Jun 2020, Sanjay Govindjee wrote:


I'm moving from 3.10 to 3.13 and ran into a compilation problem with
MatSeqBAIJSetPreallocation( ).
The manual page shows:

PetscErrorCode

MatSeqBAIJSetPreallocation
(Mat

B,PetscInt

bs,PetscInt

nz,const PetscInt

nnz[])


Which I think is the way it was before but my code is now tossing a compile
error


    65 |  & PETSC_NULL_INTEGER,mr(np(246)),
   | 1
Error: Rank mismatch in argument 'c' at (1) (scalar and rank-1)


The full line looks like:
         call MatSeqBAIJSetPreallocation(Mmat,nsbk,
     & PETSC_NULL_INTEGER,mr(np(246)),

I think this should be PETSC_DEFAULT_INTEGER.

Previously there were no Interface definitions - so no error checks by the 
compiler.

Satish


     & ierr)

Any suggestions on what I've messed up?
-sanjay






Re: [petsc-users] Running example problem

2020-06-04 Thread Fazlul Huq
"make all test" gives the attached summary.

Looks like only one problem failed.
All the others passed.

Thanks.
Sincerely,
Huq

On Thu, Jun 4, 2020 at 12:27 PM Satish Balay  wrote:

> Should work
>
> If it fails -  send us corresponding configure.log
>
> Satish
>
> On Thu, 4 Jun 2020, Fazlul Huq wrote:
>
> > I think it's okay to have a separate version of hypre for PETSc.
> > So, what I understand is I have to do,
> >
> > ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> > --download-mpich --download-fblaslapack --download-hypre
> > make all test
> >
> > Is that all?
> > Am I missing something?
> >
> > Thank you.
> > Sincerely,
> > Huq
> >
> >
> > On Thu, Jun 4, 2020 at 11:04 AM Satish Balay  wrote:
> >
> > > Its best to use --download-hypre with PETSc configure - it installs a
> > > compatible version of hypre.
> > >
> > > If you have a pre-installed hypre, you'l have to:
> > > - make sure its compatible version
> > > - its built with the same MPI, compilers etc as PETSc
> > > - you can use --with-hypre-dir option with PETSc configure
> > >
> > > Satish
> > >
> > > On Thu, 4 Jun 2020, Fazlul Huq wrote:
> > >
> > > > I have HYPRE installed in my machine.
> > > > Ithink, I need to compile PETSc with HYPRE.
> > > > I'm not clear about how to do that?
> > > >
> > > > Thank you.
> > > > Sincerely,
> > > > Huq
> > > >
> > > > On Thu, Jun 4, 2020 at 10:13 AM Matthew Knepley 
> > > wrote:
> > > >
> > > > > On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq 
> wrote:
> > > > >
> > > > >> Thank you.
> > > > >> Working now.
> > > > >>
> > > > >> I think to run the following command I need to configure PETSc
> with
> > > HYPRE.
> > > > >> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type
> > > > >> boomerang
> > > > >>
> > > > >> If I am right, can you please guide me how to configure with
> HYPRE and
> > > > >> run the above command?
> > > > >>
> > > > >
> > > > > --download-hypre
> > > > >
> > > > >   Thanks,
> > > > >
> > > > >  Matt
> > > > >
> > > > >
> > > > >> Thank you.
> > > > >> Sincerely,
> > > > >> Huq
> > > > >>
> > > > >> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley  >
> > > wrote:
> > > > >>
> > > > >>>
> > > > >>> On Thu, Jun 4, 2020 at 9:19 AM Dave May  >
> > > wrote:
> > > > >>>
> > > > 
> > > > 
> > > >  On Thu, 4 Jun 2020 at 14:17, Dave May 
> > > wrote:
> > > > 
> > > > >
> > > > >
> > > > > On Thu, 4 Jun 2020 at 14:15, Matthew Knepley <
> knep...@gmail.com>
> > > > > wrote:
> > > > >
> > > > >> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq 
> > > wrote:
> > > > >>
> > > > >>> Somehow, make is not working.
> > > > >>> Please find the attachment herewith for the terminal readout.
> > > > >>>
> > > > >>
> > > > >> Since you built with PETSC_ARCH=linux-gnu, you need that in
> your
> > > > >> environment.
> > > > >>
> > > > >
> > > > > Or just do
> > > > >
> > > > > make ex5 PETSC_ARCH=linux-gnu
> > > > >
> > > > 
> > > >  sorry I hit send without checking your png)
> > > >  The command should be
> > > > 
> > > >  make ex5 PETSC_ARCH=arch-linux2-c-debug
> > > > 
> > > > >>>
> > > > >>> No, your first one was right.
> > > > >>>
> > > > >>>Matt
> > > > >>>
> > > > >>>
> > > > 
> > > > >
> > > > >
> > > > >>
> > > > >>   Thanks,
> > > > >>
> > > > >>  Matt
> > > > >>
> > > > >>
> > > > >>> Thank you.
> > > > >>>
> > > > >>> Sincerely,
> > > > >>> Huq
> > > > >>>
> > > > >>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley <
> > > knep...@gmail.com>
> > > > >>> wrote:
> > > > >>>
> > > >  On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq <
> huq2...@gmail.com>
> > > >  wrote:
> > > > 
> > > > > Hello,
> > > > >
> > > > > I have a very preliminary question!
> > > > > I think I have installed PETSc correctly cause I got
> following
> > > on
> > > > > the terminal:
> > > > >
> > > > > Command:
> > > > > make PETSC_DIR=/home/huq2090/petsc-3.10.2
> PETSC_ARCH=linux-gnu
> > > > > check
> > > > > Response:
> > > > > Running check examples to verify correct installation
> > > > > Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and
> > > PETSC_ARCH=linux-gnu
> > > > > C/C++ example src/snes/tutorials/ex19 run successfully
> with 1
> > > MPI
> > > > > process
> > > > > C/C++ example src/snes/tutorials/ex19 run successfully
> with 2
> > > MPI
> > > > > processes
> > > > > Fortran example src/snes/tutorials/ex5f run successfully
> with 1
> > > > > MPI process
> > > > > Completed test examples
> > > > >
> > > > > Now, I am trying to run an example from the list of
> provided
> > > > > examples.
> > > > > Can you please help me out, how to run an example problem
> from
> > > the
> > > > > list of examples?
> 

Re: [petsc-users] MatSeqBAIJSetPreallocation

2020-06-04 Thread Satish Balay via petsc-users
On Thu, 4 Jun 2020, Sanjay Govindjee wrote:

> I'm moving from 3.10 to 3.13 and ran into a compilation problem with 
> MatSeqBAIJSetPreallocation( ).
> The manual page shows:
> 
> PetscErrorCode
> 
> MatSeqBAIJSetPreallocation
> (Mat
> 
> B,PetscInt
> 
> bs,PetscInt
> 
> nz,const PetscInt
> 
> nnz[])
> 
> 
> Which I think is the way it was before but my code is now tossing a compile
> error
> 
> 
>    65 |  & PETSC_NULL_INTEGER,mr(np(246)),
>   | 1
> Error: Rank mismatch in argument 'c' at (1) (scalar and rank-1)
> 
> 
> The full line looks like:
>         call MatSeqBAIJSetPreallocation(Mmat,nsbk,
>     & PETSC_NULL_INTEGER,mr(np(246)),

I think this should be PETSC_DEFAULT_INTEGER.

Previously there were no Interface definitions - so no error checks by the 
compiler.

Satish

>     & ierr)
> 
> Any suggestions on what I've messed up?
> -sanjay
> 
> 


Re: [petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

2020-06-04 Thread Lisandro Dalcin
(1) You can use PETSc.Sys.pushErrorHandler("abort"), but it will not help
you. What you really need is to override PETSc's default signal handling

(2) While it is true that PETSc overrides the signal handler, you can
override it again from python after from petsc4py import PETSc.

For implementing (2), maybe you should try sending SIGINT and not SIGTERM,
such that you can do the following.

from petsc4py import PETSc

import signal
signal.signal(signal.SIGINT, signal.default_int_handler)

...

if __name__ == "__main__":
try:
main()
except KeyboardInterrupt: # Triggered if Ctrl+C or signaled with SIGINT
... # do cleanup if needed

Otherwise, you just need  signal.signal(signal.SIGINT, signal.SIG_DFL)


PS: I'm not in favor of changing current PETSc's signal handling behavior.
This particular issue is fixable with two lines of Python code:

from signal import signal, SIGINT, SIG_DFL
signal(SIGINT, SIG_DFL)



On Thu, 4 Jun 2020 at 23:39, Hudson, Stephen Tobias P 
wrote:

> Lisandro,
>
> I don't see an interface to set this through petsc4py. Is it possible?
>
> Thanks,
> Steve
> --
> *From:* Hudson, Stephen Tobias P 
> *Sent:* Thursday, June 4, 2020 2:47 PM
> *To:* Balay, Satish 
> *Cc:* petsc-users@mcs.anl.gov ; Lisandro Dalcin <
> dalc...@gmail.com>
> *Subject:* Re: Terminating a process running petsc via petsc4py without
> mpi_abort
>
> Sounds good. I will have a look at how to set this through petsc4py.
>
> Thanks
> Steve
> --
> *From:* Satish Balay 
> *Sent:* Thursday, June 4, 2020 2:32 PM
> *To:* Hudson, Stephen Tobias P 
> *Cc:* petsc-users@mcs.anl.gov ; Lisandro Dalcin <
> dalc...@gmail.com>
> *Subject:* Re: Terminating a process running petsc via petsc4py without
> mpi_abort
>
> I don't completely understand the issue here. How is sequential run
> different than parallel run?
>
> In both cases - a PetscErrorHandler is likely getting invoked. One can
> change this behavior with:
>
>
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html
>
> And there are a few default error handlers to choose
>
>
> PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscEmacsClientErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscAttachDebuggerErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
>
> Some of the are accessible via command line option. for ex:
> -on_error_abort or -on_error_mpiabort
>
> Or perhaps you want to completely disable error handler with:
> -no_signal_handler
>
> cc: petsc-users
>
> Satish
>
> On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:
>
> > Satish,
> >
> > We are having issues caused by MPI_abort getting called when we try to
> terminate a sub-process running petsc4py. Ideally we would always use a
> serial build of petsc/petsc4py in this mode, but many users will have a
> parallel build. We need to be able to send a terminate signal that just
> kills the process.
> >
> > Is there a way to turn off the mpi_abort?
> >
> > Thanks,
> >
> > Steve
> >
> >
>
>

-- 
Lisandro Dalcin

Research Scientist
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/


[petsc-users] MatSeqBAIJSetPreallocation

2020-06-04 Thread Sanjay Govindjee
I'm moving from 3.10 to 3.13 and ran into a compilation problem with  
MatSeqBAIJSetPreallocation( ).

The manual page shows:

PetscErrorCode 
 
MatSeqBAIJSetPreallocation 
(Mat 
 
B,PetscInt 
 
bs,PetscInt 
 
nz,const PetscInt 
 
nnz[])



Which I think is the way it was before but my code is now tossing a 
compile error



   65 |  & PETSC_NULL_INTEGER,mr(np(246)),
  | 1
Error: Rank mismatch in argument 'c' at (1) (scalar and rank-1)


The full line looks like:
        call MatSeqBAIJSetPreallocation(Mmat,nsbk,
    & PETSC_NULL_INTEGER,mr(np(246)),
    & ierr)

Any suggestions on what I've messed up?
-sanjay



Re: [petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

2020-06-04 Thread Hudson, Stephen Tobias P via petsc-users
I will try this, thanks!
Steve

From: Junchao Zhang 
Sent: Thursday, June 4, 2020 3:50 PM
To: Hudson, Stephen Tobias P 
Cc: Balay, Satish ; petsc-users@mcs.anl.gov 

Subject: Re: [petsc-users] Terminating a process running petsc via petsc4py 
without mpi_abort

Hi, Steve,
  Try this branch jczhang/let-signal-handler-call-exit to see if it fixed your 
problem. If yes, vote for it at 
https://gitlab.com/petsc/petsc/-/merge_requests/2745 :)

--Junchao Zhang


On Thu, Jun 4, 2020 at 3:40 PM Hudson, Stephen Tobias P via petsc-users 
mailto:petsc-users@mcs.anl.gov>> wrote:
Lisandro,

I don't see an interface to set this through petsc4py. Is it possible?

Thanks,
Steve

From: Hudson, Stephen Tobias P mailto:shud...@anl.gov>>
Sent: Thursday, June 4, 2020 2:47 PM
To: Balay, Satish mailto:ba...@mcs.anl.gov>>
Cc: petsc-users@mcs.anl.gov 
mailto:petsc-users@mcs.anl.gov>>; Lisandro Dalcin 
mailto:dalc...@gmail.com>>
Subject: Re: Terminating a process running petsc via petsc4py without mpi_abort

Sounds good. I will have a look at how to set this through petsc4py.

Thanks
Steve

From: Satish Balay mailto:ba...@mcs.anl.gov>>
Sent: Thursday, June 4, 2020 2:32 PM
To: Hudson, Stephen Tobias P mailto:shud...@anl.gov>>
Cc: petsc-users@mcs.anl.gov 
mailto:petsc-users@mcs.anl.gov>>; Lisandro Dalcin 
mailto:dalc...@gmail.com>>
Subject: Re: Terminating a process running petsc via petsc4py without mpi_abort

I don't completely understand the issue here. How is sequential run different 
than parallel run?

In both cases - a PetscErrorHandler is likely getting invoked. One can change 
this behavior with:

https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html

And there are a few default error handlers to choose


PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscEmacsClientErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAttachDebuggerErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);

Some of the are accessible via command line option. for ex: -on_error_abort or 
-on_error_mpiabort

Or perhaps you want to completely disable error handler with: -no_signal_handler

cc: petsc-users

Satish

On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:

> Satish,
>
> We are having issues caused by MPI_abort getting called when we try to 
> terminate a sub-process running petsc4py. Ideally we would always use a 
> serial build of petsc/petsc4py in this mode, but many users will have a 
> parallel build. We need to be able to send a terminate signal that just kills 
> the process.
>
> Is there a way to turn off the mpi_abort?
>
> Thanks,
>
> Steve
>
>



Re: [petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

2020-06-04 Thread Junchao Zhang
Hi, Steve,
  Try this branch jczhang/let-signal-handler-call-exit to see if it fixed
your problem. If yes, vote for it at
https://gitlab.com/petsc/petsc/-/merge_requests/2745 :)

--Junchao Zhang


On Thu, Jun 4, 2020 at 3:40 PM Hudson, Stephen Tobias P via petsc-users <
petsc-users@mcs.anl.gov> wrote:

> Lisandro,
>
> I don't see an interface to set this through petsc4py. Is it possible?
>
> Thanks,
> Steve
> --
> *From:* Hudson, Stephen Tobias P 
> *Sent:* Thursday, June 4, 2020 2:47 PM
> *To:* Balay, Satish 
> *Cc:* petsc-users@mcs.anl.gov ; Lisandro Dalcin <
> dalc...@gmail.com>
> *Subject:* Re: Terminating a process running petsc via petsc4py without
> mpi_abort
>
> Sounds good. I will have a look at how to set this through petsc4py.
>
> Thanks
> Steve
> --
> *From:* Satish Balay 
> *Sent:* Thursday, June 4, 2020 2:32 PM
> *To:* Hudson, Stephen Tobias P 
> *Cc:* petsc-users@mcs.anl.gov ; Lisandro Dalcin <
> dalc...@gmail.com>
> *Subject:* Re: Terminating a process running petsc via petsc4py without
> mpi_abort
>
> I don't completely understand the issue here. How is sequential run
> different than parallel run?
>
> In both cases - a PetscErrorHandler is likely getting invoked. One can
> change this behavior with:
>
>
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html
>
> And there are a few default error handlers to choose
>
>
> PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscEmacsClientErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscAttachDebuggerErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
>
> Some of the are accessible via command line option. for ex:
> -on_error_abort or -on_error_mpiabort
>
> Or perhaps you want to completely disable error handler with:
> -no_signal_handler
>
> cc: petsc-users
>
> Satish
>
> On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:
>
> > Satish,
> >
> > We are having issues caused by MPI_abort getting called when we try to
> terminate a sub-process running petsc4py. Ideally we would always use a
> serial build of petsc/petsc4py in this mode, but many users will have a
> parallel build. We need to be able to send a terminate signal that just
> kills the process.
> >
> > Is there a way to turn off the mpi_abort?
> >
> > Thanks,
> >
> > Steve
> >
> >
>
>


Re: [petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

2020-06-04 Thread Junchao Zhang
John Peterson sent me an email (Thanks!)


> Regarding our past discussion on PETSc signal handlers, there was a recent
> thread on petsc-users:

https://lists.mcs.anl.gov/pipermail/petsc-users/2020-June/041215.html
> I think this poster's question may be related to signal handlers rather
> than error handlers as Satish replied... unfortunately I am not subscribed
> to petsc-users so I am not able to reply directly, but it may be useful to
> point out the open MR on this topic:
> https://gitlab.com/petsc/petsc/-/merge_requests/2745



I think we should approve this MR as it exactly addresses the Steve's
problem.  PetscXxxxErrorHandler handles errors, not signals, such as
SIGTERM.


On Thu, Jun 4, 2020 at 2:32 PM Satish Balay via petsc-users <
petsc-users@mcs.anl.gov> wrote:

> I don't completely understand the issue here. How is sequential run
> different than parallel run?
>
> In both cases - a PetscErrorHandler is likely getting invoked. One can
> change this behavior with:
>
>
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html
>
> And there are a few default error handlers to choose
>
>
> PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscEmacsClientErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscAttachDebuggerErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
>
> Some of the are accessible via command line option. for ex:
> -on_error_abort or -on_error_mpiabort
>
> Or perhaps you want to completely disable error handler with:
> -no_signal_handler
>
> cc: petsc-users
>
> Satish
>
> On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:
>
> > Satish,
> >
> > We are having issues caused by MPI_abort getting called when we try to
> terminate a sub-process running petsc4py. Ideally we would always use a
> serial build of petsc/petsc4py in this mode, but many users will have a
> parallel build. We need to be able to send a terminate signal that just
> kills the process.
> >
> > Is there a way to turn off the mpi_abort?
> >
> > Thanks,
> >
> > Steve
> >
> >
>
>


Re: [petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

2020-06-04 Thread Hudson, Stephen Tobias P via petsc-users
Lisandro,

I don't see an interface to set this through petsc4py. Is it possible?

Thanks,
Steve

From: Hudson, Stephen Tobias P 
Sent: Thursday, June 4, 2020 2:47 PM
To: Balay, Satish 
Cc: petsc-users@mcs.anl.gov ; Lisandro Dalcin 

Subject: Re: Terminating a process running petsc via petsc4py without mpi_abort

Sounds good. I will have a look at how to set this through petsc4py.

Thanks
Steve

From: Satish Balay 
Sent: Thursday, June 4, 2020 2:32 PM
To: Hudson, Stephen Tobias P 
Cc: petsc-users@mcs.anl.gov ; Lisandro Dalcin 

Subject: Re: Terminating a process running petsc via petsc4py without mpi_abort

I don't completely understand the issue here. How is sequential run different 
than parallel run?

In both cases - a PetscErrorHandler is likely getting invoked. One can change 
this behavior with:

https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html

And there are a few default error handlers to choose


PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscEmacsClientErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAttachDebuggerErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);

Some of the are accessible via command line option. for ex: -on_error_abort or 
-on_error_mpiabort

Or perhaps you want to completely disable error handler with: -no_signal_handler

cc: petsc-users

Satish

On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:

> Satish,
>
> We are having issues caused by MPI_abort getting called when we try to 
> terminate a sub-process running petsc4py. Ideally we would always use a 
> serial build of petsc/petsc4py in this mode, but many users will have a 
> parallel build. We need to be able to send a terminate signal that just kills 
> the process.
>
> Is there a way to turn off the mpi_abort?
>
> Thanks,
>
> Steve
>
>



Re: [petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

2020-06-04 Thread Hudson, Stephen Tobias P via petsc-users
Sounds good. I will have a look at how to set this through petsc4py.

Thanks
Steve

From: Satish Balay 
Sent: Thursday, June 4, 2020 2:32 PM
To: Hudson, Stephen Tobias P 
Cc: petsc-users@mcs.anl.gov ; Lisandro Dalcin 

Subject: Re: Terminating a process running petsc via petsc4py without mpi_abort

I don't completely understand the issue here. How is sequential run different 
than parallel run?

In both cases - a PetscErrorHandler is likely getting invoked. One can change 
this behavior with:

https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html

And there are a few default error handlers to choose


PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscEmacsClientErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAttachDebuggerErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);

Some of the are accessible via command line option. for ex: -on_error_abort or 
-on_error_mpiabort

Or perhaps you want to completely disable error handler with: -no_signal_handler

cc: petsc-users

Satish

On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:

> Satish,
>
> We are having issues caused by MPI_abort getting called when we try to 
> terminate a sub-process running petsc4py. Ideally we would always use a 
> serial build of petsc/petsc4py in this mode, but many users will have a 
> parallel build. We need to be able to send a terminate signal that just kills 
> the process.
>
> Is there a way to turn off the mpi_abort?
>
> Thanks,
>
> Steve
>
>



Re: [petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

2020-06-04 Thread Satish Balay via petsc-users
I don't completely understand the issue here. How is sequential run different 
than parallel run?

In both cases - a PetscErrorHandler is likely getting invoked. One can change 
this behavior with:

https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html

And there are a few default error handlers to choose


PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscEmacsClientErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscAttachDebuggerErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const 
char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);

Some of the are accessible via command line option. for ex: -on_error_abort or 
-on_error_mpiabort

Or perhaps you want to completely disable error handler with: -no_signal_handler

cc: petsc-users

Satish

On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:

> Satish,
> 
> We are having issues caused by MPI_abort getting called when we try to 
> terminate a sub-process running petsc4py. Ideally we would always use a 
> serial build of petsc/petsc4py in this mode, but many users will have a 
> parallel build. We need to be able to send a terminate signal that just kills 
> the process.
> 
> Is there a way to turn off the mpi_abort?
> 
> Thanks,
> 
> Steve
> 
> 



Re: [petsc-users] Running example problem

2020-06-04 Thread Satish Balay via petsc-users
Should work 

If it fails -  send us corresponding configure.log

Satish

On Thu, 4 Jun 2020, Fazlul Huq wrote:

> I think it's okay to have a separate version of hypre for PETSc.
> So, what I understand is I have to do,
> 
> ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> --download-mpich --download-fblaslapack --download-hypre
> make all test
> 
> Is that all?
> Am I missing something?
> 
> Thank you.
> Sincerely,
> Huq
> 
> 
> On Thu, Jun 4, 2020 at 11:04 AM Satish Balay  wrote:
> 
> > Its best to use --download-hypre with PETSc configure - it installs a
> > compatible version of hypre.
> >
> > If you have a pre-installed hypre, you'l have to:
> > - make sure its compatible version
> > - its built with the same MPI, compilers etc as PETSc
> > - you can use --with-hypre-dir option with PETSc configure
> >
> > Satish
> >
> > On Thu, 4 Jun 2020, Fazlul Huq wrote:
> >
> > > I have HYPRE installed in my machine.
> > > Ithink, I need to compile PETSc with HYPRE.
> > > I'm not clear about how to do that?
> > >
> > > Thank you.
> > > Sincerely,
> > > Huq
> > >
> > > On Thu, Jun 4, 2020 at 10:13 AM Matthew Knepley 
> > wrote:
> > >
> > > > On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq  wrote:
> > > >
> > > >> Thank you.
> > > >> Working now.
> > > >>
> > > >> I think to run the following command I need to configure PETSc with
> > HYPRE.
> > > >> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type
> > > >> boomerang
> > > >>
> > > >> If I am right, can you please guide me how to configure with HYPRE and
> > > >> run the above command?
> > > >>
> > > >
> > > > --download-hypre
> > > >
> > > >   Thanks,
> > > >
> > > >  Matt
> > > >
> > > >
> > > >> Thank you.
> > > >> Sincerely,
> > > >> Huq
> > > >>
> > > >> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley 
> > wrote:
> > > >>
> > > >>>
> > > >>> On Thu, Jun 4, 2020 at 9:19 AM Dave May 
> > wrote:
> > > >>>
> > > 
> > > 
> > >  On Thu, 4 Jun 2020 at 14:17, Dave May 
> > wrote:
> > > 
> > > >
> > > >
> > > > On Thu, 4 Jun 2020 at 14:15, Matthew Knepley 
> > > > wrote:
> > > >
> > > >> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq 
> > wrote:
> > > >>
> > > >>> Somehow, make is not working.
> > > >>> Please find the attachment herewith for the terminal readout.
> > > >>>
> > > >>
> > > >> Since you built with PETSC_ARCH=linux-gnu, you need that in your
> > > >> environment.
> > > >>
> > > >
> > > > Or just do
> > > >
> > > > make ex5 PETSC_ARCH=linux-gnu
> > > >
> > > 
> > >  sorry I hit send without checking your png)
> > >  The command should be
> > > 
> > >  make ex5 PETSC_ARCH=arch-linux2-c-debug
> > > 
> > > >>>
> > > >>> No, your first one was right.
> > > >>>
> > > >>>Matt
> > > >>>
> > > >>>
> > > 
> > > >
> > > >
> > > >>
> > > >>   Thanks,
> > > >>
> > > >>  Matt
> > > >>
> > > >>
> > > >>> Thank you.
> > > >>>
> > > >>> Sincerely,
> > > >>> Huq
> > > >>>
> > > >>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley <
> > knep...@gmail.com>
> > > >>> wrote:
> > > >>>
> > >  On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq 
> > >  wrote:
> > > 
> > > > Hello,
> > > >
> > > > I have a very preliminary question!
> > > > I think I have installed PETSc correctly cause I got following
> > on
> > > > the terminal:
> > > >
> > > > Command:
> > > > make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu
> > > > check
> > > > Response:
> > > > Running check examples to verify correct installation
> > > > Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and
> > PETSC_ARCH=linux-gnu
> > > > C/C++ example src/snes/tutorials/ex19 run successfully with 1
> > MPI
> > > > process
> > > > C/C++ example src/snes/tutorials/ex19 run successfully with 2
> > MPI
> > > > processes
> > > > Fortran example src/snes/tutorials/ex5f run successfully with 1
> > > > MPI process
> > > > Completed test examples
> > > >
> > > > Now, I am trying to run an example from the list of provided
> > > > examples.
> > > > Can you please help me out, how to run an example problem from
> > the
> > > > list of examples?
> > > > I mean, how to make executable and run the executable?
> > > >
> > > 
> > >  cd $PETSC_DIR
> > >  cd src/snes/tutorials
> > >  make ex5
> > >  ./ex5 -snes_monitor
> > > 
> > >    Thanks,
> > > 
> > >   Matt
> > > 
> > > 
> > > > Thank you.
> > > > Sincerely,
> > > > Huq
> > > > --
> > > >
> > > > Fazlul Huq
> > > > Graduate Research Assistant
> > > > Department of Nuclear, Plasma & Radiological 

Re: [petsc-users] Running example problem

2020-06-04 Thread Fazlul Huq
I think it's okay to have a separate version of hypre for PETSc.
So, what I understand is I have to do,

./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
--download-mpich --download-fblaslapack --download-hypre
make all test

Is that all?
Am I missing something?

Thank you.
Sincerely,
Huq


On Thu, Jun 4, 2020 at 11:04 AM Satish Balay  wrote:

> Its best to use --download-hypre with PETSc configure - it installs a
> compatible version of hypre.
>
> If you have a pre-installed hypre, you'l have to:
> - make sure its compatible version
> - its built with the same MPI, compilers etc as PETSc
> - you can use --with-hypre-dir option with PETSc configure
>
> Satish
>
> On Thu, 4 Jun 2020, Fazlul Huq wrote:
>
> > I have HYPRE installed in my machine.
> > Ithink, I need to compile PETSc with HYPRE.
> > I'm not clear about how to do that?
> >
> > Thank you.
> > Sincerely,
> > Huq
> >
> > On Thu, Jun 4, 2020 at 10:13 AM Matthew Knepley 
> wrote:
> >
> > > On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq  wrote:
> > >
> > >> Thank you.
> > >> Working now.
> > >>
> > >> I think to run the following command I need to configure PETSc with
> HYPRE.
> > >> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type
> > >> boomerang
> > >>
> > >> If I am right, can you please guide me how to configure with HYPRE and
> > >> run the above command?
> > >>
> > >
> > > --download-hypre
> > >
> > >   Thanks,
> > >
> > >  Matt
> > >
> > >
> > >> Thank you.
> > >> Sincerely,
> > >> Huq
> > >>
> > >> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley 
> wrote:
> > >>
> > >>>
> > >>> On Thu, Jun 4, 2020 at 9:19 AM Dave May 
> wrote:
> > >>>
> > 
> > 
> >  On Thu, 4 Jun 2020 at 14:17, Dave May 
> wrote:
> > 
> > >
> > >
> > > On Thu, 4 Jun 2020 at 14:15, Matthew Knepley 
> > > wrote:
> > >
> > >> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq 
> wrote:
> > >>
> > >>> Somehow, make is not working.
> > >>> Please find the attachment herewith for the terminal readout.
> > >>>
> > >>
> > >> Since you built with PETSC_ARCH=linux-gnu, you need that in your
> > >> environment.
> > >>
> > >
> > > Or just do
> > >
> > > make ex5 PETSC_ARCH=linux-gnu
> > >
> > 
> >  sorry I hit send without checking your png)
> >  The command should be
> > 
> >  make ex5 PETSC_ARCH=arch-linux2-c-debug
> > 
> > >>>
> > >>> No, your first one was right.
> > >>>
> > >>>Matt
> > >>>
> > >>>
> > 
> > >
> > >
> > >>
> > >>   Thanks,
> > >>
> > >>  Matt
> > >>
> > >>
> > >>> Thank you.
> > >>>
> > >>> Sincerely,
> > >>> Huq
> > >>>
> > >>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley <
> knep...@gmail.com>
> > >>> wrote:
> > >>>
> >  On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq 
> >  wrote:
> > 
> > > Hello,
> > >
> > > I have a very preliminary question!
> > > I think I have installed PETSc correctly cause I got following
> on
> > > the terminal:
> > >
> > > Command:
> > > make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu
> > > check
> > > Response:
> > > Running check examples to verify correct installation
> > > Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and
> PETSC_ARCH=linux-gnu
> > > C/C++ example src/snes/tutorials/ex19 run successfully with 1
> MPI
> > > process
> > > C/C++ example src/snes/tutorials/ex19 run successfully with 2
> MPI
> > > processes
> > > Fortran example src/snes/tutorials/ex5f run successfully with 1
> > > MPI process
> > > Completed test examples
> > >
> > > Now, I am trying to run an example from the list of provided
> > > examples.
> > > Can you please help me out, how to run an example problem from
> the
> > > list of examples?
> > > I mean, how to make executable and run the executable?
> > >
> > 
> >  cd $PETSC_DIR
> >  cd src/snes/tutorials
> >  make ex5
> >  ./ex5 -snes_monitor
> > 
> >    Thanks,
> > 
> >   Matt
> > 
> > 
> > > Thank you.
> > > Sincerely,
> > > Huq
> > > --
> > >
> > > Fazlul Huq
> > > Graduate Research Assistant
> > > Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> > > University of Illinois at Urbana-Champaign (UIUC)
> > > E-mail: huq2...@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
> > 
> >  https://www.cse.buffalo.edu/~knepley/

Re: [petsc-users] Running example problem

2020-06-04 Thread Satish Balay via petsc-users
Its best to use --download-hypre with PETSc configure - it installs a 
compatible version of hypre.

If you have a pre-installed hypre, you'l have to:
- make sure its compatible version
- its built with the same MPI, compilers etc as PETSc
- you can use --with-hypre-dir option with PETSc configure

Satish

On Thu, 4 Jun 2020, Fazlul Huq wrote:

> I have HYPRE installed in my machine.
> Ithink, I need to compile PETSc with HYPRE.
> I'm not clear about how to do that?
> 
> Thank you.
> Sincerely,
> Huq
> 
> On Thu, Jun 4, 2020 at 10:13 AM Matthew Knepley  wrote:
> 
> > On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq  wrote:
> >
> >> Thank you.
> >> Working now.
> >>
> >> I think to run the following command I need to configure PETSc with HYPRE.
> >> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type
> >> boomerang
> >>
> >> If I am right, can you please guide me how to configure with HYPRE and
> >> run the above command?
> >>
> >
> > --download-hypre
> >
> >   Thanks,
> >
> >  Matt
> >
> >
> >> Thank you.
> >> Sincerely,
> >> Huq
> >>
> >> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley  wrote:
> >>
> >>>
> >>> On Thu, Jun 4, 2020 at 9:19 AM Dave May  wrote:
> >>>
> 
> 
>  On Thu, 4 Jun 2020 at 14:17, Dave May  wrote:
> 
> >
> >
> > On Thu, 4 Jun 2020 at 14:15, Matthew Knepley 
> > wrote:
> >
> >> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:
> >>
> >>> Somehow, make is not working.
> >>> Please find the attachment herewith for the terminal readout.
> >>>
> >>
> >> Since you built with PETSC_ARCH=linux-gnu, you need that in your
> >> environment.
> >>
> >
> > Or just do
> >
> > make ex5 PETSC_ARCH=linux-gnu
> >
> 
>  sorry I hit send without checking your png)
>  The command should be
> 
>  make ex5 PETSC_ARCH=arch-linux2-c-debug
> 
> >>>
> >>> No, your first one was right.
> >>>
> >>>Matt
> >>>
> >>>
> 
> >
> >
> >>
> >>   Thanks,
> >>
> >>  Matt
> >>
> >>
> >>> Thank you.
> >>>
> >>> Sincerely,
> >>> Huq
> >>>
> >>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley 
> >>> wrote:
> >>>
>  On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq 
>  wrote:
> 
> > Hello,
> >
> > I have a very preliminary question!
> > I think I have installed PETSc correctly cause I got following on
> > the terminal:
> >
> > Command:
> > make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu
> > check
> > Response:
> > Running check examples to verify correct installation
> > Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
> > C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
> > process
> > C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
> > processes
> > Fortran example src/snes/tutorials/ex5f run successfully with 1
> > MPI process
> > Completed test examples
> >
> > Now, I am trying to run an example from the list of provided
> > examples.
> > Can you please help me out, how to run an example problem from the
> > list of examples?
> > I mean, how to make executable and run the executable?
> >
> 
>  cd $PETSC_DIR
>  cd src/snes/tutorials
>  make ex5
>  ./ex5 -snes_monitor
> 
>    Thanks,
> 
>   Matt
> 
> 
> > Thank you.
> > Sincerely,
> > Huq
> > --
> >
> > Fazlul Huq
> > Graduate Research Assistant
> > Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> > University of Illinois at Urbana-Champaign (UIUC)
> > E-mail: huq2...@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
> 
>  https://www.cse.buffalo.edu/~knepley/
>  
> 
> >>>
> >>>
> >>> --
> >>>
> >>> Fazlul Huq
> >>> Graduate Research Assistant
> >>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> >>> University of Illinois at Urbana-Champaign (UIUC)
> >>> E-mail: huq2...@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
> >>
> >> https://www.cse.buffalo.edu/~knepley/
> >> 
> >>
> 

Re: [petsc-users] Running example problem

2020-06-04 Thread Matthew Knepley
On Thu, Jun 4, 2020 at 11:56 AM Fazlul Huq  wrote:

> I have HYPRE installed in my machine.
> Ithink, I need to compile PETSc with HYPRE.
> I'm not clear about how to do that?
>

1) Make sure it is the correct version

2) --with-hypre-dir=

  Thanks,

 Matt


> Thank you.
> Sincerely,
> Huq
>
> On Thu, Jun 4, 2020 at 10:13 AM Matthew Knepley  wrote:
>
>> On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq  wrote:
>>
>>> Thank you.
>>> Working now.
>>>
>>> I think to run the following command I need to configure PETSc with
>>> HYPRE.
>>> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type
>>> boomerang
>>>
>>> If I am right, can you please guide me how to configure with HYPRE and
>>> run the above command?
>>>
>>
>> --download-hypre
>>
>>   Thanks,
>>
>>  Matt
>>
>>
>>> Thank you.
>>> Sincerely,
>>> Huq
>>>
>>> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley 
>>> wrote:
>>>

 On Thu, Jun 4, 2020 at 9:19 AM Dave May 
 wrote:

>
>
> On Thu, 4 Jun 2020 at 14:17, Dave May  wrote:
>
>>
>>
>> On Thu, 4 Jun 2020 at 14:15, Matthew Knepley 
>> wrote:
>>
>>> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:
>>>
 Somehow, make is not working.
 Please find the attachment herewith for the terminal readout.

>>>
>>> Since you built with PETSC_ARCH=linux-gnu, you need that in your
>>> environment.
>>>
>>
>> Or just do
>>
>> make ex5 PETSC_ARCH=linux-gnu
>>
>
> sorry I hit send without checking your png)
> The command should be
>
> make ex5 PETSC_ARCH=arch-linux2-c-debug
>

 No, your first one was right.

Matt


>
>>
>>
>>>
>>>   Thanks,
>>>
>>>  Matt
>>>
>>>
 Thank you.

 Sincerely,
 Huq

 On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley 
 wrote:

> On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq 
> wrote:
>
>> Hello,
>>
>> I have a very preliminary question!
>> I think I have installed PETSc correctly cause I got following on
>> the terminal:
>>
>> Command:
>> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu
>> check
>> Response:
>> Running check examples to verify correct installation
>> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and
>> PETSC_ARCH=linux-gnu
>> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
>> process
>> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
>> processes
>> Fortran example src/snes/tutorials/ex5f run successfully with 1
>> MPI process
>> Completed test examples
>>
>> Now, I am trying to run an example from the list of provided
>> examples.
>> Can you please help me out, how to run an example problem from
>> the list of examples?
>> I mean, how to make executable and run the executable?
>>
>
> cd $PETSC_DIR
> cd src/snes/tutorials
> make ex5
> ./ex5 -snes_monitor
>
>   Thanks,
>
>  Matt
>
>
>> Thank you.
>> Sincerely,
>> Huq
>> --
>>
>> Fazlul Huq
>> Graduate Research Assistant
>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>> University of Illinois at Urbana-Champaign (UIUC)
>> E-mail: huq2...@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
>
> https://www.cse.buffalo.edu/~knepley/
> 
>


 --

 Fazlul Huq
 Graduate Research Assistant
 Department of Nuclear, Plasma & Radiological Engineering (NPRE)
 University of Illinois at Urbana-Champaign (UIUC)
 E-mail: huq2...@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
>>>
>>> https://www.cse.buffalo.edu/~knepley/
>>> 
>>>
>>

 --
 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

 https://www.cse.buffalo.edu/~knepley/
 

>>>
>>>
>>> --
>>>
>>> Fazlul Huq
>>> 

Re: [petsc-users] Running example problem

2020-06-04 Thread Fazlul Huq
I have HYPRE installed in my machine.
Ithink, I need to compile PETSc with HYPRE.
I'm not clear about how to do that?

Thank you.
Sincerely,
Huq

On Thu, Jun 4, 2020 at 10:13 AM Matthew Knepley  wrote:

> On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq  wrote:
>
>> Thank you.
>> Working now.
>>
>> I think to run the following command I need to configure PETSc with HYPRE.
>> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type
>> boomerang
>>
>> If I am right, can you please guide me how to configure with HYPRE and
>> run the above command?
>>
>
> --download-hypre
>
>   Thanks,
>
>  Matt
>
>
>> Thank you.
>> Sincerely,
>> Huq
>>
>> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley  wrote:
>>
>>>
>>> On Thu, Jun 4, 2020 at 9:19 AM Dave May  wrote:
>>>


 On Thu, 4 Jun 2020 at 14:17, Dave May  wrote:

>
>
> On Thu, 4 Jun 2020 at 14:15, Matthew Knepley 
> wrote:
>
>> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:
>>
>>> Somehow, make is not working.
>>> Please find the attachment herewith for the terminal readout.
>>>
>>
>> Since you built with PETSC_ARCH=linux-gnu, you need that in your
>> environment.
>>
>
> Or just do
>
> make ex5 PETSC_ARCH=linux-gnu
>

 sorry I hit send without checking your png)
 The command should be

 make ex5 PETSC_ARCH=arch-linux2-c-debug

>>>
>>> No, your first one was right.
>>>
>>>Matt
>>>
>>>

>
>
>>
>>   Thanks,
>>
>>  Matt
>>
>>
>>> Thank you.
>>>
>>> Sincerely,
>>> Huq
>>>
>>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley 
>>> wrote:
>>>
 On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq 
 wrote:

> Hello,
>
> I have a very preliminary question!
> I think I have installed PETSc correctly cause I got following on
> the terminal:
>
> Command:
> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu
> check
> Response:
> Running check examples to verify correct installation
> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
> process
> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
> processes
> Fortran example src/snes/tutorials/ex5f run successfully with 1
> MPI process
> Completed test examples
>
> Now, I am trying to run an example from the list of provided
> examples.
> Can you please help me out, how to run an example problem from the
> list of examples?
> I mean, how to make executable and run the executable?
>

 cd $PETSC_DIR
 cd src/snes/tutorials
 make ex5
 ./ex5 -snes_monitor

   Thanks,

  Matt


> Thank you.
> Sincerely,
> Huq
> --
>
> Fazlul Huq
> Graduate Research Assistant
> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> University of Illinois at Urbana-Champaign (UIUC)
> E-mail: huq2...@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

 https://www.cse.buffalo.edu/~knepley/
 

>>>
>>>
>>> --
>>>
>>> Fazlul Huq
>>> Graduate Research Assistant
>>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>>> University of Illinois at Urbana-Champaign (UIUC)
>>> E-mail: huq2...@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
>>
>> https://www.cse.buffalo.edu/~knepley/
>> 
>>
>
>>>
>>> --
>>> 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
>>>
>>> https://www.cse.buffalo.edu/~knepley/
>>> 
>>>
>>
>>
>> --
>>
>> Fazlul Huq
>> Graduate Research Assistant
>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>> University of Illinois at Urbana-Champaign (UIUC)
>> E-mail: huq2...@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 

Re: [petsc-users] Running example problem

2020-06-04 Thread Matthew Knepley
On Thu, Jun 4, 2020 at 10:28 AM Fazlul Huq  wrote:

> Thank you.
> Working now.
>
> I think to run the following command I need to configure PETSc with HYPRE.
> mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type boomerang
>
> If I am right, can you please guide me how to configure with HYPRE and run
> the above command?
>

--download-hypre

  Thanks,

 Matt


> Thank you.
> Sincerely,
> Huq
>
> On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley  wrote:
>
>>
>> On Thu, Jun 4, 2020 at 9:19 AM Dave May  wrote:
>>
>>>
>>>
>>> On Thu, 4 Jun 2020 at 14:17, Dave May  wrote:
>>>


 On Thu, 4 Jun 2020 at 14:15, Matthew Knepley  wrote:

> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:
>
>> Somehow, make is not working.
>> Please find the attachment herewith for the terminal readout.
>>
>
> Since you built with PETSC_ARCH=linux-gnu, you need that in your
> environment.
>

 Or just do

 make ex5 PETSC_ARCH=linux-gnu

>>>
>>> sorry I hit send without checking your png)
>>> The command should be
>>>
>>> make ex5 PETSC_ARCH=arch-linux2-c-debug
>>>
>>
>> No, your first one was right.
>>
>>Matt
>>
>>
>>>


>
>   Thanks,
>
>  Matt
>
>
>> Thank you.
>>
>> Sincerely,
>> Huq
>>
>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley 
>> wrote:
>>
>>> On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:
>>>
 Hello,

 I have a very preliminary question!
 I think I have installed PETSc correctly cause I got following on
 the terminal:

 Command:
 make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
 Response:
 Running check examples to verify correct installation
 Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
 C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
 process
 C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
 processes
 Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI
 process
 Completed test examples

 Now, I am trying to run an example from the list of provided
 examples.
 Can you please help me out, how to run an example problem from the
 list of examples?
 I mean, how to make executable and run the executable?

>>>
>>> cd $PETSC_DIR
>>> cd src/snes/tutorials
>>> make ex5
>>> ./ex5 -snes_monitor
>>>
>>>   Thanks,
>>>
>>>  Matt
>>>
>>>
 Thank you.
 Sincerely,
 Huq
 --

 Fazlul Huq
 Graduate Research Assistant
 Department of Nuclear, Plasma & Radiological Engineering (NPRE)
 University of Illinois at Urbana-Champaign (UIUC)
 E-mail: huq2...@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
>>>
>>> https://www.cse.buffalo.edu/~knepley/
>>> 
>>>
>>
>>
>> --
>>
>> Fazlul Huq
>> Graduate Research Assistant
>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>> University of Illinois at Urbana-Champaign (UIUC)
>> E-mail: huq2...@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
>
> https://www.cse.buffalo.edu/~knepley/
> 
>

>>
>> --
>> 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
>>
>> https://www.cse.buffalo.edu/~knepley/
>> 
>>
>
>
> --
>
> Fazlul Huq
> Graduate Research Assistant
> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> University of Illinois at Urbana-Champaign (UIUC)
> E-mail: huq2...@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

https://www.cse.buffalo.edu/~knepley/ 


Re: [petsc-users] Slow speed to SetValues for matrix created by PETSC by mat_initial_matrix

2020-06-04 Thread Zhang, Hong via petsc-users
Check the output of MatMatMult(). If your matrix product has all diagonal 
entries? How large is your matrix?
Hong


From: petsc-users  on behalf of Yang Juntao 

Sent: Thursday, June 4, 2020 4:01 AM
To: petsc-users@mcs.anl.gov 
Subject: [petsc-users] Slow speed to SetValues for matrix created by PETSC by 
mat_initial_matrix

Hello,

I computed a preconditioned matrix by MatMatMulti(), and I generated the new 
matrix with option MAT_INITIAL_MATRIX.

However I need to change the generated matrix by insert value 1 to half of the 
diagonal. MatSetValue() is used but the speed a much slower than MatSetValue 
with matrix setup by MatCreate() and MatSeqAIJPreallocation().
I would like to ask is it due to the preallocation setting of 
MAT_INITIAL_MATRIX generated matrix and how I can change it?

Thanks in advance
JT


Re: [petsc-users] Running example problem

2020-06-04 Thread Fazlul Huq
Thank you.
Working now.

I think to run the following command I need to configure PETSc with HYPRE.
mpiexec -np 1 ./poisson_m -n 10 -pc_type hypre -pc_hypre_type boomerang

If I am right, can you please guide me how to configure with HYPRE and run
the above command?

Thank you.
Sincerely,
Huq

On Thu, Jun 4, 2020 at 8:34 AM Matthew Knepley  wrote:

>
> On Thu, Jun 4, 2020 at 9:19 AM Dave May  wrote:
>
>>
>>
>> On Thu, 4 Jun 2020 at 14:17, Dave May  wrote:
>>
>>>
>>>
>>> On Thu, 4 Jun 2020 at 14:15, Matthew Knepley  wrote:
>>>
 On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:

> Somehow, make is not working.
> Please find the attachment herewith for the terminal readout.
>

 Since you built with PETSC_ARCH=linux-gnu, you need that in your
 environment.

>>>
>>> Or just do
>>>
>>> make ex5 PETSC_ARCH=linux-gnu
>>>
>>
>> sorry I hit send without checking your png)
>> The command should be
>>
>> make ex5 PETSC_ARCH=arch-linux2-c-debug
>>
>
> No, your first one was right.
>
>Matt
>
>
>>
>>>
>>>

   Thanks,

  Matt


> Thank you.
>
> Sincerely,
> Huq
>
> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley 
> wrote:
>
>> On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:
>>
>>> Hello,
>>>
>>> I have a very preliminary question!
>>> I think I have installed PETSc correctly cause I got following on
>>> the terminal:
>>>
>>> Command:
>>> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
>>> Response:
>>> Running check examples to verify correct installation
>>> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
>>> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
>>> process
>>> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
>>> processes
>>> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI
>>> process
>>> Completed test examples
>>>
>>> Now, I am trying to run an example from the list of provided
>>> examples.
>>> Can you please help me out, how to run an example problem from the
>>> list of examples?
>>> I mean, how to make executable and run the executable?
>>>
>>
>> cd $PETSC_DIR
>> cd src/snes/tutorials
>> make ex5
>> ./ex5 -snes_monitor
>>
>>   Thanks,
>>
>>  Matt
>>
>>
>>> Thank you.
>>> Sincerely,
>>> Huq
>>> --
>>>
>>> Fazlul Huq
>>> Graduate Research Assistant
>>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>>> University of Illinois at Urbana-Champaign (UIUC)
>>> E-mail: huq2...@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
>>
>> https://www.cse.buffalo.edu/~knepley/
>> 
>>
>
>
> --
>
> Fazlul Huq
> Graduate Research Assistant
> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> University of Illinois at Urbana-Champaign (UIUC)
> E-mail: huq2...@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

 https://www.cse.buffalo.edu/~knepley/
 

>>>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
> 
>


-- 

Fazlul Huq
Graduate Research Assistant
Department of Nuclear, Plasma & Radiological Engineering (NPRE)
University of Illinois at Urbana-Champaign (UIUC)
E-mail: huq2...@gmail.com


Re: [petsc-users] Running example problem

2020-06-04 Thread Matthew Knepley
On Thu, Jun 4, 2020 at 9:19 AM Dave May  wrote:

>
>
> On Thu, 4 Jun 2020 at 14:17, Dave May  wrote:
>
>>
>>
>> On Thu, 4 Jun 2020 at 14:15, Matthew Knepley  wrote:
>>
>>> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:
>>>
 Somehow, make is not working.
 Please find the attachment herewith for the terminal readout.

>>>
>>> Since you built with PETSC_ARCH=linux-gnu, you need that in your
>>> environment.
>>>
>>
>> Or just do
>>
>> make ex5 PETSC_ARCH=linux-gnu
>>
>
> sorry I hit send without checking your png)
> The command should be
>
> make ex5 PETSC_ARCH=arch-linux2-c-debug
>

No, your first one was right.

   Matt


>
>>
>>
>>>
>>>   Thanks,
>>>
>>>  Matt
>>>
>>>
 Thank you.

 Sincerely,
 Huq

 On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley 
 wrote:

> On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:
>
>> Hello,
>>
>> I have a very preliminary question!
>> I think I have installed PETSc correctly cause I got following on the
>> terminal:
>>
>> Command:
>> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
>> Response:
>> Running check examples to verify correct installation
>> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
>> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
>> process
>> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
>> processes
>> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI
>> process
>> Completed test examples
>>
>> Now, I am trying to run an example from the list of provided
>> examples.
>> Can you please help me out, how to run an example problem from the
>> list of examples?
>> I mean, how to make executable and run the executable?
>>
>
> cd $PETSC_DIR
> cd src/snes/tutorials
> make ex5
> ./ex5 -snes_monitor
>
>   Thanks,
>
>  Matt
>
>
>> Thank you.
>> Sincerely,
>> Huq
>> --
>>
>> Fazlul Huq
>> Graduate Research Assistant
>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>> University of Illinois at Urbana-Champaign (UIUC)
>> E-mail: huq2...@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
>
> https://www.cse.buffalo.edu/~knepley/
> 
>


 --

 Fazlul Huq
 Graduate Research Assistant
 Department of Nuclear, Plasma & Radiological Engineering (NPRE)
 University of Illinois at Urbana-Champaign (UIUC)
 E-mail: huq2...@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
>>>
>>> https://www.cse.buffalo.edu/~knepley/
>>> 
>>>
>>

-- 
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

https://www.cse.buffalo.edu/~knepley/ 


Re: [petsc-users] Running example problem

2020-06-04 Thread Dave May
On Thu, 4 Jun 2020 at 14:17, Dave May  wrote:

>
>
> On Thu, 4 Jun 2020 at 14:15, Matthew Knepley  wrote:
>
>> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:
>>
>>> Somehow, make is not working.
>>> Please find the attachment herewith for the terminal readout.
>>>
>>
>> Since you built with PETSC_ARCH=linux-gnu, you need that in your
>> environment.
>>
>
> Or just do
>
> make ex5 PETSC_ARCH=linux-gnu
>

sorry I hit send without checking your png)
The command should be

make ex5 PETSC_ARCH=arch-linux2-c-debug


>
>
>
>
>>
>>   Thanks,
>>
>>  Matt
>>
>>
>>> Thank you.
>>>
>>> Sincerely,
>>> Huq
>>>
>>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley 
>>> wrote:
>>>
 On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:

> Hello,
>
> I have a very preliminary question!
> I think I have installed PETSc correctly cause I got following on the
> terminal:
>
> Command:
> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
> Response:
> Running check examples to verify correct installation
> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
> process
> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
> processes
> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI
> process
> Completed test examples
>
> Now, I am trying to run an example from the list of provided examples.
> Can you please help me out, how to run an example problem from the
> list of examples?
> I mean, how to make executable and run the executable?
>

 cd $PETSC_DIR
 cd src/snes/tutorials
 make ex5
 ./ex5 -snes_monitor

   Thanks,

  Matt


> Thank you.
> Sincerely,
> Huq
> --
>
> Fazlul Huq
> Graduate Research Assistant
> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> University of Illinois at Urbana-Champaign (UIUC)
> E-mail: huq2...@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

 https://www.cse.buffalo.edu/~knepley/
 

>>>
>>>
>>> --
>>>
>>> Fazlul Huq
>>> Graduate Research Assistant
>>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>>> University of Illinois at Urbana-Champaign (UIUC)
>>> E-mail: huq2...@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
>>
>> https://www.cse.buffalo.edu/~knepley/
>> 
>>
>


Re: [petsc-users] Running example problem

2020-06-04 Thread Dave May
On Thu, 4 Jun 2020 at 14:15, Matthew Knepley  wrote:

> On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:
>
>> Somehow, make is not working.
>> Please find the attachment herewith for the terminal readout.
>>
>
> Since you built with PETSC_ARCH=linux-gnu, you need that in your
> environment.
>

Or just do

make ex5 PETSC_ARCH=linux-gnu




>
>   Thanks,
>
>  Matt
>
>
>> Thank you.
>>
>> Sincerely,
>> Huq
>>
>> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley  wrote:
>>
>>> On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:
>>>
 Hello,

 I have a very preliminary question!
 I think I have installed PETSc correctly cause I got following on the
 terminal:

 Command:
 make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
 Response:
 Running check examples to verify correct installation
 Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
 C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI
 process
 C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
 processes
 Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI
 process
 Completed test examples

 Now, I am trying to run an example from the list of provided examples.
 Can you please help me out, how to run an example problem from the list
 of examples?
 I mean, how to make executable and run the executable?

>>>
>>> cd $PETSC_DIR
>>> cd src/snes/tutorials
>>> make ex5
>>> ./ex5 -snes_monitor
>>>
>>>   Thanks,
>>>
>>>  Matt
>>>
>>>
 Thank you.
 Sincerely,
 Huq
 --

 Fazlul Huq
 Graduate Research Assistant
 Department of Nuclear, Plasma & Radiological Engineering (NPRE)
 University of Illinois at Urbana-Champaign (UIUC)
 E-mail: huq2...@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
>>>
>>> https://www.cse.buffalo.edu/~knepley/
>>> 
>>>
>>
>>
>> --
>>
>> Fazlul Huq
>> Graduate Research Assistant
>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>> University of Illinois at Urbana-Champaign (UIUC)
>> E-mail: huq2...@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
>
> https://www.cse.buffalo.edu/~knepley/
> 
>


Re: [petsc-users] Running example problem

2020-06-04 Thread Matthew Knepley
On Thu, Jun 4, 2020 at 9:12 AM Fazlul Huq  wrote:

> Somehow, make is not working.
> Please find the attachment herewith for the terminal readout.
>

Since you built with PETSC_ARCH=linux-gnu, you need that in your
environment.

  Thanks,

 Matt


> Thank you.
>
> Sincerely,
> Huq
>
> On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley  wrote:
>
>> On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:
>>
>>> Hello,
>>>
>>> I have a very preliminary question!
>>> I think I have installed PETSc correctly cause I got following on the
>>> terminal:
>>>
>>> Command:
>>> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
>>> Response:
>>> Running check examples to verify correct installation
>>> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
>>> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
>>> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
>>> processes
>>> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI
>>> process
>>> Completed test examples
>>>
>>> Now, I am trying to run an example from the list of provided examples.
>>> Can you please help me out, how to run an example problem from the list
>>> of examples?
>>> I mean, how to make executable and run the executable?
>>>
>>
>> cd $PETSC_DIR
>> cd src/snes/tutorials
>> make ex5
>> ./ex5 -snes_monitor
>>
>>   Thanks,
>>
>>  Matt
>>
>>
>>> Thank you.
>>> Sincerely,
>>> Huq
>>> --
>>>
>>> Fazlul Huq
>>> Graduate Research Assistant
>>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>>> University of Illinois at Urbana-Champaign (UIUC)
>>> E-mail: huq2...@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
>>
>> https://www.cse.buffalo.edu/~knepley/
>> 
>>
>
>
> --
>
> Fazlul Huq
> Graduate Research Assistant
> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> University of Illinois at Urbana-Champaign (UIUC)
> E-mail: huq2...@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

https://www.cse.buffalo.edu/~knepley/ 


Re: [petsc-users] Running example problem

2020-06-04 Thread Fazlul Huq
Somehow, make is not working.
Please find the attachment herewith for the terminal readout.

Thank you.

Sincerely,
Huq

On Thu, Jun 4, 2020 at 7:57 AM Matthew Knepley  wrote:

> On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:
>
>> Hello,
>>
>> I have a very preliminary question!
>> I think I have installed PETSc correctly cause I got following on the
>> terminal:
>>
>> Command:
>> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
>> Response:
>> Running check examples to verify correct installation
>> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
>> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
>> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI
>> processes
>> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI
>> process
>> Completed test examples
>>
>> Now, I am trying to run an example from the list of provided examples.
>> Can you please help me out, how to run an example problem from the list
>> of examples?
>> I mean, how to make executable and run the executable?
>>
>
> cd $PETSC_DIR
> cd src/snes/tutorials
> make ex5
> ./ex5 -snes_monitor
>
>   Thanks,
>
>  Matt
>
>
>> Thank you.
>> Sincerely,
>> Huq
>> --
>>
>> Fazlul Huq
>> Graduate Research Assistant
>> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
>> University of Illinois at Urbana-Champaign (UIUC)
>> E-mail: huq2...@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
>
> https://www.cse.buffalo.edu/~knepley/
> 
>


-- 

Fazlul Huq
Graduate Research Assistant
Department of Nuclear, Plasma & Radiological Engineering (NPRE)
University of Illinois at Urbana-Champaign (UIUC)
E-mail: huq2...@gmail.com


Re: [petsc-users] Running example problem

2020-06-04 Thread Matthew Knepley
On Thu, Jun 4, 2020 at 8:53 AM Fazlul Huq  wrote:

> Hello,
>
> I have a very preliminary question!
> I think I have installed PETSc correctly cause I got following on the
> terminal:
>
> Command:
> make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
> Response:
> Running check examples to verify correct installation
> Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
> C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
> C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
> Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
> Completed test examples
>
> Now, I am trying to run an example from the list of provided examples.
> Can you please help me out, how to run an example problem from the list of
> examples?
> I mean, how to make executable and run the executable?
>

cd $PETSC_DIR
cd src/snes/tutorials
make ex5
./ex5 -snes_monitor

  Thanks,

 Matt


> Thank you.
> Sincerely,
> Huq
> --
>
> Fazlul Huq
> Graduate Research Assistant
> Department of Nuclear, Plasma & Radiological Engineering (NPRE)
> University of Illinois at Urbana-Champaign (UIUC)
> E-mail: huq2...@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

https://www.cse.buffalo.edu/~knepley/ 


[petsc-users] Running example problem

2020-06-04 Thread Fazlul Huq
Hello,

I have a very preliminary question!
I think I have installed PETSc correctly cause I got following on the
terminal:

Command:
make PETSC_DIR=/home/huq2090/petsc-3.10.2 PETSC_ARCH=linux-gnu check
Response:
Running check examples to verify correct installation
Using PETSC_DIR=/home/huq2090/petsc-3.10.2 and PETSC_ARCH=linux-gnu
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
Completed test examples

Now, I am trying to run an example from the list of provided examples.
Can you please help me out, how to run an example problem from the list of
examples?
I mean, how to make executable and run the executable?

Thank you.
Sincerely,
Huq
-- 

Fazlul Huq
Graduate Research Assistant
Department of Nuclear, Plasma & Radiological Engineering (NPRE)
University of Illinois at Urbana-Champaign (UIUC)
E-mail: huq2...@gmail.com


[petsc-users] Slow speed to SetValues for matrix created by PETSC by mat_initial_matrix

2020-06-04 Thread Yang Juntao
Hello, 

I computed a preconditioned matrix by MatMatMulti(), and I generated the new 
matrix with option MAT_INITIAL_MATRIX. 

However I need to change the generated matrix by insert value 1 to half of the 
diagonal. MatSetValue() is used but the speed a much slower than MatSetValue 
with matrix setup by MatCreate() and MatSeqAIJPreallocation(). 
I would like to ask is it due to the preallocation setting of 
MAT_INITIAL_MATRIX generated matrix and how I can change it?

Thanks in advance
JT