Changeset 9fc7e1 for src/comm/mpi


Ignore:
Timestamp:
Feb 10, 2012, 3:19:51 PM (14 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
322469
Parents:
32ff22
Message:

Bugfix for trac ticket #61.

Removed all variable-length arrays, even those of POD datatypes. Throws no warnings/errors when compiled with GCC 4.6.1 and -pedantic.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1339 5161e1c8-67bf-11de-9fd5-51895aff932f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/comm/mpi/settings.cpp

    r32ff22 r9fc7e1  
    287287    MPI_Comm_size(comm, &size);
    288288
    289     int buffer[6*size];
     289    std::vector<int> buffer;
     290    buffer.resize(6*size);
    290291
    291292    // Compute local offset for ghost cells
     
    306307    }
    307308
    308     MPI_Allgather(MPI_IN_PLACE, 6, MPI_INT, buffer, 6, MPI_INT, comm);
     309    MPI_Allgather(MPI_IN_PLACE, 6, MPI_INT, &buffer.front(), 6, MPI_INT, comm);
    309310
    310311    if (insert_result.second) {
     
    341342    }
    342343
    343     MPI_Allgather(MPI_IN_PLACE, 6, MPI_INT, buffer, 6, MPI_INT, comm);
     344    MPI_Allgather(MPI_IN_PLACE, 6, MPI_INT, &buffer.front(), 6, MPI_INT, comm);
    344345
    345346    if (insert_result.second) {
Note: See TracChangeset for help on using the changeset viewer.