I guess people should check the commit before … No way the volatile will do any good here: -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];
This value is not even read by the debugger. It only check for it's existence in the startup process, so I guess we're safe here as well. -volatile int MPIR_i_am_starter = 0; +int MPIR_i_am_starter = 0; george. On Nov 8, 2011, at 17:43 , Ashley Pittman wrote: > > I think the volatiles are there to ensure the compiler doesn't optimise away > reads or function calls which has been a problem with this interface in the > past. > > On 8 Nov 2011, at 22:18, George Bosilca wrote: > >> MPIR_Breakpoint, as the name indicates, it is just a breakpoint used by the >> startup process or the MPI application to signal changes to the debugger. No >> return value, nothing more than a breakpoint. >> >> I wonder how the volatile got there, there is no such requirement on >> variables that cannot be changed during execution. >> >> george. >> >> On Nov 8, 2011, at 08:36 , Jeff Squyres wrote: >> >>> 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, bosi...@osl.iu.edu 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-f...@open-mpi.org >>>> http://www.open-mpi.org/mailman/listinfo.cgi/svn-full >>> >>> >>> -- >>> Jeff Squyres >>> jsquy...@cisco.com >>> For corporate legal information go to: >>> http://www.cisco.com/web/about/doing_business/legal/cri/ >>> >>> >>> _______________________________________________ >>> devel mailing list >>> de...@open-mpi.org >>> http://www.open-mpi.org/mailman/listinfo.cgi/devel >> >> >> _______________________________________________ >> devel mailing list >> de...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/devel > > > _______________________________________________ > devel mailing list > de...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/devel