Commit b730b30b authored by Francois Tessier's avatar Francois Tessier

Set the memory source

parent 63a2ea59
...@@ -19,6 +19,7 @@ void Memory::memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* file ...@@ -19,6 +19,7 @@ void Memory::memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* file
int rank, err; int rank, err;
this->mem_ = mem; this->mem_ = mem;
this->memSrc_ = memSrc;
this->masterRank_ = masterRank; this->masterRank_ = masterRank;
MPI_Comm_dup( comm, &this->comm_ ); MPI_Comm_dup( comm, &this->comm_ );
this->buffSize_ = buffSize; this->buffSize_ = buffSize;
......
...@@ -15,10 +15,11 @@ Memory::~Memory () ...@@ -15,10 +15,11 @@ Memory::~Memory ()
/**********************/ /**********************/
/* |-- Allocation */ /* |-- Allocation */
/**********************/ /**********************/
void Memory::memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* fileName, MPI_Comm comm ) { void Memory::memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* fileName, mem_t memSrc, MPI_Comm comm ) {
int rank, err; int rank, err;
this->mem_ = mem; this->mem_ = mem;
this->memSrc_ = memSrc;
this->masterRank_ = masterRank; this->masterRank_ = masterRank;
MPI_Comm_dup( comm, &this->comm_ ); MPI_Comm_dup( comm, &this->comm_ );
this->buffSize_ = buffSize; this->buffSize_ = buffSize;
...@@ -413,10 +414,11 @@ int64_t Memory::memCapacity ( mem_t mem ) { ...@@ -413,10 +414,11 @@ int64_t Memory::memCapacity ( mem_t mem ) {
switch ( mem ) switch ( mem )
{ {
case DDR: case DDR:
return 192000000000; //return 192000000000;
return 40000000;
break; break;
case HBM: case HBM:
return 32000000; return 40000000;
//return 16000000000; //return 16000000000;
break; break;
case PFS: case PFS:
......
...@@ -23,7 +23,7 @@ public: ...@@ -23,7 +23,7 @@ public:
/**********************/ /**********************/
/* |-- Allocation */ /* |-- Allocation */
/**********************/ /**********************/
void memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* fileName, MPI_Comm comm ); void memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* fileName, mem_t memSrc, MPI_Comm comm );
void memFree ( ); void memFree ( );
/**********************/ /**********************/
......
...@@ -49,6 +49,7 @@ public: ...@@ -49,6 +49,7 @@ public:
protected: protected:
mem_t mem_; mem_t mem_;
mem_t memSrc_;
bool masterRank_; bool masterRank_;
MPI_Comm comm_; MPI_Comm comm_;
......
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