all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#48638] PSOPT (ADOL-C and ColPack)
@ 2021-05-25  5:01 ` Eric Brown via Guix-patches via
  2021-05-25  5:04   ` Eric Brown
  2021-05-30 20:44   ` [bug#48638] Acknowledgement (PSOPT (ADOL-C and ColPack)) Eric Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Brown via Guix-patches via @ 2021-05-25  5:01 UTC (permalink / raw)
  To: 48638

Hello All,

This email introduces a set of patches for PSOPT, a libre Optimal Control Solver.

Also included in this set are dependencies:
* ADOL-C, which is part of COIN.
* ColPack.

Best regards,
Eric






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#48638] PSOPT (ADOL-C and ColPack)
  2021-05-25  5:01 ` [bug#48638] PSOPT (ADOL-C and ColPack) Eric Brown via Guix-patches via
@ 2021-05-25  5:04   ` Eric Brown
  2021-05-26 17:24     ` Maxime Devos
  2021-05-30 20:44   ` [bug#48638] Acknowledgement (PSOPT (ADOL-C and ColPack)) Eric Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Brown @ 2021-05-25  5:04 UTC (permalink / raw)
  To: 48638

[-- Attachment #1: Type: text/plain, Size: 18 bytes --]

Patches attached.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-colpack-Add-colpack.patch --]
[-- Type: text/x-patch; name="0001-gnu-colpack-Add-colpack.patch", Size: 2033 bytes --]

From 78854d28465341b68dfd94dba1aa78b48734785a Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 21:58:49 -0500
Subject: [PATCH 1/3] gnu: colpack: Add colpack.

* gnu/packages/maths.scm (colpack): New variable.
---
 gnu/packages/maths.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ee0a69bbd7..74890fd933 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1827,6 +1827,35 @@ linear and quadratic objectives.  There are limited facilities for nonlinear
 and quadratic objectives using the Simplex algorithm.")
     (license license:epl1.0)))
 
+(define-public colpack
+  ;; The latest tagged release is 3 years old and there have been
+  ;; unreleased fixes, so we take the last commit.
+  (let ((commit "f328cad4141c4c6e3e30a58efcbcdacf8849124e")
+        (revision "1"))
+  (package
+    (name "colpack")
+    (version (git-version "1.0.10" revision commit))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/science-team/colpack.git")
+                    (commit "f328cad4141c4c6e3e30a58efcbcdacf8849124e")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1c7i2gm28hjpgv3qjavmbd488q3zdxfnx10w193v3xxhincfcxl6"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags '("-DENABLE_OPENMP=ON")))
+    (home-page "http://cscapes.cs.purdue.edu/coloringpage/")
+    (synopsis "Graph Coloring Algorithm package")
+    (description
+     "The overall aim of this project is to exploit the sparsity available in
+large-scale Jacobian and Hessian matrices the best possible way in order to
+make their computation using automatic differentiation (AD) (or finite
+differences) efficient.")
+    (license license:bsd-3))))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.31.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-adol-c-Add-adol-c.patch --]
[-- Type: text/x-patch; name="0002-gnu-adol-c-Add-adol-c.patch", Size: 1741 bytes --]

From d0263c2d40b4633a40a5675df3432424d0ba7fe2 Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 22:29:23 -0500
Subject: [PATCH 2/3] gnu: adol-c: Add adol-c.

* gnu/packages/maths.scm (adol-c): New variable.
---
 gnu/packages/maths.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 74890fd933..6d1d3dc0ca 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1856,6 +1856,34 @@ make their computation using automatic differentiation (AD) (or finite
 differences) efficient.")
     (license license:bsd-3))))
 
+(define-public adol-c
+  (package
+    (name "adol-c")
+    (version "2.7.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.coin-or.org/download/source/ADOL-C/ADOL-C-"
+                    version".tgz"))
+              (sha256
+               (base32
+                "1hw2ayv91rk8s24dnx70i70vg66rwnvyb8pa7pmv4i6wkzirhawh"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags `("--enable-sparse")))
+    (native-inputs
+     `(("gfortran" ,gfortran)))
+    (inputs
+     `(("colpack" ,colpack)
+       ("lapack" ,openblas)))
+    (home-page "https://www.coin-or.org")
+    (synopsis "Automatic Differentiation of Algorithms")
+    (description
+     "The ADOLC system automatically calculates exact derivatives of a C/C++
+function.  It uses C++ overloading to record arithmetic operations, which it
+plays back later in various ways to calculate the requested values.")
+    (license license:epl1.0)))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.31.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-psopt-Add-psopt.patch --]
[-- Type: text/x-patch; name="0003-gnu-psopt-Add-psopt.patch", Size: 2196 bytes --]

From 8c5ad02f0bedb41f86ef05d533f2ff0917d8361f Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 23:40:05 -0500
Subject: [PATCH 3/3] gnu: psopt: Add psopt.

* gnu/packages/maths.scm (psopt): New variable.
---
 gnu/packages/maths.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6d1d3dc0ca..d772d6b046 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1884,6 +1884,45 @@ function.  It uses C++ overloading to record arithmetic operations, which it
 plays back later in various ways to calculate the requested values.")
     (license license:epl1.0)))
 
+(define-public psopt
+  (package
+    (name "psopt")
+    (version "5.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/PSOPT/psopt")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0y56lag51xdmpcak0wydzrkghypfn884nw8rd62gwgzgxgz0ls9f"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no test suite
+       #:configure-flags
+       `(,(string-append "-Dadolc_INCLUDE_DIR="
+                         (assoc-ref %build-inputs "adol-c") "/include")
+         ,(string-append "-Dadolc_LIBRARY="
+                         (assoc-ref %build-inputs "adol-c") "/lib"))))
+    (native-inputs
+     `(("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("adol-c" ,adol-c)
+       ("colpack" ,colpack)
+       ("eigen" ,eigen)
+       ("ipopt" ,ipopt)
+       ("lapack" ,openblas)))
+    (home-page "https://psopt.org")
+    (synopsis "Optimal Control Software")
+    (description
+     "PSOPT is an open source optimal control package written in C++ that uses
+direct collocation methods. These methods solve optimal control problems by
+approximating the time-dependent variables using global or local
+polynomials.")
+    (license license:lgpl2.1)))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#48638] PSOPT (ADOL-C and ColPack)
  2021-05-25  5:04   ` Eric Brown
@ 2021-05-26 17:24     ` Maxime Devos
  2021-05-26 17:37       ` Eric Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Devos @ 2021-05-26 17:24 UTC (permalink / raw)
  To: Eric Brown, 48638

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

Eric Brown schreef op di 25-05-2021 om 00:04 [-0500]:
> Patches attached.

> +    (home-page "https://psopt.org")
psopt.org is dead. It states:

‘This Domain Name Has Expired - Renewal Instructions’

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#48638] PSOPT (ADOL-C and ColPack)
  2021-05-26 17:24     ` Maxime Devos
@ 2021-05-26 17:37       ` Eric Brown
  2021-05-30  5:18         ` Victor Becerra
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Brown @ 2021-05-26 17:37 UTC (permalink / raw)
  To: Maxime Devos, 48638; +Cc: v.m.becerra

Hello Maxime,

Thanks for your feedback. Indeed this has only happened recently, as I had been accessing it to learn it.

I am Cc:'ing the author and see if he knows anything about it.  I think also maybe the GitHub page would work:

https://github.com/PSOPT/psopt

Thanks,
Eric

On Wed, May 26, 2021, at 12:24 PM, Maxime Devos wrote:
> Eric Brown schreef op di 25-05-2021 om 00:04 [-0500]:
> > Patches attached.
> 
> > +    (home-page "https://psopt.org")
> psopt.org is dead. It states:
> 
> ‘This Domain Name Has Expired - Renewal Instructions’
> 
> Greetings,
> Maxime.
> 
> Attachments:
> * signature.asc




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#48638] PSOPT (ADOL-C and ColPack)
  2021-05-26 17:37       ` Eric Brown
@ 2021-05-30  5:18         ` Victor Becerra
  2021-05-30 20:02           ` Eric Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Victor Becerra @ 2021-05-30  5:18 UTC (permalink / raw)
  To: Eric Brown; +Cc: 48638, Maxime Devos, Victor Becerra (v.m.becerra@ieee.org)

[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]

Hello

Many thanks for your email.

Yes, I saw there is a problem with the website. Thank you for pointing it
out.

Upon investigation, I realized that the credit card I was using for
automated payments of the domain expired and I did not see the reminders in
time, so that the domain lapsed.

I will ask Google to see if they can reinstate it, as there appears to be
no easy way to do it myself. If that does not work I may have to get a new
domain.

As you correctly indicate PSOPT and its documentation can be accessed from
the GitHub page.

Best wishes,

Victor Becerra



On Wed, 26 May 2021 at 18:37, Eric Brown <ecbrown@ericcbrown.com> wrote:

> Hello Maxime,
>
> Thanks for your feedback. Indeed this has only happened recently, as I had
> been accessing it to learn it.
>
> I am Cc:'ing the author and see if he knows anything about it.  I think
> also maybe the GitHub page would work:
>
> https://github.com/PSOPT/psopt
>
> Thanks,
> Eric
>
> On Wed, May 26, 2021, at 12:24 PM, Maxime Devos wrote:
> > Eric Brown schreef op di 25-05-2021 om 00:04 [-0500]:
> > > Patches attached.
> >
> > > +    (home-page "https://psopt.org")
> > psopt.org is dead. It states:
> >
> > ‘This Domain Name Has Expired - Renewal Instructions’
> >
> > Greetings,
> > Maxime.
> >
> > Attachments:
> > * signature.asc
>


-- 
Prof. Victor M Becerra,             BSc MSc PhD SMIEEE CEng FIET SMAIAA

[-- Attachment #2: Type: text/html, Size: 2302 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#48638] PSOPT (ADOL-C and ColPack)
  2021-05-30  5:18         ` Victor Becerra
@ 2021-05-30 20:02           ` Eric Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Brown @ 2021-05-30 20:02 UTC (permalink / raw)
  To: Victor Becerra; +Cc: 48638, Maxime Devos, Victor Becerra (v.m.becerra@ieee.org)

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

(updated patch set attached)

Hello Prof. Becerra,

Thanks for your response!  I forgot to mention the context of this
message:  I am trying to get PSOPT (and ADOL-C, and ColPack) packaged
for GNU Guix.

Please note that I have updated:
* The homepage URL
* Added gnuplot (not required, but awfully nice :-)

Warm regards,
Eric Brown


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: colpack --]
[-- Type: text/x-diff, Size: 2037 bytes --]

From 78854d28465341b68dfd94dba1aa78b48734785a Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 21:58:49 -0500
Subject: [PATCH 1/3] gnu: colpack: Add colpack.

* gnu/packages/maths.scm (colpack): New variable.
---
 gnu/packages/maths.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ee0a69bbd7..74890fd933 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1827,6 +1827,35 @@ linear and quadratic objectives.  There are limited facilities for nonlinear
 and quadratic objectives using the Simplex algorithm.")
     (license license:epl1.0)))
 
+(define-public colpack
+  ;; The latest tagged release is 3 years old and there have been
+  ;; unreleased fixes, so we take the last commit.
+  (let ((commit "f328cad4141c4c6e3e30a58efcbcdacf8849124e")
+        (revision "1"))
+  (package
+    (name "colpack")
+    (version (git-version "1.0.10" revision commit))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/science-team/colpack.git")
+                    (commit "f328cad4141c4c6e3e30a58efcbcdacf8849124e")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1c7i2gm28hjpgv3qjavmbd488q3zdxfnx10w193v3xxhincfcxl6"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags '("-DENABLE_OPENMP=ON")))
+    (home-page "http://cscapes.cs.purdue.edu/coloringpage/")
+    (synopsis "Graph Coloring Algorithm package")
+    (description
+     "The overall aim of this project is to exploit the sparsity available in
+large-scale Jacobian and Hessian matrices the best possible way in order to
+make their computation using automatic differentiation (AD) (or finite
+differences) efficient.")
+    (license license:bsd-3))))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.32.0.rc0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: adolc --]
[-- Type: text/x-diff, Size: 1745 bytes --]

From d0263c2d40b4633a40a5675df3432424d0ba7fe2 Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 22:29:23 -0500
Subject: [PATCH 2/3] gnu: adol-c: Add adol-c.

* gnu/packages/maths.scm (adol-c): New variable.
---
 gnu/packages/maths.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 74890fd933..6d1d3dc0ca 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1856,6 +1856,34 @@ make their computation using automatic differentiation (AD) (or finite
 differences) efficient.")
     (license license:bsd-3))))
 
+(define-public adol-c
+  (package
+    (name "adol-c")
+    (version "2.7.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.coin-or.org/download/source/ADOL-C/ADOL-C-"
+                    version".tgz"))
+              (sha256
+               (base32
+                "1hw2ayv91rk8s24dnx70i70vg66rwnvyb8pa7pmv4i6wkzirhawh"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags `("--enable-sparse")))
+    (native-inputs
+     `(("gfortran" ,gfortran)))
+    (inputs
+     `(("colpack" ,colpack)
+       ("lapack" ,openblas)))
+    (home-page "https://www.coin-or.org")
+    (synopsis "Automatic Differentiation of Algorithms")
+    (description
+     "The ADOLC system automatically calculates exact derivatives of a C/C++
+function.  It uses C++ overloading to record arithmetic operations, which it
+plays back later in various ways to calculate the requested values.")
+    (license license:epl1.0)))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.32.0.rc0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: psopt --]
[-- Type: text/x-diff, Size: 2231 bytes --]

From 51982dbb910a688d3faa574a68149902b16a7709 Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 23:40:05 -0500
Subject: [PATCH 3/3] gnu: psopt: Add psopt.

* gnu/packages/maths.scm (psopt): New variable.
---
 gnu/packages/maths.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6d1d3dc0ca..bca9c086b5 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1884,6 +1884,46 @@ function.  It uses C++ overloading to record arithmetic operations, which it
 plays back later in various ways to calculate the requested values.")
     (license license:epl1.0)))
 
+(define-public psopt
+  (package
+    (name "psopt")
+    (version "5.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/PSOPT/psopt")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0y56lag51xdmpcak0wydzrkghypfn884nw8rd62gwgzgxgz0ls9f"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no test suite
+       #:configure-flags
+       `(,(string-append "-Dadolc_INCLUDE_DIR="
+                         (assoc-ref %build-inputs "adol-c") "/include")
+         ,(string-append "-Dadolc_LIBRARY="
+                         (assoc-ref %build-inputs "adol-c") "/lib"))))
+    (native-inputs
+     `(("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("adol-c" ,adol-c)
+       ("colpack" ,colpack)
+       ("eigen" ,eigen)
+       ("gnuplot" ,gnuplot)
+       ("ipopt" ,ipopt)
+       ("lapack" ,openblas)))
+    (home-page "https://github.com/PSOPT/psopt")
+    (synopsis "Optimal Control Software")
+    (description
+     "PSOPT is an optimal control package written in C++ that uses direct
+collocation methods. These methods solve optimal control problems by
+approximating the time-dependent variables using global or local
+polynomials.")
+    (license license:lgpl2.1)))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.32.0.rc0


[-- Attachment #5: Type: text/plain, Size: 1464 bytes --]


Victor Becerra <vmbecerra99@gmail.com> writes:

> Hello
>
> Many thanks for your email.
>
> Yes, I saw there is a problem with the website. Thank you for pointing it out.
>
> Upon investigation, I realized that the credit card I was using for automated payments of the domain
> expired and I did not see the reminders in time, so that the domain lapsed.
>
> I will ask Google to see if they can reinstate it, as there appears to be no easy way to do it
> myself. If that does not work I may have to get a new domain.
>
> As you correctly indicate PSOPT and its documentation can be accessed from the GitHub page.
>
> Best wishes,
>
> Victor Becerra
>
> On Wed, 26 May 2021 at 18:37, Eric Brown <ecbrown@ericcbrown.com> wrote:
>
>  Hello Maxime,
>
>  Thanks for your feedback. Indeed this has only happened recently, as I had been accessing it to
>  learn it.
>
>  I am Cc:'ing the author and see if he knows anything about it.  I think also maybe the GitHub
>  page would work:
>
>  https://github.com/PSOPT/psopt
>
>  Thanks,
>  Eric
>
>  On Wed, May 26, 2021, at 12:24 PM, Maxime Devos wrote:
>  > Eric Brown schreef op di 25-05-2021 om 00:04 [-0500]:
>  > > Patches attached.
>  > 
>  > > +    (home-page "https://psopt.org")
>  > psopt.org is dead. It states:
>  > 
>  > ‘This Domain Name Has Expired - Renewal Instructions’
>  > 
>  > Greetings,
>  > Maxime.
>  > 
>  > Attachments:
>  > * signature.asc

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#48638] Acknowledgement (PSOPT (ADOL-C and ColPack))
  2021-05-25  5:01 ` [bug#48638] PSOPT (ADOL-C and ColPack) Eric Brown via Guix-patches via
  2021-05-25  5:04   ` Eric Brown
@ 2021-05-30 20:44   ` Eric Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Brown @ 2021-05-30 20:44 UTC (permalink / raw)
  To: 48638; +Cc: eric.c.brown

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]


help-debbugs@gnu.org (GNU bug Tracking System) writes:

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 48638@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.

(Wondering if the patches should be sent as attachments instead of inline)



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-colpack-Add-colpack.patch --]
[-- Type: text/x-diff, Size: 2037 bytes --]

From 78854d28465341b68dfd94dba1aa78b48734785a Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 21:58:49 -0500
Subject: [PATCH 1/3] gnu: colpack: Add colpack.

* gnu/packages/maths.scm (colpack): New variable.
---
 gnu/packages/maths.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ee0a69bbd7..74890fd933 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1827,6 +1827,35 @@ linear and quadratic objectives.  There are limited facilities for nonlinear
 and quadratic objectives using the Simplex algorithm.")
     (license license:epl1.0)))
 
+(define-public colpack
+  ;; The latest tagged release is 3 years old and there have been
+  ;; unreleased fixes, so we take the last commit.
+  (let ((commit "f328cad4141c4c6e3e30a58efcbcdacf8849124e")
+        (revision "1"))
+  (package
+    (name "colpack")
+    (version (git-version "1.0.10" revision commit))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/science-team/colpack.git")
+                    (commit "f328cad4141c4c6e3e30a58efcbcdacf8849124e")))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1c7i2gm28hjpgv3qjavmbd488q3zdxfnx10w193v3xxhincfcxl6"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags '("-DENABLE_OPENMP=ON")))
+    (home-page "http://cscapes.cs.purdue.edu/coloringpage/")
+    (synopsis "Graph Coloring Algorithm package")
+    (description
+     "The overall aim of this project is to exploit the sparsity available in
+large-scale Jacobian and Hessian matrices the best possible way in order to
+make their computation using automatic differentiation (AD) (or finite
+differences) efficient.")
+    (license license:bsd-3))))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.32.0.rc0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-adol-c-Add-adol-c.patch --]
[-- Type: text/x-diff, Size: 1745 bytes --]

From d0263c2d40b4633a40a5675df3432424d0ba7fe2 Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 22:29:23 -0500
Subject: [PATCH 2/3] gnu: adol-c: Add adol-c.

* gnu/packages/maths.scm (adol-c): New variable.
---
 gnu/packages/maths.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 74890fd933..6d1d3dc0ca 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1856,6 +1856,34 @@ make their computation using automatic differentiation (AD) (or finite
 differences) efficient.")
     (license license:bsd-3))))
 
+(define-public adol-c
+  (package
+    (name "adol-c")
+    (version "2.7.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.coin-or.org/download/source/ADOL-C/ADOL-C-"
+                    version".tgz"))
+              (sha256
+               (base32
+                "1hw2ayv91rk8s24dnx70i70vg66rwnvyb8pa7pmv4i6wkzirhawh"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags `("--enable-sparse")))
+    (native-inputs
+     `(("gfortran" ,gfortran)))
+    (inputs
+     `(("colpack" ,colpack)
+       ("lapack" ,openblas)))
+    (home-page "https://www.coin-or.org")
+    (synopsis "Automatic Differentiation of Algorithms")
+    (description
+     "The ADOLC system automatically calculates exact derivatives of a C/C++
+function.  It uses C++ overloading to record arithmetic operations, which it
+plays back later in various ways to calculate the requested values.")
+    (license license:epl1.0)))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.32.0.rc0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-psopt-Add-psopt.patch --]
[-- Type: text/x-diff, Size: 2231 bytes --]

From 51982dbb910a688d3faa574a68149902b16a7709 Mon Sep 17 00:00:00 2001
From: Eric Brown <ecbrown@ericcbrown.com>
Date: Mon, 24 May 2021 23:40:05 -0500
Subject: [PATCH 3/3] gnu: psopt: Add psopt.

* gnu/packages/maths.scm (psopt): New variable.
---
 gnu/packages/maths.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6d1d3dc0ca..bca9c086b5 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1884,6 +1884,46 @@ function.  It uses C++ overloading to record arithmetic operations, which it
 plays back later in various ways to calculate the requested values.")
     (license license:epl1.0)))
 
+(define-public psopt
+  (package
+    (name "psopt")
+    (version "5.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/PSOPT/psopt")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0y56lag51xdmpcak0wydzrkghypfn884nw8rd62gwgzgxgz0ls9f"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no test suite
+       #:configure-flags
+       `(,(string-append "-Dadolc_INCLUDE_DIR="
+                         (assoc-ref %build-inputs "adol-c") "/include")
+         ,(string-append "-Dadolc_LIBRARY="
+                         (assoc-ref %build-inputs "adol-c") "/lib"))))
+    (native-inputs
+     `(("python-2" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("adol-c" ,adol-c)
+       ("colpack" ,colpack)
+       ("eigen" ,eigen)
+       ("gnuplot" ,gnuplot)
+       ("ipopt" ,ipopt)
+       ("lapack" ,openblas)))
+    (home-page "https://github.com/PSOPT/psopt")
+    (synopsis "Optimal Control Software")
+    (description
+     "PSOPT is an optimal control package written in C++ that uses direct
+collocation methods. These methods solve optimal control problems by
+approximating the time-dependent variables using global or local
+polynomials.")
+    (license license:lgpl2.1)))
+
 (define-public libflame
   (package
     (name "libflame")
-- 
2.32.0.rc0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-30 20:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <handler.48638.B.162191893422511.ack@debbugs.gnu.org>
2021-05-25  5:01 ` [bug#48638] PSOPT (ADOL-C and ColPack) Eric Brown via Guix-patches via
2021-05-25  5:04   ` Eric Brown
2021-05-26 17:24     ` Maxime Devos
2021-05-26 17:37       ` Eric Brown
2021-05-30  5:18         ` Victor Becerra
2021-05-30 20:02           ` Eric Brown
2021-05-30 20:44   ` [bug#48638] Acknowledgement (PSOPT (ADOL-C and ColPack)) Eric Brown

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.