Commit 3062b7f2 authored by Francois Tessier's avatar Francois Tessier

Improve the network interconnect and memory abstraction for Cooley

parent 4bff31b1
......@@ -36,7 +36,9 @@ public:
/* |-- Utils */
/**********************/
char* memName ( );
mem_t memType ( char* name );
char* memName ( mem_t mem );
mem_t memTypeByName ( char* name );
mem_t memTypeByPath ( char* path );
/************************/
/* |-- Characteristics */
......@@ -45,6 +47,15 @@ public:
int64_t memLatency ( );
int64_t memCapacity ( );
bool memPersistency ( );
char* memPath ( );
int64_t memBandwidth ( mem_t mem );
int64_t memLatency ( mem_t mem );
int64_t memCapacity ( mem_t mem );
bool memPersistency ( mem_t mem );
private:
double ioTime;
};
#endif // TP_MEMORY_H
......
#include "tp_network.hpp"
#include "tp_topology.hpp"
#define MAX_IONODES 1
......@@ -30,6 +30,18 @@ int Topology::ComputeNodeId () {
return nodeId;
}
int Topology::GlobalCoreId () {
int nodeId = this->ComputeNodeId ();
int coreId = this->LocalCoreId ();
return ( nodeId * 100 + coreId );
}
int Topology::LocalCoreId () {
return sched_getcpu();
}
int Topology::ProcessPerNode () {
return 12;
......@@ -41,6 +53,14 @@ int Topology::IONodesPerFile ( char* filename, int *nodesList ) {
}
int Topology::ListOfMemoryTiers ( mem_t* memList ) {
memList[0] = DDR;
memList[1] = NAM;
memList[2] = NVR;
return 3;
}
/**********************/
/* |-- Network */
/**********************/
......@@ -49,6 +69,16 @@ int Topology::NetworkDimensions () {
}
int64_t Topology::NetworkBandwidth () {
return 1800000;
}
int64_t Topology::NetworkLatency () {
return 30;
}
/* |---- Coordinates */
void Topology::RankToCoordinates ( int rank, int* coord ) {
int size, node, core;
......
#ifndef TP_NETWORK_H
#define TP_NETWORK_H
#ifndef TP_TOPOLOGY_H
#define TP_TOPOLOGY_H
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <sched.h>
#include <mpi.h>
#include "tp_network_interface.hpp"
#include "tp_topology_interface.hpp"
#define MAX_IONODES 1
......@@ -18,13 +18,18 @@ public:
int IONodeId ();
int BridgeNodeId ();
int ComputeNodeId ();
int GlobalCoreId ();
int LocalCoreId ();
int ProcessPerNode ();
int IONodesPerFile ( char* filename, int *nodesList );
int ListOfMemoryTiers ( mem_t* memList );
/**********************/
/* |-- Network */
/**********************/
int NetworkDimensions ();
int64_t NetworkBandwidth ();
int64_t NetworkLatency ();
/* |---- Coordinates */
void RankToCoordinates ( int rank, int* coord );
......@@ -42,4 +47,4 @@ public:
void LinksList ( int* linksList );
};
#endif // TP_NETWORK_H
#endif // TP_TOPOLOGY_H
MPICXX = mpicxx
MPI_CFLAGS = -g -O3 -I./ -I./architectures -I./architectures/$(ARCHI)
MPI_CFLAGS = -g -Wno-write-strings -O3 -I./ -I./architectures -I./architectures/$(ARCHI)
MPI_CFLAGS += -DDBG -DCOLOR #-DTIMING
TP_INCLUDE = architectures/tp_network_interface.hpp \
MPI_LDFLAGS = -L/$(HOME)/install/$(ARCHI)/lib
TP_INCLUDE = architectures/tp_topology_interface.hpp \
architectures/tp_memory_interface.hpp \
architectures/$(ARCHI)/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment