Opened 10 years ago

Closed 10 years ago

#44455 closed enhancement (duplicate)

openmpi: Optionally disable hwloc requirement

Reported by: michael-lists@… Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: haspatch Cc:
Port: openmpi

Description

I'd like to be able to disable the hwloc dependencies of openmpi. Some code I have does not properly work with hwloc-enabled OpenMPI for some reason.

Below is a patch that adds a variant nohwloc

--- /Users/admin/Desktop/openmpi	2014-07-23 04:30:14.000000000 +0200
+++ /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/openmpi/Portfile	2014-07-27 11:30:19.000000000 +0200
@@ -309,6 +309,11 @@
         depends_lib-append    path:${prefix}/lib/pkgconfig/valgrind.pc:valgrind
         configure.args-append --enable-debug --enable-memchecker --with-valgrind=${prefix}
     }
+	
+	variant nohwloc description {disable hwloc requirement} {
+		configure.args-append	--without-hwloc
+		depends_lib-delete		port:hwloc
+	}
 
 } else {
     depends_lib-append      port:$name-default

Change History (7)

comment:1 Changed 10 years ago by michael-lists@…

Cc: michael-lists@… added
Last edited 10 years ago by michael-lists@… (previous) (diff)

comment:2 Changed 10 years ago by michael-lists@…

As I just learned, I shouldn't use a no prefix for a variant, so here's a new patch:

--- /Users/admin/Desktop/openmpi	2014-07-23 04:30:14.000000000 +0200
+++ /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/openmpi/Portfile	2014-07-27 15:10:27.000000000 +0200
@@ -132,7 +132,6 @@
     }
 
     conflicts-append            lammpi
-    depends_lib-append          port:hwloc
     depends_run                 port:mpi_select port:mpi-doc
     select.group                mpi
     select.file                 ${filespath}/${name}-${cname}
@@ -154,7 +153,6 @@
         --datadir=${prefix}/share/${name}-${cname} \
         --docdir=${prefix}/share/docdelete \
         --mandir=${prefix}/share/mandelete \
-        --with-hwloc=${prefix}
 
     post-destroot {
         if {[string first "-devel" $subport] > 0} {
@@ -309,6 +307,12 @@
         depends_lib-append    path:${prefix}/lib/pkgconfig/valgrind.pc:valgrind
         configure.args-append --enable-debug --enable-memchecker --with-valgrind=${prefix}
     }
+	
+	variant hwloc description {enable hwloc} {
+		configure.args-append	--with-hwloc=${prefix}
+		depends_lib-append		port:hwloc
+	}
+	default_variants-append		+hwloc
 
 } else {
     depends_lib-append      port:$name-default

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: michael-lists@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to sean@…

comment:4 Changed 10 years ago by seanfarley (Sean Farley)

Actually, I think this error is from an overeager update to hwloc 1.9. First, can you test openmpi-devel to see if that works? Second, can you test hwloc 1.8?

comment:5 Changed 10 years ago by michael-lists@…

Downgrading to hwloc 1.8.1 fixes it with both OpenMPI 1.7.5 and 1.9a, but hwloc 1.9 does not work with OpenMPI 1.9a either.

comment:6 in reply to:  5 Changed 10 years ago by seanfarley (Sean Farley)

Replying to michael-lists@…:

Downgrading to hwloc 1.8.1 fixes it with both OpenMPI 1.7.5 and 1.9a, but hwloc 1.9 does not work with OpenMPI 1.9a either.

Thanks for testing this for me! I'll downgrade hwloc and push those changes soon. Sorry for the inconvenience.

comment:7 Changed 10 years ago by seanfarley (Sean Farley)

Resolution: duplicate
Status: newclosed

Duplicate of #43381.

Note: See TracTickets for help on using tickets.