Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ompi/mca/mtl/mxm/mtl_mxm_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -266,6 +267,8 @@ static int ompi_mtl_mxm_component_query(mca_base_module_t **module, int *priorit
* if we get here it means that mxm is available so give high priority
*/

ompi_mpi_dynamics_disable("the MXM MTL does not support MPI dynamic process functionality");

*priority = param_priority;
*module = (mca_base_module_t *)&ompi_mtl_mxm.super;
return OMPI_SUCCESS;
Expand Down
5 changes: 5 additions & 0 deletions ompi/mca/pml/yalla/pml_yalla_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -12,6 +13,8 @@

#include "pml_yalla.h"

#include "ompi/runtime/mpiruntime.h"


static int mca_pml_yalla_component_register(void);
static int mca_pml_yalla_component_open(void);
Expand Down Expand Up @@ -96,6 +99,8 @@ mca_pml_yalla_component_init(int* priority, bool enable_progress_threads,
return NULL;
}

ompi_mpi_dynamics_disable("the Yalla (MXM) PML does not support MPI dynamic process functionality");

*priority = ompi_pml_yalla.priority;
return &ompi_pml_yalla.super;
}
Expand Down
15 changes: 15 additions & 0 deletions ompi/mpi/c/comm_accept.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
#include "ompi_config.h"
#include <stdio.h>

#include "opal/util/show_help.h"

#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/runtime/mpiruntime.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/info/info.h"
Expand Down Expand Up @@ -89,6 +92,10 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root,
}
}

if (!ompi_mpi_dynamics_is_enabled(FUNC_NAME)) {
return OMPI_ERRHANDLER_INVOKE(comm, OMPI_ERR_NOT_SUPPORTED, FUNC_NAME);
}

/* parse info object. no prefedined values for this function in MPI-2
Copy link
Member

Choose a reason for hiding this comment

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

  1. Why are we returning the MPI_ERR_SPAWN errorcode instead OF OMPI_ERR_NOT_IMPLEMENTED or OMPI_ERR_NOT_SUPPORTED?
  2. Can we have the same nice output message as below ?

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. Good point, should be ERR_NOT_IMPLEMENTED. I'll update.
  2. ompi_mpi_dynamics_is_enabled() will call show_help() if dynamics are not enabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

You mean “not supported”, yes?

On Oct 13, 2015, at 2:29 PM, Jeff Squyres notifications@github.com wrote:

In ompi/mpi/c/comm_accept.c #989 (comment):

@@ -89,6 +92,10 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root,
}
}

  • if (!ompi_mpi_dynamics_is_enabled(FUNC_NAME)) {
  •    return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_SPAWN, FUNC_NAME);
    
  • }

/* parse info object. no prefedined values for this function in MPI-2
Good point, should be ERR_NOT_IMPLEMENTED. I'll update.
ompi_mpi_dynamics_is_enabled() will call show_help() if dynamics are not enabled.

Reply to this email directly or view it on GitHub https://github.com/open-mpi/ompi/pull/989/files#r41928358.

Copy link
Member Author

Choose a reason for hiding this comment

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

@rhc54 Yes, I mean "not supported". I just double checked the code, and I used "not supported" in all relevant places (not "not implemented").

(found your line comment in the outdated diff on github :-) )

* so lets ignore it for the moment.
* if ( rank == root && MPI_INFO_NULL != info ) {
Expand All @@ -107,6 +114,14 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root,

OPAL_CR_EXIT_LIBRARY();

if (OPAL_ERR_NOT_SUPPORTED == rc) {
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support accept/connect functionality");
}

*newcomm = newcomp;
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME );
}
15 changes: 15 additions & 0 deletions ompi/mpi/c/comm_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
#include "ompi_config.h"
#include <stdio.h>

#include "opal/util/show_help.h"

#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/runtime/mpiruntime.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/info/info.h"
Expand Down Expand Up @@ -89,6 +92,10 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root,
}
}

if (!ompi_mpi_dynamics_is_enabled(FUNC_NAME)) {
return OMPI_ERRHANDLER_INVOKE(comm, OMPI_ERR_NOT_SUPPORTED, FUNC_NAME);
}

/* parse info object. No prefedined values for this function in MPI-2,
* so lets ignore it for the moment.
*
Expand All @@ -109,6 +116,14 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root,

OPAL_CR_EXIT_LIBRARY();

if (OPAL_ERR_NOT_SUPPORTED == rc) {
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support accept/connect functionality");
}

*newcomm = newcomp;
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
}
23 changes: 21 additions & 2 deletions ompi/mpi/c/comm_join.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@
#include <netinet/in.h>
#endif

#include "opal/util/show_help.h"

#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/runtime/mpiruntime.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/dpm/dpm.h"
Expand Down Expand Up @@ -75,6 +78,11 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
}
}

if (!ompi_mpi_dynamics_is_enabled(FUNC_NAME)) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, OMPI_ERR_NOT_SUPPORTED,
FUNC_NAME);
}

Copy link
Member

Choose a reason for hiding this comment

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

Similarly to the others process management functions please raise OMPI_ERR_NOT_SUPPORTED.

Copy link
Member Author

Choose a reason for hiding this comment

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

Meh; can't believe I missed that -- thx.

OPAL_CR_ENTER_LIBRARY();

/* send my process name */
Expand Down Expand Up @@ -114,8 +122,7 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
if (send_first) {
/* open a port */
if (OMPI_SUCCESS != (rc = ompi_dpm_open_port(port_name))) {
OPAL_CR_EXIT_LIBRARY();
return rc;
goto error;
}
llen = (uint32_t)(strlen(port_name)+1);
len = htonl(llen);
Expand All @@ -133,6 +140,18 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
OPAL_CR_EXIT_LIBRARY();

*intercomm = newcomp;

error:
OPAL_CR_EXIT_LIBRARY();

if (OPAL_ERR_NOT_SUPPORTED == rc) {
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support join functionality");
}

OMPI_ERRHANDLER_RETURN (rc, MPI_COMM_SELF, rc, FUNC_NAME);
}

Expand Down
15 changes: 15 additions & 0 deletions ompi/mpi/c/comm_spawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@
#include "ompi_config.h"
#include <stdio.h>

#include "opal/util/show_help.h"

#include "ompi/info/info.h"
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/runtime/mpiruntime.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/dpm/dpm.h"
Expand Down Expand Up @@ -97,6 +100,10 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf
}
}

if (!ompi_mpi_dynamics_is_enabled(FUNC_NAME)) {
return OMPI_ERRHANDLER_INVOKE(comm, OMPI_ERR_NOT_SUPPORTED, FUNC_NAME);
}

/* initialize the port name to avoid problems */
memset(port_name, 0, MPI_MAX_PORT_NAME);

Expand Down Expand Up @@ -132,6 +139,14 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf
}

error:
if (OPAL_ERR_NOT_SUPPORTED == rc) {
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support spawn functionality");
}

/* close the port */
if (rank == root && !non_mpi) {
ompi_dpm_close_port(port_name);
Expand Down
15 changes: 15 additions & 0 deletions ompi/mpi/c/comm_spawn_multiple.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
#include "ompi_config.h"
#include <stdio.h>

#include "opal/util/show_help.h"

#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/runtime/mpiruntime.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/info/info.h"
Expand Down Expand Up @@ -130,6 +133,10 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o
}
}

if (!ompi_mpi_dynamics_is_enabled(FUNC_NAME)) {
return OMPI_ERRHANDLER_INVOKE(comm, OMPI_ERR_NOT_SUPPORTED, FUNC_NAME);
}

if (rank == root) {
if (MPI_INFO_NULL == array_of_info[0]) {
non_mpi = false;
Expand Down Expand Up @@ -173,6 +180,14 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o
}

error:
if (OPAL_ERR_NOT_SUPPORTED == rc) {
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support spawn functionality");
}

/* close the port */
if (rank == root && !non_mpi) {
ompi_dpm_close_port(port_name);
Expand Down
26 changes: 24 additions & 2 deletions ompi/mpi/c/lookup_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "opal/class/opal_list.h"
#include "opal/mca/pmix/pmix.h"
#include "opal/util/show_help.h"

#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
Expand Down Expand Up @@ -69,6 +70,17 @@ int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name)
}
}

if (NULL == opal_pmix.lookup) {
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support name lookup functionality");
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
OMPI_ERR_NOT_SUPPORTED,
FUNC_NAME);
}

OPAL_CR_ENTER_LIBRARY();

OBJ_CONSTRUCT(&pinfo, opal_list_t);
Expand Down Expand Up @@ -111,9 +123,19 @@ int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name)
if (OPAL_SUCCESS != ret ||
OPAL_STRING != pdat->value.type ||
NULL == pdat->value.data.string) {
if (OPAL_ERR_NOT_SUPPORTED == ret) {
ret = OMPI_ERR_NOT_SUPPORTED;
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support name lookup functionality");
} else {
ret = MPI_ERR_NAME;
}

OPAL_CR_EXIT_LIBRARY();
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NAME,
FUNC_NAME);
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME);
}

strncpy ( port_name, pdat->value.data.string, MPI_MAX_PORT_NAME );
Expand Down
32 changes: 24 additions & 8 deletions ompi/mpi/c/publish_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
*
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
Expand All @@ -28,6 +27,7 @@

#include "opal/class/opal_list.h"
#include "opal/mca/pmix/pmix.h"
#include "opal/util/show_help.h"

#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
Expand Down Expand Up @@ -71,6 +71,17 @@ int MPI_Publish_name(const char *service_name, MPI_Info info,
}
}

if (NULL == opal_pmix.publish) {
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support name publishing functionality");
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
OMPI_ERR_NOT_SUPPORTED,
FUNC_NAME);
}

OPAL_CR_ENTER_LIBRARY();
OBJ_CONSTRUCT(&values, opal_list_t);

Expand Down Expand Up @@ -149,15 +160,20 @@ int MPI_Publish_name(const char *service_name, MPI_Info info,
if ( OPAL_SUCCESS != rc ) {
if (OPAL_EXISTS == rc) {
/* already exists - can't publish it */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_FILE_EXISTS,
FUNC_NAME);
rc = MPI_ERR_FILE_EXISTS;
} else if (OPAL_ERR_NOT_SUPPORTED == rc) {
/* this PMIX environment doesn't support publishing */
rc = OMPI_ERR_NOT_SUPPORTED;
opal_show_help("help-mpi-api.txt",
"MPI function not supported",
true,
FUNC_NAME,
"Underlying runtime environment does not support name publishing functionality");
} else {
rc = MPI_ERR_INTERN;
}

/* none of the MPI-specific errors occurred - must be some
* kind of internal error
*/
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
FUNC_NAME);
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, rc, FUNC_NAME);
}

return MPI_SUCCESS;
Expand Down
Loading