diff options
author | asau <asau@pkgsrc.org> | 2012-03-21 13:31:35 +0000 |
---|---|---|
committer | asau <asau@pkgsrc.org> | 2012-03-21 13:31:35 +0000 |
commit | 69dcba5cebbb9c31f8bd5120d76ae5ea197c4095 (patch) | |
tree | 2065b652ca643224d83cc466fa5774623a5d92a2 | |
parent | b2438976fef5a9ea07876caf45baea52c035f693 (diff) | |
download | pkgsrc-69dcba5cebbb9c31f8bd5120d76ae5ea197c4095.tar.gz |
Import Portable Hardware Locality (hwloc) version 1.4 as parallel/hwloc.
The Portable Hardware Locality (hwloc) software package provides
a portable abstraction (across OS, versions, architectures, ...)
of the hierarchical topology of modern architectures, including
NUMA memory nodes, sockets, shared caches, cores and
simultaneous multithreading. It also gathers various system
attributes such as cache and memory information as well as the
locality of I/O devices such as network interfaces, InfiniBand
HCAs or GPUs. It primarily aims at helping applications with
gathering information about modern computing hardware so as to
exploit it accordingly and efficiently.
-rw-r--r-- | parallel/hwloc/DESCR | 10 | ||||
-rw-r--r-- | parallel/hwloc/MESSAGE | 8 | ||||
-rw-r--r-- | parallel/hwloc/Makefile | 31 | ||||
-rw-r--r-- | parallel/hwloc/PLIST | 350 | ||||
-rw-r--r-- | parallel/hwloc/buildlink3.mk | 13 | ||||
-rw-r--r-- | parallel/hwloc/distinfo | 9 | ||||
-rw-r--r-- | parallel/hwloc/patches/patch-config_hwloc.m4 | 24 | ||||
-rw-r--r-- | parallel/hwloc/patches/patch-src_Makefile.am | 16 | ||||
-rw-r--r-- | parallel/hwloc/patches/patch-src_topology-netbsd.c | 171 | ||||
-rw-r--r-- | parallel/hwloc/patches/patch-src_topology.c | 16 |
10 files changed, 648 insertions, 0 deletions
diff --git a/parallel/hwloc/DESCR b/parallel/hwloc/DESCR new file mode 100644 index 00000000000..69277a788e8 --- /dev/null +++ b/parallel/hwloc/DESCR @@ -0,0 +1,10 @@ +The Portable Hardware Locality (hwloc) software package provides +a portable abstraction (across OS, versions, architectures, ...) +of the hierarchical topology of modern architectures, including +NUMA memory nodes, sockets, shared caches, cores and +simultaneous multithreading. It also gathers various system +attributes such as cache and memory information as well as the +locality of I/O devices such as network interfaces, InfiniBand +HCAs or GPUs. It primarily aims at helping applications with +gathering information about modern computing hardware so as to +exploit it accordingly and efficiently. diff --git a/parallel/hwloc/MESSAGE b/parallel/hwloc/MESSAGE new file mode 100644 index 00000000000..fba553132e9 --- /dev/null +++ b/parallel/hwloc/MESSAGE @@ -0,0 +1,8 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +On NetBSD setting CPU affinity requires super-user privileges. +Ordinary users can be allowed to control CPU affinity of their threads +via the security.models.extensions.user_set_cpu_affinity sysctl. + +=========================================================================== diff --git a/parallel/hwloc/Makefile b/parallel/hwloc/Makefile new file mode 100644 index 00000000000..7efd6fa8e8f --- /dev/null +++ b/parallel/hwloc/Makefile @@ -0,0 +1,31 @@ +# $NetBSD: Makefile,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +DISTNAME= hwloc-1.4 +CATEGORIES= parallel +MASTER_SITES= http://www.open-mpi.org/software/hwloc/v1.4/downloads/ + +MAINTAINER= asau@inbox.ru +HOMEPAGE= http://www.open-mpi.org/projects/hwloc/ +COMMENT= Portable Hardware Locality +LICENCE= modified-bsd + +PKG_DESTDIR_SUPPORT= user-destdir + +GNU_CONFIGURE= yes +USE_LIBTOOL= yes +USE_TOOLS= pkg-config +USE_TOOLS+= aclocal automake autoconf + +CONFIGURE_ARGS+= --enable-debug --enable-picky + +TEST_TARGET= check + +pre-configure: + $(RUN) cd $(WRKSRC) && autoreconf -ivf + +# libpci?? +#.include "../../graphics/cairo/buildlink3.mk" # optional +.include "../../textproc/libxml2/buildlink3.mk" # optional +.include "../../mk/curses.buildlink3.mk" # optional +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/parallel/hwloc/PLIST b/parallel/hwloc/PLIST new file mode 100644 index 00000000000..ef0ec7e5327 --- /dev/null +++ b/parallel/hwloc/PLIST @@ -0,0 +1,350 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ +bin/hwloc-assembler +bin/hwloc-assembler-remote +bin/hwloc-bind +bin/hwloc-calc +bin/hwloc-distances +bin/hwloc-distrib +bin/hwloc-info +bin/hwloc-ls +bin/hwloc-mask +bin/hwloc-ps +bin/lstopo +include/hwloc.h +include/hwloc/autogen/config.h +include/hwloc/bitmap.h +include/hwloc/cpuset.h +include/hwloc/cuda.h +include/hwloc/cudart.h +include/hwloc/helper.h +include/hwloc/myriexpress.h +include/hwloc/openfabrics-verbs.h +include/hwloc/rename.h +lib/libhwloc.la +lib/pkgconfig/hwloc.pc +man/man1/hwloc-assembler-remote.1 +man/man1/hwloc-assembler.1 +man/man1/hwloc-bind.1 +man/man1/hwloc-calc.1 +man/man1/hwloc-distances.1 +man/man1/hwloc-distrib.1 +man/man1/hwloc-info.1 +man/man1/hwloc-ls.1 +man/man1/hwloc-mask.1 +man/man1/hwloc-ps.1 +man/man1/lstopo.1 +man/man3/HWLOC_API_VERSION.3 +man/man3/HWLOC_CPUBIND_NOMEMBIND.3 +man/man3/HWLOC_CPUBIND_PROCESS.3 +man/man3/HWLOC_CPUBIND_STRICT.3 +man/man3/HWLOC_CPUBIND_THREAD.3 +man/man3/HWLOC_MEMBIND_BIND.3 +man/man3/HWLOC_MEMBIND_DEFAULT.3 +man/man3/HWLOC_MEMBIND_FIRSTTOUCH.3 +man/man3/HWLOC_MEMBIND_INTERLEAVE.3 +man/man3/HWLOC_MEMBIND_MIGRATE.3 +man/man3/HWLOC_MEMBIND_MIXED.3 +man/man3/HWLOC_MEMBIND_NEXTTOUCH.3 +man/man3/HWLOC_MEMBIND_NOCPUBIND.3 +man/man3/HWLOC_MEMBIND_PROCESS.3 +man/man3/HWLOC_MEMBIND_REPLICATE.3 +man/man3/HWLOC_MEMBIND_STRICT.3 +man/man3/HWLOC_MEMBIND_THREAD.3 +man/man3/HWLOC_OBJ_BRIDGE.3 +man/man3/HWLOC_OBJ_BRIDGE_HOST.3 +man/man3/HWLOC_OBJ_BRIDGE_PCI.3 +man/man3/HWLOC_OBJ_CACHE.3 +man/man3/HWLOC_OBJ_CORE.3 +man/man3/HWLOC_OBJ_GROUP.3 +man/man3/HWLOC_OBJ_MACHINE.3 +man/man3/HWLOC_OBJ_MISC.3 +man/man3/HWLOC_OBJ_NODE.3 +man/man3/HWLOC_OBJ_OSDEV_BLOCK.3 +man/man3/HWLOC_OBJ_OSDEV_DMA.3 +man/man3/HWLOC_OBJ_OSDEV_GPU.3 +man/man3/HWLOC_OBJ_OSDEV_NETWORK.3 +man/man3/HWLOC_OBJ_OSDEV_OPENFABRICS.3 +man/man3/HWLOC_OBJ_OS_DEVICE.3 +man/man3/HWLOC_OBJ_PCI_DEVICE.3 +man/man3/HWLOC_OBJ_PU.3 +man/man3/HWLOC_OBJ_SOCKET.3 +man/man3/HWLOC_OBJ_SYSTEM.3 +man/man3/HWLOC_OBJ_TYPE_MAX.3 +man/man3/HWLOC_RESTRICT_FLAG_ADAPT_DISTANCES.3 +man/man3/HWLOC_RESTRICT_FLAG_ADAPT_IO.3 +man/man3/HWLOC_RESTRICT_FLAG_ADAPT_MISC.3 +man/man3/HWLOC_TOPOLOGY_FLAG_IO_BRIDGES.3 +man/man3/HWLOC_TOPOLOGY_FLAG_IO_DEVICES.3 +man/man3/HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM.3 +man/man3/HWLOC_TOPOLOGY_FLAG_WHOLE_IO.3 +man/man3/HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM.3 +man/man3/HWLOC_TYPE_DEPTH_MULTIPLE.3 +man/man3/HWLOC_TYPE_DEPTH_UNKNOWN.3 +man/man3/HWLOC_TYPE_UNORDERED.3 +man/man3/hwloc_alloc.3 +man/man3/hwloc_alloc_membind.3 +man/man3/hwloc_alloc_membind_nodeset.3 +man/man3/hwloc_alloc_membind_policy.3 +man/man3/hwloc_alloc_membind_policy_nodeset.3 +man/man3/hwloc_bitmap_allbut.3 +man/man3/hwloc_bitmap_alloc.3 +man/man3/hwloc_bitmap_alloc_full.3 +man/man3/hwloc_bitmap_and.3 +man/man3/hwloc_bitmap_andnot.3 +man/man3/hwloc_bitmap_asprintf.3 +man/man3/hwloc_bitmap_clr.3 +man/man3/hwloc_bitmap_clr_range.3 +man/man3/hwloc_bitmap_compare.3 +man/man3/hwloc_bitmap_compare_first.3 +man/man3/hwloc_bitmap_copy.3 +man/man3/hwloc_bitmap_dup.3 +man/man3/hwloc_bitmap_fill.3 +man/man3/hwloc_bitmap_first.3 +man/man3/hwloc_bitmap_foreach_begin.3 +man/man3/hwloc_bitmap_foreach_end.3 +man/man3/hwloc_bitmap_free.3 +man/man3/hwloc_bitmap_from_ith_ulong.3 +man/man3/hwloc_bitmap_from_ulong.3 +man/man3/hwloc_bitmap_intersects.3 +man/man3/hwloc_bitmap_isequal.3 +man/man3/hwloc_bitmap_isfull.3 +man/man3/hwloc_bitmap_isincluded.3 +man/man3/hwloc_bitmap_isset.3 +man/man3/hwloc_bitmap_iszero.3 +man/man3/hwloc_bitmap_last.3 +man/man3/hwloc_bitmap_list_asprintf.3 +man/man3/hwloc_bitmap_list_snprintf.3 +man/man3/hwloc_bitmap_list_sscanf.3 +man/man3/hwloc_bitmap_next.3 +man/man3/hwloc_bitmap_not.3 +man/man3/hwloc_bitmap_only.3 +man/man3/hwloc_bitmap_or.3 +man/man3/hwloc_bitmap_set.3 +man/man3/hwloc_bitmap_set_ith_ulong.3 +man/man3/hwloc_bitmap_set_range.3 +man/man3/hwloc_bitmap_singlify.3 +man/man3/hwloc_bitmap_snprintf.3 +man/man3/hwloc_bitmap_sscanf.3 +man/man3/hwloc_bitmap_t.3 +man/man3/hwloc_bitmap_taskset_asprintf.3 +man/man3/hwloc_bitmap_taskset_snprintf.3 +man/man3/hwloc_bitmap_taskset_sscanf.3 +man/man3/hwloc_bitmap_to_ith_ulong.3 +man/man3/hwloc_bitmap_to_ulong.3 +man/man3/hwloc_bitmap_weight.3 +man/man3/hwloc_bitmap_xor.3 +man/man3/hwloc_bitmap_zero.3 +man/man3/hwloc_bridge_covers_pcibus.3 +man/man3/hwloc_compare_types.3 +man/man3/hwloc_compare_types_e.3 +man/man3/hwloc_const_bitmap_t.3 +man/man3/hwloc_const_cpuset_t.3 +man/man3/hwloc_const_nodeset_t.3 +man/man3/hwloc_cpubind_flags_t.3 +man/man3/hwloc_cpuset_from_glibc_sched_affinity.3 +man/man3/hwloc_cpuset_from_linux_libnuma_bitmask.3 +man/man3/hwloc_cpuset_from_linux_libnuma_nodemask.3 +man/man3/hwloc_cpuset_from_linux_libnuma_ulongs.3 +man/man3/hwloc_cpuset_from_nodeset.3 +man/man3/hwloc_cpuset_from_nodeset_strict.3 +man/man3/hwloc_cpuset_t.3 +man/man3/hwloc_cpuset_to_glibc_sched_affinity.3 +man/man3/hwloc_cpuset_to_linux_libnuma_bitmask.3 +man/man3/hwloc_cpuset_to_linux_libnuma_nodemask.3 +man/man3/hwloc_cpuset_to_linux_libnuma_ulongs.3 +man/man3/hwloc_cpuset_to_nodeset.3 +man/man3/hwloc_cpuset_to_nodeset_strict.3 +man/man3/hwloc_cuda_get_device_cpuset.3 +man/man3/hwloc_cudart_get_device_cpuset.3 +man/man3/hwloc_custom_insert_group_object_by_parent.3 +man/man3/hwloc_custom_insert_topology.3 +man/man3/hwloc_distances_s.3 +man/man3/hwloc_distribute.3 +man/man3/hwloc_distributev.3 +man/man3/hwloc_free.3 +man/man3/hwloc_free_xmlbuffer.3 +man/man3/hwloc_get_ancestor_obj_by_depth.3 +man/man3/hwloc_get_ancestor_obj_by_type.3 +man/man3/hwloc_get_api_version.3 +man/man3/hwloc_get_area_membind.3 +man/man3/hwloc_get_area_membind_nodeset.3 +man/man3/hwloc_get_cache_covering_cpuset.3 +man/man3/hwloc_get_child_covering_cpuset.3 +man/man3/hwloc_get_closest_objs.3 +man/man3/hwloc_get_common_ancestor_obj.3 +man/man3/hwloc_get_cpubind.3 +man/man3/hwloc_get_depth_type.3 +man/man3/hwloc_get_distance_matrix_covering_obj_by_depth.3 +man/man3/hwloc_get_first_largest_obj_inside_cpuset.3 +man/man3/hwloc_get_hostbridge_by_pcibus.3 +man/man3/hwloc_get_largest_objs_inside_cpuset.3 +man/man3/hwloc_get_last_cpu_location.3 +man/man3/hwloc_get_latency.3 +man/man3/hwloc_get_membind.3 +man/man3/hwloc_get_membind_nodeset.3 +man/man3/hwloc_get_nbobjs_by_depth.3 +man/man3/hwloc_get_nbobjs_by_type.3 +man/man3/hwloc_get_nbobjs_inside_cpuset_by_depth.3 +man/man3/hwloc_get_nbobjs_inside_cpuset_by_type.3 +man/man3/hwloc_get_next_bridge.3 +man/man3/hwloc_get_next_child.3 +man/man3/hwloc_get_next_obj_by_depth.3 +man/man3/hwloc_get_next_obj_by_type.3 +man/man3/hwloc_get_next_obj_covering_cpuset_by_depth.3 +man/man3/hwloc_get_next_obj_covering_cpuset_by_type.3 +man/man3/hwloc_get_next_obj_inside_cpuset_by_depth.3 +man/man3/hwloc_get_next_obj_inside_cpuset_by_type.3 +man/man3/hwloc_get_next_osdev.3 +man/man3/hwloc_get_next_pcidev.3 +man/man3/hwloc_get_non_io_ancestor_obj.3 +man/man3/hwloc_get_obj_below_array_by_type.3 +man/man3/hwloc_get_obj_below_by_type.3 +man/man3/hwloc_get_obj_by_depth.3 +man/man3/hwloc_get_obj_by_type.3 +man/man3/hwloc_get_obj_covering_cpuset.3 +man/man3/hwloc_get_obj_index_inside_cpuset.3 +man/man3/hwloc_get_obj_inside_cpuset_by_depth.3 +man/man3/hwloc_get_obj_inside_cpuset_by_type.3 +man/man3/hwloc_get_pcidev_by_busid.3 +man/man3/hwloc_get_pcidev_by_busidstring.3 +man/man3/hwloc_get_proc_cpubind.3 +man/man3/hwloc_get_proc_last_cpu_location.3 +man/man3/hwloc_get_proc_membind.3 +man/man3/hwloc_get_proc_membind_nodeset.3 +man/man3/hwloc_get_pu_obj_by_os_index.3 +man/man3/hwloc_get_root_obj.3 +man/man3/hwloc_get_shared_cache_covering_obj.3 +man/man3/hwloc_get_thread_cpubind.3 +man/man3/hwloc_get_type_depth.3 +man/man3/hwloc_get_type_depth_e.3 +man/man3/hwloc_get_type_or_above_depth.3 +man/man3/hwloc_get_type_or_below_depth.3 +man/man3/hwloc_get_whole_distance_matrix_by_depth.3 +man/man3/hwloc_get_whole_distance_matrix_by_type.3 +man/man3/hwloc_ibv_get_device_cpuset.3 +man/man3/hwloc_linux_get_tid_cpubind.3 +man/man3/hwloc_linux_parse_cpumap_file.3 +man/man3/hwloc_linux_set_tid_cpubind.3 +man/man3/hwloc_membind_flags_t.3 +man/man3/hwloc_membind_policy_t.3 +man/man3/hwloc_mx_board_get_device_cpuset.3 +man/man3/hwloc_mx_endpoint_get_device_cpuset.3 +man/man3/hwloc_nodeset_from_linux_libnuma_bitmask.3 +man/man3/hwloc_nodeset_from_linux_libnuma_nodemask.3 +man/man3/hwloc_nodeset_from_linux_libnuma_ulongs.3 +man/man3/hwloc_nodeset_t.3 +man/man3/hwloc_nodeset_to_linux_libnuma_bitmask.3 +man/man3/hwloc_nodeset_to_linux_libnuma_nodemask.3 +man/man3/hwloc_nodeset_to_linux_libnuma_ulongs.3 +man/man3/hwloc_obj.3 +man/man3/hwloc_obj_add_info.3 +man/man3/hwloc_obj_attr_snprintf.3 +man/man3/hwloc_obj_attr_u.3 +man/man3/hwloc_obj_attr_u_hwloc_bridge_attr_s.3 +man/man3/hwloc_obj_attr_u_hwloc_cache_attr_s.3 +man/man3/hwloc_obj_attr_u_hwloc_group_attr_s.3 +man/man3/hwloc_obj_attr_u_hwloc_osdev_attr_s.3 +man/man3/hwloc_obj_attr_u_hwloc_pcidev_attr_s.3 +man/man3/hwloc_obj_bridge_type_e.3 +man/man3/hwloc_obj_bridge_type_t.3 +man/man3/hwloc_obj_cpuset_snprintf.3 +man/man3/hwloc_obj_get_info_by_name.3 +man/man3/hwloc_obj_info_s.3 +man/man3/hwloc_obj_is_in_subtree.3 +man/man3/hwloc_obj_memory_s.3 +man/man3/hwloc_obj_memory_s_hwloc_obj_memory_page_type_s.3 +man/man3/hwloc_obj_osdev_type_e.3 +man/man3/hwloc_obj_osdev_type_t.3 +man/man3/hwloc_obj_snprintf.3 +man/man3/hwloc_obj_t.3 +man/man3/hwloc_obj_type_of_string.3 +man/man3/hwloc_obj_type_snprintf.3 +man/man3/hwloc_obj_type_string.3 +man/man3/hwloc_obj_type_t.3 +man/man3/hwloc_restrict_flags_e.3 +man/man3/hwloc_set_area_membind.3 +man/man3/hwloc_set_area_membind_nodeset.3 +man/man3/hwloc_set_cpubind.3 +man/man3/hwloc_set_membind.3 +man/man3/hwloc_set_membind_nodeset.3 +man/man3/hwloc_set_proc_cpubind.3 +man/man3/hwloc_set_proc_membind.3 +man/man3/hwloc_set_proc_membind_nodeset.3 +man/man3/hwloc_set_thread_cpubind.3 +man/man3/hwloc_topology_check.3 +man/man3/hwloc_topology_cpubind_support.3 +man/man3/hwloc_topology_destroy.3 +man/man3/hwloc_topology_discovery_support.3 +man/man3/hwloc_topology_export_xml.3 +man/man3/hwloc_topology_export_xmlbuffer.3 +man/man3/hwloc_topology_flags_e.3 +man/man3/hwloc_topology_get_allowed_cpuset.3 +man/man3/hwloc_topology_get_allowed_nodeset.3 +man/man3/hwloc_topology_get_complete_cpuset.3 +man/man3/hwloc_topology_get_complete_nodeset.3 +man/man3/hwloc_topology_get_depth.3 +man/man3/hwloc_topology_get_online_cpuset.3 +man/man3/hwloc_topology_get_support.3 +man/man3/hwloc_topology_get_topology_cpuset.3 +man/man3/hwloc_topology_get_topology_nodeset.3 +man/man3/hwloc_topology_ignore_all_keep_structure.3 +man/man3/hwloc_topology_ignore_type.3 +man/man3/hwloc_topology_ignore_type_keep_structure.3 +man/man3/hwloc_topology_init.3 +man/man3/hwloc_topology_insert_misc_object_by_cpuset.3 +man/man3/hwloc_topology_insert_misc_object_by_parent.3 +man/man3/hwloc_topology_is_thissystem.3 +man/man3/hwloc_topology_load.3 +man/man3/hwloc_topology_membind_support.3 +man/man3/hwloc_topology_restrict.3 +man/man3/hwloc_topology_set_custom.3 +man/man3/hwloc_topology_set_distance_matrix.3 +man/man3/hwloc_topology_set_flags.3 +man/man3/hwloc_topology_set_fsroot.3 +man/man3/hwloc_topology_set_pid.3 +man/man3/hwloc_topology_set_synthetic.3 +man/man3/hwloc_topology_set_xml.3 +man/man3/hwloc_topology_set_xmlbuffer.3 +man/man3/hwloc_topology_support.3 +man/man3/hwloc_topology_t.3 +man/man3/hwlocality_advanced_io.3 +man/man3/hwlocality_api_version.3 +man/man3/hwlocality_bitmap.3 +man/man3/hwlocality_configuration.3 +man/man3/hwlocality_conversion.3 +man/man3/hwlocality_cpubinding.3 +man/man3/hwlocality_creation.3 +man/man3/hwlocality_cuda.3 +man/man3/hwlocality_cudart.3 +man/man3/hwlocality_custom.3 +man/man3/hwlocality_distances.3 +man/man3/hwlocality_glibc_sched.3 +man/man3/hwlocality_helper_binding.3 +man/man3/hwlocality_helper_cpuset.3 +man/man3/hwlocality_helper_find_cache.3 +man/man3/hwlocality_helper_find_covering.3 +man/man3/hwlocality_helper_find_coverings.3 +man/man3/hwlocality_helper_find_inside.3 +man/man3/hwlocality_helper_nodeset.3 +man/man3/hwlocality_helper_nodeset_convert.3 +man/man3/hwlocality_helper_traversal.3 +man/man3/hwlocality_helper_traversal_basic.3 +man/man3/hwlocality_helper_types.3 +man/man3/hwlocality_information.3 +man/man3/hwlocality_linux.3 +man/man3/hwlocality_linux_libnuma_bitmask.3 +man/man3/hwlocality_linux_libnuma_nodemask.3 +man/man3/hwlocality_linux_libnuma_ulongs.3 +man/man3/hwlocality_membinding.3 +man/man3/hwlocality_myriexpress.3 +man/man3/hwlocality_objects.3 +man/man3/hwlocality_openfabrics.3 +man/man3/hwlocality_sets.3 +man/man3/hwlocality_tinker.3 +man/man3/hwlocality_topology.3 +man/man3/hwlocality_traversal.3 +man/man3/hwlocality_types.3 +man/man7/hwloc.7 +share/doc/hwloc/hwloc-a4.pdf +share/doc/hwloc/hwloc-letter.pdf +share/hwloc/hwloc.dtd diff --git a/parallel/hwloc/buildlink3.mk b/parallel/hwloc/buildlink3.mk new file mode 100644 index 00000000000..4fd456ee128 --- /dev/null +++ b/parallel/hwloc/buildlink3.mk @@ -0,0 +1,13 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +BUILDLINK_TREE+= hwloc + +.if !defined(HWLOC_BUILDLINK3_MK) +HWLOC_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.hwloc+= hwloc>=1.4 +BUILDLINK_PKGSRCDIR.hwloc?= ../../parallel/hwloc + +.endif # HWLOC_BUILDLINK3_MK + +BUILDLINK_TREE+= -hwloc diff --git a/parallel/hwloc/distinfo b/parallel/hwloc/distinfo new file mode 100644 index 00000000000..0c931c5ccd0 --- /dev/null +++ b/parallel/hwloc/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +SHA1 (hwloc-1.4.tar.gz) = 9d965cfba65756229de257d06d0929c6780bd9b0 +RMD160 (hwloc-1.4.tar.gz) = edf405a7e9c1d7fc776eacf51074f655e5cac377 +Size (hwloc-1.4.tar.gz) = 3014082 bytes +SHA1 (patch-config_hwloc.m4) = 9a76635c82021fe79d7ffab0642b7d667c43b0d5 +SHA1 (patch-src_Makefile.am) = 8da2df8954347d6de72b18dee6f5141db549f9a5 +SHA1 (patch-src_topology-netbsd.c) = aa5729b8e10326f6e30aaab40bf5368955a66733 +SHA1 (patch-src_topology.c) = 4e7bdac212a96c51e4464bed05f2ac54bc6f5a53 diff --git a/parallel/hwloc/patches/patch-config_hwloc.m4 b/parallel/hwloc/patches/patch-config_hwloc.m4 new file mode 100644 index 00000000000..0e5c52024e3 --- /dev/null +++ b/parallel/hwloc/patches/patch-config_hwloc.m4 @@ -0,0 +1,24 @@ +$NetBSD: patch-config_hwloc.m4,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +--- config/hwloc.m4.orig 2012-01-26 09:49:56.000000000 +0000 ++++ config/hwloc.m4 +@@ -210,6 +210,11 @@ EOF]) + hwloc_freebsd=yes + AC_MSG_RESULT([FreeBSD]) + ;; ++ *-*-*netbsd*) ++ AC_DEFINE(HWLOC_NETBSD_SYS, 1, [Define to 1 on *NETBSD]) ++ hwloc_netbsd=yes ++ AC_MSG_RESULT([NetBSD]) ++ ;; + *) + AC_MSG_RESULT([Unsupported! ($target)]) + AC_DEFINE(HWLOC_UNSUPPORTED_SYS, 1, [Define to 1 on unsupported systems]) +@@ -760,6 +765,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[ + AM_CONDITIONAL([HWLOC_HAVE_LINUX], [test "x$hwloc_linux" = "xyes"]) + AM_CONDITIONAL([HWLOC_HAVE_IRIX], [test "x$hwloc_irix" = "xyes"]) + AM_CONDITIONAL([HWLOC_HAVE_DARWIN], [test "x$hwloc_darwin" = "xyes"]) ++ AM_CONDITIONAL([HWLOC_HAVE_NETBSD], [test "x$hwloc_netbsd" = "xyes"]) + AM_CONDITIONAL([HWLOC_HAVE_FREEBSD], [test "x$hwloc_freebsd" = "xyes"]) + AM_CONDITIONAL([HWLOC_HAVE_SOLARIS], [test "x$hwloc_solaris" = "xyes"]) + AM_CONDITIONAL([HWLOC_HAVE_AIX], [test "x$hwloc_aix" = "xyes"]) diff --git a/parallel/hwloc/patches/patch-src_Makefile.am b/parallel/hwloc/patches/patch-src_Makefile.am new file mode 100644 index 00000000000..29de6a0b060 --- /dev/null +++ b/parallel/hwloc/patches/patch-src_Makefile.am @@ -0,0 +1,16 @@ +$NetBSD: patch-src_Makefile.am,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +--- src/Makefile.am.orig 2012-01-26 09:49:56.000000000 +0000 ++++ src/Makefile.am +@@ -71,6 +71,11 @@ if HWLOC_HAVE_DARWIN + sources += topology-darwin.c + endif HWLOC_HAVE_DARWIN + ++if HWLOC_HAVE_NETBSD ++sources += topology-netbsd.c ++ldflags += -lpthread ++endif HWLOC_HAVE_NETBSD ++ + if HWLOC_HAVE_FREEBSD + sources += topology-freebsd.c + endif HWLOC_HAVE_FREEBSD diff --git a/parallel/hwloc/patches/patch-src_topology-netbsd.c b/parallel/hwloc/patches/patch-src_topology-netbsd.c new file mode 100644 index 00000000000..04bdbe3853a --- /dev/null +++ b/parallel/hwloc/patches/patch-src_topology-netbsd.c @@ -0,0 +1,171 @@ +$NetBSD: patch-src_topology-netbsd.c,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +--- src/topology-netbsd.c.orig 2012-03-21 11:13:38.000000000 +0000 ++++ src/topology-netbsd.c +@@ -0,0 +1,166 @@ ++/* ++ * Copyright © 2012 Aleksej Saushev, The NetBSD Foundation ++ * Copyright © 2009-2011 inria. All rights reserved. ++ * Copyright © 2009-2010 Université Bordeaux 1 ++ * Copyright © 2011 Cisco Systems, Inc. All rights reserved. ++ * See COPYING in top-level directory. ++ */ ++ ++#define _NETBSD_SOURCE /* request "_np" functions */ ++ ++#include <private/autogen/config.h> ++ ++#include <sys/types.h> ++#include <stdlib.h> ++#include <inttypes.h> ++#include <sys/param.h> ++#include <pthread.h> ++#include <sched.h> ++ ++#include <hwloc.h> ++#include <private/private.h> ++#include <private/debug.h> ++ ++/* #ifdef HAVE_SCHED_H */ ++static void ++hwloc_netbsd_bsd2hwloc(hwloc_bitmap_t hwloc_cpuset, const cpuset_t *cpuset) ++{ ++ unsigned cpu, cpulimit; ++ hwloc_bitmap_zero(hwloc_cpuset); ++ cpulimit = cpuset_size(cpuset) * CHAR_BIT; ++ for (cpu = 0; cpu < cpulimit; cpu++) ++ if (cpuset_isset(cpu, cpuset)) ++ hwloc_bitmap_set(hwloc_cpuset, cpu); ++} ++ ++static void ++hwloc_netbsd_hwloc2bsd(hwloc_const_bitmap_t hwloc_cpuset, cpuset_t *cpuset) ++{ ++ unsigned cpu, cpulimit; ++ cpuset_zero(cpuset); ++ cpulimit = cpuset_size(cpuset) * CHAR_BIT; ++ for (cpu = 0; cpu < cpulimit; cpu++) ++ if (hwloc_bitmap_isset(hwloc_cpuset, cpu)) ++ cpuset_set(cpu, cpuset); ++} ++ ++static int ++hwloc_netbsd_set_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t pid, hwloc_const_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused) ++{ ++ int status; ++ cpuset_t *cpuset = cpuset_create(); ++ ++ hwloc_netbsd_hwloc2bsd(hwloc_cpuset, cpuset); ++ ++ status = sched_setaffinity_np(pid, cpuset_size(cpuset), cpuset); ++ ++ cpuset_destroy(cpuset); ++ return status; ++} ++ ++static int ++hwloc_netbsd_get_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t pid, hwloc_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused) ++{ ++ int status; ++ cpuset_t *cpuset = cpuset_create(); ++ ++ status = sched_setaffinity_np(pid, cpuset_size(cpuset), cpuset); ++ hwloc_netbsd_bsd2hwloc(hwloc_cpuset, cpuset); ++ ++ cpuset_destroy(cpuset); ++ return status; ++} ++ ++ ++static int ++hwloc_netbsd_set_thisproc_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_cpuset, int flags) ++{ ++ return hwloc_netbsd_set_proc_cpubind(topology, 0, hwloc_cpuset, flags); ++} ++ ++static int ++hwloc_netbsd_get_thisproc_cpubind(hwloc_topology_t topology, hwloc_bitmap_t hwloc_cpuset, int flags) ++{ ++ return hwloc_netbsd_get_proc_cpubind(topology, 0, hwloc_cpuset, flags); ++} ++ ++ ++static int ++hwloc_netbsd_set_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t tid, hwloc_const_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused) ++{ ++ int status; ++ cpuset_t *cpuset = cpuset_create(); ++ ++ hwloc_netbsd_hwloc2bsd(hwloc_cpuset, cpuset); ++ ++ status = pthread_setaffinity_np(tid, cpuset_size(cpuset), cpuset); ++ ++ cpuset_destroy(cpuset); ++ ++ if (status) { ++ errno = status; ++ return -1; ++ } ++ ++ return 0; ++} ++ ++static int ++hwloc_netbsd_get_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t tid, hwloc_bitmap_t hwloc_cpuset, int flags __hwloc_attribute_unused) ++{ ++ int status; ++ cpuset_t *cpuset = cpuset_create(); ++ ++ status = pthread_getaffinity_np(tid, cpuset_size(cpuset), cpuset); ++ ++ hwloc_netbsd_bsd2hwloc(hwloc_cpuset, cpuset); ++ cpuset_destroy(cpuset); ++ ++ if (status) { ++ errno = status; ++ return -1; ++ } ++ ++ return 0; ++} ++ ++ ++static int ++hwloc_netbsd_set_thisthread_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_cpuset, int flags) ++{ ++ return hwloc_netbsd_set_thread_cpubind(topology, pthread_self(), hwloc_cpuset, flags); ++} ++ ++static int ++hwloc_netbsd_get_thisthread_cpubind(hwloc_topology_t topology, hwloc_bitmap_t hwloc_cpuset, int flags) ++{ ++ return hwloc_netbsd_get_thread_cpubind(topology, pthread_self(), hwloc_cpuset, flags); ++} ++ ++ ++void ++hwloc_look_netbsd(struct hwloc_topology *topology) ++{ ++ unsigned nbprocs = hwloc_fallback_nbprocessors(topology); ++ ++ hwloc_set_netbsd_hooks(topology); ++ hwloc_look_x86(topology, nbprocs); ++ ++ hwloc_setup_pu_level(topology, nbprocs); ++ ++ hwloc_obj_add_info(topology->levels[0][0], "Backend", "NetBSD"); ++} ++ ++void ++hwloc_set_netbsd_hooks(struct hwloc_topology *topology) ++{ ++ topology->set_proc_cpubind = hwloc_netbsd_set_proc_cpubind; ++ topology->get_proc_cpubind = hwloc_netbsd_get_proc_cpubind; ++ topology->set_thisproc_cpubind = hwloc_netbsd_set_thisproc_cpubind; ++ topology->get_thisproc_cpubind = hwloc_netbsd_get_thisproc_cpubind; ++ ++ topology->set_thread_cpubind = hwloc_netbsd_set_thread_cpubind; ++ topology->get_thread_cpubind = hwloc_netbsd_get_thread_cpubind; ++ topology->set_thisthread_cpubind = hwloc_netbsd_set_thisthread_cpubind; ++ topology->get_thisthread_cpubind = hwloc_netbsd_get_thisthread_cpubind; ++} diff --git a/parallel/hwloc/patches/patch-src_topology.c b/parallel/hwloc/patches/patch-src_topology.c new file mode 100644 index 00000000000..81f27bffbc2 --- /dev/null +++ b/parallel/hwloc/patches/patch-src_topology.c @@ -0,0 +1,16 @@ +$NetBSD: patch-src_topology.c,v 1.1.1.1 2012/03/21 13:31:35 asau Exp $ + +--- src/topology.c.orig 2012-01-22 08:06:22.000000000 +0000 ++++ src/topology.c +@@ -2168,6 +2168,11 @@ hwloc_discover(struct hwloc_topology *to + hwloc_look_darwin(topology); + # endif /* HWLOC_DARWIN_SYS */ + ++# ifdef HWLOC_NETBSD_SYS ++# define HAVE_OS_SUPPORT ++ hwloc_look_netbsd(topology); ++# endif /* HWLOC_NETBSD_SYS */ ++ + # ifdef HWLOC_FREEBSD_SYS + # define HAVE_OS_SUPPORT + hwloc_look_freebsd(topology); |