Parallel Cartographic Modeling
Parallel Cartographic Modeling. Kiumars Soltani 6th July 2012 . Outline. Rethinking Euclidean distance and direction calculations. The timing method Run the code on Trestles Profiling. Euclidean Direction and Distance. Sequential version was faster than the parallel version. Remember?
Parallel Cartographic Modeling
E N D
Presentation Transcript
Parallel Cartographic Modeling Kiumars Soltani 6th July 2012
Outline • Rethinking Euclidean distance and direction calculations. • The timing method • Run the code on Trestles • Profiling
Euclidean Direction and Distance • Sequential version was faster than the parallel version. Remember? • Some calculations are time consuming
Euclidean Direction and Distance • There are others expression in the code(particularly Euclidean Distance & Direction calculation function) that can be improved in the same way. • This can be considered as a general approach during the development of the DSL: • We have to avoid redundant calculation • We have to use the fastest possible method to achieve the result.
Change the Timing Method Using Linux’s own method of timing struct timeval tv1,tv2; double diff; gettimeofday(&tv1,NULL); // THE SECTION THAT WE WANT TO TIME gettimeofday(&tv2,NULL); diff = (tv2.tv_sec - tv1.tv_sec) * 1000.0; // sec to ms diff += (tv2.tv_usec - tv1.tv_usec) / 1000.0; // us to ms
It’s all part of the input Change the way program get the input file and parameters ./model1.out INPUT_FILE #rows #columns #cores This way we can test the program with different input files and different number of available cores by running one script.
Running the codes on Trestles • One node -> 32 cores • Using Intel C Compiler REMINDER Model 1 is solving the loop-carried dependency by defining critical sections. Model 2 is solving the loop-carried dependency by loop interchanging. The main part of the Model 2 is now using static scheduling with the chunk size 1.
Check the Result Model 1 Model 2
Future improvements • Improving the profiling approach • Rethinking the Euclidean distance and direction calculations method. • Summarizing the computations • Investigating the underlying reason that makes the parallel version not efficient. • Change the scheduling of the model 1.
Thank You! Got Question?