From f10cd5f36948851f96c436072b5aaf77a7d6901a Mon Sep 17 00:00:00 2001 From: Peter Gottschling <peter.gottschling@simunova.com> Date: Wed, 20 Feb 2013 14:13:09 +0000 Subject: [PATCH] Arrays with dynamic sizes is a gnu extension and not standard-compliant. --- AMDiS/src/parallel/StdMpi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AMDiS/src/parallel/StdMpi.h b/AMDiS/src/parallel/StdMpi.h index 22a1d0d1..0a48e987 100644 --- a/AMDiS/src/parallel/StdMpi.h +++ b/AMDiS/src/parallel/StdMpi.h @@ -405,7 +405,7 @@ namespace AMDiS { { FUNCNAME("StdMpi::commDataSize()"); - MPI::Request request[sendData.size() + recvDataSize.size()]; + MPI::Request* request= new MPI::Request[sendData.size() + recvDataSize.size()]; vector<int> sendBuffers; sendBuffers.resize(sendDataSize.size()); @@ -432,6 +432,8 @@ namespace AMDiS { bool testall = MPI::Request::Testall(requestCounter, request); TEST_EXIT(testall)("Should not happen!\n"); #endif + + delete[] request; } -- GitLab