X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/149c63f36e15b8500b1e826bda5138318ff7ba2b..51685e59ab461a6944c7e5ce62e0822922c245e2:/src/smpi/bindings/smpi_pmpi_file.cpp diff --git a/src/smpi/bindings/smpi_pmpi_file.cpp b/src/smpi/bindings/smpi_pmpi_file.cpp index aadb5952ce..bda92271c8 100644 --- a/src/smpi/bindings/smpi_pmpi_file.cpp +++ b/src/smpi/bindings/smpi_pmpi_file.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -203,7 +203,7 @@ int PMPI_File_write_ordered(MPI_File fh, const void *buf, int count,MPI_Datatype int PMPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, int count,MPI_Datatype datatype, MPI_Status *status){ CHECK_FILE_INPUTS CHECK_WRONLY(fh) - PASS_ZEROCOUNT(count); + PASS_ZEROCOUNT(count) smpi_bench_end(); int rank_traced = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("IO - read", count * datatype->size())); @@ -235,7 +235,7 @@ int PMPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, int count,M int PMPI_File_write_at(MPI_File fh, MPI_Offset offset, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status){ CHECK_FILE_INPUT_OFFSET CHECK_RDONLY(fh) - PASS_ZEROCOUNT(count); + PASS_ZEROCOUNT(count) smpi_bench_end(); int rank_traced = simgrid::s4u::this_actor::get_pid(); TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("IO - write", count * datatype->size())); @@ -299,7 +299,7 @@ int PMPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, MPI_D int PMPI_File_get_info(MPI_File fh, MPI_Info* info) { CHECK_FILE(1, fh) - *info = fh->info(); + *info = new simgrid::smpi::Info(fh->info()); return MPI_SUCCESS; } @@ -317,6 +317,13 @@ int PMPI_File_get_size(MPI_File fh, MPI_Offset* size) return MPI_SUCCESS; } +int PMPI_File_set_size(MPI_File fh, MPI_Offset size) +{ + CHECK_FILE(1, fh) + fh->set_size(size); + return MPI_SUCCESS; +} + int PMPI_File_get_amode(MPI_File fh, int* amode) { CHECK_FILE(1, fh)