-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2009-2022 NTESS. Under the terms | ||
// of Contract DE-NA0003525 with NTESS, the U.S. | ||
// Government retains certain rights in this software. | ||
// | ||
// Copyright (c) 2009-2022, NTESS | ||
// All rights reserved. | ||
// | ||
// Portions are copyright of other developers: | ||
// See the file CONTRIBUTORS.TXT in the top level directory | ||
// of the distribution for more information. | ||
// | ||
// This file is part of the SST software package. For license | ||
// information, see the LICENSE file in the top level directory of the | ||
// distribution. | ||
|
||
|
||
#include <sst_config.h> | ||
#include "emberexample.h" | ||
using namespace SST; | ||
using namespace SST::Ember; | ||
|
||
ExampleGenerator::ExampleGenerator(SST::ComponentId_t id, Params& params) : | ||
EmberMessagePassingGenerator(id, params, "Null" ) | ||
{ | ||
} | ||
|
||
bool ExampleGenerator::generate( std::queue<EmberEvent*>& evQ) | ||
{ | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright 2009-2022 NTESS. Under the terms | ||
// of Contract DE-NA0003525 with NTESS, the U.S. | ||
// Government retains certain rights in this software. | ||
// | ||
// Copyright (c) 2009-2022, NTESS | ||
// All rights reserved. | ||
// | ||
// Portions are copyright of other developers: | ||
// See the file CONTRIBUTORS.TXT in the top level directory | ||
// of the distribution for more information. | ||
// | ||
// This file is part of the SST software package. For license | ||
// information, see the LICENSE file in the top level directory of the | ||
// distribution. | ||
|
||
#ifndef _H_EMBER_EXAMPLE | ||
#define _H_EMBER_EXAMPLE | ||
|
||
#include "mpi/embermpigen.h" | ||
|
||
namespace SST { | ||
namespace Ember { | ||
|
||
class ExampleGenerator : public EmberMessagePassingGenerator { | ||
|
||
public: | ||
|
||
SST_ELI_REGISTER_SUBCOMPONENT( | ||
ExampleGenerator, | ||
"ember", | ||
"ExampleMotif", | ||
SST_ELI_ELEMENT_VERSION(1,0,0), | ||
"Performs an idle cycle on the node, no traffic is generated.", | ||
SST::Ember::EmberGenerator | ||
) | ||
|
||
SST_ELI_DOCUMENT_PARAMS( | ||
{ "arg.messageSize", "Sets the size of exchange", "1"}, | ||
); | ||
|
||
SST_ELI_DOCUMENT_STATISTICS( | ||
); | ||
|
||
ExampleGenerator(SST::ComponentId_t id, Params& params); | ||
bool generate( std::queue<EmberEvent*>& evQ); | ||
}; | ||
|
||
} | ||
} | ||
|
||
#endif /* _H_EMBER_EXAMPLE */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright 2009-2022 NTESS. Under the terms | ||
# of Contract DE-NA0003525 with NTESS, the U.S. | ||
# Government retains certain rights in this software. | ||
# | ||
# Copyright (c) 2009-2022, NTESS | ||
# All rights reserved. | ||
# | ||
# This file is part of the SST software package. For license | ||
# information, see the LICENSE file in the top level directory of the | ||
# distribution. | ||
|
||
import sst | ||
from sst.merlin.base import * | ||
from sst.merlin.endpoint import * | ||
from sst.merlin.interface import * | ||
from sst.merlin.topology import * | ||
|
||
from sst.ember import * | ||
|
||
def example(): | ||
PlatformDefinition.setCurrentPlatform("firefly-defaults") | ||
|
||
# Setup the topology | ||
topo = topoDragonFly() | ||
topo.hosts_per_router = 2 | ||
topo.routers_per_group = 4 | ||
topo.intergroup_links = 2 | ||
topo.num_groups = 4 | ||
topo.algorithm = ["minimal", "adaptive-local"] | ||
|
||
# Set up the routers | ||
router = hr_router() | ||
router.link_bw = "4GB/s" | ||
router.flit_size = "8B" | ||
router.xbar_bw = "6GB/s" | ||
router.input_latency = "20ns" | ||
router.output_latency = "20ns" | ||
router.input_buf_size = "4kB" | ||
router.output_buf_size = "4kB" | ||
router.num_vns = 2 | ||
router.xbar_arb = "merlin.xbar_arb_lru" | ||
|
||
topo.router = router | ||
topo.link_latency = "20ns" | ||
|
||
# set up the endpoint | ||
networkif = ReorderLinkControl() | ||
networkif.link_bw = "4GB/s" | ||
networkif.input_buf_size = "1kB" | ||
networkif.output_buf_size = "1kB" | ||
|
||
ep = EmberMPIJob(0, topo.getNumNodes()) | ||
ep.network_interface = networkif | ||
ep.nic.nic2host_lat = "100ns" | ||
ep.addMotif("Example") | ||
system = System() | ||
system.setTopology(topo) | ||
system.allocateNodes(ep, "linear") | ||
|
||
system.build() | ||
|
||
|
||
if __name__ == "__main__": | ||
example() |