Giter Club home page Giter Club logo

Comments (5)

zhucaoxiang avatar zhucaoxiang commented on June 21, 2024

@jloizu Could you give / point out a test case? I will check this.

from spec.

jloizu avatar jloizu commented on June 21, 2024

Here is an input file that does not work (Lfindzero=1) but does work if you set Lfindzero=2.

M=4.N=0.Lcon=0.Lfree=0.sp.txt

(you have to remove the txt extension)

from spec.

zhisong avatar zhisong commented on June 21, 2024

In minpack subroutine "hybrd", the function-to-optimize, "fcn1", is called with value irevcm=2. The logic of "fcn1" is that if irevcm=0 or 1, it works normally, otherwise returns an error.
Careful inspection shows "fcn1" should not report an error but should work exactly the same as irevcm=1. This happens when "fdjac1", the subroutine calculates the derivatives using forward finite difference, passes irevcm=2 to "fcn1".
A quick fix will be making "fcn1" do the same job in =1 and =2 case.
I have pushed a new branch, Lfindzero-fix, and created a pull request. Tests are welcome before merging.

from spec.

zhucaoxiang avatar zhucaoxiang commented on June 21, 2024

Sorry, I was distracted by other things. zhisong's fix should work, but I cannot test it in a quick time. I don't have a valid environmental file on PPPL cluster to compile & run SPEC (the current one I have somehow doesn't work).
The variable irevcm is historic and was used for NAG C05PDF & C05NDF. When I replaced the two NAG subroutines by hybrd & hybrj in MINPACK, I used irevcm to play as iflag need by MINPACK subroutines.

from spec.

jloizu avatar jloizu commented on June 21, 2024

Yes Zhisong's fix seems to solve the problem! I tested the branch and everything looks good. I am now merging it into master.

from spec.

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.