Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] return value of opal_compress_base_register() in opal/mca/compress/base/compress_base_open.c
From: Adrian Reber (adrian_at_[hidden])
Date: 2013-12-27 15:46:58

Right now the C/R code fails because of a change introduced in
opal/mca/compress/base/compress_base_open.c in 2013 with commit

git 734c724ff76d9bf814f3ab0396bcd9ee6fddcd1b
svn r28239

    Update OPAL frameworks to use the MCA framework system.

This commit changed a lot but also the return value of the function from
OPAL_SUCCESS to OPAL_ERR_NOT_AVAILABLE. With following patch I can make
it work again:

diff --git a/opal/mca/compress/base/compress_base_open.c b/opal/mca/compress/base/compress_base_open.c
index a09fe59..69eabfa 100644
--- a/opal/mca/compress/base/compress_base_open.c
+++ b/opal/mca/compress/base/compress_base_open.c
@@ -45,11 +45,11 @@ MCA_BASE_FRAMEWORK_DECLARE(opal, compress, NULL, opal_compress_base_register, op
 static int opal_compress_base_register (mca_base_register_flag_t flags)
     /* Compression currently only used with C/R */
     if( !opal_cr_is_enabled ) {
         opal_output_verbose(10, opal_compress_base_framework.framework_output,
                             "compress:open: FT is not enabled, skipping!");
+ return OPAL_SUCCESS;
     return OPAL_SUCCESS;

My question is if OPAL_ERR_NOT_AVAILABLE is indeed the correct return value
and the function calling opal_compress_base_register() should actually
handle OPAL_ERR_NOT_AVAILABLE or if returning OPAL_SUCCESS is still the right
return value?