Package edu.rit.crypto contains implementations of cryptographic algorithms.
Package edu.rit.draw contains classes and programs for drawing diagrams and slides of all kinds.
Package edu.rit.draw.item contains classes for the different kinds of drawing items that can appear in a Drawing.
Package edu.rit.gpu contains classes for Parallel Java 2's graphics processing unit (GPU) programming capability.
Package edu.rit.gpu.example contains example programs illustrating how to do GPU parallel programming with the Parallel Java 2 Library.
Package edu.rit.gpu.test contains unit test programs for the classes in package edu.rit.gpu.
Package edu.rit.http contains components for working with the Hypertext Transfer Protocol (HTTP).
Package edu.rit.image contains classes for creating image files.
Package edu.rit.image.png contains classes for creating PNG image files.
Package edu.rit.io contains components for input/output.
Package edu.rit.numeric contains common classes for numerical computation.
Package edu.rit.numeric.plot provides classes and interfaces for plotting data.
Package edu.rit.numeric.plot.impl provides low-level implementation classes for the high-level plotting classes in package edu.rit.numeric.plot.
Package edu.rit.pj2 contains Parallel Java 2 (PJ2), an API and middleware for parallel programming in 100% Java on multicore parallel computers, cluster parallel computers, supercomputing grids, and cloud computing services.
Package edu.rit.pj2.example contains example programs illustrating how to do parallel programming with the Parallel Java 2 Library.
Package edu.rit.pj2.test contains unit test programs for the classes in package edu.rit.pj2.
Package edu.rit.pj2.tracker contains classes for the Parallel Java 2 (PJ2) Tracker and related classes.
Package edu.rit.pj2.tuple contains general-purpose subclasses of class Tuple.
Package edu.rit.pj2.vbl contains general-purpose reduction variable classes that implement interface Vbl.
Package edu.rit.pjmr contains Parallel Java Map Reduce (PJMR), a simple parallel map-reduce framework built on top of Parallel Java 2.
Package edu.rit.pjmr.example contains example programs using Parallel Java Map Reduce (PJMR) a simple parallel map-reduce framework built on top of Parallel Java 2, in package edu.rit.pjmr.
Package edu.rit.pjmr.util contains general utility classes and programs for Parallel Java Map Reduce (PJMR) in package edu.rit.pjmr.
Package edu.rit.sim contains classes for discrete event simulation.
Package edu.rit.swing contains GUI components designed to work with Java Swing.
Package edu.rit.util contains general utility components.
Package edu.rit.util.test contains unit test programs for classes in package edu.rit.util.
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 firstname.lastname@example.org. I regret that I am unable to provide technical support, specific installation instructions for your system, or advice about configuring your parallel computer hardware.
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.
There are two versions of the PJ2 distribution, 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. 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. 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). 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 single 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.
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:
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.
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.
The documentation files, Java source files, Java class files, and C source files in the Parallel Java 2 Library ("PJ2") are copyright © 2013–2019 by Alan Kaminsky. All rights reserved. For further information, contact the author, Alan Kaminsky, at email@example.com.
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.
In package edu.rit.io: Changed classes InStream and OutStream to implement interface AutoCloseable; this allows InStreams and OutStreams to be managed by the try-with-resources statement. In class InStream: Fixed a bug in the readReference() method; objects were not deserialized properly if they contained circular references to each other. As part of this bug fix, class OutStream's writeReference() method and class InStream's readReference() method now support writing and reading only Streamable objects, not Serializable objects.
In package edu.rit.util: Changed the writeOut() and readIn() methods in all the data structure classes to use writeReference() to write the objects in the data structures and to use readReference() to read the objects, instead of writeObject() and readObject(). This preserves object graphs when streaming data structures containing objects. As a consequence, the formats of streamed data structure objects changed. In particular, the formats of messages between the Tracker, Launcher, Job, and Backend changed.
In package edu.rit.util: Changed the implementation of class BitSet to avert false sharing in multithreaded programs; consequently, the streamable representation of class BitSet was changed. Changed the implementation of class RandomSubset to avert false sharing in multithreaded programs.
In package edu.rit.pj2.example: Changed the minimum vertex cover programs and the Hamiltonian cycle programs; they now obtain the graph from a graph spec object rather than from a file; common data structures were factored out into separate classes. Added classes AMGraph, AMGraph64.
In package edu.rit.util: Added interface GraphSpec; this lets a program obtain a graph from a "graph spec" object. Added class RandomGraph; this is a graph spec object for a random graph.
In package edu.rit.util.test: Added class PrintGraph, a program that prints a graph given a graph spec.
Changed the ScalePlot program to compute both the sequential fraction and the weak sequential fraction.
Fixed a bug in class edu.rit.numeric.Cubic; in one case the wrong formula was used to compute the roots. Thank you to James Eggleton for discovering the bug.
In class edu.rit.util.IntSet: Changed the clear() and saturate() methods to first put the internal data structure back into the state initially established by the constructor. Added the element() and nonElement() methods.
In classes edu.rit.util.BitSet, BitSet32, and BitSet64: Added the nextElement() and toArray() methods.
In package edu.rit.numeric: Added class XYSeries.Fit. Added method linearFit() to class XYSeries. Added class XYZSeries.Fit. Added method linearFit() to class XYZSeries. Classes XYSeries.Regression, XYSeries.Fit, XYZSeries.Regression, and XYZSeries.Fit now implement interface Function.
Fixed a bug in class edu.rit.draw.item.Text; superscripts and subscripts were not drawn properly in the middle of a text string.
In class edu.rit.gpu.Gpu: Added the setThreadStackSize(), getThreadStackSize(), setPrintfFifoSize(), getPrintfFifoSize(), setMallocHeapSize(), and getMallocHeapSize() methods.
In class edu.rit.pj2.tracker.JobReceiver: Fixed a bug; the code for receiving one of the messages did not match the code for sending that message.
In class edu.rit.io.InStream: Changed the code in the methods for reading arrays; the new code is functionally equivalent to but slightly faster than the old code.
In package edu.rit.pj2.vbl: Added class IntArrayVbl.
In class edu.rit.gpu.Gpu: Added the getDeviceNumber() and getDeviceName() methods.
In enumeration edu.rit.pj2.Debug: Added the gpu enumeral; if turned on, when a Gpu object is created, information about the GPU is printed.
Changed the compile scripts for CUDA source files.
In package edu.rit.pj2.vbl: In each reduction variable class, added a reduce() method with an argument whose type is that of the reduction variable's item.
In package edu.rit.util: Added the randomNonElement() method to classes BitSet, BitSet32, and BitSet64.
In package edu.rit.gpu.example: Changed the GPU kernel compilation script to generate device-independent .ptx files. Changed all the example Java programs to load GPU kernel modules from .ptx files.
In package edu.rit.pjmr.example: Added classes Nola911 and Nola911Block for a map-reduce job that analyzes a 911 call record data set from the City of New Orleans.
In package edu.rit.draw.item: Added the hsb() method to class ColorFill.
In package edu.rit.pjmr: Clarified documentation. Changed generic parameter names and method argument names. The changes are backwards compatible with existing code.
In package edu.rit.pj2: Added the terminate() method to class Job and class Task. Changed the semantics of the TerminateException; throwing it causes the job or task to terminate without printing an exception stack trace; an exit code to be returned to the operating system is specified as a constructor argument. Code in a job or task should call terminate() rather than System.exit(); calling the latter screws up the Parallel Java 2 middleware. Changed all the example programs to call the new terminate() method where necessary.
In package edu.rit.util: Added the searchUnsorted(), searchSorted(), searchInterval(), and sort() methods to class AList. Removed the AList searching methods from class Searching, and removed the AList sorting methods from class Sorting; use the new methods in class AList instead.
In class edu.rit.util.Instance: Changed the procedure whereby the newInstance() method chooses an appropriate constructor; the new procedure allows argument values of type int, long, and String in the same constructor expression; the new procedure supports a final varargs argument of type int, long, and String.
In class edu.rit.util.Instance: The newInstance() methods now support arguments of type int, long, or String and integer values expressed in binary, octal, decimal, or hexadecimal.
In package edu.rit.numeric.plot: Fixed bugs in class Plot; the automatic axis scaling sometimes threw an exception.
Changed class edu.rit.pj2.Job: If the trackerHost property is set to "none", the job will not try to connect to the Tracker. This can also be specified on the pj2 command line with the option tracker=none. On some operating systems (notably Windows), if the Tracker is not running when a job tries to connect to the Tracker, the job is delayed until the connection attempt times out. Specifying tracker=none works around this issue. On other operating systems (notably Ubuntu Linux), this issue does not arise, and tracker=none need not be specified.
In package edu.rit.pjmr.util: Fixed a bug in class ScatterFiles; files were not distributed to backend nodes such that the total file size on each node was about the same.
In package edu.rit.pjmr.example: Changed the web log analysis programs WebLog01 through WebLog04 to include an optional pattern argument that limits the analysis to log entries that match the pattern. Added programs WebLog05 and MaxTemp01.
In package edu.rit.pj2.vbl: Changed classes DoubleVbl.Mean and FloatVbl.Mean: Added a constructor with a value argument; changed the accumulate() method to return a reference to this shared variable.
In package edu.rit.pj2.example: Added programs HamCycSeq, HamCycSmp, and HamCycClu to find a Hamiltonian cycle in a graph; the latter two use the parallel work queue pattern on a single multicore node and on a cluster, respectively.
In package edu.rit.util: In classes BitSet32, BitSet64, and BitSet: Added method randomElement().
In package edu.rit.numeric: Added class Histogram.
In package edu.rit.pj2.vbl: Changed bitset reduction variable classes BitSetVbl, BitSet32Vbl, and BitSet64Vbl to be tuples wrapping instances of classes BitSet, BitSet32, and BitSet64, respectively. Changed histogram reduction variable class HistogramVbl to be a tuple wrapping an instance of class Histogram.
In package edu.rit.pj2.example: Changed the minimum vertex cover example programs to use the new bitset classes and the new bitset reduction variable classes. Changed the statistical test example programs to use the new histogram class and the new histogram reduction variable class.
In class edu.rit.util.Random: Added method nextBigInteger().
In class edu.rit.util.Searching: Added methods to search just a portion of an array; added convenience methods to search an array in ascending order; added methods to search lists.
In class edu.rit.util.Sorting: Added methods to sort just a portion of an array; added convenience methods to sort an array into ascending order; added methods to sort lists.
Fixed a bug in class edu.rit.util.BitSet; the private fields were not initialized correctly in all cases. Thank you to Vaibhav Gandhi for discovering the bug.
In class edu.rit.numeric.Mathe: Added the logBinomProb(), binomProb(), and cumulBinomProb() methods.
In package edu.rit.util: Added searchInterval() methods to class Searching.
In package edu.rit.io: Added writeObjectArray() and writeReferenceArray() methods to class OutStream. Added readObjectArray() and readReferenceArray() methods to class InStream.
Added package edu.rit.pj2.tuple with several tuple subclasses. The Tuple base class remains in package edu.rit.pj2.
Added package edu.rit.pj2.vbl. Moved the reduction variable classes from package edu.rit.pj2 to package edu.rit.pj2.vbl. The Vbl interface remains in package edu.rit.pj2. Added classes BitSetVbl, BitSet32Vbl, BitSet64Vbl.
Changed classes throughout the Library to use the above classes.
In package edu.rit.pjmr: Added the toString(), equals(), and hashCode() methods to class TextId. Added the noMatchIsError() method to class TextDirectorySource.
In package edu.rit.pjmr.example: Added program Concordance04.
Fixed a bug in class edu.rit.pj2.tracker.Tracker; if there was a problem with an incoming socket connection to the Tracker's HTTP server, the Tracker could freeze, causing heartbeats to fail and jobs to terminate. Also, changed the Tracker's summary web page URL to http://host:port/summary; consequently, the Tracker will not respond with status information if a client requests the default home page; this is to fend off web crawlers.
In package edu.rit.pj2.example: Fixed a bug in class MineCoinClu3; the StopTuple class did not override the writeOut() and readIn() methods. Changed the continuous cellular automaton programs and the Mandelbrot Set programs to turn on world read and write permissions for the output files. Changed the ZombieClu program to simplify the tuple subclasses.
In package edu.rit.pj2: Added documentation to class Tuple emphasizing that tuple objects are assumed to be immutable. Changed class Job; when putting multiple copies of a tuple into tuple space, the job puts multiple references to the tuple rather than multiple clones of the tuple; this is safe because tuples are assumed to be immutable. Changed the tuple space implementation in class TupleSpace; eliminated separate lists of tuples for each tuple subclass.
In package edu.rit.pj2.tracker: Changed class Proxy to turn on the TCP_NODELAY option for all socket connections; this allows interprocess messages to be sent more quickly and reduces the running time of tightly coupled cluster parallel programs.
In package edu.rit.pj2.example: Added a steps command line argument to the ZombieSeq, ZombieSmp, and ZombieClu programs. Added class CCACell. Changed the CCASeq, CCASmp, and CCAClu programs to use class CCACell. Added class MandelbrotClu.
In package edu.rit.pj2.example: Added program MinVerCovDist.
In package edu.rit.numeric: Added several methods to class Mathe. Added class NormalFit.
In package edu.rit.pj2.example: Tweaked programs MinVerCovSeq and MinVerCovSmp. Added programs MinVerCovSeq2, MinVerCovSmp2, MinVerCovSeq3, and MinVerCovSmp3. These solve the minimum vertex cover problem in various ways.
In package edu.rit.io: Added class ThreadedOutputStream, which automatically synchronizes multiple threads writing to an underlying output stream.
In package edu.rit.pj2: Changed class Job and class Task to use a ThreadedOutputStream when printing to System.out and System.err. The printouts actually appear on the console when the job or task terminates; to make the printouts appear earlier, call System.out.flush() or System.err.flush(). Eliminated the no-longer-needed class Print.
In package edu.rit.gpu: Added the ability to work with C struct data types; see classes Struct, GpuStructVbl, and GpuStructArray. In package edu.rit.gpu.example: Added program Powers to illustrate the use of C struct data types in Java GPU parallel programs.
In package edu.rit.pj2.example: Added programs RandomGraph, MinVerCovSeq, and MinVerCovSmp, which find a minimum vertex cover of a graph via exhaustive search.
In package edu.rit.util: Added class PriorityQueue. In package edu.rit.sim: Changed classes Event and Simulation to use class PriorityQueue.
Added protected static methods to class edu.rit.pj2.Task that can optionally be overridden to specify the initial threads, schedule, chunk, nodeName, cores, and/or gpus properties for all instances of the Task subclass.
In class edu.rit.pj2.tracker.Tracker: Added support for allocating GPU devices to tasks. As a consequence, the message format is now incompatible with earlier versions of the Library.
In class edu.rit.numeric.Mathe: Added the log2() method.
In class pj2: Two command line options are now named masterSchedule and masterChunk rather than workerSchedule and workerChunk.
Added class edu.rit.numeric.Int96. Removed classes edu.rit.util.Range and edu.rit.util.LongRange; these were replaced by classes edu.rit.pj2.Chunk and edu.rit.pj2.LongChunk.
For multicore parallel programming in package edu.rit.pj2: Added the "proportional" enumeral to enum Schedule. Added classes Chunk, LongChunk, DoubleVbl.Mean, and FloatVbl.Mean. Rewrote the parallel for loop classes to partition the loop iterations using the new Int96 class instead of java.math.BigInteger. To avert false sharing between different threads' thread-local variables, added hidden padding fields to class LoopBody, all the Vbl subclasses, and classes edu.rit.crypto.RC4, edu.rit.crypto.SHA256, and edu.rit.util.Random.
For cluster parallel programming in package edu.rit.pj2: The syntax for specifying rules in a job was simplified. The default number of cores a task requires is now all cores on the node, rather than one core. There are now methods for specifying the nodeName, cores, gpus, workers, workerSchedule, and workerChunk properties of tasks and jobs, and those properties can now be specified on the pj2 command line; see classes Job, Rule, TaskSpec, and Task for further information. In a task launched by an on-demand rule, the methods for getting the matching tuples that caused the rule to fire are now matchingTupleCount() and getMatchingTuple(). In a task launched by a start rule or a finish rule, there are no matching tuples; the task can still take or read tuples by calling takeTuple(), tryToTakeTuple(), readTuple(), or tryToReadTuple(). Added methods for master-worker cluster parallel for loops; see Job.masterFor() and Task.workerFor().
In package edu.rit.io: Removed classes DataInputStream, DataOutputStream, and SerializedObject. Added classes/interfaces Streamable, InStream, and OutStream. These implement a lightweight binary I/O and object I/O capability as a replacement for Java Object Serialization. Updated classes throughout the Parallel Java 2 Library to use the new Streamable capability. As a consequence, the message format is now incompatible with earlier versions of the Library.
Class edu.rit.pj2.Tuple now implements interface Streamable. As a consequence, all subclasses of class Tuple now must include a no-argument constructor and must override the writeOut() and readIn() methods to write and read the tuple's fields. If this is not done, tuples will not transfer between processes correctly.
In package edu.rit.pj2.example: Added programs ZombieSeq, ZombieSmp, and ZombieClu.
In the unnamed package: Removed programs StrongPlot and WeakPlot; these were replaced by program ScalePlot.
In package edu.rit.pj2: The parallel for loop body classes were refactored. Class Loop is the body for an integer parallel for loop; class LongLoop is the body for a long integer parallel for loop; class ObjectLoop is the body for an iterator parallel for loop; these all extend a common LoopBody base class. This change improves the compile time type safety of the loop body classes and eliminates a bug where the iterator parallel for loop body's run() method could not be overridden properly. However, this requires changing programs with long integer parallel for loops to use class LongLoop instead of class Loop, and changing programs with iterator parallel for loops to use class ObjectLoop instead of class Loop. Also, made the threadLocal() method a generic method; this eliminates the need to downcast the return value.
In package edu.rit.pj2: Changed all the shared variable classes to extend class Tuple and to define the toString() method. Added class StringVbl. Added the parallelDo(int,Section) method to class Task; this executes a number of copies of the same section in parallel.
In package edu.rit.io: Added class SerializedObject. In package edu.rit.pj2.tracker: Changed the backend, job, launcher, and tracker sender and receiver classes to use DataInputStream and DataOutputStream with class SerializedObject, rather than ObjectInputStream and ObjectOutputStream. This fixed an intermittent bug where an end-of-file was encountered in the middle of a message. However, the message format is now incompatible with earlier versions of the Library.
In package edu.rit.pj2.example: Changed class PiClu to a hybrid parallel program. Added classes BCAClu, BCASmp, and TotientClu.
In class edu.rit.pj2.Tracker: Added the time each job has spent waiting or running on the Tracker's web interface summary page.
In package edu.rit.pj2.example: Added class MineCoinClu3.
In package edu.rit.pj2: Changed class Vbl to an interface. Eliminated class ObjectVbl; to do parallel reduction on an object, write a class that implements interface Vbl. This change eliminates a layer of indirection and simplifies programs involving parallel reduction on objects.
In package edu.rit.util: In class Packing: Added methods to pack and unpack short integers to integers, short integers to long integers, and integers to long integers.
In package edu.rit.crypto: Added classes/interfaces CipherInputStream, CipherOutputStream, RC4, and StreamCipher.
In package edu.rit.pj2: In class Job: Fixed a bug; printouts on the standard output or standard error from tasks in other nodes were not synchronized properly. In class Task: Changed the putTuple(int,Tuple) method; the number of copies is now the first argument.
In package edu.rit.swing: Added a "PNG Setup" dialog to class DisplayableFrame that lets the user specify scale factor and resolution when saving a PNG file. As a consequence, the View program (in the unnamed package) now writes PNG files with a user-selectable scale factor and resolution.
In package edu.rit.image: Added the ability to specify the physical pixel dimensions in the PNG image writer classes.
In class edu.rit.swing.DisplayableIO: Added the ability to specify the physical pixel dimensions in the PNG image writing methods. As a consequence, the View program (in the unnamed package) now writes PNG files at a resolution of 300×300 pixels per inch.
Added package edu.rit.crypto with classes/interfaces HashFunction and SHA256.
In package edu.rit.pj2: Added class TerminateException. Code in a job or task must not call System.exit(); rather, it should throw a TerminateException or another runtime exception to terminate the program.
In package edu.rit.pj2.example: Changed the Totient programs to use class LongList. Changed the MineCoin programs to use class SHA256. Changed all the programs to exit by throwing an IllegalArgumentException if the command line arguments are bad.
In package edu.rit.pj2.tracker: Changed class Launcher; the command that launches the JVM can now include arguments after the command name.
Copyright © 2013–2018 by Alan Kaminsky. All rights reserved. Send comments to firstname.lastname@example.org.