Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Comm_split is back to life.
[simgrid.git] / src / smpi / smpi_util.c
1 /* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5   * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "private.h"
8
9 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_util, smpi,
10                                 "Logging specific to SMPI (utilities)");
11
12 /*
13 int smpi_gettimeofday(struct timeval *tv, struct timezone *tz)
14 {
15   double now;
16   int retval;
17   smpi_bench_end();
18   retval = 0;
19   if (NULL == tv) {
20     retval = -1;
21   } else {
22     now = SIMIX_get_clock();
23     tv->tv_sec = now;
24     tv->tv_usec = ((now - (double) tv->tv_sec) * 1000000.0);
25   }
26   smpi_bench_begin();
27   return retval;
28 }
29
30 unsigned int smpi_sleep(unsigned int seconds)
31 {
32   smx_host_t host;
33   smx_action_t action;
34
35   smpi_bench_end();
36   host = SIMIX_host_self();
37   action = SIMIX_action_sleep(host, (double)seconds);
38   smpi_process_wait_action(action);
39   SIMIX_action_destroy(action);
40   smpi_bench_begin();
41   return 0;
42 }
43
44 void smpi_exit(int status)
45 {
46   smpi_bench_end();
47   smpi_process_finalize();
48   SIMIX_process_kill(SIMIX_process_self());
49   return;
50 }
51 */