From e3105a85be9a1e8e2823eb0418f5d9ad1ea55160 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 9 Oct 2007 23:28:53 +0000 Subject: [PATCH] Don't require a progress function from the PML. If there is one then the PML base will take care of the registration with the event library. Otherwise, (and this apply for the CM case) the MTL are in charge of registering their own progress function. This commit was SVN r16415. --- ompi/mca/pml/base/pml_base_close.c | 4 +++- ompi/mca/pml/base/pml_base_select.c | 5 +++-- ompi/mca/pml/cm/Makefile.am | 1 - ompi/mca/pml/cm/pml_cm.c | 2 +- ompi/mca/pml/cm/pml_cm_progress.c | 19 ------------------- 5 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 ompi/mca/pml/cm/pml_cm_progress.c diff --git a/ompi/mca/pml/base/pml_base_close.c b/ompi/mca/pml/base/pml_base_close.c index 6ffe4bdc18..a62796aec5 100644 --- a/ompi/mca/pml/base/pml_base_close.c +++ b/ompi/mca/pml/base/pml_base_close.c @@ -40,7 +40,9 @@ int mca_pml_base_finalize(void) { int mca_pml_base_close(void) { /* turn off the progress code for the pml */ - opal_progress_unregister(mca_pml.pml_progress); + if( NULL != mca_pml.pml_progress ) { + opal_progress_unregister(mca_pml.pml_progress); + } /* Blatently ignore the return code (what would we do to recover, anyway? This module is going away, so errors don't matter diff --git a/ompi/mca/pml/base/pml_base_select.c b/ompi/mca/pml/base/pml_base_select.c index e5181efe30..7944524a6c 100644 --- a/ompi/mca/pml/base/pml_base_select.c +++ b/ompi/mca/pml/base/pml_base_select.c @@ -267,8 +267,9 @@ int mca_pml_base_select(bool enable_progress_threads, #endif /* register the winner's callback */ - opal_progress_register(mca_pml.pml_progress); - + if( NULL != mca_pml.pml_progress ) { + opal_progress_register(mca_pml.pml_progress); + } /* register winner in the modex */ mca_pml_base_pml_selected(best_component->pmlm_version.mca_component_name); diff --git a/ompi/mca/pml/cm/Makefile.am b/ompi/mca/pml/cm/Makefile.am index 47de8aaf24..3ed1aa078b 100644 --- a/ompi/mca/pml/cm/Makefile.am +++ b/ompi/mca/pml/cm/Makefile.am @@ -37,7 +37,6 @@ local_sources = \ pml_cm_send.c \ pml_cm_sendreq.h \ pml_cm_sendreq.c \ - pml_cm_progress.c \ pml_cm_start.c mcacomponentdir = $(pkglibdir) diff --git a/ompi/mca/pml/cm/pml_cm.c b/ompi/mca/pml/cm/pml_cm.c index 99a45f991d..720ce4fa61 100644 --- a/ompi/mca/pml/cm/pml_cm.c +++ b/ompi/mca/pml/cm/pml_cm.c @@ -31,7 +31,7 @@ ompi_pml_cm_t ompi_pml_cm = { mca_pml_cm_add_procs, mca_pml_cm_del_procs, mca_pml_cm_enable, - mca_pml_cm_progress, + NULL, /* No progress function. The MTL register their own */ mca_pml_cm_add_comm, mca_pml_cm_del_comm, mca_pml_cm_irecv_init, diff --git a/ompi/mca/pml/cm/pml_cm_progress.c b/ompi/mca/pml/cm/pml_cm_progress.c deleted file mode 100644 index cf8b75a582..0000000000 --- a/ompi/mca/pml/cm/pml_cm_progress.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2004-2006 The Regents of the University of California. - * All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "pml_cm.h" - - -int -mca_pml_cm_progress(void) -{ - return 0; -}