X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/92959d5b26387e5194b1bb4553baf90da7701f41..05e606bc7ac2a616e8f741e382d3802898069e2f:/src/smpi/private.h diff --git a/src/smpi/private.h b/src/smpi/private.h index 03fdd13352..f6e09f612f 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -1,8 +1,8 @@ -/* Copyright (c) 2007, 2009-2013. The SimGrid Team. +/* Copyright (c) 2007, 2009-2014. 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. */ + * under the terms of the license (GNU LGPL) which comes with this package. */ #ifndef SMPI_PRIVATE_H #define SMPI_PRIVATE_H @@ -28,6 +28,15 @@ typedef struct s_smpi_process_data *smpi_process_data_t; #define ISEND 0x20 #define SSEND 0x40 #define PREPARED 0x80 +#define FINISHED 0x100 + + +enum smpi_process_state{ + SMPI_UNINITIALIZED, + SMPI_INITIALIZED, + SMPI_FINALIZED +}; + // this struct is here to handle the problem of non-contignous data // for each such structure these function should be implemented (vector // index hvector hindex struct) @@ -101,6 +110,19 @@ int smpi_process_finalized(void); int smpi_process_initialized(void); void smpi_process_mark_as_initialized(void); +void smpi_topo_destroy(MPI_Topology topo); +MPI_Topology smpi_topo_create(int ndims); +int smpi_mpi_cart_create(MPI_Comm comm_old, int ndims, int dims[], + int periodic[], int reorder, MPI_Comm *comm_cart); +int smpi_mpi_cart_shift(MPI_Comm comm, int direction, int disp, + int *rank_source, int *rank_dest); +int smpi_mpi_cart_rank(MPI_Comm comm, int* coords, int* rank); +int smpi_mpi_cart_get(MPI_Comm comm, int maxdims, int* dims, int* periods, int* coords); +int smpi_mpi_cart_coords(MPI_Comm comm, int rank, int maxdims, + int coords[]); +int smpi_mpi_cartdim_get(MPI_Comm comm, int *ndims); +int smpi_mpi_dims_create(int nnodes, int ndims, int dims[]); +int smpi_mpi_cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm); smpi_process_data_t smpi_process_data(void); smpi_process_data_t smpi_process_remote_data(int index); @@ -114,6 +136,8 @@ smx_rdv_t smpi_process_remote_mailbox_small(int index); xbt_os_timer_t smpi_process_timer(void); void smpi_process_simulated_start(void); double smpi_process_simulated_elapsed(void); +void smpi_process_set_sampling(int s); +int smpi_process_get_sampling(void); void print_request(const char *message, MPI_Request request); @@ -170,7 +194,8 @@ int smpi_group_unuse(MPI_Group group); int smpi_group_size(MPI_Group group); int smpi_group_compare(MPI_Group group1, MPI_Group group2); -MPI_Comm smpi_comm_new(MPI_Group group); +MPI_Topology smpi_comm_topo(MPI_Comm comm); +MPI_Comm smpi_comm_new(MPI_Group group, MPI_Topology topo); void smpi_comm_destroy(MPI_Comm comm); MPI_Group smpi_comm_group(MPI_Comm comm); int smpi_comm_size(MPI_Comm comm); @@ -288,11 +313,11 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, MPI_Comm comm); // utilities -extern int smpi_sample_is_running; +extern double smpi_cpu_threshold; +extern double smpi_running_power; void smpi_bench_destroy(void); void smpi_bench_begin(void); void smpi_bench_end(void); -void smpi_execute_flops(double flops); // f77 wrappers void mpi_init_(int*);