Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove asserts that create a segfault in debug mode #121

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

gvallee
Copy link
Owner

@gvallee gvallee commented Feb 17, 2021

No description provided.

@gvallee gvallee added the WIP Work in progress label Feb 17, 2021
to reproduce the error

Signed-off-by: Cyrus James Legg <[email protected]>
 compile errors fixed in subsequent commits

Signed-off-by: Cyrus James Legg <[email protected]>
but problem is that even for that logger->f is not yet initialsed

Signed-off-by: Cyrus James Legg <[email protected]>
… untila _commit_data

at the end of sampling

final fix will be by deleting those permanetly or intiallising earlier

Signed-off-by: Cyrus James Legg <[email protected]>
Copy link
Owner Author

@gvallee gvallee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the debug mode is quite broken and i do not believe this is a clean way to address the problem.

#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)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really do not like that type of comments: it is either a todo and then we need to open an issue or at least clearly say so (i myself do not always open issue for all todos) or dead code in which case it should be deleted.

@@ -7,7 +7,7 @@
#ifndef _COLLECTIVE_PROFILER_ALLTOALLV_CONFIG_H
#define _COLLECTIVE_PROFILER_ALLTOALLV_CONFIG_H

#define DEBUG (0)
#define DEBUG (1)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is debug active by default?

@@ -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);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option (which i usually do) is create a DEBUG_ALLTOALL_PROFILING_NOARGS macro. I personally find it to keep the code cleaner but it is clearly a personal preference.

@@ -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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that file ultimately really need to be in the repo?

@@ -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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that file ultimately be in the repo?



examples/alltoallv_dt_c
src/alltoall/examples/alltoall
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not have a example directory in src/alltoall.

examples/alltoallv_dt_c
src/alltoall/examples/alltoall

# JL stuff including results files
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is either generic or should not be in the repo

@@ -7,7 +7,7 @@
#ifndef _COLLECTIVE_PROFILER_ALLTOALL_CONFIG_H
#define _COLLECTIVE_PROFILER_ALLTOALL_CONFIG_H

#define DEBUG (0)
#define DEBUG (1)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we activate the debug mode by default?

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)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is following best practices, there is nothing confusing. A process as a rank on a communicator, so my_comm_rank.

@@ -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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I has nothing to do with the PR so while i am not against it, it is likely to increase the risk of having conflicts with the current intrusive PR we have.

@gvallee
Copy link
Owner Author

gvallee commented Feb 18, 2021

Fix #122

@gvallee
Copy link
Owner Author

gvallee commented Feb 18, 2021

We need to fix #123 first.

@gvallee gvallee added wontfix This will not be worked on and removed WIP Work in progress labels Feb 19, 2021
@gvallee
Copy link
Owner Author

gvallee commented Feb 19, 2021

This PR won't be merged, identified problems will be addressed one at a time in separate PRs. I leave the PR open for now for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants