diff --git a/.gitignore b/.gitignore index ecf3e1fa..1de99d12 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,14 @@ alltoallv-*.log # VScode specific stuff .vscode/ + + +examples/alltoallv_dt_c +src/alltoall/examples/alltoall + +# JL stuff including results files +alltoallv_*.err +alltoallv_*.out +src/alltoall/examples/results/* +src/alltoall/examples/results_alltoallv/* + diff --git a/build-scripts/build-hpcac.sh b/build-scripts/build-hpcac.sh index d0615f27..32f72d13 100644 --- a/build-scripts/build-hpcac.sh +++ b/build-scripts/build-hpcac.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd /global/home/users/cyrusl/placement/expt0066/alltoall_profiling +cd /global/home/users/cyrusl/placement/expt0070/alltoall_profiling module purge spack unload --all diff --git a/examples/alltoall.c b/examples/alltoall.c index 56c177de..a8b03785 100644 --- a/examples/alltoall.c +++ b/examples/alltoall.c @@ -72,7 +72,7 @@ bool is_rank_in_rankset(int rank, rank_set_t* rank_set){ void create_communicators(int world_size, rank_set_t* rank_sets, int rank_sets_count){ DEBUG_ALLTOALL_PROFILING("params for create_communicators: worldsize = %i, ranks_sets_count = %i\n", world_size, rank_sets_count); for (int k; k<8; k++) DEBUG_ALLTOALL_PROFILING("%i ", rank_sets[0].ranks[k]); - DEBUG_ALLTOALL_PROFILING("\n)"); + DEBUG_ALLTOALL_PROFILING("\n)", NULL); //MPI_Comm** communicators = (MPI_Comm**) malloc(sizeof(MPI_Comm*) * world_size); MPI_Group world_group; @@ -84,10 +84,10 @@ void create_communicators(int world_size, rank_set_t* rank_sets, int rank_sets_c DEBUG_ALLTOALL_PROFILING("World group size = %i\n", group_size); for (int rank_set_idx=0; rank_set_idx< rank_sets_count; rank_set_idx++){ - DEBUG_ALLTOALL_PROFILING("IN LOOP\n"); + DEBUG_ALLTOALL_PROFILING("IN LOOP\n", NULL); rank_set_t* rank_set = &rank_sets[rank_set_idx]; for (int k; k<8; k++) DEBUG_ALLTOALL_PROFILING("* %i ", rank_set->ranks[k]); - DEBUG_ALLTOALL_PROFILING("\n"); + DEBUG_ALLTOALL_PROFILING("\n", NULL); // signature: MPI_Group_incl( MPI_Group group , int n , const int ranks[] , MPI_Group* newgroup); DEBUG_ALLTOALL_PROFILING("calling MPI_Group_incl rank_set_idx=%i ...\n", rank_set_idx); // signature: int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup) @@ -148,7 +148,7 @@ void* create_sendbuf(alltoall_test_node_params_t* node_params){ DEBUG_ALLTOALL_PROFILING("i=%i ", i); b[i] = i / node_params->sendcount; } - DEBUG_ALLTOALL_PROFILING("\n"); + DEBUG_ALLTOALL_PROFILING("\n", NULL); #if DEBUG == 1 for (int j=0; j<64; j++) DEBUG_ALLTOALL_PROFILING("~~ %i ", b[j]); #endif diff --git a/examples/batch-run-alltoall-hpcx-2-7-0-counts-variants.sh b/examples/batch-run-alltoall-hpcx-2-7-0-counts-variants.sh index 48e9b993..a2d39ff1 100644 --- a/examples/batch-run-alltoall-hpcx-2-7-0-counts-variants.sh +++ b/examples/batch-run-alltoall-hpcx-2-7-0-counts-variants.sh @@ -28,7 +28,7 @@ THIS_SCRIPT_DIR=$(dirname "$THIS_SCRIPT") # environment and modules and some paths etc. for the job # /global/home/users/cyrusl/placement/expt0060/OSU/osu-micro-benchmarks-5.6.3/install/libexec/osu-micro-benchmarks/mpi/collective -export PROJECT_ROOT=/global/home/users/cyrusl/placement/expt0066 +export PROJECT_ROOT=/global/home/users/cyrusl/placement/expt0070 # TODO - set modulefiles!!? module purge HNAME=$(hostname) @@ -121,13 +121,13 @@ EOF # set variables for the mpirun executable - repeat this section if more than one # full path? (which below help ldd find executable) -export EXECUTABLE1=/global/home/users/cyrusl/placement/expt0066/alltoall_profiling/examples/alltoall +export EXECUTABLE1=/global/home/users/cyrusl/placement/expt0070/alltoall_profiling/examples/alltoall export EXECUTABLE1_PARAMS="" # following example at /global/home/users/cyrusl/placement/expt0060/geoffs-profiler/build-570ff3aff83fa208f3d1e2fcbdb31d9ec7e93b6c/README.md # TODO put in the results dir -ALLTOALL_LIB_ROOT=/global/home/users/cyrusl/placement/expt0066/alltoall_profiling/src/alltoall +ALLTOALL_LIB_ROOT=/global/home/users/cyrusl/placement/expt0070/alltoall_profiling/src/alltoall declare -a COUNTSFLAGS COUNTSFLAGS[0]="$ALLTOALL_LIB_ROOT/liballtoall_counts.so" COUNTSFLAGS[1]="$ALLTOALL_LIB_ROOT/liballtoall_counts_unequal.so" diff --git a/src/alltoall/build-scripts/build-at-hpcac.sh b/src/alltoall/build-scripts/build-at-hpcac.sh index 695abf04..f8ed8bcc 100644 --- a/src/alltoall/build-scripts/build-at-hpcac.sh +++ b/src/alltoall/build-scripts/build-at-hpcac.sh @@ -4,7 +4,7 @@ module purge module load gcc/8.3.1 hpcx/2.7.0 -PROJECT_ROOT=/global/home/users/cyrusl/placement/expt0066/alltoall_profiling +PROJECT_ROOT=/global/home/users/cyrusl/placement/expt0070/alltoall_profiling cd $PROJECT_ROOT make clean make diff --git a/src/alltoall/config.h b/src/alltoall/config.h index fe232828..bd27393d 100644 --- a/src/alltoall/config.h +++ b/src/alltoall/config.h @@ -7,7 +7,7 @@ #ifndef _COLLECTIVE_PROFILER_ALLTOALL_CONFIG_H #define _COLLECTIVE_PROFILER_ALLTOALL_CONFIG_H -#define DEBUG (0) +#define DEBUG (1) // A few environment variables to control a few things at runtime #define NUM_CALL_START_PROFILING_ENVVAR "A2A_NUM_CALL_START_PROFILING" diff --git a/src/alltoall/mpi_alltoall.c b/src/alltoall/mpi_alltoall.c index 2ad2c3fb..7c8be2ff 100755 --- a/src/alltoall/mpi_alltoall.c +++ b/src/alltoall/mpi_alltoall.c @@ -91,8 +91,8 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int int rank, count_num; int *_counts; - DEBUG_ALLTOALL_PROFILING("Comparing data with existing data...\n"); - DEBUG_ALLTOALL_PROFILING("-> Comparing send counts...\n"); + DEBUG_ALLTOALL_PROFILING("Comparing data with existing data...\n", NULL); + DEBUG_ALLTOALL_PROFILING("-> Comparing send counts...\n", NULL); // First compare the send counts // #if ASSUME_COUNTS_EQUAL_ALL_RANKS !=1 for (rank = 0; rank < size; rank++) @@ -102,7 +102,7 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int count_num = 0; // conversion from alltoallv: no need to loop since only one value for the rank if (_counts[count_num] != send_counts[num]) { - DEBUG_ALLTOALL_PROFILING("Data differs\n"); + DEBUG_ALLTOALL_PROFILING("Data differs\n", NULL); return false; } } @@ -117,10 +117,10 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int // return false; // } // #endif - DEBUG_ALLTOALL_PROFILING("-> Send counts are the same\n"); + DEBUG_ALLTOALL_PROFILING("-> Send counts are the same\n", NULL); // Then the receive counts - DEBUG_ALLTOALL_PROFILING("-> Comparing recv counts...\n"); + DEBUG_ALLTOALL_PROFILING("-> Comparing recv counts...\n", NULL); num = 0; // #if ASSUME_COUNTS_EQUAL_ALL_RANKS !=1 for (rank = 0; rank < size; rank++) @@ -129,7 +129,7 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int count_num = 0; // conversion from alltoallv: no need to loop since only one value for the rank if (_counts[count_num] != recv_counts[num]) { - DEBUG_ALLTOALL_PROFILING("Data differs\n"); + DEBUG_ALLTOALL_PROFILING("Data differs\n", NULL); return false; } } @@ -144,7 +144,7 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int // } // #endif - DEBUG_ALLTOALL_PROFILING("Data is the same\n"); + DEBUG_ALLTOALL_PROFILING("Data is the same\n", NULL); return true; } @@ -182,7 +182,7 @@ static int extract_patterns_from_counts(int *send_counts, int *recv_counts, int int send_patterns[size + 1]; int recv_patterns[size + 1]; - DEBUG_ALLTOALL_PROFILING("Extracting patterns\n"); + DEBUG_ALLTOALL_PROFILING("Extracting patterns\n", NULL); for (i = 0; i < size; i++) { @@ -225,7 +225,7 @@ static int extract_patterns_from_counts(int *send_counts, int *recv_counts, int } // From here we know who many ranks send to how many ranks and how many ranks receive from how many rank - DEBUG_ALLTOALL_PROFILING("Handling send patterns\n"); + DEBUG_ALLTOALL_PROFILING("Handling send patterns\n", NULL); for (i = 0; i < size; i++) { if (send_patterns[i] != 0) @@ -238,7 +238,7 @@ static int extract_patterns_from_counts(int *send_counts, int *recv_counts, int #endif // COMMSIZE_BASED_PATTERNS } } - DEBUG_ALLTOALL_PROFILING("Handling receive patterns\n"); + DEBUG_ALLTOALL_PROFILING("Handling receive patterns\n", NULL); for (i = 0; i < size; i++) { if (recv_patterns[i] != 0) @@ -484,14 +484,11 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz struct avSRCountNode *newNode = NULL; struct avSRCountNode *temp; - DEBUG_ALLTOALL_PROFILING("Insert data for a new alltoall call...\n"); + DEBUG_ALLTOALL_PROFILING("Insert data for a new alltoall call...\n", NULL); assert(sbuf); assert(rbuf); assert(logger); -#if DEBUG - assert(logger->f); -#endif temp = head; while (temp != NULL) @@ -499,9 +496,11 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz if (temp->size != size || temp->recvtype_size != recvtype_size || temp->sendtype_size != sendtype_size || !same_call_counters(temp, sbuf, rbuf, size)) { // New data -#if DEBUG - fprintf(logger->f, "new data: %d\n", size); -#endif + +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "new data: %d\n", size); +// #endif if (temp->next != NULL) temp = temp->next; else @@ -510,7 +509,7 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz else { // Data exist, adding call info to it - DEBUG_ALLTOALL_PROFILING("Data already exists, updating metadata...\n"); + DEBUG_ALLTOALL_PROFILING("Data already exists, updating metadata...\n", NULL); assert(temp->list_calls); if (temp->count >= temp->max_calls) { @@ -520,17 +519,19 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz } temp->list_calls[temp->count] = avCalls; // Note: count starts at 1, not 0 temp->count++; -#if DEBUG - fprintf(logger->f, "old data: %d --> %d --- %d\n", size, temp->size, temp->count); -#endif - DEBUG_ALLTOALL_PROFILING("Metadata successfully updated\n"); +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "old data: %d --> %d --- %d\n", size, temp->size, temp->count); +// #endif + DEBUG_ALLTOALL_PROFILING("Metadata successfully updated\n", NULL); return 0; } } -#if DEBUG - fprintf(logger->f, "no data: %d \n", size); -#endif +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "no data: %d \n", size); +// #endif newNode = (struct avSRCountNode *)malloc(sizeof(avSRCountNode_t)); // TODO Anaylse data structure written from here onwards assert(newNode); @@ -552,7 +553,7 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz num = 0; int _rank; - DEBUG_ALLTOALL_PROFILING("handling send counts...\n"); + DEBUG_ALLTOALL_PROFILING("handling send counts...\n", NULL); for (_rank = 0; _rank < size; _rank++) { //#if ASSUME_COUNTS_EQUAL_ALL_RANKS != 1 @@ -567,7 +568,7 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz num++; // so num always = _rank - but why? } - DEBUG_ALLTOALL_PROFILING("handling recv counts...\n"); + DEBUG_ALLTOALL_PROFILING("handling recv counts...\n", NULL); num = 0; for (_rank = 0; _rank < size; _rank++) { @@ -587,9 +588,10 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz newNode->recvtype_size = recvtype_size; newNode->list_calls[0] = avCalls; newNode->next = NULL; -#if DEBUG - fprintf(logger->f, "new entry: %d --> %d --- %d\n", size, newNode->size, newNode->count); -#endif +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "new entry: %d --> %d --- %d\n", size, newNode->size, newNode->count); +// #endif DEBUG_ALLTOALL_PROFILING("Data for the new alltoall call has %d unique series for send counts and %d for recv counts\n", newNode->recv_data_size, newNode->send_data_size); @@ -659,7 +661,7 @@ static void save_call_patterns(int uniqueID) char *filename = NULL; int size; - DEBUG_ALLTOALL_PROFILING("Saving call patterns...\n"); + DEBUG_ALLTOALL_PROFILING("Saving call patterns...\n", NULL); if (getenv(OUTPUT_DIR_ENVVAR)) { @@ -692,7 +694,7 @@ static void save_patterns(int world_rank) char *rpatterns_filename = NULL; int size; - DEBUG_ALLTOALL_PROFILING("Saving patterns...\n"); + DEBUG_ALLTOALL_PROFILING("Saving patterns...\n", NULL); if (getenv(OUTPUT_DIR_ENVVAR)) { @@ -1207,7 +1209,6 @@ int _mpi_alltoall(const void *sendbuf, const int sendcount, MPI_Datatype sendtyp { int comm_size; int i, j; - int localrank; int ret; bool need_profile = true; int my_comm_rank; @@ -1328,9 +1329,11 @@ int _mpi_alltoall(const void *sendbuf, const int sendcount, MPI_Datatype sendtyp if (my_comm_rank == 0) { -#if DEBUG - fprintf(logger->f, "Root: global %d - %d local %d - %d\n", world_size, myrank, size, localrank); -#endif +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// assert(logger->f); +// fprintf(logger->f, "Root: global %d - %d local %d - %d\n", world_size, world_rank, comm_size, my_comm_rank); +// #endif #if ((ENABLE_RAW_DATA || ENABLE_PER_RANK_STATS || ENABLE_VALIDATION) && ENABLE_COMPACT_FORMAT) int s_dt_size, r_dt_size; @@ -1446,4 +1449,4 @@ void calledLast() { _commit_data(); _finalize_profiling(); -} \ No newline at end of file +} diff --git a/src/alltoallv/config.h b/src/alltoallv/config.h index 1e676de7..b2873447 100644 --- a/src/alltoallv/config.h +++ b/src/alltoallv/config.h @@ -7,7 +7,7 @@ #ifndef _COLLECTIVE_PROFILER_ALLTOALLV_CONFIG_H #define _COLLECTIVE_PROFILER_ALLTOALLV_CONFIG_H -#define DEBUG (0) +#define DEBUG (1) // A few environment variables to control a few things at runtime #define NUM_CALL_START_PROFILING_ENVVAR "A2A_NUM_CALL_START_PROFILING" diff --git a/src/alltoallv/mpi_alltoallv.c b/src/alltoallv/mpi_alltoallv.c index 96a6c8c8..cf8ab258 100755 --- a/src/alltoallv/mpi_alltoallv.c +++ b/src/alltoallv/mpi_alltoallv.c @@ -85,8 +85,8 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int int rank, count_num; int *_counts; - DEBUG_ALLTOALLV_PROFILING("Comparing data with existing data...\n"); - DEBUG_ALLTOALLV_PROFILING("-> Comparing send counts...\n"); + DEBUG_ALLTOALLV_PROFILING("Comparing data with existing data...\n", NULL); + DEBUG_ALLTOALLV_PROFILING("-> Comparing send counts...\n", NULL); // First compare the send counts for (rank = 0; rank < size; rank++) { @@ -96,16 +96,16 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int { if (_counts[count_num] != send_counts[num]) { - DEBUG_ALLTOALLV_PROFILING("Data differs\n"); + DEBUG_ALLTOALLV_PROFILING("Data differs\n", NULL); return false; } num++; } } - DEBUG_ALLTOALLV_PROFILING("-> Send counts are the same\n"); + DEBUG_ALLTOALLV_PROFILING("-> Send counts are the same\n", NULL); // Then the receive counts - DEBUG_ALLTOALLV_PROFILING("-> Comparing recv counts...\n"); + DEBUG_ALLTOALLV_PROFILING("-> Comparing recv counts...\n", NULL); num = 0; for (rank = 0; rank < size; rank++) { @@ -114,14 +114,14 @@ static bool same_call_counters(avSRCountNode_t *call_data, int *send_counts, int { if (_counts[count_num] != recv_counts[num]) { - DEBUG_ALLTOALLV_PROFILING("Data differs\n"); + DEBUG_ALLTOALLV_PROFILING("Data differs\n", NULL); return false; } num++; } } - DEBUG_ALLTOALLV_PROFILING("Data is the same\n"); + DEBUG_ALLTOALLV_PROFILING("Data is the same\n", NULL); return true; } @@ -155,7 +155,7 @@ static int extract_patterns_from_counts(int *send_counts, int *recv_counts, int int send_patterns[size + 1]; int recv_patterns[size + 1]; - DEBUG_ALLTOALLV_PROFILING("Extracting patterns\n"); + DEBUG_ALLTOALLV_PROFILING("Extracting patterns\n", NULL); for (i = 0; i < size; i++) { @@ -198,7 +198,7 @@ static int extract_patterns_from_counts(int *send_counts, int *recv_counts, int } // From here we know who many ranks send to how many ranks and how many ranks receive from how many rank - DEBUG_ALLTOALLV_PROFILING("Handling send patterns\n"); + DEBUG_ALLTOALLV_PROFILING("Handling send patterns\n", NULL); for (i = 0; i < size; i++) { if (send_patterns[i] != 0) @@ -211,7 +211,7 @@ static int extract_patterns_from_counts(int *send_counts, int *recv_counts, int #endif // COMMSIZE_BASED_PATTERNS } } - DEBUG_ALLTOALLV_PROFILING("Handling receive patterns\n"); + DEBUG_ALLTOALLV_PROFILING("Handling receive patterns\n", NULL); for (i = 0; i < size; i++) { if (recv_patterns[i] != 0) @@ -454,14 +454,12 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz struct avSRCountNode *newNode = NULL; struct avSRCountNode *temp; - DEBUG_ALLTOALLV_PROFILING("Insert data for a new alltoallv call...\n"); + DEBUG_ALLTOALLV_PROFILING("Insert data for a new alltoallv call...\n", NULL); assert(sbuf); assert(rbuf); assert(logger); -#if DEBUG assert(logger->f); -#endif temp = head; while (temp != NULL) @@ -469,9 +467,11 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz if (temp->size != size || temp->recvtype_size != recvtype_size || temp->sendtype_size != sendtype_size || !same_call_counters(temp, sbuf, rbuf, size)) { // New data -#if DEBUG - fprintf(logger->f, "new data: %d\n", size); -#endif + +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "new data: %d\n", size); +// #endif if (temp->next != NULL) temp = temp->next; else @@ -480,7 +480,7 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz else { // Data exist, adding call info to it - DEBUG_ALLTOALLV_PROFILING("Data already exists, updating metadata...\n"); + DEBUG_ALLTOALLV_PROFILING("Data already exists, updating metadata...\n", NULL); assert(temp->list_calls); if (temp->count >= temp->max_calls) { @@ -490,17 +490,18 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz } temp->list_calls[temp->count] = avCalls; // Note: count starts at 1, not 0 temp->count++; -#if DEBUG - fprintf(logger->f, "old data: %d --> %d --- %d\n", size, temp->size, temp->count); -#endif - DEBUG_ALLTOALLV_PROFILING("Metadata successfully updated\n"); +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "old data: %d --> %d --- %d\n", size, temp->size, temp->count); +// #endif + DEBUG_ALLTOALLV_PROFILING("Metadata successfully updated\n", NULL); return 0; } } - -#if DEBUG - fprintf(logger->f, "no data: %d \n", size); -#endif +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "no data: %d \n", size); +// #endif newNode = (struct avSRCountNode *)malloc(sizeof(avSRCountNode_t)); assert(newNode); @@ -522,7 +523,7 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz num = 0; int _rank; - DEBUG_ALLTOALLV_PROFILING("handling send counts...\n"); + DEBUG_ALLTOALLV_PROFILING("handling send counts...\n", NULL); for (_rank = 0; _rank < size; _rank++) { if (compareAndSaveSendCounters(_rank, &(sbuf[num * size]), newNode)) @@ -533,7 +534,7 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz num++; } - DEBUG_ALLTOALLV_PROFILING("handling recv counts...\n"); + DEBUG_ALLTOALLV_PROFILING("handling recv counts...\n", NULL); num = 0; for (_rank = 0; _rank < size; _rank++) { @@ -549,9 +550,10 @@ static int insert_sendrecv_data(int *sbuf, int *rbuf, int size, int sendtype_siz newNode->recvtype_size = recvtype_size; newNode->list_calls[0] = avCalls; newNode->next = NULL; -#if DEBUG - fprintf(logger->f, "new entry: %d --> %d --- %d\n", size, newNode->size, newNode->count); -#endif +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "new entry: %d --> %d --- %d\n", size, newNode->size, newNode->count); +// #endif DEBUG_ALLTOALLV_PROFILING("Data for the new alltoallv call has %d unique series for send counts and %d for recv counts\n", newNode->recv_data_size, newNode->send_data_size); @@ -621,7 +623,7 @@ static void save_call_patterns(int uniqueID) char *filename = NULL; int size; - DEBUG_ALLTOALLV_PROFILING("Saving call patterns...\n"); + DEBUG_ALLTOALLV_PROFILING("Saving call patterns...\n", NULL); if (getenv(OUTPUT_DIR_ENVVAR)) { @@ -654,7 +656,7 @@ static void save_patterns(int world_rank) char *rpatterns_filename = NULL; int size; - DEBUG_ALLTOALLV_PROFILING("Saving patterns...\n"); + DEBUG_ALLTOALLV_PROFILING("Saving patterns...\n", NULL); if (getenv(OUTPUT_DIR_ENVVAR)) { @@ -1169,14 +1171,13 @@ int _mpi_alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispl { int comm_size; int i, j; - int localrank; + // int localrank; // not assigned in this function - fixing int ret; bool need_profile = true; int my_comm_rank; MPI_Comm_size(comm, &comm_size); - MPI_Comm_rank(comm, &my_comm_rank); - + MPI_Comm_rank(comm, &my_comm_rank); // "Determines the rank of the calling process in the communicator." (var names confusing? localrank could fit this) #if ENABLE_BACKTRACE if (my_comm_rank == 0) { @@ -1266,9 +1267,10 @@ int _mpi_alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispl if (my_comm_rank == 0) { -#if DEBUG - fprintf(logger->f, "Root: global %d - %d local %d - %d\n", world_size, myrank, size, localrank); -#endif +// Temporary solution?? - logger->f is not yet initialised (which is done in _commit_data) +// #if DEBUG +// fprintf(logger->f, "Root: global %d - %d local %d - %d\n", world_size, world_rank, comm_size, my_comm_rank); +// #endif #if ((ENABLE_RAW_DATA || ENABLE_PER_RANK_STATS || ENABLE_VALIDATION) && ENABLE_COMPACT_FORMAT) int s_dt_size, r_dt_size; @@ -1387,4 +1389,4 @@ void calledLast() { _commit_data(); _finalize_profiling(); -} \ No newline at end of file +}