Skip to main content

firefly

The firefly library provides network data movement modeling functionality for MPI-like and SHMEM-like APIs. The network interface is implemented via SST:SimpleNetwork and the application interface is implemented via Hermes:MP and Hermes:Shmem. This model is typically driven by ember.

At a Glance

Source Code: sst-elements/.../firefly  
SST Name: firefly  
Maturity Level: Mature (3)  
Development Path: Active  
Last Released: SST 16.1

Required dependencies​

None

Optional dependencies​

None

Elements​

Use sst-info firefly or sst-info firefly.<element> to see each element's parameters, ports, and statistics. Most of these elements are loaded internally by firefly.nic or firefly.hades, or are selected through parameters. Configurations rarely create them directly. Instead, use the sst.ember Python module, which imports sst.firefly. It builds the NIC and OS stack and supplies defaults through the firefly-defaults platform (see the example below). The older ember/test/emberLoad.py script is deprecated.

LibraryElementTypeDescription
fireflynicComponentNetwork interface for a node; moves message data between the node's cores and the network through a SimpleNetwork interface (e.g., merlin.linkcontrol)
fireflyloopBackComponentCarries messages between cores on the same node without going through the network
fireflyhadesSubComponentHermes OS model for one core; set in the Ember engine's OS slot and provides the services the API modules use to reach the NIC
fireflyhadesMPSubComponentMPI-like message-passing API (Hermes MP interface); selected with the Ember engine's api.N.module parameter
fireflyhadesSHMEMSubComponentSHMEM-like one-sided API, with optional fabric-attached memory (FAM) support
fireflyhadesMiscSubComponentMiscellaneous node queries (node number and number of nodes)
fireflyhadesNetworkIOSubComponentNetwork storage I/O API for reading from and writing to storage nodes
fireflyCtrlMsgProtoSubComponentMessage protocol used by hades to send and receive messages; set in the proto slot
fireflyctrlMsgSubComponentMessage-queue processing for CtrlMsgProto (posted and unexpected receives, short/long protocol); set in its process slot
fireflyctrlMsgMemorySubComponentModels memory copy and memory-region registration costs for CtrlMsgProto; loaded automatically
fireflymsgTimingSubComponentModels per-message setup and completion latencies for CtrlMsgProto; loaded automatically
fireflyfunctionSMSubComponentRuns the state machine for each API call made through hadesMP; loaded automatically by hades
fireflyVirtNicSubComponentPer-core virtual NIC that connects a core's hades to the shared firefly.nic
fireflySimpleMemorySubComponentHost and NIC memory timing model for firefly.nic, enabled with useSimpleMemoryModel
fireflyTrivialMemorySubComponentMemory model with zero latency for firefly.nic, enabled with useTrivialMemoryModel
fireflydetailedInterfaceSubComponentConnects the NIC's SimpleMemory model to a detailed memory system through a StandardMem interface
fireflySimpleSSDSubComponentSimple SSD model for storage nodes, enabled on the NIC with useSimpleSSD
fireflyInit, Fini, Rank, Size, Send, Recv, Cancel, Test, Testany, Wait, WaitAll, WaitAny, MakeProgress, Barrier, Allreduce, Allgather, Alltoallv, Gatherv, Scatterv, CommCreate, CommDestroy, CommSplitModuleState machines for the individual hadesMP calls; loaded automatically by functionSM
fireflyLatencyModModuleLatency that depends on message size, from a base value plus per-size-range linear or multiplier terms; used for message-timing and memcpy parameters
fireflyScaleLatModModuleLatency interpolated linearly across per-size ranges; alternative to LatencyMod
fireflySimpleNodePerfModuleNode compute model based on node FLOPS and memory bandwidth
fireflyGroup_FamNodeMapperModuleMaps fabric-attached memory (FAM) to nodes in strided groups, for hadesSHMEM
fireflyRR_FamAddrMapperModuleDistributes FAM addresses across FAM nodes in round-robin blocks, for hadesSHMEM

The example below runs an MPI allreduce on a 4x4 torus. It uses Merlin for the network and Ember for the motif, with firefly-modeled NICs on every node (see ember and merlin).

An Ember MPI allreduce on firefly NICs (based on ember/tests/dragon_128_allreduce.py)
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 *

# Use firefly's default NIC and OS parameters
PlatformDefinition.setCurrentPlatform("firefly-defaults")

# Network
topo = topoTorus()
topo.shape = "4x4"
topo.width = "1x1"
topo.local_ports = 1
topo.link_latency = "20ns"

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

networkif = ReorderLinkControl()
networkif.link_bw = "4GB/s"
networkif.input_buf_size = "1kB"
networkif.output_buf_size = "1kB"

# One MPI job across every node; each node gets a firefly.nic and firefly.hades
ep = EmberMPIJob(0, topo.getNumNodes())
ep.network_interface = networkif
ep.addMotif("Init")
ep.addMotif("Allreduce")
ep.addMotif("Fini")
ep.nic.nic2host_lat = "100ns"

system = System()
system.setTopology(topo)
system.allocateNodes(ep, "linear")
system.build()