Re: [petsc-users] [WARNING: UNSCANNABLE EXTRACTION FAILED]Re: deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Satish Balay via petsc-users
Great! Will have this change in the next petsc update.

Satish

On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:

> it worked fine!
> 
> the previous output:
> 
> [alfredo.jaramillo@sdumont14 petsc]$ ldd
> arch-linux2-c-debug-actual/lib/libhwloc.so
> linux-vdso.so.1 =>  (0x7ffde6f49000)
> libm.so.6 => /usr/lib64/libm.so.6 (0x7fb8be4ed000)
> libXNVCtrl.so.0 => /usr/lib64/libXNVCtrl.so.0 (0x7fb8be2e8000)
> libXext.so.6 => /usr/lib64/libXext.so.6 (0x7fb8be0d6000)
> libX11.so.6 => /usr/lib64/libX11.so.6 (0x7fb8bdd98000)
> libc.so.6 => /usr/lib64/libc.so.6 (0x7fb8bd9cb000)
> /lib64/ld-linux-x86-64.so.2 (0x7fb8bea4f000)
> libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x7fb8bd7a3000)
> libdl.so.2 => /usr/lib64/libdl.so.2 (0x7fb8bd59f000)
> libXau.so.6 => /usr/lib64/libXau.so.6 (0x7fb8bd39b000)
> 
> the updated output:
> 
> [alfredo.jaramillo@sdumont14 petsc]$ ldd
> arch-linux2-c-debug-previous/lib/libhwloc.so
> linux-vdso.so.1 =>  (0x7fff135c7000)
> libm.so.6 => /usr/lib64/libm.so.6 (0x7f5ecd5f3000)
> libc.so.6 => /usr/lib64/libc.so.6 (0x7f5ecd226000)
> /lib64/ld-linux-x86-64.so.2 (0x7f5ecdb54000
> 
> I added the option --download-hwloc-configure-arguments="--disable-opencl
> --disable-cuda --disable-nvml --disable-gl" to my installation and pastix
> is working fine,
> 
> thank you very much
> regards
> 
> On Mon, Apr 6, 2020 at 6:39 PM Satish Balay  wrote:
> 
> > I pushed another change to branch balay/fix-hwloc-x-dependency/maint
> >
> > Can you check again?
> >
> > BTW: The following options don't make sense when using --with-mpi=0
> >
> > CPPFLAGS=-I/scratch/app/openmpi/4.0_gnu/include
> > -I/scratch/app/mpc/1.0.3/include -I/scratch/app/isl/0.18/include
> > -I/scratch/app/gcc/6.5/include LDFLAGS=-L/scratch/app/openmpi/4.0_gnu/lib
> > -L/scratch/app/mpc/1.0.3/lib -L/scratch/app/isl/0.18/lib
> > -L/scratch/app/gcc/6.5/lib64 -L/scratch/app/gcc/6.5/lib
> >
> > [And likely these options are missing appropriate quotes..]
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> >
> > > ops... you can find the attachments here
> > >
> > https://www.dropbox.com/sh/n8scz7wioe01t6p/AAC3P3iU1jLYsW6m3vs6S5DHa?dl=0
> > >
> > > I got
> > >
> > > $ ldd minimal/lib/libhwloc.so
> > > linux-vdso.so.1 =>  (0x7fffcc3ae000)
> > > libm.so.6 => /usr/lib64/libm.so.6 (0x7ff0b90a2000)
> > > libXNVCtrl.so.0 => /usr/lib64/libXNVCtrl.so.0 (0x7ff0b8e9d000)
> > > libXext.so.6 => /usr/lib64/libXext.so.6 (0x7ff0b8c8b000)
> > > libX11.so.6 => /usr/lib64/libX11.so.6 (0x7ff0b894d000)
> > > libc.so.6 => /usr/lib64/libc.so.6 (0x7ff0b858)
> > > /lib64/ld-linux-x86-64.so.2 (0x7ff0b9604000)
> > > libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x7ff0b8358000)
> > > libdl.so.2 => /usr/lib64/libdl.so.2 (0x7ff0b8154000)
> > > libXau.so.6 => /usr/lib64/libXau.so.6 (0x7ff0b7f5)
> > >
> > > On Mon, Apr 6, 2020 at 6:02 PM Satish Balay  wrote:
> > >
> > > > The attachments didn't come through..
> > > >
> > > > 
> > > > DENIAL OF SERVICE ALERT
> > > >
> > > > A denial of service protection limit was exceeded. The file has been
> > > > removed.
> > > > Context: 'hwloc-x11=no.tar.gz\hwloc-x11=no.tar'
> > > > Reason: The data size limit was exceeded
> > > > Limit: 10 MB
> > > > Ticket Number : 0c20-5e8b-97c0-000f
> > > > <<
> > > >
> > > > Can you retry the test below - i.e './configure --with-mpi=0
> > > > --download-hwloc --with-x=0' - and see if this works?
> > > >
> > > > What do you get for ldd [as shown below]?
> > > >
> > > > Satish
> > > >
> > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > >
> > > > > I've tried two installations in that branch, a "full installation"
> > with
> > > > > every package I need, and a minimal one. I attach the results here,
> > these
> > > > > libraries are still being linked
> > > > >
> > > > > On Mon, Apr 6, 2020 at 4:41 PM Satish Balay 
> > wrote:
> > > > >
> > > > > > Hm - its working for me on CentOS7 [I see you are using
> > RHEL7/CentOS7]
> > > > > >
> > > > > >
> > > > > > Can you try the branch balay/fix-hwloc-x-dependency/maint - and see
> > > > what
> > > > > > you get?
> > > > > >
> > > > > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> > > > --download-hwloc
> > > > > > --with-x=0
> > > > > > 
> > > > > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> > > > arch-linux2-c-debug/lib/libhwloc.so
> > > > > >
> > > > > >
> > > > > > linux-vdso.so.1 =>  (0x7ffe88bae000)
> > > > > > libm.so.6 => /lib64/libm.so.6 (0x7ff75c7b9000)
> > > > > > libc.so.6 => /lib64/libc.so.6 (0x7ff75c3eb000)
> > > > > > /lib64/ld-linux-x86-64.so.2 (0x7ff75cd1a000)
> > > > > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> > > > --download-hwloc
> > > > > > --with-x=1
> > > > > >   
> > > > > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> > > > arch-linux2-c-debug/lib/libhwloc.so
> > > > > >
> > > > > >
> > > > > > linux-vdso.so.1 =>  

Re: [petsc-users] [EXT]Re: Discontinuities in the Jacobian matrix for nonlinear problem

2020-04-06 Thread Zou, Ling via petsc-users
Ok, I do not pretend to be shallow water expert here. I only played with it 
maybe ten years ago.

When you say 5 point stencil in 1d flow, that sounds so much like a finite 
volume method with TVD reconstruction.
I solved many 1d flow equation using PETSc (Euler eqn., single-phase flow eqn., 
two-phase flow eqn.), had a lot of ‘zero-flow’ conditions, so far PETSc works 
pretty well for me.

-Ling

From: Alexander B Prescott 
Date: Monday, April 6, 2020 at 8:44 PM
To: Nathan Collier 
Cc: "Zou, Ling" , PETSc 
Subject: Re: [EXT]Re: [petsc-users] Discontinuities in the Jacobian matrix for 
nonlinear problem

Hi Nathan,

Thanks for the thoughtful response. For the 1D toy version I force flow to 
occur at every node, but my ultimate objective is to apply this to a 2D 
floodplain in which a node may or may not have flow in the 'true' solution. 
Based on what you point out, however, it seems that this approach may be doomed 
to fail. For one thing, using a 5 point stencil, a node with no flow and whose 
neighbor's have no flow will produce a row in the 'bent physics' Jacobian of 
all zero entries. Based on my experience so far that will cause PETSc to return 
errors. Does that sound right to you?

I agree that the difficulty encountered with this sort of problem is 
counterintuitive to the relative simplification made on nature!

Best,
Alexander

On Mon, Apr 6, 2020 at 12:45 PM Nathan Collier 
mailto:nathaniel.coll...@gmail.com>> wrote:

External Email
Alexander,

I am not familiar with your specific model, but I do have experience working 
with the diffusive / kinematic wave approximation to shallow water equations. I 
always had a lot of trouble near ponding conditions (steady state), which is 
odd because when nature says do nothing, you don't expect the equations to be 
hard to solve. Some kind soul pointed out to me that this was because the 
equations are derived using a power law model relating flow to slope/depth 
which breaks down when you should have no flow. So as long as you have flow, 
the solver behaves well and things are fine (i.e. smooth terrain, academic test 
problems), but when you have local ponding due to real terrain effects, you are 
hosed. A better solution approach doesn't help if your equations aren't meant 
for the problem you are trying to solve.

I think 'bending' the physics is the right idea, but I never had much luck 
myself with this.

Nate






On Mon, Apr 6, 2020 at 2:56 PM Zou, Ling via petsc-users 
mailto:petsc-users@mcs.anl.gov>> wrote:
What about ‘bending’ the physics a bit?

Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),  
if x[i-1]+z[i-1]  >  x[i]+z[i] + eps
Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])), if  
  x[i]+z[i]  >  x[i-1]+z[i-1] + eps
Q_i-1/2 proportional to x[i-1] + z[i-1] - (x[i] + z[i]) 
  in between

in which, eps is a very small positive number.

-Ling


From: petsc-users 
mailto:petsc-users-boun...@mcs.anl.gov>> on 
behalf of Alexander B Prescott 
mailto:alexpresc...@email.arizona.edu>>
Date: Monday, April 6, 2020 at 1:06 PM
To: PETSc mailto:petsc-users@mcs.anl.gov>>
Subject: [petsc-users] Discontinuities in the Jacobian matrix for nonlinear 
problem

Hello,

The non-linear boundary-value problem I am applying PETSc to is a relatively 
simple steady-state flow routing algorithm based on the continuity equation, 
such that Div(Q) = 0 everywhere (Q=discharge). I use a finite volume approach 
to calculate flow between nodes, with Q calculated as a piecewise smooth 
function of the local flow depth and the water-surface slope. In 1D, the 
residual is calculated as R(x_i)=Q_i-1/2 - Q_i+1/2.
For example, Q_i-1/2 at x[i]:
Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),  if  
x[i-1]+z[i-1]  >  x[i]+z[i]
Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),  if 
x[i]+z[i]  >  x[i-1]+z[i-1]

Where z[i] is local topography and doesn't change over the iterations, and 
Q_i+1/2 is computed analogously. So the residual derivatives with respect to 
x[i-1], x[i] and x[i+1] are not continuous when the water-surface slope = 0.

Are there intelligent ways to handle this problem? My 1D trial runs naively fix 
any zero-valued water-surface slopes to a small non-zero positive value (e.g. 
1e-12). Solver convergence has been mixed and highly dependent on the initial 
guess. So far, FAS with QN coarse solver has been the most robust.

Restricting x[i] to be non-negative is a separate issue, to which I have 
applied the SNES_VI solvers. They perform modestly but have been less robust.

Best,
Alexander



--
Alexander Prescott
alexpresc...@email.arizona.edu
PhD Candidate, The University of Arizona
Department of Geosciences
1040 E. 4th Street
Tucson, AZ, 85721


--
Alexander Prescott
alexpresc...@email.arizona.edu
PhD Candidate, The University of 

Re: [petsc-users] [EXT]Re: Discontinuities in the Jacobian matrix for nonlinear problem

2020-04-06 Thread Alexander B Prescott
Hi Nathan,

Thanks for the thoughtful response. For the 1D toy version I force flow to
occur at every node, but my ultimate objective is to apply this to a 2D
floodplain in which a node may or may not have flow in the 'true' solution.
Based on what you point out, however, it seems that this approach may be
doomed to fail. For one thing, using a 5 point stencil, a node with no flow
and whose neighbor's have no flow will produce a row in the 'bent physics'
Jacobian of all zero entries. Based on my experience so far that will cause
PETSc to return errors. Does that sound right to you?

I agree that the difficulty encountered with this sort of problem is
counterintuitive to the relative simplification made on nature!

Best,
Alexander

On Mon, Apr 6, 2020 at 12:45 PM Nathan Collier 
wrote:

> *External Email*
> Alexander,
>
> I am not familiar with your specific model, but I do have experience
> working with the diffusive / kinematic wave approximation to shallow water
> equations. I always had a lot of trouble near ponding conditions (steady
> state), which is odd because when nature says do nothing, you don't expect
> the equations to be hard to solve. Some kind soul pointed out to me that
> this was because the equations are derived using a power law model relating
> flow to slope/depth which breaks down when you should have no flow. So as
> long as you have flow, the solver behaves well and things are fine (i.e.
> smooth terrain, academic test problems), but when you have local ponding
> due to real terrain effects, you are hosed. A better solution approach
> doesn't help if your equations aren't meant for the problem you are trying
> to solve.
>
> I think 'bending' the physics is the right idea, but I never had much luck
> myself with this.
>
> Nate
>
>
>
>
>
>
> On Mon, Apr 6, 2020 at 2:56 PM Zou, Ling via petsc-users <
> petsc-users@mcs.anl.gov> wrote:
>
>> What about ‘bending’ the physics a bit?
>>
>>
>>
>> Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
>>   if x[i-1]+z[i-1]  >  x[i]+z[i] + eps
>>
>> Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
>>ifx[i]+z[i]  >  x[i-1]+z[i-1] + eps
>>
>> Q_i-1/2 proportional to x[i-1] + z[i-1] - (x[i] +
>> z[i])   in between
>>
>>
>>
>> in which, eps is a very small positive number.
>>
>>
>>
>> -Ling
>>
>>
>>
>>
>>
>> *From: *petsc-users  on behalf of
>> Alexander B Prescott 
>> *Date: *Monday, April 6, 2020 at 1:06 PM
>> *To: *PETSc 
>> *Subject: *[petsc-users] Discontinuities in the Jacobian matrix for
>> nonlinear problem
>>
>>
>>
>> Hello,
>>
>>
>>
>> The non-linear boundary-value problem I am applying PETSc to is a
>> relatively simple steady-state flow routing algorithm based on the
>> continuity equation, such that Div(Q) = 0 everywhere (Q=discharge). I use a
>> finite volume approach to calculate flow between nodes, with Q calculated
>> as a piecewise smooth function of the local flow depth and the
>> water-surface slope. In 1D, the residual is calculated as R(x_i)=Q_i-1/2 -
>> Q_i+1/2.
>>
>> For example, Q_i-1/2 at x[i]:
>>
>> Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
>>   if  x[i-1]+z[i-1]  >  x[i]+z[i]
>>
>> Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
>> if x[i]+z[i]  >  x[i-1]+z[i-1]
>>
>>
>>
>> Where z[i] is local topography and doesn't change over the iterations,
>> and Q_i+1/2 is computed analogously. So the residual derivatives with
>> respect to x[i-1], x[i] and x[i+1] are not continuous when the
>> water-surface slope = 0.
>>
>>
>>
>> Are there intelligent ways to handle this problem? My 1D trial runs
>> naively fix any zero-valued water-surface slopes to a small non-zero
>> positive value (e.g. 1e-12). Solver convergence has been mixed and highly
>> dependent on the initial guess. So far, FAS with QN coarse solver has been
>> the most robust.
>>
>>
>>
>> Restricting x[i] to be non-negative is a separate issue, to which I have
>> applied the SNES_VI solvers. They perform modestly but have been less
>> robust.
>>
>>
>>
>> Best,
>>
>> Alexander
>>
>>
>>
>>
>>
>>
>> --
>>
>> Alexander Prescott
>>
>> alexpresc...@email.arizona.edu
>>
>> PhD Candidate, The University of Arizona
>>
>> Department of Geosciences
>>
>> 1040 E. 4th Street
>>
>> Tucson, AZ, 85721
>>
>

-- 
Alexander Prescott
alexpresc...@email.arizona.edu
PhD Candidate, The University of Arizona
Department of Geosciences
1040 E. 4th Street
Tucson, AZ, 85721


Re: [petsc-users] [WARNING: UNSCANNABLE EXTRACTION FAILED]Re: deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Alfredo Jaramillo
it worked fine!

the previous output:

[alfredo.jaramillo@sdumont14 petsc]$ ldd
arch-linux2-c-debug-actual/lib/libhwloc.so
linux-vdso.so.1 =>  (0x7ffde6f49000)
libm.so.6 => /usr/lib64/libm.so.6 (0x7fb8be4ed000)
libXNVCtrl.so.0 => /usr/lib64/libXNVCtrl.so.0 (0x7fb8be2e8000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x7fb8be0d6000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x7fb8bdd98000)
libc.so.6 => /usr/lib64/libc.so.6 (0x7fb8bd9cb000)
/lib64/ld-linux-x86-64.so.2 (0x7fb8bea4f000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x7fb8bd7a3000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x7fb8bd59f000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x7fb8bd39b000)

the updated output:

[alfredo.jaramillo@sdumont14 petsc]$ ldd
arch-linux2-c-debug-previous/lib/libhwloc.so
linux-vdso.so.1 =>  (0x7fff135c7000)
libm.so.6 => /usr/lib64/libm.so.6 (0x7f5ecd5f3000)
libc.so.6 => /usr/lib64/libc.so.6 (0x7f5ecd226000)
/lib64/ld-linux-x86-64.so.2 (0x7f5ecdb54000

I added the option --download-hwloc-configure-arguments="--disable-opencl
--disable-cuda --disable-nvml --disable-gl" to my installation and pastix
is working fine,

thank you very much
regards

On Mon, Apr 6, 2020 at 6:39 PM Satish Balay  wrote:

> I pushed another change to branch balay/fix-hwloc-x-dependency/maint
>
> Can you check again?
>
> BTW: The following options don't make sense when using --with-mpi=0
>
> CPPFLAGS=-I/scratch/app/openmpi/4.0_gnu/include
> -I/scratch/app/mpc/1.0.3/include -I/scratch/app/isl/0.18/include
> -I/scratch/app/gcc/6.5/include LDFLAGS=-L/scratch/app/openmpi/4.0_gnu/lib
> -L/scratch/app/mpc/1.0.3/lib -L/scratch/app/isl/0.18/lib
> -L/scratch/app/gcc/6.5/lib64 -L/scratch/app/gcc/6.5/lib
>
> [And likely these options are missing appropriate quotes..]
>
> Satish
>
> On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
>
> > ops... you can find the attachments here
> >
> https://www.dropbox.com/sh/n8scz7wioe01t6p/AAC3P3iU1jLYsW6m3vs6S5DHa?dl=0
> >
> > I got
> >
> > $ ldd minimal/lib/libhwloc.so
> > linux-vdso.so.1 =>  (0x7fffcc3ae000)
> > libm.so.6 => /usr/lib64/libm.so.6 (0x7ff0b90a2000)
> > libXNVCtrl.so.0 => /usr/lib64/libXNVCtrl.so.0 (0x7ff0b8e9d000)
> > libXext.so.6 => /usr/lib64/libXext.so.6 (0x7ff0b8c8b000)
> > libX11.so.6 => /usr/lib64/libX11.so.6 (0x7ff0b894d000)
> > libc.so.6 => /usr/lib64/libc.so.6 (0x7ff0b858)
> > /lib64/ld-linux-x86-64.so.2 (0x7ff0b9604000)
> > libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x7ff0b8358000)
> > libdl.so.2 => /usr/lib64/libdl.so.2 (0x7ff0b8154000)
> > libXau.so.6 => /usr/lib64/libXau.so.6 (0x7ff0b7f5)
> >
> > On Mon, Apr 6, 2020 at 6:02 PM Satish Balay  wrote:
> >
> > > The attachments didn't come through..
> > >
> > > 
> > > DENIAL OF SERVICE ALERT
> > >
> > > A denial of service protection limit was exceeded. The file has been
> > > removed.
> > > Context: 'hwloc-x11=no.tar.gz\hwloc-x11=no.tar'
> > > Reason: The data size limit was exceeded
> > > Limit: 10 MB
> > > Ticket Number : 0c20-5e8b-97c0-000f
> > > <<
> > >
> > > Can you retry the test below - i.e './configure --with-mpi=0
> > > --download-hwloc --with-x=0' - and see if this works?
> > >
> > > What do you get for ldd [as shown below]?
> > >
> > > Satish
> > >
> > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > >
> > > > I've tried two installations in that branch, a "full installation"
> with
> > > > every package I need, and a minimal one. I attach the results here,
> these
> > > > libraries are still being linked
> > > >
> > > > On Mon, Apr 6, 2020 at 4:41 PM Satish Balay 
> wrote:
> > > >
> > > > > Hm - its working for me on CentOS7 [I see you are using
> RHEL7/CentOS7]
> > > > >
> > > > >
> > > > > Can you try the branch balay/fix-hwloc-x-dependency/maint - and see
> > > what
> > > > > you get?
> > > > >
> > > > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> > > --download-hwloc
> > > > > --with-x=0
> > > > > 
> > > > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> > > arch-linux2-c-debug/lib/libhwloc.so
> > > > >
> > > > >
> > > > > linux-vdso.so.1 =>  (0x7ffe88bae000)
> > > > > libm.so.6 => /lib64/libm.so.6 (0x7ff75c7b9000)
> > > > > libc.so.6 => /lib64/libc.so.6 (0x7ff75c3eb000)
> > > > > /lib64/ld-linux-x86-64.so.2 (0x7ff75cd1a000)
> > > > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> > > --download-hwloc
> > > > > --with-x=1
> > > > >   
> > > > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> > > arch-linux2-c-debug/lib/libhwloc.so
> > > > >
> > > > >
> > > > > linux-vdso.so.1 =>  (0x7ffe129cc000)
> > > > > libm.so.6 => /lib64/libm.so.6 (0x7f89920fa000)
> > > > > libX11.so.6 => /lib64/libX11.so.6 (0x7f8991dbc000)
> > > > > libc.so.6 => /lib64/libc.so.6 (0x7f89919ee000)
> > > > > /lib64/ld-linux-x86-64.so.2 (0x7f899265b000)
> > > > > libxcb.so.1 => /lib64/libxcb.so.1 (0x7f89917c6000)
> > > > >   

Re: [petsc-users] Gather and Broadcast Parallel Vectors in k-means algorithm

2020-04-06 Thread Mills, Richard Tran via petsc-users
Hi Eda,

I think that you probably want to use VecScatter routines, as Junchao 
has suggested, instead of the lower level star forest for this. I 
believe that VecScatterCreateToZero() is what you want for the broadcast 
problem you describe, in the second part of your question. I'm not sure 
what you are trying to do in the first part. Taking a parallel vector 
and then copying its entire contents to a sequential vector residing on 
each process is not scalable, and a lot of the design that has gone into 
PETSc is to prevent the user from ever needing to do things like that. 
Can you please tell us what you intend to do with these sequential vectors?

I'm also wondering why, later in your message, you say that you get 
cluster assignments from Matlab, and then "to cluster row vectors 
according to this information, all processors need to have all of the 
row vectors". Do you mean you want to get all of the row vectors copied 
onto all of the processors so that you can compute the cluster 
centroids? If so, computing the cluster centroids can be done without 
copying the row vectors onto all processors if you use a communication 
operation like MPI_Allreduce().

Lastly, let me add that I've done a fair amount of work implementing 
clustering algorithms on distributed memory parallel machines, but 
outside of PETSc. I was thinking that I should implement some of these 
routines using PETSc. I can't get to this immediately, but I'm wondering 
if you might care to tell me a bit more about the clustering problems 
you need to solve and how having some support for this in PETSc might 
(or might not) help.

Best regards,
Richard

On 4/4/20 1:39 AM, Eda Oktay wrote:
> Hi all,
>
> I created a parallel vector UV, by using VecDuplicateVecs since I need 
> row vectors of a matrix. However, I need the whole vector be in all 
> processors, which means I need to gather all and broadcast them to all 
> processors. To gather, I tried to use VecStrideGatherAll:
>
>   Vec UVG;
>   VecStrideGatherAll(UV,UVG,INSERT_VALUES);
>   VecView(UVG,PETSC_VIEWER_STDOUT_WORLD);
>
>  however when I try to view the vector, I get the following error.
>
> [3]PETSC ERROR: Invalid argument
> [3]PETSC ERROR: Wrong type of object: Parameter # 1
> [3]PETSC ERROR: See 
> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
> [3]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019
> [3]PETSC ERROR: ./clustering_son_final_edgecut_without_parmetis on a 
> arch-linux2-c-debug named localhost.localdomain by edaoktay Sat Apr  4 
> 11:22:54 2020
> [3]PETSC ERROR: Wrong type of object: Parameter # 1
> [0]PETSC ERROR: See 
> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019
> [0]PETSC ERROR: ./clustering_son_final_edgecut_without_parmetis on a 
> arch-linux2-c-debug named localhost.localdomain by edaoktay Sat Apr  4 
> 11:22:54 2020
> [0]PETSC ERROR: Configure options --download-mpich --download-openblas 
> --download-slepc --download-metis --download-parmetis --download-chaco 
> --with-X=1
> [0]PETSC ERROR: #1 VecStrideGatherAll() line 646 in 
> /home/edaoktay/petsc-3.11.1/src/vec/vec/utils/vinv.c
> ./clustering_son_final_edgecut_without_parmetis on a 
> arch-linux2-c-debug named localhost.localdomain by edaoktay Sat Apr  4 
> 11:22:54 2020
> [1]PETSC ERROR: Configure options --download-mpich --download-openblas 
> --download-slepc --download-metis --download-parmetis --download-chaco 
> --with-X=1
> [1]PETSC ERROR: #1 VecStrideGatherAll() line 646 in 
> /home/edaoktay/petsc-3.11.1/src/vec/vec/utils/vinv.c
> Configure options --download-mpich --download-openblas 
> --download-slepc --download-metis --download-parmetis --download-chaco 
> --with-X=1
> [3]PETSC ERROR: #1 VecStrideGatherAll() line 646 in 
> /home/edaoktay/petsc-3.11.1/src/vec/vec/utils/vinv.c
>
> I couldn't understand why I am getting this error. Is this because of 
> UV being created by VecDuplicateVecs? How can I solve this problem?
>
> The other question is broadcasting. After gathering all elements of 
> the vector UV, I need to broadcast them to all processors. I found 
> PetscSFBcastBegin. However, I couldn't understand the PetscSF concept 
> properly. I couldn't adjust my question to the star forest concept.
>
> My problem is: If I have 4 processors, I create a matrix whose columns 
> are 4 smallest eigenvectors, say of size 72. Then by defining each row 
> of this matrix as a vector, I cluster them by using k-means 
> clustering algorithm. For now, I cluster them by using MATLAB and I 
> obtain a vector showing which row vector is in which cluster. After 
> getting this vector, to cluster row vectors according to this 
> information, all processors need to have all of the row vectors.
>
> According to this problem, how can I use the star forest concept?
>
> I will be glad if you can help me about this problem since I don't 
> have enough knowledge about graph theory. An if 

Re: [petsc-users] strange TS adaptivity behavior

2020-04-06 Thread Jed Brown
Mark Adams  writes:

> On Mon, Apr 6, 2020 at 3:47 PM Jed Brown  wrote:
>
>> This typically happens when your model is discontinuous or you activate
>> some fast transitien.  You have a really aggressive lower bound on your
>> time step so its hard to tell here.
>>
>
> The time step goes down to like 1e-3.
> I am suspecting that my source term needs to be smoother and am working on
> that now.
> It is disconcerting that the truncation error goes up as the time stp is
> reduced, but in this example it does start to go down again.

If you increase resolution at differentiating a discontinuity, you'd
expect to become more and more confident that the error is large.


Re: [petsc-users] [WARNING: UNSCANNABLE EXTRACTION FAILED]Re: deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Satish Balay via petsc-users
I pushed another change to branch balay/fix-hwloc-x-dependency/maint

Can you check again?

BTW: The following options don't make sense when using --with-mpi=0

CPPFLAGS=-I/scratch/app/openmpi/4.0_gnu/include 
-I/scratch/app/mpc/1.0.3/include -I/scratch/app/isl/0.18/include 
-I/scratch/app/gcc/6.5/include LDFLAGS=-L/scratch/app/openmpi/4.0_gnu/lib 
-L/scratch/app/mpc/1.0.3/lib -L/scratch/app/isl/0.18/lib 
-L/scratch/app/gcc/6.5/lib64 -L/scratch/app/gcc/6.5/lib

[And likely these options are missing appropriate quotes..]

Satish

On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:

> ops... you can find the attachments here
> https://www.dropbox.com/sh/n8scz7wioe01t6p/AAC3P3iU1jLYsW6m3vs6S5DHa?dl=0
> 
> I got
> 
> $ ldd minimal/lib/libhwloc.so
> linux-vdso.so.1 =>  (0x7fffcc3ae000)
> libm.so.6 => /usr/lib64/libm.so.6 (0x7ff0b90a2000)
> libXNVCtrl.so.0 => /usr/lib64/libXNVCtrl.so.0 (0x7ff0b8e9d000)
> libXext.so.6 => /usr/lib64/libXext.so.6 (0x7ff0b8c8b000)
> libX11.so.6 => /usr/lib64/libX11.so.6 (0x7ff0b894d000)
> libc.so.6 => /usr/lib64/libc.so.6 (0x7ff0b858)
> /lib64/ld-linux-x86-64.so.2 (0x7ff0b9604000)
> libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x7ff0b8358000)
> libdl.so.2 => /usr/lib64/libdl.so.2 (0x7ff0b8154000)
> libXau.so.6 => /usr/lib64/libXau.so.6 (0x7ff0b7f5)
> 
> On Mon, Apr 6, 2020 at 6:02 PM Satish Balay  wrote:
> 
> > The attachments didn't come through..
> >
> > 
> > DENIAL OF SERVICE ALERT
> >
> > A denial of service protection limit was exceeded. The file has been
> > removed.
> > Context: 'hwloc-x11=no.tar.gz\hwloc-x11=no.tar'
> > Reason: The data size limit was exceeded
> > Limit: 10 MB
> > Ticket Number : 0c20-5e8b-97c0-000f
> > <<
> >
> > Can you retry the test below - i.e './configure --with-mpi=0
> > --download-hwloc --with-x=0' - and see if this works?
> >
> > What do you get for ldd [as shown below]?
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> >
> > > I've tried two installations in that branch, a "full installation" with
> > > every package I need, and a minimal one. I attach the results here, these
> > > libraries are still being linked
> > >
> > > On Mon, Apr 6, 2020 at 4:41 PM Satish Balay  wrote:
> > >
> > > > Hm - its working for me on CentOS7 [I see you are using RHEL7/CentOS7]
> > > >
> > > >
> > > > Can you try the branch balay/fix-hwloc-x-dependency/maint - and see
> > what
> > > > you get?
> > > >
> > > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> > --download-hwloc
> > > > --with-x=0
> > > > 
> > > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> > arch-linux2-c-debug/lib/libhwloc.so
> > > >
> > > >
> > > > linux-vdso.so.1 =>  (0x7ffe88bae000)
> > > > libm.so.6 => /lib64/libm.so.6 (0x7ff75c7b9000)
> > > > libc.so.6 => /lib64/libc.so.6 (0x7ff75c3eb000)
> > > > /lib64/ld-linux-x86-64.so.2 (0x7ff75cd1a000)
> > > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> > --download-hwloc
> > > > --with-x=1
> > > >   
> > > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> > arch-linux2-c-debug/lib/libhwloc.so
> > > >
> > > >
> > > > linux-vdso.so.1 =>  (0x7ffe129cc000)
> > > > libm.so.6 => /lib64/libm.so.6 (0x7f89920fa000)
> > > > libX11.so.6 => /lib64/libX11.so.6 (0x7f8991dbc000)
> > > > libc.so.6 => /lib64/libc.so.6 (0x7f89919ee000)
> > > > /lib64/ld-linux-x86-64.so.2 (0x7f899265b000)
> > > > libxcb.so.1 => /lib64/libxcb.so.1 (0x7f89917c6000)
> > > > libdl.so.2 => /lib64/libdl.so.2 (0x7f89915c2000)
> > > > libXau.so.6 => /lib64/libXau.so.6 (0x7f89913be000)
> > > > [balay@petsc-c7 petsc:d409bfc]$
> > > >
> > > > Satish
> > > >
> > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > >
> > > > > No, it doesn't work... I also tried --with-x=disabled. I gave a look
> > to
> > > > > ./configure --help in the hwloc directory and to the configure file
> > > > itself,
> > > > > but Im not finding the right option.
> > > > >
> > > > > On Mon, Apr 6, 2020 at 3:53 PM Satish Balay 
> > wrote:
> > > > >
> > > > > > Looks like the option is --with-x=no
> > > > > >
> > > > > > Can you give this a try? Branch balay/fix-hwloc-x-dependency/maint
> > has
> > > > > > this update now
> > > > > >
> > > > > > Satish
> > > > > >
> > > > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > > > >
> > > > > > > Hello Satish, Im sorry but I think I tested this workaround with
> > the
> > > > > > wrong
> > > > > > > installation, my bad.
> > > > > > > In fact the libXNVC, X11 libraries are still being linked even
> > with
> > > > the
> > > > > > > --download-hwloc-configure-arguments=--without-x option
> > > > > > >
> > > > > > > Im attaching the config.log file located in
> > > > > > > $PETSC_DIR/$PETSC_ARCH/externalpackages/hwloc-2.1.0
> > > > > > > you can see that the option --without-x is there (line 7) but by
> > > > means of
> > > > > > > $ ldd foo
> > 

Re: [petsc-users] [WARNING: UNSCANNABLE EXTRACTION FAILED]Re: deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Alfredo Jaramillo
ops... you can find the attachments here
https://www.dropbox.com/sh/n8scz7wioe01t6p/AAC3P3iU1jLYsW6m3vs6S5DHa?dl=0

I got

$ ldd minimal/lib/libhwloc.so
linux-vdso.so.1 =>  (0x7fffcc3ae000)
libm.so.6 => /usr/lib64/libm.so.6 (0x7ff0b90a2000)
libXNVCtrl.so.0 => /usr/lib64/libXNVCtrl.so.0 (0x7ff0b8e9d000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x7ff0b8c8b000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x7ff0b894d000)
libc.so.6 => /usr/lib64/libc.so.6 (0x7ff0b858)
/lib64/ld-linux-x86-64.so.2 (0x7ff0b9604000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x7ff0b8358000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x7ff0b8154000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x7ff0b7f5)

On Mon, Apr 6, 2020 at 6:02 PM Satish Balay  wrote:

> The attachments didn't come through..
>
> 
> DENIAL OF SERVICE ALERT
>
> A denial of service protection limit was exceeded. The file has been
> removed.
> Context: 'hwloc-x11=no.tar.gz\hwloc-x11=no.tar'
> Reason: The data size limit was exceeded
> Limit: 10 MB
> Ticket Number : 0c20-5e8b-97c0-000f
> <<
>
> Can you retry the test below - i.e './configure --with-mpi=0
> --download-hwloc --with-x=0' - and see if this works?
>
> What do you get for ldd [as shown below]?
>
> Satish
>
> On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
>
> > I've tried two installations in that branch, a "full installation" with
> > every package I need, and a minimal one. I attach the results here, these
> > libraries are still being linked
> >
> > On Mon, Apr 6, 2020 at 4:41 PM Satish Balay  wrote:
> >
> > > Hm - its working for me on CentOS7 [I see you are using RHEL7/CentOS7]
> > >
> > >
> > > Can you try the branch balay/fix-hwloc-x-dependency/maint - and see
> what
> > > you get?
> > >
> > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> --download-hwloc
> > > --with-x=0
> > > 
> > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> arch-linux2-c-debug/lib/libhwloc.so
> > >
> > >
> > > linux-vdso.so.1 =>  (0x7ffe88bae000)
> > > libm.so.6 => /lib64/libm.so.6 (0x7ff75c7b9000)
> > > libc.so.6 => /lib64/libc.so.6 (0x7ff75c3eb000)
> > > /lib64/ld-linux-x86-64.so.2 (0x7ff75cd1a000)
> > > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0
> --download-hwloc
> > > --with-x=1
> > >   
> > > [balay@petsc-c7 petsc:d409bfc]$ ldd
> arch-linux2-c-debug/lib/libhwloc.so
> > >
> > >
> > > linux-vdso.so.1 =>  (0x7ffe129cc000)
> > > libm.so.6 => /lib64/libm.so.6 (0x7f89920fa000)
> > > libX11.so.6 => /lib64/libX11.so.6 (0x7f8991dbc000)
> > > libc.so.6 => /lib64/libc.so.6 (0x7f89919ee000)
> > > /lib64/ld-linux-x86-64.so.2 (0x7f899265b000)
> > > libxcb.so.1 => /lib64/libxcb.so.1 (0x7f89917c6000)
> > > libdl.so.2 => /lib64/libdl.so.2 (0x7f89915c2000)
> > > libXau.so.6 => /lib64/libXau.so.6 (0x7f89913be000)
> > > [balay@petsc-c7 petsc:d409bfc]$
> > >
> > > Satish
> > >
> > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > >
> > > > No, it doesn't work... I also tried --with-x=disabled. I gave a look
> to
> > > > ./configure --help in the hwloc directory and to the configure file
> > > itself,
> > > > but Im not finding the right option.
> > > >
> > > > On Mon, Apr 6, 2020 at 3:53 PM Satish Balay 
> wrote:
> > > >
> > > > > Looks like the option is --with-x=no
> > > > >
> > > > > Can you give this a try? Branch balay/fix-hwloc-x-dependency/maint
> has
> > > > > this update now
> > > > >
> > > > > Satish
> > > > >
> > > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > > >
> > > > > > Hello Satish, Im sorry but I think I tested this workaround with
> the
> > > > > wrong
> > > > > > installation, my bad.
> > > > > > In fact the libXNVC, X11 libraries are still being linked even
> with
> > > the
> > > > > > --download-hwloc-configure-arguments=--without-x option
> > > > > >
> > > > > > Im attaching the config.log file located in
> > > > > > $PETSC_DIR/$PETSC_ARCH/externalpackages/hwloc-2.1.0
> > > > > > you can see that the option --without-x is there (line 7) but by
> > > means of
> > > > > > $ ldd foo
> > > > > > I see that the links are still there
> > > > > >
> > > > > > On Mon, Apr 6, 2020 at 2:57 PM Satish Balay 
> > > wrote:
> > > > > >
> > > > > > > Great!
> > > > > > >
> > > > > > > Wrt pastix dependency on hwloc -
> > > > > > > config/BuildSystem/config/packages/PaStiX.py has the following
> > > comment:
> > > > > > >
> > > > > > > # PaStiX.py does not absolutely require hwloc, but it
> performs
> > > > > better
> > > > > > > with it and can fail (in ways not easily tested) without it
> > > > > > > #
> > > > > > >
> > > > >
> > >
> https://gforge.inria.fr/forum/forum.php?thread_id=32824_id=599_id=186
> > > > > > > #
> > > https://solverstack.gitlabpages.inria.fr/pastix/Bindings.html
> > > > > > >
> > > > > > > I have a fix in branch balay/fix-hwloc-x-dependency/maint [that
> > > does
> > > > 

Re: [petsc-users] [WARNING: UNSCANNABLE EXTRACTION FAILED]Re: deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Satish Balay via petsc-users
The attachments didn't come through..


DENIAL OF SERVICE ALERT

A denial of service protection limit was exceeded. The file has been removed.
Context: 'hwloc-x11=no.tar.gz\hwloc-x11=no.tar'
Reason: The data size limit was exceeded
Limit: 10 MB
Ticket Number : 0c20-5e8b-97c0-000f
<<

Can you retry the test below - i.e './configure --with-mpi=0 --download-hwloc 
--with-x=0' - and see if this works?

What do you get for ldd [as shown below]?

Satish

On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:

> I've tried two installations in that branch, a "full installation" with
> every package I need, and a minimal one. I attach the results here, these
> libraries are still being linked
> 
> On Mon, Apr 6, 2020 at 4:41 PM Satish Balay  wrote:
> 
> > Hm - its working for me on CentOS7 [I see you are using RHEL7/CentOS7]
> >
> >
> > Can you try the branch balay/fix-hwloc-x-dependency/maint - and see what
> > you get?
> >
> > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0 --download-hwloc
> > --with-x=0
> > 
> > [balay@petsc-c7 petsc:d409bfc]$ ldd arch-linux2-c-debug/lib/libhwloc.so
> >
> >
> > linux-vdso.so.1 =>  (0x7ffe88bae000)
> > libm.so.6 => /lib64/libm.so.6 (0x7ff75c7b9000)
> > libc.so.6 => /lib64/libc.so.6 (0x7ff75c3eb000)
> > /lib64/ld-linux-x86-64.so.2 (0x7ff75cd1a000)
> > [balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0 --download-hwloc
> > --with-x=1
> >   
> > [balay@petsc-c7 petsc:d409bfc]$ ldd arch-linux2-c-debug/lib/libhwloc.so
> >
> >
> > linux-vdso.so.1 =>  (0x7ffe129cc000)
> > libm.so.6 => /lib64/libm.so.6 (0x7f89920fa000)
> > libX11.so.6 => /lib64/libX11.so.6 (0x7f8991dbc000)
> > libc.so.6 => /lib64/libc.so.6 (0x7f89919ee000)
> > /lib64/ld-linux-x86-64.so.2 (0x7f899265b000)
> > libxcb.so.1 => /lib64/libxcb.so.1 (0x7f89917c6000)
> > libdl.so.2 => /lib64/libdl.so.2 (0x7f89915c2000)
> > libXau.so.6 => /lib64/libXau.so.6 (0x7f89913be000)
> > [balay@petsc-c7 petsc:d409bfc]$
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> >
> > > No, it doesn't work... I also tried --with-x=disabled. I gave a look to
> > > ./configure --help in the hwloc directory and to the configure file
> > itself,
> > > but Im not finding the right option.
> > >
> > > On Mon, Apr 6, 2020 at 3:53 PM Satish Balay  wrote:
> > >
> > > > Looks like the option is --with-x=no
> > > >
> > > > Can you give this a try? Branch balay/fix-hwloc-x-dependency/maint has
> > > > this update now
> > > >
> > > > Satish
> > > >
> > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > >
> > > > > Hello Satish, Im sorry but I think I tested this workaround with the
> > > > wrong
> > > > > installation, my bad.
> > > > > In fact the libXNVC, X11 libraries are still being linked even with
> > the
> > > > > --download-hwloc-configure-arguments=--without-x option
> > > > >
> > > > > Im attaching the config.log file located in
> > > > > $PETSC_DIR/$PETSC_ARCH/externalpackages/hwloc-2.1.0
> > > > > you can see that the option --without-x is there (line 7) but by
> > means of
> > > > > $ ldd foo
> > > > > I see that the links are still there
> > > > >
> > > > > On Mon, Apr 6, 2020 at 2:57 PM Satish Balay 
> > wrote:
> > > > >
> > > > > > Great!
> > > > > >
> > > > > > Wrt pastix dependency on hwloc -
> > > > > > config/BuildSystem/config/packages/PaStiX.py has the following
> > comment:
> > > > > >
> > > > > > # PaStiX.py does not absolutely require hwloc, but it performs
> > > > better
> > > > > > with it and can fail (in ways not easily tested) without it
> > > > > > #
> > > > > >
> > > >
> > https://gforge.inria.fr/forum/forum.php?thread_id=32824_id=599_id=186
> > > > > > #
> > https://solverstack.gitlabpages.inria.fr/pastix/Bindings.html
> > > > > >
> > > > > > I have a fix in branch balay/fix-hwloc-x-dependency/maint [that
> > does
> > > > not
> > > > > > need the extra --download-hwloc-configure-arguments=--without-x
> > > > option].
> > > > > > Can you give this a try?
> > > > > >
> > > > > > Satish
> > > > > >
> > > > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > > > >
> > > > > > > hello Satish,
> > > > > > > adding
> > > > > > > --download-hwloc-configure-arguments=--without-x
> > > > > > > worked perfectly
> > > > > > >
> > > > > > > thank you!
> > > > > > >
> > > > > > > On Mon, Apr 6, 2020 at 2:12 PM Satish Balay 
> > > > wrote:
> > > > > > >
> > > > > > > > you can try:
> > > > > > > >
> > > > > > > > --download-pastix --download-hwloc
> > > > > > > > --download-hwloc-configure-arguments=--without-x
> > > > > > > >
> > > > > > > > We should fix this to automatically use --with-x=0/1
> > > > > > > >
> > > > > > > > Satish
> > > > > > > >
> > > > > > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > > > > > >
> > > > > > > > > hello everyone,
> > > > > > > > >
> > > > > > > > > I have a fresh installation of the 

Re: [petsc-users] strange TS adaptivity behavior

2020-04-06 Thread Mark Adams
On Mon, Apr 6, 2020 at 3:47 PM Jed Brown  wrote:

> This typically happens when your model is discontinuous or you activate
> some fast transitien.  You have a really aggressive lower bound on your
> time step so its hard to tell here.
>

The time step goes down to like 1e-3.
I am suspecting that my source term needs to be smoother and am working on
that now.
It is disconcerting that the truncation error goes up as the time stp is
reduced, but in this example it does start to go down again.
Thanks,
Mark


>
> Mark Adams  writes:
>
> > I have a problem that is fairly smooth and when it decreases the time
> step
> > it just keeps decreasing almost forever. I wanted to see if anyone has
> any
> > clue what is going on here.
> >
> > This test reaches a quasi equilibrium and the adaptivity uses fairly
> large
> > time steps with dU/dt - F(u,t) = 0. I set a max time step of 10. A source
> > starts at one point (dU/dt - F(u,t) = S(t)). It cools pretty fast.
> >
> > THe truncation error increase a lot when the source starts but it does
> not
> > decrease the time step immediately because I had a mat time step set:
> >  
> >   Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4
> > [0] TSAdaptChoose_Basic(): Estimated scaled local *truncation error
> > 0.000214757*, accepting step of size 10.
> >   TSAdapt basic arkimex 0:1bee step *386* accepted t=2292.68+
> > 1.000e+01 dt=1.000e+01  wlte=0.000215  wltea=   -1 wlter=   -1
> > ...
> > [0] TSAdaptChoose_Basic(): Estimated scaled local *truncation error
> > 0.500399,* accepting step of size 10.
> >   TSAdapt basic arkimex 0:1bee step *387* accepted t=2302.68+
> > 1.000e+01 dt=1.000e+01  wlte=  0.5  wltea=   -1 wlter=   -1
> > 388) species-0: charge density= -1.6422881272166e+01 z-momentum=
> >  7.2180929658011e-03 energy=  9.7881753794625e+05
> >
> > It goes for another few time steps before it rejects the time step for
> the
> > first time, and then it just keeps reducing and reducing:
> >
> > [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> > 0.939966, accepting step of size 10.
> >   TSAdapt basic arkimex 0:1bee step *395* accepted t=2382.68+
> > 1.000e+01 dt=9.283e+00  wlte= 0.94  wltea=   -1 wlter=   -1
> > 
> > [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> 1.33533,
> > *rejecting* step of size 9.28296
> >   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> > 9.283e+00 dt=7.230e+00  wlte= 1.34  wltea=   -1 wlter=   -1
> >
> > [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> 1.44054,
> > *rejecting* step of size 7.22994
> >   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> > 7.230e+00 dt=2.711e+00  wlte= 1.44  wltea=   -1 wlter=   -1
> >
> > [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> 1.63529,
> > *rejecting* step of size 2.71072
> >   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> > 2.711e+00 dt=9.539e-01  wlte= 1.64  wltea=   -1 wlter=   -1
> >
> > [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> 1.60415,
> > *rejecting* step of size 0.953894
> >   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> > 9.539e-01 dt=5.000e-01  wlte=  1.6  wltea=   -1 wlter=   -1
> >
> > [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> > 1.49714, *accepting
> > because step size 0.5 is at minimum*
> >   TSAdapt basic arkimex 0:1bee step *396* accepted t=2392.68+
> > 5.000e-01 dt=5.000e-01  wlte=  1.5  wltea=   -1 wlter=   -1
> >
> > Anyone have any idea what is going on here?
> >
> > Thanks,
> > Mark
>


Re: [petsc-users] strange TS adaptivity behavior

2020-04-06 Thread Jed Brown
This typically happens when your model is discontinuous or you activate
some fast transitien.  You have a really aggressive lower bound on your
time step so its hard to tell here.

Mark Adams  writes:

> I have a problem that is fairly smooth and when it decreases the time step
> it just keeps decreasing almost forever. I wanted to see if anyone has any
> clue what is going on here.
>
> This test reaches a quasi equilibrium and the adaptivity uses fairly large
> time steps with dU/dt - F(u,t) = 0. I set a max time step of 10. A source
> starts at one point (dU/dt - F(u,t) = S(t)). It cools pretty fast.
>
> THe truncation error increase a lot when the source starts but it does not
> decrease the time step immediately because I had a mat time step set:
>  
>   Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4
> [0] TSAdaptChoose_Basic(): Estimated scaled local *truncation error
> 0.000214757*, accepting step of size 10.
>   TSAdapt basic arkimex 0:1bee step *386* accepted t=2292.68+
> 1.000e+01 dt=1.000e+01  wlte=0.000215  wltea=   -1 wlter=   -1
> ...
> [0] TSAdaptChoose_Basic(): Estimated scaled local *truncation error
> 0.500399,* accepting step of size 10.
>   TSAdapt basic arkimex 0:1bee step *387* accepted t=2302.68+
> 1.000e+01 dt=1.000e+01  wlte=  0.5  wltea=   -1 wlter=   -1
> 388) species-0: charge density= -1.6422881272166e+01 z-momentum=
>  7.2180929658011e-03 energy=  9.7881753794625e+05
>
> It goes for another few time steps before it rejects the time step for the
> first time, and then it just keeps reducing and reducing:
>
> [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> 0.939966, accepting step of size 10.
>   TSAdapt basic arkimex 0:1bee step *395* accepted t=2382.68+
> 1.000e+01 dt=9.283e+00  wlte= 0.94  wltea=   -1 wlter=   -1
> 
> [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.33533,
> *rejecting* step of size 9.28296
>   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> 9.283e+00 dt=7.230e+00  wlte= 1.34  wltea=   -1 wlter=   -1
>
> [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.44054,
> *rejecting* step of size 7.22994
>   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> 7.230e+00 dt=2.711e+00  wlte= 1.44  wltea=   -1 wlter=   -1
>
> [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.63529,
> *rejecting* step of size 2.71072
>   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> 2.711e+00 dt=9.539e-01  wlte= 1.64  wltea=   -1 wlter=   -1
>
> [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.60415,
> *rejecting* step of size 0.953894
>   TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
> 9.539e-01 dt=5.000e-01  wlte=  1.6  wltea=   -1 wlter=   -1
>
> [0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
> 1.49714, *accepting
> because step size 0.5 is at minimum*
>   TSAdapt basic arkimex 0:1bee step *396* accepted t=2392.68+
> 5.000e-01 dt=5.000e-01  wlte=  1.5  wltea=   -1 wlter=   -1
>
> Anyone have any idea what is going on here?
>
> Thanks,
> Mark


Re: [petsc-users] Discontinuities in the Jacobian matrix for nonlinear problem

2020-04-06 Thread Nathan Collier
Alexander,

I am not familiar with your specific model, but I do have experience
working with the diffusive / kinematic wave approximation to shallow water
equations. I always had a lot of trouble near ponding conditions (steady
state), which is odd because when nature says do nothing, you don't expect
the equations to be hard to solve. Some kind soul pointed out to me that
this was because the equations are derived using a power law model relating
flow to slope/depth which breaks down when you should have no flow. So as
long as you have flow, the solver behaves well and things are fine (i.e.
smooth terrain, academic test problems), but when you have local ponding
due to real terrain effects, you are hosed. A better solution approach
doesn't help if your equations aren't meant for the problem you are trying
to solve.

I think 'bending' the physics is the right idea, but I never had much luck
myself with this.

Nate






On Mon, Apr 6, 2020 at 2:56 PM Zou, Ling via petsc-users <
petsc-users@mcs.anl.gov> wrote:

> What about ‘bending’ the physics a bit?
>
>
>
> Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
>   if x[i-1]+z[i-1]  >  x[i]+z[i] + eps
>
> Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
>ifx[i]+z[i]  >  x[i-1]+z[i-1] + eps
>
> Q_i-1/2 proportional to x[i-1] + z[i-1] - (x[i] +
> z[i])   in between
>
>
>
> in which, eps is a very small positive number.
>
>
>
> -Ling
>
>
>
>
>
> *From: *petsc-users  on behalf of
> Alexander B Prescott 
> *Date: *Monday, April 6, 2020 at 1:06 PM
> *To: *PETSc 
> *Subject: *[petsc-users] Discontinuities in the Jacobian matrix for
> nonlinear problem
>
>
>
> Hello,
>
>
>
> The non-linear boundary-value problem I am applying PETSc to is a
> relatively simple steady-state flow routing algorithm based on the
> continuity equation, such that Div(Q) = 0 everywhere (Q=discharge). I use a
> finite volume approach to calculate flow between nodes, with Q calculated
> as a piecewise smooth function of the local flow depth and the
> water-surface slope. In 1D, the residual is calculated as R(x_i)=Q_i-1/2 -
> Q_i+1/2.
>
> For example, Q_i-1/2 at x[i]:
>
> Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
>   if  x[i-1]+z[i-1]  >  x[i]+z[i]
>
> Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
> if x[i]+z[i]  >  x[i-1]+z[i-1]
>
>
>
> Where z[i] is local topography and doesn't change over the iterations, and
> Q_i+1/2 is computed analogously. So the residual derivatives with respect
> to x[i-1], x[i] and x[i+1] are not continuous when the water-surface slope
> = 0.
>
>
>
> Are there intelligent ways to handle this problem? My 1D trial runs
> naively fix any zero-valued water-surface slopes to a small non-zero
> positive value (e.g. 1e-12). Solver convergence has been mixed and highly
> dependent on the initial guess. So far, FAS with QN coarse solver has been
> the most robust.
>
>
>
> Restricting x[i] to be non-negative is a separate issue, to which I have
> applied the SNES_VI solvers. They perform modestly but have been less
> robust.
>
>
>
> Best,
>
> Alexander
>
>
>
>
>
>
> --
>
> Alexander Prescott
>
> alexpresc...@email.arizona.edu
>
> PhD Candidate, The University of Arizona
>
> Department of Geosciences
>
> 1040 E. 4th Street
>
> Tucson, AZ, 85721
>


Re: [petsc-users] [EXT]Re: Discontinuities in the Jacobian matrix for nonlinear problem

2020-04-06 Thread Alexander B Prescott
Thank you Ling, that's an interesting idea. Bending the physics like this
would be okay for my purposes, I'll give it a look.

Best,
Alexander

On Mon, Apr 6, 2020 at 11:56 AM Zou, Ling  wrote:

> *External Email*
>
> What about ‘bending’ the physics a bit?
>
>
>
> Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
>   if x[i-1]+z[i-1]  >  x[i]+z[i] + eps
>
> Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
>ifx[i]+z[i]  >  x[i-1]+z[i-1] + eps
>
> Q_i-1/2 proportional to x[i-1] + z[i-1] - (x[i] +
> z[i])   in between
>
>
>
> in which, eps is a very small positive number.
>
>
>
> -Ling
>
>
>
>
>
> *From: *petsc-users  on behalf of
> Alexander B Prescott 
> *Date: *Monday, April 6, 2020 at 1:06 PM
> *To: *PETSc 
> *Subject: *[petsc-users] Discontinuities in the Jacobian matrix for
> nonlinear problem
>
>
>
> Hello,
>
>
>
> The non-linear boundary-value problem I am applying PETSc to is a
> relatively simple steady-state flow routing algorithm based on the
> continuity equation, such that Div(Q) = 0 everywhere (Q=discharge). I use a
> finite volume approach to calculate flow between nodes, with Q calculated
> as a piecewise smooth function of the local flow depth and the
> water-surface slope. In 1D, the residual is calculated as R(x_i)=Q_i-1/2 -
> Q_i+1/2.
>
> For example, Q_i-1/2 at x[i]:
>
> Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
>   if  x[i-1]+z[i-1]  >  x[i]+z[i]
>
> Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
> if x[i]+z[i]  >  x[i-1]+z[i-1]
>
>
>
> Where z[i] is local topography and doesn't change over the iterations, and
> Q_i+1/2 is computed analogously. So the residual derivatives with respect
> to x[i-1], x[i] and x[i+1] are not continuous when the water-surface slope
> = 0.
>
>
>
> Are there intelligent ways to handle this problem? My 1D trial runs
> naively fix any zero-valued water-surface slopes to a small non-zero
> positive value (e.g. 1e-12). Solver convergence has been mixed and highly
> dependent on the initial guess. So far, FAS with QN coarse solver has been
> the most robust.
>
>
>
> Restricting x[i] to be non-negative is a separate issue, to which I have
> applied the SNES_VI solvers. They perform modestly but have been less
> robust.
>
>
>
> Best,
>
> Alexander
>
>
>
>
>
>
> --
>
> Alexander Prescott
>
> alexpresc...@email.arizona.edu
>
> PhD Candidate, The University of Arizona
>
> Department of Geosciences
>
> 1040 E. 4th Street
>
> Tucson, AZ, 85721
>


-- 
Alexander Prescott
alexpresc...@email.arizona.edu
PhD Candidate, The University of Arizona
Department of Geosciences
1040 E. 4th Street
Tucson, AZ, 85721


Re: [petsc-users] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Satish Balay via petsc-users
Hm - its working for me on CentOS7 [I see you are using RHEL7/CentOS7]


Can you try the branch balay/fix-hwloc-x-dependency/maint - and see what you 
get?

[balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0 --download-hwloc 
--with-x=0

[balay@petsc-c7 petsc:d409bfc]$ ldd arch-linux2-c-debug/lib/libhwloc.so 
   
linux-vdso.so.1 =>  (0x7ffe88bae000)
libm.so.6 => /lib64/libm.so.6 (0x7ff75c7b9000)
libc.so.6 => /lib64/libc.so.6 (0x7ff75c3eb000)
/lib64/ld-linux-x86-64.so.2 (0x7ff75cd1a000)
[balay@petsc-c7 petsc:d409bfc]$ ./configure --with-mpi=0 --download-hwloc 
--with-x=1  
  
[balay@petsc-c7 petsc:d409bfc]$ ldd arch-linux2-c-debug/lib/libhwloc.so 

   
linux-vdso.so.1 =>  (0x7ffe129cc000)
libm.so.6 => /lib64/libm.so.6 (0x7f89920fa000)
libX11.so.6 => /lib64/libX11.so.6 (0x7f8991dbc000)
libc.so.6 => /lib64/libc.so.6 (0x7f89919ee000)
/lib64/ld-linux-x86-64.so.2 (0x7f899265b000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x7f89917c6000)
libdl.so.2 => /lib64/libdl.so.2 (0x7f89915c2000)
libXau.so.6 => /lib64/libXau.so.6 (0x7f89913be000)
[balay@petsc-c7 petsc:d409bfc]$ 

Satish

On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:

> No, it doesn't work... I also tried --with-x=disabled. I gave a look to
> ./configure --help in the hwloc directory and to the configure file itself,
> but Im not finding the right option.
> 
> On Mon, Apr 6, 2020 at 3:53 PM Satish Balay  wrote:
> 
> > Looks like the option is --with-x=no
> >
> > Can you give this a try? Branch balay/fix-hwloc-x-dependency/maint has
> > this update now
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> >
> > > Hello Satish, Im sorry but I think I tested this workaround with the
> > wrong
> > > installation, my bad.
> > > In fact the libXNVC, X11 libraries are still being linked even with the
> > > --download-hwloc-configure-arguments=--without-x option
> > >
> > > Im attaching the config.log file located in
> > > $PETSC_DIR/$PETSC_ARCH/externalpackages/hwloc-2.1.0
> > > you can see that the option --without-x is there (line 7) but by means of
> > > $ ldd foo
> > > I see that the links are still there
> > >
> > > On Mon, Apr 6, 2020 at 2:57 PM Satish Balay  wrote:
> > >
> > > > Great!
> > > >
> > > > Wrt pastix dependency on hwloc -
> > > > config/BuildSystem/config/packages/PaStiX.py has the following comment:
> > > >
> > > > # PaStiX.py does not absolutely require hwloc, but it performs
> > better
> > > > with it and can fail (in ways not easily tested) without it
> > > > #
> > > >
> > https://gforge.inria.fr/forum/forum.php?thread_id=32824_id=599_id=186
> > > > # https://solverstack.gitlabpages.inria.fr/pastix/Bindings.html
> > > >
> > > > I have a fix in branch balay/fix-hwloc-x-dependency/maint [that does
> > not
> > > > need the extra --download-hwloc-configure-arguments=--without-x
> > option].
> > > > Can you give this a try?
> > > >
> > > > Satish
> > > >
> > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > >
> > > > > hello Satish,
> > > > > adding
> > > > > --download-hwloc-configure-arguments=--without-x
> > > > > worked perfectly
> > > > >
> > > > > thank you!
> > > > >
> > > > > On Mon, Apr 6, 2020 at 2:12 PM Satish Balay 
> > wrote:
> > > > >
> > > > > > you can try:
> > > > > >
> > > > > > --download-pastix --download-hwloc
> > > > > > --download-hwloc-configure-arguments=--without-x
> > > > > >
> > > > > > We should fix this to automatically use --with-x=0/1
> > > > > >
> > > > > > Satish
> > > > > >
> > > > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > > > >
> > > > > > > hello everyone,
> > > > > > >
> > > > > > > I have a fresh installation of the 3.13.0 version with pastix.
> > Like
> > > > with
> > > > > > > previous versions, I'm using the options
> > > > > > >
> > > > > > > --with-x11=0 --with-x=0 --with-windows-graphics=0
> > > > > > >
> > > > > > > to disable X11
> > > > > > >
> > > > > > > however, when compiling my program foo and doing
> > > > > > >
> > > > > > > $ ldd foo
> > > > > > >
> > > > > > > between the linked libraries there appear:
> > > > > > > libXNVCtrl.so.0 and libX11.so.6
> > > > > > >
> > > > > > > the first one related to NVIDIA. I observed that this does not
> > happen
> > > > > > when
> > > > > > > installing PETSc without hwloc. In this new version, PETSc
> > requires
> > > > to
> > > > > > > install hwloc when trying to install pastix. In previous
> > versions of
> > > > > > PETSc
> > > > > > > (eg 3.11.2) that wasn't necessary.
> > > > > > >
> > > > > > > I'm working in a cluster where I have no access to these
> > X11-related
> > > > > > > libraries and that's why I need 

Re: [petsc-users] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Alfredo Jaramillo
No, it doesn't work... I also tried --with-x=disabled. I gave a look to
./configure --help in the hwloc directory and to the configure file itself,
but Im not finding the right option.

On Mon, Apr 6, 2020 at 3:53 PM Satish Balay  wrote:

> Looks like the option is --with-x=no
>
> Can you give this a try? Branch balay/fix-hwloc-x-dependency/maint has
> this update now
>
> Satish
>
> On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
>
> > Hello Satish, Im sorry but I think I tested this workaround with the
> wrong
> > installation, my bad.
> > In fact the libXNVC, X11 libraries are still being linked even with the
> > --download-hwloc-configure-arguments=--without-x option
> >
> > Im attaching the config.log file located in
> > $PETSC_DIR/$PETSC_ARCH/externalpackages/hwloc-2.1.0
> > you can see that the option --without-x is there (line 7) but by means of
> > $ ldd foo
> > I see that the links are still there
> >
> > On Mon, Apr 6, 2020 at 2:57 PM Satish Balay  wrote:
> >
> > > Great!
> > >
> > > Wrt pastix dependency on hwloc -
> > > config/BuildSystem/config/packages/PaStiX.py has the following comment:
> > >
> > > # PaStiX.py does not absolutely require hwloc, but it performs
> better
> > > with it and can fail (in ways not easily tested) without it
> > > #
> > >
> https://gforge.inria.fr/forum/forum.php?thread_id=32824_id=599_id=186
> > > # https://solverstack.gitlabpages.inria.fr/pastix/Bindings.html
> > >
> > > I have a fix in branch balay/fix-hwloc-x-dependency/maint [that does
> not
> > > need the extra --download-hwloc-configure-arguments=--without-x
> option].
> > > Can you give this a try?
> > >
> > > Satish
> > >
> > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > >
> > > > hello Satish,
> > > > adding
> > > > --download-hwloc-configure-arguments=--without-x
> > > > worked perfectly
> > > >
> > > > thank you!
> > > >
> > > > On Mon, Apr 6, 2020 at 2:12 PM Satish Balay 
> wrote:
> > > >
> > > > > you can try:
> > > > >
> > > > > --download-pastix --download-hwloc
> > > > > --download-hwloc-configure-arguments=--without-x
> > > > >
> > > > > We should fix this to automatically use --with-x=0/1
> > > > >
> > > > > Satish
> > > > >
> > > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > > >
> > > > > > hello everyone,
> > > > > >
> > > > > > I have a fresh installation of the 3.13.0 version with pastix.
> Like
> > > with
> > > > > > previous versions, I'm using the options
> > > > > >
> > > > > > --with-x11=0 --with-x=0 --with-windows-graphics=0
> > > > > >
> > > > > > to disable X11
> > > > > >
> > > > > > however, when compiling my program foo and doing
> > > > > >
> > > > > > $ ldd foo
> > > > > >
> > > > > > between the linked libraries there appear:
> > > > > > libXNVCtrl.so.0 and libX11.so.6
> > > > > >
> > > > > > the first one related to NVIDIA. I observed that this does not
> happen
> > > > > when
> > > > > > installing PETSc without hwloc. In this new version, PETSc
> requires
> > > to
> > > > > > install hwloc when trying to install pastix. In previous
> versions of
> > > > > PETSc
> > > > > > (eg 3.11.2) that wasn't necessary.
> > > > > >
> > > > > > I'm working in a cluster where I have no access to these
> X11-related
> > > > > > libraries and that's why I need them not be linked. Is it there
> some
> > > way
> > > > > to
> > > > > > disable X11 when installing hwloc? maybe enforcing some
> configuration
> > > > > > variables when installing it through petsc or installing it
> > > > > independently?
> > > > > >
> > > > > > thanks a lot!
> > > > > >
> > > > > > Below the configuration command of the two installations I've
> tried
> > > with
> > > > > > the 3.13.0 version.
> > > > > >
> > > > > > === WITH PASTIX ===
> > > > > >
> > > > > > ./configure --with-make-np=20
> > > > > > --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64
> > > --with-debugging=0
> > > > > > --doCleanup=0 \
> > > > > > --with-mpi=1 \
> > > > > > --with-valgrind=1
> > > --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
> > > > > > --download-scalapack \
> > > > > > --download-openblas \
> > > > > > --download-mumps \
> > > > > > --download-superlu_dist \
> > > > > > --download-metis \
> > > > > > --download-parmetis \
> > > > > > --download-ptscotch \
> > > > > > --download-hypre \
> > > > > >
> > > > > > *--download-pastix \--download-hwloc \*
> > > > > > --with-64-bit-indices=1 \
> > > > > > LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
> > > > > > --with-cxx-dialect=C++11 \
> > > > > > --with-x11=0 --with-x=0 --with-windows-graphics=0 \
> > > > > > COPTFLAGS="-O3 -march=native -mtune=native" \
> > > > > > CXXOPTFLAGS="-O3 -march=native -mtune=native" \
> > > > > > FOPTFLAGS="-O3 -march=native -mtune=native"
> > > > > >
> > > > > > === WITHOUT PASTIX ===
> > > > > >
> > > > > > the same as above but the options "--download-pastix
> > > --download-hwloc"
> > > > > >
> > > > > > ==
> 

[petsc-users] strange TS adaptivity behavior

2020-04-06 Thread Mark Adams
I have a problem that is fairly smooth and when it decreases the time step
it just keeps decreasing almost forever. I wanted to see if anyone has any
clue what is going on here.

This test reaches a quasi equilibrium and the adaptivity uses fairly large
time steps with dU/dt - F(u,t) = 0. I set a max time step of 10. A source
starts at one point (dU/dt - F(u,t) = S(t)). It cools pretty fast.

THe truncation error increase a lot when the source starts but it does not
decrease the time step immediately because I had a mat time step set:
 
  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 4
[0] TSAdaptChoose_Basic(): Estimated scaled local *truncation error
0.000214757*, accepting step of size 10.
  TSAdapt basic arkimex 0:1bee step *386* accepted t=2292.68+
1.000e+01 dt=1.000e+01  wlte=0.000215  wltea=   -1 wlter=   -1
...
[0] TSAdaptChoose_Basic(): Estimated scaled local *truncation error
0.500399,* accepting step of size 10.
  TSAdapt basic arkimex 0:1bee step *387* accepted t=2302.68+
1.000e+01 dt=1.000e+01  wlte=  0.5  wltea=   -1 wlter=   -1
388) species-0: charge density= -1.6422881272166e+01 z-momentum=
 7.2180929658011e-03 energy=  9.7881753794625e+05

It goes for another few time steps before it rejects the time step for the
first time, and then it just keeps reducing and reducing:

[0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
0.939966, accepting step of size 10.
  TSAdapt basic arkimex 0:1bee step *395* accepted t=2382.68+
1.000e+01 dt=9.283e+00  wlte= 0.94  wltea=   -1 wlter=   -1

[0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.33533,
*rejecting* step of size 9.28296
  TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
9.283e+00 dt=7.230e+00  wlte= 1.34  wltea=   -1 wlter=   -1

[0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.44054,
*rejecting* step of size 7.22994
  TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
7.230e+00 dt=2.711e+00  wlte= 1.44  wltea=   -1 wlter=   -1

[0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.63529,
*rejecting* step of size 2.71072
  TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
2.711e+00 dt=9.539e-01  wlte= 1.64  wltea=   -1 wlter=   -1

[0] TSAdaptChoose_Basic(): Estimated scaled local truncation error 1.60415,
*rejecting* step of size 0.953894
  TSAdapt basic arkimex 0:1bee step *396* rejected t=2392.68+
9.539e-01 dt=5.000e-01  wlte=  1.6  wltea=   -1 wlter=   -1

[0] TSAdaptChoose_Basic(): Estimated scaled local truncation error
1.49714, *accepting
because step size 0.5 is at minimum*
  TSAdapt basic arkimex 0:1bee step *396* accepted t=2392.68+
5.000e-01 dt=5.000e-01  wlte=  1.5  wltea=   -1 wlter=   -1

Anyone have any idea what is going on here?

Thanks,
Mark


Re: [petsc-users] Discontinuities in the Jacobian matrix for nonlinear problem

2020-04-06 Thread Zou, Ling via petsc-users
What about ‘bending’ the physics a bit?

Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),  
if x[i-1]+z[i-1]  >  x[i]+z[i] + eps
Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])), if  
  x[i]+z[i]  >  x[i-1]+z[i-1] + eps
Q_i-1/2 proportional to x[i-1] + z[i-1] - (x[i] + z[i]) 
  in between

in which, eps is a very small positive number.

-Ling


From: petsc-users  on behalf of Alexander B 
Prescott 
Date: Monday, April 6, 2020 at 1:06 PM
To: PETSc 
Subject: [petsc-users] Discontinuities in the Jacobian matrix for nonlinear 
problem

Hello,

The non-linear boundary-value problem I am applying PETSc to is a relatively 
simple steady-state flow routing algorithm based on the continuity equation, 
such that Div(Q) = 0 everywhere (Q=discharge). I use a finite volume approach 
to calculate flow between nodes, with Q calculated as a piecewise smooth 
function of the local flow depth and the water-surface slope. In 1D, the 
residual is calculated as R(x_i)=Q_i-1/2 - Q_i+1/2.
For example, Q_i-1/2 at x[i]:
Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),  if  
x[i-1]+z[i-1]  >  x[i]+z[i]
Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),  if 
x[i]+z[i]  >  x[i-1]+z[i-1]

Where z[i] is local topography and doesn't change over the iterations, and 
Q_i+1/2 is computed analogously. So the residual derivatives with respect to 
x[i-1], x[i] and x[i+1] are not continuous when the water-surface slope = 0.

Are there intelligent ways to handle this problem? My 1D trial runs naively fix 
any zero-valued water-surface slopes to a small non-zero positive value (e.g. 
1e-12). Solver convergence has been mixed and highly dependent on the initial 
guess. So far, FAS with QN coarse solver has been the most robust.

Restricting x[i] to be non-negative is a separate issue, to which I have 
applied the SNES_VI solvers. They perform modestly but have been less robust.

Best,
Alexander



--
Alexander Prescott
alexpresc...@email.arizona.edu
PhD Candidate, The University of Arizona
Department of Geosciences
1040 E. 4th Street
Tucson, AZ, 85721


Re: [petsc-users] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Satish Balay via petsc-users
Looks like the option is --with-x=no

Can you give this a try? Branch balay/fix-hwloc-x-dependency/maint has this 
update now

Satish

On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:

> Hello Satish, Im sorry but I think I tested this workaround with the wrong
> installation, my bad.
> In fact the libXNVC, X11 libraries are still being linked even with the
> --download-hwloc-configure-arguments=--without-x option
> 
> Im attaching the config.log file located in
> $PETSC_DIR/$PETSC_ARCH/externalpackages/hwloc-2.1.0
> you can see that the option --without-x is there (line 7) but by means of
> $ ldd foo
> I see that the links are still there
> 
> On Mon, Apr 6, 2020 at 2:57 PM Satish Balay  wrote:
> 
> > Great!
> >
> > Wrt pastix dependency on hwloc -
> > config/BuildSystem/config/packages/PaStiX.py has the following comment:
> >
> > # PaStiX.py does not absolutely require hwloc, but it performs better
> > with it and can fail (in ways not easily tested) without it
> > #
> > https://gforge.inria.fr/forum/forum.php?thread_id=32824_id=599_id=186
> > # https://solverstack.gitlabpages.inria.fr/pastix/Bindings.html
> >
> > I have a fix in branch balay/fix-hwloc-x-dependency/maint [that does not
> > need the extra --download-hwloc-configure-arguments=--without-x option].
> > Can you give this a try?
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> >
> > > hello Satish,
> > > adding
> > > --download-hwloc-configure-arguments=--without-x
> > > worked perfectly
> > >
> > > thank you!
> > >
> > > On Mon, Apr 6, 2020 at 2:12 PM Satish Balay  wrote:
> > >
> > > > you can try:
> > > >
> > > > --download-pastix --download-hwloc
> > > > --download-hwloc-configure-arguments=--without-x
> > > >
> > > > We should fix this to automatically use --with-x=0/1
> > > >
> > > > Satish
> > > >
> > > > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> > > >
> > > > > hello everyone,
> > > > >
> > > > > I have a fresh installation of the 3.13.0 version with pastix. Like
> > with
> > > > > previous versions, I'm using the options
> > > > >
> > > > > --with-x11=0 --with-x=0 --with-windows-graphics=0
> > > > >
> > > > > to disable X11
> > > > >
> > > > > however, when compiling my program foo and doing
> > > > >
> > > > > $ ldd foo
> > > > >
> > > > > between the linked libraries there appear:
> > > > > libXNVCtrl.so.0 and libX11.so.6
> > > > >
> > > > > the first one related to NVIDIA. I observed that this does not happen
> > > > when
> > > > > installing PETSc without hwloc. In this new version, PETSc requires
> > to
> > > > > install hwloc when trying to install pastix. In previous versions of
> > > > PETSc
> > > > > (eg 3.11.2) that wasn't necessary.
> > > > >
> > > > > I'm working in a cluster where I have no access to these X11-related
> > > > > libraries and that's why I need them not be linked. Is it there some
> > way
> > > > to
> > > > > disable X11 when installing hwloc? maybe enforcing some configuration
> > > > > variables when installing it through petsc or installing it
> > > > independently?
> > > > >
> > > > > thanks a lot!
> > > > >
> > > > > Below the configuration command of the two installations I've tried
> > with
> > > > > the 3.13.0 version.
> > > > >
> > > > > === WITH PASTIX ===
> > > > >
> > > > > ./configure --with-make-np=20
> > > > > --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64
> > --with-debugging=0
> > > > > --doCleanup=0 \
> > > > > --with-mpi=1 \
> > > > > --with-valgrind=1
> > --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
> > > > > --download-scalapack \
> > > > > --download-openblas \
> > > > > --download-mumps \
> > > > > --download-superlu_dist \
> > > > > --download-metis \
> > > > > --download-parmetis \
> > > > > --download-ptscotch \
> > > > > --download-hypre \
> > > > >
> > > > > *--download-pastix \--download-hwloc \*
> > > > > --with-64-bit-indices=1 \
> > > > > LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
> > > > > --with-cxx-dialect=C++11 \
> > > > > --with-x11=0 --with-x=0 --with-windows-graphics=0 \
> > > > > COPTFLAGS="-O3 -march=native -mtune=native" \
> > > > > CXXOPTFLAGS="-O3 -march=native -mtune=native" \
> > > > > FOPTFLAGS="-O3 -march=native -mtune=native"
> > > > >
> > > > > === WITHOUT PASTIX ===
> > > > >
> > > > > the same as above but the options "--download-pastix
> > --download-hwloc"
> > > > >
> > > > > ==
> > > > >
> > > >
> > > >
> > >
> >
> >
> 



Re: [petsc-users] Discontinuities in the Jacobian matrix for nonlinear problem

2020-04-06 Thread Matthew Knepley
On Mon, Apr 6, 2020 at 2:06 PM Alexander B Prescott <
alexpresc...@email.arizona.edu> wrote:

> Hello,
>
> The non-linear boundary-value problem I am applying PETSc to is a
> relatively simple steady-state flow routing algorithm based on the
> continuity equation, such that Div(Q) = 0 everywhere (Q=discharge). I use a
> finite volume approach to calculate flow between nodes, with Q calculated
> as a piecewise smooth function of the local flow depth and the
> water-surface slope. In 1D, the residual is calculated as R(x_i)=Q_i-1/2 -
> Q_i+1/2.
> For example, Q_i-1/2 at x[i]:
>
> Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
>   if  x[i-1]+z[i-1]  >  x[i]+z[i]
> Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
> if x[i]+z[i]  >  x[i-1]+z[i-1]
>
>
> Where z[i] is local topography and doesn't change over the iterations, and
> Q_i+1/2 is computed analogously. So the residual derivatives with respect
> to x[i-1], x[i] and x[i+1] are not continuous when the water-surface slope
> = 0.
>
> Are there intelligent ways to handle this problem? My 1D trial runs
> naively fix any zero-valued water-surface slopes to a small non-zero
> positive value (e.g. 1e-12). Solver convergence has been mixed and highly
> dependent on the initial guess. So far, FAS with QN coarse solver has been
> the most robust.
>
> Restricting x[i] to be non-negative is a separate issue, to which I have
> applied the SNES_VI solvers. They perform modestly but have been less
> robust.
>

My understanding is that this is a shortcoming of the model, not the
solver. However, I am Cc'ing Nathan since he knows
about these models.

  Thanks,

Matt


> Best,
> Alexander
>
>
>
> --
> Alexander Prescott
> alexpresc...@email.arizona.edu
> PhD Candidate, The University of Arizona
> Department of Geosciences
> 1040 E. 4th Street
> Tucson, AZ, 85721
>


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

2020-04-06 Thread Abhyankar, Shrirang G via petsc-users
Sorry, my bad. I had a stale branch.

Thanks,
Shri


From: Matthew Knepley 
Date: Monday, April 6, 2020 at 12:59 PM
To: "Abhyankar, Shrirang G" 
Cc: PETSc Users 
Subject: Re: [petsc-users] DMCreateSectionSF

On Mon, Apr 6, 2020 at 12:13 PM Abhyankar, Shrirang G via petsc-users 
mailto:petsc-users@mcs.anl.gov>> wrote:
I am getting an error for DMCreateSectionSF() with latest petsc-master. I see a 
DMCreateDefaultSF in petscdm.h. Has DMCreateSectionSF been renamed to 
DMCreateDefaultSF?

No. What is the error?

  Thanks,

 Matt


Thanks,
Shri



--
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] Issue with the installation of Petsc

2020-04-06 Thread Satish Balay via petsc-users
>>>
Executing: /home/martinelli/repositories/petsc/arch-linux-c-opt/bin/mpif90  -o 
/tmp/petsc-nazwq29o/config.setCompilers/conftest
/tmp/petsc-nazwq29o/config.setCompilers/conftest.o

ERROR while running executable: Could not execute 
"['/tmp/petsc-nazwq29o/config.setCompilers/conftest']":
/tmp/petsc-nazwq29o/config.setCompilers/conftest: symbol lookup error: 
/home/martinelli/repositories/petsc/arch-linux-c-opt//lib/libmpifort.so.12: 
undefined symbol: MPIR_F_NeedInit
<<


Ok - its the same issue that you've got when using --with-batch.

> > > 18943:libmpi.so:0031ab00 D MPIR_F_NeedInit
> > > 27046:libmpich.so:0031ab00 D MPIR_F_NeedInit

The 'nm' output below does show that the symbol is in 'libmpich.so' and 
'libmpi.so'

What do you have for:

/home/martinelli/repositories/petsc/arch-linux-c-opt/bin/mpif90 -show

If libmpi.so is listed in the link like - then the compiler for some reason 
isn't resolving this symbol.

You can try using --download-openmpi - or building mpich manually [without some 
of the additional optimization flags] - and see if that works.

BTW: I tried this exact same build with 'gcc (GCC) 9.2.1 20190827 (Red Hat 
9.2.1-1)' on 'Intel(R) Core(TM) i7-8700 CPU @ 3.20GH' and don't see this issue.

Configure Options: --configModules=PETSc.Configure 
--optionsModule=config.compilerOptions --with-cc=gcc --with-cxx=g++ 
--with-fc=gfortran --download-mpich --download-fblaslapack --with-mpi=1 
--download-superlu_dist --download-mumps --download-hypre --with-debugging=0 
COPTFLAGS="-O3 -march=native -mtune=native" CXXOPTFLAGS="-O3 -march=native 
-mtune=native" FOPTFLAGS="-O3 -march=native -mtune=native" --download-scalapack

Satish

On Mon, 6 Apr 2020, Franco Dassi wrote:

> Dear all,
> 
> Thank you for your quick answer. Here you are the .log file
> 
> franco
> 
> Il giorno lun 6 apr 2020 alle ore 16:09 Satish Balay  ha
> scritto:
> 
> > Can you send configure.log from the first build attempt?
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Franco Dassi wrote:
> >
> > > Good morning,
> > >
> > > We are using your Petsc library to solve linear systems coming from PDEs.
> > >
> > > However recently we are trying to install PETSC (maint branch) on a linux
> > > system but we have some issues.
> > >
> > > On the one hand, when we use the following configure command
> > >
> > > ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> > > --download-mpich --download-fblaslapack --with-mpi=1
> > > --download-superlu_dist --download-mumps --download-hypre
> > > --with-debugging=0 COPTFLAGS='-O3 -march=native -mtune=native'
> > > CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3
> > > -march=native -mtune=native' --download-scalapack
> > >
> > >
> > > I obtain the following error:
> > >
> > >
> > ===
> > >  Configuring PETSc to compile on your system
> > >
> > >
> > ===
> > > TESTING: checkFortranCompiler from
> > > config.setCompilers(config/BuildSystem/config/setCompilers.py:989)
> > >
> > >
> > ***
> > > OSError while running ./configure
> > >
> > ---
> > > Cannot run executables created with FC. If this machine uses a batch
> > system
> > > to submit jobs you will need to configure using ./configure with the
> > > additional option  --with-batch.
> > >  Otherwise there is problem with the compilers. Can you compile and run
> > > code with your compiler
> > > '/home/gurst/repositories/petsc/arch-linux-c-opt/bin/mpif90'?
> > >
> > ***
> > >
> > >
> > > On the other hand if we add the --with-batch the library is compiled, but
> > > when we try to use it to run the code we obtain the following error (at
> > run
> > > time):
> > >
> > > ./testGBDForMixed3d: symbol lookup error:
> > >
> > /home/martinelli/repositories/petsc/arch-linux-c-opt//lib/libmpifort.so.12:
> > > undefined symbol: MPIR_F_NeedInit
> > >
> > >
> > > Looking the symbols table in the petsc/arch-linux-c-opt/lib directory,
> > > It seems that something is undefined:
> > >
> > > ~/repositories/petsc/arch-linux-c-opt/lib $ nm -A *.so | grep -n
> > > MPIR_F_NeedInit
> > >
> > > 12591:libfmpich.so: U MPIR_F_NeedInit
> > > 18943:libmpi.so:0031ab00 D MPIR_F_NeedInit
> > > 27046:libmpich.so:0031ab00 D MPIR_F_NeedInit
> > > 34565:libmpichf90.so: U MPIR_F_NeedInit
> > > 40333:libmpifort.so: U MPIR_F_NeedInit
> > > 46685:libmpl.so:0031ab00 D MPIR_F_NeedInit
> > > 54788:libopa.so:0031ab00 D MPIR_F_NeedInit
> > >
> > > Are we  doing something wrong?
> > >
> > > Thank you in advance for your time
> > > best
> > > Massimiliano 

[petsc-users] Discontinuities in the Jacobian matrix for nonlinear problem

2020-04-06 Thread Alexander B Prescott
Hello,

The non-linear boundary-value problem I am applying PETSc to is a
relatively simple steady-state flow routing algorithm based on the
continuity equation, such that Div(Q) = 0 everywhere (Q=discharge). I use a
finite volume approach to calculate flow between nodes, with Q calculated
as a piecewise smooth function of the local flow depth and the
water-surface slope. In 1D, the residual is calculated as R(x_i)=Q_i-1/2 -
Q_i+1/2.
For example, Q_i-1/2 at x[i]:

Q_i-1/2 proportional to sqrt(x[i-1] + z[i-1] - (x[i] + z[i])),
if  x[i-1]+z[i-1]  >  x[i]+z[i]
Q_i-1/2 proportional to -1.0*sqrt(x[i] + z[i] - (x[i-1] + z[i-1])),
if x[i]+z[i]  >  x[i-1]+z[i-1]


Where z[i] is local topography and doesn't change over the iterations, and
Q_i+1/2 is computed analogously. So the residual derivatives with respect
to x[i-1], x[i] and x[i+1] are not continuous when the water-surface slope
= 0.

Are there intelligent ways to handle this problem? My 1D trial runs naively
fix any zero-valued water-surface slopes to a small non-zero positive value
(e.g. 1e-12). Solver convergence has been mixed and highly dependent on the
initial guess. So far, FAS with QN coarse solver has been the most robust.

Restricting x[i] to be non-negative is a separate issue, to which I have
applied the SNES_VI solvers. They perform modestly but have been less
robust.

Best,
Alexander



-- 
Alexander Prescott
alexpresc...@email.arizona.edu
PhD Candidate, The University of Arizona
Department of Geosciences
1040 E. 4th Street
Tucson, AZ, 85721


Re: [petsc-users] DMCreateSectionSF

2020-04-06 Thread Matthew Knepley
On Mon, Apr 6, 2020 at 12:13 PM Abhyankar, Shrirang G via petsc-users <
petsc-users@mcs.anl.gov> wrote:

> I am getting an error for DMCreateSectionSF() with latest petsc-master. I
> see a DMCreateDefaultSF in petscdm.h. Has DMCreateSectionSF been renamed to
> DMCreateDefaultSF?
>

No. What is the error?

  Thanks,

 Matt


>
>
> Thanks,
>
> Shri
>
>
>


-- 
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] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Satish Balay via petsc-users
Great!

Wrt pastix dependency on hwloc - config/BuildSystem/config/packages/PaStiX.py 
has the following comment:

# PaStiX.py does not absolutely require hwloc, but it performs better with 
it and can fail (in ways not easily tested) without it
# 
https://gforge.inria.fr/forum/forum.php?thread_id=32824_id=599_id=186
# https://solverstack.gitlabpages.inria.fr/pastix/Bindings.html

I have a fix in branch balay/fix-hwloc-x-dependency/maint [that does not need 
the extra --download-hwloc-configure-arguments=--without-x option]. Can you 
give this a try?

Satish

On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:

> hello Satish,
> adding
> --download-hwloc-configure-arguments=--without-x
> worked perfectly
> 
> thank you!
> 
> On Mon, Apr 6, 2020 at 2:12 PM Satish Balay  wrote:
> 
> > you can try:
> >
> > --download-pastix --download-hwloc
> > --download-hwloc-configure-arguments=--without-x
> >
> > We should fix this to automatically use --with-x=0/1
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
> >
> > > hello everyone,
> > >
> > > I have a fresh installation of the 3.13.0 version with pastix. Like with
> > > previous versions, I'm using the options
> > >
> > > --with-x11=0 --with-x=0 --with-windows-graphics=0
> > >
> > > to disable X11
> > >
> > > however, when compiling my program foo and doing
> > >
> > > $ ldd foo
> > >
> > > between the linked libraries there appear:
> > > libXNVCtrl.so.0 and libX11.so.6
> > >
> > > the first one related to NVIDIA. I observed that this does not happen
> > when
> > > installing PETSc without hwloc. In this new version, PETSc requires to
> > > install hwloc when trying to install pastix. In previous versions of
> > PETSc
> > > (eg 3.11.2) that wasn't necessary.
> > >
> > > I'm working in a cluster where I have no access to these X11-related
> > > libraries and that's why I need them not be linked. Is it there some way
> > to
> > > disable X11 when installing hwloc? maybe enforcing some configuration
> > > variables when installing it through petsc or installing it
> > independently?
> > >
> > > thanks a lot!
> > >
> > > Below the configuration command of the two installations I've tried with
> > > the 3.13.0 version.
> > >
> > > === WITH PASTIX ===
> > >
> > > ./configure --with-make-np=20
> > > --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
> > > --doCleanup=0 \
> > > --with-mpi=1 \
> > > --with-valgrind=1 --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
> > > --download-scalapack \
> > > --download-openblas \
> > > --download-mumps \
> > > --download-superlu_dist \
> > > --download-metis \
> > > --download-parmetis \
> > > --download-ptscotch \
> > > --download-hypre \
> > >
> > > *--download-pastix \--download-hwloc \*
> > > --with-64-bit-indices=1 \
> > > LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
> > > --with-cxx-dialect=C++11 \
> > > --with-x11=0 --with-x=0 --with-windows-graphics=0 \
> > > COPTFLAGS="-O3 -march=native -mtune=native" \
> > > CXXOPTFLAGS="-O3 -march=native -mtune=native" \
> > > FOPTFLAGS="-O3 -march=native -mtune=native"
> > >
> > > === WITHOUT PASTIX ===
> > >
> > > the same as above but the options "--download-pastix --download-hwloc"
> > >
> > > ==
> > >
> >
> >
> 



Re: [petsc-users] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Alfredo Jaramillo
I understand, Matthew, thank you both!

On Mon, Apr 6, 2020 at 2:29 PM Matthew Knepley  wrote:

> Okay, what it must be is that hwloc dynamically links to X11, so its never
> given explicitly anywhere by us, but hwloc sucks it in.
> Satish is right about the fix.
>
>   Thanks,
>
>  Matt
>
> On Mon, Apr 6, 2020 at 1:18 PM Alfredo Jaramillo <
> ajaramillopa...@gmail.com> wrote:
>
>> attaching the file
>> thanks!
>>
>> On Mon, Apr 6, 2020 at 2:12 PM Matthew Knepley  wrote:
>>
>>> Hmm, there is no sign of libX11 in that log. Can you send me
>>>
>>>   $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
>>>
>>>   Thanks,
>>>
>>>  Matt
>>>
>>> On Mon, Apr 6, 2020 at 1:02 PM Alfredo Jaramillo <
>>> ajaramillopa...@gmail.com> wrote:
>>>
 Sure, here it is.
 thx

 On Mon, Apr 6, 2020 at 1:59 PM Matthew Knepley 
 wrote:

> On Mon, Apr 6, 2020 at 12:55 PM Alfredo Jaramillo <
> ajaramillopa...@gmail.com> wrote:
>
>> hello everyone,
>>
>> I have a fresh installation of the 3.13.0 version with pastix. Like
>> with previous versions, I'm using the options
>>
>> --with-x11=0 --with-x=0 --with-windows-graphics=0
>>
>> to disable X11
>>
>> however, when compiling my program foo and doing
>>
>> $ ldd foo
>>
>> between the linked libraries there appear:
>> libXNVCtrl.so.0 and libX11.so.6
>>
>> the first one related to NVIDIA. I observed that this does not happen
>> when installing PETSc without hwloc. In this new version, PETSc requires 
>> to
>> install hwloc when trying to install pastix. In previous versions of 
>> PETSc
>> (eg 3.11.2) that wasn't necessary.
>>
>> I'm working in a cluster where I have no access to these X11-related
>> libraries and that's why I need them not be linked. Is it there some way 
>> to
>> disable X11 when installing hwloc? maybe enforcing some configuration
>> variables when installing it through petsc or installing it 
>> independently?
>>
>
> Can you send configure.log?
>
>   Thanks,
>
>  Matt
>
>
>> thanks a lot!
>>
>> Below the configuration command of the two installations I've tried
>> with the 3.13.0 version.
>>
>> === WITH PASTIX ===
>>
>> ./configure --with-make-np=20
>> --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
>> --doCleanup=0 \
>> --with-mpi=1 \
>> --with-valgrind=1
>> --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
>> --download-scalapack \
>> --download-openblas \
>> --download-mumps \
>> --download-superlu_dist \
>> --download-metis \
>> --download-parmetis \
>> --download-ptscotch \
>> --download-hypre \
>>
>> *--download-pastix \--download-hwloc \*
>> --with-64-bit-indices=1 \
>> LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
>> --with-cxx-dialect=C++11 \
>> --with-x11=0 --with-x=0 --with-windows-graphics=0 \
>> COPTFLAGS="-O3 -march=native -mtune=native" \
>> CXXOPTFLAGS="-O3 -march=native -mtune=native" \
>> FOPTFLAGS="-O3 -march=native -mtune=native"
>>
>> === WITHOUT PASTIX ===
>>
>> the same as above but the options "--download-pastix --download-hwloc"
>>
>> ==
>>
>>
>
> --
> 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/
>>> 
>>>
>>
>
> --
> 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] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Matthew Knepley
Okay, what it must be is that hwloc dynamically links to X11, so its never
given explicitly anywhere by us, but hwloc sucks it in.
Satish is right about the fix.

  Thanks,

 Matt

On Mon, Apr 6, 2020 at 1:18 PM Alfredo Jaramillo 
wrote:

> attaching the file
> thanks!
>
> On Mon, Apr 6, 2020 at 2:12 PM Matthew Knepley  wrote:
>
>> Hmm, there is no sign of libX11 in that log. Can you send me
>>
>>   $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
>>
>>   Thanks,
>>
>>  Matt
>>
>> On Mon, Apr 6, 2020 at 1:02 PM Alfredo Jaramillo <
>> ajaramillopa...@gmail.com> wrote:
>>
>>> Sure, here it is.
>>> thx
>>>
>>> On Mon, Apr 6, 2020 at 1:59 PM Matthew Knepley 
>>> wrote:
>>>
 On Mon, Apr 6, 2020 at 12:55 PM Alfredo Jaramillo <
 ajaramillopa...@gmail.com> wrote:

> hello everyone,
>
> I have a fresh installation of the 3.13.0 version with pastix. Like
> with previous versions, I'm using the options
>
> --with-x11=0 --with-x=0 --with-windows-graphics=0
>
> to disable X11
>
> however, when compiling my program foo and doing
>
> $ ldd foo
>
> between the linked libraries there appear:
> libXNVCtrl.so.0 and libX11.so.6
>
> the first one related to NVIDIA. I observed that this does not happen
> when installing PETSc without hwloc. In this new version, PETSc requires 
> to
> install hwloc when trying to install pastix. In previous versions of PETSc
> (eg 3.11.2) that wasn't necessary.
>
> I'm working in a cluster where I have no access to these X11-related
> libraries and that's why I need them not be linked. Is it there some way 
> to
> disable X11 when installing hwloc? maybe enforcing some configuration
> variables when installing it through petsc or installing it independently?
>

 Can you send configure.log?

   Thanks,

  Matt


> thanks a lot!
>
> Below the configuration command of the two installations I've tried
> with the 3.13.0 version.
>
> === WITH PASTIX ===
>
> ./configure --with-make-np=20
> --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
> --doCleanup=0 \
> --with-mpi=1 \
> --with-valgrind=1
> --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
> --download-scalapack \
> --download-openblas \
> --download-mumps \
> --download-superlu_dist \
> --download-metis \
> --download-parmetis \
> --download-ptscotch \
> --download-hypre \
>
> *--download-pastix \--download-hwloc \*
> --with-64-bit-indices=1 \
> LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
> --with-cxx-dialect=C++11 \
> --with-x11=0 --with-x=0 --with-windows-graphics=0 \
> COPTFLAGS="-O3 -march=native -mtune=native" \
> CXXOPTFLAGS="-O3 -march=native -mtune=native" \
> FOPTFLAGS="-O3 -march=native -mtune=native"
>
> === WITHOUT PASTIX ===
>
> the same as above but the options "--download-pastix --download-hwloc"
>
> ==
>
>

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

-- 
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] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Alfredo Jaramillo
hello Satish,
adding
--download-hwloc-configure-arguments=--without-x
worked perfectly

thank you!

On Mon, Apr 6, 2020 at 2:12 PM Satish Balay  wrote:

> you can try:
>
> --download-pastix --download-hwloc
> --download-hwloc-configure-arguments=--without-x
>
> We should fix this to automatically use --with-x=0/1
>
> Satish
>
> On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:
>
> > hello everyone,
> >
> > I have a fresh installation of the 3.13.0 version with pastix. Like with
> > previous versions, I'm using the options
> >
> > --with-x11=0 --with-x=0 --with-windows-graphics=0
> >
> > to disable X11
> >
> > however, when compiling my program foo and doing
> >
> > $ ldd foo
> >
> > between the linked libraries there appear:
> > libXNVCtrl.so.0 and libX11.so.6
> >
> > the first one related to NVIDIA. I observed that this does not happen
> when
> > installing PETSc without hwloc. In this new version, PETSc requires to
> > install hwloc when trying to install pastix. In previous versions of
> PETSc
> > (eg 3.11.2) that wasn't necessary.
> >
> > I'm working in a cluster where I have no access to these X11-related
> > libraries and that's why I need them not be linked. Is it there some way
> to
> > disable X11 when installing hwloc? maybe enforcing some configuration
> > variables when installing it through petsc or installing it
> independently?
> >
> > thanks a lot!
> >
> > Below the configuration command of the two installations I've tried with
> > the 3.13.0 version.
> >
> > === WITH PASTIX ===
> >
> > ./configure --with-make-np=20
> > --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
> > --doCleanup=0 \
> > --with-mpi=1 \
> > --with-valgrind=1 --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
> > --download-scalapack \
> > --download-openblas \
> > --download-mumps \
> > --download-superlu_dist \
> > --download-metis \
> > --download-parmetis \
> > --download-ptscotch \
> > --download-hypre \
> >
> > *--download-pastix \--download-hwloc \*
> > --with-64-bit-indices=1 \
> > LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
> > --with-cxx-dialect=C++11 \
> > --with-x11=0 --with-x=0 --with-windows-graphics=0 \
> > COPTFLAGS="-O3 -march=native -mtune=native" \
> > CXXOPTFLAGS="-O3 -march=native -mtune=native" \
> > FOPTFLAGS="-O3 -march=native -mtune=native"
> >
> > === WITHOUT PASTIX ===
> >
> > the same as above but the options "--download-pastix --download-hwloc"
> >
> > ==
> >
>
>


Re: [petsc-users] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Alfredo Jaramillo
attaching the file
thanks!

On Mon, Apr 6, 2020 at 2:12 PM Matthew Knepley  wrote:

> Hmm, there is no sign of libX11 in that log. Can you send me
>
>   $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
>
>   Thanks,
>
>  Matt
>
> On Mon, Apr 6, 2020 at 1:02 PM Alfredo Jaramillo <
> ajaramillopa...@gmail.com> wrote:
>
>> Sure, here it is.
>> thx
>>
>> On Mon, Apr 6, 2020 at 1:59 PM Matthew Knepley  wrote:
>>
>>> On Mon, Apr 6, 2020 at 12:55 PM Alfredo Jaramillo <
>>> ajaramillopa...@gmail.com> wrote:
>>>
 hello everyone,

 I have a fresh installation of the 3.13.0 version with pastix. Like
 with previous versions, I'm using the options

 --with-x11=0 --with-x=0 --with-windows-graphics=0

 to disable X11

 however, when compiling my program foo and doing

 $ ldd foo

 between the linked libraries there appear:
 libXNVCtrl.so.0 and libX11.so.6

 the first one related to NVIDIA. I observed that this does not happen
 when installing PETSc without hwloc. In this new version, PETSc requires to
 install hwloc when trying to install pastix. In previous versions of PETSc
 (eg 3.11.2) that wasn't necessary.

 I'm working in a cluster where I have no access to these X11-related
 libraries and that's why I need them not be linked. Is it there some way to
 disable X11 when installing hwloc? maybe enforcing some configuration
 variables when installing it through petsc or installing it independently?

>>>
>>> Can you send configure.log?
>>>
>>>   Thanks,
>>>
>>>  Matt
>>>
>>>
 thanks a lot!

 Below the configuration command of the two installations I've tried
 with the 3.13.0 version.

 === WITH PASTIX ===

 ./configure --with-make-np=20
 --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
 --doCleanup=0 \
 --with-mpi=1 \
 --with-valgrind=1 --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0
 \
 --download-scalapack \
 --download-openblas \
 --download-mumps \
 --download-superlu_dist \
 --download-metis \
 --download-parmetis \
 --download-ptscotch \
 --download-hypre \

 *--download-pastix \--download-hwloc \*
 --with-64-bit-indices=1 \
 LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
 --with-cxx-dialect=C++11 \
 --with-x11=0 --with-x=0 --with-windows-graphics=0 \
 COPTFLAGS="-O3 -march=native -mtune=native" \
 CXXOPTFLAGS="-O3 -march=native -mtune=native" \
 FOPTFLAGS="-O3 -march=native -mtune=native"

 === WITHOUT PASTIX ===

 the same as above but the options "--download-pastix --download-hwloc"

 ==


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


petscvariables
Description: Binary data


Re: [petsc-users] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Matthew Knepley
Hmm, there is no sign of libX11 in that log. Can you send me

  $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables

  Thanks,

 Matt

On Mon, Apr 6, 2020 at 1:02 PM Alfredo Jaramillo 
wrote:

> Sure, here it is.
> thx
>
> On Mon, Apr 6, 2020 at 1:59 PM Matthew Knepley  wrote:
>
>> On Mon, Apr 6, 2020 at 12:55 PM Alfredo Jaramillo <
>> ajaramillopa...@gmail.com> wrote:
>>
>>> hello everyone,
>>>
>>> I have a fresh installation of the 3.13.0 version with pastix. Like with
>>> previous versions, I'm using the options
>>>
>>> --with-x11=0 --with-x=0 --with-windows-graphics=0
>>>
>>> to disable X11
>>>
>>> however, when compiling my program foo and doing
>>>
>>> $ ldd foo
>>>
>>> between the linked libraries there appear:
>>> libXNVCtrl.so.0 and libX11.so.6
>>>
>>> the first one related to NVIDIA. I observed that this does not happen
>>> when installing PETSc without hwloc. In this new version, PETSc requires to
>>> install hwloc when trying to install pastix. In previous versions of PETSc
>>> (eg 3.11.2) that wasn't necessary.
>>>
>>> I'm working in a cluster where I have no access to these X11-related
>>> libraries and that's why I need them not be linked. Is it there some way to
>>> disable X11 when installing hwloc? maybe enforcing some configuration
>>> variables when installing it through petsc or installing it independently?
>>>
>>
>> Can you send configure.log?
>>
>>   Thanks,
>>
>>  Matt
>>
>>
>>> thanks a lot!
>>>
>>> Below the configuration command of the two installations I've tried with
>>> the 3.13.0 version.
>>>
>>> === WITH PASTIX ===
>>>
>>> ./configure --with-make-np=20
>>> --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
>>> --doCleanup=0 \
>>> --with-mpi=1 \
>>> --with-valgrind=1 --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
>>> --download-scalapack \
>>> --download-openblas \
>>> --download-mumps \
>>> --download-superlu_dist \
>>> --download-metis \
>>> --download-parmetis \
>>> --download-ptscotch \
>>> --download-hypre \
>>>
>>> *--download-pastix \--download-hwloc \*
>>> --with-64-bit-indices=1 \
>>> LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
>>> --with-cxx-dialect=C++11 \
>>> --with-x11=0 --with-x=0 --with-windows-graphics=0 \
>>> COPTFLAGS="-O3 -march=native -mtune=native" \
>>> CXXOPTFLAGS="-O3 -march=native -mtune=native" \
>>> FOPTFLAGS="-O3 -march=native -mtune=native"
>>>
>>> === WITHOUT PASTIX ===
>>>
>>> the same as above but the options "--download-pastix --download-hwloc"
>>>
>>> ==
>>>
>>>
>>
>> --
>> 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] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Satish Balay via petsc-users
you can try:

--download-pastix --download-hwloc 
--download-hwloc-configure-arguments=--without-x

We should fix this to automatically use --with-x=0/1

Satish

On Mon, 6 Apr 2020, Alfredo Jaramillo wrote:

> hello everyone,
> 
> I have a fresh installation of the 3.13.0 version with pastix. Like with
> previous versions, I'm using the options
> 
> --with-x11=0 --with-x=0 --with-windows-graphics=0
> 
> to disable X11
> 
> however, when compiling my program foo and doing
> 
> $ ldd foo
> 
> between the linked libraries there appear:
> libXNVCtrl.so.0 and libX11.so.6
> 
> the first one related to NVIDIA. I observed that this does not happen when
> installing PETSc without hwloc. In this new version, PETSc requires to
> install hwloc when trying to install pastix. In previous versions of PETSc
> (eg 3.11.2) that wasn't necessary.
> 
> I'm working in a cluster where I have no access to these X11-related
> libraries and that's why I need them not be linked. Is it there some way to
> disable X11 when installing hwloc? maybe enforcing some configuration
> variables when installing it through petsc or installing it independently?
> 
> thanks a lot!
> 
> Below the configuration command of the two installations I've tried with
> the 3.13.0 version.
> 
> === WITH PASTIX ===
> 
> ./configure --with-make-np=20
> --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
> --doCleanup=0 \
> --with-mpi=1 \
> --with-valgrind=1 --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
> --download-scalapack \
> --download-openblas \
> --download-mumps \
> --download-superlu_dist \
> --download-metis \
> --download-parmetis \
> --download-ptscotch \
> --download-hypre \
> 
> *--download-pastix \--download-hwloc \*
> --with-64-bit-indices=1 \
> LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
> --with-cxx-dialect=C++11 \
> --with-x11=0 --with-x=0 --with-windows-graphics=0 \
> COPTFLAGS="-O3 -march=native -mtune=native" \
> CXXOPTFLAGS="-O3 -march=native -mtune=native" \
> FOPTFLAGS="-O3 -march=native -mtune=native"
> 
> === WITHOUT PASTIX ===
> 
> the same as above but the options "--download-pastix --download-hwloc"
> 
> ==
> 



Re: [petsc-users] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Matthew Knepley
On Mon, Apr 6, 2020 at 12:55 PM Alfredo Jaramillo 
wrote:

> hello everyone,
>
> I have a fresh installation of the 3.13.0 version with pastix. Like with
> previous versions, I'm using the options
>
> --with-x11=0 --with-x=0 --with-windows-graphics=0
>
> to disable X11
>
> however, when compiling my program foo and doing
>
> $ ldd foo
>
> between the linked libraries there appear:
> libXNVCtrl.so.0 and libX11.so.6
>
> the first one related to NVIDIA. I observed that this does not happen when
> installing PETSc without hwloc. In this new version, PETSc requires to
> install hwloc when trying to install pastix. In previous versions of PETSc
> (eg 3.11.2) that wasn't necessary.
>
> I'm working in a cluster where I have no access to these X11-related
> libraries and that's why I need them not be linked. Is it there some way to
> disable X11 when installing hwloc? maybe enforcing some configuration
> variables when installing it through petsc or installing it independently?
>

Can you send configure.log?

  Thanks,

 Matt


> thanks a lot!
>
> Below the configuration command of the two installations I've tried with
> the 3.13.0 version.
>
> === WITH PASTIX ===
>
> ./configure --with-make-np=20
> --with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
> --doCleanup=0 \
> --with-mpi=1 \
> --with-valgrind=1 --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
> --download-scalapack \
> --download-openblas \
> --download-mumps \
> --download-superlu_dist \
> --download-metis \
> --download-parmetis \
> --download-ptscotch \
> --download-hypre \
>
> *--download-pastix \--download-hwloc \*
> --with-64-bit-indices=1 \
> LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
> --with-cxx-dialect=C++11 \
> --with-x11=0 --with-x=0 --with-windows-graphics=0 \
> COPTFLAGS="-O3 -march=native -mtune=native" \
> CXXOPTFLAGS="-O3 -march=native -mtune=native" \
> FOPTFLAGS="-O3 -march=native -mtune=native"
>
> === WITHOUT PASTIX ===
>
> the same as above but the options "--download-pastix --download-hwloc"
>
> ==
>
>

-- 
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] error rebasing with master - DMPlex - Hypre

2020-04-06 Thread Matthew Knepley
I removed that function. Is it still in your Fortran bindings?

  Matt

On Mon, Apr 6, 2020 at 11:47 AM Mark Adams  wrote:

> 11:41 mark/feature-xgc-interface-rebase<> ~/Codes/petsc$ make
> PETSC_DIR=/Users/markadams/Codes/petsc PETSC_ARCH=arch-macosx-gnu-g check
> Running check examples to verify correct installation
> Using PETSC_DIR=/Users/markadams/Codes/petsc and
> PETSC_ARCH=arch-macosx-gnu-g
> make[3]: [ex19.PETSc] Error 2 (ignored)
> ***Error detected during compile or
> link!***
> See http://www.mcs.anl.gov/petsc/documentation/faq.html
> /Users/markadams/Codes/petsc/src/snes/tutorials ex19
>
> *
> /usr/local/Cellar/mpich/3.3.2/bin/mpicc -Wl,-multiply_defined,suppress
> -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs
> -Wl,-search_paths_first -Wl,-no_compact_unwind  -Wall -Wwrite-strings
> -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector
> -fno-stack-check -Qunused-arguments -fvisibility=hidden -g -O0
>  -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress
> -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind
>  -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas
> -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden
> -g -O0  -I/Users/markadams/Codes/petsc/include
> -I/Users/markadams/Codes/petsc/arch-macosx-gnu-g/include -I/opt/X11/include
> -I/usr/local/Cellar/mpich/3.3.2/include  ex19.c
>  -Wl,-rpath,/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib
> -L/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib
> -Wl,-rpath,/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib
> -L/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib
> -Wl,-rpath,/opt/X11/lib -L/opt/X11/lib
> -Wl,-rpath,/usr/local/Cellar/mpich/3.3.2/lib
> -L/usr/local/Cellar/mpich/3.3.2/lib
> -Wl,-rpath,/usr/local/Cellar/gcc/9.3.0/lib/gcc/9/gcc/x86_64-apple-darwin19/9.3.0
> -L/usr/local/Cellar/gcc/9.3.0/lib/gcc/9/gcc/x86_64-apple-darwin19/9.3.0
> -Wl,-rpath,/usr/local/Cellar/gcc/9.3.0/lib/gcc/9
> -L/usr/local/Cellar/gcc/9.3.0/lib/gcc/9 -lpetsc -lfftw3_mpi -lfftw3 -lp4est
> -lsc -llapack -lblas -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5
> -lparmetis -lmetis -ltriangle -lz -lX11 -lc++ -ldl -lmpifort -lmpi -lpmpi
> -lgfortran -lquadmath -lm -lc++ -ldl -o ex19
> Undefined symbols for architecture x86_64:
>   "_DMPlexGetHybridBounds", referenced from:
>   import-atom in libpetsc.dylib
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[4]: *** [ex19] Error 1
> make[3]: [ex47.PETSc] Error 2 (ignored)
>


-- 
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] deactivating x11 in PETSc 3.13.0 with pastix/hwloc

2020-04-06 Thread Alfredo Jaramillo
hello everyone,

I have a fresh installation of the 3.13.0 version with pastix. Like with
previous versions, I'm using the options

--with-x11=0 --with-x=0 --with-windows-graphics=0

to disable X11

however, when compiling my program foo and doing

$ ldd foo

between the linked libraries there appear:
libXNVCtrl.so.0 and libX11.so.6

the first one related to NVIDIA. I observed that this does not happen when
installing PETSc without hwloc. In this new version, PETSc requires to
install hwloc when trying to install pastix. In previous versions of PETSc
(eg 3.11.2) that wasn't necessary.

I'm working in a cluster where I have no access to these X11-related
libraries and that's why I need them not be linked. Is it there some way to
disable X11 when installing hwloc? maybe enforcing some configuration
variables when installing it through petsc or installing it independently?

thanks a lot!

Below the configuration command of the two installations I've tried with
the 3.13.0 version.

=== WITH PASTIX ===

./configure --with-make-np=20
--with-petsc-arch=x64go-3.13-openmpi-4.0.1-pastix-64 --with-debugging=0
--doCleanup=0 \
--with-mpi=1 \
--with-valgrind=1 --with-valgrind-dir=$PATH_TO_VALGRIND/valgrind-3.15.0 \
--download-scalapack \
--download-openblas \
--download-mumps \
--download-superlu_dist \
--download-metis \
--download-parmetis \
--download-ptscotch \
--download-hypre \

*--download-pastix \--download-hwloc \*
--with-64-bit-indices=1 \
LDFLAGS=$LDFLAGS CPPFLAGS=$CPPFLAGS \
--with-cxx-dialect=C++11 \
--with-x11=0 --with-x=0 --with-windows-graphics=0 \
COPTFLAGS="-O3 -march=native -mtune=native" \
CXXOPTFLAGS="-O3 -march=native -mtune=native" \
FOPTFLAGS="-O3 -march=native -mtune=native"

=== WITHOUT PASTIX ===

the same as above but the options "--download-pastix --download-hwloc"

==


[petsc-users] DMCreateSectionSF

2020-04-06 Thread Abhyankar, Shrirang G via petsc-users
I am getting an error for DMCreateSectionSF() with latest petsc-master. I see a 
DMCreateDefaultSF in petscdm.h. Has DMCreateSectionSF been renamed to 
DMCreateDefaultSF?

Thanks,
Shri



Re: [petsc-users] [EXT]Re: Zero diagonal Error Code with all non-zero diagonal entries

2020-04-06 Thread Alexander B Prescott
Thank you Matt, you were right about the residual function, the error was
subtle. I've gotten the analytical Jacobian running and have some new
questions, but I'll start a new thread for that.
Best,
Alexander

On Fri, Apr 3, 2020 at 10:39 AM Matthew Knepley  wrote:

> *External Email*
> On Fri, Apr 3, 2020 at 12:20 PM Alexander B Prescott <
> alexpresc...@email.arizona.edu> wrote:
>
>> Hi Matt,
>>
>> Thanks for your help. I've done as you suggested and it still doesn't
>> work -- I get the same error message as before if I add the -snes_fd flag
>> to the command line. I also added -info and included that output below.
>> Also, a similar error is returned with other PC types, e.g LU.
>>
>
> Great. I now suspect your residual is flawed. I have several suggestions:
>
>   a) It looks like you might have an indexing bug, since your residual
> does not depend on dof 0. PETSc uses 0-based indexing.
>
>   b) I think the best initial check is to put in the exact solution and
> check that the residual is 0. I do this in SNES ex5 using MMS.
>
>   c) -snes_fd forms the Jacobian without coloring. Giving no options uses
> coloring.
>
>   Thanks,
>
>  Matt
>
>
>> [0] PetscInitialize(): PETSc successfully started: number of processors =
>> 1
>> [0] PetscGetHostName(): Rejecting domainname, likely is NIS login2.(none)
>> [0] PetscInitialize(): Running on machine: login2
>> [0] PetscCommDuplicate(): Duplicating a communicator 1140850688
>> -2080374784 max tags = 268435455
>> [0] PetscCommDuplicate(): Using internal PETSc communicator 1140850688
>> -2080374784
>> [0] DMGetDMSNES(): Creating new DMSNES
>> [0] PetscGetHostName(): Rejecting domainname, likely is NIS login2.(none)
>> [0] SNESSetFromOptions(): Setting default finite difference Jacobian
>> matrix
>> [0] DMCreateMatrix_Shell(): Naively creating matrix using global vector
>> distribution without preallocation
>> [0] MatSetUp(): Warning not preallocating matrix storage
>> [0] DMGetDMKSP(): Creating new DMKSP
>>   0 SNES Function norm 1.e+01
>> [0] MatAssemblyEnd_SeqAIJ(): Matrix size: 25 X 25; storage space: 70
>> unneeded,55 used
>> [0] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0
>> [0] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 3
>> [0] MatCheckCompressedRow(): Found the ratio (num_zerorows
>> 0)/(num_localrows 25) < 0.6. Do not use CompressedRow routines.
>> [0] MatSeqAIJCheckInode(): Found 25 nodes out of 25 rows. Not using Inode
>> routines
>> [0] SNESComputeJacobian(): Rebuilding preconditioner
>> [0] PCSetUp(): Setting up PC for first time
>> [0] PCSetUp_MG(): Using outer operators to define finest grid operator
>>   because PCMGGetSmoother(pc,nlevels-1,);KSPSetOperators(ksp,...);
>> was not called.
>> [0] PCSetUp(): Setting up PC for first time
>> [0] PCSetUp(): Leaving PC with identical preconditioner since operator is
>> unchanged
>> [0] PCSetUp(): Leaving PC with identical preconditioner since operator is
>> unchanged
>> [0] PCSetUp(): Leaving PC with identical preconditioner since operator is
>> unchanged
>> [0]PETSC ERROR: - Error Message
>> --
>> [0]PETSC ERROR: Arguments are incompatible
>> [0]PETSC ERROR: Zero diagonal on row 0
>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
>> for trouble shooting.
>> 
>>
>>
>> Best,
>> Alexander
>>
>>
>>
>> On Thu, Apr 2, 2020 at 9:07 PM Matthew Knepley  wrote:
>>
>>> *External Email*
>>> On Thu, Apr 2, 2020 at 11:33 PM Alexander B Prescott <
>>> alexpresc...@email.arizona.edu> wrote:
>>>
 Hello,

 I am teaching myself how to use Petsc for nonlinear equations and I've
 run into a problem that I can't quite figure out. I am trying to use the
 matrix coloring routines for the finite difference Jacobian approximation,
 and I've followed the steps in the manual to do this.
 When I run the program with a MG preconditioner, I get back the error:

 [0]PETSC ERROR: - Error Message
 
 [0]PETSC ERROR: Arguments are incompatible
 [0]PETSC ERROR: Zero diagonal on row 0
 .


>>> The easiest thing to try is just comment out all your matrix stuff
>>> including SNESSetJacobian(). PETSc will do the coloring automatically.
>>> If this works, you know its your coloring. If not, then its something
>>> with the MG setup.
>>>
>>>   Thanks,
>>>
>>> Matt
>>>
>>>
 What's interesting is that after I've added non-zero entries to the
 matrix with MatrixSetValues() and assembled the matrix
 with MatAssemblyBegin() + MatAssemblyEnd(), I can verify that every
 diagonal entry is non-zero with a call to MatGetValues. I've included a
 relevant code snippet below and I'm happy to send more. Any guidance is
 greatly appreciated.

 Command line:

 mpirun -n 1 ./program -snes_view -snes_converged_reason -snes_monitor
 -ksp_monitor 

Re: [petsc-users] Issue with the installation of Petsc

2020-04-06 Thread Satish Balay via petsc-users
Can you send configure.log from the first build attempt?

Satish

On Mon, 6 Apr 2020, Franco Dassi wrote:

> Good morning,
> 
> We are using your Petsc library to solve linear systems coming from PDEs.
> 
> However recently we are trying to install PETSC (maint branch) on a linux
> system but we have some issues.
> 
> On the one hand, when we use the following configure command
> 
> ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> --download-mpich --download-fblaslapack --with-mpi=1
> --download-superlu_dist --download-mumps --download-hypre
> --with-debugging=0 COPTFLAGS='-O3 -march=native -mtune=native'
> CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3
> -march=native -mtune=native' --download-scalapack
> 
> 
> I obtain the following error:
> 
> ===
>  Configuring PETSc to compile on your system
> 
> ===
> TESTING: checkFortranCompiler from
> config.setCompilers(config/BuildSystem/config/setCompilers.py:989)
> 
> ***
> OSError while running ./configure
> ---
> Cannot run executables created with FC. If this machine uses a batch system
> to submit jobs you will need to configure using ./configure with the
> additional option  --with-batch.
>  Otherwise there is problem with the compilers. Can you compile and run
> code with your compiler
> '/home/gurst/repositories/petsc/arch-linux-c-opt/bin/mpif90'?
> ***
> 
> 
> On the other hand if we add the --with-batch the library is compiled, but
> when we try to use it to run the code we obtain the following error (at run
> time):
> 
> ./testGBDForMixed3d: symbol lookup error:
> /home/martinelli/repositories/petsc/arch-linux-c-opt//lib/libmpifort.so.12:
> undefined symbol: MPIR_F_NeedInit
> 
> 
> Looking the symbols table in the petsc/arch-linux-c-opt/lib directory,
> It seems that something is undefined:
> 
> ~/repositories/petsc/arch-linux-c-opt/lib $ nm -A *.so | grep -n
> MPIR_F_NeedInit
> 
> 12591:libfmpich.so: U MPIR_F_NeedInit
> 18943:libmpi.so:0031ab00 D MPIR_F_NeedInit
> 27046:libmpich.so:0031ab00 D MPIR_F_NeedInit
> 34565:libmpichf90.so: U MPIR_F_NeedInit
> 40333:libmpifort.so: U MPIR_F_NeedInit
> 46685:libmpl.so:0031ab00 D MPIR_F_NeedInit
> 54788:libopa.so:0031ab00 D MPIR_F_NeedInit
> 
> Are we  doing something wrong?
> 
> Thank you in advance for your time
> best
> Massimiliano and Franco
> 



[petsc-users] Issue with the installation of Petsc

2020-04-06 Thread Franco Dassi
Good morning,

We are using your Petsc library to solve linear systems coming from PDEs.

However recently we are trying to install PETSC (maint branch) on a linux
system but we have some issues.

On the one hand, when we use the following configure command

./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
--download-mpich --download-fblaslapack --with-mpi=1
--download-superlu_dist --download-mumps --download-hypre
--with-debugging=0 COPTFLAGS='-O3 -march=native -mtune=native'
CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3
-march=native -mtune=native' --download-scalapack


I obtain the following error:

===
 Configuring PETSc to compile on your system

===
TESTING: checkFortranCompiler from
config.setCompilers(config/BuildSystem/config/setCompilers.py:989)

***
OSError while running ./configure
---
Cannot run executables created with FC. If this machine uses a batch system
to submit jobs you will need to configure using ./configure with the
additional option  --with-batch.
 Otherwise there is problem with the compilers. Can you compile and run
code with your compiler
'/home/gurst/repositories/petsc/arch-linux-c-opt/bin/mpif90'?
***


On the other hand if we add the --with-batch the library is compiled, but
when we try to use it to run the code we obtain the following error (at run
time):

./testGBDForMixed3d: symbol lookup error:
/home/martinelli/repositories/petsc/arch-linux-c-opt//lib/libmpifort.so.12:
undefined symbol: MPIR_F_NeedInit


Looking the symbols table in the petsc/arch-linux-c-opt/lib directory,
It seems that something is undefined:

~/repositories/petsc/arch-linux-c-opt/lib $ nm -A *.so | grep -n
MPIR_F_NeedInit

12591:libfmpich.so: U MPIR_F_NeedInit
18943:libmpi.so:0031ab00 D MPIR_F_NeedInit
27046:libmpich.so:0031ab00 D MPIR_F_NeedInit
34565:libmpichf90.so: U MPIR_F_NeedInit
40333:libmpifort.so: U MPIR_F_NeedInit
46685:libmpl.so:0031ab00 D MPIR_F_NeedInit
54788:libopa.so:0031ab00 D MPIR_F_NeedInit

Are we  doing something wrong?

Thank you in advance for your time
best
Massimiliano and Franco