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: ...@@ -36,7 +36,9 @@ public:
/* |-- Utils */ /* |-- Utils */
/**********************/ /**********************/
char* memName ( ); char* memName ( );
mem_t memType ( char* name ); char* memName ( mem_t mem );
mem_t memTypeByName ( char* name );
mem_t memTypeByPath ( char* path );
/************************/ /************************/
/* |-- Characteristics */ /* |-- Characteristics */
...@@ -45,6 +47,15 @@ public: ...@@ -45,6 +47,15 @@ public:
int64_t memLatency ( ); int64_t memLatency ( );
int64_t memCapacity ( ); int64_t memCapacity ( );
bool memPersistency ( ); 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 #endif // TP_MEMORY_H
......
#include "tp_network.hpp" #include "tp_topology.hpp"
#define MAX_IONODES 1 #define MAX_IONODES 1
...@@ -30,6 +30,18 @@ int Topology::ComputeNodeId () { ...@@ -30,6 +30,18 @@ int Topology::ComputeNodeId () {
return nodeId; 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 () { int Topology::ProcessPerNode () {
return 12; return 12;
...@@ -41,6 +53,14 @@ int Topology::IONodesPerFile ( char* filename, int *nodesList ) { ...@@ -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 */ /* |-- Network */
/**********************/ /**********************/
...@@ -49,6 +69,16 @@ int Topology::NetworkDimensions () { ...@@ -49,6 +69,16 @@ int Topology::NetworkDimensions () {
} }
int64_t Topology::NetworkBandwidth () {
return 1800000;
}
int64_t Topology::NetworkLatency () {
return 30;
}
/* |---- Coordinates */ /* |---- Coordinates */
void Topology::RankToCoordinates ( int rank, int* coord ) { void Topology::RankToCoordinates ( int rank, int* coord ) {
int size, node, core; int size, node, core;
......
#ifndef TP_NETWORK_H #ifndef TP_TOPOLOGY_H
#define TP_NETWORK_H #define TP_TOPOLOGY_H
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <algorithm> #include <algorithm>
#include <sched.h> #include <sched.h>
#include <mpi.h> #include <mpi.h>
#include "tp_network_interface.hpp" #include "tp_topology_interface.hpp"
#define MAX_IONODES 1 #define MAX_IONODES 1
...@@ -18,13 +18,18 @@ public: ...@@ -18,13 +18,18 @@ public:
int IONodeId (); int IONodeId ();
int BridgeNodeId (); int BridgeNodeId ();
int ComputeNodeId (); int ComputeNodeId ();
int GlobalCoreId ();
int LocalCoreId ();
int ProcessPerNode (); int ProcessPerNode ();
int IONodesPerFile ( char* filename, int *nodesList ); int IONodesPerFile ( char* filename, int *nodesList );
int ListOfMemoryTiers ( mem_t* memList );
/**********************/ /**********************/
/* |-- Network */ /* |-- Network */
/**********************/ /**********************/
int NetworkDimensions (); int NetworkDimensions ();
int64_t NetworkBandwidth ();
int64_t NetworkLatency ();
/* |---- Coordinates */ /* |---- Coordinates */
void RankToCoordinates ( int rank, int* coord ); void RankToCoordinates ( int rank, int* coord );
...@@ -42,4 +47,4 @@ public: ...@@ -42,4 +47,4 @@ public:
void LinksList ( int* linksList ); void LinksList ( int* linksList );
}; };
#endif // TP_NETWORK_H #endif // TP_TOPOLOGY_H
MPICXX = mpicxx 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 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/tp_memory_interface.hpp \
architectures/$(ARCHI)/* 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