Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] debugger changes
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-11-08 08:36:33


I think the only possible controversial change in this commit is changing MPIR_Breakpoint() to return (void) instead of (void*). Oddly, I see that MPICH2 has 2 different prototypes for MPIR_Breakpoint -- one returns (void*), another returns (int). Assuming that MPICH2 works fine with the debuggers, this suggests that the return is ignored by the tools -- as it should be.

I didn't check the volatile removals; I'm assuming that George got them right. :-)

I'll bet that this change does not cause any problems, but it might be worth checking with the big 3+1:

- DDT
- Totalview
- padb
- stat

On Nov 7, 2011, at 8:24 PM, bosilca_at_[hidden] wrote:

> Author: bosilca
> Date: 2011-11-07 20:24:16 EST (Mon, 07 Nov 2011)
> New Revision: 25456
> URL: https://svn.open-mpi.org/trac/ompi/changeset/25456
>
> Log:
> Put the interface of our MPIR support in sync with the document accepted by the MPI
> Forum (http://www.mpi-forum.org/docs/mpir-specification-10-11-2010.pdf).
>
> Text files modified:
> trunk/ompi/debuggers/debuggers.h | 28 ++++++++++++++--------------
> trunk/orte/mca/debugger/base/base.h | 10 +++++-----
> trunk/orte/mca/debugger/base/debugger_base_fns.c | 6 +++---
> trunk/orte/mca/debugger/base/debugger_base_open.c | 6 +++---
> 4 files changed, 25 insertions(+), 25 deletions(-)
>
> Modified: trunk/ompi/debuggers/debuggers.h
> ==============================================================================
> --- trunk/ompi/debuggers/debuggers.h (original)
> +++ trunk/ompi/debuggers/debuggers.h 2011-11-07 20:24:16 EST (Mon, 07 Nov 2011)
> @@ -31,20 +31,20 @@
>
> BEGIN_C_DECLS
>
> - /**
> - * Wait for a debugger if asked.
> - */
> - extern void ompi_wait_for_debugger(void);
> -
> - /**
> - * Notify a debugger that we're about to abort
> - */
> - extern void ompi_debugger_notify_abort(char *string);
> -
> - /**
> - * Breakpoint function for parallel debuggers.
> - */
> - ORTE_DECLSPEC extern void *MPIR_Breakpoint(void);
> +/**
> + * Wait for a debugger if asked.
> + */
> +extern void ompi_wait_for_debugger(void);
> +
> +/**
> + * Notify a debugger that we're about to abort
> + */
> +extern void ompi_debugger_notify_abort(char *string);
> +
> +/**
> + * Breakpoint function for parallel debuggers.
> + */
> +ORTE_DECLSPEC extern void MPIR_Breakpoint(void);
>
> END_C_DECLS
>
>
> Modified: trunk/orte/mca/debugger/base/base.h
> ==============================================================================
> --- trunk/orte/mca/debugger/base/base.h (original)
> +++ trunk/orte/mca/debugger/base/base.h 2011-11-07 20:24:16 EST (Mon, 07 Nov 2011)
> @@ -61,18 +61,18 @@
> ORTE_DECLSPEC extern int MPIR_proctable_size;
> ORTE_DECLSPEC extern volatile int MPIR_being_debugged;
> ORTE_DECLSPEC extern volatile int MPIR_debug_state;
> -ORTE_DECLSPEC extern volatile int MPIR_i_am_starter;
> +ORTE_DECLSPEC extern int MPIR_i_am_starter;
> ORTE_DECLSPEC extern int MPIR_partial_attach_ok;
> -ORTE_DECLSPEC extern volatile char MPIR_executable_path[MPIR_MAX_PATH_LENGTH];
> -ORTE_DECLSPEC extern volatile char MPIR_server_arguments[MPIR_MAX_ARG_LENGTH];
> +ORTE_DECLSPEC extern char MPIR_executable_path[MPIR_MAX_PATH_LENGTH];
> +ORTE_DECLSPEC extern char MPIR_server_arguments[MPIR_MAX_ARG_LENGTH];
> ORTE_DECLSPEC extern volatile int MPIR_forward_output;
> ORTE_DECLSPEC extern volatile int MPIR_forward_comm;
> ORTE_DECLSPEC extern char MPIR_attach_fifo[MPIR_MAX_PATH_LENGTH];
> ORTE_DECLSPEC extern int MPIR_force_to_main;
>
> -typedef void* (*orte_debugger_breakpoint_fn_t)(void);
> +typedef void (*orte_debugger_breakpoint_fn_t)(void);
>
> -ORTE_DECLSPEC void* MPIR_Breakpoint(void);
> +ORTE_DECLSPEC void MPIR_Breakpoint(void);
>
> /* --- end MPICH/TotalView std debugger interface definitions */
>
>
> Modified: trunk/orte/mca/debugger/base/debugger_base_fns.c
> ==============================================================================
> --- trunk/orte/mca/debugger/base/debugger_base_fns.c (original)
> +++ trunk/orte/mca/debugger/base/debugger_base_fns.c 2011-11-07 20:24:16 EST (Mon, 07 Nov 2011)
> @@ -168,7 +168,7 @@
> */
> ORTE_PROGRESSED_WAIT(false, jdata->num_reported, jdata->num_procs);
>
> - (void) MPIR_Breakpoint();
> + MPIR_Breakpoint();
>
> /* send a message to rank=0 to release it */
> OBJ_CONSTRUCT(&buf, opal_buffer_t); /* don't need anything in this */
> @@ -186,7 +186,7 @@
> /*
> * Breakpoint function for parallel debuggers
> */
> -void *MPIR_Breakpoint(void)
> +void MPIR_Breakpoint(void)
> {
> - return NULL;
> + return;
> }
>
> Modified: trunk/orte/mca/debugger/base/debugger_base_open.c
> ==============================================================================
> --- trunk/orte/mca/debugger/base/debugger_base_open.c (original)
> +++ trunk/orte/mca/debugger/base/debugger_base_open.c 2011-11-07 20:24:16 EST (Mon, 07 Nov 2011)
> @@ -43,10 +43,10 @@
> int MPIR_proctable_size = 0;
> volatile int MPIR_being_debugged = 0;
> volatile int MPIR_debug_state = 0;
> -volatile int MPIR_i_am_starter = 0;
> +int MPIR_i_am_starter = 0;
> int MPIR_partial_attach_ok = 1;
> -volatile char MPIR_executable_path[MPIR_MAX_PATH_LENGTH];
> -volatile char MPIR_server_arguments[MPIR_MAX_ARG_LENGTH];
> +char MPIR_executable_path[MPIR_MAX_PATH_LENGTH];
> +char MPIR_server_arguments[MPIR_MAX_ARG_LENGTH];
> volatile int MPIR_forward_output = 0;
> volatile int MPIR_forward_comm = 0;
> char MPIR_attach_fifo[MPIR_MAX_PATH_LENGTH];
> _______________________________________________
> svn-full mailing list
> svn-full_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/svn-full

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/