GNU bug report logs - #34780
OpenMPI Java support

Previous Next

Package: guix-patches;

Reported by: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>

Date: Thu, 7 Mar 2019 10:50:02 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34780 in the body.
You can then email your comments to 34780 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34780; Package guix-patches. (Thu, 07 Mar 2019 10:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 07 Mar 2019 10:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
To: <guix-patches <at> gnu.org>
Subject: OpenMPI Java support
Date: Thu, 7 Mar 2019 11:49:07 +0100
Hi Guix,

this patch adds a “java” output to the “openmpi” package, providing
“mpi.jar” and other libraries.  The closure size of the “out” output
remains unchanged.

--
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#34780; Package guix-patches. (Thu, 07 Mar 2019 11:15:01 GMT) Full text and rfc822 format available.

Message #8 received at 34780 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 34780 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>, ericbavier <at> centurylink.net
Subject: [PATCH] gnu: openmpi: Add Java support.
Date: Thu,  7 Mar 2019 12:14:22 +0100
* gnu/packages/mpi.scm (openmpi)[native-inputs]: Add openjdk11.
[outputs]: Add "java".
[arguments]: Add "--enable-mpi-java" to configure flags; add build phases
"set-JAVA_HOME" and "move-java".
---
 gnu/packages/mpi.scm | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 10de6dee5b..316b2a5cd8 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages fabric-management)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages java)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pciutils)
@@ -190,8 +191,9 @@ bind processes, and much more.")
        ("slurm" ,slurm)))              ;for PMI support (launching via "srun")
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("perl" ,perl)))
-    (outputs '("out" "debug"))
+       ("perl" ,perl)
+       ("jdk" ,openjdk11 "jdk")))
+    (outputs '("out" "debug" "java"))
     (arguments
      `(#:configure-flags `("--enable-mpi-ext=affinity" ;cr doesn't work
                            "--enable-memchecker"
@@ -200,6 +202,8 @@ bind processes, and much more.")
                            "--with-hwloc=external"
                            "--with-libevent"
 
+                           "--enable-mpi-java"
+
                            ;; InfiniBand support
                            "--enable-openib-control-hdr-padding"
                            "--enable-openib-dynamic-sl"
@@ -224,6 +228,14 @@ bind processes, and much more.")
                                              "/include/infiniband/:"
                                              (getenv "CPLUS_INCLUDE_PATH")))
                       #t))
+                  ;; We could provide the location of the JDK in the configure
+                  ;; flags, but since the configure flags are embedded in the
+                  ;; info binaries that would leave a reference to the JDK in
+                  ;; the "out" output.  To avoid this we set JAVA_HOME.
+                  (add-after 'unpack 'set-JAVA_HOME
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
+                      #t))
                   (add-before 'build 'remove-absolute
                     (lambda _
                       ;; Remove compiler absolute file names (OPAL_FC_ABSOLUTE
@@ -252,6 +264,26 @@ bind processes, and much more.")
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let ((out (assoc-ref outputs "out")))
                         (for-each delete-file (find-files out "config.log"))
+                        #t)))
+                  (add-after 'install 'move-java
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out  (assoc-ref outputs "out"))
+                            (java (assoc-ref outputs "java")))
+                        (for-each (lambda (item)
+                                    (let ((source (string-append out item))
+                                          (target (string-append java item)))
+                                      (mkdir-p (dirname target))
+                                      (rename-file source target)))
+                                  '("/share/man/man1/mpijavac.1"
+                                    "/share/doc/openmpi/javadoc-openmpi"
+                                    "/lib/mpi.jar"
+                                    "/lib/libmpi_java.la"
+                                    "/lib/libmpi_java.so.40.20.0"
+                                    "/lib/libmpi_java.so.40"
+                                    "/lib/libmpi_java.so"
+                                    "/bin/mpijavac.pl"
+                                    "/bin/mpijavac"
+                                    "/include/openmpi/ompi/mpi/java"))
                         #t))))))
     (home-page "http://www.open-mpi.org")
     (synopsis "MPI-3 implementation")
-- 
2.20.1







Information forwarded to guix-patches <at> gnu.org:
bug#34780; Package guix-patches. (Mon, 18 Mar 2019 09:29:02 GMT) Full text and rfc822 format available.

Message #11 received at 34780 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: ericbavier <at> centurylink.net, 34780 <at> debbugs.gnu.org
Subject: Re: [bug#34780] [PATCH] gnu: openmpi: Add Java support.
Date: Mon, 18 Mar 2019 10:27:53 +0100
Hi Ricardo,

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> * gnu/packages/mpi.scm (openmpi)[native-inputs]: Add openjdk11.
> [outputs]: Add "java".
> [arguments]: Add "--enable-mpi-java" to configure flags; add build phases
> "set-JAVA_HOME" and "move-java".

Nice.

I’m uncomfortable adding OpenJDK as an input to Open MPI though, because
that puts more stress on the build times and potentially on platform
support as well.

Would it be an option to create a separate “openmpi-java” or would that
create problems down the road?

Thank you,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#34780; Package guix-patches. (Mon, 18 Mar 2019 14:53:01 GMT) Full text and rfc822 format available.

Message #14 received at 34780 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: ericbavier <at> centurylink.net, 34780 <at> debbugs.gnu.org
Subject: Re: [bug#34780] [PATCH] gnu: openmpi: Add Java support.
Date: Mon, 18 Mar 2019 15:06:24 +0100
Ludovic Courtès <ludovic.courtes <at> inria.fr> writes:

> Hi Ricardo,
>
> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> * gnu/packages/mpi.scm (openmpi)[native-inputs]: Add openjdk11.
>> [outputs]: Add "java".
>> [arguments]: Add "--enable-mpi-java" to configure flags; add build phases
>> "set-JAVA_HOME" and "move-java".
>
> Nice.
>
> I’m uncomfortable adding OpenJDK as an input to OpenMPI though, because
> that puts more stress on the build times and potentially on platform
> support as well.

I understad.

> Would it be an option to create a separate “openmpi-java” or would that
> create problems down the road?

I’ll give that a try.  I’m not sure if it’s possible to build the Java
parts in isolation, but that would be nice.

-- 
Ricardo





Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Mon, 18 Mar 2019 17:27:02 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>:
bug acknowledged by developer. (Mon, 18 Mar 2019 17:27:02 GMT) Full text and rfc822 format available.

Message #19 received at 34780-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: 34780-done <at> debbugs.gnu.org, ericbavier <at> centurylink.net
Subject: Re: [bug#34780] [PATCH] gnu: openmpi: Add Java support.
Date: Mon, 18 Mar 2019 18:26:25 +0100
Ricardo Wurmus <rekado <at> elephly.net> writes:

>> Would it be an option to create a separate “openmpi-java” or would that
>> create problems down the road?
>
> I’ll give that a try.  I’m not sure if it’s possible to build the Java
> parts in isolation, but that would be nice.

This is done in commit fa5a25386620cec4b2543aae24fc9a0776aa3dca (it’s
called “java-openmpi”).

Thanks for the suggestion!

--
Ricardo





Information forwarded to guix-patches <at> gnu.org:
bug#34780; Package guix-patches. (Tue, 19 Mar 2019 09:45:02 GMT) Full text and rfc822 format available.

Message #22 received at 34780-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 34780-done <at> debbugs.gnu.org, ericbavier <at> centurylink.net
Subject: Re: [bug#34780] [PATCH] gnu: openmpi: Add Java support.
Date: Tue, 19 Mar 2019 10:43:59 +0100
Ricardo Wurmus <rekado <at> elephly.net> skribis:

> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
>>> Would it be an option to create a separate “openmpi-java” or would that
>>> create problems down the road?
>>
>> I’ll give that a try.  I’m not sure if it’s possible to build the Java
>> parts in isolation, but that would be nice.
>
> This is done in commit fa5a25386620cec4b2543aae24fc9a0776aa3dca (it’s
> called “java-openmpi”).

Great, thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Apr 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 348 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.