Giter Site home page Giter Site logo

jhwloc's Introduction

jhwloc: Java Hardware Locality library

jhwloc is a Java wrapper for the Portable Hardware Locality (hwloc)

Documentation

The complete Javadoc in HTML format that details all the methods of the public jhwloc API is available here.

Getting Started

Prerequisites

  • Make sure you have Java Develpment Kit (JDK) version 1.7 or above

    • JAVA_HOME environmental variable must be set accordingly
  • Make sure you have a working Apache Maven distribution version 3 or above

  • Make sure you have a working hwloc distribution version 2.0 or above

Installation

In order to download, compile, build and install the jhwloc library in your Maven local repository (by default ~/.m2), just execute the following commands:

git clone https://github.com/rreye/jhwloc.git
cd jhwloc
mvn install

In case you need to change any setting to compile the native C code in your system, you can modify the Makefile.common file located at the /src/main/native directory.

Usage

In order to use the jhwloc library in your projects, add the following dependency section to your pom.xml:

<dependencies>
...
  <dependency>
   <groupId>es.udc.gac</groupId>
   <artifactId>jhwloc</artifactId>
   <version>1.0</version> <!-- or latest version -->
  </dependency>
...
</dependencies>

Running the examples

You can test your installation running some of the examples included in jhwloc:

java -cp /path/to/jhwloc/lib/jhwloc-1.0.jar -Djava.library.path=/path/to/jhwloc/lib es.udc.gac.jhwloc.examples.HelloWorld

If your native hwloc library (i.e. libhwloc.so) is not installed in a standard location (e.g. /usr/lib64), you need to set LD_LIBRARY_PATH environmental variable to the directory containing it (i.e. $HWLOC_HOME/lib). For instance, if hwloc is installed at /opt/hwloc (i.e. HWLOC_HOME=/opt/hwloc):

export LD_LIBRARY_PATH=$HWLOC_HOME/lib:$LD_LIBRARY_PATH
java -cp /path/to/jhwloc/lib/jhwloc-1.0.jar -Djava.library.path=/path/to/jhwloc/lib es.udc.gac.jhwloc.examples.HelloWorld

Projects using jhwloc

Authors

The jhwloc library is developed in the Computer Architecture Group at the Universidade da Coruña by:

License

This library is distributed as free software and is publicly available under the GPLv3 license (see the LICENSE file for more details)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.