Code Monkey home page Code Monkey logo

Comments (9)

lukaspospisil avatar lukaspospisil commented on September 24, 2024

When I run the code with -qps_max_it 1234, the output is changed to

TEST1: 1000
TEST2: 1234

and value from QPSSetTolerances is still ignored.

from permon.

haplav avatar haplav commented on September 24, 2024

Hi Lukas!
If you use SMALXE, -qps_max_it sets the maximum number of outer iterations whereas the maximum number of inner iterations is controlled by -smalxe_qps_max_it. The inner solver gets smalxe_ prefix which is perhaps misleading. The values from the command line should always precede those in flloprc, and these precede those set programatically. Hence, the first case looks to me like a bug but the second not. I will look at it.

from permon.

haplav avatar haplav commented on September 24, 2024

What you set by QPSSetTolerances is the maximum iteration count for the outer solver. E.g. for SMALXE+MPGP, it is SMALXE. For MPGP only, it is MPGP. There is currently no function to get the inner solver. I will add one.

I'm so far not able to reproduce the first case. Please make sure you don't pass -qps_max_it to QPS via flloprc.

from permon.

lukaspospisil avatar lukaspospisil commented on September 24, 2024

Got it! It seems that it depends on the order of commands:

(wrong - does not set maxit):

QPSSetTolerances
QPSSetFromOptions

(right - sets maxit ):

QPSSetFromOptions
QPSSetTolerances

I don't know if it is bug, or my fault with wrong order.

from permon.

haplav avatar haplav commented on September 24, 2024

It depends on what you want :-) But typically you first set your program's defaults programatically (QPSSetTolerances) and then you have a chance to override these defaults from rc file or command line (QPSSetFromOptions ). This gives you more flexibility without needing to recompile when the parameter needs to be changed. PETSc behaves the same way.

from permon.

haplav avatar haplav commented on September 24, 2024

The "wrong order"

QPSSetTolerances
QPSSetFromOptions

should work as you expect (preserve your maxit set in the program) provided you don't pass

-qps_max_it 100

anyhow.

from permon.

haplav avatar haplav commented on September 24, 2024

Hi Lukas,
can I close this, please?
Thanks,
Vaclav

from permon.

lukaspospisil avatar lukaspospisil commented on September 24, 2024

Hi Vaclav,

of course, the behaviour is quite clear right now. It depends on what user wants to set and what has larger "importance" - if values from console or values provided by code.

Thanks,
Lukas

from permon.

haplav avatar haplav commented on September 24, 2024

Thanks, closing.

from permon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.