Skip to content

Commit

Permalink
Merge pull request #1063 from sstsimulator/devel
Browse files Browse the repository at this point in the history
Automatically Merged using SST Master Branch Merger
  • Loading branch information
sst-autotester authored Jun 13, 2018
2 parents 47ff24a + f19fbcf commit 89ef8b0
Show file tree
Hide file tree
Showing 47 changed files with 985 additions and 655 deletions.
2 changes: 0 additions & 2 deletions src/sst/elements/ariel/api/arielapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#ifndef _H_ARIEL_CLIENT_API
#define _H_ARIEL_CLIENT_API

#include "arielapi.c"

void ariel_enable();
void ariel_fence();

Expand Down
11 changes: 9 additions & 2 deletions src/sst/elements/ariel/arielcore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ ArielCore::ArielCore(ArielTunnel *tunnel, SimpleMem* coreToCacheLink,
statWriteRequestSizes = own->registerStatistic<uint64_t>( "write_request_sizes", subID );
statSplitReadRequests = own->registerStatistic<uint64_t>( "split_read_requests", subID );
statSplitWriteRequests = own->registerStatistic<uint64_t>( "split_write_requests", subID );
statFlushRequests = own->registerStatistic<uint64_t>( "flush_requests", subID);
statFenceRequests = own->registerStatistic<uint64_t>( "fence_requests", subID);
statNoopCount = own->registerStatistic<uint64_t>( "no_ops", subID );
statInstructionCount = own->registerStatistic<uint64_t>( "instruction_count", subID );
statCycles = own->registerStatistic<uint64_t>( "cycles", subID );
Expand Down Expand Up @@ -213,6 +215,7 @@ void ArielCore::commitFlushEvent(const uint64_t address,
pendingTransactions->insert( std::pair<SimpleMem::Request::id_t, SimpleMem::Request*>(req->id, req) );

cacheLink->sendRequest(req);
statFlushRequests->addData(1);
}
}

Expand Down Expand Up @@ -257,8 +260,11 @@ void ArielCore::stall() {

void ArielCore::fence(){
ARIEL_CORE_VERBOSE(4, output->verbose(CALL_INFO, 4, 0, "Core: %" PRIu32 " FENCE: Current pending transaction count: %" PRIu32 " (%" PRIu32 ")\n", coreID, pending_transaction_count, maxPendingTransactions));
isFenced = true;
isStalled = true;

if( pending_transaction_count > 0 ) {
isFenced = true;
isStalled = true;
}
}

void ArielCore::unfence()
Expand Down Expand Up @@ -721,6 +727,7 @@ void ArielCore::handleFenceEvent(ArielFenceEvent *fEv) {
fence();
// Possibility B:
// commitFenceEvent();
statFenceRequests->addData(1);
}

void ArielCore::printCoreStatistics() {
Expand Down
3 changes: 3 additions & 0 deletions src/sst/elements/ariel/arielcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ class ArielCore {

Statistic<uint64_t>* statReadRequests;
Statistic<uint64_t>* statWriteRequests;
Statistic<uint64_t>* statFlushRequests;
Statistic<uint64_t>* statFenceRequests;
Statistic<uint64_t>* statReadRequestSizes;
Statistic<uint64_t>* statWriteRequestSizes;
Statistic<uint64_t>* statSplitReadRequests;
Expand All @@ -173,6 +175,7 @@ class ArielCore {
Statistic<uint64_t>* statFPSPScalarIns;
Statistic<uint64_t>* statFPSPOps;


uint64_t pending_transaction_count;

};
Expand Down
2 changes: 2 additions & 0 deletions src/sst/elements/ariel/arielcpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ class ArielCPU : public SST::Component {
{ "split_read_requests", "Statistic counts number of split read requests (requests which come from multiple lines)", "requests", 1},
{ "split_write_requests", "Statistic counts number of split write requests (requests which are split over multiple lines)", "requests", 1},
{ "no_ops", "Statistic counts instructions which do not execute a memory operation", "instructions", 1},
{ "flush_requests", "Statistic counts instructions which perform flushes", "requests", 1},
{ "fence_requests", "Statistic counts instructions which perform fences", "requests", 1},
{ "instruction_count", "Statistic for counting instructions", "instructions", 1 },
{ "max_insts", "Maximum number of instructions reached by a thread", "instructions", 0},
{ "fp_dp_ins", "Statistic for counting DP-floating point instructions", "instructions", 1 },
Expand Down
2 changes: 1 addition & 1 deletion src/sst/elements/cassini/palaprefetch.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PalaPrefetcher : public SST::MemHierarchy::CacheListener
"cassini",
"PalaPrefetcher",
SST_ELI_ELEMENT_VERSION(1,0,0),
"Prefetcher",
"Stride Prefetcher [Palacharla 1994]",
"SST::Cassini::CacheListener"
)

Expand Down
24 changes: 12 additions & 12 deletions src/sst/elements/ember/mpi/motifs/emberfft3d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ EmberFFT3DGenerator::EmberFFT3DGenerator(SST::Component* owner, Params& params)
m_backwardTotal(0),
m_transCostPer(6)
{
m_data.np0 = (uint32_t) params.find("arg.nx", 100);
m_data.np1 = (uint32_t) params.find("arg.ny", 100);
m_data.np2 = (uint32_t) params.find("arg.nz", 100);
m_data.np0 = params.find<uint32_t>("arg.nx", 100);
m_data.np1 = params.find<uint32_t>("arg.ny", 100);
m_data.np2 = params.find<uint32_t>("arg.nz", 100);

assert( m_data.np0 == m_data.np1 );
assert( m_data.np1 == m_data.np2 );

m_data.nprow = (uint32_t) params.find("arg.npRow", 0);
m_data.nprow = params.find<uint32_t>("arg.npRow", 0);
assert( 0 < m_data.nprow );

m_iterations = (uint32_t) params.find("arg.iterations", 1);
m_iterations = params.find<uint32_t>("arg.iterations", 1);

m_nsPerElement = (float) params.find("arg.nsPerElement",1);
m_nsPerElement = params.find<float>("arg.nsPerElement",1);

m_transCostPer[0] = (float) params.find("arg.fwd_fft1",1);
m_transCostPer[1] = (float) params.find("arg.fwd_fft2",1);
m_transCostPer[2] = (float) params.find("arg.fwd_fft3",1);
m_transCostPer[3] = (float) params.find("arg.bwd_fft1",1);
m_transCostPer[4] = (float) params.find("arg.bwd_fft2",1);
m_transCostPer[5] = (float) params.find("arg.bwd_fft3",1);
m_transCostPer[0] = params.find<float>("arg.fwd_fft1",1);
m_transCostPer[1] = params.find<float>("arg.fwd_fft2",1);
m_transCostPer[2] = params.find<float>("arg.fwd_fft3",1);
m_transCostPer[3] = params.find<float>("arg.bwd_fft1",1);
m_transCostPer[4] = params.find<float>("arg.bwd_fft2",1);
m_transCostPer[5] = params.find<float>("arg.bwd_fft3",1);

configure();
}
Expand Down
30 changes: 15 additions & 15 deletions src/sst/elements/ember/mpi/motifs/emberhalo3d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ EmberHalo3DGenerator::EmberHalo3DGenerator(SST::Component* owner, Params& params
EmberMessagePassingGenerator(owner, params, "Halo3D"),
m_loopIndex(0)
{
nx = (uint32_t) params.find("arg.nx", 100);
ny = (uint32_t) params.find("arg.ny", 100);
nz = (uint32_t) params.find("arg.nz", 100);
nx = params.find<uint32_t>("arg.nx", 100);
ny = params.find<uint32_t>("arg.ny", 100);
nz = params.find<uint32_t>("arg.nz", 100);

peX = (uint32_t) params.find("arg.pex", 0);
peY = (uint32_t) params.find("arg.pey", 0);
peZ = (uint32_t) params.find("arg.pez", 0);
peX = params.find<uint32_t>("arg.pex", 0);
peY = params.find<uint32_t>("arg.pey", 0);
peZ = params.find<uint32_t>("arg.pez", 0);

items_per_cell = (uint32_t) params.find("arg.fields_per_cell", 1);
performReduction = (params.find("arg.doreduce", 1) == 1);
sizeof_cell = (uint32_t) params.find("arg.datatype_width", 8);
items_per_cell = params.find<uint32_t>("arg.fields_per_cell", 1);
performReduction = (params.find<int>("arg.doreduce", 1) == 1);
sizeof_cell = params.find<uint32_t>("arg.datatype_width", 8);

uint64_t pe_flops = (uint64_t) params.find("arg.peflops", 10000000000);
uint64_t flops_per_cell = (uint64_t) params.find("arg.flopspercell", 26);
uint64_t pe_flops = params.find<uint64_t>("arg.peflops", 10000000000);
uint64_t flops_per_cell = params.find<uint64_t>("arg.flopspercell", 26);

const uint64_t total_grid_points = (uint64_t) (nx * ny * nz);
const uint64_t total_flops = total_grid_points * ((uint64_t) items_per_cell) * ((uint64_t) flops_per_cell);

// Converts FLOP/s into nano seconds of compute
const double compute_seconds = ( (double) total_flops / ( (double) pe_flops / 1000000000.0 ) );
nsCompute = (uint64_t) params.find("arg.computetime", (uint64_t) compute_seconds);
nsCopyTime = (uint32_t) params.find("arg.copytime", 0);
nsCompute = params.find<uint64_t>("arg.computetime", (uint64_t) compute_seconds);
nsCopyTime = params.find<uint32_t>("arg.copytime", 0);

iterations = (uint32_t) params.find("arg.iterations", 1);
iterations = params.find<uint32_t>("arg.iterations", 1);

x_down = -1;
x_up = -1;
Expand All @@ -55,7 +55,7 @@ EmberHalo3DGenerator::EmberHalo3DGenerator(SST::Component* owner, Params& params
z_down = -1;
z_up = -1;

jobId = (int) params.find<int>("_jobId"); //NetworkSim
jobId = params.find<int>("_jobId"); //NetworkSim

configure();
}
Expand Down
42 changes: 33 additions & 9 deletions src/sst/elements/ember/shmem/motifs/emberShmemAtomicInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ namespace Ember {
template < class TYPE, int VAL >
class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {

enum { Add, Fadd, Putv } m_op;
enum { Add, Fadd, Putv, Getv } m_op;
std::string m_opStr;
public:
EmberShmemAtomicIncBaseGenerator(SST::Component* owner, Params& params, std::string name) :
EmberShmemGenerator(owner, params, name ), m_phase(-3), m_one(1)
{
m_computeTime = params.find<int>("arg.computeTime", 50 );
m_dataSize = params.find<int>("arg.dataSize", 32*1024*1024 );
m_updates = params.find<int>("arg.updates", 4096);
m_iterations = params.find<int>("arg.iterations", 1);
Expand All @@ -51,6 +52,8 @@ class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {
m_op = Fadd;
} else if ( m_opStr.compare("putv") == 0 ) {
m_op = Putv;
} else if ( m_opStr.compare("getv") == 0 ) {
m_op = Getv;
} else {
assert(0);
}
Expand All @@ -59,6 +62,7 @@ class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {
m_backed = params.find<bool>("arg.backed", false);
m_outLoop = params.find<int>("arg.outLoop", 1);
m_num_nodes = params.find<int>("arg.numNodes", -1);
m_randAddr = params.find<int>("arg.randAddr", 1);
m_times.resize(m_outLoop);

m_miscLib = static_cast<EmberMiscLib*>(getLib("HadesMisc"));
Expand Down Expand Up @@ -106,9 +110,16 @@ class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {
enQ_getTime( evQ, &m_startTime );

} else if ( m_phase < m_iterations * m_updates ) {
int dest = calcDestPe();

Hermes::MemAddr addr = m_dest.offset<TYPE>( genRand() % m_dataSize );
int dest = calcDestPe();

Hermes::MemAddr addr;
if ( m_randAddr ) {
addr = m_dest.offset<TYPE>( genRand() % m_dataSize );
} else {
addr = m_dest.offset<TYPE>( 0 );
}
enQ_compute( evQ, m_computeTime );

switch ( m_op ) {
case Fadd:
Expand All @@ -119,6 +130,9 @@ class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {
break;
case Putv:
enQ_putv( evQ, addr, &m_one, dest );
break;
case Getv:
enQ_getv( evQ, &m_one, addr, dest );
break;
}
if ( m_phase + 1 == m_iterations * m_updates ) {
Expand All @@ -136,6 +150,9 @@ class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {
}

if ( m_outLoop > 0 ) {
if ( m_backed ) {
bzero( &m_dest.at<TYPE>(0), sizeof(TYPE) * m_dataSize);
}
m_phase = -1;
} else {
++m_phase;
Expand Down Expand Up @@ -163,11 +180,11 @@ class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {
}
}

printf("%s: GUpdates = %.9lf\n", getMotifName().c_str(), Gupdates );
printf("%s: Min Time = %.9lf\n", getMotifName().c_str(), minTime );
printf("%s: Max Time = %.9lf\n", getMotifName().c_str(), maxTime );
printf("%s: Min GUP/s = %.9lf\n", getMotifName().c_str(), Gupdates / maxTime);
printf("%s: Max GUP/s = %.9lf\n", getMotifName().c_str(), Gupdates / minTime );
printf("%s:GUpdates = %.9lf\n", getMotifName().c_str(), Gupdates );
printf("%s:MinTime = %.9lf\n", getMotifName().c_str(), minTime );
printf("%s:MaxTime = %.9lf\n", getMotifName().c_str(), maxTime );
printf("%s:MinGUP/s = %.9lf\n", getMotifName().c_str(), Gupdates / maxTime);
printf("%s:MaxGUP/s = %.9lf\n", getMotifName().c_str(), Gupdates / minTime );

}

Expand Down Expand Up @@ -227,6 +244,8 @@ class EmberShmemAtomicIncBaseGenerator : public EmberShmemGenerator {
unsigned int m_randSeed;
#endif

int m_computeTime;
bool m_randAddr;
bool m_backed;
bool m_printTotals;
TYPE m_one;
Expand Down Expand Up @@ -289,9 +308,14 @@ class EmberShmemAtomicIncGenerator<TYPE,2> : public EmberShmemAtomicIncBaseGener
if( this->m_my_pe == this->m_num_pes - 1 ) {
pe = this->genRand() % (this->m_num_pes - 1);
} else {

int pecountHS = this->m_num_pes + this->m_hotMult;
pe = this->genRand() % pecountHS;

while( pe == this->m_my_pe ) {
pe = this->genRand() % pecountHS;
}

// If we generate a PE higher than we have
// clamp ourselves to the highest PE
if( pe >= this->m_num_pes) {
Expand Down Expand Up @@ -335,7 +359,7 @@ class EmberShmemNSAtomicIncIntGenerator : public EmberShmemAtomicIncGenerator<in
)
public:
EmberShmemNSAtomicIncIntGenerator(SST::Component* owner, Params& params) :
EmberShmemAtomicIncGenerator(owner, params, "ShmemHSAtomicIncInt") { }
EmberShmemAtomicIncGenerator(owner, params, "ShmemNSAtomicIncInt") { }
};

class EmberShmemHotAtomicIncIntGenerator : public EmberShmemAtomicIncGenerator<int, 2> {
Expand Down
32 changes: 19 additions & 13 deletions src/sst/elements/ember/shmem/motifs/emberShmemRing.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@ namespace Ember {
template< class TYPE >
class EmberShmemRingGenerator : public EmberShmemGenerator {

public:
SST_ELI_REGISTER_SUBCOMPONENT(
EmberShmemRingGenerator,
"ember",
"ShmemRingMotif",
SST_ELI_ELEMENT_VERSION(1,0,0),
"SHMEM ring",
"SST::Ember::EmberGenerator"
)

SST_ELI_DOCUMENT_PARAMS(
)

public:
EmberShmemRingGenerator(SST::Component* owner, Params& params) :
EmberShmemGenerator(owner, params, "ShmemRing" ), m_phase(-2)
Expand Down Expand Up @@ -118,6 +105,25 @@ class EmberShmemRingGenerator : public EmberShmemGenerator {
int m_my_pe;
int m_num_pes;
};
class EmberShmemRingIntGenerator : public EmberShmemRingGenerator<int> {
public:
SST_ELI_REGISTER_SUBCOMPONENT(
EmberShmemRingIntGenerator,
"ember",
"ShmemRingIntMotif",
SST_ELI_ELEMENT_VERSION(1,0,0),
"SHMEM ring2 int",
"SST::Ember::EmberGenerator"

)

SST_ELI_DOCUMENT_PARAMS(
)

public:
EmberShmemRingIntGenerator( SST::Component* owner, Params& params ) :
EmberShmemRingGenerator(owner, params) { }
};

}
}
Expand Down
33 changes: 21 additions & 12 deletions src/sst/elements/ember/shmem/motifs/emberShmemRing2.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ namespace Ember {

template< class TYPE >
class EmberShmemRing2Generator : public EmberShmemGenerator {
public:
SST_ELI_REGISTER_SUBCOMPONENT(
EmberShmemRing2Generator,
"ember",
"ShmemRing2Motif",
SST_ELI_ELEMENT_VERSION(1,0,0),
"SHMEM ring",
"SST::Ember::EmberGenerator"
)

SST_ELI_DOCUMENT_PARAMS(
)

public:
EmberShmemRing2Generator(SST::Component* owner, Params& params) :
Expand Down Expand Up @@ -119,6 +107,27 @@ class EmberShmemRing2Generator : public EmberShmemGenerator {
int m_my_pe;
int m_num_pes;
};

class EmberShmemRing2IntGenerator : public EmberShmemRing2Generator<int> {
public:
SST_ELI_REGISTER_SUBCOMPONENT(
EmberShmemRing2IntGenerator,
"ember",
"ShmemRing2IntMotif",
SST_ELI_ELEMENT_VERSION(1,0,0),
"SHMEM ring2 int",
"SST::Ember::EmberGenerator"

)

SST_ELI_DOCUMENT_PARAMS(
)

public:
EmberShmemRing2IntGenerator( SST::Component* owner, Params& params ) :
EmberShmemRing2Generator(owner, params) { }
};

}
}

Expand Down
Loading

0 comments on commit 89ef8b0

Please sign in to comment.