Commit a48a3cf6 authored by Francois Tessier's avatar Francois Tessier

Allow to define aggregation tiers and target in Fortran codes.

parent 92716851
......@@ -57,7 +57,7 @@ void Memory::memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* file
void Memory::memFree ( ) {
int rank, err;
MPI_Comm_rank ( MPI_COMM_WORLD, &rank );
switch ( this->mem_ )
{
case DDR:
......
#include "tapioca.hpp"
extern "C" {
extern "C" {
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize,
int64_t *chunkOffset, int nChunks, int64_t header, MPI_Comm comm);
......
......@@ -7,38 +7,42 @@ void tapioca_init_ ( int64_t *chunkCount, int *chunkSize,
int nChunks_ = *nChunks;
int64_t header_ = (int64_t)*header;
MPI_Comm comm_ = MPI_Comm_f2c ( *comm );
Tapioca_S::getInstance()->Init ( chunkCount, chunkSize, chunkOffset, nChunks_, header_, comm_ );
Tapioca_S::getInstance()->setAggregationTier ( 2, DDR, "" );
Tapioca_S::getInstance()->setTargetTier ( HDD, 7680000, "/projects/visualization/ftessier/debug/f90_HACC.dat" );
}
void tapioca_set_aggregation_tier_ ( int nBuffers, mem_t mem, char* fileName )
void tapioca_set_aggregation_tier_ ( int* nBuffers, mem_t* mem, char* fileName )
{
Tapioca_S::getInstance()->setAggregationTier ( nBuffers, mem, fileName );
int nBuffers_ = *nBuffers;
mem_t mem_ = *mem;
Tapioca_S::getInstance()->setAggregationTier ( nBuffers_, mem_, fileName );
}
void tapioca_set_target_tier_ ( mem_t mem, int64_t buffSize, char* fileName )
void tapioca_set_target_tier_ ( mem_t* mem, int64_t* buffSize, char* fileName )
{
Tapioca_S::getInstance()->setTargetTier ( mem, buffSize, fileName );
int64_t buffSize_ = (int64_t)*buffSize;
mem_t mem_ = *mem;
Tapioca_S::getInstance()->setTargetTier ( mem_, buffSize_, fileName );
}
int tapioca_write_ ( MPI_Offset* offset, void *buf, int* count,
int tapioca_write_ ( MPI_Offset* offset, void *buf, int64_t* count,
MPI_Fint* datatype, MPI_Status *status )
{
MPI_Datatype datatype_ = MPI_Type_f2c ( *datatype );
MPI_Offset offset_ = *offset;
int count_ = *count;
int count_ = (int)*count;
return Tapioca_S::getInstance()->Write ( offset_, buf, count_, datatype_, status );
}
int tapioca_read_ ( MPI_Offset* offset, void *buf, int* count,
int tapioca_read_ ( MPI_Offset* offset, void *buf, int64_t* count,
MPI_Fint* datatype, MPI_Status *status )
{
MPI_Datatype datatype_ = MPI_Type_f2c ( *datatype );
MPI_Offset offset_ = *offset;
int count_ = *count;
int count_ = (int)*count;
return Tapioca_S::getInstance()->Read ( offset_, buf, count_, datatype_, status );
}
......
......@@ -7,10 +7,10 @@ extern "C" {
void tapioca_set_aggregation_tier_ ( int* nBuffers, mem_t* mem, char* fileName );
void tapioca_set_target_tier_ ( mem_t* mem, int64_t* buffSize, char* fileName );
int tapioca_write_ ( MPI_Offset* offset, void* buf, int* count,
int tapioca_write_ ( MPI_Offset* offset, void* buf, int64_t* count,
MPI_Fint* datatype, MPI_Status* status );
int tapioca_read_ ( MPI_Offset* offset, void *buf, int* count,
int tapioca_read_ ( MPI_Offset* offset, void *buf, int64_t* count,
MPI_Fint* datatype, MPI_Status *status );
void tapioca_finalize_ ( );
......
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