Re: [petsc-users] Installation issues

2022-12-19 Thread Satish Balay via petsc-users
This occurs if one uses an incompatible mpiexec [to the mpi that PETSc was 
installed with.

I see you've installed using -download-mpich

So the compatible mpiexec here is 

MPIEXEC = /home/slave12/projects/petsc/arch-linux-c-debug/bin/mpiexec

So try:

/home/slave12/projects/petsc/arch-linux-c-debug/bin/mpiexec -n 4 ./ex50

Satish

On Mon, 19 Dec 2022, Guilherme Lima wrote:

> Hello,
> I'm having an issue with my PETSc installation. It started with an
> unexpected output on src/ksp/ksp/tutorial ex50, then tried doing the
> configuring early steps again and here I am.
> It can't execute more than 1 MPI process, also at the example that I
> mentioned before, using "mpiexec -n 4 ... " it appeared to have executed
> the same interaction 4 times, instead of 1 time with 4 processors.
> Hope I've been clear about what is the problem.
> 



Re: [petsc-users] SNES and TS for nonlinear quasi-static problems

2022-12-19 Thread TARDIEU Nicolas via petsc-users
Dear Matt and Jed,

Thank you for your answers. I'll have a look at Ratel to see how to set-up a 
quasi-static nonlinear problem with TS and SNES.

Best regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE

De : j...@jedbrown.org 
Envoyé : lundi 19 décembre 2022 14:40
À : Matthew Knepley ; TARDIEU Nicolas 

Cc : petsc-users@mcs.anl.gov 
Objet : Re: [petsc-users] SNES and TS for nonlinear quasi-static problems

Indeed, this is exactly how we do quasistatic analysis for solid mechanics in 
Ratel 
(https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fmicromorph%2Fratel=05%7C01%7Cnicolas.tardieu%40edf.fr%7C08e0ffed6942443fe5e908dae1c6c819%7Ce242425b70fc44dc9ddfc21e304e6c80%7C1%7C0%7C638070541137140223%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=9E63JeIqTU1efxC8ij5OaL6XWPcErHbaVAAZwpvPY3o%3D=0)
 -- make sure to choose an L-stable integrator (backward Euler being the most 
natural choice). Implicit dynamics can be done by choosing a suitable 
integrator, like TSALPHA2, with almost no code change to the residual (only 
adding the mass term in DMTSSetI2Function()).

Matthew Knepley  writes:

> On Mon, Dec 19, 2022 at 6:12 AM TARDIEU Nicolas via petsc-users <
> petsc-users@mcs.anl.gov> wrote:
>
>> Dear PETSc users,
>>
>> I plan to solve nonlinear quasi-static problems with PETSc. More
>> precisely, these are solid mechanics problems with elasto-plasticity.
>> So they do not involve  "physical time", rather  "pseudo time", which is
>> mandatory to describe the stepping of the loading application.
>> In general, the loading vector F(x, t) is expressed as the following
>> product  F(x, t)=F0(x)*g(t), where g is a scalar function of the
>> pseudo-time.
>>
>> I see how to use a SNES in order to solve a certain step of the loading
>> history but I wonder if a TS can be used to deal with the loading history
>> through the definition of this g(t) function ?
>>
>
> I believe so. We would want you to formulate it as a differential equation,
>
>   F(x, \dot x, t) = G(x)
>
> which is your case is easy
>
>   F(x, t) = 0
>
> so you would just put your function completely into the IFunction. Since
> there is no \dot x term, this is a DAE,
> and you need to use one of the solvers for that.
>
>
>> Furthermore, since too large load steps can lead to non-convergence, a
>> stepping strategy is almost always required to restart a load step that
>> failed. Does TS offer such a feature ?
>>
>
> I think you can use PETSc adaptation. There is a PID option, which might be
> able to capture your behavior.
>
>   Thanks,
>
>   Matt
>
>
>> Thank you for your answers.
>> Regards,
>> Nicolas
>> --
>> *Nicolas Tardieu*
>> *Ing PhD Computational Mechanics*
>> EDF - R Dpt ERMES
>> PARIS-SACLAY, FRANCE
>>
>>
>> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
>> établis à l'intention exclusive des destinataires et les informations qui y
>> figurent sont strictement confidentielles. Toute utilisation de ce Message
>> non conforme à sa destination, toute diffusion ou toute publication totale
>> ou partielle, est interdite sauf autorisation expresse.
>>
>> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de
>> le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou
>> partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de
>> votre système, ainsi que toutes ses copies, et de n'en garder aucune trace
>> sur quelque support que ce soit. Nous vous remercions également d'en
>> avertir immédiatement l'expéditeur par retour du message.
>>
>> Il est impossible de garantir que les communications par messagerie
>> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute
>> erreur ou virus.
>> 
>>
>> This message and any attachments (the 'Message') are intended solely for
>> the addressees. The information contained in this Message is confidential.
>> Any use of information contained in this Message not in accord with its
>> purpose, any dissemination or disclosure, either whole or partial, is
>> prohibited except formal approval.
>>
>> If you are not the addressee, you may not copy, forward, disclose or use
>> any part of it. If you have received this message in error, please delete
>> it and all copies from your system and notify the sender immediately by
>> return message.
>>
>> E-mail communication cannot be guaranteed to be timely secure, error or
>> virus-free.
>>
>
>
> --
> 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
>
> 

Re: [petsc-users] SNES and TS for nonlinear quasi-static problems

2022-12-19 Thread Jed Brown
Indeed, this is exactly how we do quasistatic analysis for solid mechanics in 
Ratel (https://gitlab.com/micromorph/ratel) -- make sure to choose an L-stable 
integrator (backward Euler being the most natural choice). Implicit dynamics 
can be done by choosing a suitable integrator, like TSALPHA2, with almost no 
code change to the residual (only adding the mass term in DMTSSetI2Function()).

Matthew Knepley  writes:

> On Mon, Dec 19, 2022 at 6:12 AM TARDIEU Nicolas via petsc-users <
> petsc-users@mcs.anl.gov> wrote:
>
>> Dear PETSc users,
>>
>> I plan to solve nonlinear quasi-static problems with PETSc. More
>> precisely, these are solid mechanics problems with elasto-plasticity.
>> So they do not involve  "physical time", rather  "pseudo time", which is
>> mandatory to describe the stepping of the loading application.
>> In general, the loading vector F(x, t) is expressed as the following
>> product  F(x, t)=F0(x)*g(t), where g is a scalar function of the
>> pseudo-time.
>>
>> I see how to use a SNES in order to solve a certain step of the loading
>> history but I wonder if a TS can be used to deal with the loading history
>> through the definition of this g(t) function ?
>>
>
> I believe so. We would want you to formulate it as a differential equation,
>
>   F(x, \dot x, t) = G(x)
>
> which is your case is easy
>
>   F(x, t) = 0
>
> so you would just put your function completely into the IFunction. Since
> there is no \dot x term, this is a DAE,
> and you need to use one of the solvers for that.
>
>
>> Furthermore, since too large load steps can lead to non-convergence, a
>> stepping strategy is almost always required to restart a load step that
>> failed. Does TS offer such a feature ?
>>
>
> I think you can use PETSc adaptation. There is a PID option, which might be
> able to capture your behavior.
>
>   Thanks,
>
>   Matt
>
>
>> Thank you for your answers.
>> Regards,
>> Nicolas
>> --
>> *Nicolas Tardieu*
>> *Ing PhD Computational Mechanics*
>> EDF - R Dpt ERMES
>> PARIS-SACLAY, FRANCE
>>
>>
>> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
>> établis à l'intention exclusive des destinataires et les informations qui y
>> figurent sont strictement confidentielles. Toute utilisation de ce Message
>> non conforme à sa destination, toute diffusion ou toute publication totale
>> ou partielle, est interdite sauf autorisation expresse.
>>
>> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de
>> le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou
>> partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de
>> votre système, ainsi que toutes ses copies, et de n'en garder aucune trace
>> sur quelque support que ce soit. Nous vous remercions également d'en
>> avertir immédiatement l'expéditeur par retour du message.
>>
>> Il est impossible de garantir que les communications par messagerie
>> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute
>> erreur ou virus.
>> 
>>
>> This message and any attachments (the 'Message') are intended solely for
>> the addressees. The information contained in this Message is confidential.
>> Any use of information contained in this Message not in accord with its
>> purpose, any dissemination or disclosure, either whole or partial, is
>> prohibited except formal approval.
>>
>> If you are not the addressee, you may not copy, forward, disclose or use
>> any part of it. If you have received this message in error, please delete
>> it and all copies from your system and notify the sender immediately by
>> return message.
>>
>> E-mail communication cannot be guaranteed to be timely secure, error or
>> virus-free.
>>
>
>
> -- 
> 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] SNES and TS for nonlinear quasi-static problems

2022-12-19 Thread Matthew Knepley
On Mon, Dec 19, 2022 at 6:12 AM TARDIEU Nicolas via petsc-users <
petsc-users@mcs.anl.gov> wrote:

> Dear PETSc users,
>
> I plan to solve nonlinear quasi-static problems with PETSc. More
> precisely, these are solid mechanics problems with elasto-plasticity.
> So they do not involve  "physical time", rather  "pseudo time", which is
> mandatory to describe the stepping of the loading application.
> In general, the loading vector F(x, t) is expressed as the following
> product  F(x, t)=F0(x)*g(t), where g is a scalar function of the
> pseudo-time.
>
> I see how to use a SNES in order to solve a certain step of the loading
> history but I wonder if a TS can be used to deal with the loading history
> through the definition of this g(t) function ?
>

I believe so. We would want you to formulate it as a differential equation,

  F(x, \dot x, t) = G(x)

which is your case is easy

  F(x, t) = 0

so you would just put your function completely into the IFunction. Since
there is no \dot x term, this is a DAE,
and you need to use one of the solvers for that.


> Furthermore, since too large load steps can lead to non-convergence, a
> stepping strategy is almost always required to restart a load step that
> failed. Does TS offer such a feature ?
>

I think you can use PETSc adaptation. There is a PID option, which might be
able to capture your behavior.

  Thanks,

  Matt


> Thank you for your answers.
> Regards,
> Nicolas
> --
> *Nicolas Tardieu*
> *Ing PhD Computational Mechanics*
> EDF - R Dpt ERMES
> PARIS-SACLAY, FRANCE
>
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont
> établis à l'intention exclusive des destinataires et les informations qui y
> figurent sont strictement confidentielles. Toute utilisation de ce Message
> non conforme à sa destination, toute diffusion ou toute publication totale
> ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de
> le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou
> partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de
> votre système, ainsi que toutes ses copies, et de n'en garder aucune trace
> sur quelque support que ce soit. Nous vous remercions également d'en
> avertir immédiatement l'expéditeur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie
> électronique arrivent en temps utile, sont sécurisées ou dénuées de toute
> erreur ou virus.
> 
>
> This message and any attachments (the 'Message') are intended solely for
> the addressees. The information contained in this Message is confidential.
> Any use of information contained in this Message not in accord with its
> purpose, any dissemination or disclosure, either whole or partial, is
> prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or use
> any part of it. If you have received this message in error, please delete
> it and all copies from your system and notify the sender immediately by
> return message.
>
> E-mail communication cannot be guaranteed to be timely secure, error or
> virus-free.
>


-- 
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] SNES and TS for nonlinear quasi-static problems

2022-12-19 Thread TARDIEU Nicolas via petsc-users
Dear PETSc users,

I plan to solve nonlinear quasi-static problems with PETSc. More precisely, 
these are solid mechanics problems with elasto-plasticity.
So they do not involve  "physical time", rather  "pseudo time", which is 
mandatory to describe the stepping of the loading application.
In general, the loading vector F(x, t) is expressed as the following product  
F(x, t)=F0(x)*g(t), where g is a scalar function of the pseudo-time.

I see how to use a SNES in order to solve a certain step of the loading history 
but I wonder if a TS can be used to deal with the loading history through the 
definition of this g(t) function ?

Furthermore, since too large load steps can lead to non-convergence, a stepping 
strategy is almost always required to restart a load step that failed. Does TS 
offer such a feature ?

Thank you for your answers.
Regards,
Nicolas
--
Nicolas Tardieu
Ing PhD Computational Mechanics
EDF - R Dpt ERMES
PARIS-SACLAY, FRANCE



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.


This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.