Project

General

Profile

Cleanup #1315

examples/charm++/jacobi*d are non-exemplary HPC code, using nested arrays

Added by Phil Miller over 2 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
11/28/2016
Due date:
% Done:

0%


Description

      // allocate a three dimensional array
      temperature = new double**[blockDimX+2];
      new_temperature = new double**[blockDimX+2];
      for(int i=0; i<blockDimX+2; i++)
      {
        temperature[i] = new double*[blockDimY+2];
        new_temperature[i] = new double*[blockDimY+2];
        for(int j=0; j<blockDimY+2; j++)
        {
          temperature[i][j] = new double[blockDimZ+2];
          new_temperature[i][j] = new double[blockDimZ+2];
        }
      }

This is exactly what we would tell people not to do if we saw it in application code that was getting poor performance. Why do we have examples which do exactly that?

History

#1 Updated by Phil Miller over 2 years ago

  • Description updated (diff)

#2 Updated by Eric Bohm over 2 years ago

  • Tracker changed from Bug to Cleanup

#3 Updated by Eric Bohm about 1 year ago

  • Assignee set to Juan Galvez

Assigning to Juan for eventual reassignment to interns or newer junior students as this seems like a worthy learning curve task.

Also available in: Atom PDF