Skip to content

nicku33/dbcourse-p2

Repository files navigation

README file for W4112 Homework 2


Question 1
==========
To build, run "make splashapp" which will create an executable called 'splash'. This has been tested on the CLIC lab machines.
It can be called as given in the instructions, but use ./splash, obviously, since it's not on the $PATH.

Question 2 (simd_probe.c)
=========================

To build, run "make probeapp" which will create an executable called 'probe'. This has also been tested on the CLIC machines. Note that while it accepts the parameters from the dump file, it is hard coded to for B=4 and h=2. Note we found it necessary (if you look at the makefile) to hard code the path to the math.o library. If you are running on a different machine, you may have to adjust that or leave it out.

If you would like to relate our code to the diagram in the paper please see SIMD.pdf which is annotated with our variable names.


TEST SCRIPT
===========
Note we also have an automated test script (run with ‘./test.sh’) which generates probe and input data, runs against Q1, Q2 and compares the result files. In tests on the CLIC machines, we have seen identical output. If not, diff will dump out the differences. 


A note about our implementation of random.
=========================================
On our local computers we used the std::random available with C++11 to overcome the problems with uniformity and rand(). (Google 'rand considered harmful'). However on the CLIC machines we get segmentation faults inside the standard library that we did not get on local machines.
 
(gdb) frame
#0  0x00000000004046e8 in std::uniform_int_distribution<int>::param_type::param_type (this=<error reading variable: Cannot access memory at address 0x7fffff7feff8>,
    __a=<error reading variable: Cannot access memory at address 0x7fffff7feff4>, __b=<error reading variable: Cannot access memory at address 0x7fffff7feff0>)
    at /usr/include/c++/4.6/bits/random.h:1627

As such we reverted our implementation to use srand() and rand().

About

Shared class work

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published