There are a number of hits to "fortran automatic differentiation"
but the only one that claims to be available without cost is ADIFOR,
from the Argonne Laboratory. On various web pages I have found 5
email addresses and 3 phone numbers. According to the web page,
potential users should write to one of the addresses for access
to the program itself.
There are a number of hits to "fortran automatic differentiation" but the only one that claims to be available without cost is ADIFOR, from the Argonne Laboratory. On various web pages I have found 5 email addresses and 3 phone numbers. According tothe web page, potential users should write to one of the addresses for access to the program itself.
I have writen to Paul Hovland (hovland@mcs.anl.gov) and Alan Carle (carle@rice.edu) but I have received no response from either. Another page at ANL (https://www.anl.gov/partnerships/adifor-automatic-differentiation-of-fortran-77 ) gives the 2 phonenumbers but neither is in service. A webpage at Rice University (http://www.crpc.rice.edu/newsletters/sum95/news.adifor.html ) adds another email address (bischof@mcs.anl.gov ), also no response there. These pages are 30 years old, so no real surprise.
It seems like a very well documented and useful program. It seems a shame for it to die. I do have a large F77 program so I do expect it would be useful for me.
Daniel Feenberg
National Bureau of Economic Research
Cambridge MA 02138
On Monday, April 25, 2022 at 9:34:39 AM UTC-7, Thomas Koenig wrote:
(snip)
What exactly do you need differentiated?
If you want fully automated Fortran-to-Fortran conversion, then
I don't have anything.
If you can massage your formulas so Maxima can accept them,(snip)
like
(%i2) diff(sin(x^2),x);
(%o2) 2*x*cos(x^2)
I read just a little of the description, which mentions functions
and subroutines.
Yes there are a few ways to differentiate an expression, in Fortran or not, and get the result. But now consider a whole Fortran function!
You might have a Fortran function with loops and IFs and all, and
desire a similar function returning the derivative of that one.
A program (or you) could go through statement by statement,
adding after each statement, a statement to evaluate the
derivative of that one. Later statements will likely need both
the value of variables, and also (from the product rule and
chain rule) the derivative.
There are a number of hits to "fortran automatic differentiation"
but the only one that claims to be available without cost is ADIFOR,
What exactly do you need differentiated?
If you want fully automated Fortran-to-Fortran conversion, then
I don't have anything.
If you can massage your formulas so Maxima can accept them,
like
(%i2) diff(sin(x^2),x);
(%o2) 2*x*cos(x^2)
gah4 <ga...@u.washington.edu> schrieb:
You might have a Fortran function with loops and IFs and all, and
desire a similar function returning the derivative of that one.
A program (or you) could go through statement by statement,
adding after each statement, a statement to evaluate the
derivative of that one. Later statements will likely need both
the value of variables, and also (from the product rule and
chain rule) the derivative.
With IFs, it is really hard - what should the derivative of
if (x > 0.1) then
foo = 1+x
else
foo = -1-x
end if
Also, you usually want many derivatives for a filling a Jacobi
matrix, which should be well-behaved, and your function should at
least be continuous, or you will get into hot water with whatever
you plan to do with that matrix.
I do remember, though hand computing some derivatives to put
into least-squares fitting programs. Automating might have
been nice to have.
There are a number of hits to "fortran automatic differentiation" but the only one that claims to be available without cost is ADIFOR, from the Argonne Laboratory. On various web pages I have found 5 email addresses and 3 phone numbers. According tothe web page, potential users should write to one of the addresses for access to the program itself.
I have writen to Paul Hovland (hov...@mcs.anl.gov) and Alan Carle (ca...@rice.edu) but I have received no response from either. Another page at ANL (https://www.anl.gov/partnerships/adifor-automatic-differentiation-of-fortran-77 ) gives the 2 phonenumbers but neither is in service. A webpage at Rice University (http://www.crpc.rice.edu/newsletters/sum95/news.adifor.html ) adds another email address (bis...@mcs.anl.gov ), also no response there. These pages are 30 years old, so no real surprise.
It seems like a very well documented and useful program. It seems a shame for it to die. I do have a large F77 program so I do expect it would be useful for me.
Daniel Feenberg
National Bureau of Economic Research
Cambridge MA 02138
There are a number of hits to "fortran automatic differentiation"
but the only one that claims to be available without cost is ADIFOR,
from the Argonne Laboratory. On various web pages I have found 5 email addresses and 3 phone numbers. According to the web page, potential
users should write to one of the addresses for access to the program
itself.
On Monday, April 25, 2022 at 5:05:06 AM UTC-7, feen wrote:the web page, potential users should write to one of the addresses for access to the program itself.
There are a number of hits to "fortran automatic differentiation" but the only one that claims to be available without cost is ADIFOR, from the Argonne Laboratory. On various web pages I have found 5 email addresses and 3 phone numbers. According to
webpage at Rice University (http://www.crpc.rice.edu/newsletters/sum95/news.adifor.html ) adds another email address, also no response there. These pages are 30 years old, so no real surprise. part at anl.gov did respond and was referred to the same webI have writen to Paul Hovland and Alan Carle but I have received no response from either. Another page at ANL (https://www.anl.gov/partnerships/adifor-automatic-differentiation-of-fortran-77 ) gives the 2 phone numbers but neither is in service. A
checked PSR- packages were still no cost.It seems like a very well documented and useful program. It seems a shame for it to die. I do have a large F77 program so I do expect it would be useful for me.
Daniel FeenbergAlthough it hasn't been worked on in some time there is also GRESS 3.0 from RSICC. See https://rsicc.ornl.gov/codes/psr/psr2/psr-231.html . It was only for Fortran 77. Although software with CCC- and DLC- designations have a fee, the last time I
National Bureau of Economic Research
Cambridge MA 02138
gah4 <ga...@u.washington.edu> schrieb:
On Monday, April 25, 2022 at 9:34:39 AM UTC-7, Thomas Koenig wrote:
(snip)
What exactly do you need differentiated?
If you want fully automated Fortran-to-Fortran conversion, then
I don't have anything.
If you can massage your formulas so Maxima can accept them,(snip)
like
(%i2) diff(sin(x^2),x);
(%o2) 2*x*cos(x^2)
I read just a little of the description, which mentions functions
and subroutines.
With IFs, it is really hard - what should the derivative of
if (x > 0.1) then
foo = 1+x
else
foo = -1-x
end if
be?
Also, you usually want many derivatives for a filling a Jacobi
matrix, which should be well-behaved, and your function should at
least be continuous, or you will get into hot water with whatever
you plan to do with that matrix.
On Monday, April 25, 2022 at 1:13:37 PM UTC-7, Thomas Koenig wrote:
gah4 <ga...@u.washington.edu> schrieb:
(snip)
You might have a Fortran function with loops and IFs and all, and
desire a similar function returning the derivative of that one.
A program (or you) could go through statement by statement,
adding after each statement, a statement to evaluate the
derivative of that one. Later statements will likely need both
the value of variables, and also (from the product rule and
chain rule) the derivative.
With IFs, it is really hard - what should the derivative of
if (x > 0.1) then
foo = 1+x
else
foo = -1-x
end if
What it should do is easy, but what you do with the result, is where
it gets harder:
if (x > 0.1) then
foo = 1+x
dfoodx = 1
else
foo = -1-x
dfoodx = -1
end if
Actually the derivative is not defined for x = 0.1 , foo is not even continuous for x = 0.1
I am familiar with symbolic computation programs, but that isn't what I am looking for. The whole program (excluding the user interface) is more than 20,000 lines of code. (Note for non-US readers: The US income tax system is very complicated comparedto European ones, and it changes every year in every state. Sometimes it is just a parameter value that changes, but new provisions are common and old ones expire with regularity). Converting it all to Macsyma would be a chore. The documentation for
Daniel Feenberg
On Tuesday, April 26, 2022 at 2:35:39 PM UTC+2, Spiros Bousbouras wrote:functions, you may need to consider different régimes.
Actually the derivative is not defined for x = 0.1 , foo is not even
continuous for x = 0.1
The function is continuous and differentiable on intervals not include x = 0.1. And that is exactly how it can be treated. Mind you, you do get results that are geared to precisely the surroundings of the input So, with discontinuous or non-smooth
This situation also occurs artificially when, for example, different algorithms are used to evaluate a function in its domain. The
mathematical function may not have any boundary regions, but the
piecewise approximations might have them. In practice, even common
functions, e.g. trig functions such as sin(x), cos(x), etc., are often evaluated in this piecewise way.
The AD program is another program, and when it executes the value of x would be a known constant. In my application dfoo/dx would be plus or minus one, depending on the value of x.
The computer doesn't know about real numbers, but that doesn't bother me.
It does seem that almost all authors of automatic differentiation software assume
the application is for a Jacobi matrix but that isn't my application.
On 4/26/22 8:18 AM, Arjen Markus wrote:functions, you may need to consider different régimes.
On Tuesday, April 26, 2022 at 2:35:39 PM UTC+2, Spiros Bousbouras wrote:
Actually the derivative is not defined for x = 0.1 , foo is not even
continuous for x = 0.1
The function is continuous and differentiable on intervals not include x = 0.1. And that is exactly how it can be treated. Mind you, you do get results that are geared to precisely the surroundings of the input So, with discontinuous or non-smooth
The left derivative is defined at x=0.1, but the right derivative is
not. And the function is discontinuous there.
This is a common situation
with physical simulations, for example at phase transitions where some physical properties are discontinuous as a function of say, temperature
or pressure. If you look at a complicated phase diagram of, say water,
with several solid phases, a liquid phase, a gas phase, and a
supercritical region, then you will see many such boundaries along trajectories in (T,P) phase space.
This situation also occurs artificially when, for example, different algorithms are used to evaluate a function in its domain. The
mathematical function may not have any boundary regions, but the
piecewise approximations might have them. In practice, even common
functions, e.g. trig functions such as sin(x), cos(x), etc., are often evaluated in this piecewise way.
On Monday, April 25, 2022 at 1:13:37 PM UTC-7, Thomas Koenig wrote:
gah4 <ga...@u.washington.edu> schrieb:
(snip)
You might have a Fortran function with loops and IFs and all, and
desire a similar function returning the derivative of that one.
A program (or you) could go through statement by statement,
adding after each statement, a statement to evaluate the
derivative of that one. Later statements will likely need both
the value of variables, and also (from the product rule and
chain rule) the derivative.
With IFs, it is really hard - what should the derivative of
if (x > 0.1) then
foo = 1+x
else
foo = -1-x
end if
What it should do is easy, but what you do with the result, is where
it gets harder:
if (x > 0.1) then
foo = 1+x
dfoodx = 1
else
foo = -1-x
dfoodx = -1
end if
Also, you usually want many derivatives for a filling a Jacobi
matrix, which should be well-behaved, and your function should at
least be continuous, or you will get into hot water with whatever
you plan to do with that matrix.
It does help to have a good understanding of the problem you are
working in, and especially where things can go wrong.
But usually the problem is more general, and so outside the derivative problem.
I do remember doing much non-linear least-squares fitting, with the
usual
Newton's method solver. You might have a function that can only be
evaluated for positive values, but it tries for negative values
anyway.
Now, if it is using sqrt, the function value and its derivative will
have problems when it goes negative.
I do remember, though hand computing some derivatives to put
into least-squares fitting programs. Automating might have
been nice to have.
There are a number of hits to "fortran automatic differentiation" but the only one that claims to be available without cost is ADIFOR, from the Argonne Laboratory. On various web pages I have found 5 email addresses and 3 phone numbers. According tothe web page, potential users should write to one of the addresses for access to the program itself.
I have writen to Paul Hovland (hovland@mcs.anl.gov) and Alan Carle (carle@rice.edu) but I have received no response from either. Another page at ANL (https://www.anl.gov/partnerships/adifor-automatic-differentiation-of-fortran-77 ) gives the 2 phonenumbers but neither is in service. A webpage at Rice University (http://www.crpc.rice.edu/newsletters/sum95/news.adifor.html ) adds another email address (bischof@mcs.anl.gov ), also no response there. These pages are 30 years old, so no real surprise.
It seems like a very well documented and useful program. It seems a shame for it to die. I do have a large F77 program so I do expect it would be useful for me.
Daniel Feenberg
National Bureau of Economic Research
Cambridge MA 02138
With IFs, it is really hard - what should the derivative of
if (x > 0.1) then
foo = 1+x
else
foo = -1-x
end if
be?
Since there is no way to specify the Dirac
delta function (ok, so it's a distribution) in floating point,
that's not given.
Thomas Koenig <tkoenig@netcologne.de> writes:
With IFs, it is really hard - what should the derivative of
if (x > 0.1) then
foo = 1+x
else
foo = -1-x
end if
be?
There is /numeric/ and /symbolic/ differentiation.
Numerically, one can easily get an approximation for anything
as a difference quotient for a small difference, but needs
to take care, because some results might not be correct
(when the function changes too fast or is not differentiable
at that point).
Symbolically, one can also differentiate anything by taking
the steps a mathematician would take for manual symbolic
differentiation. Since FORTRAN was designed for numerical
mathematics, writing symbolic differentiation in FORTRAN
might be a tad more difficult than in a language like LISP
that was made for list processing. What is more difficult
actually is /simplifying/ the raw result of the symbolic
differentiation to some reasonable and human-readable
expression (in the case of large and complex expressions).
Now, to your question: My first idea would be
if (x > 0.1) then
result = 1
else
result = -1
end if
as a first coarse approximation. (Some thoughts about
the behavior at exactly x=0.1 might have to be added.)
Stefan Ram <ram@zedat.fu-berlin.de> schrieb:
Now, to your question: My first idea would beHowever, when you differentiate, there are usually certain
if (x > 0.1) then
result = 1
else
result = -1
end if
as a first coarse approximation. (Some thoughts about
the behavior at exactly x=0.1 might have to be added.)
assumptions, which are violated in this case - people sort of expect
that integrating what you differentiated gets the same result
(plus a constant). Since there is no way to specify the Dirac
delta function (ok, so it's a distribution) in floating point,
that's not given.
Stefan Ram <ram@zedat.fu-berlin.de> schrieb:
Now, to your question: My first idea would beHowever, when you differentiate, there are usually certain
if (x > 0.1) then
result = 1
else
result = -1
end if
as a first coarse approximation. (Some thoughts about
the behavior at exactly x=0.1 might have to be added.)
assumptions, which are violated in this case - people sort of expect
that integrating what you differentiated gets the same result
(plus a constant). Since there is no way to specify the Dirac
delta function (ok, so it's a distribution) in floating point,
that's not given.
Since there is no way to specify the Dirac
delta function (ok, so it's a distribution) in floating point,
that's not given.
There is no "exactly x=0.1" in binary floating point (and I'm not
sure that even a single Fortran compiler supports decimal floating
point, despite radix being present in selected_real_kind), which
is why I chose that particular number, to add a bit of difficulty.
On Wednesday, May 4, 2022 at 10:28:31 AM UTC-7, Thomas Koenig wrote:
(snip)
There is no "exactly x=0.1" in binary floating point (and I'm not
sure that even a single Fortran compiler supports decimal floating
point, despite radix being present in selected_real_kind), which
is why I chose that particular number, to add a bit of difficulty.
I now have an IBM Power7 machines, which (like Power6) has decimal
floating point. I haven't gotten to install an OS yet, with AIX and Linux being two choices, and don't know which compilers have support for it.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 159 |
Nodes: | 16 (0 / 16) |
Uptime: | 98:13:26 |
Calls: | 3,209 |
Files: | 10,563 |
Messages: | 3,009,574 |