Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
MPI+CUDA implementation of sharpening kernel on Chandra X-Ray satellite data (NASA open source)
Python C
tree: d773fb54d8

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


Danny Gibbs
Harvard-Smithsonian Center for Astrophysics 

Christopher Lee
Harvard University 

CS 205 
Computing Foundations for Computational Science
Final Project
4 December 2011

Project Title:
Parallelized Adaptive Smoothing for Chandra X-Ray Observatory Datasets

Our project consists of several parts:
1. Data
	The input png files are included in the XXXXXX directory
2. Serial Implemenation
	a) Output normalized by sum
		File Name: ""
	b) Output normalized by weighted sum
		File Name: ""
3. GPU Implemenation
	a) Global Memory
		File Name: ""
	b) Shared Memory
		File Name: ""
4. MPI Implementation
	File Name: ""


	For our project we chose to use Python for our implementation.  
	For Python installation instructions, please visit:

	Python Modules:
	Throughout our project we used several Python Modules:
	These modules are addressed by installing SciPy, for instructions on installing
	SciPy please visit:

	In order to achieve our parallel computational needs, install the following:

1. Data
	The included data sets contain the following Chandra Observations
	a. OBSID 114 - CAS A (
	b. OBSID 7417 - Cluster in NGC 2071
	c. OBSID 321 - NGC 4472 = M49 (Galaxy in Virgo)
	d. OBSID 11759 - J0417.5-1154 (Strong lensing cluster)

2. Serial Implemenation
	How To Run
	In order to run the serial version we ended up having to hard code some of the user defined values as there seemed to be an issue reading in command line arguments on the Resonance Cluster.
So near the top of the file is the 'file_name' variable we use to to specify which image we wish to run through the algorithm.
We then have our 'Threshold' and 'MaxRad' variables. These are the user defined variables that specify the value of the pixels in the created box, Threshold, and the maximum size box to attempt to reach the threshold value, MaxRad.
The output image is created in the same directory as the input image. We remove the extension of the input file and then append '_smoothed_serial.png' to name.
While running our program on the Resonance cluster from the command line:
%: gpu-login
%: cd to base directory of our project
%: python 

3. GPU Implementation
	How To Run

    Aforementioned Threshold and MaxRad parameters apply in GPU version. Change Debug flag to 0 or 1 to produce gpu_output.txt to compare with serial_output.txt. Relative error is outputted in rel_error.txt. Make sure all file locations are correct.

%: gpu-login 
%: module load packages/pycuda/2011.1.2
%: python			# to run global memory
%: python				# to run shared memory

4. MPI Implementation
	How To Run

%: mpiexec -n 5 python	# to run MPI/CUDA
%: python rel_error                         # to check for error
Something went wrong with that request. Please try again.