The OdinMP/CCp Source Code

Requirements

To build OdinMP/CCp from source, you need:

Unpacking the OdinMP/CCp Source Code Archive

The odinmp-1.0-src.tar.gz archive will, when unpacked, create a directory called 'odinmp', populated with the files necessary to build OdinMP/CCp.
OdinMP/CCp is implemented as a set of classes in the 'se.lth.dit.odinmp' package and its subpackages. This means that, in order to successfully compile the java code, the java source files must be in a directory 'se/lth/dit/odinmp' beneath a directory that is in your Java Class Path, usually identified by the CLASSPATH environment variable. For instance, if your CLASSPATH is set to include a directory named 'java' in your home directory, you would create the directory
your-home-directory/java/se/lth/dit, and then unpack the OdinMP/CCp source archive in this location - generating the directory your-home-directory/java/se/lth/dit/odinmp, which is exactly what the Java compiler expects.

Code Layout

These files are included in the distribution:
 
c.jtb The Java Tree Builder / JavaCC grammar for C with OpenMP directives
OdinMP.java The Java language source file for the OdinMP class, which implements the OdinMP main program
*ConstructDescriptor.java The various OpenMP Construct descriptor classes
*ClauseHandler.java Classes which handle clauses on constructs
Decl.java Classes used to parse a part of a Declaration
Symbol.java Class to hold information about a Symbol
SymbolTable.java A Class to hold a table of Symbols
OmpSymbolAttributes.java The class that handles symbols with OpenMP attributes (shared, private, reduction, ...)
IncrementalReader.java Reads files in increments, used for generating code
Spacing.java Class that helps OdinMP/CCp generate slightly less ugly code
SymbolFetcher.java An interface between ClauseHandlers and the DataBuildingVisitor (see below)
OdinMP.in, odinmp_prep.in,
cppp.in, ccc.in
Source files for the OdinMP, odinmp_pre, cppp and ccc programs
dodebug.pl, nodebug.pl Perl scripts which comment out / in the print statements to debug the OdinMP/CCp classes
visitor/DataBuildingVisitor.java The visitor that builds the internal data from the node tree generated by the parser
visitor/* Supporting classes for the DataBuildingVisitor
makefile The makefile (for GNU make) that builds the whole system
supporting/* Supporting C language files used by OdinMP/CCp when generating code

Building OdinMP/CCp

To build OdinMP/CCp, stand in the unpacked source directory (dir-in-classpath/se/lth/dit/odinmp), make certain that you have all the necessary tools (as mentioned above) in your search path, and simply give the command 'make' (or 'gmake', if you have GNU make installed under that name). This will use JTB to create the syntax tree classes from c.jtb as well as create a tree-building grammar, jtb.out.jj. JavaCC will then work on that to generate the C Parser and supporting classes. Finally, all Java classes will be compiled together.

To install the resulting system, use 'make INSTALLDIR=install-root/odinmp install'. This will install OdinMP/CCp in the install-root/odinmp directory, ready to use.

To create a gzipped tar archive of the installation package, use 'make package'. This will generate the file 'odinmp-1.0.tar.gz' in the OdinMP/CCp source code directory.