Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4525 + 2403 = 6928
Home Page

Parallel Java 2 Library

Prof. Alan Kaminsky
Rochester Institute of Technology—Department of Computer Science

Overview
Books and Publications
What Happened to "Old" Parallel Java?
PJ2 Features
Preinstalled Version
Download Version
System Requirements
Installation
Usage
Parallel Programming with PJ2
License
Documentation (Javadoc)


Overview

Parallel Java 2 (PJ2) is an API and middleware for parallel programming in 100% Java on multicore parallel computers, cluster parallel computers, hybrid multicore cluster parallel computers, and GPU accelerated parallel computers. PJ2 also includes a lightweight map-reduce framework. PJ2 was developed by Professor Alan Kaminsky in the Department of Computer Science at the Rochester Institute of Technology.

I am happy to answer general questions about the Parallel Java 2 Library, receive bug reports, and entertain requests for additional features. Please contact me by email at ark­@­cs.rit.edu. I regret that I am unable to provide technical support, specific installation instructions for your system, or advice about configuring your parallel computer hardware.


Books and Publications

Books about PJ2:

Alan Kaminsky.
BIG CPU, BIG DATA: Solving the World's Toughest Computational Problems with Parallel Computing.
CreateSpace, 2016.

Publications and presentations about PJ2:

Resources for teaching and learning PJ:


What Happened to "Old" Parallel Java?

The original version of Parallel Java (PJ) is still available. However, I am no longer adding to it or supporting it.

When I developed PJ starting in 2005, parallel computing was used mainly for scientific and engineering computation. The dominant parallel programming libraries were OpenMP for multicore parallel computing and MPI for cluster parallel computing. Accordingly, I designed PJ to mimic OpenMP's and MPI's capabilities.

Fast forward to 2013, when I started developing PJ2. Parallel computing had expanded far beyond what it was a decade earlier. Multicore parallel computers were equipped with many more CPU cores and much larger main memory, such that computations that used to require a whole cluster now could be done on a single multicore node. New kinds of parallel computing hardware had become commonplace, notably graphics processing unit (GPU) accelerators. Cloud computing services, such as Amazon's EC2, allowed anyone to run parallel programs on a virtual supercomputer with thousands of cores. New application areas for parallel computing had opened up, notably big data analytics. New parallel programming APIs had arisen, such as OpenCL and NVIDIA Corporation's CUDA for GPU parallel programming, and map-reduce frameworks like Apache's Hadoop for big data computing. To explore and take advantage of all these trends, I decided that a completely new Parallel Java 2 Library was needed.


PJ2 Features

The chief features of PJ2 (that differ from PJ) are:


Preinstalled Version

PJ2 is installed on the Computer Science Department computer systems. When working in your Computer Science Department account, use the preinstalled version.

Classpath — /home/fac/ark/public_html/pj2.jar

Add that JAR file to your classpath when you run the programs. See Usage below for further information.

Documentation — /home/fac/ark/public_html/pj2/doc

Point your HTML browser to that directory or to this URL: http://www.cs.rit.edu/~ark/pj2/doc/index.html

See "PJ2 on the RIT CS Parallel Computers" for further information about running PJ2 programs on the Computer Science Department's parallel computers.


Download Version

The download version of PJ2 is for installation on your personal computer only. Do not install it in your Computer Science Department account. When working in your Computer Science Department account, use the preinstalled version (see above).

There are two versions of the PJ2 distribution that you may download, an executable distribution and a source distribution.

Executable distribution. The executable distribution comes in a Java Archive (JAR) file named "pj2_YYYYMMDD.jar", where YYYYMMDD are the year, month, and date. The executable distribution includes the PJ2 class files only.

Version 29-Aug-2017 (1,111,000 bytes): pj2_20170829.jar

Source distribution. The source distribution comes in a Java Archive (JAR) file named "pj2src_YYYYMMDD.jar", where YYYYMMDD are the year, month, and date. The source distribution includes the PJ2 class files, source files, and documentation files (Javadoc).

Version 29-Aug-2017 (6,432,833 bytes): pj2src_20170829.jar


System Requirements

PJ2 was developed using Java Development Kit (JDK) 1.7. When compiling and running PJ2 programs, you must use JDK 1.7 or higher. PJ2 uses features of the Java language and platform introduced in JDK 1.7 and will not compile with earlier JDK versions.


Installation

Executable distribution. To install the executable distribution, simply store the JAR file somewhere. You may wish to change the file name, say to "pj2.jar".

Source distribution. To install the source distribution, just unpack the JAR file. The source distribution expands into a subdirectory named "pj2". If you already have a subdirectory of that name which you want to save, be sure to unpack the JAR file in some other directory. Documentation is stored under the directory "pj2/doc"; point your HTML browser to that directory. Java source files and class files are stored under the directory "pj2/lib".

Installation on a multicore computer. To run PJ2 programs on a multicore parallel computer, no further installation is required.

Installation on a cluster. To run PJ2 programs on a cluster parallel computer, on a computing grid, or in the cloud, in addition to installing the PJ2 JAR file, you must configure and run certain daemon processes on the frontend and backend processors of the cluster. For further information, see package edu.rit.pj2.tracker.

Installation for use with GPUs. PJ2 programs can execute graphics processing unit (GPU) code using the classes in package edu.rit.gpu; refer to that package for instructions on installing PJ2's GPU capability.


Usage

Executable distribution. When compiling and executing Java programs that use PJ2, if you have installed the executable distribution, you must set your classpath to include the PJ2 JAR file. Here is an example of a command for the bash shell to set the classpath to the current directory plus the PJ2 JAR file:

export CLASSPATH=.:/home/fac/ark/public_html/pj2.jar

Here is an example of a command for the csh shell to set the classpath to the current directory plus the PJ2 JAR file:

setenv CLASSPATH .:/home/fac/ark/public_html/pj2.jar

Source distribution. When compiling and executing Java programs that use PJ2, if you have installed the source distribution, you must set your classpath to include the top-level directory under which PJ2's Java class files are stored.

Running PJ2 programs. PJ2 programs are executed by running the PJ2 program launcher, pj2. See class pj2 for further information.

PJ2 GPU programs. When compiling and executing Java programs that use PJ2's GPU capability, you must also set your load library path. For further information, see package edu.rit.gpu.


Parallel Programming with PJ2

  1. Install PJ2 as described above.

  2. Read the documentation for the PJ2 classes. Start with these:
    — Package edu.rit.pj2
    — PJ2 launcher program, pj2
    — Class edu.rit.pj2.Task
    — Class edu.rit.pj2.Job

  3. Set the Java classpath as described above.

  4. Study and run the example programs in package edu.rit.pj2.example.

  5. Write and run your own PJ2 programs!

    Optionally:

  6. Install the PJ2 GPU capability as described above.

  7. Read the documentation for the PJ2 GPU capability. Start with these:
    — Package edu.rit.gpu
    — Class edu.rit.gpu.Gpu
    — Class edu.rit.gpu.Module
    — Interface edu.rit.gpu.Kernel

  8. Set the load library path as described above.

  9. Study and run the example programs in package edu.rit.gpu.example.

  10. Write and run your own PJ2 GPU programs!


License

The documentation files, Java source files, and Java class files in the Parallel Java 2 Library ("PJ2") are copyright © 2013–2017 by Alan Kaminsky. All rights reserved. For further information, contact the author, Alan Kaminsky, at ark­@­cs.rit.edu.

PJ2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

PJ2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is provided in the file gpl.txt. You may also obtain a copy of the GNU General Public License on the World Wide Web at http://www.gnu.org/licenses/gpl.html.

Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4525 + 2403 = 6928
Home Page
Copyright © 2017 Alan Kaminsky. All rights reserved. Last updated 29-Aug-2017. Please send comments to ark­@­cs.rit.edu.