Author Topic: SNES: Non-Linear Solver  (Read 14419 times)

mehrangh2016

  • Jr. Member
  • **
  • Posts: 21
SNES: Non-Linear Solver
« on: October 24, 2017, 12:57:07 AM »
Dear Sir/ Madam,

As I understood, in parallel feap, only the linear solver is implemented and jsut ksp (Krylov Sub Space) in combination with preconditioning is called to run the analysis. I have wondered whether any possibility exists to implement the SNES (nonlinear solver) to run the analysis such as bound constrained minimization problem. I have followed the examples and tutorials submitted by PETSc, but there exist some problems and the analysis did not start to run. Could you please help me in this concept?

Best Regards,

Mehran   

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: SNES: Non-Linear Solver
« Reply #1 on: October 24, 2017, 05:00:30 PM »
FEAP uses its own nonlinear solver for parallel computations, as you point out, only relying on PETSc for the linear solve.  You should be able to use full and quasi-Newton methods (like BFGS) from FEAP.  If you are interested in using PETSc SNES you will need to implement it yourself.  If you can cleanly describe what needs to be done, we may be able to provide some guidance. 

Some other groups may have also already done this and perhaps they will chime in.

mehrangh2016

  • Jr. Member
  • **
  • Posts: 21
Re: SNES: Non-Linear Solver
« Reply #2 on: October 26, 2017, 05:19:13 AM »
Dear Sir/ Madam,

I am trying to solve Bound Constrained Optimization Problem in FEAP. For this purpose, I have started to learn how to write usolve in FEAP. At first, I have tried to implement SuperLU usolve in feap, however, I used the PETSc libraries and subroutines to prepare usolve.F routine as one is ready to use for KSP (Linear Solver). But I faced some problems. If you have any recommendation in this concept an solving the Bound Constrained Optimization Problem, I would be happy to learn them.

Best Regards,

Mehran

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: SNES: Non-Linear Solver
« Reply #3 on: October 26, 2017, 06:02:23 AM »
If all you want is SuperLU then you do not need to do anything as it is available already via FEAP's PETSc implementation.  Just execute with the following PETSc options:
Code: [Select]
-ksp_type preonly -pc_type lu -pc_factor_mat_solver_package superlu_dist
If you are trying to learn how to write solvers, have a look at http://projects.ce.berkeley.edu/feap/ and scroll down to "LINEAR EQUATION SOLVERS".

mehrangh2016

  • Jr. Member
  • **
  • Posts: 21
Re: SNES: Non-Linear Solver
« Reply #4 on: October 26, 2017, 10:13:10 AM »
I know how to run any analysis in under parfeap directory by using any type of ksp and cg. I downloaded the SuperLU routine from the FEAP website, I compiled it, when I run an analysis by calling the splu macro;
I faced this problem:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

I tried to solve it, but unfortunately I cannot understand what may cause this problem?

The other thing is whether exist any subroutine in FEAP to implement the Bound Constrained Optimization problem? Because I will try to implement it by using the PETSc library or using any usolve in FEAP.

I will appreciate if you help me in these matters.

Best Regards,

MEHRAN

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: SNES: Non-Linear Solver
« Reply #5 on: October 26, 2017, 04:39:26 PM »
1.  What version of FEAP are you using?
2.  Did you compile the superLU routines into parFEAP or into serial FEAP?

mehrangh2016

  • Jr. Member
  • **
  • Posts: 21
Re: SNES: Non-Linear Solver
« Reply #6 on: October 27, 2017, 01:03:12 AM »
I have the 8.5 version of FEAP, but when I noticed that the SuperLU routine was written for version 4, I compiled it into serial FEAP version 8.4, the compilation was done, and the feap execution
 was created but when I run an analysis bu calling SPLU macro, the segmentation fault and the corresponding message, I mentioned in previous post, was seen. My analysis was normally run without calling SPLU routine.

Best Regards,

Mehran

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: SNES: Non-Linear Solver
« Reply #7 on: October 28, 2017, 03:06:02 PM »
It looks like the downloadable interface that we have is a bit behind the current release of SuperLU.  I have FEAP working with the latest release; I'll post a new version shortly.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: SNES: Non-Linear Solver
« Reply #8 on: October 28, 2017, 03:38:21 PM »
Try this interface with FEAP version 8.5 and SuperLU version 5.2.1

http://projects.ce.berkeley.edu/feap/feap85superlu521.zip