Re: [petsc-users] petsc4py: reuse setup for multiple solver calls?

2018-04-05 Thread Dave May
On Fri, 6 Apr 2018 at 07:48, Robert Speck  wrote:

> Thank you for your answer! Please see below for comments/questions.
>
> On 05.04.18 12:53, Matthew Knepley wrote:
> > On Thu, Apr 5, 2018 at 6:39 AM, Robert Speck  > > wrote:
> >
> > Hi!
> >
> > I would like to use petsc4py for my own Python library. Installation
> > went well, first tests (serial and parallel) look good.
> >
> > Here is what I want to do: I have my own time-stepping playground
> and I
> > want petsc4py to be one of my backbones for the data types and
> (linear
> > or non-linear, serial or parallel) solvers. I don't want to use
> PETSc's
> > time-steppers, at least not for now. So, I saw in some examples, in
> > particular the ones shipped with petsc4py, that the standard way of
> > running one of PETSc's solvers is a bunch of setup routines, then
> > setting the right-hand side and solve.
> >
> > Now, I don't want to rerun the whole setup part each time I call the
> > solver. I know that I can change the right-hand side without having
> to
> > do so, but what if I change a parameter of my operator like, say, the
> > time-step size or some material parameter?
> >
> > Take the simplest case: Say I have my own implicit Euler written in
> > Python. I know the right-hand side F of my ODE, so in each step I
> want
> > to solve "I - dt*F". But the time-step changes every now and then,
> so I
> > cannot pre-assemble everything once and for all (or I don't want to).
> > What do I need to rerun before I can use the solver again, what can I
> > reuse? Could I just assemble F and combine it with the identity and
> the
> > parameter dt right before I call the solver? How would that look
> like?
> >
> > I'm pretty new to PETSc and to petsc4py, so please forgive any
> stupidity
> > or ignorance in these questions. I'm happy to take any advice, links
> to
> > examples or previous questions. Thanks!
> >
> >
> > For linear solves which stay the same size, you just have to call
> > SetOperators
> > again with the new operator.
>
> OK, this sounds straightforward. Thanks!
>
> >
> > For nonlinear solves which stay the same size, you do nothing.
>
> "nothing" in terms of "nothing you can do" or "nothing you have to do"?


Nothing you have to do.


>
> >
> > If the system size changes, it generally better to create the object.
>
> What does this mean?


Possibly a typo - Matt is advising to "re-create" the objects if the system
sizes change. Petsc objects are typically not dynamic with respect to their
size (e.g. Mat, Vec), however creating new instances is generally cheap
(matrices can be the exception if you don't preallocate)



>
> Thanks again!
> -Robert-
>
>
>
>
>
>
> 
>
> 
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
>
> 
>
> 
>
>


Re: [petsc-users] petsc4py: reuse setup for multiple solver calls?

2018-04-05 Thread Robert Speck
Thank you for your answer! Please see below for comments/questions.

On 05.04.18 12:53, Matthew Knepley wrote:
> On Thu, Apr 5, 2018 at 6:39 AM, Robert Speck  > wrote:
>
> Hi!
>
> I would like to use petsc4py for my own Python library. Installation
> went well, first tests (serial and parallel) look good.
>
> Here is what I want to do: I have my own time-stepping playground and I
> want petsc4py to be one of my backbones for the data types and (linear
> or non-linear, serial or parallel) solvers. I don't want to use PETSc's
> time-steppers, at least not for now. So, I saw in some examples, in
> particular the ones shipped with petsc4py, that the standard way of
> running one of PETSc's solvers is a bunch of setup routines, then
> setting the right-hand side and solve.
>
> Now, I don't want to rerun the whole setup part each time I call the
> solver. I know that I can change the right-hand side without having to
> do so, but what if I change a parameter of my operator like, say, the
> time-step size or some material parameter?
>
> Take the simplest case: Say I have my own implicit Euler written in
> Python. I know the right-hand side F of my ODE, so in each step I want
> to solve "I - dt*F". But the time-step changes every now and then, so I
> cannot pre-assemble everything once and for all (or I don't want to).
> What do I need to rerun before I can use the solver again, what can I
> reuse? Could I just assemble F and combine it with the identity and the
> parameter dt right before I call the solver? How would that look like?
>
> I'm pretty new to PETSc and to petsc4py, so please forgive any stupidity
> or ignorance in these questions. I'm happy to take any advice, links to
> examples or previous questions. Thanks!
>
>
> For linear solves which stay the same size, you just have to call
> SetOperators
> again with the new operator.

OK, this sounds straightforward. Thanks!

>
> For nonlinear solves which stay the same size, you do nothing.

"nothing" in terms of "nothing you can do" or "nothing you have to do"?

>
> If the system size changes, it generally better to create the object.

What does this mean?

Thanks again!
-Robert-







Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt





Re: [petsc-users] DMPlexGetCone in Fortran

2018-04-05 Thread Bernardo Rocha
OK, thanks a lot.
I had to rename the files and add -ffixed-form as argument to the compiler.
Best regards,
Bernardo

On Thu, Apr 5, 2018 at 8:21 PM, Matthew Knepley  wrote:

> On Thu, Apr 5, 2018 at 7:16 PM, Bernardo Rocha <
> bernardomartinsro...@gmail.com> wrote:
>
>> Hello everyone,
>>
>> I've been trying to use DMPlex in a Fortran 77 application
>> (unfortunately this is legacy code and I can't move to F90).
>>
>> Is there a way to use DMPlexGetCone on it?
>> Although the documentation online says it is only available for F90,
>> I'm wondering if there is a trick like the ones in the users manual for
>> routines
>> that return an array. I tried, but I'm not sure it it is right.
>>
>
> We have standardized our array handling with F90, and I don't think we
> will go back
> to supporting new things for F77-style arrays.
>
> That being said, I think all you have to do is compile that source with an
> F90 compiler. You
> should not have to change anything. If you want the F90 array to look like
> an F77 array,
> just pass it as a function argument (I think this works).
>
>   Thanks,
>
>  Matt
>
>
>> Best regards,
>> Bernardo M. Rocha
>>
> --
> 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] DMPlexGetCone in Fortran

2018-04-05 Thread Matthew Knepley
On Thu, Apr 5, 2018 at 7:16 PM, Bernardo Rocha <
bernardomartinsro...@gmail.com> wrote:

> Hello everyone,
>
> I've been trying to use DMPlex in a Fortran 77 application
> (unfortunately this is legacy code and I can't move to F90).
>
> Is there a way to use DMPlexGetCone on it?
> Although the documentation online says it is only available for F90,
> I'm wondering if there is a trick like the ones in the users manual for
> routines
> that return an array. I tried, but I'm not sure it it is right.
>

We have standardized our array handling with F90, and I don't think we will
go back
to supporting new things for F77-style arrays.

That being said, I think all you have to do is compile that source with an
F90 compiler. You
should not have to change anything. If you want the F90 array to look like
an F77 array,
just pass it as a function argument (I think this works).

  Thanks,

 Matt


> Best regards,
> Bernardo M. Rocha
>
-- 
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] DMPlexGetCone in Fortran

2018-04-05 Thread Bernardo Rocha
Hello everyone,

I've been trying to use DMPlex in a Fortran 77 application
(unfortunately this is legacy code and I can't move to F90).

Is there a way to use DMPlexGetCone on it?
Although the documentation online says it is only available for F90,
I'm wondering if there is a trick like the ones in the users manual for
routines
that return an array. I tried, but I'm not sure it it is right.

Best regards,
Bernardo M. Rocha


Re: [petsc-users] [petsc-dev] ftp.mcs.anl.gov is down - breaking petsc builds with --download-package

2018-04-05 Thread Derek Gaston
Thanks for getting back to me - must be something about my environment here
(ftp might even be blocked currently - although I did try from two
different networks).  I was able to get what I needed by using "http" for
now.  Sorry for the traffic.

Derek

On Thu, Apr 5, 2018 at 4:54 PM Satish Balay  wrote:

> Both ftp and http work fine for me..
>
> balay@asterix /home/balay/petsc.x/petsc (balay/test=)
> $ lftp ftp://ftp.mcs.anl.gov/pub/petsc/externalpackages
> cd ok, cwd=/pub/petsc/externalpackages
> lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> ls |head
> -rw-r-   1 ftp  ftp 0 Nov 18  2016 ==33186==
> -rw-r-   1 ftp  ftp828346 May  2  2013 Chaco-2.2-p1.tar.gz
> -rw-r-   1 ftp  ftp   1981220 Sep 23  2014 Chaco-2.2-p2.tar.gz
> -rw-r-   1 ftp  ftp828295 Oct 23  2009 Chaco-2.2.tar.gz
> -rw-r-   1 ftp  ftp   1685576 Feb 16  2015
> Elemental-0.85-p1.tar.gz
> -rw-r-   1 ftp  ftp112597 Mar 28  2012 Generator.tar.gz
> -rw-r-   1 ftp  ftp   2471411 Nov 18  2011
> MUMPS_4.10.0-p1.tar.gz
> -rw-r-   1 ftp  ftp   2471465 Feb 26  2012
> MUMPS_4.10.0-p2.tar.gz
> -rw-r-   1 ftp  ftp   2440565 Mar 15  2012
> MUMPS_4.10.0-p3.tar.gz
> -rw-r-   1 ftp  ftp   2439922 Aug 17  2011 MUMPS_4.10.0.tar.gz
> lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> exit
> balay@asterix /home/balay/petsc.x/petsc (balay/test=)
> $ lftp http://ftp.mcs.anl.gov/pub/petsc/externalpackages
> cd: received redirection to `
> http://ftp.mcs.anl.gov/pub/petsc/externalpackages/'
> cd ok, cwd=/pub/petsc/externalpackages
> lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> ls |head
> drwxr-xr-x  --  ..
> -rw-r--r--0  2016-11-18 11:03  ==33186==
> -rw-r--r-- 809K  2013-05-01 22:00  Chaco-2.2-p1.tar.gz
> -rw-r--r-- 1.9M  2014-09-23 13:52  Chaco-2.2-p2.tar.gz
> -rw-r--r-- 809K  2009-10-22 19:53  Chaco-2.2.tar.gz
> -rw-r--r-- 1.6M  2015-02-16 14:21  Elemental-0.85-p1.tar.gz
> -rw-r--r-- 110K  2012-03-27 19:22  Generator.tar.gz
> -rw-r--r-- 2.4M  2011-11-18 13:59  MUMPS_4.10.0-p1.tar.gz
> -rw-r--r-- 2.4M  2012-02-25 21:05  MUMPS_4.10.0-p2.tar.gz
> -rw-r--r-- 2.3M  2012-03-14 22:57  MUMPS_4.10.0-p3.tar.gz
> ls: Broken pipe
> lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> exit
>
>
> Satish
>
> On Thu, 5 Apr 2018, Derek Gaston wrote:
>
> > Is ftp access down again?  The download links on the PETSc website appear
> > to just stall...
> >
> > Derek
> >
> > On Thu, Mar 29, 2018 at 9:52 AM Satish Balay  wrote:
> >
> > > ftp.mcs.anl.gov is now back online [serving ftp:// -  http:// is not
> yet
> > > enabled]
> > >
> > > petsc configure builds with --download-package option should now work.
> > >
> > > For direct tarball download - switching the URL from
> > > http://ftp.mcs.anl.gov to ftp://ftp.mcs.anl.gov notation is the
> > > temporary workaround. For eg:
> > >
> > > change:
> > > http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.8.4.tar.gz
> > > to:
> > > ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.8.4.tar.gz
> > >
> > > Satish
> > >
> > > On Thu, 29 Mar 2018, Satish Balay wrote:
> > >
> > > >
> > > > We've been informed by the site admin that ftp.mcs.anl.gov is taken
> > > > down due to 'cyber incident' - there is no ETA on when it will be
> > > > back.
> > > >
> > > > We've been using it the primary host for distributing petsc tarballs
> > > > and hosting some externalpackage tarballs - so some of the petsc
> buils
> > > > with '--download-package' option are failing.
> > > >
> > > > Obtaining petsc [and some most externalpackages] via git should work.
> > > >
> > > > I will update when ftp.mcs.anl.gov is brought back up.
> > > >
> > > > Satish
> > > >
> > > >
> > >
> > >
> >
>
>


Re: [petsc-users] [petsc-dev] ftp.mcs.anl.gov is down - breaking petsc builds with --download-package

2018-04-05 Thread Satish Balay
Both ftp and http work fine for me..

balay@asterix /home/balay/petsc.x/petsc (balay/test=)
$ lftp ftp://ftp.mcs.anl.gov/pub/petsc/externalpackages
cd ok, cwd=/pub/petsc/externalpackages  
lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> ls |head
-rw-r-   1 ftp  ftp 0 Nov 18  2016 ==33186==
-rw-r-   1 ftp  ftp828346 May  2  2013 Chaco-2.2-p1.tar.gz
-rw-r-   1 ftp  ftp   1981220 Sep 23  2014 Chaco-2.2-p2.tar.gz
-rw-r-   1 ftp  ftp828295 Oct 23  2009 Chaco-2.2.tar.gz
-rw-r-   1 ftp  ftp   1685576 Feb 16  2015 Elemental-0.85-p1.tar.gz
-rw-r-   1 ftp  ftp112597 Mar 28  2012 Generator.tar.gz
-rw-r-   1 ftp  ftp   2471411 Nov 18  2011 MUMPS_4.10.0-p1.tar.gz
-rw-r-   1 ftp  ftp   2471465 Feb 26  2012 MUMPS_4.10.0-p2.tar.gz
-rw-r-   1 ftp  ftp   2440565 Mar 15  2012 MUMPS_4.10.0-p3.tar.gz
-rw-r-   1 ftp  ftp   2439922 Aug 17  2011 MUMPS_4.10.0.tar.gz
lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> exit
balay@asterix /home/balay/petsc.x/petsc (balay/test=)
$ lftp http://ftp.mcs.anl.gov/pub/petsc/externalpackages
cd: received redirection to `http://ftp.mcs.anl.gov/pub/petsc/externalpackages/'
cd ok, cwd=/pub/petsc/externalpackages
lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> ls |head
drwxr-xr-x  --  ..
-rw-r--r--0  2016-11-18 11:03  ==33186==
-rw-r--r-- 809K  2013-05-01 22:00  Chaco-2.2-p1.tar.gz
-rw-r--r-- 1.9M  2014-09-23 13:52  Chaco-2.2-p2.tar.gz
-rw-r--r-- 809K  2009-10-22 19:53  Chaco-2.2.tar.gz
-rw-r--r-- 1.6M  2015-02-16 14:21  Elemental-0.85-p1.tar.gz
-rw-r--r-- 110K  2012-03-27 19:22  Generator.tar.gz
-rw-r--r-- 2.4M  2011-11-18 13:59  MUMPS_4.10.0-p1.tar.gz
-rw-r--r-- 2.4M  2012-02-25 21:05  MUMPS_4.10.0-p2.tar.gz
-rw-r--r-- 2.3M  2012-03-14 22:57  MUMPS_4.10.0-p3.tar.gz
ls: Broken pipe
lftp ftp.mcs.anl.gov:/pub/petsc/externalpackages> exit


Satish

On Thu, 5 Apr 2018, Derek Gaston wrote:

> Is ftp access down again?  The download links on the PETSc website appear
> to just stall...
> 
> Derek
> 
> On Thu, Mar 29, 2018 at 9:52 AM Satish Balay  wrote:
> 
> > ftp.mcs.anl.gov is now back online [serving ftp:// -  http:// is not yet
> > enabled]
> >
> > petsc configure builds with --download-package option should now work.
> >
> > For direct tarball download - switching the URL from
> > http://ftp.mcs.anl.gov to ftp://ftp.mcs.anl.gov notation is the
> > temporary workaround. For eg:
> >
> > change:
> > http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.8.4.tar.gz
> > to:
> > ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.8.4.tar.gz
> >
> > Satish
> >
> > On Thu, 29 Mar 2018, Satish Balay wrote:
> >
> > >
> > > We've been informed by the site admin that ftp.mcs.anl.gov is taken
> > > down due to 'cyber incident' - there is no ETA on when it will be
> > > back.
> > >
> > > We've been using it the primary host for distributing petsc tarballs
> > > and hosting some externalpackage tarballs - so some of the petsc buils
> > > with '--download-package' option are failing.
> > >
> > > Obtaining petsc [and some most externalpackages] via git should work.
> > >
> > > I will update when ftp.mcs.anl.gov is brought back up.
> > >
> > > Satish
> > >
> > >
> >
> >
> 



Re: [petsc-users] [petsc-dev] ftp.mcs.anl.gov is down - breaking petsc builds with --download-package

2018-04-05 Thread Derek Gaston
Is ftp access down again?  The download links on the PETSc website appear
to just stall...

Derek

On Thu, Mar 29, 2018 at 9:52 AM Satish Balay  wrote:

> ftp.mcs.anl.gov is now back online [serving ftp:// -  http:// is not yet
> enabled]
>
> petsc configure builds with --download-package option should now work.
>
> For direct tarball download - switching the URL from
> http://ftp.mcs.anl.gov to ftp://ftp.mcs.anl.gov notation is the
> temporary workaround. For eg:
>
> change:
> http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.8.4.tar.gz
> to:
> ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.8.4.tar.gz
>
> Satish
>
> On Thu, 29 Mar 2018, Satish Balay wrote:
>
> >
> > We've been informed by the site admin that ftp.mcs.anl.gov is taken
> > down due to 'cyber incident' - there is no ETA on when it will be
> > back.
> >
> > We've been using it the primary host for distributing petsc tarballs
> > and hosting some externalpackage tarballs - so some of the petsc buils
> > with '--download-package' option are failing.
> >
> > Obtaining petsc [and some most externalpackages] via git should work.
> >
> > I will update when ftp.mcs.anl.gov is brought back up.
> >
> > Satish
> >
> >
>
>


Re: [petsc-users] Could not execute "['git', 'rev-parse', '--git-dir']"

2018-04-05 Thread Kong, Fande
Hi Cormac,

Thanks so much! It is working now.

Fande,

On Thu, Apr 5, 2018 at 11:21 AM, Garvey, Cormac T 
wrote:

> I made some changes to the falcon cluster environment. Please try the
> default git (i.e Without loading a module) and
> see if petsc will install correctly.
>
> Thanks,
> Cormac.
>
> On Wed, Apr 4, 2018 at 5:09 PM, Fande Kong  wrote:
>
>> The default git gives me:
>>
>> *Could not execute "['git', 'rev-parse', '--git-dir']"*
>>
>> when I am configuring PETSc.
>>
>> The manually loaded *gits*  work just fine.
>>
>>
>> Fande,
>>
>>
>> On Wed, Apr 4, 2018 at 5:04 PM, Garvey, Cormac T 
>> wrote:
>>
>>> I though it was fixed, yes I will look into it again.
>>>
>>> Do you get an error just doing a git clone on falcon1 and falcon2?
>>>
>>> On Wed, Apr 4, 2018 at 4:48 PM, Kong, Fande  wrote:
>>>
 module load git/2.16.2-GCCcore-5.4.0"  also works.

 Could you somehow make the default git work as well? Hence we do not
 need to have this extra "module load for git"

 Fande,

 On Wed, Apr 4, 2018 at 4:43 PM, Kong, Fande  wrote:

> Thanks, Cormac,
>
> *module load git/1.8.5.2-GCC-4.8.3 *
>
> works for me.
>
> Did not try "module load git/2.16.2-GCCcore-5.4.0" yet.
>
> I will try, and get it back here.
>
>
>
> Fande
>
> On Wed, Apr 4, 2018 at 4:39 PM, Garvey, Cormac T <
> cormac.gar...@inl.gov> wrote:
>
>>
>> We needed to rebuilt git on the INL falcon cluster because github
>> server changed such that it no longer accepted TLSv1.
>>
>> The default git on the falcon cluster /usr/bin/git is just a wrapper
>> script, so users would not need to load any modules to
>> use git.
>>
>> When you load load git on falcon1 or falcon2 does it still fail?
>>
>> module load git/2.16.2-GCCcore-5.4.0
>>
>> Thanks,
>> Cormac.
>>
>>
>>
>> On Wed, Apr 4, 2018 at 4:28 PM, Kong, Fande 
>> wrote:
>>
>>> Hi Cormac,
>>>
>>> Do you know anything on "git"? How did you guys build git on the
>>> falcon1?  The default git on Falcon1 does not work with petsc any more.
>>>
>>>
>>> Fande,
>>>
>>>
>>>
>>> On Wed, Apr 4, 2018 at 4:20 PM, Satish Balay 
>>> wrote:
>>>
 Ok - I don't think I have access to this OS.

 And I see its from 2009 [sure its enterprise os - with regular
 backport updates]

 But its wierd that you have such a new version of git at
 /usr/bin/git

 From what we know so far - the problem appears to be some bad
 interaction of python-2.6 with this old OS [i.e old glibc etc..] -
 and
 this new git version [binary built locally or on a different OS and
 installed locally ?].

 Satish

 On Wed, 4 Apr 2018, Kong, Fande wrote:

 >  moose]$ uname -a
 > Linux falcon1 3.0.101-108.13-default #1 SMP Wed Oct 11 12:30:40
 UTC 2017
 > (294ccfe) x86_64 x86_64 x86_64 GNU/Linux
 >
 >
 > moose]$ lsb_release -a
 > LSB Version:
 > core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86
 _64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:deskto
 p-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics
 -3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4
 .0-noarch
 > Distributor ID:SUSE LINUX
 > Description:SUSE Linux Enterprise Server 11 (x86_64)
 > Release:11
 > Codename:n/a
 >
 >
 >
 > On Wed, Apr 4, 2018 at 4:08 PM, Satish Balay 
 wrote:
 >
 > > On Wed, 4 Apr 2018, Satish Balay wrote:
 > >
 > > > On Wed, 4 Apr 2018, Satish Balay wrote:
 > > >
 > > > > was your '2.16.2' version installed from source?
 > > >
 > > > >>>
 > > > Checking for program /usr/bin/git...found
 > > > Defined make macro "GIT" to "git"
 > > > Executing: git --version
 > > > stdout: git version 2.16.2
 > > > 
 > > >
 > > > I gues its the OS default package
 > > >
 > > > >
 > > > Machine platform:
 > > > ('Linux', 'falcon1', '3.0.101-108.13-default', '#1 SMP Wed
 Oct 11
 > > 12:30:40 UTC 2017 (294ccfe)', 'x86_64', 'x86_64')
 > > > Python version:
 > > > 2.6.9 (unknown, Aug  5 2016, 11:15:31)
 > > > [GCC 4.3.4 [gcc-4_3-branch revision 152973]]
 > > > 
 > > >
 > > > What OS/version is on this machine? I can try reproducing in
 a VM
 > >
 > > It is strange that the kernel is old [3.0 - perhaps LTS OS] ,
 python is
 > > old [2.6] - but git is new? [2.16?]
 > >
 > > https://urldefense.proofpoint.com

Re: [petsc-users] Could not execute "['git', 'rev-parse', '--git-dir']"

2018-04-05 Thread Garvey, Cormac T
I made some changes to the falcon cluster environment. Please try the
default git (i.e Without loading a module) and
see if petsc will install correctly.

Thanks,
Cormac.

On Wed, Apr 4, 2018 at 5:09 PM, Fande Kong  wrote:

> The default git gives me:
>
> *Could not execute "['git', 'rev-parse', '--git-dir']"*
>
> when I am configuring PETSc.
>
> The manually loaded *gits*  work just fine.
>
>
> Fande,
>
>
> On Wed, Apr 4, 2018 at 5:04 PM, Garvey, Cormac T 
> wrote:
>
>> I though it was fixed, yes I will look into it again.
>>
>> Do you get an error just doing a git clone on falcon1 and falcon2?
>>
>> On Wed, Apr 4, 2018 at 4:48 PM, Kong, Fande  wrote:
>>
>>> module load git/2.16.2-GCCcore-5.4.0"  also works.
>>>
>>> Could you somehow make the default git work as well? Hence we do not
>>> need to have this extra "module load for git"
>>>
>>> Fande,
>>>
>>> On Wed, Apr 4, 2018 at 4:43 PM, Kong, Fande  wrote:
>>>
 Thanks, Cormac,

 *module load git/1.8.5.2-GCC-4.8.3 *

 works for me.

 Did not try "module load git/2.16.2-GCCcore-5.4.0" yet.

 I will try, and get it back here.



 Fande

 On Wed, Apr 4, 2018 at 4:39 PM, Garvey, Cormac T >>> > wrote:

>
> We needed to rebuilt git on the INL falcon cluster because github
> server changed such that it no longer accepted TLSv1.
>
> The default git on the falcon cluster /usr/bin/git is just a wrapper
> script, so users would not need to load any modules to
> use git.
>
> When you load load git on falcon1 or falcon2 does it still fail?
>
> module load git/2.16.2-GCCcore-5.4.0
>
> Thanks,
> Cormac.
>
>
>
> On Wed, Apr 4, 2018 at 4:28 PM, Kong, Fande 
> wrote:
>
>> Hi Cormac,
>>
>> Do you know anything on "git"? How did you guys build git on the
>> falcon1?  The default git on Falcon1 does not work with petsc any more.
>>
>>
>> Fande,
>>
>>
>>
>> On Wed, Apr 4, 2018 at 4:20 PM, Satish Balay 
>> wrote:
>>
>>> Ok - I don't think I have access to this OS.
>>>
>>> And I see its from 2009 [sure its enterprise os - with regular
>>> backport updates]
>>>
>>> But its wierd that you have such a new version of git at /usr/bin/git
>>>
>>> From what we know so far - the problem appears to be some bad
>>> interaction of python-2.6 with this old OS [i.e old glibc etc..] -
>>> and
>>> this new git version [binary built locally or on a different OS and
>>> installed locally ?].
>>>
>>> Satish
>>>
>>> On Wed, 4 Apr 2018, Kong, Fande wrote:
>>>
>>> >  moose]$ uname -a
>>> > Linux falcon1 3.0.101-108.13-default #1 SMP Wed Oct 11 12:30:40
>>> UTC 2017
>>> > (294ccfe) x86_64 x86_64 x86_64 GNU/Linux
>>> >
>>> >
>>> > moose]$ lsb_release -a
>>> > LSB Version:
>>> > core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86
>>> _64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:deskto
>>> p-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics
>>> -3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4
>>> .0-noarch
>>> > Distributor ID:SUSE LINUX
>>> > Description:SUSE Linux Enterprise Server 11 (x86_64)
>>> > Release:11
>>> > Codename:n/a
>>> >
>>> >
>>> >
>>> > On Wed, Apr 4, 2018 at 4:08 PM, Satish Balay 
>>> wrote:
>>> >
>>> > > On Wed, 4 Apr 2018, Satish Balay wrote:
>>> > >
>>> > > > On Wed, 4 Apr 2018, Satish Balay wrote:
>>> > > >
>>> > > > > was your '2.16.2' version installed from source?
>>> > > >
>>> > > > >>>
>>> > > > Checking for program /usr/bin/git...found
>>> > > > Defined make macro "GIT" to "git"
>>> > > > Executing: git --version
>>> > > > stdout: git version 2.16.2
>>> > > > 
>>> > > >
>>> > > > I gues its the OS default package
>>> > > >
>>> > > > >
>>> > > > Machine platform:
>>> > > > ('Linux', 'falcon1', '3.0.101-108.13-default', '#1 SMP Wed Oct
>>> 11
>>> > > 12:30:40 UTC 2017 (294ccfe)', 'x86_64', 'x86_64')
>>> > > > Python version:
>>> > > > 2.6.9 (unknown, Aug  5 2016, 11:15:31)
>>> > > > [GCC 4.3.4 [gcc-4_3-branch revision 152973]]
>>> > > > 
>>> > > >
>>> > > > What OS/version is on this machine? I can try reproducing in a
>>> VM
>>> > >
>>> > > It is strange that the kernel is old [3.0 - perhaps LTS OS] ,
>>> python is
>>> > > old [2.6] - but git is new? [2.16?]
>>> > >
>>> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__
>>> > > mirrors.edge.kernel.org_pub_software_scm_git_&d=DwIBAg&c=
>>> > > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=DUUt3SRGI0_
>>> > > JgtNaS3udV68GRkgV4ts7XKfj2opmiCY&m=WF6ZxIh9Z9Hh2kYY0w70aNrgf
>>> Picp6
>>> > > kgIh5BvezPiEY&s=KWMsO7XC0-pQuQ_mD03tNJWEpxSTATlZW_DmX0Qo

Re: [petsc-users] Problems with DMDAVecGetArrayF90 + Intel

2018-04-05 Thread Fabian.Jakub
Hi,

Not sure if this is related to your current issues but
I once had issues with this particular function with IBM XLF compilers
but never got to a solution because...

a) VecGetArrayF90 also worked for me
b) and the IBM Machine got switched off

Anyway, I did not have any issues since then... not with intel nor with
gfortran compilers.

The helpdesk back then created a petsc bug report but I think the issue
was never resolved...

For the sake of completeness, I am attaching the messages we had then,
maybe the debugging efforts are related to your problems?

Good Luck,

Fabian


On 04/05/2018 05:03 PM, Randall Mackie wrote:
> Dear PETSc users,
>
> I’m curious if anyone else experiences problems using
DMDAVecGetArrayF90 in conjunction with Intel compilers?
> We have had many problems (typically 11 SEGV segmentation violations)
when PETSc is compiled in optimize mode (with various combinations of
options).
> These same codes run valgrind clean with gfortran, so I assume this is
an Intel bug, but before we submit a bug report I wanted to see if
anyone else had similar experiences?
> We have basically gone back and replaced our calls to
DMDAVecGetArrayF90 with calls to VecGetArrayF90 and pass those pointers
into a “local” subroutine that works fine.
>
> In case anyone is curious, the attached test code shows this behavior
when PETSc is compiled with the following options:
>
> ./configure \
>   --with-clean=1 \
>   --with-debugging=0 \
>   --with-fortran=1 \
>   --with-64-bit-indices \
>   --download-mpich=../mpich-3.3a2.tar.gz \
>   --with-blas-lapack-dir=/opt/intel/mkl \
>   --with-cc=icc \
>   --with-fc=ifort \
>   --with-cxx=icc \
>   --FOPTFLAGS='-O2 -xSSSE3 -axcore-avx2' \
>   --COPTFLAGS='-O2 -xSSSE3 -axcore-avx2' \
>   --CXXOPTFLAGS='-O2 -xSSSE3 -axcore-avx2’ \
>
>
>
> Thanks, Randy M.
>
--- Begin Message ---
Hello,
My userid is b380246.

I would like to run my Fortran model, which depends on a recent version
of PETSC, http://www.mcs.anl.gov/petsc/.
While it compiles fine, it crashes at a certain point.
My knowledge of the code is however very limited and I am at the same
time not familiar with the Blizzard machine.

I hoped that, before I send this as a bug request to the Petsc People,
you might be able to have a look at compile flags if I am doing
something silly or maybe if you could even reproduce the error.

In the following, I try to elaborate on the steps I used to compile PETSC:

# load modules... while I tried also the default ones, I currently have:

Currently Loaded Modulefiles:

IBM/xlf14.1.0.8

IBM/xlC12.1.0.9

IBM/xlc12.1.0.9

GCC/gcc-4.5.1

NAG/5.1.340

NCAR/ncarg5.1.0 

 
 

IGES/grads2.0.a6

 
 

UNITE/1.0   

 
 

./default   

 
 

NETCDF/4.2.1.1


# Get current petsc version I also tried stable version 3.5.2... and
git branch master and next here however check out git branch
stable/maint:

/sw/aix61/git-1.7.4.1/bin/git clone
ssh://g...@bitbucket.org/petsc/petsc.git petsc -b maint


#export PETSC_DIR to point to the just created git directory

export PETSC_DIR=$(pwd)/petsc




# The following is a script configure petsc to compile on blizzard:

export PETSC_DIR=$(pwd)

export PETSC_ARCH=debug


CONFIGURE_SCRIPT="conftest-$PETSC_ARCH"

RECONFIGURE_SCRIPT="reconfigure-$PETSC_ARCH.py"

rm $RECONFIGURE_SCRIPT $CONFIGURE_SCRIPT


make allclean

./configure \

  --with-make-np=8 \

  --with-batch=1 \

  --with-mpi-shared=0 \

  --with-cc=mpcc_r \

  --with-cxx=mpCC_r \

  --with-fc="mpxlf_r"\

  --with-debugging=1 \

  --known-mpi-shared-libraries=0  \

  --with-shared-libraries=0   \

  --with-fortran  \

  --with-fortran-interfaces   \

  --download-sowing-configure-options='CFLAGS=-maix64 CXXFLAGS=-maix64
LDFLAGS=-maix64 CPPFLAGS=-maix64' \

  --with-c2html=0 \

  --with-cmake=$(which cmake) \

  --with-blas-lapack-dir=/sw/aix53/lapack-3.2.0/ \

  COPTFLAGS='-g -O0 ' \

  FOPTFLAGS='-qextname -qwarn64  -O0 -qfullpath -C -g -qextchk -qnosave  ' \

  --LIBS="-L/sw/aix53/lapack-3.2.0/lib -llapack -lessl -lblas"


  if [ ! -e $CONFIGURE_SCRIPT ] ; then

echo 'Configure failed in creating conftest script'

exit

  fi


cat > petsc_conf-$PETSC_ARCH.ll << EOF

#!/client/bin/ksh

# 1 node, ST mode (Single Threading)

# 1 MPI Processes

#---

#

# @ shell =

[petsc-users] Problems with DMDAVecGetArrayF90 + Intel

2018-04-05 Thread Randall Mackie
Dear PETSc users,

I’m curious if anyone else experiences problems using DMDAVecGetArrayF90 in 
conjunction with Intel compilers?
We have had many problems (typically 11 SEGV segmentation violations) when 
PETSc is compiled in optimize mode (with various combinations of options).
These same codes run valgrind clean with gfortran, so I assume this is an Intel 
bug, but before we submit a bug report I wanted to see if anyone else had 
similar experiences?
We have basically gone back and replaced our calls to DMDAVecGetArrayF90 with 
calls to VecGetArrayF90 and pass those pointers into a “local” subroutine that 
works fine.

In case anyone is curious, the attached test code shows this behavior when 
PETSc is compiled with the following options:

./configure \
  --with-clean=1 \
  --with-debugging=0 \
  --with-fortran=1 \
  --with-64-bit-indices \
  --download-mpich=../mpich-3.3a2.tar.gz \
  --with-blas-lapack-dir=/opt/intel/mkl \
  --with-cc=icc \
  --with-fc=ifort \
  --with-cxx=icc \
  --FOPTFLAGS='-O2 -xSSSE3 -axcore-avx2' \
  --COPTFLAGS='-O2 -xSSSE3 -axcore-avx2' \
  --CXXOPTFLAGS='-O2 -xSSSE3 -axcore-avx2’ \



Thanks, Randy M.



cmd_test
Description: Binary data


makefile
Description: Binary data


test.F90
Description: Binary data


Re: [petsc-users] --download-hdf5 and then compiling cgns

2018-04-05 Thread Klaij, Christiaan
That would be nice. The minimum for me would be

./configure \
--prefix=/path/to/myprefix \
--with-hdf5=/path/to/petsc/hdf5 \
--with-fortran=yes

but I sure like to have their tools as well

./configure \
--prefix=/path/to/myprefix \
--with-hdf5=/path/to/petsc/hdf5 \
--with-fortran=yes \
--enable-cgnstools \
--datarootdir=/path/to/myprefix/share

This is more tricky as it requires tcl and tk libs. Also
datarootdir is supposed to be PREFIX/share by default, but
there's a bug so I had to specify it explicitly.

Chris


dr. ir. Christiaan Klaij  | Senior Researcher | Research & Development
MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl

MARIN news: 
http://www.marin.nl/web/News/News-items/Kom-zaterdag-10-november-naar-de-open-dag-in-Wageningen.htm


From: Satish Balay 
Sent: Thursday, April 05, 2018 3:31 PM
To: Klaij, Christiaan
Cc: Gaetan Kenway; petsc-users
Subject: Re: [petsc-users] --download-hdf5 and then compiling cgns

Glad it works..

Perhaps its is simple fix to add in --download-cgns option to petsc configure..
[I see its a direct dependency from PETSc sources - 
src/dm/impls/plex/plexcgns.c ]

Satish


On Thu, 5 Apr 2018, Klaij, Christiaan wrote:

> Satish, Gaetan, thanks for your suggestions. I've decided not to
> use cmake for cgns, and that works fine with petsc's build of
> hdf5.
>
>
> Chris
>
> dr. ir. Christiaan Klaij | Senior Researcher | Research & Development
> MARIN | T +31 317 49 33 44 | c.kl...@marin.nl | 
> www.marin.nl
>
> [LinkedIn] [YouTube] 
>   [Twitter] 
>   [Facebook] 
> 
> MARIN news: Kom zaterdag 10 november naar de open dag in 
> Wageningen!
>
> 
> From: Gaetan Kenway 
> Sent: Thursday, March 29, 2018 6:43 PM
> To: petsc-users
> Cc: Klaij, Christiaan
> Subject: Re: [petsc-users] --download-hdf5 and then compiling cgns
>
> I have compiled CGNS3.3 with hdf from PETSc but not using cmake from CGNS. 
> Here is what I used:
>
> git clone  https://github.com/CGNS/CGNS.git
>
> cd CGNS/src
> export CC=mpicc
> export FC=mpif90
> export FCFLAGS='-fPIC -O3'
> export CFLAGS='-fPIC -O3'
> export LIBS='-lz -ldl'
>
> ./configure --with-hdf5=$PETSC_DIR/$PETSC_ARCH --enable-64bit 
> --prefix=/u/wk/gkenway/.local  --enable-parallel --enable-cgnstools=yes 
> --enable-shared
> make -j 10
>
> Hope that helps
> Gaetan
>
> On Thu, Mar 29, 2018 at 9:37 AM, Satish Balay 
> mailto:ba...@mcs.anl.gov>> wrote:
> --download-hdf5 uses 'autoconf' build of hdf5 - and not cmake
> build. [hdf5 provides both build tools].
>
> This must be the reason why hdf5Config.cmake and hdf5-config.cmake
> files might be missing.
>
> You might be able to install hdf5 manually with cmake - and then build
> cgns-3.3.1 with it.
>
> Satish
>
>
> On Thu, 29 Mar 2018, Klaij, Christiaan wrote:
>
> > Satish,
> >
> > I've build petsc-3.8.3 with --download-hdf5 and this works
> > fine. Now, I'm trying to compile cgns-3.3.1 and have it use the
> > hdf5 library from petsc. Therefore, in the cmake configure I have
> > set this option
> >
> > -D HDF5_DIR=/path/to/petsc/hdf5
> >
> > but cmake gives this message:
> >
> > CMake Warning at CMakeLists.txt:207 (find_package):
> >   Could not find a package configuration file provided by "HDF5" with any of
> >   the following names:
> >
> > hdf5Config.cmake
> > hdf5-config.cmake
> >
> > and then falls back to the system's hdf5. Indeed there are no
> > such files in /path/to/petsc/hdf5. Any idea on how to proceed
> > from here?
> >
> > Chris
> >
> >
> > dr. ir. Christiaan Klaij  | Senior Researcher | Research & Development
> > MARIN | T +31 317 49 33 44 | 
> > mailto:c.kl...@marin.nl | http://www.marin.nl
> >
> > MARIN news: 
> > http://www.marin.nl/web/News/News-items/Comfort-draft-for-semisubmersible-yachts.htm
> >
> >
>
>
>
>
>



Re: [petsc-users] --download-hdf5 and then compiling cgns

2018-04-05 Thread Satish Balay
Glad it works..

Perhaps its is simple fix to add in --download-cgns option to petsc configure..
[I see its a direct dependency from PETSc sources - 
src/dm/impls/plex/plexcgns.c ]

Satish


On Thu, 5 Apr 2018, Klaij, Christiaan wrote:

> Satish, Gaetan, thanks for your suggestions. I've decided not to
> use cmake for cgns, and that works fine with petsc's build of
> hdf5.
> 
> 
> Chris
> 
> dr. ir. Christiaan Klaij | Senior Researcher | Research & Development
> MARIN | T +31 317 49 33 44 | c.kl...@marin.nl | 
> www.marin.nl
> 
> [LinkedIn] [YouTube] 
>   [Twitter] 
>   [Facebook] 
> 
> MARIN news: Kom zaterdag 10 november naar de open dag in 
> Wageningen!
> 
> 
> From: Gaetan Kenway 
> Sent: Thursday, March 29, 2018 6:43 PM
> To: petsc-users
> Cc: Klaij, Christiaan
> Subject: Re: [petsc-users] --download-hdf5 and then compiling cgns
> 
> I have compiled CGNS3.3 with hdf from PETSc but not using cmake from CGNS. 
> Here is what I used:
> 
> git clone  https://github.com/CGNS/CGNS.git
> 
> cd CGNS/src
> export CC=mpicc
> export FC=mpif90
> export FCFLAGS='-fPIC -O3'
> export CFLAGS='-fPIC -O3'
> export LIBS='-lz -ldl'
> 
> ./configure --with-hdf5=$PETSC_DIR/$PETSC_ARCH --enable-64bit 
> --prefix=/u/wk/gkenway/.local  --enable-parallel --enable-cgnstools=yes 
> --enable-shared
> make -j 10
> 
> Hope that helps
> Gaetan
> 
> On Thu, Mar 29, 2018 at 9:37 AM, Satish Balay 
> mailto:ba...@mcs.anl.gov>> wrote:
> --download-hdf5 uses 'autoconf' build of hdf5 - and not cmake
> build. [hdf5 provides both build tools].
> 
> This must be the reason why hdf5Config.cmake and hdf5-config.cmake
> files might be missing.
> 
> You might be able to install hdf5 manually with cmake - and then build
> cgns-3.3.1 with it.
> 
> Satish
> 
> 
> On Thu, 29 Mar 2018, Klaij, Christiaan wrote:
> 
> > Satish,
> >
> > I've build petsc-3.8.3 with --download-hdf5 and this works
> > fine. Now, I'm trying to compile cgns-3.3.1 and have it use the
> > hdf5 library from petsc. Therefore, in the cmake configure I have
> > set this option
> >
> > -D HDF5_DIR=/path/to/petsc/hdf5
> >
> > but cmake gives this message:
> >
> > CMake Warning at CMakeLists.txt:207 (find_package):
> >   Could not find a package configuration file provided by "HDF5" with any of
> >   the following names:
> >
> > hdf5Config.cmake
> > hdf5-config.cmake
> >
> > and then falls back to the system's hdf5. Indeed there are no
> > such files in /path/to/petsc/hdf5. Any idea on how to proceed
> > from here?
> >
> > Chris
> >
> >
> > dr. ir. Christiaan Klaij  | Senior Researcher | Research & Development
> > MARIN | T +31 317 49 33 44 | 
> > mailto:c.kl...@marin.nl | http://www.marin.nl
> >
> > MARIN news: 
> > http://www.marin.nl/web/News/News-items/Comfort-draft-for-semisubmersible-yachts.htm
> >
> >
> 
> 
> 
> 
> 



Re: [petsc-users] petsc4py: reuse setup for multiple solver calls?

2018-04-05 Thread Matthew Knepley
On Thu, Apr 5, 2018 at 6:39 AM, Robert Speck  wrote:

> Hi!
>
> I would like to use petsc4py for my own Python library. Installation
> went well, first tests (serial and parallel) look good.
>
> Here is what I want to do: I have my own time-stepping playground and I
> want petsc4py to be one of my backbones for the data types and (linear
> or non-linear, serial or parallel) solvers. I don't want to use PETSc's
> time-steppers, at least not for now. So, I saw in some examples, in
> particular the ones shipped with petsc4py, that the standard way of
> running one of PETSc's solvers is a bunch of setup routines, then
> setting the right-hand side and solve.
>
> Now, I don't want to rerun the whole setup part each time I call the
> solver. I know that I can change the right-hand side without having to
> do so, but what if I change a parameter of my operator like, say, the
> time-step size or some material parameter?
>
> Take the simplest case: Say I have my own implicit Euler written in
> Python. I know the right-hand side F of my ODE, so in each step I want
> to solve "I - dt*F". But the time-step changes every now and then, so I
> cannot pre-assemble everything once and for all (or I don't want to).
> What do I need to rerun before I can use the solver again, what can I
> reuse? Could I just assemble F and combine it with the identity and the
> parameter dt right before I call the solver? How would that look like?
>
> I'm pretty new to PETSc and to petsc4py, so please forgive any stupidity
> or ignorance in these questions. I'm happy to take any advice, links to
> examples or previous questions. Thanks!
>

For linear solves which stay the same size, you just have to call
SetOperators
again with the new operator.

For nonlinear solves which stay the same size, you do nothing.

If the system size changes, it generally better to create the object. If
that is hard,
then you can use KSPReset().

   Matt


> Kind regards
> -Robert-
>
> --
> Dr. Robert Speck
> Juelich Supercomputing Centre
> Institute for Advanced Simulation
> Forschungszentrum Juelich GmbH
> 52425 Juelich, Germany
>
> Tel: +49 2461 61 1644
> Fax: +49 2461 61 6656
>
> Email:   r.sp...@fz-juelich.de
> Website: http://www.fz-juelich.de/ias/jsc/speck_r
> PinT:http://www.fz-juelich.de/ias/jsc/pint
>
>
>
> 
> 
> 
> 
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> 
> 
> 
> 
>
>


-- 
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] petsc4py: reuse setup for multiple solver calls?

2018-04-05 Thread Robert Speck
Hi!

I would like to use petsc4py for my own Python library. Installation
went well, first tests (serial and parallel) look good.

Here is what I want to do: I have my own time-stepping playground and I
want petsc4py to be one of my backbones for the data types and (linear
or non-linear, serial or parallel) solvers. I don't want to use PETSc's
time-steppers, at least not for now. So, I saw in some examples, in
particular the ones shipped with petsc4py, that the standard way of
running one of PETSc's solvers is a bunch of setup routines, then
setting the right-hand side and solve.

Now, I don't want to rerun the whole setup part each time I call the
solver. I know that I can change the right-hand side without having to
do so, but what if I change a parameter of my operator like, say, the
time-step size or some material parameter?

Take the simplest case: Say I have my own implicit Euler written in
Python. I know the right-hand side F of my ODE, so in each step I want
to solve "I - dt*F". But the time-step changes every now and then, so I
cannot pre-assemble everything once and for all (or I don't want to).
What do I need to rerun before I can use the solver again, what can I
reuse? Could I just assemble F and combine it with the identity and the
parameter dt right before I call the solver? How would that look like?

I'm pretty new to PETSc and to petsc4py, so please forgive any stupidity
or ignorance in these questions. I'm happy to take any advice, links to
examples or previous questions. Thanks!

Kind regards
-Robert-

--
Dr. Robert Speck
Juelich Supercomputing Centre
Institute for Advanced Simulation
Forschungszentrum Juelich GmbH
52425 Juelich, Germany

Tel: +49 2461 61 1644
Fax: +49 2461 61 6656

Email:   r.sp...@fz-juelich.de
Website: http://www.fz-juelich.de/ias/jsc/speck_r
PinT:http://www.fz-juelich.de/ias/jsc/pint





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt





Re: [petsc-users] --download-hdf5 and then compiling cgns

2018-04-05 Thread Klaij, Christiaan
Satish, Gaetan, thanks for your suggestions. I've decided not to
use cmake for cgns, and that works fine with petsc's build of
hdf5.


Chris

dr. ir. Christiaan Klaij | Senior Researcher | Research & Development
MARIN | T +31 317 49 33 44 | c.kl...@marin.nl | 
www.marin.nl

[LinkedIn] [YouTube] 
  [Twitter] 
  [Facebook] 

MARIN news: Kom zaterdag 10 november naar de open dag in 
Wageningen!


From: Gaetan Kenway 
Sent: Thursday, March 29, 2018 6:43 PM
To: petsc-users
Cc: Klaij, Christiaan
Subject: Re: [petsc-users] --download-hdf5 and then compiling cgns

I have compiled CGNS3.3 with hdf from PETSc but not using cmake from CGNS. Here 
is what I used:

git clone  https://github.com/CGNS/CGNS.git

cd CGNS/src
export CC=mpicc
export FC=mpif90
export FCFLAGS='-fPIC -O3'
export CFLAGS='-fPIC -O3'
export LIBS='-lz -ldl'

./configure --with-hdf5=$PETSC_DIR/$PETSC_ARCH --enable-64bit 
--prefix=/u/wk/gkenway/.local  --enable-parallel --enable-cgnstools=yes 
--enable-shared
make -j 10

Hope that helps
Gaetan

On Thu, Mar 29, 2018 at 9:37 AM, Satish Balay 
mailto:ba...@mcs.anl.gov>> wrote:
--download-hdf5 uses 'autoconf' build of hdf5 - and not cmake
build. [hdf5 provides both build tools].

This must be the reason why hdf5Config.cmake and hdf5-config.cmake
files might be missing.

You might be able to install hdf5 manually with cmake - and then build
cgns-3.3.1 with it.

Satish


On Thu, 29 Mar 2018, Klaij, Christiaan wrote:

> Satish,
>
> I've build petsc-3.8.3 with --download-hdf5 and this works
> fine. Now, I'm trying to compile cgns-3.3.1 and have it use the
> hdf5 library from petsc. Therefore, in the cmake configure I have
> set this option
>
> -D HDF5_DIR=/path/to/petsc/hdf5
>
> but cmake gives this message:
>
> CMake Warning at CMakeLists.txt:207 (find_package):
>   Could not find a package configuration file provided by "HDF5" with any of
>   the following names:
>
> hdf5Config.cmake
> hdf5-config.cmake
>
> and then falls back to the system's hdf5. Indeed there are no
> such files in /path/to/petsc/hdf5. Any idea on how to proceed
> from here?
>
> Chris
>
>
> dr. ir. Christiaan Klaij  | Senior Researcher | Research & Development
> MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl 
> | http://www.marin.nl
>
> MARIN news: 
> http://www.marin.nl/web/News/News-items/Comfort-draft-for-semisubmersible-yachts.htm
>
>