open-source project can use it at no cost. That is what we are doing.
Don't miss the great looking dashboard here:
-https://nemo.sonarqube.org/overview?id=simgrid
+https://sonarcloud.io/dashboard?id=simgrid
This tool is enriched by the script @c tools/internal/travis-sonarqube.sh
that is run from @c .travis.yml
-/* Copyright (c) 2012-2017. The SimGrid Team.
+/* Copyright (c) 2012-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
void Tracker::operator()()
{
simgrid::s4u::CommPtr comm = nullptr;
- void* received;
+ void* received = nullptr;
while (simgrid::s4u::Engine::getClock() < deadline) {
if (comm == nullptr)
comm = mailbox->get_async(&received);
if (comm->test()) {
// Retrieve the data sent by the peer.
+ xbt_assert(received != nullptr);
TrackerQuery* tq = static_cast<TrackerQuery*>(received);
// Add the peer to our peer list, if not already known.
-/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* Second step: Send a FIND_NODE to a a random node in buckets */
unsigned int bucket_id = table->findBucket(known_id)->getId();
+ xbt_assert(bucket_id <= identifier_size);
for (i = 0; ((bucket_id > i) || (bucket_id + i) <= identifier_size) && i < JOIN_BUCKETS_QUERIES; i++) {
if (bucket_id > i) {
unsigned int id_in_bucket = get_id_in_prefix(id_, bucket_id - i);
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2018. 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. */
retval = MPI_ERR_TAG;
} else {
int my_proc_id = simgrid::s4u::Actor::self()->getPid();
- int src_traced = getPid(comm, src);
TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
new simgrid::instr::Pt2PtTIData("recv", src,
datatype->is_replayable() ? count : count * datatype->size(),
// the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
if (status != MPI_STATUS_IGNORE) {
- src_traced = getPid(comm, status->MPI_SOURCE);
+ int src_traced = getPid(comm, status->MPI_SOURCE);
if (not TRACE_smpi_view_internals()) {
TRACE_smpi_recv(src_traced, my_proc_id, tag);
}
double sampling_rate;
explicit Governor(simgrid::s4u::Host* ptr) : host(ptr) { init(); }
+ virtual ~Governor() = default;
void init()
{
* freq_next = min_f + load * (max_f - min_f) / 100
*
* So they assume that frequency increases by 100 MHz. We will just use
- * lowest_pstate - load*pstatesCount();
+ * lowest_pstate - load*pstatesCount()
*/
int max_pstate = host->getPstatesCount() - 1;
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <errno.h>
#include "mpi.h"
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
int main(int argc, char *argv[])
{
int rank;
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <errno.h>
#include "mpi.h"
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
int main(int argc, char *argv[])
{
int i;
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <errno.h>
#include "mpi.h"
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
int main(int argc, char *argv[])
{
int rank;
for (i = 0; i < size *mult; i++)
printf("%d ", sb[i]);
printf("]\n");
-
status = MPI_Allreduce(sb, rb, size *maxlen, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
printf("[%d] rcvbuf=[", rank);
-/* Copyright (c) 2009-2010, 2013-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <errno.h>
#include "mpi.h"
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
int main(int argc, char *argv[])
{
int rank;
-/* Copyright (c) 2009-2010, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <errno.h>
#include "mpi.h"
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
int main(int argc, char *argv[])
{
int rank;
-/* Copyright (c) 2009-2010, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <errno.h>
#include "mpi.h"
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
-
int main(int argc, char *argv[])
{
int rank;
#include <string.h>
#include <errno.h>
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-#endif
int main(int argc, char *argv[])
{