framework, and you never know who have the time and knowledge to
answer your question, so please keep messages on the public mailing
list.
- - Join us on IRC and ask your question directly on the channel \#simgrid at
- ``irc.debian.org``
- (or use the ugly `web interface <https://webchat.oftc.net/?channels=%23simgrid>`__
- if you don't have a
- `real client <https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients>`_
- installed). When no non-french speaker are connected, we usually
- chat in french on this channel, but we do switch back to english
- when we have a guest.
- Be warned that even if many people are connected to
- the channel, they may not be staring at their IRC windows.
- So don't be surprised if you don't get an answer in the
- second, and turn to the mailing lists if nobody seems to be there.
- The logs of this channel are publicly
- `available online <http://colabti.org/irclogger/irclogger_logs/simgrid>`_,
- so may also want to check in a few hours if someone answered after
- you left.
+ - If you want to chat with the community, join us on `Mattermost
+ <https://framateam.org/simgrid/channels/town-square>`_. Be warned
+ that even if many people are connected to the channel, they may not
+ be staring at their chat windows. So don't be surprised if you
+ don't get an answer in the second, and please be patient.
+
+ If you prefer, you can reach us on IRC on \#simgrid at
+ ``irc.debian.org`` (the `logs are available
+ <http://colabti.org/irclogger/irclogger_logs/simgrid>`_). When no
+ non-french speaker are connected, we usually chat in french on
+ these channel, but we do switch back to english when we have a
+ guest.
- Asking your question on
`StackOverflow <http://stackoverflow.com/questions/tagged/simgrid>`_
void generate_link(const std::string& id, int numlinks, resource::LinkImpl** linkup,
resource::LinkImpl** linkdown) const;
- simgrid::s4u::Link::SharingPolicy sharing_policy_;
+ simgrid::s4u::Link::SharingPolicy sharing_policy_ = simgrid::s4u::Link::SharingPolicy::SHARED;
double bw_ = 0;
double lat_ = 0;
dst_actor_ ? dst_actor_->get_host()->get_cname() : "a finished process", dst_buff_, buff_size);
/* Copy at most dst_buff_size bytes of the message to receiver's buffer */
- if (dst_buff_size_)
+ if (dst_buff_size_) {
buff_size = std::min(buff_size, *(dst_buff_size_));
- /* Update the receiver's buffer size to the copied amount */
- if (dst_buff_size_)
+ /* Update the receiver's buffer size to the copied amount */
*dst_buff_size_ = buff_size;
+ }
if (buff_size > 0) {
if (copy_data_fun)
int PMPI_Alloc_mem(MPI_Aint size, MPI_Info /*info*/, void* baseptr)
{
void *ptr = xbt_malloc(size);
- if(ptr==nullptr)
- return MPI_ERR_NO_MEM;
- else {
- *static_cast<void**>(baseptr) = ptr;
- return MPI_SUCCESS;
- }
+ *static_cast<void**>(baseptr) = ptr;
+ return MPI_SUCCESS;
}
int PMPI_Free_mem(void *baseptr){
CHECK_NEGATIVE(2, MPI_ERR_OTHER, size)
CHECK_NEGATIVE(3, MPI_ERR_OTHER, disp_unit)
void* ptr = xbt_malloc(size);
- if(ptr==nullptr)
- return MPI_ERR_NO_MEM;
smpi_bench_end();
*static_cast<void**>(base) = ptr;
*win = new simgrid::smpi::Win( ptr, size, disp_unit, info, comm,1);
int rank = comm->rank();
if(rank==0){
ptr = xbt_malloc(size*comm->size());
- if(ptr==nullptr)
- return MPI_ERR_NO_MEM;
}
smpi_bench_end();
simgrid::smpi::colls::bcast(&ptr, sizeof(void*), MPI_BYTE, 0, comm);
XBT_PRIVATE void private_execute_flops(double flops);
-
#define CHECK_ARGS(test, errcode, ...) \
if (test) { \
- if((errcode) != MPI_SUCCESS) \
+ int error_code_ = (errcode); \
+ if (error_code_ != MPI_SUCCESS) \
XBT_WARN(__VA_ARGS__); \
- return (errcode); \
+ return error_code_; \
}
#define CHECK_MPI_NULL(num, val, err, ptr) \
}
#define LAND_OP(a, b) (b) = (a) && (b)
#define LOR_OP(a, b) (b) = (a) || (b)
-#define LXOR_OP(a, b) (b) = (not(a) && (b)) || ((a) && not(b))
+#define LXOR_OP(a, b) (b) = bool(a) != bool(b)
#define BAND_OP(a, b) (b) &= (a)
#define BOR_OP(a, b) (b) |= (a)
#define BXOR_OP(a, b) (b) ^= (a)
abort();
}
- if (size > (size_t) (1 << (type - 1)) && size <= (size_t) (1 << type)) {
+ if (size > ((size_t)1 << (type - 1)) && size <= ((size_t)1 << type)) {
/* The new size is the same kind of fragment. */
result = ptr;
switch (ret) {
case 0:
- found++;
- break;
case 's':
found ++;
break;
switch (ret) {
case 0:
- found++;
- break;
case 's':
found ++;
break;
int main(int argc, char **argv)
{
int rank;
- struct { int a;int c; double b;int tab[2][3];} value;
+ struct {
+ int a;
+ int c;
+ double b;
+ int tab[2][3];
+ } value = {0};
MPI_Datatype mystruct;
int blocklens[3];
MPI_Aint indices[3];
#generate PVS-studio report
EXCLUDEDPATH="-e $WORKSPACE/src/include/catch.hpp -e $WORKSPACE/src/include/xxhash.hpp -e $WORKSPACE/teshsuite/smpi/mpich3-test/ -e $WORKSPACE/teshsuite/smpi/isp/ -e *_dtd.c -e *_dtd.h -e *yy.c -e $WORKSPACE/src/xbt/automaton/ -e $WORKSPACE/src/smpi/colls/ -e $WORKSPACE/examples/smpi/NAS/ -e $WORKSPACE/examples/smpi/gemm/gemm.c -e $WORKSPACE/src/msg/ -e $WORKSPACE/include/msg/ -e $WORKSPACE/examples/deprecated/ -e $WORKSPACE/teshsuite/msg/"
pvs-studio-analyzer analyze -f "$BUILDFOLDER"/compile_commands.json -o "$WORKSPACE"/pvs.log $EXCLUDEDPATH -j$NUMPROC
- #disable V1042 (copyleft), V521 (commas in catch.hpp)
- plog-converter -t xml -o "$WORKSPACE"/pvs.plog -d V1042,V521 "$WORKSPACE"/pvs.log
+ # Disable:
+ # V521 Such expressions using the ',' operator are dangerous. (-> commas in catch.hpp),
+ # V1042 This file is marked with copyleft license, which requires you to open the derived source code.
+ # V1056 The predefined identifier '__func__' always contains the string 'operator()' inside function body of the overloaded 'operator()'.
+ plog-converter -t xml -o "$WORKSPACE"/pvs.plog -d V521,V1042,V1056 "$WORKSPACE"/pvs.log
fi || exit 42