OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-CompactHash / README

110 lines · text ref:
Compact Hash Algorithms for Computational Meshes: Data from Neighbors 2D Testbed 

This code is a set of hash functions applied to a sample mesh. It supports the paper "Compact Hash Algorithms for Computational Meshes," submitted to the SIAM Journal of Scientific Computing.

Authors:

Bob Robey XCP-2 (brobey@lanl.gov)
Peter Ahrens XCP-2 (peter.ahrens@lanl.gov, ptrahrens@gmail.com)
Sara Hartse XCP-2 (sara@lanl.gov, sara.hartse@gmail.com)
Rebecka Tumblin (rtumblin@lanl.gov, rebeckatumblin@gmail.com)

On a machine with at least one OpenCL compliant device:

Enter the 'parallel_hash' directory

   ./configure
   make 
   ./neigh2d -o <trial options>

Configure options
   --enable-detailed-timing
   --disable-write-mem-usage

=================================================================
Builds with and without OpenCL
=================================================================
By default, OpenCL is included in the build. This can be problematic
on some architectures. If OpenCL is not found, it will try to complete
the build without it and only the CPU routines will be available. You can
build without OpenCL with a configure option:

./configure --enable-opencl=no 
   or
./configure --disable-opencl

If you want OpenCL in the build and the location of the OpenCL library
is causing the problem, try setting the environment variables OPENCL_INCLUDE
and OPENCL_LIBS to the locations of these files. 

If the build fails, you may have to go into the hash subdirectory
and force hash.c and hash.h to rebuild. Try "make hash.c hash.h" or
remove the hash.c and hash.h files and make them. 
=================================================================


On Mac OSx install gnu-indent. The Mac version does not recognize some of the options that are used.

'./neigh2d -h' gives further information on option keywords.

The option -r randomizes the cell data (default is not random)
The option -n sets the min mesh size and -N the max mesh size [ default is 256 min to 256 max ]
The option -l sets the min levmx     and -L the max levmx     [ default is 1 min to 5 max ]

The -t option refers to threshold for refinement of cells and can range from 1 to 100. Cells
are randomly refined and a lower threshold means fewer will be refined. The default value
is 20 and that was what was used in most of our trials.

The keywords for corresponding options are as follows:

br    Brute
kd    kdtree
hc    Hash CPU
hlc   Hash Lib CPU
hc1   Hash CPU 1
hlc1  Hash Lib CPU 1
hc2   Hash CPU 2
hlc2  Hash Lib CPU 2
hc3   Hash CPU 3
hlc3  Hash Lib CPU 3
holc3 Hash OldLib CPU 3
hg    Hash GPU
hg1   Hash GPU 1
hg2   Hash GPU 2
hg3   Hash GPU 3
hlg   Hash Lib GPU
hlg1  Hash Lib GPU 1
hlg2  Hash Lib GPU 2
hlg3  Hash Lib GPU 3
holg3 Hash OldLib GPU 3
  
Our figures:

Memory optimizations figure (each run on a Kepler)
Use the -r randomization flag
hg
hg1
hg2
hg3
holg3

Compact versus perfect figure (run on various cards)
with and without the -r randomization flag
./neigh2d -r -t 2 -L 6 -o hg3 hlg3 and ./neigh2d -t 2 -L 6 -o hg3 hlg3
hg3 
holg3

Table construction (each run on Kepler)
No randomization of cell data in adaptiveMeshConstructorWi -- don't use -r
hc
hg
holg3

Output file features:

Hardware detection report - an overview of the CL devices and their information
Local work size - the size of the workgroup size
Size - side length of mesh at coarsest level 
ncells - total number of cells, accounting for refined cells
compression - The number of possible cells at most refined level/ncells