1 /* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
\r
3 /* This program is free software; you can redistribute it and/or modify it
\r
4 * under the terms of the license (GNU LGPL) which comes with this package. */
\r
5 #include "private.hpp"
\r
7 #include "smpi_comm.hpp"
\r
8 #include "smpi_coll.hpp"
\r
9 #include "smpi_info.hpp"
\r
10 #include "smpi_file.hpp"
\r
11 #include "simgrid/plugins/file_system.h"
\r
14 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_io, smpi, "Logging specific to SMPI (RMA operations)");
\r
19 File::File(MPI_Comm comm, char *filename, int amode, MPI_Info info): comm_(comm), flags_(amode), info_(info){
\r
20 file_= new simgrid::s4u::File(filename, nullptr);
\r
27 int File::close(MPI_File *fh){
\r
29 if((*fh)->flags() & MPI_MODE_DELETE_ON_CLOSE)
\r
30 (*fh)->file_->unlink();
\r
35 int File::del(char *filename, MPI_Info info){
\r
36 File* f = new File(MPI_COMM_SELF,filename,MPI_MODE_DELETE_ON_CLOSE|MPI_MODE_RDWR, nullptr);
\r
42 return file_->size();
\r
50 return simgrid::smpi::Colls::barrier(comm_);
\r