Commit 788237cd authored by Francois Tessier's avatar Francois Tessier

A memory tier now has to fulfull the capacity requirements to be selected as an aggregator

parent 5b163672
......@@ -406,8 +406,32 @@ int64_t Memory::memLatency ( mem_t mem ) {
}
/*
* Bytes
*/
int64_t Memory::memCapacity ( mem_t mem ) {
return 0;
switch ( mem )
{
case DDR:
return 192000000000;
break;
case HBM:
return 32000000;
//return 16000000000;
break;
case PFS:
return LONG_MAX;
break;
case NLS:
return 128000000000;
break;
case NVR:
return 128000000000;
break;
default:
printMsg ( ERROR, "Wrong memory type!\n" );
MPI_Abort ( MPI_COMM_WORLD, -1 );
}
}
......
......@@ -6,6 +6,7 @@
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
......@@ -14,8 +14,8 @@ cd $HOME/install/$ARCHI/bin/
export TAPIOCA_STRATEGY=MEMORY_AWARE
export TAPIOCA_NBAGGR=2
export TAPIOCA_NBBUFFERS=2
export TAPIOCA_BUFFERSIZE=8388608
export TAPIOCA_NBBUFFERS=3
export TAPIOCA_BUFFERSIZE=16777216
export TAPIOCA_AGGRTIER=DDR
export TAPIOCA_DEVNULL=false
......@@ -76,7 +76,7 @@ function outputFileTAPIOCA ()
}
PARTICLES=100000
PARTICLES=1000000
updateSettings
setLustreFS
generateRand
......@@ -84,7 +84,7 @@ generateRand
rm $TARGET/*
for BIN in 1D-Array-Tapioca-W 1D-Array-Tapioca-R #1D-Array-MPIIO-W 1D-Array-MPIIO-R
do
aprun $SETTINGS -n $NPROCS -N $PPN $BIN -r -e $PARTICLES -o $TARGET -s SSF
aprun $SETTINGS -n $NPROCS -N $PPN $BIN -e $PARTICLES -o $TARGET -s SSF
echo
echo "---------------------------------"
echo
......
......@@ -131,12 +131,14 @@ int Tapioca::RankMemoryAware (MPI_Comm aggrComm, int64_t dataSize)
int aggrCommRank, aggrCommSize, worldRank, rank, distance, dim, hops, aggrRank, nIOnodes, memCount, m;
mem_t memList[10], best_mem = DDR;
Memory mem;
int64_t *dataDistrib, aggregatedData = 0, latency, bandwidth;
int64_t *dataDistrib, aggregatedData = 0, latency, bandwidth, requiredCapacity;
int *srcCoords, *destCoords, *globalRanks, *IOnodesList;
MPI_Comm_rank (aggrComm, &aggrCommRank);
MPI_Comm_size (aggrComm, &aggrCommSize);
MPI_Comm_rank (MPI_COMM_WORLD, &worldRank);
requiredCapacity = this->nBuffers_ * this->bufferSize_;
aggrCost.rank = aggrCommRank;
aggrCost.cost = 0;
......@@ -171,10 +173,19 @@ int Tapioca::RankMemoryAware (MPI_Comm aggrComm, int64_t dataSize)
}
if ( aggrCost.cost < current_cost ) {
current_cost = aggrCost.cost;
best_mem = memList[m];
if ( mem.memCapacity ( memList[m] ) > requiredCapacity ) {
current_cost = aggrCost.cost;
best_mem = memList[m];
}
else {
if ( aggrCommRank == 0 )
printMsg (WARNING, "Not enough capacity in %s for %d %lld B aggregation buffers (%lld / %lld)!\n",
mem.memName( memList[m] ), this->nBuffers_, this->bufferSize_,
requiredCapacity, mem.memCapacity ( memList[m] ) );
}
}
aggregatedData =0;
aggrCost.cost = 0;
}
......
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