sstsimulator / sst-macro

SST Macro Element Library
http://sst-simulator.org/
Other
34 stars 41 forks source link

S2S automatic includes should depend on the mode. #509

Closed calewis closed 4 years ago

calewis commented 4 years ago

The following program:

int main(){
  constexpr int size = 100;
  int array[size];
#pragma omp parallel for
  for(auto i = 0; i < size; ++i){
    array[i] = i;
  }

  return array[49];
}

is 17 lines long when prepossessed without the extra sst includes and is ~65k lines long when compute.h, skeleton.h, and cstdint are force included. We should avoid bringing these headers in unless they are needed. These are needed for skeletonization, but not for memoization.

jjwilke commented 4 years ago

How do we distinguish between files that need to include and files that don't?

calewis commented 4 years ago

Well I don't believe we need compute.h or skeleton.h for memoization passes. So I think we should specialize the forced includes depending on which pass is run. @jjwilke

jjwilke commented 4 years ago

Okay, that makes sense. I'm going to change the name of the issue.

calewis commented 4 years ago

Sounds good

calewis commented 4 years ago

After looking at sstcclib.py and the include files, I think we need a better separation of build pipelines. We should move towards sst++ supporting different modes internally. That would make it easier to extend to other things such as shadows and puppets in the future. Right now sstcclib.py is hard to follow because the logic for what it is going to do is spread out quite a bit.

jjwilke commented 4 years ago

This has been done.