From 1a0bccb5363d49726801e84db5171558cec319e5 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 2 Dec 2016 14:27:15 -0800 Subject: [PATCH 1/4] Now that PMIx has settled on its release strategy and numbering, update the OPAL pmix framework to track Signed-off-by: Ralph Castain --- .gitignore | 18 +- config/opal_check_pmi.m4 | 6 +- opal/mca/pmix/ext11/configure.m4 | 2 +- opal/mca/pmix/ext2x/Makefile.am | 26 +- .../{ext3x => ext2x}/common_sym_whitelist.txt | 0 opal/mca/pmix/ext2x/configure.m4 | 71 +- .../pmix/{ext3x/pmix3x.c => ext2x/pmix2x.c} | 362 ++--- .../pmix/{ext3x/pmix3x.h => ext2x/pmix2x.h} | 158 +- .../{pmix_ext2x_client.c => pmix2x_client.c} | 333 ++-- ...x_ext2x_component.c => pmix2x_component.c} | 12 +- .../pmix2x_server_north.c} | 256 +-- .../pmix2x_server_south.c} | 134 +- opal/mca/pmix/ext2x/pmix_ext2x.c | 1409 ----------------- opal/mca/pmix/ext2x/pmix_ext2x.h | 325 ---- opal/mca/pmix/ext2x/pmix_ext2x_server_north.c | 754 --------- opal/mca/pmix/ext2x/pmix_ext2x_server_south.c | 517 ------ opal/mca/pmix/ext3x/Makefile.am | 46 - opal/mca/pmix/ext3x/configure.m4 | 60 - opal/mca/pmix/ext3x/pmix3x_client.c | 1285 --------------- opal/mca/pmix/ext3x/pmix3x_component.c | 131 -- opal/mca/pmix/pmix2x/Makefile.am | 53 + .../pmix/{pmix3x => pmix2x}/autogen.subdirs | 0 .../common_sym_whitelist.txt | 0 opal/mca/pmix/{pmix3x => pmix2x}/configure.m4 | 70 +- opal/mca/pmix/{pmix3x => pmix2x}/pmix/AUTHORS | 0 opal/mca/pmix/{pmix3x => pmix2x}/pmix/INSTALL | 3 +- opal/mca/pmix/{pmix3x => pmix2x}/pmix/LICENSE | 2 +- .../pmix/{pmix3x => pmix2x}/pmix/Makefile.am | 1 - opal/mca/pmix/{pmix3x => pmix2x}/pmix/NEWS | 0 opal/mca/pmix/{pmix3x => pmix2x}/pmix/README | 4 +- opal/mca/pmix/{pmix3x => pmix2x}/pmix/VERSION | 0 .../pmix/{pmix3x => pmix2x}/pmix/autogen.pl | 0 .../pmix/config/Makefile.am | 0 .../pmix/config/c_get_alignment.m4 | 2 +- .../pmix/config/distscript.sh | 1 + .../{pmix3x => pmix2x}/pmix/config/pmix.m4 | 2 +- .../pmix/config/pmix_check_attributes.m4 | 2 +- .../pmix/config/pmix_check_broken_qsort.m4 | 2 +- .../config/pmix_check_compiler_version.m4 | 2 +- .../pmix/config/pmix_check_icc.m4 | 2 +- .../pmix/config/pmix_check_ident.m4 | 2 +- .../pmix/config/pmix_check_os_flavors.m4 | 0 .../pmix/config/pmix_check_package.m4 | 2 +- .../pmix/config/pmix_check_vendor.m4 | 2 +- .../pmix/config/pmix_check_visibility.m4 | 1 + .../pmix/config/pmix_config_subdir.m4 | 2 +- .../pmix/config/pmix_config_subdir_args.m4 | 0 .../config/pmix_ensure_contains_optflags.m4 | 2 +- .../pmix/config/pmix_functions.m4 | 2 +- .../pmix/config/pmix_get_version.sh | 2 +- .../pmix/config/pmix_load_platform.m4 | 2 +- .../pmix/config/pmix_mca.m4 | 0 .../pmix/config/pmix_mca_priority_sort.pl | 1 + .../pmix/config/pmix_search_libs.m4 | 2 +- .../pmix/config/pmix_setup_cc.m4 | 2 +- .../pmix/config/pmix_setup_hwloc.m4 | 0 .../pmix/config/pmix_setup_libevent.m4 | 0 .../pmix/{pmix3x => pmix2x}/pmix/configure.ac | 2 +- .../pmix/contrib/pmix-valgrind.supp | 4 +- .../pmix/examples/Makefile.am | 0 .../{pmix3x => pmix2x}/pmix/examples/client.c | 0 .../{pmix3x => pmix2x}/pmix/examples/dmodex.c | 0 .../pmix/examples/dynamic.c | 0 .../{pmix3x => pmix2x}/pmix/examples/fault.c | 0 .../{pmix3x => pmix2x}/pmix/examples/pub.c | 0 .../{pmix3x => pmix2x}/pmix/examples/tool.c | 0 .../pmix/include/Makefile.am | 0 .../{pmix3x => pmix2x}/pmix/include/pmi.h | 0 .../{pmix3x => pmix2x}/pmix/include/pmi2.h | 0 .../{pmix3x => pmix2x}/pmix/include/pmix.h | 0 .../pmix/include/pmix_common.h | 0 .../pmix/pmix2x/pmix/include/pmix_rename.h | 74 + .../pmix/include/pmix_rename.h.in | 0 .../pmix/include/pmix_server.h | 0 .../pmix/include/pmix_tool.h | 0 .../pmix/pmix2x/pmix/include/pmix_version.h | 20 + .../pmix/include/pmix_version.h.in | 0 .../{pmix3x => pmix2x}/pmix/man/Makefile.am | 0 .../pmix/{pmix3x => pmix2x}/pmix/man/README | 0 .../pmix/man/man3/pmix_abort.3 | 0 .../pmix/man/man3/pmix_commit.3 | 0 .../pmix/man/man3/pmix_finalize.3 | 0 .../pmix/man/man3/pmix_init.3 | 0 .../pmix/man/man3/pmix_initialized.3 | 0 .../pmix/man/man3/pmix_put.3 | 0 .../{pmix3x => pmix2x}/pmix/man/man7/pmix.7 | 0 .../pmix/man/man7/pmix_constants.7 | 0 .../{pmix3x => pmix2x}/pmix/src/Makefile.am | 0 .../pmix/src/buffer_ops/Makefile.am | 0 .../pmix/src/buffer_ops/buffer_ops.h | 0 .../pmix/src/buffer_ops/copy.c | 0 .../pmix/src/buffer_ops/internal.h | 0 .../pmix/src/buffer_ops/internal_functions.c | 2 +- .../pmix/src/buffer_ops/open_close.c | 1 - .../pmix/src/buffer_ops/pack.c | 0 .../pmix/src/buffer_ops/print.c | 0 .../pmix/src/buffer_ops/types.h | 2 +- .../pmix/src/buffer_ops/unpack.c | 0 .../pmix/src/class/Makefile.include | 0 .../pmix/src/class/pmix_hash_table.c | 2 +- .../pmix/src/class/pmix_hash_table.h | 0 .../pmix/src/class/pmix_hotel.c | 0 .../pmix/src/class/pmix_hotel.h | 0 .../pmix/src/class/pmix_list.c | 2 +- .../pmix/src/class/pmix_list.h | 2 +- .../pmix/src/class/pmix_object.c | 3 +- .../pmix/src/class/pmix_object.h | 3 +- .../pmix/src/class/pmix_pointer_array.c | 4 +- .../pmix/src/class/pmix_pointer_array.h | 2 +- .../pmix/src/class/pmix_ring_buffer.c | 0 .../pmix/src/class/pmix_ring_buffer.h | 0 .../pmix/src/class/pmix_value_array.c | 1 - .../pmix/src/class/pmix_value_array.h | 1 - .../pmix/src/client/Makefile.include | 2 +- .../{pmix3x => pmix2x}/pmix/src/client/pmi1.c | 2 +- .../{pmix3x => pmix2x}/pmix/src/client/pmi2.c | 0 .../pmix/src/client/pmix_client.c | 0 .../pmix/src/client/pmix_client_connect.c | 0 .../pmix/src/client/pmix_client_fence.c | 1 - .../pmix/src/client/pmix_client_get.c | 0 .../pmix/src/client/pmix_client_ops.h | 0 .../pmix/src/client/pmix_client_pub.c | 0 .../pmix/src/client/pmix_client_spawn.c | 0 .../pmix/src/common/Makefile.include | 0 .../pmix/src/common/pmix_jobdata.c | 0 .../pmix/src/common/pmix_log.c | 0 .../pmix/src/common/pmix_query.c | 0 .../pmix/src/common/pmix_strings.c | 0 .../pmix/src/dstore/Makefile.include | 1 + .../pmix/src/dstore/pmix_dstore.c | 0 .../pmix/src/dstore/pmix_dstore.h | 0 .../pmix/src/dstore/pmix_esh.c | 0 .../pmix/src/dstore/pmix_esh.h | 0 .../pmix/src/event/Makefile.include | 0 .../pmix/src/event/pmix_event.h | 0 .../pmix/src/event/pmix_event_notification.c | 0 .../pmix/src/event/pmix_event_registration.c | 0 .../pmix/src/include/Makefile.include | 0 .../pmix/src/include/align.h | 1 + .../pmix/src/include/hash_string.h | 1 + .../pmix/src/include/pmix_config_bottom.h | 9 +- .../pmix/src/include/pmix_config_top.h | 2 +- .../pmix/src/include/pmix_globals.c | 0 .../pmix/src/include/pmix_globals.h | 0 .../pmix/src/include/pmix_jobdata.h | 0 .../pmix/src/include/pmix_socket_errno.h | 2 +- .../pmix/src/include/pmix_stdint.h | 186 +-- .../pmix/src/include/prefetch.h | 2 +- .../pmix/src/include/types.h | 0 .../pmix/src/mca/Makefile.include | 0 .../pmix/src/mca/base/Makefile.am | 1 + .../pmix/src/mca/base/base.h | 0 .../pmix/src/mca/base/help-mca-base.txt | 1 + .../pmix/src/mca/base/help-mca-var.txt | 1 + .../pmix/src/mca/base/pmix_mca_base_close.c | 0 .../base/pmix_mca_base_component_compare.c | 1 - .../mca/base/pmix_mca_base_component_find.c | 0 .../base/pmix_mca_base_component_repository.c | 0 .../base/pmix_mca_base_component_repository.h | 0 .../mca/base/pmix_mca_base_components_close.c | 0 .../mca/base/pmix_mca_base_components_open.c | 46 +- .../base/pmix_mca_base_components_register.c | 0 .../base/pmix_mca_base_components_select.c | 0 .../src/mca/base/pmix_mca_base_framework.c | 0 .../src/mca/base/pmix_mca_base_framework.h | 0 .../pmix/src/mca/base/pmix_mca_base_list.c | 0 .../pmix/src/mca/base/pmix_mca_base_open.c | 0 .../mca/base/pmix_mca_base_parse_paramfile.c | 0 .../pmix/src/mca/base/pmix_mca_base_var.c | 1 - .../pmix/src/mca/base/pmix_mca_base_var.h | 0 .../src/mca/base/pmix_mca_base_var_enum.c | 0 .../src/mca/base/pmix_mca_base_var_enum.h | 0 .../src/mca/base/pmix_mca_base_var_group.c | 0 .../src/mca/base/pmix_mca_base_var_group.h | 0 .../pmix/src/mca/base/pmix_mca_base_vari.h | 0 .../{pmix3x => pmix2x}/pmix/src/mca/mca.h | 0 .../pmix/src/mca/pdl/Makefile.am | 1 + .../pmix/src/mca/pdl/base/Makefile.am | 1 + .../pmix/src/mca/pdl/base/base.h | 0 .../pmix/src/mca/pdl/base/pdl_base_close.c | 0 .../pmix/src/mca/pdl/base/pdl_base_fns.c | 0 .../pmix/src/mca/pdl/base/pdl_base_open.c | 0 .../pmix/src/mca/pdl/base/pdl_base_select.c | 1 + .../pmix/src/mca/pdl/configure.m4 | 0 .../{pmix3x => pmix2x}/pmix/src/mca/pdl/pdl.h | 1 + .../pmix/src/mca/pdl/pdlopen/Makefile.am | 1 + .../pmix/src/mca/pdl/pdlopen/configure.m4 | 0 .../pmix/src/mca/pdl/pdlopen/pdl_pdlopen.h | 0 .../mca/pdl/pdlopen/pdl_pdlopen_component.c | 1 + .../src/mca/pdl/pdlopen/pdl_pdlopen_module.c | 0 .../pmix/src/mca/pif/Makefile.am | 0 .../pmix/src/mca/pif/base/Makefile.am | 0 .../pmix/src/mca/pif/base/base.h | 0 .../src/mca/pif/base/pif_base_components.c | 0 .../pmix/src/mca/pif/bsdx_ipv4/Makefile.am | 0 .../pmix/src/mca/pif/bsdx_ipv4/configure.m4 | 0 .../pmix/src/mca/pif/bsdx_ipv4/pif_bsdx.c | 0 .../pmix/src/mca/pif/bsdx_ipv6/Makefile.am | 0 .../pmix/src/mca/pif/bsdx_ipv6/configure.m4 | 0 .../src/mca/pif/bsdx_ipv6/pif_bsdx_ipv6.c | 0 .../pmix/src/mca/pif/linux_ipv6/Makefile.am | 0 .../pmix/src/mca/pif/linux_ipv6/configure.m4 | 0 .../src/mca/pif/linux_ipv6/pif_linux_ipv6.c | 0 .../{pmix3x => pmix2x}/pmix/src/mca/pif/pif.h | 0 .../pmix/src/mca/pif/posix_ipv4/Makefile.am | 0 .../pmix/src/mca/pif/posix_ipv4/configure.m4 | 0 .../pmix/src/mca/pif/posix_ipv4/pif_posix.c | 0 .../pmix/src/mca/pif/solaris_ipv6/Makefile.am | 0 .../src/mca/pif/solaris_ipv6/configure.m4 | 0 .../mca/pif/solaris_ipv6/pif_solaris_ipv6.c | 0 .../pmix/src/mca/pinstalldirs/Makefile.am | 0 .../src/mca/pinstalldirs/base/Makefile.am | 1 + .../pmix/src/mca/pinstalldirs/base/base.h | 0 .../base/pinstalldirs_base_components.c | 0 .../base/pinstalldirs_base_expand.c | 0 .../src/mca/pinstalldirs/config/Makefile.am | 0 .../src/mca/pinstalldirs/config/configure.m4 | 1 - .../mca/pinstalldirs/config/pinstall_dirs.h | 129 ++ .../pinstalldirs/config/pinstall_dirs.h.in | 0 .../config/pmix_pinstalldirs_config.c | 0 .../pmix/src/mca/pinstalldirs/configure.m4 | 0 .../pmix/src/mca/pinstalldirs/env/Makefile.am | 1 + .../src/mca/pinstalldirs/env/configure.m4 | 1 - .../pinstalldirs/env/pmix_pinstalldirs_env.c | 0 .../pmix/src/mca/pinstalldirs/pinstalldirs.h | 0 .../pmix/src/mca/psec/Makefile.am | 0 .../pmix/src/mca/psec/base/Makefile.include | 0 .../pmix/src/mca/psec/base/base.h | 0 .../pmix/src/mca/psec/base/psec_base_fns.c | 0 .../pmix/src/mca/psec/base/psec_base_frame.c | 0 .../pmix/src/mca/psec/base/psec_base_select.c | 0 .../pmix/src/mca/psec/munge/Makefile.am | 0 .../pmix/src/mca/psec/munge/configure.m4 | 0 .../pmix/src/mca/psec/munge/psec_munge.c | 0 .../pmix/src/mca/psec/munge/psec_munge.h | 0 .../src/mca/psec/munge/psec_munge_component.c | 0 .../pmix/src/mca/psec/native/Makefile.am | 0 .../pmix/src/mca/psec/native/psec_native.c | 0 .../pmix/src/mca/psec/native/psec_native.h | 0 .../mca/psec/native/psec_native_component.c | 0 .../pmix/src/mca/psec/psec.h | 0 .../pmix/src/runtime/Makefile.include | 0 .../pmix/src/runtime/help-pmix-runtime.txt | 1 + .../pmix/src/runtime/pmix_finalize.c | 0 .../pmix/src/runtime/pmix_init.c | 0 .../pmix/src/runtime/pmix_params.c | 0 .../pmix/src/runtime/pmix_progress_threads.c | 0 .../pmix/src/runtime/pmix_progress_threads.h | 0 .../pmix/src/runtime/pmix_rte.h | 0 .../pmix/src/server/Makefile.include | 0 .../pmix/src/server/help-pmix-server.txt | 0 .../pmix/src/server/pmix_server.c | 0 .../pmix/src/server/pmix_server_get.c | 0 .../pmix/src/server/pmix_server_listener.c | 1 - .../pmix/src/server/pmix_server_ops.c | 0 .../pmix/src/server/pmix_server_ops.h | 0 .../pmix/src/server/pmix_server_regex.c | 0 .../pmix/src/sm/Makefile.include | 1 + .../pmix/src/sm/pmix_mmap.c | 1 + .../pmix/src/sm/pmix_mmap.h | 1 + .../{pmix3x => pmix2x}/pmix/src/sm/pmix_sm.c | 1 + .../{pmix3x => pmix2x}/pmix/src/sm/pmix_sm.h | 1 + .../pmix/src/tool/Makefile.include | 0 .../pmix/src/tool/pmix_tool.c | 0 .../pmix/src/usock/Makefile.am | 2 +- .../{pmix3x => pmix2x}/pmix/src/usock/usock.c | 0 .../{pmix3x => pmix2x}/pmix/src/usock/usock.h | 0 .../pmix/src/usock/usock_sendrecv.c | 0 .../pmix/src/util/Makefile.include | 0 .../{pmix3x => pmix2x}/pmix/src/util/argv.c | 12 +- .../{pmix3x => pmix2x}/pmix/src/util/argv.h | 2 +- .../pmix/src/util/basename.c | 2 +- .../pmix/src/util/basename.h | 2 +- opal/mca/pmix/pmix2x/pmix/src/util/crc.c | 1205 ++++++++++++++ .../{pmix3x => pmix2x}/pmix/src/util/crc.h | 5 +- .../{pmix3x => pmix2x}/pmix/src/util/error.c | 0 .../{pmix3x => pmix2x}/pmix/src/util/error.h | 0 .../{pmix3x => pmix2x}/pmix/src/util/fd.c | 0 .../{pmix3x => pmix2x}/pmix/src/util/fd.h | 2 +- .../{pmix3x => pmix2x}/pmix/src/util/getid.c | 2 +- .../{pmix3x => pmix2x}/pmix/src/util/getid.h | 1 - .../{pmix3x => pmix2x}/pmix/src/util/hash.c | 2 +- .../{pmix3x => pmix2x}/pmix/src/util/hash.h | 2 +- .../pmix/src/util/keyval/Makefile.am | 0 .../pmix/src/util/keyval/keyval_lex.h | 0 .../pmix/src/util/keyval/keyval_lex.l | 1 + .../pmix/src/util/keyval_parse.c | 0 .../pmix/src/util/keyval_parse.h | 0 .../{pmix3x => pmix2x}/pmix/src/util/net.c | 0 .../{pmix3x => pmix2x}/pmix/src/util/net.h | 0 .../pmix/src/util/os_path.c | 22 +- .../pmix/src/util/os_path.h | 2 +- .../{pmix3x => pmix2x}/pmix/src/util/output.c | 46 +- .../{pmix3x => pmix2x}/pmix/src/util/output.h | 0 .../{pmix3x => pmix2x}/pmix/src/util/path.c | 0 .../{pmix3x => pmix2x}/pmix/src/util/path.h | 0 .../{pmix3x => pmix2x}/pmix/src/util/pif.c | 0 .../{pmix3x => pmix2x}/pmix/src/util/pif.h | 0 .../pmix/src/util/pmix_environ.c | 1 - .../pmix/src/util/pmix_environ.h | 2 +- .../{pmix3x => pmix2x}/pmix/src/util/printf.c | 2 +- .../{pmix3x => pmix2x}/pmix/src/util/printf.h | 3 +- .../pmix/src/util/show_help.c | 0 .../pmix/src/util/show_help.h | 0 .../pmix/src/util/show_help_lex.h | 0 .../pmix/src/util/show_help_lex.l | 0 .../pmix/src/util/strnlen.h | 1 - .../pmix/src/util/timings.c | 0 .../pmix/src/util/timings.h | 2 +- .../{pmix3x => pmix2x}/pmix/src/util/tsd.h | 0 .../{pmix3x => pmix2x}/pmix/test/Makefile.am | 0 .../pmix/{pmix3x => pmix2x}/pmix/test/README | 0 .../{pmix3x => pmix2x}/pmix/test/cli_stages.c | 1 - .../{pmix3x => pmix2x}/pmix/test/cli_stages.h | 2 - .../pmix/test/pmi2_client.c | 0 .../{pmix3x => pmix2x}/pmix/test/pmi_client.c | 2 +- .../pmix/test/pmix_client.c | 0 .../pmix/test/pmix_client_otheruser.sh | 0 .../{pmix3x => pmix2x}/pmix/test/pmix_regex.c | 3 +- .../{pmix3x => pmix2x}/pmix/test/pmix_test.c | 1 - .../pmix/test/server_callbacks.c | 0 .../pmix/test/server_callbacks.h | 0 .../pmix/test/simple/Makefile.am | 0 .../pmix/test/simple/simpclient.c | 0 .../pmix/test/simple/simpdmodex.c | 0 .../pmix/test/simple/simpdyn.c | 0 .../pmix/test/simple/simpft.c | 0 .../pmix/test/simple/simppub.c | 0 .../pmix/test/simple/simptest.c | 1 - .../pmix/test/simple/simptool.c | 0 .../pmix/pmix2x/pmix/test/simple/test_pmix.c | 67 + .../{pmix3x => pmix2x}/pmix/test/test_cd.c | 3 +- .../{pmix3x => pmix2x}/pmix/test/test_cd.h | 2 +- .../pmix/test/test_common.c | 3 +- .../pmix/test/test_common.h | 2 +- .../{pmix3x => pmix2x}/pmix/test/test_error.c | 0 .../{pmix3x => pmix2x}/pmix/test/test_error.h | 2 +- .../{pmix3x => pmix2x}/pmix/test/test_fence.c | 1 - .../{pmix3x => pmix2x}/pmix/test/test_fence.h | 0 .../pmix/test/test_publish.c | 3 +- .../pmix/test/test_publish.h | 2 +- .../pmix/test/test_resolve_peers.c | 2 +- .../pmix/test/test_resolve_peers.h | 2 +- .../{pmix3x => pmix2x}/pmix/test/test_spawn.c | 3 +- .../{pmix3x => pmix2x}/pmix/test/test_spawn.h | 2 +- .../pmix/{pmix3x => pmix2x}/pmix/test/utils.c | 2 +- .../pmix/{pmix3x => pmix2x}/pmix/test/utils.h | 2 +- .../pmix/{pmix3x/pmix3x.c => pmix2x/pmix2x.c} | 362 ++--- .../pmix/{pmix3x/pmix3x.h => pmix2x/pmix2x.h} | 158 +- .../pmix2x_client.c} | 322 ++-- .../pmix2x_component.c} | 40 +- .../pmix2x_server_north.c} | 256 +-- .../pmix2x_server_south.c} | 134 +- opal/mca/pmix/pmix3x/Makefile.am | 53 - opal/mca/pmix/pmix3x/pmix/src/util/crc.c | 1206 -------------- .../pmix/pmix3x/pmix/test/simple/test_pmix.c | 67 - orte/mca/rml/ofi/rml_ofi_component.c | 1 + 357 files changed, 3158 insertions(+), 7474 deletions(-) rename opal/mca/pmix/{ext3x => ext2x}/common_sym_whitelist.txt (100%) rename opal/mca/pmix/{ext3x/pmix3x.c => ext2x/pmix2x.c} (81%) rename opal/mca/pmix/{ext3x/pmix3x.h => ext2x/pmix2x.h} (69%) rename opal/mca/pmix/ext2x/{pmix_ext2x_client.c => pmix2x_client.c} (80%) rename opal/mca/pmix/ext2x/{pmix_ext2x_component.c => pmix2x_component.c} (92%) rename opal/mca/pmix/{pmix3x/pmix3x_server_north.c => ext2x/pmix2x_server_north.c} (83%) rename opal/mca/pmix/{ext3x/pmix3x_server_south.c => ext2x/pmix2x_server_south.c} (80%) delete mode 100644 opal/mca/pmix/ext2x/pmix_ext2x.c delete mode 100644 opal/mca/pmix/ext2x/pmix_ext2x.h delete mode 100644 opal/mca/pmix/ext2x/pmix_ext2x_server_north.c delete mode 100644 opal/mca/pmix/ext2x/pmix_ext2x_server_south.c delete mode 100644 opal/mca/pmix/ext3x/Makefile.am delete mode 100644 opal/mca/pmix/ext3x/configure.m4 delete mode 100644 opal/mca/pmix/ext3x/pmix3x_client.c delete mode 100644 opal/mca/pmix/ext3x/pmix3x_component.c create mode 100644 opal/mca/pmix/pmix2x/Makefile.am rename opal/mca/pmix/{pmix3x => pmix2x}/autogen.subdirs (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/common_sym_whitelist.txt (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/configure.m4 (54%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/AUTHORS (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/INSTALL (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/LICENSE (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/Makefile.am (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/NEWS (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/README (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/VERSION (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/autogen.pl (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/c_get_alignment.m4 (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/distscript.sh (97%) mode change 100755 => 100644 rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix.m4 (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_attributes.m4 (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_broken_qsort.m4 (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_compiler_version.m4 (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_icc.m4 (96%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_ident.m4 (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_os_flavors.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_package.m4 (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_vendor.m4 (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_check_visibility.m4 (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_config_subdir.m4 (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_config_subdir_args.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_ensure_contains_optflags.m4 (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_functions.m4 (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_get_version.sh (98%) mode change 100755 => 100644 rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_load_platform.m4 (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_mca.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_mca_priority_sort.pl (92%) mode change 100755 => 100644 rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_search_libs.m4 (94%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_setup_cc.m4 (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_setup_hwloc.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/config/pmix_setup_libevent.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/configure.ac (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/contrib/pmix-valgrind.supp (93%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/examples/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/examples/client.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/examples/dmodex.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/examples/dynamic.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/examples/fault.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/examples/pub.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/examples/tool.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmi.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmi2.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmix.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmix_common.h (100%) create mode 100644 opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmix_rename.h.in (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmix_server.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmix_tool.h (100%) create mode 100644 opal/mca/pmix/pmix2x/pmix/include/pmix_version.h rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/include/pmix_version.h.in (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/README (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man3/pmix_abort.3 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man3/pmix_commit.3 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man3/pmix_finalize.3 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man3/pmix_init.3 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man3/pmix_initialized.3 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man3/pmix_put.3 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man7/pmix.7 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/man/man7/pmix_constants.7 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/buffer_ops.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/copy.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/internal.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/internal_functions.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/open_close.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/pack.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/print.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/types.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/buffer_ops/unpack.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_hash_table.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_hash_table.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_hotel.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_hotel.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_list.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_list.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_object.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_object.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_pointer_array.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_pointer_array.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_ring_buffer.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_ring_buffer.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_value_array.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/class/pmix_value_array.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/Makefile.include (91%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmi1.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmi2.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmix_client.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmix_client_connect.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmix_client_fence.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmix_client_get.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmix_client_ops.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmix_client_pub.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/client/pmix_client_spawn.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/common/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/common/pmix_jobdata.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/common/pmix_log.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/common/pmix_query.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/common/pmix_strings.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/dstore/Makefile.include (83%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/dstore/pmix_dstore.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/dstore/pmix_dstore.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/dstore/pmix_esh.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/dstore/pmix_esh.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/event/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/event/pmix_event.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/event/pmix_event_notification.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/event/pmix_event_registration.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/align.h (94%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/hash_string.h (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/pmix_config_bottom.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/pmix_config_top.h (95%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/pmix_globals.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/pmix_globals.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/pmix_jobdata.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/pmix_socket_errno.h (93%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/pmix_stdint.h (56%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/prefetch.h (93%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/include/types.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/Makefile.am (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/base.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/help-mca-base.txt (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/help-mca-var.txt (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_close.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_component_compare.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_component_find.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_component_repository.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_component_repository.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_components_close.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_components_open.c (83%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_components_register.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_components_select.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_framework.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_framework.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_list.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_open.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_parse_paramfile.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_var.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_var.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_var_enum.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_var_enum.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_var_group.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_var_group.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/base/pmix_mca_base_vari.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/mca.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/Makefile.am (94%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/base/Makefile.am (84%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/base/base.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/base/pdl_base_close.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/base/pdl_base_fns.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/base/pdl_base_open.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/base/pdl_base_select.c (96%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/pdl.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/pdlopen/Makefile.am (91%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/pdlopen/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/pdlopen/pdl_pdlopen.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_component.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_module.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/base/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/base/base.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/base/pif_base_components.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/bsdx_ipv4/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/bsdx_ipv4/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/bsdx_ipv4/pif_bsdx.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/bsdx_ipv6/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/bsdx_ipv6/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/bsdx_ipv6/pif_bsdx_ipv6.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/linux_ipv6/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/linux_ipv6/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/linux_ipv6/pif_linux_ipv6.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/pif.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/posix_ipv4/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/posix_ipv4/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/posix_ipv4/pif_posix.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/solaris_ipv6/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/solaris_ipv6/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pif/solaris_ipv6/pif_solaris_ipv6.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/base/Makefile.am (84%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/base/base.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_components.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_expand.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/config/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/config/configure.m4 (99%) create mode 100644 opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h.in (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/config/pmix_pinstalldirs_config.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/env/Makefile.am (87%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/env/configure.m4 (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/env/pmix_pinstalldirs_env.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/pinstalldirs/pinstalldirs.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/base/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/base/base.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/base/psec_base_fns.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/base/psec_base_frame.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/base/psec_base_select.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/munge/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/munge/configure.m4 (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/munge/psec_munge.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/munge/psec_munge.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/munge/psec_munge_component.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/native/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/native/psec_native.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/native/psec_native.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/native/psec_native_component.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/mca/psec/psec.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/help-pmix-runtime.txt (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/pmix_finalize.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/pmix_init.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/pmix_params.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/pmix_progress_threads.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/pmix_progress_threads.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/runtime/pmix_rte.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/help-pmix-server.txt (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/pmix_server.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/pmix_server_get.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/pmix_server_listener.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/pmix_server_ops.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/pmix_server_ops.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/server/pmix_server_regex.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/sm/Makefile.include (82%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/sm/pmix_mmap.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/sm/pmix_mmap.h (86%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/sm/pmix_sm.c (96%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/sm/pmix_sm.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/tool/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/tool/pmix_tool.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/usock/Makefile.am (82%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/usock/usock.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/usock/usock.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/usock/usock_sendrecv.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/Makefile.include (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/argv.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/argv.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/basename.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/basename.h (98%) create mode 100644 opal/mca/pmix/pmix2x/pmix/src/util/crc.c rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/crc.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/error.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/error.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/fd.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/fd.h (96%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/getid.c (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/getid.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/hash.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/hash.h (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/keyval/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/keyval/keyval_lex.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/keyval/keyval_lex.l (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/keyval_parse.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/keyval_parse.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/net.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/net.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/os_path.c (88%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/os_path.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/output.c (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/output.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/path.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/path.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/pif.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/pif.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/pmix_environ.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/pmix_environ.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/printf.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/printf.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/show_help.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/show_help.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/show_help_lex.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/show_help_lex.l (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/strnlen.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/timings.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/timings.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/src/util/tsd.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/README (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/cli_stages.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/cli_stages.h (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/pmi2_client.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/pmi_client.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/pmix_client.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/pmix_client_otheruser.sh (100%) mode change 100755 => 100644 rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/pmix_regex.c (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/pmix_test.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/server_callbacks.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/server_callbacks.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/Makefile.am (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/simpclient.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/simpdmodex.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/simpdyn.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/simpft.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/simppub.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/simptest.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/simple/simptool.c (100%) create mode 100644 opal/mca/pmix/pmix2x/pmix/test/simple/test_pmix.c rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_cd.c (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_cd.h (83%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_common.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_common.h (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_error.c (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_error.h (78%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_fence.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_fence.h (100%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_publish.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_publish.h (83%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_resolve_peers.c (98%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_resolve_peers.h (84%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_spawn.c (97%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/test_spawn.h (83%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/utils.c (99%) rename opal/mca/pmix/{pmix3x => pmix2x}/pmix/test/utils.h (88%) rename opal/mca/pmix/{pmix3x/pmix3x.c => pmix2x/pmix2x.c} (81%) rename opal/mca/pmix/{pmix3x/pmix3x.h => pmix2x/pmix2x.h} (69%) rename opal/mca/pmix/{pmix3x/pmix3x_client.c => pmix2x/pmix2x_client.c} (79%) rename opal/mca/pmix/{pmix3x/pmix3x_component.c => pmix2x/pmix2x_component.c} (73%) rename opal/mca/pmix/{ext3x/pmix3x_server_north.c => pmix2x/pmix2x_server_north.c} (83%) rename opal/mca/pmix/{pmix3x/pmix3x_server_south.c => pmix2x/pmix2x_server_south.c} (80%) delete mode 100644 opal/mca/pmix/pmix3x/Makefile.am delete mode 100644 opal/mca/pmix/pmix3x/pmix/src/util/crc.c delete mode 100644 opal/mca/pmix/pmix3x/pmix/test/simple/test_pmix.c diff --git a/.gitignore b/.gitignore index 64d7870b051..1049aad9b31 100644 --- a/.gitignore +++ b/.gitignore @@ -309,15 +309,15 @@ opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h.in opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h opal/mca/hwloc/base/static-components.h.new.extern opal/mca/hwloc/base/static-components.h.new.struct -opal/mca/pmix/pmix3x/pmix/src/include/frameworks.h -opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h -opal/mca/pmix/pmix3x/pmix/config/autogen_found_items.m4 -opal/mca/pmix/pmix3x/pmix/src/include/pmix_config.h -opal/mca/pmix/pmix3x/pmix/src/include/pmix_config.h.in -opal/mca/pmix/pmix3x/pmix/include/pmix_rename.h -opal/mca/pmix/pmix3x/pmix/include/pmix_version.h -opal/mca/pmix/pmix3x/pmix/src/util/keyval/keyval_lex.c -opal/mca/pmix/pmix3x/pmix/src/util/show_help_lex.c +opal/mca/pmix/pmix2x/pmix/src/include/frameworks.h +opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h +opal/mca/pmix/pmix2x/pmix/config/autogen_found_items.m4 +opal/mca/pmix/pmix2x/pmix/src/include/pmix_config.h +opal/mca/pmix/pmix2x/pmix/src/include/pmix_config.h.in +opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h +opal/mca/pmix/pmix2x/pmix/include/pmix_version.h +opal/mca/pmix/pmix2x/pmix/src/util/keyval/keyval_lex.c +opal/mca/pmix/pmix2x/pmix/src/util/show_help_lex.c opal/tools/opal-checkpoint/opal-checkpoint opal/tools/opal-checkpoint/opal-checkpoint.1 diff --git a/config/opal_check_pmi.m4 b/config/opal_check_pmi.m4 index b24de6339cd..7c25ab14f11 100644 --- a/config/opal_check_pmi.m4 +++ b/config/opal_check_pmi.m4 @@ -281,7 +281,7 @@ AC_DEFUN([OPAL_CHECK_PMIX],[ #endif ], [])], [AC_MSG_RESULT([found]) - opal_external_pmix_version=3X + opal_external_pmix_version=3x opal_external_pmix_version_found=1], [AC_MSG_RESULT([not found])])]) @@ -294,7 +294,7 @@ AC_DEFUN([OPAL_CHECK_PMIX],[ #endif ], [])], [AC_MSG_RESULT([found]) - opal_external_pmix_version=2X + opal_external_pmix_version=2x opal_external_pmix_version_found=1], [AC_MSG_RESULT([not found])])]) @@ -307,7 +307,7 @@ AC_DEFUN([OPAL_CHECK_PMIX],[ #endif ], [])], [AC_MSG_RESULT([found]) - opal_external_pmix_version=1X + opal_external_pmix_version=1x opal_external_pmix_version_found=1], [AC_MSG_RESULT([not found])])]) diff --git a/opal/mca/pmix/ext11/configure.m4 b/opal/mca/pmix/ext11/configure.m4 index 568a7707283..d9a3f9f86c0 100644 --- a/opal/mca/pmix/ext11/configure.m4 +++ b/opal/mca/pmix/ext11/configure.m4 @@ -45,7 +45,7 @@ AC_DEFUN([MCA_opal_pmix_ext11_CONFIG],[ # check for the 1.1.4 version AC_MSG_CHECKING([if external component is version 1.1.4]) AS_IF([test "$opal_external_pmix_version" = "11" || - test "$opal_external_pmix_version" = "1X"], + test "$opal_external_pmix_version" = "1x"], [AC_MSG_RESULT([yes]) opal_pmix_external_11_happy=yes], [AC_MSG_RESULT([no]) diff --git a/opal/mca/pmix/ext2x/Makefile.am b/opal/mca/pmix/ext2x/Makefile.am index 25576a76bed..15af0868d2f 100644 --- a/opal/mca/pmix/ext2x/Makefile.am +++ b/opal/mca/pmix/ext2x/Makefile.am @@ -1,8 +1,8 @@ # -# Copyright (c) 2x14-2x16 Intel, Inc. All rights reserved. -# Copyright (c) 2x15 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2x14-2x15 Mellanox Technologies, Inc. -# All rights reserved. +# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -11,12 +11,12 @@ # sources = \ - pmix_ext2x.h \ - pmix_ext2x_component.c \ - pmix_ext2x.c \ - pmix_ext2x_client.c \ - pmix_ext2x_server_south.c \ - pmix_ext2x_server_north.c + pmix2x.h \ + pmix2x_component.c \ + pmix2x.c \ + pmix2x_client.c \ + pmix2x_server_south.c \ + pmix2x_server_north.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la @@ -33,14 +33,14 @@ endif mcacomponentdir = $(opallibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_pmix_ext2x_la_SOURCES = $(sources) -mca_pmix_ext2x_la_CFLAGS = -mca_pmix_ext2x_la_CPPFLAGS = $(opal_pmix_ext2x_CPPFLAGS) +mca_pmix_ext2x_la_CFLAGS = $(opal_pmix_ext2x_CFLAGS) +mca_pmix_ext2x_la_CPPFLAGS =$(opal_pmix_ext2x_CPPFLAGS) mca_pmix_ext2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext2x_LDFLAGS) mca_pmix_ext2x_la_LIBADD = $(opal_pmix_ext2x_LIBS) noinst_LTLIBRARIES = $(component_noinst) libmca_pmix_ext2x_la_SOURCES =$(sources) -libmca_pmix_ext2x_la_CFLAGS = +libmca_pmix_ext2x_la_CFLAGS = $(opal_pmix_ext2x_CFLAGS) libmca_pmix_ext2x_la_CPPFLAGS = $(opal_pmix_ext2x_CPPFLAGS) libmca_pmix_ext2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext2x_LDFLAGS) libmca_pmix_ext2x_la_LIBADD = $(opal_pmix_ext2x_LIBS) diff --git a/opal/mca/pmix/ext3x/common_sym_whitelist.txt b/opal/mca/pmix/ext2x/common_sym_whitelist.txt similarity index 100% rename from opal/mca/pmix/ext3x/common_sym_whitelist.txt rename to opal/mca/pmix/ext2x/common_sym_whitelist.txt diff --git a/opal/mca/pmix/ext2x/configure.m4 b/opal/mca/pmix/ext2x/configure.m4 index a0528d0e310..a320eb65db5 100644 --- a/opal/mca/pmix/ext2x/configure.m4 +++ b/opal/mca/pmix/ext2x/configure.m4 @@ -1,23 +1,21 @@ # -*- shell-script -*- # -# Copyright (c) 2x04-2x05 The Trustees of Indiana University and Indiana +# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. -# Copyright (c) 2x04-2x05 The University of Tennessee and The University +# Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2x04-2x05 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. -# Copyright (c) 2x04-2x05 The Regents of the University of California. +# Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2x11-2x13 Los Alamos National Security, LLC. +# Copyright (c) 2011-2013 Los Alamos National Security, LLC. # All rights reserved. -# Copyright (c) 2x10-2x15 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2x13-2x16 Intel, Inc. All rights reserved. -# Copyright (c) 2x15 Research Organization for Information Science +# Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2013-2016 Intel, Inc. All rights reserved. +# Copyright (c) 2015-2016 Research Organization for Information Science # and Technology (RIST). All rights reserved. -# Copyright (c) 2x14-2x15 Mellanox Technologies, Inc. -# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -30,36 +28,33 @@ AC_DEFUN([MCA_opal_pmix_ext2x_CONFIG],[ AC_CONFIG_FILES([opal/mca/pmix/ext2x/Makefile]) + # check to see + # if we are linking to an external v2.x library. If not, then + # do not use this component. + AC_MSG_CHECKING([if external v2.x component is to be used]) AS_IF([test "$opal_external_pmix_happy" = "yes"], - [AS_IF([test "$opal_event_external_support" != "yes"], - [AC_MSG_WARN([EXTERNAL PMIX SUPPORT REQUIRES USE OF EXTERNAL LIBEVENT]) - AC_MSG_WARN([LIBRARY. THIS LIBRARY MUST POINT TO THE SAME ONE USED]) - AC_MSG_WARN([TO BUILD PMIX OR ELSE UNPREDICTABLE BEHAVIOR MAY RESULT]) - AC_MSG_ERROR([PLEASE CORRECT THE CONFIGURE COMMAND LINE AND REBUILD])]) - AS_IF([test "$opal_hwloc_external_support" != "yes"], - [AC_MSG_WARN([EXTERNAL PMIX SUPPORT REQUIRES USE OF EXTERNAL HWLOC]) - AC_MSG_WARN([LIBRARY THIS LIBRARY MUST POINT TO THE SAME ONE USED ]) - AC_MSG_WARN([TO BUILD PMIX OR ELSE UNPREDICTABLE BEHAVIOR MAY RESULT]) - AC_MSG_ERROR([PLEASE CORRECT THE CONFIGURE COMMAND LINE AND REBUILD])]) - external_WRAPPER_EXTRA_CPPFLAGS='-I${includedir}/openmpi/$opal_pmix_external_basedir/pmix -I${includedir}/openmpi/$opal_pmix_external_basedir/pmix/include' - - AC_MSG_CHECKING([if external component is version 2.x]) - AS_IF([test "$opal_external_pmix_version" = "2X"], - [AC_MSG_RESULT([yes]) - opal_pmix_ext2x_happy=yes], - [AC_MSG_RESULT([no]) - opal_pmix_ext2x_happy=no]) + [AS_IF([test "$opal_external_pmix_version" = "2x"], + [AC_MSG_RESULT([yes - using an external v2.x library]) + opal_pmix_ext2x_happy=1 + # Build flags for our Makefile.am + opal_pmix_ext2x_CPPFLAGS=$opal_external_pmix_CPPFLAGS + opal_pmix_ext2x_LDFLAGS=$opal_external_pmix_LDFLAGS + opal_pmix_ext2x_LIBS=$opal_external_pmix_LIBS + # setup wrapper flags + pmix_ext2x_WRAPPER_EXTRA_LDFLAGS=$opal_external_pmix_LDFLAGS + pmix_ext2x_WRAPPER_EXTRA_LIBS=$opal_external_pmix_LIBS], + [AC_MSG_RESULT([no - disqualifying this component]) + opal_pmix_ext2x_happy=0])], + [AC_MSG_RESULT([no - disqualifying this component]) + opal_pmix_ext2x_happy=0]) - opal_pmix_ext2x_CPPFLAGS=$opal_external_pmix_CPPFLAGS - opal_pmix_ext2x_LDFLAGS=$opal_external_pmix_LDFLAGS - opal_pmix_ext2x_LIBS=$opal_external_pmix_LIBS + AC_SUBST([opal_pmix_ext2x_LIBS]) + AC_SUBST([opal_pmix_ext2x_CPPFLAGS]) + AC_SUBST([opal_pmix_ext2x_LDFLAGS]) + AC_SUBST([opal_pmix_ext2x_DEPENDENCIES]) - AC_SUBST(opal_pmix_ext2x_CPPFLAGS) - AC_SUBST(opal_pmix_ext2x_LDFLAGS) - AC_SUBST(opal_pmix_ext2x_LIBS) - - AS_IF([test "$opal_pmix_ext2x_happy" = "yes"], - [$1], - [$2])], + AS_IF([test $opal_pmix_ext2x_happy -eq 1], + [$1], [$2]) + ])dnl diff --git a/opal/mca/pmix/ext3x/pmix3x.c b/opal/mca/pmix/ext2x/pmix2x.c similarity index 81% rename from opal/mca/pmix/ext3x/pmix3x.c rename to opal/mca/pmix/ext2x/pmix2x.c index a6bcb39fece..4944e3a6ffc 100644 --- a/opal/mca/pmix/ext3x/pmix3x.c +++ b/opal/mca/pmix/ext2x/pmix2x.c @@ -35,7 +35,7 @@ #include "opal/util/proc.h" #include "opal/util/show_help.h" -#include "pmix3x.h" +#include "pmix2x.h" #include "opal/mca/pmix/base/base.h" #include "opal/mca/pmix/pmix_types.h" @@ -47,8 +47,8 @@ /* These are functions used by both client and server to * access common functions in the embedded PMIx library */ -static const char *pmix3x_get_nspace(opal_jobid_t jobid); -static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace); +static const char *pmix2x_get_nspace(opal_jobid_t jobid); +static void pmix2x_register_jobid(opal_jobid_t jobid, const char *nspace); static void register_handler(opal_list_t *event_codes, opal_list_t *info, opal_pmix_notification_fn_t evhandler, @@ -62,66 +62,66 @@ static int notify_event(int status, opal_pmix_data_range_t range, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -static void pmix3x_query(opal_list_t *queries, +static void pmix2x_query(opal_list_t *queries, opal_pmix_info_cbfunc_t cbfunc, void *cbdata); -static void pmix3x_log(opal_list_t *info, +static void pmix2x_log(opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -const opal_pmix_base_module_t opal_pmix_ext3x_module = { +const opal_pmix_base_module_t opal_pmix_ext2x_module = { /* client APIs */ - .init = pmix3x_client_init, - .finalize = pmix3x_client_finalize, - .initialized = pmix3x_initialized, - .abort = pmix3x_abort, - .commit = pmix3x_commit, - .fence = pmix3x_fence, - .fence_nb = pmix3x_fencenb, - .put = pmix3x_put, - .get = pmix3x_get, - .get_nb = pmix3x_getnb, - .publish = pmix3x_publish, - .publish_nb = pmix3x_publishnb, - .lookup = pmix3x_lookup, - .lookup_nb = pmix3x_lookupnb, - .unpublish = pmix3x_unpublish, - .unpublish_nb = pmix3x_unpublishnb, - .spawn = pmix3x_spawn, - .spawn_nb = pmix3x_spawnnb, - .connect = pmix3x_connect, - .connect_nb = pmix3x_connectnb, - .disconnect = pmix3x_disconnect, - .disconnect_nb = pmix3x_disconnectnb, - .resolve_peers = pmix3x_resolve_peers, - .resolve_nodes = pmix3x_resolve_nodes, - .query = pmix3x_query, - .log = pmix3x_log, + .init = pmix2x_client_init, + .finalize = pmix2x_client_finalize, + .initialized = pmix2x_initialized, + .abort = pmix2x_abort, + .commit = pmix2x_commit, + .fence = pmix2x_fence, + .fence_nb = pmix2x_fencenb, + .put = pmix2x_put, + .get = pmix2x_get, + .get_nb = pmix2x_getnb, + .publish = pmix2x_publish, + .publish_nb = pmix2x_publishnb, + .lookup = pmix2x_lookup, + .lookup_nb = pmix2x_lookupnb, + .unpublish = pmix2x_unpublish, + .unpublish_nb = pmix2x_unpublishnb, + .spawn = pmix2x_spawn, + .spawn_nb = pmix2x_spawnnb, + .connect = pmix2x_connect, + .connect_nb = pmix2x_connectnb, + .disconnect = pmix2x_disconnect, + .disconnect_nb = pmix2x_disconnectnb, + .resolve_peers = pmix2x_resolve_peers, + .resolve_nodes = pmix2x_resolve_nodes, + .query = pmix2x_query, + .log = pmix2x_log, /* server APIs */ - .server_init = pmix3x_server_init, - .server_finalize = pmix3x_server_finalize, - .generate_regex = pmix3x_server_gen_regex, - .generate_ppn = pmix3x_server_gen_ppn, - .server_register_nspace = pmix3x_server_register_nspace, - .server_deregister_nspace = pmix3x_server_deregister_nspace, - .server_register_client = pmix3x_server_register_client, - .server_deregister_client = pmix3x_server_deregister_client, - .server_setup_fork = pmix3x_server_setup_fork, - .server_dmodex_request = pmix3x_server_dmodex, - .server_notify_event = pmix3x_server_notify_event, + .server_init = pmix2x_server_init, + .server_finalize = pmix2x_server_finalize, + .generate_regex = pmix2x_server_gen_regex, + .generate_ppn = pmix2x_server_gen_ppn, + .server_register_nspace = pmix2x_server_register_nspace, + .server_deregister_nspace = pmix2x_server_deregister_nspace, + .server_register_client = pmix2x_server_register_client, + .server_deregister_client = pmix2x_server_deregister_client, + .server_setup_fork = pmix2x_server_setup_fork, + .server_dmodex_request = pmix2x_server_dmodex, + .server_notify_event = pmix2x_server_notify_event, /* utility APIs */ .get_version = PMIx_Get_version, .register_evhandler = register_handler, .deregister_evhandler = deregister_handler, .notify_event = notify_event, - .store_local = pmix3x_store_local, - .get_nspace = pmix3x_get_nspace, - .register_jobid = pmix3x_register_jobid + .store_local = pmix2x_store_local, + .get_nspace = pmix2x_get_nspace, + .register_jobid = pmix2x_register_jobid }; -static const char *pmix3x_get_nspace(opal_jobid_t jobid) +static const char *pmix2x_get_nspace(opal_jobid_t jobid) { - opal_pmix3x_jobid_trkr_t *jptr; + opal_pmix2x_jobid_trkr_t *jptr; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { return jptr->nspace; } @@ -129,25 +129,25 @@ static const char *pmix3x_get_nspace(opal_jobid_t jobid) return NULL; } -static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace) +static void pmix2x_register_jobid(opal_jobid_t jobid, const char *nspace) { - opal_pmix3x_jobid_trkr_t *jptr; + opal_pmix2x_jobid_trkr_t *jptr; /* if we don't already have it, add this to our jobid tracker */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { return; } } - jptr = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + jptr = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN); jptr->jobid = jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &jptr->super); + opal_list_append(&mca_pmix_ext2x_component.jobids, &jptr->super); } static void completion_handler(int status, void *cbdata) { - opal_pmix3x_event_chain_t *chain = (opal_pmix3x_event_chain_t*)cbdata; + opal_pmix2x_event_chain_t *chain = (opal_pmix2x_event_chain_t*)cbdata; if (NULL != chain->info) { OPAL_LIST_RELEASE(chain->info); } @@ -158,12 +158,12 @@ static void progress_local_event_hdlr(int status, opal_pmix_op_cbfunc_t cbfunc, void *thiscbdata, void *notification_cbdata) { - opal_pmix3x_event_chain_t *chain = (opal_pmix3x_event_chain_t*)notification_cbdata; + opal_pmix2x_event_chain_t *chain = (opal_pmix2x_event_chain_t*)notification_cbdata; size_t n; opal_list_item_t *nxt; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; /* if the caller indicates that the chain is completed, then stop here */ if (OPAL_ERR_HANDLERS_COMPLETE == status) { @@ -181,8 +181,8 @@ static void progress_local_event_hdlr(int status, if (NULL != chain->sing) { /* the last handler was for a single code - see if there are * any others that match this event */ - while (opal_list_get_end(&mca_pmix_ext3x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) { - sing = (opal_pmix3x_single_event_t*)nxt; + while (opal_list_get_end(&mca_pmix_ext2x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) { + sing = (opal_pmix2x_single_event_t*)nxt; if (sing->code == chain->status) { OBJ_RETAIN(chain); chain->sing = sing; @@ -199,15 +199,15 @@ static void progress_local_event_hdlr(int status, * events that match */ chain->sing = NULL; /* pickup the beginning of the multi-code event list */ - if (0 < opal_list_get_size(&mca_pmix_ext3x_component.multi_events)) { - chain->multi = (opal_pmix3x_multi_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.multi_events); + if (0 < opal_list_get_size(&mca_pmix_ext2x_component.multi_events)) { + chain->multi = (opal_pmix2x_multi_event_t*)opal_list_get_begin(&mca_pmix_ext2x_component.multi_events); } } /* see if we need to continue with the multi code events */ if (NULL != chain->multi) { - while (opal_list_get_end(&mca_pmix_ext3x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) { - multi = (opal_pmix3x_multi_event_t*)nxt; + while (opal_list_get_end(&mca_pmix_ext2x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) { + multi = (opal_pmix2x_multi_event_t*)nxt; for (n=0; n < multi->ncodes; n++) { if (multi->codes[n] == chain->status) { /* found it - invoke the handler, pointing its @@ -228,8 +228,8 @@ static void progress_local_event_hdlr(int status, * events that match */ chain->multi = NULL; /* pickup the beginning of the default event list */ - if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) { - chain->def = (opal_pmix3x_default_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.default_events); + if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) { + chain->def = (opal_pmix2x_default_event_t*)opal_list_get_begin(&mca_pmix_ext2x_component.default_events); } } @@ -239,8 +239,8 @@ static void progress_local_event_hdlr(int status, } if (NULL != chain->def) { - if (opal_list_get_end(&mca_pmix_ext3x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) { - def = (opal_pmix3x_default_event_t*)nxt; + if (opal_list_get_end(&mca_pmix_ext2x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) { + def = (opal_pmix2x_default_event_t*)nxt; OBJ_RETAIN(chain); chain->def = def; opal_output_verbose(2, opal_pmix_base_framework.framework_output, @@ -267,18 +267,18 @@ static void progress_local_event_hdlr(int status, static void _event_hdlr(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; size_t n; - opal_pmix3x_event_chain_t *chain; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + opal_pmix2x_event_chain_t *chain; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s _EVENT_HDLR RECEIVED NOTIFICATION OF STATUS %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), cd->status); - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); /* point it at our final callback */ chain->final_cbfunc = completion_handler; chain->final_cbdata = chain; @@ -290,7 +290,7 @@ static void _event_hdlr(int sd, short args, void *cbdata) chain->nondefault = cd->nondefault; /* cycle thru the single-event registrations first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) { + OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_pmix2x_single_event_t) { if (sing->code == chain->status) { /* found it - invoke the handler, pointing its * callback function to our progression function */ @@ -308,7 +308,7 @@ static void _event_hdlr(int sd, short args, void *cbdata) /* if we didn't find any match in the single-event registrations, * then cycle thru the multi-event registrations next */ - OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) { + OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_pmix2x_multi_event_t) { for (n=0; n < multi->ncodes; n++) { if (multi->codes[n] == chain->status) { /* found it - invoke the handler, pointing its @@ -330,7 +330,7 @@ static void _event_hdlr(int sd, short args, void *cbdata) if (chain->nondefault) { /* if we get here, then we need to cache this event in case they * register for it later - we cannot lose individual events */ - opal_list_append(&mca_pmix_ext3x_component.cache, &chain->super); + opal_list_append(&mca_pmix_ext2x_component.cache, &chain->super); return; } @@ -338,8 +338,8 @@ static void _event_hdlr(int sd, short args, void *cbdata) OBJ_RELEASE(cd); /* finally, pass it to any default handlers */ - if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) { - def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events); + if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) { + def = (opal_pmix2x_default_event_t*)opal_list_get_first(&mca_pmix_ext2x_component.default_events); OBJ_RETAIN(chain); chain->def = def; opal_output_verbose(2, opal_pmix_base_framework.framework_output, @@ -364,14 +364,14 @@ static void _event_hdlr(int sd, short args, void *cbdata) * by mpirun), directly from a RM (when direct launched), or * from another process (via the local daemon). * The call will occur in the PMIx event base */ -void pmix3x_event_hdlr(size_t evhdlr_registration_id, +void pmix2x_event_hdlr(size_t evhdlr_registration_id, pmix_status_t status, const pmix_proc_t *source, pmix_info_t info[], size_t ninfo, pmix_info_t results[], size_t nresults, pmix_event_notification_cbfunc_fn_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; int rc; opal_value_t *iptr; size_t n; @@ -384,10 +384,10 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, "%s RECEIVED NOTIFICATION OF STATUS %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status); - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); /* convert the incoming status */ - cd->status = pmix3x_convert_rc(status); + cd->status = pmix2x_convert_rc(status); opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s CONVERTED STATUS %d TO STATUS %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status, cd->status); @@ -402,7 +402,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, OBJ_RELEASE(cd); return; } - cd->pname.vpid = pmix3x_convert_rank(source->rank); + cd->pname.vpid = pmix2x_convert_rank(source->rank); } /* convert the array of info */ @@ -414,7 +414,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, } iptr = OBJ_NEW(opal_value_t); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OPAL_ERROR_LOG(rc); OBJ_RELEASE(iptr); continue; @@ -435,7 +435,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, } } -opal_vpid_t pmix3x_convert_rank(int rank) +opal_vpid_t pmix2x_convert_rank(int rank) { switch(rank) { case PMIX_RANK_UNDEF: @@ -447,7 +447,7 @@ opal_vpid_t pmix3x_convert_rank(int rank) } } -pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid) +pmix_rank_t pmix2x_convert_opalrank(opal_vpid_t vpid) { switch(vpid) { case OPAL_VPID_WILDCARD: @@ -459,7 +459,7 @@ pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid) } } -pmix_status_t pmix3x_convert_opalrc(int rc) +pmix_status_t pmix2x_convert_opalrc(int rc) { switch (rc) { case OPAL_ERR_DEBUGGER_RELEASE: @@ -540,7 +540,7 @@ pmix_status_t pmix3x_convert_opalrc(int rc) } } -int pmix3x_convert_rc(pmix_status_t rc) +int pmix2x_convert_rc(pmix_status_t rc) { switch (rc) { case PMIX_ERR_DEBUGGER_RELEASE: @@ -624,7 +624,7 @@ int pmix3x_convert_rc(pmix_status_t rc) } } -opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope) +opal_pmix_scope_t pmix2x_convert_scope(pmix_scope_t scope) { switch(scope) { case PMIX_SCOPE_UNDEF: @@ -640,7 +640,7 @@ opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope) } } -pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope) { +pmix_scope_t pmix2x_convert_opalscope(opal_pmix_scope_t scope) { switch(scope) { case OPAL_PMIX_LOCAL: return PMIX_LOCAL; @@ -653,7 +653,7 @@ pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope) { } } -pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range) { +pmix_data_range_t pmix2x_convert_opalrange(opal_pmix_data_range_t range) { switch(range) { case OPAL_PMIX_RANGE_UNDEF: return PMIX_RANGE_UNDEF; @@ -672,7 +672,7 @@ pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range) { } } -opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range) { +opal_pmix_data_range_t pmix2x_convert_range(pmix_data_range_t range) { switch(range) { case PMIX_RANGE_UNDEF: return OPAL_PMIX_RANGE_UNDEF; @@ -691,7 +691,7 @@ opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range) { } } -opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t persist) +opal_pmix_persistence_t pmix2x_convert_persist(pmix_persistence_t persist) { switch(persist) { case PMIX_PERSIST_INDEF: @@ -709,7 +709,7 @@ opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t persist) } } -pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t persist) +pmix_persistence_t pmix2x_convert_opalpersist(opal_pmix_persistence_t persist) { switch(persist) { case OPAL_PMIX_PERSIST_INDEF: @@ -730,7 +730,7 @@ pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t persist) /**** RHC: NEED TO ADD SUPPORT FOR NEW PMIX DATA TYPES, INCLUDING **** CONVERSION OF PROC STATES ****/ -void pmix3x_value_load(pmix_value_t *v, +void pmix2x_value_load(pmix_value_t *v, opal_value_t *kv) { switch(kv->type) { @@ -823,14 +823,14 @@ void pmix3x_value_load(pmix_value_t *v, break; case OPAL_VPID: v->type = PMIX_PROC_RANK; - v->data.rank = pmix3x_convert_opalrank(kv->data.name.vpid); + v->data.rank = pmix2x_convert_opalrank(kv->data.name.vpid); break; case OPAL_NAME: v->type = PMIX_PROC; /* have to stringify the jobid */ PMIX_PROC_CREATE(v->data.proc, 1); (void)opal_snprintf_jobid(v->data.proc->nspace, PMIX_MAX_NSLEN, kv->data.name.vpid); - v->data.proc->rank = pmix3x_convert_opalrank(kv->data.name.vpid); + v->data.proc->rank = pmix2x_convert_opalrank(kv->data.name.vpid); break; case OPAL_BYTE_OBJECT: v->type = PMIX_BYTE_OBJECT; @@ -845,15 +845,15 @@ void pmix3x_value_load(pmix_value_t *v, break; case OPAL_PERSIST: v->type = PMIX_PERSIST; - v->data.persist = pmix3x_convert_opalpersist(kv->data.uint8); + v->data.persist = pmix2x_convert_opalpersist(kv->data.uint8); break; case OPAL_SCOPE: v->type = PMIX_SCOPE; - v->data.scope = pmix3x_convert_opalscope(kv->data.uint8); + v->data.scope = pmix2x_convert_opalscope(kv->data.uint8); break; case OPAL_DATA_RANGE: v->type = PMIX_DATA_RANGE; - v->data.range = pmix3x_convert_opalrange(kv->data.uint8); + v->data.range = pmix2x_convert_opalrange(kv->data.uint8); break; case OPAL_PROC_STATE: v->type = PMIX_PROC_STATE; @@ -871,7 +871,7 @@ void pmix3x_value_load(pmix_value_t *v, } } -int pmix3x_value_unload(opal_value_t *kv, +int pmix2x_value_unload(opal_value_t *kv, const pmix_value_t *v) { int rc=OPAL_SUCCESS; @@ -965,14 +965,14 @@ int pmix3x_value_unload(opal_value_t *kv, break; case PMIX_PROC_RANK: kv->type = OPAL_VPID; - kv->data.name.vpid = pmix3x_convert_rank(v->data.rank); + kv->data.name.vpid = pmix2x_convert_rank(v->data.rank); break; case PMIX_PROC: kv->type = OPAL_NAME; if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&kv->data.name.jobid, v->data.proc->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - kv->data.name.vpid = pmix3x_convert_rank(v->data.proc->rank); + kv->data.name.vpid = pmix2x_convert_rank(v->data.proc->rank); break; case PMIX_BYTE_OBJECT: kv->type = OPAL_BYTE_OBJECT; @@ -987,15 +987,15 @@ int pmix3x_value_unload(opal_value_t *kv, break; case PMIX_PERSIST: kv->type = OPAL_PERSIST; - kv->data.uint8 = pmix3x_convert_persist(v->data.persist); + kv->data.uint8 = pmix2x_convert_persist(v->data.persist); break; case PMIX_SCOPE: kv->type = OPAL_SCOPE; - kv->data.uint8 = pmix3x_convert_scope(v->data.scope); + kv->data.uint8 = pmix2x_convert_scope(v->data.scope); break; case PMIX_DATA_RANGE: kv->type = OPAL_DATA_RANGE; - kv->data.uint8 = pmix3x_convert_range(v->data.range); + kv->data.uint8 = pmix2x_convert_range(v->data.range); break; case PMIX_PROC_STATE: kv->type = OPAL_PROC_STATE; @@ -1017,11 +1017,11 @@ int pmix3x_value_unload(opal_value_t *kv, static void _reg_hdlr(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_event_chain_t *chain; - opal_pmix3x_single_event_t *sing = NULL; - opal_pmix3x_multi_event_t *multi = NULL; - opal_pmix3x_default_event_t *def = NULL; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_event_chain_t *chain; + opal_pmix2x_single_event_t *sing = NULL; + opal_pmix2x_multi_event_t *multi = NULL; + opal_pmix2x_default_event_t *def = NULL; opal_value_t *kv; int i; bool prepend = false; @@ -1043,40 +1043,40 @@ static void _reg_hdlr(int sd, short args, void *cbdata) if (NULL == cd->event_codes) { /* this is a default handler */ - def = OBJ_NEW(opal_pmix3x_default_event_t); + def = OBJ_NEW(opal_pmix2x_default_event_t); def->handler = cd->evhandler; - def->index = mca_pmix_ext3x_component.evindex; + def->index = mca_pmix_ext2x_component.evindex; if (prepend) { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s PREPENDING TO DEFAULT EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_prepend(&mca_pmix_ext3x_component.default_events, &def->super); + opal_list_prepend(&mca_pmix_ext2x_component.default_events, &def->super); } else { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s APPENDING TO DEFAULT EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_append(&mca_pmix_ext3x_component.default_events, &def->super); + opal_list_append(&mca_pmix_ext2x_component.default_events, &def->super); } } else if (1 == opal_list_get_size(cd->event_codes)) { /* single handler */ - sing = OBJ_NEW(opal_pmix3x_single_event_t); + sing = OBJ_NEW(opal_pmix2x_single_event_t); kv = (opal_value_t*)opal_list_get_first(cd->event_codes); sing->code = kv->data.integer; - sing->index = mca_pmix_ext3x_component.evindex; + sing->index = mca_pmix_ext2x_component.evindex; sing->handler = cd->evhandler; if (prepend) { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s PREPENDING TO SINGLE EVENTS WITH CODE %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code); - opal_list_prepend(&mca_pmix_ext3x_component.single_events, &sing->super); + opal_list_prepend(&mca_pmix_ext2x_component.single_events, &sing->super); } else { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s APPENDING TO SINGLE EVENTS WITH CODE %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code); - opal_list_append(&mca_pmix_ext3x_component.single_events, &sing->super); + opal_list_append(&mca_pmix_ext2x_component.single_events, &sing->super); } } else { - multi = OBJ_NEW(opal_pmix3x_multi_event_t); + multi = OBJ_NEW(opal_pmix2x_multi_event_t); multi->ncodes = opal_list_get_size(cd->event_codes); multi->codes = (int*)malloc(multi->ncodes * sizeof(int)); i=0; @@ -1084,35 +1084,35 @@ static void _reg_hdlr(int sd, short args, void *cbdata) multi->codes[i] = kv->data.integer; ++i; } - multi->index = mca_pmix_ext3x_component.evindex; + multi->index = mca_pmix_ext2x_component.evindex; multi->handler = cd->evhandler; if (prepend) { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s PREPENDING TO MULTI EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_prepend(&mca_pmix_ext3x_component.multi_events, &multi->super); + opal_list_prepend(&mca_pmix_ext2x_component.multi_events, &multi->super); } else { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s APPENDING TO MULTI EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_append(&mca_pmix_ext3x_component.multi_events, &multi->super); + opal_list_append(&mca_pmix_ext2x_component.multi_events, &multi->super); } } /* release the caller */ if (NULL != cd->cbfunc) { - cd->cbfunc(OPAL_SUCCESS, mca_pmix_ext3x_component.evindex, cd->cbdata); + cd->cbfunc(OPAL_SUCCESS, mca_pmix_ext2x_component.evindex, cd->cbdata); } - mca_pmix_ext3x_component.evindex++; + mca_pmix_ext2x_component.evindex++; /* check if any matching notifications have been cached - only nondefault * events will have been cached*/ if (NULL == def) { /* check single code registrations */ if (NULL != sing) { - OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) { + OPAL_LIST_FOREACH(chain, &mca_pmix_ext2x_component.cache, opal_pmix2x_event_chain_t) { if (sing->code == chain->status) { - opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super); + opal_list_remove_item(&mca_pmix_ext2x_component.cache, &chain->super); chain->sing = sing; sing->handler(chain->status, &chain->source, chain->info, &chain->results, @@ -1123,10 +1123,10 @@ static void _reg_hdlr(int sd, short args, void *cbdata) } } else if (NULL != multi) { /* check for multi code registrations */ - OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) { + OPAL_LIST_FOREACH(chain, &mca_pmix_ext2x_component.cache, opal_pmix2x_event_chain_t) { for (n=0; n < multi->ncodes; n++) { if (multi->codes[n] == chain->status) { - opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super); + opal_list_remove_item(&mca_pmix_ext2x_component.cache, &chain->super); chain->multi = multi; multi->handler(chain->status, &chain->source, chain->info, &chain->results, @@ -1157,31 +1157,31 @@ static void register_handler(opal_list_t *event_codes, static void _dereg_hdlr(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; /* check the single events first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) { + OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_pmix2x_single_event_t) { if (cd->handler == sing->index) { - opal_list_remove_item(&mca_pmix_ext3x_component.single_events, &sing->super); + opal_list_remove_item(&mca_pmix_ext2x_component.single_events, &sing->super); OBJ_RELEASE(sing); goto release; } } /* check multi events */ - OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) { + OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_pmix2x_multi_event_t) { if (cd->handler == multi->index) { - opal_list_remove_item(&mca_pmix_ext3x_component.multi_events, &multi->super); + opal_list_remove_item(&mca_pmix_ext2x_component.multi_events, &multi->super); OBJ_RELEASE(multi); goto release; } } /* check default events */ - OPAL_LIST_FOREACH(def, &mca_pmix_ext3x_component.default_events, opal_pmix3x_default_event_t) { + OPAL_LIST_FOREACH(def, &mca_pmix_ext2x_component.default_events, opal_pmix2x_default_event_t) { if (cd->handler == def->index) { - opal_list_remove_item(&mca_pmix_ext3x_component.default_events, &def->super); + opal_list_remove_item(&mca_pmix_ext2x_component.default_events, &def->super); OBJ_RELEASE(def); break; } @@ -1206,21 +1206,21 @@ static void deregister_handler(size_t evhandler, static void _notify_event(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; size_t i; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; - opal_pmix3x_event_chain_t *chain; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; + opal_pmix2x_event_chain_t *chain; /* check the single events first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) { + OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_pmix2x_single_event_t) { if (cd->status == sing->code) { /* found it - invoke the handler, pointing its * callback function to our progression function */ - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); chain->status = cd->status; - chain->range = pmix3x_convert_opalrange(cd->range); + chain->range = pmix2x_convert_opalrange(cd->range); chain->source = *(cd->source); chain->info = cd->info; chain->final_cbfunc = cd->opcbfunc; @@ -1237,14 +1237,14 @@ static void _notify_event(int sd, short args, void *cbdata) } } /* check multi events */ - OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) { + OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_pmix2x_multi_event_t) { for (i=0; i < multi->ncodes; i++) { if (cd->status == multi->codes[i]) { /* found it - invoke the handler, pointing its * callback function to our progression function */ - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); chain->status = cd->status; - chain->range = pmix3x_convert_opalrange(cd->range); + chain->range = pmix2x_convert_opalrange(cd->range); chain->source = *(cd->source); chain->info = cd->info; chain->final_cbfunc = cd->opcbfunc; @@ -1262,11 +1262,11 @@ static void _notify_event(int sd, short args, void *cbdata) } } /* check default events */ - if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) { - def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events); - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) { + def = (opal_pmix2x_default_event_t*)opal_list_get_first(&mca_pmix_ext2x_component.default_events); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); chain->status = cd->status; - chain->range = pmix3x_convert_opalrange(cd->range); + chain->range = pmix2x_convert_opalrange(cd->range); chain->source = *(cd->source); chain->info = cd->info; chain->final_cbfunc = cd->opcbfunc; @@ -1302,7 +1302,7 @@ static int notify_event(int status, return OPAL_SUCCESS; } -static void pmix3x_query(opal_list_t *queries, +static void pmix2x_query(opal_list_t *queries, opal_pmix_info_cbfunc_t cbfunc, void *cbdata) { if (NULL != cbfunc) { @@ -1313,21 +1313,21 @@ static void pmix3x_query(opal_list_t *queries, static void opcbfunc(pmix_status_t status, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; if (NULL != op->opcbfunc) { - op->opcbfunc(pmix3x_convert_rc(status), op->cbdata); + op->opcbfunc(pmix2x_convert_rc(status), op->cbdata); } OBJ_RELEASE(op); } -static void pmix3x_log(opal_list_t *info, +static void pmix2x_log(opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; opal_value_t *ival; size_t n, ninfo; - pmix3x_opcaddy_t *cd; + pmix2x_opcaddy_t *cd; /* bozo check */ if (NULL == info || 0 == (ninfo = opal_list_get_size(info))) { @@ -1336,7 +1336,7 @@ static void pmix3x_log(opal_list_t *info, } /* setup the operation */ - cd = OBJ_NEW(pmix3x_opcaddy_t); + cd = OBJ_NEW(pmix2x_opcaddy_t); cd->opcbfunc = cbfunc; cd->cbdata = cbdata; cd->ninfo = ninfo; @@ -1346,7 +1346,7 @@ static void pmix3x_log(opal_list_t *info, n=0; OPAL_LIST_FOREACH(ival, info, opal_value_t) { (void)strncpy(cd->info[n].key, ival->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&cd->info[n].value, ival); + pmix2x_value_load(&cd->info[n].value, ival); ++n; } @@ -1362,34 +1362,34 @@ static void pmix3x_log(opal_list_t *info, } /**** INSTANTIATE INTERNAL CLASSES ****/ -OBJ_CLASS_INSTANCE(opal_pmix3x_jobid_trkr_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_jobid_trkr_t, opal_list_item_t, NULL, NULL); -OBJ_CLASS_INSTANCE(opal_pmix3x_single_event_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_single_event_t, opal_list_item_t, NULL, NULL); -static void mtevcon(opal_pmix3x_multi_event_t *p) +static void mtevcon(opal_pmix2x_multi_event_t *p) { p->codes = NULL; p->ncodes = 0; } -static void mtevdes(opal_pmix3x_multi_event_t *p) +static void mtevdes(opal_pmix2x_multi_event_t *p) { if (NULL != p->codes) { free(p->codes); } } -OBJ_CLASS_INSTANCE(opal_pmix3x_multi_event_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_multi_event_t, opal_list_item_t, mtevcon, mtevdes); -OBJ_CLASS_INSTANCE(opal_pmix3x_default_event_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_default_event_t, opal_list_item_t, NULL, NULL); -static void chcon(opal_pmix3x_event_chain_t *p) +static void chcon(opal_pmix2x_event_chain_t *p) { p->nondefault = false; p->info = NULL; @@ -1400,15 +1400,15 @@ static void chcon(opal_pmix3x_event_chain_t *p) p->final_cbfunc = NULL; p->final_cbdata = NULL; } -static void chdes(opal_pmix3x_event_chain_t *p) +static void chdes(opal_pmix2x_event_chain_t *p) { OPAL_LIST_DESTRUCT(&p->results); } -OBJ_CLASS_INSTANCE(opal_pmix3x_event_chain_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_event_chain_t, opal_list_item_t, chcon, chdes); -static void opcon(pmix3x_opcaddy_t *p) +static void opcon(pmix2x_opcaddy_t *p) { memset(&p->p, 0, sizeof(pmix_proc_t)); p->procs = NULL; @@ -1427,7 +1427,7 @@ static void opcon(pmix3x_opcaddy_t *p) p->spcbfunc = NULL; p->cbdata = NULL; } -static void opdes(pmix3x_opcaddy_t *p) +static void opdes(pmix2x_opcaddy_t *p) { if (NULL != p->procs) { PMIX_PROC_FREE(p->procs, p->nprocs); @@ -1442,11 +1442,11 @@ static void opdes(pmix3x_opcaddy_t *p) PMIX_APP_FREE(p->apps, p->sz); } } -OBJ_CLASS_INSTANCE(pmix3x_opcaddy_t, +OBJ_CLASS_INSTANCE(pmix2x_opcaddy_t, opal_object_t, opcon, opdes); -static void ocadcon(pmix3x_opalcaddy_t *p) +static void ocadcon(pmix2x_opalcaddy_t *p) { OBJ_CONSTRUCT(&p->procs, opal_list_t); OBJ_CONSTRUCT(&p->info, opal_list_t); @@ -1462,17 +1462,17 @@ static void ocadcon(pmix3x_opalcaddy_t *p) p->toolcbfunc = NULL; p->ocbdata = NULL; } -static void ocaddes(pmix3x_opalcaddy_t *p) +static void ocaddes(pmix2x_opalcaddy_t *p) { OPAL_LIST_DESTRUCT(&p->procs); OPAL_LIST_DESTRUCT(&p->info); OPAL_LIST_DESTRUCT(&p->apps); } -OBJ_CLASS_INSTANCE(pmix3x_opalcaddy_t, +OBJ_CLASS_INSTANCE(pmix2x_opalcaddy_t, opal_object_t, ocadcon, ocaddes); -static void tscon(pmix3x_threadshift_t *p) +static void tscon(pmix2x_threadshift_t *p) { p->active = false; p->source = NULL; @@ -1484,6 +1484,6 @@ static void tscon(pmix3x_threadshift_t *p) p->opcbfunc = NULL; p->cbdata = NULL; } -OBJ_CLASS_INSTANCE(pmix3x_threadshift_t, +OBJ_CLASS_INSTANCE(pmix2x_threadshift_t, opal_object_t, tscon, NULL); diff --git a/opal/mca/pmix/ext3x/pmix3x.h b/opal/mca/pmix/ext2x/pmix2x.h similarity index 69% rename from opal/mca/pmix/ext3x/pmix3x.h rename to opal/mca/pmix/ext2x/pmix2x.h index acb13a8c549..c849356d370 100644 --- a/opal/mca/pmix/ext3x/pmix3x.h +++ b/opal/mca/pmix/ext2x/pmix2x.h @@ -44,27 +44,27 @@ typedef struct { opal_list_t default_events; int cache_size; opal_list_t cache; -} mca_pmix_ext3x_component_t; +} mca_pmix_ext2x_component_t; -OPAL_DECLSPEC extern mca_pmix_ext3x_component_t mca_pmix_ext3x_component; +OPAL_DECLSPEC extern mca_pmix_ext2x_component_t mca_pmix_ext2x_component; -OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext3x_module; +OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext2x_module; /**** INTERNAL OBJECTS ****/ typedef struct { opal_list_item_t super; opal_jobid_t jobid; char nspace[PMIX_MAX_NSLEN + 1]; -} opal_pmix3x_jobid_trkr_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_jobid_trkr_t); +} opal_pmix2x_jobid_trkr_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_jobid_trkr_t); typedef struct { opal_list_item_t super; size_t index; int code; opal_pmix_notification_fn_t handler; -} opal_pmix3x_single_event_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_single_event_t); +} opal_pmix2x_single_event_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_single_event_t); typedef struct { opal_list_item_t super; @@ -72,15 +72,15 @@ typedef struct { int *codes; size_t ncodes; opal_pmix_notification_fn_t handler; -} opal_pmix3x_multi_event_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_multi_event_t); +} opal_pmix2x_multi_event_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_multi_event_t); typedef struct { opal_list_item_t super; size_t index; opal_pmix_notification_fn_t handler; -} opal_pmix3x_default_event_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_default_event_t); +} opal_pmix2x_default_event_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_default_event_t); typedef struct { opal_list_item_t super; @@ -90,13 +90,13 @@ typedef struct { pmix_data_range_t range; opal_list_t *info; opal_list_t results; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; opal_pmix_op_cbfunc_t final_cbfunc; void *final_cbdata; -} opal_pmix3x_event_chain_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_event_chain_t); +} opal_pmix2x_event_chain_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_event_chain_t); typedef struct { opal_object_t super; @@ -117,8 +117,8 @@ typedef struct { opal_pmix_lookup_cbfunc_t lkcbfunc; opal_pmix_spawn_cbfunc_t spcbfunc; void *cbdata; -} pmix3x_opcaddy_t; -OBJ_CLASS_DECLARATION(pmix3x_opcaddy_t); +} pmix2x_opcaddy_t; +OBJ_CLASS_DECLARATION(pmix2x_opcaddy_t); typedef struct { opal_object_t super; @@ -135,8 +135,8 @@ typedef struct { void *cbdata; opal_pmix_release_cbfunc_t odmdxfunc; void *ocbdata; -} pmix3x_opalcaddy_t; -OBJ_CLASS_DECLARATION(pmix3x_opalcaddy_t); +} pmix2x_opalcaddy_t; +OBJ_CLASS_DECLARATION(pmix2x_opalcaddy_t); typedef struct { opal_object_t super; @@ -156,13 +156,13 @@ typedef struct { opal_pmix_evhandler_reg_cbfunc_t cbfunc; opal_pmix_op_cbfunc_t opcbfunc; void *cbdata; -} pmix3x_threadshift_t; -OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); +} pmix2x_threadshift_t; +OBJ_CLASS_DECLARATION(pmix2x_threadshift_t); #define OPAL_PMIX_OPCD_THREADSHIFT(i, s, sr, if, nif, fn, cb, cd) \ do { \ - pmix3x_opalcaddy_t *_cd; \ - _cd = OBJ_NEW(pmix3x_opalcaddy_t); \ + pmix2x_opalcaddy_t *_cd; \ + _cd = OBJ_NEW(pmix2x_opalcaddy_t); \ _cd->id = (i); \ _cd->status = (s); \ _cd->source = (sr); \ @@ -176,8 +176,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); #define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \ do { \ - pmix3x_threadshift_t *_cd; \ - _cd = OBJ_NEW(pmix3x_threadshift_t); \ + pmix2x_threadshift_t *_cd; \ + _cd = OBJ_NEW(pmix2x_threadshift_t); \ _cd->handler = (e); \ _cd->opcbfunc = (cb); \ _cd->cbdata = (cd); \ @@ -188,8 +188,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); #define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \ do { \ - pmix3x_threadshift_t *_cd; \ - _cd = OBJ_NEW(pmix3x_threadshift_t); \ + pmix2x_threadshift_t *_cd; \ + _cd = OBJ_NEW(pmix2x_threadshift_t); \ _cd->event_codes = (e); \ _cd->info = (i); \ _cd->evhandler = (eh); \ @@ -202,8 +202,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); #define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \ do { \ - pmix3x_threadshift_t *_cd; \ - _cd = OBJ_NEW(pmix3x_threadshift_t); \ + pmix2x_threadshift_t *_cd; \ + _cd = OBJ_NEW(pmix2x_threadshift_t); \ _cd->status = (s); \ _cd->source = (sr); \ _cd->range = (r); \ @@ -216,106 +216,106 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); } while(0) /**** CLIENT FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int pmix3x_client_init(void); -OPAL_MODULE_DECLSPEC int pmix3x_client_finalize(void); -OPAL_MODULE_DECLSPEC int pmix3x_initialized(void); -OPAL_MODULE_DECLSPEC int pmix3x_abort(int flag, const char *msg, +OPAL_MODULE_DECLSPEC int pmix2x_client_init(void); +OPAL_MODULE_DECLSPEC int pmix2x_client_finalize(void); +OPAL_MODULE_DECLSPEC int pmix2x_initialized(void); +OPAL_MODULE_DECLSPEC int pmix2x_abort(int flag, const char *msg, opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_commit(void); -OPAL_MODULE_DECLSPEC int pmix3x_fence(opal_list_t *procs, int collect_data); -OPAL_MODULE_DECLSPEC int pmix3x_fencenb(opal_list_t *procs, int collect_data, +OPAL_MODULE_DECLSPEC int pmix2x_commit(void); +OPAL_MODULE_DECLSPEC int pmix2x_fence(opal_list_t *procs, int collect_data); +OPAL_MODULE_DECLSPEC int pmix2x_fencenb(opal_list_t *procs, int collect_data, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_put(opal_pmix_scope_t scope, +OPAL_MODULE_DECLSPEC int pmix2x_put(opal_pmix_scope_t scope, opal_value_t *val); -OPAL_MODULE_DECLSPEC int pmix3x_get(const opal_process_name_t *proc, const char *key, +OPAL_MODULE_DECLSPEC int pmix2x_get(const opal_process_name_t *proc, const char *key, opal_list_t *info, opal_value_t **val); -OPAL_MODULE_DECLSPEC int pmix3x_getnb(const opal_process_name_t *proc, const char *key, +OPAL_MODULE_DECLSPEC int pmix2x_getnb(const opal_process_name_t *proc, const char *key, opal_list_t *info, opal_pmix_value_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_publish(opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_publishnb(opal_list_t *info, +OPAL_MODULE_DECLSPEC int pmix2x_publish(opal_list_t *info); +OPAL_MODULE_DECLSPEC int pmix2x_publishnb(opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_lookup(opal_list_t *data, opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_lookupnb(char **keys, opal_list_t *info, +OPAL_MODULE_DECLSPEC int pmix2x_lookup(opal_list_t *data, opal_list_t *info); +OPAL_MODULE_DECLSPEC int pmix2x_lookupnb(char **keys, opal_list_t *info, opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_unpublish(char **keys, opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_unpublishnb(char **keys, opal_list_t *info, +OPAL_MODULE_DECLSPEC int pmix2x_unpublish(char **keys, opal_list_t *info); +OPAL_MODULE_DECLSPEC int pmix2x_unpublishnb(char **keys, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid); -OPAL_MODULE_DECLSPEC int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps, +OPAL_MODULE_DECLSPEC int pmix2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid); +OPAL_MODULE_DECLSPEC int pmix2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_connect(opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_connectnb(opal_list_t *procs, +OPAL_MODULE_DECLSPEC int pmix2x_connect(opal_list_t *procs); +OPAL_MODULE_DECLSPEC int pmix2x_connectnb(opal_list_t *procs, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_disconnect(opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_disconnectnb(opal_list_t *procs, +OPAL_MODULE_DECLSPEC int pmix2x_disconnect(opal_list_t *procs); +OPAL_MODULE_DECLSPEC int pmix2x_disconnectnb(opal_list_t *procs, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, +OPAL_MODULE_DECLSPEC int pmix2x_resolve_peers(const char *nodename, opal_jobid_t jobid, opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist); +OPAL_MODULE_DECLSPEC int pmix2x_resolve_nodes(opal_jobid_t jobid, char **nodelist); /**** COMMON FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int pmix3x_store_local(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC int pmix2x_store_local(const opal_process_name_t *proc, opal_value_t *val); /**** SERVER SOUTHBOUND FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int pmix3x_server_init(opal_pmix_server_module_t *module, +OPAL_MODULE_DECLSPEC int pmix2x_server_init(opal_pmix_server_module_t *module, opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_server_finalize(void); -OPAL_MODULE_DECLSPEC int pmix3x_server_gen_regex(const char *input, char **regex); -OPAL_MODULE_DECLSPEC int pmix3x_server_gen_ppn(const char *input, char **ppn); -OPAL_MODULE_DECLSPEC int pmix3x_server_register_nspace(opal_jobid_t jobid, +OPAL_MODULE_DECLSPEC int pmix2x_server_finalize(void); +OPAL_MODULE_DECLSPEC int pmix2x_server_gen_regex(const char *input, char **regex); +OPAL_MODULE_DECLSPEC int pmix2x_server_gen_ppn(const char *input, char **ppn); +OPAL_MODULE_DECLSPEC int pmix2x_server_register_nspace(opal_jobid_t jobid, int nlocalprocs, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC void pmix3x_server_deregister_nspace(opal_jobid_t jobid, +OPAL_MODULE_DECLSPEC void pmix2x_server_deregister_nspace(opal_jobid_t jobid, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_server_register_client(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC int pmix2x_server_register_client(const opal_process_name_t *proc, uid_t uid, gid_t gid, void *server_object, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC void pmix3x_server_deregister_client(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC void pmix2x_server_deregister_client(const opal_process_name_t *proc, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env); -OPAL_MODULE_DECLSPEC int pmix3x_server_dmodex(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC int pmix2x_server_setup_fork(const opal_process_name_t *proc, char ***env); +OPAL_MODULE_DECLSPEC int pmix2x_server_dmodex(const opal_process_name_t *proc, opal_pmix_modex_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_server_notify_event(int status, +OPAL_MODULE_DECLSPEC int pmix2x_server_notify_event(int status, const opal_process_name_t *source, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); /**** COMPONENT UTILITY FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC void pmix3x_event_hdlr(size_t evhdlr_registration_id, +OPAL_MODULE_DECLSPEC void pmix2x_event_hdlr(size_t evhdlr_registration_id, pmix_status_t status, const pmix_proc_t *source, pmix_info_t info[], size_t ninfo, pmix_info_t results[], size_t nresults, pmix_event_notification_cbfunc_fn_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC pmix_status_t pmix3x_convert_opalrc(int rc); -OPAL_MODULE_DECLSPEC int pmix3x_convert_rc(pmix_status_t rc); +OPAL_MODULE_DECLSPEC pmix_status_t pmix2x_convert_opalrc(int rc); +OPAL_MODULE_DECLSPEC int pmix2x_convert_rc(pmix_status_t rc); -OPAL_MODULE_DECLSPEC opal_vpid_t pmix3x_convert_rank(int rank); -OPAL_MODULE_DECLSPEC pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid); +OPAL_MODULE_DECLSPEC opal_vpid_t pmix2x_convert_rank(int rank); +OPAL_MODULE_DECLSPEC pmix_rank_t pmix2x_convert_opalrank(opal_vpid_t vpid); -OPAL_MODULE_DECLSPEC opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope); -OPAL_MODULE_DECLSPEC pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope); +OPAL_MODULE_DECLSPEC opal_pmix_scope_t pmix2x_convert_scope(pmix_scope_t scope); +OPAL_MODULE_DECLSPEC pmix_scope_t pmix2x_convert_opalscope(opal_pmix_scope_t scope); -OPAL_MODULE_DECLSPEC pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range); -OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range); +OPAL_MODULE_DECLSPEC pmix_data_range_t pmix2x_convert_opalrange(opal_pmix_data_range_t range); +OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix2x_convert_range(pmix_data_range_t range); -OPAL_MODULE_DECLSPEC opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t scope); -OPAL_MODULE_DECLSPEC pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t scope); +OPAL_MODULE_DECLSPEC opal_pmix_persistence_t pmix2x_convert_persist(pmix_persistence_t scope); +OPAL_MODULE_DECLSPEC pmix_persistence_t pmix2x_convert_opalpersist(opal_pmix_persistence_t scope); -OPAL_MODULE_DECLSPEC void pmix3x_value_load(pmix_value_t *v, +OPAL_MODULE_DECLSPEC void pmix2x_value_load(pmix_value_t *v, opal_value_t *kv); -OPAL_MODULE_DECLSPEC int pmix3x_value_unload(opal_value_t *kv, +OPAL_MODULE_DECLSPEC int pmix2x_value_unload(opal_value_t *kv, const pmix_value_t *v); END_C_DECLS diff --git a/opal/mca/pmix/ext2x/pmix_ext2x_client.c b/opal/mca/pmix/ext2x/pmix2x_client.c similarity index 80% rename from opal/mca/pmix/ext2x/pmix_ext2x_client.c rename to opal/mca/pmix/ext2x/pmix2x_client.c index de8cca930d6..c1bbdef47bd 100644 --- a/opal/mca/pmix/ext2x/pmix_ext2x_client.c +++ b/opal/mca/pmix/ext2x/pmix2x_client.c @@ -5,7 +5,7 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014-2015 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2016 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ @@ -26,11 +26,12 @@ #include #endif +#include "opal/hash_string.h" #include "opal/util/argv.h" #include "opal/util/proc.h" #include "opal/mca/pmix/base/base.h" -#include "pmix_ext2x.h" +#include "pmix2x.h" #include "pmix.h" static pmix_proc_t my_proc; @@ -55,12 +56,12 @@ static void errreg_cbfunc (pmix_status_t status, status, (unsigned long)errhandler_ref); } -int ext2x_client_init(void) +int pmix2x_client_init(void) { opal_process_name_t pname; pmix_status_t rc; int dbg; - opal_ext2x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client init"); @@ -72,7 +73,7 @@ int ext2x_client_init(void) rc = PMIx_Init(&my_proc, NULL, 0); if (PMIX_SUCCESS != rc) { - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } /* store our jobid and rank */ @@ -88,21 +89,21 @@ int ext2x_client_init(void) } /* insert this into our list of jobids - it will be the * first, and so we'll check it first */ - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, my_proc.nspace, PMIX_MAX_NSLEN); job->jobid = pname.jobid; opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); - pname.vpid = ext2x_convert_rank(my_proc.rank); + pname.vpid = pmix2x_convert_rank(my_proc.rank); opal_proc_set_name(&pname); /* register the default event handler */ - PMIx_Register_event_handler(NULL, 0, NULL, 0, ext2x_event_hdlr, errreg_cbfunc, NULL); + PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix2x_event_hdlr, errreg_cbfunc, NULL); return OPAL_SUCCESS; } -int ext2x_client_finalize(void) +int pmix2x_client_finalize(void) { pmix_status_t rc; @@ -113,10 +114,10 @@ int ext2x_client_finalize(void) PMIx_Deregister_event_handler(errhdler_ref, NULL, NULL); rc = PMIx_Finalize(NULL, 0); - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int ext2x_initialized(void) +int pmix2x_initialized(void) { opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client initialized"); @@ -124,14 +125,14 @@ int ext2x_initialized(void) return PMIx_Initialized(); } -int ext2x_abort(int flag, const char *msg, - opal_list_t *procs) +int pmix2x_abort(int flag, const char *msg, + opal_list_t *procs) { pmix_status_t rc; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client abort"); @@ -145,7 +146,7 @@ int ext2x_abort(int flag, const char *msg, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; @@ -156,7 +157,7 @@ int ext2x_abort(int flag, const char *msg, return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = ext2x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } } @@ -167,15 +168,15 @@ int ext2x_abort(int flag, const char *msg, /* release the array */ PMIX_PROC_FREE(parray, cnt); - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int ext2x_store_local(const opal_process_name_t *proc, opal_value_t *val) +int pmix2x_store_local(const opal_process_name_t *proc, opal_value_t *val) { pmix_value_t kv; pmix_status_t rc; pmix_proc_t p; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -184,7 +185,7 @@ int ext2x_store_local(const opal_process_name_t *proc, opal_value_t *val) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == proc->jobid) { job = jptr; break; @@ -195,48 +196,48 @@ int ext2x_store_local(const opal_process_name_t *proc, opal_value_t *val) return OPAL_ERR_NOT_FOUND; } (void)strncpy(p.nspace, job->nspace, PMIX_MAX_NSLEN); - p.rank = ext2x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); } else { /* use our name */ (void)strncpy(p.nspace, my_proc.nspace, PMIX_MAX_NSLEN); - p.rank = ext2x_convert_opalrank(OPAL_PROC_MY_NAME.vpid); + p.rank = pmix2x_convert_opalrank(OPAL_PROC_MY_NAME.vpid); } PMIX_VALUE_CONSTRUCT(&kv); - ext2x_value_load(&kv, val); + pmix2x_value_load(&kv, val); rc = PMIx_Store_internal(&p, val->key, &kv); PMIX_VALUE_DESTRUCT(&kv); - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int ext2x_commit(void) +int pmix2x_commit(void) { pmix_status_t rc; rc = PMIx_Commit(); - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } static void opcbfunc(pmix_status_t status, void *cbdata) { - ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; if (NULL != op->opcbfunc) { - op->opcbfunc(ext2x_convert_rc(status), op->cbdata); + op->opcbfunc(pmix2x_convert_rc(status), op->cbdata); } OBJ_RELEASE(op); } -int ext2x_fence(opal_list_t *procs, int collect_data) +int pmix2x_fence(opal_list_t *procs, int collect_data) { pmix_status_t rc; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; pmix_info_t info, *iptr; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client fence"); @@ -250,17 +251,18 @@ int ext2x_fence(opal_list_t *procs, int collect_data) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; } } if (NULL == job) { + PMIX_PROC_FREE(parray, cnt); return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = ext2x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } } @@ -285,20 +287,20 @@ int ext2x_fence(opal_list_t *procs, int collect_data) PMIX_INFO_DESTRUCT(&info); } - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int ext2x_fencenb(opal_list_t *procs, int collect_data, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) +int pmix2x_fencenb(opal_list_t *procs, int collect_data, + opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t rc; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - ext2x_opcaddy_t *op; + pmix2x_opcaddy_t *op; pmix_info_t info, *iptr; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -315,7 +317,7 @@ int ext2x_fencenb(opal_list_t *procs, int collect_data, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; @@ -326,7 +328,7 @@ int ext2x_fencenb(opal_list_t *procs, int collect_data, return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = ext2x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } } @@ -344,7 +346,7 @@ int ext2x_fencenb(opal_list_t *procs, int collect_data, } /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; op->procs = parray; @@ -356,30 +358,30 @@ int ext2x_fencenb(opal_list_t *procs, int collect_data, OBJ_RELEASE(op); } - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int ext2x_put(opal_pmix_scope_t opal_scope, - opal_value_t *val) +int pmix2x_put(opal_pmix_scope_t opal_scope, + opal_value_t *val) { pmix_value_t kv; - pmix_scope_t pmix_scope = ext2x_convert_opalscope(opal_scope); + pmix_scope_t pmix_scope = pmix2x_convert_opalscope(opal_scope); pmix_status_t rc; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client put"); PMIX_VALUE_CONSTRUCT(&kv); - ext2x_value_load(&kv, val); + pmix2x_value_load(&kv, val); rc = PMIx_Put(pmix_scope, val->key, &kv); PMIX_VALUE_DESTRUCT(&kv); - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int ext2x_get(const opal_process_name_t *proc, const char *key, - opal_list_t *info, opal_value_t **val) +int pmix2x_get(const opal_process_name_t *proc, const char *key, + opal_list_t *info, opal_value_t **val) { int ret; pmix_value_t *kv; @@ -388,7 +390,7 @@ int ext2x_get(const opal_process_name_t *proc, const char *key, size_t ninfo, n; pmix_info_t *pinfo; opal_value_t *ival; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "%s PMIx_client get on proc %s key %s", @@ -401,7 +403,7 @@ int ext2x_get(const opal_process_name_t *proc, const char *key, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == proc->jobid) { job = jptr; break; @@ -411,7 +413,7 @@ int ext2x_get(const opal_process_name_t *proc, const char *key, return OPAL_ERR_NOT_FOUND; } (void)strncpy(p.nspace, job->nspace, PMIX_MAX_NSLEN); - p.rank = ext2x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); pptr = &p; } else { /* if they are asking for our jobid, then return it */ @@ -423,7 +425,7 @@ int ext2x_get(const opal_process_name_t *proc, const char *key, } else if (0 == strcmp(key, OPAL_PMIX_RANK)) { (*val) = OBJ_NEW(opal_value_t); (*val)->type = OPAL_INT; - (*val)->data.integer = ext2x_convert_rank(my_proc.rank); + (*val)->data.integer = pmix2x_convert_rank(my_proc.rank); return OPAL_SUCCESS; } pptr = NULL; @@ -436,7 +438,7 @@ int ext2x_get(const opal_process_name_t *proc, const char *key, n=0; OPAL_LIST_FOREACH(ival, info, opal_value_t) { (void)strncpy(pinfo[n].key, ival->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pinfo[n].value, ival); + pmix2x_value_load(&pinfo[n].value, ival); ++n; } } else { @@ -454,11 +456,11 @@ int ext2x_get(const opal_process_name_t *proc, const char *key, ret = OPAL_SUCCESS; } else { *val = OBJ_NEW(opal_value_t); - ret = ext2x_value_unload(*val, key, kv); + ret = pmix2x_value_unload(*val, kv); PMIX_VALUE_FREE(kv, 1); } } else { - ret = ext2x_convert_rc(rc); + ret = pmix2x_convert_rc(rc); } PMIX_INFO_FREE(pinfo, ninfo); return ret; @@ -467,13 +469,13 @@ int ext2x_get(const opal_process_name_t *proc, const char *key, static void val_cbfunc(pmix_status_t status, pmix_value_t *kv, void *cbdata) { - ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; int rc; opal_value_t val, *v=NULL; - rc = ext2x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); if (PMIX_SUCCESS == status && NULL != kv) { - rc = ext2x_value_unload(&val, op->key, kv); + rc = pmix2x_value_unload(&val, kv); v = &val; } @@ -483,15 +485,15 @@ static void val_cbfunc(pmix_status_t status, OBJ_RELEASE(op); } -int ext2x_getnb(const opal_process_name_t *proc, const char *key, - opal_list_t *info, - opal_pmix_value_cbfunc_t cbfunc, void *cbdata) +int pmix2x_getnb(const opal_process_name_t *proc, const char *key, + opal_list_t *info, + opal_pmix_value_cbfunc_t cbfunc, void *cbdata) { - ext2x_opcaddy_t *op; + pmix2x_opcaddy_t *op; pmix_status_t rc; size_t n; opal_value_t *ival; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access shared lists/objects */ @@ -502,8 +504,7 @@ int ext2x_getnb(const opal_process_name_t *proc, const char *key, (NULL == proc) ? "NULL" : OPAL_NAME_PRINT(*proc), key); /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); - op->key = strdup(key); + op = OBJ_NEW(pmix2x_opcaddy_t); op->valcbfunc = cbfunc; op->cbdata = cbdata; @@ -511,7 +512,7 @@ int ext2x_getnb(const opal_process_name_t *proc, const char *key, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == proc->jobid) { job = jptr; break; @@ -521,10 +522,10 @@ int ext2x_getnb(const opal_process_name_t *proc, const char *key, return OPAL_ERR_NOT_FOUND; } (void)strncpy(op->p.nspace, job->nspace, PMIX_MAX_NSLEN); - op->p.rank = ext2x_convert_opalrank(proc->vpid); + op->p.rank = pmix2x_convert_opalrank(proc->vpid); } else { (void)strncpy(op->p.nspace, my_proc.nspace, PMIX_MAX_NSLEN); - op->p.rank = ext2x_convert_rank(PMIX_RANK_WILDCARD); + op->p.rank = pmix2x_convert_rank(PMIX_RANK_WILDCARD); } if (NULL != info) { @@ -534,7 +535,7 @@ int ext2x_getnb(const opal_process_name_t *proc, const char *key, n=0; OPAL_LIST_FOREACH(ival, info, opal_value_t) { (void)strncpy(op->info[n].key, ival->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&op->info[n].value, ival); + pmix2x_value_load(&op->info[n].value, ival); ++n; } } @@ -546,10 +547,10 @@ int ext2x_getnb(const opal_process_name_t *proc, const char *key, OBJ_RELEASE(op); } - return ext2x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int ext2x_publish(opal_list_t *info) +int pmix2x_publish(opal_list_t *info) { pmix_info_t *pinfo; pmix_status_t ret; @@ -569,7 +570,7 @@ int ext2x_publish(opal_list_t *info) n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pinfo[n].value, iptr); + pmix2x_value_load(&pinfo[n].value, iptr); ++n; } } else { @@ -578,16 +579,16 @@ int ext2x_publish(opal_list_t *info) ret = PMIx_Publish(pinfo, sz); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_publishnb(opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) +int pmix2x_publishnb(opal_list_t *info, + opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; opal_value_t *iptr; size_t n; - ext2x_opcaddy_t *op; + pmix2x_opcaddy_t *op; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client publish_nb"); @@ -597,7 +598,7 @@ int ext2x_publishnb(opal_list_t *info, } /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; @@ -607,17 +608,17 @@ int ext2x_publishnb(opal_list_t *info, n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&op->info[n].value, iptr); + pmix2x_value_load(&op->info[n].value, iptr); ++n; } } ret = PMIx_Publish_nb(op->info, op->sz, opcbfunc, op); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_lookup(opal_list_t *data, opal_list_t *info) +int pmix2x_lookup(opal_list_t *data, opal_list_t *info) { pmix_pdata_t *pdata; pmix_info_t *pinfo; @@ -626,7 +627,7 @@ int ext2x_lookup(opal_list_t *data, opal_list_t *info) pmix_status_t ret; opal_pmix_pdata_t *d; opal_value_t *iptr; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access shared lists/objects */ @@ -650,7 +651,7 @@ int ext2x_lookup(opal_list_t *data, opal_list_t *info) n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pinfo[n].value, iptr); + pmix2x_value_load(&pinfo[n].value, iptr); ++n; } } else { @@ -676,20 +677,20 @@ int ext2x_lookup(opal_list_t *data, opal_list_t *info) } /* if we don't already have it, add this to our jobid tracker */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == d->proc.jobid) { job = jptr; break; } } if (NULL == job) { - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, pdata[n].proc.nspace, PMIX_MAX_NSLEN); job->jobid = d->proc.jobid; opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); } - d->proc.vpid = ext2x_convert_rank(pdata[n].proc.rank); - rc = ext2x_value_unload(&d->value, pdata[n].key, &pdata[n].value); + d->proc.vpid = pmix2x_convert_rank(pdata[n].proc.rank); + rc = pmix2x_value_unload(&d->value, &pdata[n].value); if (OPAL_SUCCESS != rc) { OPAL_ERROR_LOG(rc); PMIX_PDATA_FREE(pdata, sz); @@ -699,19 +700,19 @@ int ext2x_lookup(opal_list_t *data, opal_list_t *info) } } - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } static void lk_cbfunc(pmix_status_t status, pmix_pdata_t data[], size_t ndata, void *cbdata) { - ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; opal_pmix_pdata_t *d; opal_list_t results, *r = NULL; int rc; size_t n; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* this is in the PMIx local thread - need to threadshift to * our own thread as we will be accessing framework-global @@ -722,7 +723,7 @@ static void lk_cbfunc(pmix_status_t status, return; } - rc = ext2x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (OPAL_SUCCESS == rc) { OBJ_CONSTRUCT(&results, opal_list_t); for (n=0; n < ndata; n++) { @@ -739,21 +740,21 @@ static void lk_cbfunc(pmix_status_t status, } /* if we don't already have it, add this to our jobid tracker */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == d->proc.jobid) { job = jptr; break; } } if (NULL == job) { - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, data[n].proc.nspace, PMIX_MAX_NSLEN); job->jobid = d->proc.jobid; opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); } - d->proc.vpid = ext2x_convert_rank(data[n].proc.rank); + d->proc.vpid = pmix2x_convert_rank(data[n].proc.rank); d->value.key = strdup(data[n].key); - rc = ext2x_value_unload(&d->value, data[n].key, &data[n].value); + rc = pmix2x_value_unload(&d->value, &data[n].value); if (OPAL_SUCCESS != rc) { rc = OPAL_ERR_BAD_PARAM; OPAL_ERROR_LOG(rc); @@ -772,11 +773,11 @@ static void lk_cbfunc(pmix_status_t status, OBJ_RELEASE(op); } -int ext2x_lookupnb(char **keys, opal_list_t *info, - opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata) +int pmix2x_lookupnb(char **keys, opal_list_t *info, + opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; - ext2x_opcaddy_t *op; + pmix2x_opcaddy_t *op; opal_value_t *iptr; size_t n; @@ -785,7 +786,7 @@ int ext2x_lookupnb(char **keys, opal_list_t *info, "PMIx_client lookup_nb"); /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->lkcbfunc = cbfunc; op->cbdata = cbdata; @@ -796,7 +797,7 @@ int ext2x_lookupnb(char **keys, opal_list_t *info, n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&op->info[n].value, iptr); + pmix2x_value_load(&op->info[n].value, iptr); ++n; } } @@ -804,10 +805,10 @@ int ext2x_lookupnb(char **keys, opal_list_t *info, ret = PMIx_Lookup_nb(keys, op->info, op->sz, lk_cbfunc, op); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_unpublish(char **keys, opal_list_t *info) +int pmix2x_unpublish(char **keys, opal_list_t *info) { pmix_status_t ret; size_t ninfo, n; @@ -820,7 +821,7 @@ int ext2x_unpublish(char **keys, opal_list_t *info) n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pinfo[n].value, iptr); + pmix2x_value_load(&pinfo[n].value, iptr); ++n; } } else { @@ -831,19 +832,19 @@ int ext2x_unpublish(char **keys, opal_list_t *info) ret = PMIx_Unpublish(keys, pinfo, ninfo); PMIX_INFO_FREE(pinfo, ninfo); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_unpublishnb(char **keys, opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) +int pmix2x_unpublishnb(char **keys, opal_list_t *info, + opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; - ext2x_opcaddy_t *op; + pmix2x_opcaddy_t *op; opal_value_t *iptr; size_t n; /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; @@ -854,7 +855,7 @@ int ext2x_unpublishnb(char **keys, opal_list_t *info, n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&op->info[n].value, iptr); + pmix2x_value_load(&op->info[n].value, iptr); ++n; } } @@ -862,10 +863,10 @@ int ext2x_unpublishnb(char **keys, opal_list_t *info, ret = PMIx_Unpublish_nb(keys, op->info, op->sz, opcbfunc, op); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) +int pmix2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) { pmix_status_t ret; pmix_info_t *pinfo = NULL; @@ -874,14 +875,14 @@ int ext2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) char nspace[PMIX_MAX_NSLEN+1]; opal_value_t *info; opal_pmix_app_t *app; - opal_ext2x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; if (NULL != job_info && 0 < (ninfo = opal_list_get_size(job_info))) { PMIX_INFO_CREATE(pinfo, ninfo); n=0; OPAL_LIST_FOREACH(info, job_info, opal_value_t) { (void)strncpy(pinfo[n].key, info->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pinfo[n].value, info); + pmix2x_value_load(&pinfo[n].value, info); ++n; } } @@ -900,7 +901,7 @@ int ext2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) m=0; OPAL_LIST_FOREACH(info, &app->info, opal_value_t) { (void)strncpy(papps[n].info[m].key, info->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&papps[n].info[m].value, info); + pmix2x_value_load(&papps[n].info[m].value, info); ++m; } } @@ -919,29 +920,29 @@ int ext2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) OPAL_HASH_JOBID(nspace, *jobid); } /* add this to our jobid tracker */ - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = *jobid; opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); } PMIX_APP_FREE(papps, napps); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } static void spcbfunc(pmix_status_t status, char *nspace, void *cbdata) { - ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; int rc; opal_jobid_t jobid=OPAL_JOBID_INVALID; - opal_ext2x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; /* this is in the PMIx local thread - need to threadshift to * our own thread as we will be accessing framework-global * lists and objects */ - rc = ext2x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (PMIX_SUCCESS == status) { if (mca_pmix_ext2x_component.native_launch) { /* if we were launched by the OMPI RTE, then @@ -953,7 +954,7 @@ static void spcbfunc(pmix_status_t status, OPAL_HASH_JOBID(nspace, jobid); } /* add this to our jobid tracker */ - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = jobid; opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); @@ -963,17 +964,17 @@ static void spcbfunc(pmix_status_t status, OBJ_RELEASE(op); } -int ext2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, - opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata) +int pmix2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, + opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; - ext2x_opcaddy_t *op; + pmix2x_opcaddy_t *op; size_t n, m; opal_value_t *info; opal_pmix_app_t *app; /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->spcbfunc = cbfunc; op->cbdata = cbdata; @@ -982,7 +983,7 @@ int ext2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, n=0; OPAL_LIST_FOREACH(info, job_info, opal_value_t) { (void)strncpy(op->info[n].key, info->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&op->info[n].value, info); + pmix2x_value_load(&op->info[n].value, info); ++n; } } @@ -1001,7 +1002,7 @@ int ext2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, m=0; OPAL_LIST_FOREACH(info, &app->info, opal_value_t) { (void)strncpy(op->apps[n].info[m].key, info->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&op->apps[n].info[m].value, info); + pmix2x_value_load(&op->apps[n].info[m].value, info); ++m; } } @@ -1010,16 +1011,16 @@ int ext2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, ret = PMIx_Spawn_nb(op->info, op->ninfo, op->apps, op->sz, spcbfunc, op); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_connect(opal_list_t *procs) +int pmix2x_connect(opal_list_t *procs) { pmix_status_t ret; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* protect against bozo error */ if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { @@ -1034,7 +1035,7 @@ int ext2x_connect(opal_list_t *procs) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; @@ -1046,25 +1047,25 @@ int ext2x_connect(opal_list_t *procs) return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = ext2x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Connect(parray, cnt, NULL, 0); PMIX_PROC_FREE(parray, cnt); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_connectnb(opal_list_t *procs, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) +int pmix2x_connectnb(opal_list_t *procs, + opal_pmix_op_cbfunc_t cbfunc, + void *cbdata) { pmix_status_t ret; size_t n, cnt=0; opal_namelist_t *ptr; - ext2x_opcaddy_t *op; - opal_ext2x_jobid_trkr_t *job; + pmix2x_opcaddy_t *op; + opal_pmix2x_jobid_trkr_t *job; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1075,7 +1076,7 @@ int ext2x_connectnb(opal_list_t *procs, } /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; op->nprocs = cnt; @@ -1087,28 +1088,28 @@ int ext2x_connectnb(opal_list_t *procs, OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { /* look thru our list of jobids and find the * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(job, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (job->jobid == ptr->name.jobid) { (void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN); break; } } - op->procs[n].rank = ext2x_convert_opalrank(ptr->name.vpid); + op->procs[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Connect_nb(op->procs, op->nprocs, NULL, 0, opcbfunc, op); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_disconnect(opal_list_t *procs) +int pmix2x_disconnect(opal_list_t *procs) { pmix_status_t ret; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - opal_ext2x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; /* protect against bozo error */ if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { @@ -1122,31 +1123,31 @@ int ext2x_disconnect(opal_list_t *procs) OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { /* look thru our list of jobids and find the * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(job, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (job->jobid == ptr->name.jobid) { (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); break; } } - parray[n].rank = ext2x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Disconnect(parray, cnt, NULL, 0); PMIX_PROC_FREE(parray, cnt); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_disconnectnb(opal_list_t *procs, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) +int pmix2x_disconnectnb(opal_list_t *procs, + opal_pmix_op_cbfunc_t cbfunc, + void *cbdata) { pmix_status_t ret; size_t n, cnt=0; opal_namelist_t *ptr; - ext2x_opcaddy_t *op; - opal_ext2x_jobid_trkr_t *job; + pmix2x_opcaddy_t *op; + opal_pmix2x_jobid_trkr_t *job; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1157,7 +1158,7 @@ int ext2x_disconnectnb(opal_list_t *procs, } /* create the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; op->nprocs = cnt; @@ -1169,24 +1170,24 @@ int ext2x_disconnectnb(opal_list_t *procs, OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { /* look thru our list of jobids and find the * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(job, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (job->jobid == ptr->name.jobid) { (void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN); break; } } - op->procs[n].rank = ext2x_convert_opalrank(ptr->name.vpid); + op->procs[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Disconnect_nb(op->procs, op->nprocs, NULL, 0, opcbfunc, op); - return ext2x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid, - opal_list_t *procs) +int pmix2x_resolve_peers(const char *nodename, opal_jobid_t jobid, + opal_list_t *procs) { char *nspace; pmix_proc_t *array=NULL; @@ -1194,7 +1195,7 @@ int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid, opal_namelist_t *nm; int rc; pmix_status_t ret; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1203,7 +1204,7 @@ int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid, nspace = NULL; } else { job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { job = jptr; break; @@ -1216,7 +1217,7 @@ int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid, } ret = PMIx_Resolve_peers(nodename, nspace, &array, &nprocs); - rc = ext2x_convert_rc(ret); + rc = pmix2x_convert_rc(ret); if (NULL != array && 0 < nprocs) { for (n=0; n < nprocs; n++) { @@ -1233,19 +1234,19 @@ int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid, } /* if we don't already have it, add this to our jobid tracker */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == nm->name.jobid) { job = jptr; break; } } if (NULL == job) { - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = jobid; opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); } - nm->name.vpid = ext2x_convert_rank(array[n].rank); + nm->name.vpid = pmix2x_convert_rank(array[n].rank); } } PMIX_PROC_FREE(array, nprocs); @@ -1253,11 +1254,11 @@ int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid, return rc; } -int ext2x_resolve_nodes(opal_jobid_t jobid, char **nodelist) +int pmix2x_resolve_nodes(opal_jobid_t jobid, char **nodelist) { pmix_status_t ret; char *nspace=NULL; - opal_ext2x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1266,7 +1267,7 @@ int ext2x_resolve_nodes(opal_jobid_t jobid, char **nodelist) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { job = jptr; break; @@ -1280,5 +1281,5 @@ int ext2x_resolve_nodes(opal_jobid_t jobid, char **nodelist) ret = PMIx_Resolve_nodes(nspace, nodelist); - return ext2x_convert_rc(ret);; + return pmix2x_convert_rc(ret);; } diff --git a/opal/mca/pmix/ext2x/pmix_ext2x_component.c b/opal/mca/pmix/ext2x/pmix2x_component.c similarity index 92% rename from opal/mca/pmix/ext2x/pmix_ext2x_component.c rename to opal/mca/pmix/ext2x/pmix2x_component.c index 134d84bdb4c..180c40d830f 100644 --- a/opal/mca/pmix/ext2x/pmix_ext2x_component.c +++ b/opal/mca/pmix/ext2x/pmix2x_component.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 2x14-2x16 Intel, Inc. All rights reserved. - * Copyright (c) 2x14-2x15 Research Organization for Information Science + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. - * Copyright (c) 2x16 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -22,13 +22,13 @@ #include "opal/class/opal_list.h" #include "opal/util/proc.h" #include "opal/mca/pmix/pmix.h" -#include "pmix_ext2x.h" +#include "pmix2x.h" /* * Public string showing the pmix external component version number */ -const char *opal_pmix_ext2x_component_version_string = - "OPAL external pmix2.0 MCA component version " OPAL_VERSION; +const char *opal_pmix_pmix2x_component_version_string = + "OPAL pmix2x MCA component version " OPAL_VERSION; /* * Local function diff --git a/opal/mca/pmix/pmix3x/pmix3x_server_north.c b/opal/mca/pmix/ext2x/pmix2x_server_north.c similarity index 83% rename from opal/mca/pmix/pmix3x/pmix3x_server_north.c rename to opal/mca/pmix/ext2x/pmix2x_server_north.c index 3161f4c6b5f..3caf433bc6b 100644 --- a/opal/mca/pmix/pmix3x/pmix3x_server_north.c +++ b/opal/mca/pmix/ext2x/pmix2x_server_north.c @@ -35,7 +35,7 @@ #include "opal/util/proc.h" #include "opal/util/show_help.h" #include "opal/mca/pmix/base/base.h" -#include "pmix3x.h" +#include "pmix2x.h" #include "pmix.h" #include "pmix_server.h" @@ -126,10 +126,10 @@ opal_pmix_server_module_t *host_module = NULL; static void opal_opcbfunc(int status, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; if (NULL != opalcaddy->opcbfunc) { - opalcaddy->opcbfunc(pmix3x_convert_opalrc(status), opalcaddy->cbdata); + opalcaddy->opcbfunc(pmix2x_convert_opalrc(status), opalcaddy->cbdata); } OBJ_RELEASE(opalcaddy); } @@ -139,33 +139,33 @@ static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *serv { int rc; opal_process_name_t proc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; if (NULL == host_module || NULL == host_module->client_connected) { return PMIX_SUCCESS; } - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* pass it up */ rc = host_module->client_connected(&proc, server_object, opal_opcbfunc, opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* server_object, pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; if (NULL == host_module || NULL == host_module->client_finalized) { @@ -174,12 +174,12 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -188,7 +188,7 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, @@ -200,7 +200,7 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, opal_namelist_t *nm; opal_process_name_t proc; int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; if (NULL == host_module || NULL == host_module->abort) { return PMIX_ERR_NOT_SUPPORTED; @@ -208,12 +208,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -223,9 +223,9 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* pass it up */ @@ -234,12 +234,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void _data_release(void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; if (NULL != opalcaddy->odmdxfunc) { opalcaddy->odmdxfunc(opalcaddy->ocbdata); @@ -251,9 +251,9 @@ static void opmdx_response(int status, const char *data, size_t sz, void *cbdata opal_pmix_release_cbfunc_t relcbfunc, void *relcbdata) { pmix_status_t rc; - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; - rc = pmix3x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (NULL != opalcaddy->mdxcbfunc) { opalcaddy->odmdxfunc = relcbfunc; opalcaddy->ocbdata = relcbdata; @@ -269,7 +269,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, char *data, size_t ndata, pmix_modex_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; size_t n; opal_namelist_t *nm; opal_value_t *iptr; @@ -280,7 +280,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->mdxcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -290,9 +290,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* convert the array of pmix_info_t to the list of info */ @@ -300,9 +300,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -312,7 +312,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, @@ -320,7 +320,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, pmix_modex_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *iptr; size_t n; @@ -331,12 +331,12 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->mdxcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -345,9 +345,9 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -359,7 +359,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, if (OPAL_ERR_IN_PROCESS == rc) { rc = OPAL_SUCCESS; } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_publish_fn(const pmix_proc_t *p, @@ -368,7 +368,7 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, { int rc; size_t n; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *oinfo; @@ -378,12 +378,12 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -392,9 +392,9 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -404,21 +404,21 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void opal_lkupcbfunc(int status, opal_list_t *data, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; pmix_status_t rc; pmix_pdata_t *d=NULL; size_t nd=0, n; opal_pmix_pdata_t *p; if (NULL != opalcaddy->lkupcbfunc) { - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* convert any returned data */ if (NULL != data) { nd = opal_list_get_size(data); @@ -427,9 +427,9 @@ static void opal_lkupcbfunc(int status, OPAL_LIST_FOREACH(p, data, opal_pmix_pdata_t) { /* convert the jobid */ (void)opal_snprintf_jobid(d[n].proc.nspace, PMIX_MAX_NSLEN, p->proc.jobid); - d[n].proc.rank = pmix3x_convert_opalrank(p->proc.vpid); + d[n].proc.rank = pmix2x_convert_opalrank(p->proc.vpid); (void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&d[n].value, &p->value); + pmix2x_value_load(&d[n].value, &p->value); } } opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata); @@ -442,7 +442,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, pmix_lookup_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *iptr; size_t n; @@ -453,12 +453,12 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->lkupcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -467,9 +467,9 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -479,7 +479,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } @@ -488,7 +488,7 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *iptr; size_t n; @@ -499,12 +499,12 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -513,9 +513,9 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -525,17 +525,17 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; pmix_status_t rc; char nspace[PMIX_MAX_NSLEN]; if (NULL != opalcaddy->spwncbfunc) { - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* convert the jobid */ (void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid); opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata); @@ -548,7 +548,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, const pmix_app_t apps[], size_t napps, pmix_spawn_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_pmix_app_t *app; opal_value_t *oinfo; @@ -561,12 +561,12 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->spwncbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -575,9 +575,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(job_info[k].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &job_info[k].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &job_info[k].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -600,9 +600,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&app->info, &oinfo->super); oinfo->key = strdup(apps[n].info[k].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &apps[n].info[k].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &apps[n].info[k].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } } @@ -614,7 +614,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } @@ -623,7 +623,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_namelist_t *nm; size_t n; opal_value_t *oinfo; @@ -633,7 +633,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -643,9 +643,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* convert the info */ @@ -653,9 +653,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -665,7 +665,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } @@ -674,7 +674,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_namelist_t *nm; size_t n; opal_value_t *oinfo; @@ -684,7 +684,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -694,9 +694,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* convert the info */ @@ -704,9 +704,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -716,20 +716,20 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, const pmix_info_t info[], size_t ninfo, pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; size_t n; opal_value_t *oinfo; int rc; /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -738,9 +738,9 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -750,7 +750,7 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes, @@ -765,7 +765,7 @@ static pmix_status_t server_notify_event(pmix_status_t code, pmix_info_t info[], size_t ninfo, pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t src; size_t n; opal_value_t *oinfo; @@ -776,20 +776,20 @@ static pmix_status_t server_notify_event(pmix_status_t code, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; /* convert the code */ - status = pmix3x_convert_rc(code); + status = pmix2x_convert_rc(code); /* convert the source */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&src.jobid, source->nspace))) { opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__); OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - src.vpid = pmix3x_convert_rank(source->rank); + src.vpid = pmix2x_convert_rank(source->rank); /* ignore the range for now */ @@ -798,9 +798,9 @@ static pmix_status_t server_notify_event(pmix_status_t code, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -809,12 +809,12 @@ static pmix_status_t server_notify_event(pmix_status_t code, opal_opcbfunc, opalcaddy))) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void _info_rel(void *cbdata) { - pmix3x_opcaddy_t *pcaddy = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *pcaddy = (pmix2x_opcaddy_t*)cbdata; OBJ_RELEASE(pcaddy); } @@ -824,15 +824,15 @@ static void info_cbfunc(int status, opal_pmix_release_cbfunc_t release_fn, void *release_cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; - pmix3x_opcaddy_t *pcaddy; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; + pmix2x_opcaddy_t *pcaddy; opal_value_t *kv; size_t n; - pcaddy = OBJ_NEW(pmix3x_opcaddy_t); + pcaddy = OBJ_NEW(pmix2x_opcaddy_t); /* convert the status */ - pcaddy->status = pmix3x_convert_opalrc(status); + pcaddy->status = pmix2x_convert_opalrc(status); /* convert the list to a pmix_info_t array */ if (NULL != info) { @@ -842,7 +842,7 @@ static void info_cbfunc(int status, n = 0; OPAL_LIST_FOREACH(kv, info, opal_value_t) { (void)strncpy(pcaddy->info[n].key, kv->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pcaddy->info[n].value, kv); + pmix2x_value_load(&pcaddy->info[n].value, kv); } } } @@ -864,7 +864,7 @@ static pmix_status_t server_query(pmix_proc_t *proct, pmix_info_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t requestor; int rc; size_t n, m; @@ -876,7 +876,7 @@ static pmix_status_t server_query(pmix_proc_t *proct, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->infocbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -884,9 +884,9 @@ static pmix_status_t server_query(pmix_proc_t *proct, if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) { opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__); OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - requestor.vpid = pmix3x_convert_rank(proct->rank); + requestor.vpid = pmix2x_convert_rank(proct->rank); /* convert the queries */ for (n=0; n < nqueries; n++) { @@ -899,9 +899,9 @@ static pmix_status_t server_query(pmix_proc_t *proct, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&q->qualifiers, &oinfo->super); oinfo->key = strdup(queries[n].qualifiers[m].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &queries[n].qualifiers[m].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &queries[n].qualifiers[m].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } } @@ -913,23 +913,23 @@ static pmix_status_t server_query(pmix_proc_t *proct, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void toolcbfunc(int status, opal_process_name_t proc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; pmix_status_t rc; pmix_proc_t p; /* convert the status */ - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* convert the process name */ (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc.jobid); - p.rank = pmix3x_convert_opalrank(proc.vpid); + p.rank = pmix2x_convert_opalrank(proc.vpid); /* pass it down */ if (NULL != opalcaddy->toolcbfunc) { @@ -942,14 +942,14 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo, pmix_tool_connection_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; size_t n; opal_value_t *oinfo; int rc; pmix_status_t err; /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->toolcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -958,9 +958,9 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - err = pmix3x_convert_opalrc(rc); + err = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(err, NULL, cbdata); } @@ -976,7 +976,7 @@ static void server_log(const pmix_proc_t *proct, const pmix_info_t directives[], size_t ndirs, pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t requestor; int rc; size_t n; @@ -991,7 +991,7 @@ static void server_log(const pmix_proc_t *proct, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -999,13 +999,13 @@ static void server_log(const pmix_proc_t *proct, if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) { opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__); OBJ_RELEASE(opalcaddy); - ret = pmix3x_convert_opalrc(rc); + ret = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(ret, cbdata); } return; } - requestor.vpid = pmix3x_convert_rank(proct->rank); + requestor.vpid = pmix2x_convert_rank(proct->rank); /* convert the data */ for (n=0; n < ndata; n++) { @@ -1013,9 +1013,9 @@ static void server_log(const pmix_proc_t *proct, /* we "borrow" the info field of the caddy as we and the * server function both agree on what will be there */ opal_list_append(&opalcaddy->info, &oinfo->super); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &data[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &data[n].value))) { OBJ_RELEASE(opalcaddy); - ret = pmix3x_convert_opalrc(rc); + ret = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(ret, cbdata); } @@ -1029,9 +1029,9 @@ static void server_log(const pmix_proc_t *proct, /* we "borrow" the apps field of the caddy as we and the * server function both agree on what will be there */ opal_list_append(&opalcaddy->apps, &oinfo->super); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &directives[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &directives[n].value))) { OBJ_RELEASE(opalcaddy); - ret = pmix3x_convert_opalrc(rc); + ret = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(ret, cbdata); } diff --git a/opal/mca/pmix/ext3x/pmix3x_server_south.c b/opal/mca/pmix/ext2x/pmix2x_server_south.c similarity index 80% rename from opal/mca/pmix/ext3x/pmix3x_server_south.c rename to opal/mca/pmix/ext2x/pmix2x_server_south.c index 654c2b120f9..37158584e77 100644 --- a/opal/mca/pmix/ext3x/pmix3x_server_south.c +++ b/opal/mca/pmix/ext2x/pmix2x_server_south.c @@ -36,7 +36,7 @@ #include "opal/util/proc.h" #include "opal/util/show_help.h" #include "opal/mca/pmix/base/base.h" -#include "pmix3x.h" +#include "pmix2x.h" #include "pmix.h" #include "pmix_server.h" @@ -71,7 +71,7 @@ static void errreg_cbfunc (pmix_status_t status, *active = false; } -int pmix3x_server_init(opal_pmix_server_module_t *module, +int pmix2x_server_init(opal_pmix_server_module_t *module, opal_list_t *info) { pmix_status_t rc; @@ -80,7 +80,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, pmix_info_t *pinfo; size_t sz, n; volatile bool active; - opal_pmix3x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) { asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg); @@ -94,7 +94,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, n = 0; OPAL_LIST_FOREACH(kv, info, opal_value_t) { (void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, kv); + pmix2x_value_load(&pinfo[n].value, kv); ++n; } } else { @@ -104,14 +104,14 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, /* insert ourselves into our list of jobids - it will be the * first, and so we'll check it first */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)opal_snprintf_jobid(job->nspace, PMIX_MAX_NSLEN, OPAL_PROC_MY_NAME.jobid); job->jobid = OPAL_PROC_MY_NAME.jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) { PMIX_INFO_FREE(pinfo, sz); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } PMIX_INFO_FREE(pinfo, sz); @@ -120,7 +120,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, /* register the default event handler */ active = true; - PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix3x_event_hdlr, errreg_cbfunc, (void*)&active); + PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix2x_event_hdlr, errreg_cbfunc, (void*)&active); PMIX_WAIT_FOR_COMPLETION(active); return OPAL_SUCCESS; @@ -132,7 +132,7 @@ static void fincb(pmix_status_t status, void *cbdata) *active = false; } -int pmix3x_server_finalize(void) +int pmix2x_server_finalize(void) { pmix_status_t rc; volatile bool active; @@ -143,32 +143,32 @@ int pmix3x_server_finalize(void) PMIX_WAIT_FOR_COMPLETION(active); rc = PMIx_server_finalize(); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_server_gen_regex(const char *input, char **regex) +int pmix2x_server_gen_regex(const char *input, char **regex) { pmix_status_t rc; rc = PMIx_generate_regex(input, regex); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_server_gen_ppn(const char *input, char **ppn) +int pmix2x_server_gen_ppn(const char *input, char **ppn) { pmix_status_t rc; rc = PMIx_generate_ppn(input, ppn); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } static void opcbfunc(pmix_status_t status, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; if (NULL != op->opcbfunc) { - op->opcbfunc(pmix3x_convert_rc(status), op->cbdata); + op->opcbfunc(pmix2x_convert_rc(status), op->cbdata); } if (op->active) { op->status = status; @@ -180,15 +180,15 @@ static void opcbfunc(pmix_status_t status, void *cbdata) static void _reg_nspace(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; opal_value_t *kv, *k2; pmix_info_t *pinfo = NULL, *pmap; size_t sz, szmap, m, n; char nspace[PMIX_MAX_NSLEN]; pmix_status_t rc; opal_list_t *pmapinfo; - opal_pmix3x_jobid_trkr_t *job; - pmix3x_opcaddy_t op; + opal_pmix2x_jobid_trkr_t *job; + pmix2x_opcaddy_t op; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -197,10 +197,10 @@ static void _reg_nspace(int sd, short args, void *cbdata) (void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, cd->jobid); /* store this job in our list of known nspaces */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = cd->jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); /* convert the list to an array of pmix_info_t */ if (NULL != cd->info) { @@ -223,11 +223,11 @@ static void _reg_nspace(int sd, short args, void *cbdata) m = 0; OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) { (void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pmap[m].value, k2); + pmix2x_value_load(&pmap[m].value, k2); ++m; } } else { - pmix3x_value_load(&pinfo[n].value, kv); + pmix2x_value_load(&pinfo[n].value, kv); } ++n; } @@ -236,7 +236,7 @@ static void _reg_nspace(int sd, short args, void *cbdata) pinfo = NULL; } - OBJ_CONSTRUCT(&op, pmix3x_opcaddy_t); + OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t); op.active = true; rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz, opcbfunc, (void*)&op); @@ -247,7 +247,7 @@ static void _reg_nspace(int sd, short args, void *cbdata) } /* ensure we execute the cbfunc so the caller doesn't hang */ if (NULL != cd->opcbfunc) { - cd->opcbfunc(pmix3x_convert_rc(op.status), cd->cbdata); + cd->opcbfunc(pmix2x_convert_rc(op.status), cd->cbdata); } if (NULL != pinfo) { PMIX_INFO_FREE(pinfo, sz); @@ -256,17 +256,17 @@ static void _reg_nspace(int sd, short args, void *cbdata) OBJ_RELEASE(cd); } -int pmix3x_server_register_nspace(opal_jobid_t jobid, +int pmix2x_server_register_nspace(opal_jobid_t jobid, int nlocalprocs, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; /* we must threadshift this request as it touches * shared lists of objects */ - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); cd->jobid = jobid; cd->status = nlocalprocs; cd->info = info; @@ -287,10 +287,10 @@ int pmix3x_server_register_nspace(opal_jobid_t jobid, static void tdcbfunc(pmix_status_t status, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; if (NULL != cd->opcbfunc) { - cd->opcbfunc(pmix3x_convert_rc(status), cd->cbdata); + cd->opcbfunc(pmix2x_convert_rc(status), cd->cbdata); } if (cd->active) { cd->active = false; @@ -301,11 +301,11 @@ static void tdcbfunc(pmix_status_t status, void *cbdata) static void _dereg_nspace(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_jobid_trkr_t *jptr; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_jobid_trkr_t *jptr; /* if we don't already have it, we can ignore this */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == cd->jobid) { /* found it - tell the server to deregister */ cd->active = true; @@ -313,7 +313,7 @@ static void _dereg_nspace(int sd, short args, void *cbdata) PMIX_WAIT_FOR_COMPLETION(cd->active); OBJ_RELEASE(cd); /* now get rid of it from our list */ - opal_list_remove_item(&mca_pmix_ext3x_component.jobids, &jptr->super); + opal_list_remove_item(&mca_pmix_ext2x_component.jobids, &jptr->super); OBJ_RELEASE(jptr); return; } @@ -322,15 +322,15 @@ static void _dereg_nspace(int sd, short args, void *cbdata) tdcbfunc(PMIX_ERR_NOT_FOUND, cd); } -void pmix3x_server_deregister_nspace(opal_jobid_t jobid, +void pmix2x_server_deregister_nspace(opal_jobid_t jobid, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; /* we must threadshift this request as it touches * shared lists of objects */ - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); cd->jobid = jobid; cd->opcbfunc = cbfunc; cd->cbdata = cbdata; @@ -343,7 +343,7 @@ void pmix3x_server_deregister_nspace(opal_jobid_t jobid, } } -int pmix3x_server_register_client(const opal_process_name_t *proc, +int pmix2x_server_register_client(const opal_process_name_t *proc, uid_t uid, gid_t gid, void *server_object, opal_pmix_op_cbfunc_t cbfunc, @@ -351,13 +351,13 @@ int pmix3x_server_register_client(const opal_process_name_t *proc, { pmix_status_t rc; pmix_proc_t p; - pmix3x_opcaddy_t op; + pmix2x_opcaddy_t op; /* convert the jobid */ (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid); - p.rank = pmix3x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); - OBJ_CONSTRUCT(&op, pmix3x_opcaddy_t); + OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t); op.active = true; rc = PMIx_server_register_client(&p, uid, gid, server_object, opcbfunc, (void*)&op); @@ -366,21 +366,21 @@ int pmix3x_server_register_client(const opal_process_name_t *proc, rc = op.status; } OBJ_DESTRUCT(&op); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } static void _dereg_client(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_jobid_trkr_t *jptr; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_jobid_trkr_t *jptr; pmix_proc_t p; /* if we don't already have it, we can ignore this */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == cd->source->jobid) { /* found it - tell the server to deregister */ (void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(cd->source->vpid); + p.rank = pmix2x_convert_opalrank(cd->source->vpid); cd->active = true; PMIx_server_deregister_client(&p, tdcbfunc, (void*)cd); PMIX_WAIT_FOR_COMPLETION(cd->active); @@ -392,15 +392,15 @@ static void _dereg_client(int sd, short args, void *cbdata) /* tell the local PMIx server to cleanup this client as it is * done executing */ -void pmix3x_server_deregister_client(const opal_process_name_t *proc, +void pmix2x_server_deregister_client(const opal_process_name_t *proc, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); cd->source = proc; cd->opcbfunc = cbfunc; cd->cbdata = cbdata; @@ -414,17 +414,17 @@ void pmix3x_server_deregister_client(const opal_process_name_t *proc, } /* have the local PMIx server setup the environment for this client */ -int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env) +int pmix2x_server_setup_fork(const opal_process_name_t *proc, char ***env) { pmix_status_t rc; pmix_proc_t p; /* convert the jobid */ (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid); - p.rank = pmix3x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); rc = PMIx_server_setup_fork(&p, env); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } /* this is the call back up from the embedded PMIx server that @@ -433,9 +433,9 @@ int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env) static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbdata) { int rc; - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; - rc = pmix3x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (NULL != op->mdxcbfunc) { op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL); } @@ -443,31 +443,31 @@ static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbd } /* request modex data for a local proc from the PMIx server */ -int pmix3x_server_dmodex(const opal_process_name_t *proc, +int pmix2x_server_dmodex(const opal_process_name_t *proc, opal_pmix_modex_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; pmix_status_t rc; /* setup the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->mdxcbfunc = cbfunc; op->cbdata = cbdata; /* convert the jobid */ (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, proc->jobid); - op->p.rank = pmix3x_convert_opalrank(proc->vpid); + op->p.rank = pmix2x_convert_opalrank(proc->vpid); /* find the internally-cached data for this proc */ rc = PMIx_server_dmodex_request(&op->p, dmdx_response, op); if (PMIX_SUCCESS != rc) { OBJ_RELEASE(op); } - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } /* tell the PMIx server to notify its local clients of an event */ -int pmix3x_server_notify_event(int status, +int pmix2x_server_notify_event(int status, const opal_process_name_t *source, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) @@ -476,7 +476,7 @@ int pmix3x_server_notify_event(int status, pmix_info_t *pinfo; size_t sz, n; pmix_status_t rc; - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; /* convert the list to an array of pmix_info_t */ if (NULL != info) { @@ -485,14 +485,14 @@ int pmix3x_server_notify_event(int status, n = 0; OPAL_LIST_FOREACH(kv, info, opal_value_t) { (void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, kv); + pmix2x_value_load(&pinfo[n].value, kv); } } else { sz = 0; pinfo = NULL; } /* setup the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->info = pinfo; op->sz = sz; op->opcbfunc = cbfunc; @@ -500,14 +500,14 @@ int pmix3x_server_notify_event(int status, /* convert the jobid */ if (NULL == source) { (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, OPAL_JOBID_INVALID); - op->p.rank = pmix3x_convert_opalrank(OPAL_VPID_INVALID); + op->p.rank = pmix2x_convert_opalrank(OPAL_VPID_INVALID); } else { (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid); - op->p.rank = pmix3x_convert_opalrank(source->vpid); + op->p.rank = pmix2x_convert_opalrank(source->vpid); } - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* the range is irrelevant here as the server is passing * the event down to its local clients */ rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL, @@ -515,5 +515,5 @@ int pmix3x_server_notify_event(int status, if (PMIX_SUCCESS != rc) { OBJ_RELEASE(op); } - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } diff --git a/opal/mca/pmix/ext2x/pmix_ext2x.c b/opal/mca/pmix/ext2x/pmix_ext2x.c deleted file mode 100644 index 97e2d3f2145..00000000000 --- a/opal/mca/pmix/ext2x/pmix_ext2x.c +++ /dev/null @@ -1,1409 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2x14-2x16 Intel, Inc. All rights reserved. - * Copyright (c) 2x14-2x16 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2x14-2x15 Mellanox Technologies, Inc. - * All rights reserved. - * Copyright (c) 2x16 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" -#include "opal/types.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "opal/dss/dss.h" -#include "opal/mca/event/event.h" -#include "opal/mca/hwloc/base/base.h" -#include "opal/runtime/opal.h" -#include "opal/runtime/opal_progress_threads.h" -#include "opal/util/argv.h" -#include "opal/util/error.h" -#include "opal/util/output.h" -#include "opal/util/proc.h" -#include "opal/util/show_help.h" - -#include "pmix_ext2x.h" -#include "opal/mca/pmix/base/base.h" -#include "opal/mca/pmix/pmix_types.h" - -#include - -/**** C.O.M.M.O.N I.N.T.E.R.F.A.C.E.S ****/ - -/* These are functions used by both client and server to - * access common functions in the embedded PMIx library */ - -static const char *ext2x_get_nspace(opal_jobid_t jobid); -static void ext2x_register_jobid(opal_jobid_t jobid, const char *nspace); -static void register_handler(opal_list_t *event_codes, - opal_list_t *info, - opal_pmix_notification_fn_t evhandler, - opal_pmix_evhandler_reg_cbfunc_t cbfunc, - void *cbdata); -static void deregister_handler(size_t evhandler, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata); -static int notify_event(int status, - const opal_process_name_t *source, - opal_pmix_data_range_t range, - opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata); - -const opal_pmix_base_module_t opal_pmix_ext2x_module = { - /* client APIs */ - .init = ext2x_client_init, - .finalize = ext2x_client_finalize, - .initialized = ext2x_initialized, - .abort = ext2x_abort, - .commit = ext2x_commit, - .fence = ext2x_fence, - .fence_nb = ext2x_fencenb, - .put = ext2x_put, - .get = ext2x_get, - .get_nb = ext2x_getnb, - .publish = ext2x_publish, - .publish_nb = ext2x_publishnb, - .lookup = ext2x_lookup, - .lookup_nb = ext2x_lookupnb, - .unpublish = ext2x_unpublish, - .unpublish_nb = ext2x_unpublishnb, - .spawn = ext2x_spawn, - .spawn_nb = ext2x_spawnnb, - .connect = ext2x_connect, - .connect_nb = ext2x_connectnb, - .disconnect = ext2x_disconnect, - .disconnect_nb = ext2x_disconnectnb, - .resolve_peers = ext2x_resolve_peers, - .resolve_nodes = ext2x_resolve_nodes, - /* server APIs */ - .server_init = ext2x_server_init, - .server_finalize = ext2x_server_finalize, - .generate_regex = ext2x_server_gen_regex, - .generate_ppn = ext2x_server_gen_ppn, - .server_register_nspace = ext2x_server_register_nspace, - .server_deregister_nspace = ext2x_server_deregister_nspace, - .server_register_client = ext2x_server_register_client, - .server_deregister_client = ext2x_server_deregister_client, - .server_setup_fork = ext2x_server_setup_fork, - .server_dmodex_request = ext2x_server_dmodex, - .server_notify_event = ext2x_server_notify_event, - /* utility APIs */ - .get_version = PMIx_Get_version, - .register_evhandler = register_handler, - .deregister_evhandler = deregister_handler, - .notify_event = notify_event, - .store_local = ext2x_store_local, - .get_nspace = ext2x_get_nspace, - .register_jobid = ext2x_register_jobid -}; - -static const char *ext2x_get_nspace(opal_jobid_t jobid) -{ - opal_ext2x_jobid_trkr_t *jptr; - - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { - if (jptr->jobid == jobid) { - return jptr->nspace; - } - } - return NULL; -} - -static void ext2x_register_jobid(opal_jobid_t jobid, const char *nspace) -{ - opal_ext2x_jobid_trkr_t *jptr; - - /* if we don't already have it, add this to our jobid tracker */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { - if (jptr->jobid == jobid) { - return; - } - } - jptr = OBJ_NEW(opal_ext2x_jobid_trkr_t); - (void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN); - jptr->jobid = jobid; - opal_list_append(&mca_pmix_ext2x_component.jobids, &jptr->super); -} - -static void completion_handler(int status, void *cbdata) -{ - opal_ext2x_event_chain_t *chain = (opal_ext2x_event_chain_t*)cbdata; - if (NULL != chain->info) { - OPAL_LIST_RELEASE(chain->info); - } -} - -static void progress_local_event_hdlr(int status, - opal_list_t *results, - opal_pmix_op_cbfunc_t cbfunc, void *thiscbdata, - void *notification_cbdata) -{ - opal_ext2x_event_chain_t *chain = (opal_ext2x_event_chain_t*)notification_cbdata; - size_t n; - opal_list_item_t *nxt; - opal_ext2x_single_event_t *sing; - opal_ext2x_multi_event_t *multi; - opal_ext2x_default_event_t *def; - - /* if the caller indicates that the chain is completed, then stop here */ - if (OPAL_ERR_HANDLERS_COMPLETE == status) { - goto complete; - } - - /* if any results were provided, then add them here */ - if (NULL != results) { - while (NULL != (nxt = opal_list_remove_first(results))) { - opal_list_append(results, nxt); - } - } - - /* see if we need to continue, starting with the single code events */ - if (NULL != chain->sing) { - /* the last handler was for a single code - see if there are - * any others that match this event */ - while (opal_list_get_end(&mca_pmix_ext2x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) { - sing = (opal_ext2x_single_event_t*)nxt; - if (sing->code == chain->status) { - OBJ_RETAIN(chain); - chain->sing = sing; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s PROGRESS CALLING SINGLE EVHDLR", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - sing->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - goto complete; - } - } - /* if we get here, then there are no more single code - * events that match */ - chain->sing = NULL; - /* pickup the beginning of the multi-code event list */ - if (0 < opal_list_get_size(&mca_pmix_ext2x_component.multi_events)) { - chain->multi = (opal_ext2x_multi_event_t*)opal_list_get_begin(&mca_pmix_ext2x_component.multi_events); - } - } - - /* see if we need to continue with the multi code events */ - if (NULL != chain->multi) { - while (opal_list_get_end(&mca_pmix_ext2x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) { - multi = (opal_ext2x_multi_event_t*)nxt; - for (n=0; n < multi->ncodes; n++) { - if (multi->codes[n] == chain->status) { - /* found it - invoke the handler, pointing its - * callback function to our progression function */ - OBJ_RETAIN(chain); - chain->multi = multi; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s PROGRESS CALLING MULTI EVHDLR", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - multi->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - goto complete; - } - } - } - /* if we get here, then there are no more multi-mode - * events that match */ - chain->multi = NULL; - /* pickup the beginning of the default event list */ - if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) { - chain->def = (opal_ext2x_default_event_t*)opal_list_get_begin(&mca_pmix_ext2x_component.default_events); - } - } - - /* if they didn't want it to go to a default handler, then we are done */ - if (chain->nondefault) { - goto complete; - } - - if (NULL != chain->def) { - if (opal_list_get_end(&mca_pmix_ext2x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) { - def = (opal_ext2x_default_event_t*)nxt; - OBJ_RETAIN(chain); - chain->def = def; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s PROGRESS CALLING DEFAULT EVHDLR", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - def->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - } - } - - complete: - /* we still have to call their final callback */ - if (NULL != chain->final_cbfunc) { - chain->final_cbfunc(OPAL_SUCCESS, chain->final_cbdata); - } - /* maintain acctng */ - OBJ_RELEASE(chain); - /* let the caller know that we are done with their callback */ - if (NULL != cbfunc) { - cbfunc(OPAL_SUCCESS, thiscbdata); - } -} - -static void _event_hdlr(int sd, short args, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - size_t n; - opal_ext2x_event_chain_t *chain; - opal_ext2x_single_event_t *sing; - opal_ext2x_multi_event_t *multi; - opal_ext2x_default_event_t *def; - - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s _EVENT_HDLR RECEIVED NOTIFICATION OF STATUS %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), cd->status); - - chain = OBJ_NEW(opal_ext2x_event_chain_t); - /* point it at our final callback */ - chain->final_cbfunc = completion_handler; - chain->final_cbdata = chain; - - /* carry across provided info */ - chain->status = cd->status; - chain->source = cd->pname; - chain->info = cd->info; - chain->nondefault = cd->nondefault; - - /* cycle thru the single-event registrations first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_ext2x_single_event_t) { - if (sing->code == chain->status) { - /* found it - invoke the handler, pointing its - * callback function to our progression function */ - OBJ_RETAIN(chain); - chain->sing = sing; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s _EVENT_HDLR CALLING SINGLE EVHDLR", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - sing->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - return; - } - } - - /* if we didn't find any match in the single-event registrations, - * then cycle thru the multi-event registrations next */ - OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_ext2x_multi_event_t) { - for (n=0; n < multi->ncodes; n++) { - if (multi->codes[n] == chain->status) { - /* found it - invoke the handler, pointing its - * callback function to our progression function */ - OBJ_RETAIN(chain); - chain->multi = multi; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s _EVENT_HDLR CALLING MULTI EVHDLR", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - multi->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - return; - } - } - } - - /* if they didn't want it to go to a default handler, then we are done */ - if (chain->nondefault) { - /* if we get here, then we need to cache this event in case they - * register for it later - we cannot lose individual events */ - opal_list_append(&mca_pmix_ext2x_component.cache, &chain->super); - return; - } - - /* we are done with the threadshift caddy */ - OBJ_RELEASE(cd); - - /* finally, pass it to any default handlers */ - if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) { - def = (opal_ext2x_default_event_t*)opal_list_get_first(&mca_pmix_ext2x_component.default_events); - OBJ_RETAIN(chain); - chain->def = def; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s _EVENT_HDLR CALLING DEFAULT EVHDLR", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - def->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - return; - } - - /* we still have to call their final callback */ - if (NULL != chain->final_cbfunc) { - chain->final_cbfunc(PMIX_SUCCESS, chain->final_cbdata); - } - return; -} - -/* this function will be called by the PMIx client library - * whenever it receives notification of an event. The - * notification can come from an ORTE daemon (when launched - * by mpirun), directly from a RM (when direct launched), or - * from another process (via the local daemon). - * The call will occur in the PMIx event base */ -void ext2x_event_hdlr(size_t evhdlr_registration_id, - pmix_status_t status, const pmix_proc_t *source, - pmix_info_t info[], size_t ninfo, - pmix_info_t results[], size_t nresults, - pmix_event_notification_cbfunc_fn_t cbfunc, - void *cbdata) -{ - ext2x_threadshift_t *cd; - int rc; - opal_value_t *iptr; - size_t n; - - /* this is in the PMIx local thread - need to threadshift to - * our own thread as we will be accessing framework-global - * lists and objects */ - - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s RECEIVED NOTIFICATION OF STATUS %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status); - - cd = OBJ_NEW(ext2x_threadshift_t); - - /* convert the incoming status */ - cd->status = ext2x_convert_rc(status); - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s CONVERTED STATUS %d TO STATUS %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status, cd->status); - /* convert the nspace/rank to an opal_process_name_t */ - if (NULL == source) { - cd->pname.jobid = OPAL_NAME_INVALID->jobid; - cd->pname.vpid = OPAL_NAME_INVALID->vpid; - } else { - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&cd->pname.jobid, source->nspace))) { - OPAL_ERROR_LOG(rc); - OBJ_RELEASE(cd); - return; - } - cd->pname.vpid = ext2x_convert_rank(source->rank); - } - - /* convert the array of info */ - if (NULL != info) { - cd->info = OBJ_NEW(opal_list_t); - for (n=0; n < ninfo; n++) { - if (0 == strncmp(info[n].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) { - cd->nondefault = true; - } - iptr = OBJ_NEW(opal_value_t); - iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) { - OPAL_ERROR_LOG(rc); - OBJ_RELEASE(iptr); - continue; - } - opal_list_append(cd->info, &iptr->super); - } - } - /* now push it into the local thread */ - event_assign(&cd->ev, opal_pmix_base.evbase, - -1, EV_WRITE, _event_hdlr, cd); - event_active(&cd->ev, EV_WRITE, 1); - - /* we don't need any of the data they provided, - * so let them go */ - if (NULL != cbfunc) { - cbfunc(PMIX_SUCCESS, NULL, 0, NULL, NULL, cbdata); - } -} - -opal_vpid_t ext2x_convert_rank(int rank) -{ - switch(rank) { - case PMIX_RANK_UNDEF: - return OPAL_VPID_INVALID; - case PMIX_RANK_WILDCARD: - return OPAL_VPID_WILDCARD; - default: - return (opal_vpid_t)rank; - } -} - -int ext2x_convert_opalrank(opal_vpid_t vpid) -{ - switch(vpid) { - case OPAL_VPID_WILDCARD: - return PMIX_RANK_WILDCARD; - case OPAL_VPID_INVALID: - return PMIX_RANK_UNDEF; - default: - return (int)vpid; - } -} - -pmix_status_t ext2x_convert_opalrc(int rc) -{ - switch (rc) { - case OPAL_ERR_DEBUGGER_RELEASE: - return PMIX_ERR_DEBUGGER_RELEASE; - - case OPAL_ERR_HANDLERS_COMPLETE: - return PMIX_EVENT_ACTION_COMPLETE; - - case OPAL_ERR_PROC_ABORTED: - return PMIX_ERR_PROC_ABORTED; - - case OPAL_ERR_PROC_REQUESTED_ABORT: - return PMIX_ERR_PROC_REQUESTED_ABORT; - - case OPAL_ERR_PROC_ABORTING: - return PMIX_ERR_PROC_ABORTING; - - case OPAL_ERR_NODE_DOWN: - return PMIX_ERR_NODE_DOWN; - - case OPAL_ERR_NODE_OFFLINE: - return PMIX_ERR_NODE_OFFLINE; - - case OPAL_ERR_NOT_IMPLEMENTED: - case OPAL_ERR_NOT_SUPPORTED: - return PMIX_ERR_NOT_SUPPORTED; - - case OPAL_ERR_NOT_FOUND: - return PMIX_ERR_NOT_FOUND; - - case OPAL_ERR_PERM: - case OPAL_ERR_UNREACH: - case OPAL_ERR_SERVER_NOT_AVAIL: - return PMIX_ERR_UNREACH; - - case OPAL_ERR_BAD_PARAM: - return PMIX_ERR_BAD_PARAM; - - case OPAL_ERR_OUT_OF_RESOURCE: - return PMIX_ERR_OUT_OF_RESOURCE; - - case OPAL_ERR_DATA_VALUE_NOT_FOUND: - return PMIX_ERR_DATA_VALUE_NOT_FOUND; - - case OPAL_ERR_TIMEOUT: - return PMIX_ERR_TIMEOUT; - - case OPAL_ERR_WOULD_BLOCK: - return PMIX_ERR_WOULD_BLOCK; - - case OPAL_EXISTS: - return PMIX_EXISTS; - - case OPAL_ERR_PARTIAL_SUCCESS: - return PMIX_QUERY_PARTIAL_SUCCESS; - - case OPAL_ERROR: - return PMIX_ERROR; - case OPAL_SUCCESS: - return PMIX_SUCCESS; - default: - return PMIX_ERROR; - } -} - -int ext2x_convert_rc(pmix_status_t rc) -{ - switch (rc) { - case PMIX_ERR_DEBUGGER_RELEASE: - return OPAL_ERR_DEBUGGER_RELEASE; - - case PMIX_EVENT_ACTION_COMPLETE: - return OPAL_ERR_HANDLERS_COMPLETE; - - case PMIX_ERR_PROC_ABORTED: - return OPAL_ERR_PROC_ABORTED; - - case PMIX_ERR_PROC_REQUESTED_ABORT: - return OPAL_ERR_PROC_REQUESTED_ABORT; - - case PMIX_ERR_PROC_ABORTING: - return OPAL_ERR_PROC_ABORTING; - - case PMIX_ERR_NODE_DOWN: - return OPAL_ERR_NODE_DOWN; - - case PMIX_ERR_NODE_OFFLINE: - return OPAL_ERR_NODE_OFFLINE; - - case PMIX_ERR_NOT_SUPPORTED: - return OPAL_ERR_NOT_SUPPORTED; - - case PMIX_ERR_NOT_FOUND: - return OPAL_ERR_NOT_FOUND; - - case PMIX_ERR_OUT_OF_RESOURCE: - return OPAL_ERR_OUT_OF_RESOURCE; - - case PMIX_ERR_INIT: - return OPAL_ERROR; - - case PMIX_ERR_BAD_PARAM: - return OPAL_ERR_BAD_PARAM; - - case PMIX_ERR_UNREACH: - case PMIX_ERR_NO_PERMISSIONS: - return OPAL_ERR_UNREACH; - - case PMIX_ERR_TIMEOUT: - return OPAL_ERR_TIMEOUT; - - case PMIX_ERR_WOULD_BLOCK: - return OPAL_ERR_WOULD_BLOCK; - - case PMIX_ERR_LOST_CONNECTION_TO_SERVER: - case PMIX_ERR_LOST_PEER_CONNECTION: - case PMIX_ERR_LOST_CONNECTION_TO_CLIENT: - return OPAL_ERR_COMM_FAILURE; - - case PMIX_EXISTS: - return OPAL_EXISTS; - - case PMIX_QUERY_PARTIAL_SUCCESS: - return OPAL_ERR_PARTIAL_SUCCESS; - - case PMIX_ERROR: - return OPAL_ERROR; - case PMIX_SUCCESS: - return OPAL_SUCCESS; - default: - return OPAL_ERROR; - } -} - -opal_pmix_scope_t ext2x_convert_scope(pmix_scope_t scope) -{ - switch(scope) { - case PMIX_SCOPE_UNDEF: - return OPAL_PMIX_SCOPE_UNDEF; - case PMIX_LOCAL: - return OPAL_PMIX_LOCAL; - case PMIX_REMOTE: - return OPAL_PMIX_REMOTE; - case PMIX_GLOBAL: - return OPAL_PMIX_GLOBAL; - default: - return OPAL_PMIX_SCOPE_UNDEF; - } -} - -pmix_scope_t ext2x_convert_opalscope(opal_pmix_scope_t scope) { - switch(scope) { - case OPAL_PMIX_LOCAL: - return PMIX_LOCAL; - case OPAL_PMIX_REMOTE: - return PMIX_REMOTE; - case OPAL_PMIX_GLOBAL: - return PMIX_GLOBAL; - default: - return PMIX_SCOPE_UNDEF; - } -} - -pmix_data_range_t ext2x_convert_opalrange(opal_pmix_data_range_t range) { - switch(range) { - case OPAL_PMIX_RANGE_UNDEF: - return PMIX_RANGE_UNDEF; - case OPAL_PMIX_RANGE_LOCAL: - return PMIX_RANGE_LOCAL; - case OPAL_PMIX_RANGE_NAMESPACE: - return PMIX_RANGE_NAMESPACE; - case OPAL_PMIX_RANGE_SESSION: - return PMIX_RANGE_SESSION; - case OPAL_PMIX_RANGE_GLOBAL: - return PMIX_RANGE_GLOBAL; - case OPAL_PMIX_RANGE_CUSTOM: - return PMIX_RANGE_CUSTOM; - default: - return PMIX_SCOPE_UNDEF; - } -} - -opal_pmix_data_range_t ext2x_convert_range(pmix_data_range_t range) { - switch(range) { - case PMIX_RANGE_UNDEF: - return OPAL_PMIX_RANGE_UNDEF; - case PMIX_RANGE_LOCAL: - return OPAL_PMIX_RANGE_LOCAL; - case PMIX_RANGE_NAMESPACE: - return OPAL_PMIX_RANGE_NAMESPACE; - case PMIX_RANGE_SESSION: - return OPAL_PMIX_RANGE_SESSION; - case PMIX_RANGE_GLOBAL: - return OPAL_PMIX_RANGE_GLOBAL; - case PMIX_RANGE_CUSTOM: - return OPAL_PMIX_RANGE_CUSTOM; - default: - return OPAL_PMIX_SCOPE_UNDEF; - } -} - -opal_pmix_persistence_t ext2x_convert_persist(pmix_persistence_t persist) -{ - switch(persist) { - case PMIX_PERSIST_INDEF: - return OPAL_PMIX_PERSIST_INDEF; - case PMIX_PERSIST_FIRST_READ: - return OPAL_PMIX_PERSIST_FIRST_READ; - case PMIX_PERSIST_PROC: - return OPAL_PMIX_PERSIST_PROC; - case PMIX_PERSIST_APP: - return OPAL_PMIX_PERSIST_APP; - case PMIX_PERSIST_SESSION: - return OPAL_PMIX_PERSIST_SESSION; - default: - return OPAL_PMIX_PERSIST_INDEF; - } -} - -pmix_persistence_t ext2x_convert_opalpersist(opal_pmix_persistence_t persist) -{ - switch(persist) { - case OPAL_PMIX_PERSIST_INDEF: - return PMIX_PERSIST_INDEF; - case OPAL_PMIX_PERSIST_FIRST_READ: - return PMIX_PERSIST_FIRST_READ; - case OPAL_PMIX_PERSIST_PROC: - return PMIX_PERSIST_PROC; - case OPAL_PMIX_PERSIST_APP: - return PMIX_PERSIST_APP; - case OPAL_PMIX_PERSIST_SESSION: - return PMIX_PERSIST_SESSION; - default: - return PMIX_PERSIST_INDEF; - } -} - -/**** RHC: NEED TO ADD SUPPORT FOR NEW PMIX DATA TYPES, INCLUDING - **** CONVERSION OF PROC STATES ****/ - -void ext2x_value_load(pmix_value_t *v, - opal_value_t *kv) -{ - int ival; - uint64_t ui64; - - switch(kv->type) { - case OPAL_UNDEF: - v->type = PMIX_UNDEF; - break; - case OPAL_BOOL: - v->type = PMIX_BOOL; - memcpy(&(v->data.flag), &kv->data.flag, 1); - break; - case OPAL_BYTE: - v->type = PMIX_BYTE; - memcpy(&(v->data.byte), &kv->data.byte, 1); - break; - case OPAL_STRING: - v->type = PMIX_STRING; - if (NULL != kv->data.string) { - v->data.string = strdup(kv->data.string); - } else { - v->data.string = NULL; - } - break; - case OPAL_SIZE: - v->type = PMIX_SIZE; - v->data.size = (size_t)kv->data.size; - break; - case OPAL_PID: - v->type = PMIX_PID; - memcpy(&(v->data.pid), &kv->data.pid, sizeof(pid_t)); - break; - case OPAL_INT: - v->type = PMIX_INT; - memcpy(&(v->data.integer), &kv->data.integer, sizeof(int)); - break; - case OPAL_INT8: - v->type = PMIX_INT8; - memcpy(&(v->data.int8), &kv->data.int8, 1); - break; - case OPAL_INT16: - v->type = PMIX_INT16; - memcpy(&(v->data.int16), &kv->data.int16, 2); - break; - case OPAL_INT32: - v->type = PMIX_INT32; - memcpy(&(v->data.int32), &kv->data.int32, 4); - break; - case OPAL_INT64: - v->type = PMIX_INT64; - memcpy(&(v->data.int64), &kv->data.int64, 8); - break; - case OPAL_UINT: - v->type = PMIX_UINT; - memcpy(&(v->data.uint), &kv->data.uint, sizeof(int)); - break; - case OPAL_UINT8: - v->type = PMIX_UINT8; - memcpy(&(v->data.uint8), &kv->data.uint8, 1); - break; - case OPAL_UINT16: - v->type = PMIX_UINT16; - memcpy(&(v->data.uint16), &kv->data.uint16, 2); - break; - case OPAL_UINT32: - v->type = PMIX_UINT32; - memcpy(&(v->data.uint32), &kv->data.uint32, 4); - break; - case OPAL_UINT64: - v->type = PMIX_UINT64; - memcpy(&(v->data.uint64), &kv->data.uint64, 8); - break; - case OPAL_FLOAT: - v->type = PMIX_FLOAT; - memcpy(&(v->data.fval), &kv->data.fval, sizeof(float)); - break; - case OPAL_DOUBLE: - v->type = PMIX_DOUBLE; - memcpy(&(v->data.dval), &kv->data.dval, sizeof(double)); - break; - case OPAL_TIMEVAL: - v->type = PMIX_TIMEVAL; - memcpy(&(v->data.tv), &kv->data.tv, sizeof(struct timeval)); - break; - case OPAL_TIME: - /* put it in the uint64 */ - v->type = PMIX_UINT64; - ui64 = kv->data.time; - memcpy(&(v->data.uint64), &ui64, sizeof(uint64_t)); - break; - case OPAL_STATUS: - v->type = PMIX_STATUS; - memcpy(&(v->data.status), &kv->data.status, sizeof(pmix_status_t)); - break; - case OPAL_VPID: - /* v2.x doesn't have a proc_rank type, so put it in the int */ - v->type = PMIX_INT; - ival = ext2x_convert_opalrank(kv->data.name.vpid); - memcpy(&(v->data.integer), &ival, sizeof(int)); - break; - case OPAL_NAME: - v->type = PMIX_PROC; - /* have to stringify the jobid */ - (void)opal_snprintf_jobid(v->data.proc.nspace, PMIX_MAX_NSLEN, kv->data.name.vpid); - v->data.proc.rank = ext2x_convert_opalrank(kv->data.name.vpid); - break; - case OPAL_BYTE_OBJECT: - v->type = PMIX_BYTE_OBJECT; - if (NULL != kv->data.bo.bytes) { - v->data.bo.bytes = (char*)malloc(kv->data.bo.size); - memcpy(v->data.bo.bytes, kv->data.bo.bytes, kv->data.bo.size); - v->data.bo.size = (size_t)kv->data.bo.size; - } else { - v->data.bo.bytes = NULL; - v->data.bo.size = 0; - } - break; - case OPAL_PERSIST: - /* put it in the int */ - v->type = PMIX_INT; - ival = ext2x_convert_opalpersist(kv->data.uint8); - memcpy(&(v->data.integer), &ival, sizeof(int)); - break; - case OPAL_SCOPE: - /* put it in the int */ - v->type = PMIX_INT; - ival = ext2x_convert_opalscope(kv->data.uint8); - memcpy(&(v->data.integer), &ival, sizeof(int)); - break; - case OPAL_DATA_RANGE: - /* put it in the int */ - v->type = PMIX_INT; - ival = ext2x_convert_opalrange(kv->data.uint8); - memcpy(&(v->data.integer), &ival, sizeof(int)); - break; - case OPAL_PROC_STATE: - /* this version has no knowledge of states, so just pass it along */ - v->type = PMIX_UINT8; - /* the OPAL layer doesn't have any concept of proc state, - * so the ORTE layer is responsible for converting it */ - memcpy(&v->data.uint8, &kv->data.uint8, sizeof(uint8_t)); - break; - case OPAL_PTR: - v->type = PMIX_POINTER; - v->data.ptr = kv->data.ptr; - break; - default: - /* silence warnings */ - break; - } -} - -int ext2x_value_unload(opal_value_t *kv, - const char *key, - const pmix_value_t *v) -{ - int rc=OPAL_SUCCESS; - - /* some keys have implied data types for which - * this version has no specific definition, so - * handle those here */ - if (0 == strcmp(key, PMIX_PERSISTENCE)) { - kv->type = OPAL_PERSIST; - kv->data.uint8 = ext2x_convert_persist(v->data.integer); - return rc; - } else if (0 == strcmp(key, PMIX_RANGE)) { - kv->type = OPAL_DATA_RANGE; - kv->data.uint8 = ext2x_convert_range(v->data.integer); - return rc; - } else if (0 == strcmp(key, PMIX_RANK) || - 0 == strcmp(key, PMIX_GLOBAL_RANK) || - 0 == strcmp(key, PMIX_APP_RANK) || - 0 == strcmp(key, PMIX_NPROC_OFFSET) || - 0 == strcmp(key, PMIX_LOCALLDR) || - 0 == strcmp(key, PMIX_APPLDR)) { - /* these are all ranks */ - kv->type = OPAL_VPID; - kv->data.name.vpid = ext2x_convert_rank(kv->data.integer); - return rc; - } - - switch(v->type) { - case PMIX_UNDEF: - kv->type = OPAL_UNDEF; - break; - case PMIX_BOOL: - kv->type = OPAL_BOOL; - memcpy(&kv->data.flag, &(v->data.flag), 1); - break; - case PMIX_BYTE: - kv->type = OPAL_BYTE; - memcpy(&kv->data.byte, &(v->data.byte), 1); - break; - case PMIX_STRING: - kv->type = OPAL_STRING; - if (NULL != v->data.string) { - kv->data.string = strdup(v->data.string); - } - break; - case PMIX_SIZE: - kv->type = OPAL_SIZE; - kv->data.size = (int)v->data.size; - break; - case PMIX_PID: - kv->type = OPAL_PID; - memcpy(&kv->data.pid, &(v->data.pid), sizeof(pid_t)); - break; - case PMIX_INT: - kv->type = OPAL_INT; - memcpy(&kv->data.integer, &(v->data.integer), sizeof(int)); - break; - case PMIX_INT8: - kv->type = OPAL_INT8; - memcpy(&kv->data.int8, &(v->data.int8), 1); - break; - case PMIX_INT16: - kv->type = OPAL_INT16; - memcpy(&kv->data.int16, &(v->data.int16), 2); - break; - case PMIX_INT32: - kv->type = OPAL_INT32; - memcpy(&kv->data.int32, &(v->data.int32), 4); - break; - case PMIX_INT64: - kv->type = OPAL_INT64; - memcpy(&kv->data.int64, &(v->data.int64), 8); - break; - case PMIX_UINT: - kv->type = OPAL_UINT; - memcpy(&kv->data.uint, &(v->data.uint), sizeof(int)); - break; - case PMIX_UINT8: - kv->type = OPAL_UINT8; - memcpy(&kv->data.uint8, &(v->data.uint8), 1); - break; - case PMIX_UINT16: - kv->type = OPAL_UINT16; - memcpy(&kv->data.uint16, &(v->data.uint16), 2); - break; - case PMIX_UINT32: - kv->type = OPAL_UINT32; - memcpy(&kv->data.uint32, &(v->data.uint32), 4); - break; - case PMIX_UINT64: - kv->type = OPAL_UINT64; - memcpy(&kv->data.uint64, &(v->data.uint64), 8); - break; - case PMIX_FLOAT: - kv->type = OPAL_FLOAT; - memcpy(&kv->data.fval, &(v->data.fval), sizeof(float)); - break; - case PMIX_DOUBLE: - kv->type = OPAL_DOUBLE; - memcpy(&kv->data.dval, &(v->data.dval), sizeof(double)); - break; - case PMIX_TIMEVAL: - kv->type = OPAL_TIMEVAL; - memcpy(&kv->data.tv, &(v->data.tv), sizeof(struct timeval)); - break; - case PMIX_TIME: - kv->type = OPAL_TIME; - memcpy(&kv->data.time, &(v->data.uint64), sizeof(uint64_t)); - break; - case PMIX_STATUS: - kv->type = OPAL_STATUS; - memcpy(&kv->data.status, &(v->data.status), sizeof(opal_status_t)); - break; - case PMIX_PROC: - kv->type = OPAL_NAME; - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&kv->data.name.jobid, v->data.proc.nspace))) { - return ext2x_convert_opalrc(rc); - } - kv->data.name.vpid = ext2x_convert_rank(v->data.proc.rank); - break; - case PMIX_BYTE_OBJECT: - kv->type = OPAL_BYTE_OBJECT; - if (NULL != v->data.bo.bytes && 0 < v->data.bo.size) { - kv->data.bo.bytes = (uint8_t*)malloc(v->data.bo.size); - memcpy(kv->data.bo.bytes, v->data.bo.bytes, v->data.bo.size); - kv->data.bo.size = (int)v->data.bo.size; - } else { - kv->data.bo.bytes = NULL; - kv->data.bo.size = 0; - } - break; - case PMIX_POINTER: - kv->type = OPAL_PTR; - kv->data.ptr = v->data.ptr; - break; - default: - /* silence warnings */ - rc = OPAL_ERROR; - break; - } - return rc; -} - -static void _reg_hdlr(int sd, short args, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - opal_ext2x_event_chain_t *chain; - opal_ext2x_single_event_t *sing = NULL; - opal_ext2x_multi_event_t *multi = NULL; - opal_ext2x_default_event_t *def = NULL; - opal_value_t *kv; - int i; - bool prepend = false; - size_t n; - - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s REGISTER HANDLER CODES %s", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), - (NULL == cd->event_codes) ? "NULL" : "NON-NULL"); - - if (NULL != cd->info) { - OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) { - if (0 == strcmp(kv->key, OPAL_PMIX_EVENT_ORDER_PREPEND)) { - prepend = true; - break; - } - } - } - - if (NULL == cd->event_codes) { - /* this is a default handler */ - def = OBJ_NEW(opal_ext2x_default_event_t); - def->handler = cd->evhandler; - def->index = mca_pmix_ext2x_component.evindex; - if (prepend) { - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s PREPENDING TO DEFAULT EVENTS", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_prepend(&mca_pmix_ext2x_component.default_events, &def->super); - } else { - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s APPENDING TO DEFAULT EVENTS", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_append(&mca_pmix_ext2x_component.default_events, &def->super); - } - } else if (1 == opal_list_get_size(cd->event_codes)) { - /* single handler */ - sing = OBJ_NEW(opal_ext2x_single_event_t); - kv = (opal_value_t*)opal_list_get_first(cd->event_codes); - sing->code = kv->data.integer; - sing->index = mca_pmix_ext2x_component.evindex; - sing->handler = cd->evhandler; - if (prepend) { - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s PREPENDING TO SINGLE EVENTS WITH CODE %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code); - opal_list_prepend(&mca_pmix_ext2x_component.single_events, &sing->super); - } else { - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s APPENDING TO SINGLE EVENTS WITH CODE %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code); - opal_list_append(&mca_pmix_ext2x_component.single_events, &sing->super); - } - } else { - multi = OBJ_NEW(opal_ext2x_multi_event_t); - multi->ncodes = opal_list_get_size(cd->event_codes); - multi->codes = (int*)malloc(multi->ncodes * sizeof(int)); - i=0; - OPAL_LIST_FOREACH(kv, cd->event_codes, opal_value_t) { - multi->codes[i] = kv->data.integer; - ++i; - } - multi->index = mca_pmix_ext2x_component.evindex; - multi->handler = cd->evhandler; - if (prepend) { - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s PREPENDING TO MULTI EVENTS", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_prepend(&mca_pmix_ext2x_component.multi_events, &multi->super); - } else { - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "%s APPENDING TO MULTI EVENTS", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_append(&mca_pmix_ext2x_component.multi_events, &multi->super); - } - } - - /* release the caller */ - if (NULL != cd->cbfunc) { - cd->cbfunc(OPAL_SUCCESS, mca_pmix_ext2x_component.evindex, cd->cbdata); - } - mca_pmix_ext2x_component.evindex++; - - /* check if any matching notifications have been cached - only nondefault - * events will have been cached*/ - if (NULL == def) { - /* check single code registrations */ - if (NULL != sing) { - OPAL_LIST_FOREACH(chain, &mca_pmix_ext2x_component.cache, opal_ext2x_event_chain_t) { - if (sing->code == chain->status) { - opal_list_remove_item(&mca_pmix_ext2x_component.cache, &chain->super); - chain->sing = sing; - sing->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - OBJ_RELEASE(cd); - return; - } - } - } else if (NULL != multi) { - /* check for multi code registrations */ - OPAL_LIST_FOREACH(chain, &mca_pmix_ext2x_component.cache, opal_ext2x_event_chain_t) { - for (n=0; n < multi->ncodes; n++) { - if (multi->codes[n] == chain->status) { - opal_list_remove_item(&mca_pmix_ext2x_component.cache, &chain->super); - chain->multi = multi; - multi->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - OBJ_RELEASE(cd); - return; - } - } - } - } - } - - OBJ_RELEASE(cd); - return; -} -static void register_handler(opal_list_t *event_codes, - opal_list_t *info, - opal_pmix_notification_fn_t evhandler, - opal_pmix_evhandler_reg_cbfunc_t cbfunc, - void *cbdata) -{ - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - OPAL_PMIX_THREADSHIFT(event_codes, info, evhandler, _reg_hdlr, cbfunc, cbdata); - return; -} - -static void _dereg_hdlr(int sd, short args, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - opal_ext2x_single_event_t *sing; - opal_ext2x_multi_event_t *multi; - opal_ext2x_default_event_t *def; - - /* check the single events first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_ext2x_single_event_t) { - if (cd->handler == sing->index) { - opal_list_remove_item(&mca_pmix_ext2x_component.single_events, &sing->super); - OBJ_RELEASE(sing); - goto release; - } - } - /* check multi events */ - OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_ext2x_multi_event_t) { - if (cd->handler == multi->index) { - opal_list_remove_item(&mca_pmix_ext2x_component.multi_events, &multi->super); - OBJ_RELEASE(multi); - goto release; - } - } - /* check default events */ - OPAL_LIST_FOREACH(def, &mca_pmix_ext2x_component.default_events, opal_ext2x_default_event_t) { - if (cd->handler == def->index) { - opal_list_remove_item(&mca_pmix_ext2x_component.default_events, &def->super); - OBJ_RELEASE(def); - break; - } - } - - release: - if (NULL != cd->opcbfunc) { - cd->opcbfunc(OPAL_SUCCESS, cd->cbdata); - } - OBJ_RELEASE(cd); -} - -static void deregister_handler(size_t evhandler, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) -{ - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - OPAL_PMIX_OP_THREADSHIFT(evhandler, _dereg_hdlr, cbfunc, cbdata); - return; -} - -static void _notify_event(int sd, short args, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - size_t i; - opal_ext2x_single_event_t *sing; - opal_ext2x_multi_event_t *multi; - opal_ext2x_default_event_t *def; - opal_ext2x_event_chain_t *chain; - - /* check the single events first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_ext2x_single_event_t) { - if (cd->status == sing->code) { - /* found it - invoke the handler, pointing its - * callback function to our progression function */ - chain = OBJ_NEW(opal_ext2x_event_chain_t); - chain->status = cd->status; - chain->range = ext2x_convert_opalrange(cd->range); - chain->source = *(cd->source); - chain->info = cd->info; - chain->final_cbfunc = cd->opcbfunc; - chain->final_cbdata = cd->cbdata; - chain->sing = sing; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "[%s] CALLING SINGLE EVHDLR FOR STATUS %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), chain->status); - sing->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - OBJ_RELEASE(cd); - return; - } - } - /* check multi events */ - OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_ext2x_multi_event_t) { - for (i=0; i < multi->ncodes; i++) { - if (cd->status == multi->codes[i]) { - /* found it - invoke the handler, pointing its - * callback function to our progression function */ - chain = OBJ_NEW(opal_ext2x_event_chain_t); - chain->status = cd->status; - chain->range = ext2x_convert_opalrange(cd->range); - chain->source = *(cd->source); - chain->info = cd->info; - chain->final_cbfunc = cd->opcbfunc; - chain->final_cbdata = cd->cbdata; - chain->multi = multi; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "[%s] CALLING MULTI EVHDLR FOR STATUS %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), chain->status); - multi->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - OBJ_RELEASE(cd); - return; - } - } - } - /* check default events */ - if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) { - def = (opal_ext2x_default_event_t*)opal_list_get_first(&mca_pmix_ext2x_component.default_events); - chain = OBJ_NEW(opal_ext2x_event_chain_t); - chain->status = cd->status; - chain->range = ext2x_convert_opalrange(cd->range); - chain->source = *(cd->source); - chain->info = cd->info; - chain->final_cbfunc = cd->opcbfunc; - chain->final_cbdata = cd->cbdata; - chain->def = def; - opal_output_verbose(2, opal_pmix_base_framework.framework_output, - "[%s] CALLING DEFAULT EVHDLR FOR STATUS %d", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), chain->status); - def->handler(chain->status, &chain->source, - chain->info, &chain->results, - progress_local_event_hdlr, (void*)chain); - OBJ_RELEASE(cd); - return; - } - - /* if we get here, then there are no registered event handlers */ - if (NULL != cd->opcbfunc) { - cd->opcbfunc(OPAL_ERR_NOT_FOUND, cd->cbdata); - } - OBJ_RELEASE(cd); - return; -} - -static int notify_event(int status, - const opal_process_name_t *source, - opal_pmix_data_range_t range, - opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - OPAL_PMIX_NOTIFY_THREADSHIFT(status, source, range, info, _notify_event, cbfunc, cbdata); - return OPAL_SUCCESS; -} - -/**** INSTANTIATE INTERNAL CLASSES ****/ -OBJ_CLASS_INSTANCE(opal_ext2x_jobid_trkr_t, - opal_list_item_t, - NULL, NULL); - -OBJ_CLASS_INSTANCE(opal_ext2x_single_event_t, - opal_list_item_t, - NULL, NULL); - -static void mtevcon(opal_ext2x_multi_event_t *p) -{ - p->codes = NULL; - p->ncodes = 0; -} -static void mtevdes(opal_ext2x_multi_event_t *p) -{ - if (NULL != p->codes) { - free(p->codes); - } -} -OBJ_CLASS_INSTANCE(opal_ext2x_multi_event_t, - opal_list_item_t, - mtevcon, mtevdes); - -OBJ_CLASS_INSTANCE(opal_ext2x_default_event_t, - opal_list_item_t, - NULL, NULL); - -static void chcon(opal_ext2x_event_chain_t *p) -{ - p->nondefault = false; - p->info = NULL; - OBJ_CONSTRUCT(&p->results, opal_list_t); - p->sing = NULL; - p->multi = NULL; - p->def = NULL; - p->final_cbfunc = NULL; - p->final_cbdata = NULL; -} -static void chdes(opal_ext2x_event_chain_t *p) -{ - OPAL_LIST_DESTRUCT(&p->results); -} -OBJ_CLASS_INSTANCE(opal_ext2x_event_chain_t, - opal_list_item_t, - chcon, chdes); - -static void opcon(ext2x_opcaddy_t *p) -{ - p->key = NULL; - memset(&p->p, 0, sizeof(pmix_proc_t)); - p->procs = NULL; - p->nprocs = 0; - p->error_procs = NULL; - p->nerror_procs = 0; - p->info = NULL; - p->ninfo = 0; - p->apps = NULL; - p->sz = 0; - p->active = false; - p->opcbfunc = NULL; - p->mdxcbfunc = NULL; - p->valcbfunc = NULL; - p->lkcbfunc = NULL; - p->spcbfunc = NULL; - p->cbdata = NULL; -} -static void opdes(ext2x_opcaddy_t *p) -{ - if (NULL != p->key) { - free(p->key); - } - if (NULL != p->procs) { - PMIX_PROC_FREE(p->procs, p->nprocs); - } - if (NULL != p->error_procs) { - PMIX_PROC_FREE(p->error_procs, p->nerror_procs); - } - if (NULL != p->info) { - PMIX_INFO_FREE(p->info, p->sz); - } - if (NULL != p->apps) { - PMIX_APP_FREE(p->apps, p->sz); - } -} -OBJ_CLASS_INSTANCE(ext2x_opcaddy_t, - opal_object_t, - opcon, opdes); - -static void ocadcon(ext2x_opalcaddy_t *p) -{ - OBJ_CONSTRUCT(&p->procs, opal_list_t); - OBJ_CONSTRUCT(&p->info, opal_list_t); - OBJ_CONSTRUCT(&p->apps, opal_list_t); - p->opcbfunc = NULL; - p->dmdxfunc = NULL; - p->mdxcbfunc = NULL; - p->lkupcbfunc = NULL; - p->spwncbfunc = NULL; - p->cbdata = NULL; - p->odmdxfunc = NULL; - p->infocbfunc = NULL; - p->toolcbfunc = NULL; - p->ocbdata = NULL; -} -static void ocaddes(ext2x_opalcaddy_t *p) -{ - OPAL_LIST_DESTRUCT(&p->procs); - OPAL_LIST_DESTRUCT(&p->info); - OPAL_LIST_DESTRUCT(&p->apps); -} -OBJ_CLASS_INSTANCE(ext2x_opalcaddy_t, - opal_object_t, - ocadcon, ocaddes); - -static void tscon(ext2x_threadshift_t *p) -{ - p->active = false; - p->source = NULL; - p->event_codes = NULL; - p->info = NULL; - p->evhandler = NULL; - p->nondefault = false; - p->cbfunc = NULL; - p->opcbfunc = NULL; - p->cbdata = NULL; -} -OBJ_CLASS_INSTANCE(ext2x_threadshift_t, - opal_object_t, - tscon, NULL); diff --git a/opal/mca/pmix/ext2x/pmix_ext2x.h b/opal/mca/pmix/ext2x/pmix_ext2x.h deleted file mode 100644 index e0bbec6d11f..00000000000 --- a/opal/mca/pmix/ext2x/pmix_ext2x.h +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 2x14-2x16 Intel, Inc. All rights reserved. - * Copyright (c) 2x14-2x15 Mellanox Technologies, Inc. - * All rights reserved. - * Copyright (c) 2x16 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef MCA_PMIX_PMIX2X_H -#define MCA_PMIX_PMIX2X_H - -#include "opal_config.h" - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_SYS_UN_H -#include -#endif - -#include "opal/class/opal_list.h" -#include "opal/mca/mca.h" -#include "opal/mca/event/event.h" -#include "opal/util/proc.h" - -#include "opal/mca/pmix/pmix.h" -#include "pmix_server.h" -#include "pmix/pmix_common.h" - -BEGIN_C_DECLS - -typedef struct { - opal_pmix_base_component_t super; - opal_list_t jobids; - bool native_launch; - size_t evindex; - opal_list_t single_events; - opal_list_t multi_events; - opal_list_t default_events; - int cache_size; - opal_list_t cache; -} mca_pmix_ext2x_component_t; - -OPAL_DECLSPEC extern mca_pmix_ext2x_component_t mca_pmix_ext2x_component; - -OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext2x_module; - -/**** INTERNAL OBJECTS ****/ -typedef struct { - opal_list_item_t super; - opal_jobid_t jobid; - char nspace[PMIX_MAX_NSLEN + 1]; -} opal_ext2x_jobid_trkr_t; -OBJ_CLASS_DECLARATION(opal_ext2x_jobid_trkr_t); - -typedef struct { - opal_list_item_t super; - size_t index; - int code; - opal_pmix_notification_fn_t handler; -} opal_ext2x_single_event_t; -OBJ_CLASS_DECLARATION(opal_ext2x_single_event_t); - -typedef struct { - opal_list_item_t super; - size_t index; - int *codes; - size_t ncodes; - opal_pmix_notification_fn_t handler; -} opal_ext2x_multi_event_t; -OBJ_CLASS_DECLARATION(opal_ext2x_multi_event_t); - -typedef struct { - opal_list_item_t super; - size_t index; - opal_pmix_notification_fn_t handler; -} opal_ext2x_default_event_t; -OBJ_CLASS_DECLARATION(opal_ext2x_default_event_t); - -typedef struct { - opal_list_item_t super; - int status; - bool nondefault; - opal_process_name_t source; - pmix_data_range_t range; - opal_list_t *info; - opal_list_t results; - opal_ext2x_single_event_t *sing; - opal_ext2x_multi_event_t *multi; - opal_ext2x_default_event_t *def; - opal_pmix_op_cbfunc_t final_cbfunc; - void *final_cbdata; -} opal_ext2x_event_chain_t; -OBJ_CLASS_DECLARATION(opal_ext2x_event_chain_t); - -typedef struct { - opal_object_t super; - pmix_status_t status; - char *key; - pmix_proc_t p; - pmix_proc_t *procs; - size_t nprocs; - pmix_proc_t *error_procs; - size_t nerror_procs; - pmix_info_t *info; - size_t ninfo; - pmix_app_t *apps; - size_t sz; - volatile bool active; - opal_pmix_op_cbfunc_t opcbfunc; - opal_pmix_modex_cbfunc_t mdxcbfunc; - opal_pmix_value_cbfunc_t valcbfunc; - opal_pmix_lookup_cbfunc_t lkcbfunc; - opal_pmix_spawn_cbfunc_t spcbfunc; - void *cbdata; -} ext2x_opcaddy_t; -OBJ_CLASS_DECLARATION(ext2x_opcaddy_t); - -typedef struct { - opal_object_t super; - opal_list_t procs; - opal_list_t info; - opal_list_t apps; - pmix_op_cbfunc_t opcbfunc; - pmix_dmodex_response_fn_t dmdxfunc; - pmix_modex_cbfunc_t mdxcbfunc; - pmix_lookup_cbfunc_t lkupcbfunc; - pmix_spawn_cbfunc_t spwncbfunc; - pmix_info_cbfunc_t infocbfunc; - pmix_tool_connection_cbfunc_t toolcbfunc; - void *cbdata; - opal_pmix_release_cbfunc_t odmdxfunc; - void *ocbdata; -} ext2x_opalcaddy_t; -OBJ_CLASS_DECLARATION(ext2x_opalcaddy_t); - -typedef struct { - opal_object_t super; - opal_event_t ev; - volatile bool active; - size_t id; - int status; - opal_process_name_t pname; - opal_jobid_t jobid; - const opal_process_name_t *source; - opal_pmix_data_range_t range; - bool nondefault; - size_t handler; - opal_list_t *event_codes; - opal_list_t *info; - opal_pmix_notification_fn_t evhandler; - opal_pmix_evhandler_reg_cbfunc_t cbfunc; - opal_pmix_op_cbfunc_t opcbfunc; - void *cbdata; -} ext2x_threadshift_t; -OBJ_CLASS_DECLARATION(ext2x_threadshift_t); - -#define OPAL_PMIX_OPCD_THREADSHIFT(i, s, sr, if, nif, fn, cb, cd) \ - do { \ - ext2x_opalcaddy_t *_cd; \ - _cd = OBJ_NEW(ext2x_opalcaddy_t); \ - _cd->id = (i); \ - _cd->status = (s); \ - _cd->source = (sr); \ - _cd->info = (i); \ - _cd->evcbfunc = (cb); \ - _cd->cbdata = (cd); \ - event_assign(&((_cd)->ev), opal_pmix_base.evbase, \ - -1, EV_WRITE, (fn), (_cd)); \ - event_active(&((_cd)->ev), EV_WRITE, 1); \ - } while(0) - -#define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \ - do { \ - ext2x_threadshift_t *_cd; \ - _cd = OBJ_NEW(ext2x_threadshift_t); \ - _cd->handler = (e); \ - _cd->opcbfunc = (cb); \ - _cd->cbdata = (cd); \ - event_assign(&((_cd)->ev), opal_pmix_base.evbase, \ - -1, EV_WRITE, (fn), (_cd)); \ - event_active(&((_cd)->ev), EV_WRITE, 1); \ - } while(0) - -#define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \ - do { \ - ext2x_threadshift_t *_cd; \ - _cd = OBJ_NEW(ext2x_threadshift_t); \ - _cd->event_codes = (e); \ - _cd->info = (i); \ - _cd->evhandler = (eh); \ - _cd->cbfunc = (cb); \ - _cd->cbdata = (cd); \ - event_assign(&((_cd)->ev), opal_pmix_base.evbase, \ - -1, EV_WRITE, (fn), (_cd)); \ - event_active(&((_cd)->ev), EV_WRITE, 1); \ - } while(0) - -#define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \ - do { \ - ext2x_threadshift_t *_cd; \ - _cd = OBJ_NEW(ext2x_threadshift_t); \ - _cd->status = (s); \ - _cd->source = (sr); \ - _cd->range = (r); \ - _cd->info = (i); \ - _cd->opcbfunc = (cb); \ - _cd->cbdata = (cd); \ - event_assign(&((_cd)->ev), opal_pmix_base.evbase, \ - -1, EV_WRITE, (fn), (_cd)); \ - event_active(&((_cd)->ev), EV_WRITE, 1); \ - } while(0) - -/**** CLIENT FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int ext2x_client_init(void); -OPAL_MODULE_DECLSPEC int ext2x_client_finalize(void); -OPAL_MODULE_DECLSPEC int ext2x_initialized(void); -OPAL_MODULE_DECLSPEC int ext2x_abort(int flag, const char *msg, - opal_list_t *procs); -OPAL_MODULE_DECLSPEC int ext2x_commit(void); -OPAL_MODULE_DECLSPEC int ext2x_fence(opal_list_t *procs, int collect_data); -OPAL_MODULE_DECLSPEC int ext2x_fencenb(opal_list_t *procs, int collect_data, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_put(opal_pmix_scope_t scope, - opal_value_t *val); -OPAL_MODULE_DECLSPEC int ext2x_get(const opal_process_name_t *proc, const char *key, - opal_list_t *info, opal_value_t **val); -OPAL_MODULE_DECLSPEC int ext2x_getnb(const opal_process_name_t *proc, const char *key, - opal_list_t *info, - opal_pmix_value_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_publish(opal_list_t *info); -OPAL_MODULE_DECLSPEC int ext2x_publishnb(opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_lookup(opal_list_t *data, opal_list_t *info); -OPAL_MODULE_DECLSPEC int ext2x_lookupnb(char **keys, opal_list_t *info, - opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_unpublish(char **keys, opal_list_t *info); -OPAL_MODULE_DECLSPEC int ext2x_unpublishnb(char **keys, opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid); -OPAL_MODULE_DECLSPEC int ext2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, - opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_connect(opal_list_t *procs); -OPAL_MODULE_DECLSPEC int ext2x_connectnb(opal_list_t *procs, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_disconnect(opal_list_t *procs); -OPAL_MODULE_DECLSPEC int ext2x_disconnectnb(opal_list_t *procs, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid, - opal_list_t *procs); -OPAL_MODULE_DECLSPEC int ext2x_resolve_nodes(opal_jobid_t jobid, char **nodelist); - -/**** COMMON FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int ext2x_store_local(const opal_process_name_t *proc, - opal_value_t *val); - -/**** SERVER SOUTHBOUND FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int ext2x_server_init(opal_pmix_server_module_t *module, - opal_list_t *info); -OPAL_MODULE_DECLSPEC int ext2x_server_finalize(void); -OPAL_MODULE_DECLSPEC int ext2x_server_gen_regex(const char *input, char **regex); -OPAL_MODULE_DECLSPEC int ext2x_server_gen_ppn(const char *input, char **ppn); -OPAL_MODULE_DECLSPEC int ext2x_server_register_nspace(opal_jobid_t jobid, - int nlocalprocs, - opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata); -OPAL_MODULE_DECLSPEC void ext2x_server_deregister_nspace(opal_jobid_t jobid, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_server_register_client(const opal_process_name_t *proc, - uid_t uid, gid_t gid, - void *server_object, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata); -OPAL_MODULE_DECLSPEC void ext2x_server_deregister_client(const opal_process_name_t *proc, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_server_setup_fork(const opal_process_name_t *proc, char ***env); -OPAL_MODULE_DECLSPEC int ext2x_server_dmodex(const opal_process_name_t *proc, - opal_pmix_modex_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int ext2x_server_notify_event(int status, - const opal_process_name_t *source, - opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata); - - -/**** COMPONENT UTILITY FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC void ext2x_event_hdlr(size_t evhdlr_registration_id, - pmix_status_t status, const pmix_proc_t *source, - pmix_info_t info[], size_t ninfo, - pmix_info_t results[], size_t nresults, - pmix_event_notification_cbfunc_fn_t cbfunc, - void *cbdata); -OPAL_MODULE_DECLSPEC pmix_status_t ext2x_convert_opalrc(int rc); -OPAL_MODULE_DECLSPEC int ext2x_convert_rc(pmix_status_t rc); - -OPAL_MODULE_DECLSPEC opal_vpid_t ext2x_convert_rank(int rank); -OPAL_MODULE_DECLSPEC int ext2x_convert_opalrank(opal_vpid_t vpid); - -OPAL_MODULE_DECLSPEC opal_pmix_scope_t ext2x_convert_scope(pmix_scope_t scope); -OPAL_MODULE_DECLSPEC pmix_scope_t ext2x_convert_opalscope(opal_pmix_scope_t scope); - -OPAL_MODULE_DECLSPEC pmix_data_range_t ext2x_convert_opalrange(opal_pmix_data_range_t range); -OPAL_MODULE_DECLSPEC opal_pmix_data_range_t ext2x_convert_range(pmix_data_range_t range); - -OPAL_MODULE_DECLSPEC opal_pmix_persistence_t ext2x_convert_persist(pmix_persistence_t scope); -OPAL_MODULE_DECLSPEC pmix_persistence_t ext2x_convert_opalpersist(opal_pmix_persistence_t scope); - -OPAL_MODULE_DECLSPEC void ext2x_value_load(pmix_value_t *v, - opal_value_t *kv); -OPAL_MODULE_DECLSPEC int ext2x_value_unload(opal_value_t *kv, - const char *key, - const pmix_value_t *v); - -END_C_DECLS - -#endif /* MCA_PMIX_EXTERNAL_H */ diff --git a/opal/mca/pmix/ext2x/pmix_ext2x_server_north.c b/opal/mca/pmix/ext2x/pmix_ext2x_server_north.c deleted file mode 100644 index 350dd15b84e..00000000000 --- a/opal/mca/pmix/ext2x/pmix_ext2x_server_north.c +++ /dev/null @@ -1,754 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. - * Copyright (c) 2014-2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2014-2015 Mellanox Technologies, Inc. - * All rights reserved. - * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" -#include "opal/types.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "opal/dss/dss.h" -#include "opal/mca/event/event.h" -#include "opal/mca/hwloc/base/base.h" -#include "opal/runtime/opal.h" -#include "opal/runtime/opal_progress_threads.h" -#include "opal/util/argv.h" -#include "opal/util/error.h" -#include "opal/util/output.h" -#include "opal/util/proc.h" -#include "opal/util/show_help.h" -#include "opal/mca/pmix/base/base.h" -#include "pmix_ext2x.h" - -#include "pmix.h" -#include "pmix_server.h" - -/**** N.O.R.T.H.B.O.U.N.D I.N.T.E.R.F.A.C.E.S ****/ - -/* These are the interfaces used by the embedded PMIx server - * to call up into ORTE for service requests */ - - static pmix_status_t server_client_connected_fn(const pmix_proc_t *proc, void* server_object, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_client_finalized_fn(const pmix_proc_t *proc, void* server_object, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_abort_fn(const pmix_proc_t *proc, void *server_object, - int status, const char msg[], - pmix_proc_t procs[], size_t nprocs, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, - const pmix_info_t info[], size_t ninfo, - char *data, size_t ndata, - pmix_modex_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *proc, - const pmix_info_t info[], size_t ninfo, - pmix_modex_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_publish_fn(const pmix_proc_t *proc, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_lookup_fn(const pmix_proc_t *proc, char **keys, - const pmix_info_t info[], size_t ninfo, - pmix_lookup_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_unpublish_fn(const pmix_proc_t *proc, char **keys, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_spawn_fn(const pmix_proc_t *proc, - const pmix_info_t job_info[], size_t ninfo, - const pmix_app_t apps[], size_t napps, - pmix_spawn_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t nprocs, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes, - pmix_op_cbfunc_t cbfunc, void *cbdata); - static pmix_status_t server_notify_event(pmix_status_t code, - const pmix_proc_t *source, - pmix_data_range_t range, - pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata); -pmix_server_module_t mymodule = { - .client_connected = server_client_connected_fn, - .client_finalized = server_client_finalized_fn, - .abort = server_abort_fn, - .fence_nb = server_fencenb_fn, - .direct_modex = server_dmodex_req_fn, - .publish = server_publish_fn, - .lookup = server_lookup_fn, - .unpublish = server_unpublish_fn, - .spawn = server_spawn_fn, - .connect = server_connect_fn, - .disconnect = server_disconnect_fn, - .register_events = server_register_events, - .deregister_events = server_deregister_events, - .notify_event = server_notify_event -}; - -opal_pmix_server_module_t *host_module = NULL; - - -static void opal_opcbfunc(int status, void *cbdata) -{ - ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata; - - if (NULL != opalcaddy->opcbfunc) { - opalcaddy->opcbfunc(ext2x_convert_opalrc(status), opalcaddy->cbdata); - } - OBJ_RELEASE(opalcaddy); -} - -static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *server_object, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - opal_process_name_t proc; - ext2x_opalcaddy_t *opalcaddy; - - if (NULL == host_module || NULL == host_module->client_connected) { - return PMIX_SUCCESS; - } - - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* pass it up */ - rc = host_module->client_connected(&proc, server_object, - opal_opcbfunc, opalcaddy); - return ext2x_convert_opalrc(rc); -} - -static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* server_object, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - ext2x_opalcaddy_t *opalcaddy; - opal_process_name_t proc; - - if (NULL == host_module || NULL == host_module->client_finalized) { - return PMIX_SUCCESS; - } - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* pass it up */ - rc = host_module->client_finalized(&proc, server_object, opal_opcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - return ext2x_convert_opalrc(rc); -} - -static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, - int status, const char msg[], - pmix_proc_t procs[], size_t nprocs, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - size_t n; - opal_namelist_t *nm; - opal_process_name_t proc; - int rc; - ext2x_opalcaddy_t *opalcaddy; - - if (NULL == host_module || NULL == host_module->abort) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the array of pmix_proc_t to the list of procs */ - for (n=0; n < nprocs; n++) { - nm = OBJ_NEW(opal_namelist_t); - opal_list_append(&opalcaddy->procs, &nm->super); - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - nm->name.vpid = ext2x_convert_rank(procs[n].rank); - } - - /* pass it up */ - rc = host_module->abort(&proc, server_object, status, msg, - &opalcaddy->procs, opal_opcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - return ext2x_convert_opalrc(rc); -} - -static void _data_release(void *cbdata) -{ - ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata; - - if (NULL != opalcaddy->odmdxfunc) { - opalcaddy->odmdxfunc(opalcaddy->ocbdata); - } - OBJ_RELEASE(opalcaddy); -} - -static void opmdx_response(int status, const char *data, size_t sz, void *cbdata, - opal_pmix_release_cbfunc_t relcbfunc, void *relcbdata) -{ - pmix_status_t rc; - ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata; - - rc = ext2x_convert_rc(status); - if (NULL != opalcaddy->mdxcbfunc) { - opalcaddy->odmdxfunc = relcbfunc; - opalcaddy->ocbdata = relcbdata; - opalcaddy->mdxcbfunc(rc, data, sz, opalcaddy->cbdata, - _data_release, opalcaddy); - } else { - OBJ_RELEASE(opalcaddy); - } -} - -static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, - const pmix_info_t info[], size_t ninfo, - char *data, size_t ndata, - pmix_modex_cbfunc_t cbfunc, void *cbdata) -{ - ext2x_opalcaddy_t *opalcaddy; - size_t n; - opal_namelist_t *nm; - opal_value_t *iptr; - int rc; - - if (NULL == host_module || NULL == host_module->fence_nb) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->mdxcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the array of pmix_proc_t to the list of procs */ - for (n=0; n < nprocs; n++) { - nm = OBJ_NEW(opal_namelist_t); - opal_list_append(&opalcaddy->procs, &nm->super); - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - nm->name.vpid = ext2x_convert_rank(procs[n].rank); - } - - /* convert the array of pmix_info_t to the list of info */ - for (n=0; n < ninfo; n++) { - iptr = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &iptr->super); - iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->fence_nb(&opalcaddy->procs, &opalcaddy->info, - data, ndata, opmdx_response, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - return ext2x_convert_opalrc(rc); -} - -static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, - const pmix_info_t info[], size_t ninfo, - pmix_modex_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - ext2x_opalcaddy_t *opalcaddy; - opal_process_name_t proc; - opal_value_t *iptr; - size_t n; - - if (NULL == host_module || NULL == host_module->direct_modex) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->mdxcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the array of pmix_info_t to the list of info */ - for (n=0; n < ninfo; n++) { - iptr = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &iptr->super); - iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->direct_modex(&proc, &opalcaddy->info, opmdx_response, opalcaddy); - if (OPAL_SUCCESS != rc && OPAL_ERR_IN_PROCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - if (OPAL_ERR_IN_PROCESS == rc) { - rc = OPAL_SUCCESS; - } - return ext2x_convert_opalrc(rc); -} - -static pmix_status_t server_publish_fn(const pmix_proc_t *p, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - size_t n; - ext2x_opalcaddy_t *opalcaddy; - opal_process_name_t proc; - opal_value_t *oinfo; - - if (NULL == host_module || NULL == host_module->publish) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the info array */ - for (n=0; n < ninfo; n++) { - oinfo = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &oinfo->super); - oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->publish(&proc, &opalcaddy->info, opal_opcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - - return ext2x_convert_opalrc(rc); -} - -static void opal_lkupcbfunc(int status, - opal_list_t *data, - void *cbdata) -{ - ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata; - pmix_status_t rc; - pmix_pdata_t *d=NULL; - size_t nd=0, n; - opal_pmix_pdata_t *p; - - if (NULL != opalcaddy->lkupcbfunc) { - rc = ext2x_convert_opalrc(status); - /* convert any returned data */ - if (NULL != data) { - nd = opal_list_get_size(data); - PMIX_PDATA_CREATE(d, nd); - n=0; - OPAL_LIST_FOREACH(p, data, opal_pmix_pdata_t) { - /* convert the jobid */ - (void)opal_snprintf_jobid(d[n].proc.nspace, PMIX_MAX_NSLEN, p->proc.jobid); - d[n].proc.rank = ext2x_convert_opalrank(p->proc.vpid); - (void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN); - ext2x_value_load(&d[n].value, &p->value); - } - } - opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata); - } - OBJ_RELEASE(opalcaddy); -} - -static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, - const pmix_info_t info[], size_t ninfo, - pmix_lookup_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - ext2x_opalcaddy_t *opalcaddy; - opal_process_name_t proc; - opal_value_t *iptr; - size_t n; - - if (NULL == host_module || NULL == host_module->lookup) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->lkupcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the array of pmix_info_t to the list of info */ - for (n=0; n < ninfo; n++) { - iptr = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &iptr->super); - iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->lookup(&proc, keys, &opalcaddy->info, opal_lkupcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - - return ext2x_convert_opalrc(rc); -} - - -static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - ext2x_opalcaddy_t *opalcaddy; - opal_process_name_t proc; - opal_value_t *iptr; - size_t n; - - if (NULL == host_module || NULL == host_module->unpublish) { - return PMIX_SUCCESS; - } - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the array of pmix_info_t to the list of info */ - for (n=0; n < ninfo; n++) { - iptr = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &iptr->super); - iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->unpublish(&proc, keys, &opalcaddy->info, opal_opcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - - return ext2x_convert_opalrc(rc); -} - -static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata) -{ - ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata; - pmix_status_t rc; - char nspace[PMIX_MAX_NSLEN]; - - if (NULL != opalcaddy->spwncbfunc) { - rc = ext2x_convert_opalrc(status); - /* convert the jobid */ - (void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid); - opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata); - } - OBJ_RELEASE(opalcaddy); -} - -static pmix_status_t server_spawn_fn(const pmix_proc_t *p, - const pmix_info_t job_info[], size_t ninfo, - const pmix_app_t apps[], size_t napps, - pmix_spawn_cbfunc_t cbfunc, void *cbdata) -{ - ext2x_opalcaddy_t *opalcaddy; - opal_process_name_t proc; - opal_pmix_app_t *app; - opal_value_t *oinfo; - size_t k, n; - int rc; - - if (NULL == host_module || NULL == host_module->spawn) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* convert the nspace/rank to an opal_process_name_t */ - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return ext2x_convert_opalrc(rc); - } - proc.vpid = ext2x_convert_rank(p->rank); - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->spwncbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the job info */ - for (k=0; k < ninfo; k++) { - oinfo = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &oinfo->super); - oinfo->key = strdup(job_info[k].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, job_info[k].key, &job_info[k].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* convert the apps */ - for (n=0; n < napps; n++) { - app = OBJ_NEW(opal_pmix_app_t); - opal_list_append(&opalcaddy->apps, &app->super); - if (NULL != apps[n].cmd) { - app->cmd = strdup(apps[n].cmd); - } - app->argc = apps[n].argc; - if (NULL != apps[n].argv) { - app->argv = opal_argv_copy(apps[n].argv); - } - if (NULL != apps[n].env) { - app->env = opal_argv_copy(apps[n].env); - } - app->maxprocs = apps[n].maxprocs; - for (k=0; k < apps[n].ninfo; k++) { - oinfo = OBJ_NEW(opal_value_t); - opal_list_append(&app->info, &oinfo->super); - oinfo->key = strdup(apps[n].info[k].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, apps[n].info[k].key, &apps[n].info[k].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - } - - /* pass it up */ - rc = host_module->spawn(&proc, &opalcaddy->info, &opalcaddy->apps, opal_spncbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OPAL_ERROR_LOG(rc); - OBJ_RELEASE(opalcaddy); - } - - return ext2x_convert_opalrc(rc); -} - - -static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - ext2x_opalcaddy_t *opalcaddy; - opal_namelist_t *nm; - size_t n; - opal_value_t *oinfo; - - if (NULL == host_module || NULL == host_module->connect) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the array of pmix_proc_t to the list of procs */ - for (n=0; n < nprocs; n++) { - nm = OBJ_NEW(opal_namelist_t); - opal_list_append(&opalcaddy->procs, &nm->super); - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - nm->name.vpid = ext2x_convert_rank(procs[n].rank); - } - - /* convert the info */ - for (n=0; n < ninfo; n++) { - oinfo = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &oinfo->super); - oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->connect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - - return ext2x_convert_opalrc(rc); -} - - -static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t nprocs, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - int rc; - ext2x_opalcaddy_t *opalcaddy; - opal_namelist_t *nm; - size_t n; - opal_value_t *oinfo; - - if (NULL == host_module || NULL == host_module->disconnect) { - return PMIX_ERR_NOT_SUPPORTED; - } - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the array of pmix_proc_t to the list of procs */ - for (n=0; n < nprocs; n++) { - nm = OBJ_NEW(opal_namelist_t); - opal_list_append(&opalcaddy->procs, &nm->super); - if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - nm->name.vpid = ext2x_convert_rank(procs[n].rank); - } - - /* convert the info */ - for (n=0; n < ninfo; n++) { - oinfo = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &oinfo->super); - oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->disconnect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - - return ext2x_convert_opalrc(rc); -} - -static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, - const pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - ext2x_opalcaddy_t *opalcaddy; - size_t n; - opal_value_t *oinfo; - int rc; - - /* setup the caddy */ - opalcaddy = OBJ_NEW(ext2x_opalcaddy_t); - opalcaddy->opcbfunc = cbfunc; - opalcaddy->cbdata = cbdata; - - /* convert the info */ - for (n=0; n < ninfo; n++) { - oinfo = OBJ_NEW(opal_value_t); - opal_list_append(&opalcaddy->info, &oinfo->super); - oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) { - OBJ_RELEASE(opalcaddy); - return ext2x_convert_opalrc(rc); - } - } - - /* pass it up */ - rc = host_module->register_events(&opalcaddy->info, opal_opcbfunc, opalcaddy); - if (OPAL_SUCCESS != rc) { - OBJ_RELEASE(opalcaddy); - } - - return ext2x_convert_opalrc(rc); -} - -static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - return PMIX_ERR_NOT_SUPPORTED; -} - -static pmix_status_t server_notify_event(pmix_status_t code, - const pmix_proc_t *source, - pmix_data_range_t range, - pmix_info_t info[], size_t ninfo, - pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - return PMIX_ERR_NOT_SUPPORTED; -} diff --git a/opal/mca/pmix/ext2x/pmix_ext2x_server_south.c b/opal/mca/pmix/ext2x/pmix_ext2x_server_south.c deleted file mode 100644 index 9e91722b70d..00000000000 --- a/opal/mca/pmix/ext2x/pmix_ext2x_server_south.c +++ /dev/null @@ -1,517 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. - * Copyright (c) 2014-2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. - * Copyright (c) 2014 Mellanox Technologies, Inc. - * All rights reserved. - * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" -#include "opal/types.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "opal/dss/dss.h" -#include "opal/mca/event/event.h" -#include "opal/mca/hwloc/base/base.h" -#include "opal/runtime/opal.h" -#include "opal/runtime/opal_progress_threads.h" -#include "opal/util/argv.h" -#include "opal/util/error.h" -#include "opal/util/output.h" -#include "opal/util/proc.h" -#include "opal/util/show_help.h" -#include "opal/mca/pmix/base/base.h" -#include "pmix_ext2x.h" - -#include "pmix.h" -#include "pmix_server.h" - -/**** S.O.U.T.H.B.O.U.N.D I.N.T.E.R.F.A.C.E.S ****/ - -/* These are the interfaces used by the OMPI/ORTE/OPAL layer to call - * down into the embedded PMIx server. */ - -extern pmix_server_module_t mymodule; -extern opal_pmix_server_module_t *host_module; -static char *dbgvalue=NULL; -static size_t errhdler_ref = 0; - -#define PMIX_WAIT_FOR_COMPLETION(a) \ - do { \ - while ((a)) { \ - usleep(10); \ - } \ - } while (0) - -static void errreg_cbfunc (pmix_status_t status, - size_t errhandler_ref, - void *cbdata) -{ - volatile bool *active = (volatile bool*)cbdata; - - errhdler_ref = errhandler_ref; - opal_output_verbose(5, opal_pmix_base_framework.framework_output, - "PMIX server errreg_cbfunc - error handler registered status=%d, reference=%lu", - status, (unsigned long)errhandler_ref); - *active = false; -} - -int ext2x_server_init(opal_pmix_server_module_t *module, - opal_list_t *info) -{ - pmix_status_t rc; - int dbg; - opal_value_t *kv; - pmix_info_t *pinfo; - size_t sz, n; - volatile bool active; - opal_ext2x_jobid_trkr_t *job; - - if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) { - asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg); - putenv(dbgvalue); - } - - /* convert the list to an array of pmix_info_t */ - if (NULL != info) { - sz = opal_list_get_size(info); - PMIX_INFO_CREATE(pinfo, sz); - n = 0; - OPAL_LIST_FOREACH(kv, info, opal_value_t) { - (void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pinfo[n].value, kv); - ++n; - } - } else { - sz = 0; - pinfo = NULL; - } - - /* insert ourselves into our list of jobids - it will be the - * first, and so we'll check it first */ - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); - (void)opal_snprintf_jobid(job->nspace, PMIX_MAX_NSLEN, OPAL_PROC_MY_NAME.jobid); - job->jobid = OPAL_PROC_MY_NAME.jobid; - opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); - - if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) { - PMIX_INFO_FREE(pinfo, sz); - return ext2x_convert_rc(rc); - } - PMIX_INFO_FREE(pinfo, sz); - - /* record the host module */ - host_module = module; - - /* register the default event handler */ - active = true; - PMIx_Register_event_handler(NULL, 0, NULL, 0, ext2x_event_hdlr, errreg_cbfunc, (void*)&active); - PMIX_WAIT_FOR_COMPLETION(active); - - return OPAL_SUCCESS; -} - -static void fincb(pmix_status_t status, void *cbdata) -{ - volatile bool *active = (volatile bool*)cbdata; - *active = false; -} - -int ext2x_server_finalize(void) -{ - pmix_status_t rc; - volatile bool active; - - /* deregister the default event handler */ - active = true; - PMIx_Deregister_event_handler(errhdler_ref, fincb, (void*)&active); - PMIX_WAIT_FOR_COMPLETION(active); - - rc = PMIx_server_finalize(); - return ext2x_convert_rc(rc); -} - -int ext2x_server_gen_regex(const char *input, char **regex) -{ - pmix_status_t rc; - - rc = PMIx_generate_regex(input, regex); - return ext2x_convert_rc(rc); -} - - -int ext2x_server_gen_ppn(const char *input, char **ppn) -{ - pmix_status_t rc; - - rc = PMIx_generate_ppn(input, ppn); - return ext2x_convert_rc(rc); -} - -static void opcbfunc(pmix_status_t status, void *cbdata) -{ - ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata; - - if (NULL != op->opcbfunc) { - op->opcbfunc(ext2x_convert_rc(status), op->cbdata); - } - if (op->active) { - op->status = status; - op->active = false; - } else { - OBJ_RELEASE(op); - } -} - -static void _reg_nspace(int sd, short args, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - opal_value_t *kv, *k2; - pmix_info_t *pinfo = NULL, *pmap; - size_t sz, szmap, m, n; - char nspace[PMIX_MAX_NSLEN]; - pmix_status_t rc; - opal_list_t *pmapinfo; - opal_ext2x_jobid_trkr_t *job; - ext2x_opcaddy_t op; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - /* convert the jobid */ - (void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, cd->jobid); - - /* store this job in our list of known nspaces */ - job = OBJ_NEW(opal_ext2x_jobid_trkr_t); - (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); - job->jobid = cd->jobid; - opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super); - - /* convert the list to an array of pmix_info_t */ - if (NULL != cd->info) { - sz = opal_list_get_size(cd->info); - PMIX_INFO_CREATE(pinfo, sz); - n = 0; - OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) { - (void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN); - if (0 == strcmp(kv->key, OPAL_PMIX_PROC_DATA)) { - pinfo[n].value.type = PMIX_INFO_ARRAY; - /* the value contains a list of values - convert - * that list to another array */ - pmapinfo = (opal_list_t*)kv->data.ptr; - szmap = opal_list_get_size(pmapinfo); - PMIX_INFO_CREATE(pmap, szmap); - pinfo[n].value.data.array.array = (struct pmix_info_t*)pmap; - pinfo[n].value.data.array.size = szmap; - m = 0; - OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) { - (void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pmap[m].value, k2); - ++m; - } - } else { - ext2x_value_load(&pinfo[n].value, kv); - } - ++n; - } - } else { - sz = 0; - pinfo = NULL; - } - - OBJ_CONSTRUCT(&op, ext2x_opcaddy_t); - op.active = true; - rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz, - opcbfunc, (void*)&op); - if (PMIX_SUCCESS == rc) { - PMIX_WAIT_FOR_COMPLETION(op.active); - } else { - op.status = rc; - } - /* ensure we execute the cbfunc so the caller doesn't hang */ - if (NULL != cd->opcbfunc) { - cd->opcbfunc(ext2x_convert_rc(op.status), cd->cbdata); - } - if (NULL != pinfo) { - PMIX_INFO_FREE(pinfo, sz); - } - OBJ_DESTRUCT(&op); - OBJ_RELEASE(cd); -} - -int ext2x_server_register_nspace(opal_jobid_t jobid, - int nlocalprocs, - opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) -{ - ext2x_threadshift_t *cd; - - /* we must threadshift this request as it touches - * shared lists of objects */ - cd = OBJ_NEW(ext2x_threadshift_t); - cd->jobid = jobid; - cd->status = nlocalprocs; - cd->info = info; - cd->opcbfunc = cbfunc; - cd->cbdata = cbdata; - /* if the cbfunc is NULL, then the caller is in an event - * and we can directly call the processing function */ - if (NULL == cbfunc) { - _reg_nspace(0, 0, cd); - } else { - event_assign(&cd->ev, opal_pmix_base.evbase, - -1, EV_WRITE, _reg_nspace, cd); - event_active(&cd->ev, EV_WRITE, 1); - } - - return OPAL_SUCCESS; -} - -static void tdcbfunc(pmix_status_t status, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - - if (NULL != cd->opcbfunc) { - cd->opcbfunc(ext2x_convert_rc(status), cd->cbdata); - } - if (cd->active) { - cd->active = false; - } else { - OBJ_RELEASE(cd); - } -} - -static void _dereg_nspace(int sd, short args, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - opal_ext2x_jobid_trkr_t *jptr; - - /* if we don't already have it, we can ignore this */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { - if (jptr->jobid == cd->jobid) { - /* found it - tell the server to deregister */ - cd->active = true; - PMIx_server_deregister_nspace(jptr->nspace, tdcbfunc, cd); - PMIX_WAIT_FOR_COMPLETION(cd->active); - OBJ_RELEASE(cd); - /* now get rid of it from our list */ - opal_list_remove_item(&mca_pmix_ext2x_component.jobids, &jptr->super); - OBJ_RELEASE(jptr); - return; - } - } - /* must release the caller */ - tdcbfunc(PMIX_ERR_NOT_FOUND, cd); -} - -void ext2x_server_deregister_nspace(opal_jobid_t jobid, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) -{ - ext2x_threadshift_t *cd; - - /* we must threadshift this request as it touches - * shared lists of objects */ - cd = OBJ_NEW(ext2x_threadshift_t); - cd->jobid = jobid; - cd->opcbfunc = cbfunc; - cd->cbdata = cbdata; - if (NULL == cbfunc) { - _dereg_nspace(0, 0, cd); - } else { - event_assign(&cd->ev, opal_pmix_base.evbase, - -1, EV_WRITE, _dereg_nspace, cd); - event_active(&cd->ev, EV_WRITE, 1); - } -} - -int ext2x_server_register_client(const opal_process_name_t *proc, - uid_t uid, gid_t gid, - void *server_object, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) -{ - pmix_status_t rc; - pmix_proc_t p; - ext2x_opcaddy_t op; - - /* convert the jobid */ - (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid); - p.rank = ext2x_convert_opalrank(proc->vpid); - - OBJ_CONSTRUCT(&op, ext2x_opcaddy_t); - op.active = true; - rc = PMIx_server_register_client(&p, uid, gid, server_object, - opcbfunc, (void*)&op); - if (PMIX_SUCCESS == rc) { - PMIX_WAIT_FOR_COMPLETION(op.active); - rc = op.status; - } - OBJ_DESTRUCT(&op); - return ext2x_convert_rc(rc); -} - -static void _dereg_client(int sd, short args, void *cbdata) -{ - ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata; - opal_ext2x_jobid_trkr_t *jptr; - pmix_proc_t p; - - /* if we don't already have it, we can ignore this */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) { - if (jptr->jobid == cd->source->jobid) { - /* found it - tell the server to deregister */ - (void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN); - p.rank = ext2x_convert_opalrank(cd->source->vpid); - cd->active = true; - PMIx_server_deregister_client(&p, tdcbfunc, (void*)cd); - PMIX_WAIT_FOR_COMPLETION(cd->active); - break; - } - } - OBJ_RELEASE(cd); -} - -/* tell the local PMIx server to cleanup this client as it is - * done executing */ -void ext2x_server_deregister_client(const opal_process_name_t *proc, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) -{ - ext2x_threadshift_t *cd; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - cd = OBJ_NEW(ext2x_threadshift_t); - cd->source = proc; - cd->opcbfunc = cbfunc; - cd->cbdata = cbdata; - if (NULL == cbfunc) { - _dereg_client(0, 0, cd); - } else { - event_assign(&cd->ev, opal_pmix_base.evbase, - -1, EV_WRITE, _dereg_client, cd); - event_active(&cd->ev, EV_WRITE, 1); - } -} - -/* have the local PMIx server setup the environment for this client */ -int ext2x_server_setup_fork(const opal_process_name_t *proc, char ***env) -{ - pmix_status_t rc; - pmix_proc_t p; - - /* convert the jobid */ - (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid); - p.rank = ext2x_convert_opalrank(proc->vpid); - - rc = PMIx_server_setup_fork(&p, env); - return ext2x_convert_rc(rc); -} - -/* this is the call back up from the embedded PMIx server that - * will contain the returned data. Note that the embedded server - * "owns" the data and will free it upon return from this function */ -static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbdata) -{ - int rc; - ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata; - - rc = ext2x_convert_rc(status); - if (NULL != op->mdxcbfunc) { - op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL); - } - OBJ_RELEASE(op); -} - -/* request modex data for a local proc from the PMIx server */ -int ext2x_server_dmodex(const opal_process_name_t *proc, - opal_pmix_modex_cbfunc_t cbfunc, void *cbdata) -{ - ext2x_opcaddy_t *op; - pmix_status_t rc; - - /* setup the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); - op->mdxcbfunc = cbfunc; - op->cbdata = cbdata; - - /* convert the jobid */ - (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, proc->jobid); - op->p.rank = ext2x_convert_opalrank(proc->vpid); - - /* find the internally-cached data for this proc */ - rc = PMIx_server_dmodex_request(&op->p, dmdx_response, op); - if (PMIX_SUCCESS != rc) { - OBJ_RELEASE(op); - } - return ext2x_convert_rc(rc); -} - -/* tell the PMIx server to notify its local clients of an event */ -int ext2x_server_notify_event(int status, - const opal_process_name_t *source, - opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - opal_value_t *kv; - pmix_info_t *pinfo; - size_t sz, n; - pmix_status_t rc; - ext2x_opcaddy_t *op; - - /* convert the list to an array of pmix_info_t */ - if (NULL != info) { - sz = opal_list_get_size(info); - PMIX_INFO_CREATE(pinfo, sz); - n = 0; - OPAL_LIST_FOREACH(kv, info, opal_value_t) { - (void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN); - ext2x_value_load(&pinfo[n].value, kv); - } - } else { - sz = 0; - pinfo = NULL; - } - /* setup the caddy */ - op = OBJ_NEW(ext2x_opcaddy_t); - op->info = pinfo; - op->sz = sz; - op->opcbfunc = cbfunc; - op->cbdata = cbdata; - /* convert the jobid */ - if (NULL == source) { - (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, OPAL_JOBID_INVALID); - op->p.rank = ext2x_convert_opalrank(OPAL_VPID_INVALID); - } else { - (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid); - op->p.rank = ext2x_convert_opalrank(source->vpid); - } - - - rc = ext2x_convert_opalrc(status); - /* the range is irrelevant here as the server is passing - * the event down to its local clients */ - rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL, - pinfo, sz, opcbfunc, op); - if (PMIX_SUCCESS != rc) { - OBJ_RELEASE(op); - } - return ext2x_convert_rc(rc); -} diff --git a/opal/mca/pmix/ext3x/Makefile.am b/opal/mca/pmix/ext3x/Makefile.am deleted file mode 100644 index 2b6324baa6a..00000000000 --- a/opal/mca/pmix/ext3x/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2015 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - pmix3x.h \ - pmix3x_component.c \ - pmix3x.c \ - pmix3x_client.c \ - pmix3x_server_south.c \ - pmix3x_server_north.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_opal_pmix_ext3x_DSO -component_noinst = -component_install = mca_pmix_ext3x.la -else -component_noinst = libmca_pmix_ext3x.la -component_install = -endif - -mcacomponentdir = $(opallibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_pmix_ext3x_la_SOURCES = $(sources) -mca_pmix_ext3x_la_CFLAGS = $(opal_pmix_ext3x_CFLAGS) -mca_pmix_ext3x_la_CPPFLAGS =$(opal_pmix_ext3x_CPPFLAGS) -mca_pmix_ext3x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext3x_LDFLAGS) -mca_pmix_ext3x_la_LIBADD = $(opal_pmix_ext3x_LIBS) - -noinst_LTLIBRARIES = $(component_noinst) -libmca_pmix_ext3x_la_SOURCES =$(sources) -libmca_pmix_ext3x_la_CFLAGS = $(opal_pmix_ext3x_CFLAGS) -libmca_pmix_ext3x_la_CPPFLAGS = $(opal_pmix_ext3x_CPPFLAGS) -libmca_pmix_ext3x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext3x_LDFLAGS) -libmca_pmix_ext3x_la_LIBADD = $(opal_pmix_ext3x_LIBS) diff --git a/opal/mca/pmix/ext3x/configure.m4 b/opal/mca/pmix/ext3x/configure.m4 deleted file mode 100644 index 3e71d96e760..00000000000 --- a/opal/mca/pmix/ext3x/configure.m4 +++ /dev/null @@ -1,60 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2011-2013 Los Alamos National Security, LLC. -# All rights reserved. -# Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2013-2016 Intel, Inc. All rights reserved. -# Copyright (c) 2015-2016 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_pmix_ext3x_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_opal_pmix_ext3x_CONFIG],[ - AC_CONFIG_FILES([opal/mca/pmix/ext3x/Makefile]) - - # check to see - # if we are linking to an external v3.x library. If not, then - # do not use this component. - AC_MSG_CHECKING([if external v3.x component is to be used]) - AS_IF([test "$opal_external_pmix_happy" = "yes"], - [AS_IF([test "$opal_external_pmix_version" = "3X"], - [AC_MSG_RESULT([yes - using an external v3.x library]) - opal_pmix_ext3x_happy=1 - # Build flags for our Makefile.am - opal_pmix_ext3x_CPPFLAGS=$opal_external_pmix_CPPFLAGS - opal_pmix_ext3x_LDFLAGS=$opal_external_pmix_LDFLAGS - opal_pmix_ext3x_LIBS=$opal_external_pmix_LIBS - # setup wrapper flags - pmix_ext3x_WRAPPER_EXTRA_LDFLAGS=$opal_external_pmix_LDFLAGS - pmix_ext3x_WRAPPER_EXTRA_LIBS=$opal_external_pmix_LIBS], - [AC_MSG_RESULT([no - disqualifying this component]) - opal_pmix_ext3x_happy=0])], - [AC_MSG_RESULT([no - disqualifying this component]) - opal_pmix_ext3x_happy=0]) - - AC_SUBST([opal_pmix_ext3x_LIBS]) - AC_SUBST([opal_pmix_ext3x_CPPFLAGS]) - AC_SUBST([opal_pmix_ext3x_LDFLAGS]) - AC_SUBST([opal_pmix_ext3x_DEPENDENCIES]) - - AS_IF([test $opal_pmix_ext3x_happy -eq 1], - [$1], - [$2]) - -])dnl diff --git a/opal/mca/pmix/ext3x/pmix3x_client.c b/opal/mca/pmix/ext3x/pmix3x_client.c deleted file mode 100644 index 8abd95d8289..00000000000 --- a/opal/mca/pmix/ext3x/pmix3x_client.c +++ /dev/null @@ -1,1285 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. - * Copyright (c) 2014-2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2014-2015 Mellanox Technologies, Inc. - * All rights reserved. - * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2016 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" -#include "opal/types.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "opal/hash_string.h" -#include "opal/util/argv.h" -#include "opal/util/proc.h" - -#include "opal/mca/pmix/base/base.h" -#include "pmix3x.h" -#include "pmix.h" - -static pmix_proc_t my_proc; -static char *dbgvalue=NULL; -static size_t errhdler_ref = 0; - -#define PMIX_WAIT_FOR_COMPLETION(a) \ - do { \ - while ((a)) { \ - usleep(10); \ - } \ - } while (0) - - -static void errreg_cbfunc (pmix_status_t status, - size_t errhandler_ref, - void *cbdata) -{ - errhdler_ref = errhandler_ref; - opal_output_verbose(5, opal_pmix_base_framework.framework_output, - "PMIX client errreg_cbfunc - error handler registered status=%d, reference=%lu", - status, (unsigned long)errhandler_ref); -} - -int pmix3x_client_init(void) -{ - opal_process_name_t pname; - pmix_status_t rc; - int dbg; - opal_pmix3x_jobid_trkr_t *job; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client init"); - - if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) { - asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg); - putenv(dbgvalue); - } - - rc = PMIx_Init(&my_proc, NULL, 0); - if (PMIX_SUCCESS != rc) { - return pmix3x_convert_rc(rc); - } - - /* store our jobid and rank */ - if (NULL != getenv(OPAL_MCA_PREFIX"orte_launch")) { - /* if we were launched by the OMPI RTE, then - * the jobid is in a special format - so get it */ - mca_pmix_ext3x_component.native_launch = true; - opal_convert_string_to_jobid(&pname.jobid, my_proc.nspace); - } else { - /* we were launched by someone else, so make the - * jobid just be the hash of the nspace */ - OPAL_HASH_JOBID(my_proc.nspace, pname.jobid); - } - /* insert this into our list of jobids - it will be the - * first, and so we'll check it first */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); - (void)strncpy(job->nspace, my_proc.nspace, PMIX_MAX_NSLEN); - job->jobid = pname.jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); - - pname.vpid = pmix3x_convert_rank(my_proc.rank); - opal_proc_set_name(&pname); - - /* register the default event handler */ - PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix3x_event_hdlr, errreg_cbfunc, NULL); - return OPAL_SUCCESS; - -} - -int pmix3x_client_finalize(void) -{ - pmix_status_t rc; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client finalize"); - - /* deregister the default event handler */ - PMIx_Deregister_event_handler(errhdler_ref, NULL, NULL); - - rc = PMIx_Finalize(NULL, 0); - return pmix3x_convert_rc(rc); -} - -int pmix3x_initialized(void) -{ - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client initialized"); - - return PMIx_Initialized(); -} - -int pmix3x_abort(int flag, const char *msg, - opal_list_t *procs) -{ - pmix_status_t rc; - pmix_proc_t *parray=NULL; - size_t n, cnt=0; - opal_namelist_t *ptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client abort"); - - /* convert the list of procs to an array - * of pmix_proc_t */ - if (NULL != procs && 0 < (cnt = opal_list_get_size(procs))) { - PMIX_PROC_CREATE(parray, cnt); - n=0; - OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == ptr->name.jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - PMIX_PROC_FREE(parray, cnt); - return OPAL_ERR_NOT_FOUND; - } - (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); - ++n; - } - } - - /* call the library abort */ - rc = PMIx_Abort(flag, msg, parray, cnt); - - /* release the array */ - PMIX_PROC_FREE(parray, cnt); - - return pmix3x_convert_rc(rc); -} - -int pmix3x_store_local(const opal_process_name_t *proc, opal_value_t *val) -{ - pmix_value_t kv; - pmix_status_t rc; - pmix_proc_t p; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - if (NULL != proc) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == proc->jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - OPAL_ERROR_LOG(OPAL_ERR_NOT_FOUND); - return OPAL_ERR_NOT_FOUND; - } - (void)strncpy(p.nspace, job->nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(proc->vpid); - } else { - /* use our name */ - (void)strncpy(p.nspace, my_proc.nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(OPAL_PROC_MY_NAME.vpid); - } - - PMIX_VALUE_CONSTRUCT(&kv); - pmix3x_value_load(&kv, val); - - rc = PMIx_Store_internal(&p, val->key, &kv); - PMIX_VALUE_DESTRUCT(&kv); - - return pmix3x_convert_rc(rc); -} - -int pmix3x_commit(void) -{ - pmix_status_t rc; - - rc = PMIx_Commit(); - return pmix3x_convert_rc(rc); -} - -static void opcbfunc(pmix_status_t status, void *cbdata) -{ - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; - - if (NULL != op->opcbfunc) { - op->opcbfunc(pmix3x_convert_rc(status), op->cbdata); - } - OBJ_RELEASE(op); -} - -int pmix3x_fence(opal_list_t *procs, int collect_data) -{ - pmix_status_t rc; - pmix_proc_t *parray=NULL; - size_t n, cnt=0; - opal_namelist_t *ptr; - pmix_info_t info, *iptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client fence"); - - /* convert the list of procs to an array - * of pmix_proc_t */ - if (NULL != procs && 0 < (cnt = opal_list_get_size(procs))) { - PMIX_PROC_CREATE(parray, cnt); - n=0; - OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == ptr->name.jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - PMIX_PROC_FREE(parray, cnt); - return OPAL_ERR_NOT_FOUND; - } - (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); - ++n; - } - } - if (collect_data) { - PMIX_INFO_CONSTRUCT(&info); - (void)strncpy(info.key, PMIX_COLLECT_DATA, PMIX_MAX_KEYLEN); - info.value.type = PMIX_BOOL; - info.value.data.flag = true; - iptr = &info; - n = 1; - } else { - iptr = NULL; - n = 0; - } - - /* call the library function */ - rc = PMIx_Fence(parray, cnt, iptr, n); - - /* release the array */ - PMIX_PROC_FREE(parray, cnt); - if (NULL != iptr) { - PMIX_INFO_DESTRUCT(&info); - } - - return pmix3x_convert_rc(rc); - -} - -int pmix3x_fencenb(opal_list_t *procs, int collect_data, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - pmix_status_t rc; - pmix_proc_t *parray=NULL; - size_t n, cnt=0; - opal_namelist_t *ptr; - pmix3x_opcaddy_t *op; - pmix_info_t info, *iptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client fence_nb"); - - /* convert the list of procs to an array - * of pmix_proc_t */ - if (NULL != procs && 0 < (cnt = opal_list_get_size(procs))) { - PMIX_PROC_CREATE(parray, cnt); - n=0; - OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == ptr->name.jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - PMIX_PROC_FREE(parray, cnt); - return OPAL_ERR_NOT_FOUND; - } - (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); - ++n; - } - } - - if (collect_data) { - PMIX_INFO_CONSTRUCT(&info); - (void)strncpy(info.key, PMIX_COLLECT_DATA, PMIX_MAX_KEYLEN); - info.value.type = PMIX_BOOL; - info.value.data.flag = true; - iptr = &info; - n = 1; - } else { - iptr = NULL; - n = 0; - } - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->opcbfunc = cbfunc; - op->cbdata = cbdata; - op->procs = parray; - op->nprocs = cnt; - - /* call the library function */ - rc = PMIx_Fence_nb(parray, cnt, iptr, n, opcbfunc, op); - if (PMIX_SUCCESS != rc) { - OBJ_RELEASE(op); - } - - return pmix3x_convert_rc(rc); - -} - -int pmix3x_put(opal_pmix_scope_t opal_scope, - opal_value_t *val) -{ - pmix_value_t kv; - pmix_scope_t pmix_scope = pmix3x_convert_opalscope(opal_scope); - pmix_status_t rc; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client put"); - - PMIX_VALUE_CONSTRUCT(&kv); - pmix3x_value_load(&kv, val); - - rc = PMIx_Put(pmix_scope, val->key, &kv); - PMIX_VALUE_DESTRUCT(&kv); - return pmix3x_convert_rc(rc); -} - -int pmix3x_get(const opal_process_name_t *proc, const char *key, - opal_list_t *info, opal_value_t **val) -{ - int ret; - pmix_value_t *kv; - pmix_status_t rc; - pmix_proc_t p, *pptr; - size_t ninfo, n; - pmix_info_t *pinfo; - opal_value_t *ival; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "%s PMIx_client get on proc %s key %s", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), - (NULL == proc) ? "NULL" : OPAL_NAME_PRINT(*proc), key); - - /* prep default response */ - *val = NULL; - if (NULL != proc) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == proc->jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - return OPAL_ERR_NOT_FOUND; - } - (void)strncpy(p.nspace, job->nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(proc->vpid); - pptr = &p; - } else { - /* if they are asking for our jobid, then return it */ - if (0 == strcmp(key, OPAL_PMIX_JOBID)) { - (*val) = OBJ_NEW(opal_value_t); - (*val)->type = OPAL_UINT32; - (*val)->data.uint32 = OPAL_PROC_MY_NAME.jobid; - return OPAL_SUCCESS; - } else if (0 == strcmp(key, OPAL_PMIX_RANK)) { - (*val) = OBJ_NEW(opal_value_t); - (*val)->type = OPAL_INT; - (*val)->data.integer = pmix3x_convert_rank(my_proc.rank); - return OPAL_SUCCESS; - } - pptr = NULL; - } - - if (NULL != info) { - ninfo = opal_list_get_size(info); - if (0 < ninfo) { - PMIX_INFO_CREATE(pinfo, ninfo); - n=0; - OPAL_LIST_FOREACH(ival, info, opal_value_t) { - (void)strncpy(pinfo[n].key, ival->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, ival); - ++n; - } - } else { - pinfo = NULL; - } - } else { - pinfo = NULL; - ninfo = 0; - } - - /* pass the request down */ - rc = PMIx_Get(pptr, key, pinfo, ninfo, &kv); - if (PMIX_SUCCESS == rc) { - if (NULL == kv) { - ret = OPAL_SUCCESS; - } else { - *val = OBJ_NEW(opal_value_t); - ret = pmix3x_value_unload(*val, kv); - PMIX_VALUE_FREE(kv, 1); - } - } else { - ret = pmix3x_convert_rc(rc); - } - PMIX_INFO_FREE(pinfo, ninfo); - return ret; -} - -static void val_cbfunc(pmix_status_t status, - pmix_value_t *kv, void *cbdata) -{ - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; - int rc; - opal_value_t val, *v=NULL; - - rc = pmix3x_convert_opalrc(status); - if (PMIX_SUCCESS == status && NULL != kv) { - rc = pmix3x_value_unload(&val, kv); - v = &val; - } - - if (NULL != op->valcbfunc) { - op->valcbfunc(rc, v, op->cbdata); - } - OBJ_RELEASE(op); -} - -int pmix3x_getnb(const opal_process_name_t *proc, const char *key, - opal_list_t *info, - opal_pmix_value_cbfunc_t cbfunc, void *cbdata) -{ - pmix3x_opcaddy_t *op; - pmix_status_t rc; - size_t n; - opal_value_t *ival; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* we must threadshift this request as we might not be in an event - * and we are going to access shared lists/objects */ - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "%s PMIx_client get_nb on proc %s key %s", - OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), - (NULL == proc) ? "NULL" : OPAL_NAME_PRINT(*proc), key); - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->valcbfunc = cbfunc; - op->cbdata = cbdata; - - if (NULL != proc) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == proc->jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - return OPAL_ERR_NOT_FOUND; - } - (void)strncpy(op->p.nspace, job->nspace, PMIX_MAX_NSLEN); - op->p.rank = pmix3x_convert_opalrank(proc->vpid); - } else { - (void)strncpy(op->p.nspace, my_proc.nspace, PMIX_MAX_NSLEN); - op->p.rank = pmix3x_convert_rank(PMIX_RANK_WILDCARD); - } - - if (NULL != info) { - op->sz = opal_list_get_size(info); - if (0 < op->sz) { - PMIX_INFO_CREATE(op->info, op->sz); - n=0; - OPAL_LIST_FOREACH(ival, info, opal_value_t) { - (void)strncpy(op->info[n].key, ival->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, ival); - ++n; - } - } - } - - /* call the library function */ - rc = PMIx_Get_nb(&op->p, key, op->info, op->sz, val_cbfunc, op); - if (PMIX_SUCCESS != rc) { - OBJ_RELEASE(op); - } - - return pmix3x_convert_rc(rc); -} - -int pmix3x_publish(opal_list_t *info) -{ - pmix_info_t *pinfo; - pmix_status_t ret; - opal_value_t *iptr; - size_t sz, n; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client publish"); - - if (NULL == info) { - return OPAL_ERR_BAD_PARAM; - } - - sz = opal_list_get_size(info); - if (0 < sz) { - PMIX_INFO_CREATE(pinfo, sz); - n=0; - OPAL_LIST_FOREACH(iptr, info, opal_value_t) { - (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, iptr); - ++n; - } - } else { - pinfo = NULL; - } - - ret = PMIx_Publish(pinfo, sz); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_publishnb(opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - pmix_status_t ret; - opal_value_t *iptr; - size_t n; - pmix3x_opcaddy_t *op; - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client publish_nb"); - - if (NULL == info) { - return OPAL_ERR_BAD_PARAM; - } - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->opcbfunc = cbfunc; - op->cbdata = cbdata; - - op->sz = opal_list_get_size(info); - if (0 < op->sz) { - PMIX_INFO_CREATE(op->info, op->sz); - n=0; - OPAL_LIST_FOREACH(iptr, info, opal_value_t) { - (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, iptr); - ++n; - } - } - - ret = PMIx_Publish_nb(op->info, op->sz, opcbfunc, op); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_lookup(opal_list_t *data, opal_list_t *info) -{ - pmix_pdata_t *pdata; - pmix_info_t *pinfo; - size_t sz, ninfo, n; - int rc; - pmix_status_t ret; - opal_pmix_pdata_t *d; - opal_value_t *iptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* we must threadshift this request as we might not be in an event - * and we are going to access shared lists/objects */ - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client lookup"); - - if (NULL == data) { - return OPAL_ERR_BAD_PARAM; - } - - sz = opal_list_get_size(data); - PMIX_PDATA_CREATE(pdata, sz); - n=0; - OPAL_LIST_FOREACH(d, data, opal_pmix_pdata_t) { - (void)strncpy(pdata[n++].key, d->value.key, PMIX_MAX_KEYLEN); - } - - if (NULL != info) { - ninfo = opal_list_get_size(info); - PMIX_INFO_CREATE(pinfo, ninfo); - n=0; - OPAL_LIST_FOREACH(iptr, info, opal_value_t) { - (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, iptr); - ++n; - } - } else { - pinfo = NULL; - ninfo = 0; - } - - ret = PMIx_Lookup(pdata, sz, pinfo, ninfo); - PMIX_INFO_FREE(pinfo, ninfo); - - if (PMIX_SUCCESS == ret) { - /* transfer the data back */ - n=0; - OPAL_LIST_FOREACH(d, data, opal_pmix_pdata_t) { - if (mca_pmix_ext3x_component.native_launch) { - /* if we were launched by the OMPI RTE, then - * the jobid is in a special format - so get it */ - opal_convert_string_to_jobid(&d->proc.jobid, pdata[n].proc.nspace); - } else { - /* we were launched by someone else, so make the - * jobid just be the hash of the nspace */ - OPAL_HASH_JOBID(pdata[n].proc.nspace, d->proc.jobid); - } - /* if we don't already have it, add this to our jobid tracker */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == d->proc.jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); - (void)strncpy(job->nspace, pdata[n].proc.nspace, PMIX_MAX_NSLEN); - job->jobid = d->proc.jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); - } - d->proc.vpid = pmix3x_convert_rank(pdata[n].proc.rank); - rc = pmix3x_value_unload(&d->value, &pdata[n].value); - if (OPAL_SUCCESS != rc) { - OPAL_ERROR_LOG(rc); - PMIX_PDATA_FREE(pdata, sz); - return OPAL_ERR_BAD_PARAM; - } - ++n; - } - } - - return pmix3x_convert_rc(ret); -} - -static void lk_cbfunc(pmix_status_t status, - pmix_pdata_t data[], size_t ndata, - void *cbdata) -{ - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; - opal_pmix_pdata_t *d; - opal_list_t results, *r = NULL; - int rc; - size_t n; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* this is in the PMIx local thread - need to threadshift to - * our own thread as we will be accessing framework-global - * lists and objects */ - - if (NULL == op->lkcbfunc) { - OBJ_RELEASE(op); - return; - } - - rc = pmix3x_convert_rc(status); - if (OPAL_SUCCESS == rc) { - OBJ_CONSTRUCT(&results, opal_list_t); - for (n=0; n < ndata; n++) { - d = OBJ_NEW(opal_pmix_pdata_t); - opal_list_append(&results, &d->super); - if (mca_pmix_ext3x_component.native_launch) { - /* if we were launched by the OMPI RTE, then - * the jobid is in a special format - so get it */ - opal_convert_string_to_jobid(&d->proc.jobid, data[n].proc.nspace); - } else { - /* we were launched by someone else, so make the - * jobid just be the hash of the nspace */ - OPAL_HASH_JOBID(data[n].proc.nspace, d->proc.jobid); - } - /* if we don't already have it, add this to our jobid tracker */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == d->proc.jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); - (void)strncpy(job->nspace, data[n].proc.nspace, PMIX_MAX_NSLEN); - job->jobid = d->proc.jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); - } - d->proc.vpid = pmix3x_convert_rank(data[n].proc.rank); - d->value.key = strdup(data[n].key); - rc = pmix3x_value_unload(&d->value, &data[n].value); - if (OPAL_SUCCESS != rc) { - rc = OPAL_ERR_BAD_PARAM; - OPAL_ERROR_LOG(rc); - goto release; - } - } - r = &results; - } -release: - /* execute the callback */ - op->lkcbfunc(rc, r, op->cbdata); - - if (NULL != r) { - OPAL_LIST_DESTRUCT(&results); - } - OBJ_RELEASE(op); -} - -int pmix3x_lookupnb(char **keys, opal_list_t *info, - opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata) -{ - pmix_status_t ret; - pmix3x_opcaddy_t *op; - opal_value_t *iptr; - size_t n; - - - opal_output_verbose(1, opal_pmix_base_framework.framework_output, - "PMIx_client lookup_nb"); - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->lkcbfunc = cbfunc; - op->cbdata = cbdata; - - if (NULL != info) { - op->sz = opal_list_get_size(info); - if (0 < op->sz) { - PMIX_INFO_CREATE(op->info, op->sz); - n=0; - OPAL_LIST_FOREACH(iptr, info, opal_value_t) { - (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, iptr); - ++n; - } - } - } - - ret = PMIx_Lookup_nb(keys, op->info, op->sz, lk_cbfunc, op); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_unpublish(char **keys, opal_list_t *info) -{ - pmix_status_t ret; - size_t ninfo, n; - pmix_info_t *pinfo; - opal_value_t *iptr; - - if (NULL != info) { - ninfo = opal_list_get_size(info); - PMIX_INFO_CREATE(pinfo, ninfo); - n=0; - OPAL_LIST_FOREACH(iptr, info, opal_value_t) { - (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, iptr); - ++n; - } - } else { - pinfo = NULL; - ninfo = 0; - } - - ret = PMIx_Unpublish(keys, pinfo, ninfo); - PMIX_INFO_FREE(pinfo, ninfo); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_unpublishnb(char **keys, opal_list_t *info, - opal_pmix_op_cbfunc_t cbfunc, void *cbdata) -{ - pmix_status_t ret; - pmix3x_opcaddy_t *op; - opal_value_t *iptr; - size_t n; - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->opcbfunc = cbfunc; - op->cbdata = cbdata; - - if (NULL != info) { - op->sz = opal_list_get_size(info); - if (0 < op->sz) { - PMIX_INFO_CREATE(op->info, op->sz); - n=0; - OPAL_LIST_FOREACH(iptr, info, opal_value_t) { - (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, iptr); - ++n; - } - } - } - - ret = PMIx_Unpublish_nb(keys, op->info, op->sz, opcbfunc, op); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) -{ - pmix_status_t ret; - pmix_info_t *pinfo = NULL; - pmix_app_t *papps; - size_t napps, n, m, ninfo = 0; - char nspace[PMIX_MAX_NSLEN+1]; - opal_value_t *info; - opal_pmix_app_t *app; - opal_pmix3x_jobid_trkr_t *job; - - if (NULL != job_info && 0 < (ninfo = opal_list_get_size(job_info))) { - PMIX_INFO_CREATE(pinfo, ninfo); - n=0; - OPAL_LIST_FOREACH(info, job_info, opal_value_t) { - (void)strncpy(pinfo[n].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, info); - ++n; - } - } - - napps = opal_list_get_size(apps); - PMIX_APP_CREATE(papps, napps); - n=0; - OPAL_LIST_FOREACH(app, apps, opal_pmix_app_t) { - papps[n].cmd = strdup(app->cmd); - papps[n].argc = app->argc; - papps[n].argv = opal_argv_copy(app->argv); - papps[n].env = opal_argv_copy(app->env); - papps[n].maxprocs = app->maxprocs; - if (0 < (papps[n].ninfo = opal_list_get_size(&app->info))) { - PMIX_INFO_CREATE(papps[n].info, papps[n].ninfo); - m=0; - OPAL_LIST_FOREACH(info, &app->info, opal_value_t) { - (void)strncpy(papps[n].info[m].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&papps[n].info[m].value, info); - ++m; - } - } - ++n; - } - - ret = PMIx_Spawn(pinfo, ninfo, papps, napps, nspace); - if (PMIX_SUCCESS == ret) { - if (mca_pmix_ext3x_component.native_launch) { - /* if we were launched by the OMPI RTE, then - * the jobid is in a special format - so get it */ - opal_convert_string_to_jobid(jobid, nspace); - } else { - /* we were launched by someone else, so make the - * jobid just be the hash of the nspace */ - OPAL_HASH_JOBID(nspace, *jobid); - } - /* add this to our jobid tracker */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); - (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); - job->jobid = *jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); - } - PMIX_APP_FREE(papps, napps); - - return pmix3x_convert_rc(ret); -} - -static void spcbfunc(pmix_status_t status, - char *nspace, void *cbdata) -{ - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; - int rc; - opal_jobid_t jobid=OPAL_JOBID_INVALID; - opal_pmix3x_jobid_trkr_t *job; - - /* this is in the PMIx local thread - need to threadshift to - * our own thread as we will be accessing framework-global - * lists and objects */ - - rc = pmix3x_convert_rc(status); - if (PMIX_SUCCESS == status) { - if (mca_pmix_ext3x_component.native_launch) { - /* if we were launched by the OMPI RTE, then - * the jobid is in a special format - so get it */ - opal_convert_string_to_jobid(&jobid, nspace); - } else { - /* we were launched by someone else, so make the - * jobid just be the hash of the nspace */ - OPAL_HASH_JOBID(nspace, jobid); - } - /* add this to our jobid tracker */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); - (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); - job->jobid = jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); - } - - op->spcbfunc(rc, jobid, op->cbdata); - OBJ_RELEASE(op); -} - -int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps, - opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata) -{ - pmix_status_t ret; - pmix3x_opcaddy_t *op; - size_t n, m; - opal_value_t *info; - opal_pmix_app_t *app; - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->spcbfunc = cbfunc; - op->cbdata = cbdata; - - if (NULL != job_info && 0 < (op->ninfo = opal_list_get_size(job_info))) { - PMIX_INFO_CREATE(op->info, op->ninfo); - n=0; - OPAL_LIST_FOREACH(info, job_info, opal_value_t) { - (void)strncpy(op->info[n].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, info); - ++n; - } - } - - op->sz = opal_list_get_size(apps); - PMIX_APP_CREATE(op->apps, op->sz); - n=0; - OPAL_LIST_FOREACH(app, apps, opal_pmix_app_t) { - op->apps[n].cmd = strdup(app->cmd); - op->apps[n].argc = app->argc; - op->apps[n].argv = opal_argv_copy(app->argv); - op->apps[n].env = opal_argv_copy(app->env); - op->apps[n].maxprocs = app->maxprocs; - if (0 < (op->apps[n].ninfo = opal_list_get_size(&app->info))) { - PMIX_INFO_CREATE(op->apps[n].info, op->apps[n].ninfo); - m=0; - OPAL_LIST_FOREACH(info, &app->info, opal_value_t) { - (void)strncpy(op->apps[n].info[m].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->apps[n].info[m].value, info); - ++m; - } - } - ++n; - } - - ret = PMIx_Spawn_nb(op->info, op->ninfo, op->apps, op->sz, spcbfunc, op); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_connect(opal_list_t *procs) -{ - pmix_status_t ret; - pmix_proc_t *parray=NULL; - size_t n, cnt=0; - opal_namelist_t *ptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* protect against bozo error */ - if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { - return OPAL_ERR_BAD_PARAM; - } - - /* convert the list of procs to an array - * of pmix_proc_t */ - PMIX_PROC_CREATE(parray, cnt); - n=0; - OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == ptr->name.jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - OPAL_ERROR_LOG(OPAL_ERR_NOT_FOUND); - PMIX_PROC_FREE(parray, cnt); - return OPAL_ERR_NOT_FOUND; - } - (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); - ++n; - } - - ret = PMIx_Connect(parray, cnt, NULL, 0); - PMIX_PROC_FREE(parray, cnt); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_connectnb(opal_list_t *procs, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) -{ - pmix_status_t ret; - size_t n, cnt=0; - opal_namelist_t *ptr; - pmix3x_opcaddy_t *op; - opal_pmix3x_jobid_trkr_t *job; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - /* protect against bozo error */ - if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { - return OPAL_ERR_BAD_PARAM; - } - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->opcbfunc = cbfunc; - op->cbdata = cbdata; - op->nprocs = cnt; - - /* convert the list of procs to an array - * of pmix_proc_t */ - PMIX_PROC_CREATE(op->procs, op->nprocs); - n=0; - OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { - /* look thru our list of jobids and find the - * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (job->jobid == ptr->name.jobid) { - (void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN); - break; - } - } - op->procs[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); - ++n; - } - - ret = PMIx_Connect_nb(op->procs, op->nprocs, NULL, 0, opcbfunc, op); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_disconnect(opal_list_t *procs) -{ - pmix_status_t ret; - pmix_proc_t *parray=NULL; - size_t n, cnt=0; - opal_namelist_t *ptr; - opal_pmix3x_jobid_trkr_t *job; - - /* protect against bozo error */ - if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { - return OPAL_ERR_BAD_PARAM; - } - - /* convert the list of procs to an array - * of pmix_proc_t */ - PMIX_PROC_CREATE(parray, cnt); - n=0; - OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { - /* look thru our list of jobids and find the - * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (job->jobid == ptr->name.jobid) { - (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - break; - } - } - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); - ++n; - } - - ret = PMIx_Disconnect(parray, cnt, NULL, 0); - PMIX_PROC_FREE(parray, cnt); - - return pmix3x_convert_rc(ret); -} - -int pmix3x_disconnectnb(opal_list_t *procs, - opal_pmix_op_cbfunc_t cbfunc, - void *cbdata) -{ - pmix_status_t ret; - size_t n, cnt=0; - opal_namelist_t *ptr; - pmix3x_opcaddy_t *op; - opal_pmix3x_jobid_trkr_t *job; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - /* protect against bozo error */ - if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { - return OPAL_ERR_BAD_PARAM; - } - - /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); - op->opcbfunc = cbfunc; - op->cbdata = cbdata; - op->nprocs = cnt; - - /* convert the list of procs to an array - * of pmix_proc_t */ - PMIX_PROC_CREATE(op->procs, op->nprocs); - n=0; - OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { - /* look thru our list of jobids and find the - * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (job->jobid == ptr->name.jobid) { - (void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN); - break; - } - } - op->procs[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); - ++n; - } - - ret = PMIx_Disconnect_nb(op->procs, op->nprocs, NULL, 0, opcbfunc, op); - - return pmix3x_convert_rc(ret); -} - - -int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, - opal_list_t *procs) -{ - char *nspace; - pmix_proc_t *array=NULL; - size_t nprocs, n; - opal_namelist_t *nm; - int rc; - pmix_status_t ret; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - if (OPAL_JOBID_WILDCARD == jobid) { - nspace = NULL; - } else { - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - return OPAL_ERR_NOT_FOUND; - } - nspace = job->nspace; - } - - ret = PMIx_Resolve_peers(nodename, nspace, &array, &nprocs); - rc = pmix3x_convert_rc(ret); - - if (NULL != array && 0 < nprocs) { - for (n=0; n < nprocs; n++) { - nm = OBJ_NEW(opal_namelist_t); - opal_list_append(procs, &nm->super); - if (mca_pmix_ext3x_component.native_launch) { - /* if we were launched by the OMPI RTE, then - * the jobid is in a special format - so get it */ - opal_convert_string_to_jobid(&nm->name.jobid, array[n].nspace); - } else { - /* we were launched by someone else, so make the - * jobid just be the hash of the nspace */ - OPAL_HASH_JOBID(array[n].nspace, nm->name.jobid); - } - /* if we don't already have it, add this to our jobid tracker */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == nm->name.jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); - (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); - job->jobid = jobid; - opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super); - } - nm->name.vpid = pmix3x_convert_rank(array[n].rank); - } - } - PMIX_PROC_FREE(array, nprocs); - - return rc; -} - -int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist) -{ - pmix_status_t ret; - char *nspace=NULL; - opal_pmix3x_jobid_trkr_t *job, *jptr; - - /* we must threadshift this request as we might not be in an event - * and we are going to access framework-global lists/objects */ - - if (OPAL_JOBID_WILDCARD != jobid) { - /* look thru our list of jobids and find the - * corresponding nspace */ - job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) { - if (jptr->jobid == jobid) { - job = jptr; - break; - } - } - if (NULL == job) { - return OPAL_ERR_NOT_FOUND; - } - nspace = job->nspace; - } - - ret = PMIx_Resolve_nodes(nspace, nodelist); - - return pmix3x_convert_rc(ret);; -} diff --git a/opal/mca/pmix/ext3x/pmix3x_component.c b/opal/mca/pmix/ext3x/pmix3x_component.c deleted file mode 100644 index 9fdfd767a6c..00000000000 --- a/opal/mca/pmix/ext3x/pmix3x_component.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - * These symbols are in a file by themselves to provide nice linker - * semantics. Since linkers generally pull in symbols by object - * files, keeping these symbols as the only symbols in this file - * prevents utility programs such as "ompi_info" from having to import - * entire components just to query their version and parameters. - */ - -#include "opal_config.h" - -#include "opal/constants.h" -#include "opal/class/opal_list.h" -#include "opal/util/proc.h" -#include "opal/mca/pmix/pmix.h" -#include "pmix3x.h" - -/* - * Public string showing the pmix external component version number - */ -const char *opal_pmix_pmix3x_component_version_string = - "OPAL pmix3x MCA component version " OPAL_VERSION; - -/* - * Local function - */ -static int external_open(void); -static int external_close(void); -static int external_component_query(mca_base_module_t **module, int *priority); -static int external_register(void); - - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ - -mca_pmix_ext3x_component_t mca_pmix_ext3x_component = { - { - /* First, the mca_component_t struct containing meta information - about the component itself */ - - .base_version = { - /* Indicate that we are a pmix v1.1.0 component (which also - implies a specific MCA version) */ - - OPAL_PMIX_BASE_VERSION_2_0_0, - - /* Component name and version */ - - .mca_component_name = "ext3x", - MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, - OPAL_RELEASE_VERSION), - - /* Component open and close functions */ - - .mca_open_component = external_open, - .mca_close_component = external_close, - .mca_query_component = external_component_query, - .mca_register_component_params = external_register, - }, - /* Next the MCA v1.0.0 component meta data */ - .base_data = { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - } - }, - .native_launch = false -}; - -static int external_register(void) -{ - mca_pmix_ext3x_component.cache_size = 256; - mca_base_component_var_register(&mca_pmix_ext3x_component.super.base_version, - "cache_size", "Size of the ring buffer cache for events", - MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, - MCA_BASE_VAR_SCOPE_CONSTANT, - &mca_pmix_ext3x_component.cache_size); - - return OPAL_SUCCESS; -} - - -static int external_open(void) -{ - mca_pmix_ext3x_component.evindex = 0; - OBJ_CONSTRUCT(&mca_pmix_ext3x_component.jobids, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_ext3x_component.single_events, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_ext3x_component.multi_events, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_ext3x_component.default_events, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_ext3x_component.cache, opal_list_t); - - return OPAL_SUCCESS; -} - -static int external_close(void) -{ - OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.jobids); - OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.single_events); - OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.multi_events); - OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.default_events); - OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.cache); - return OPAL_SUCCESS; -} - - -static int external_component_query(mca_base_module_t **module, int *priority) -{ - char *t, *id; - - /* see if a PMIx server is present */ - if (NULL != (t = getenv("PMIX_SERVER_URI")) || - NULL != (id = getenv("PMIX_ID"))) { - /* if PMIx is present, then we are a client and need to use it */ - *priority = 100; - } else { - /* we could be a server, so we still need to be considered */ - *priority = 5; - } - *module = (mca_base_module_t *)&opal_pmix_ext3x_module; - return OPAL_SUCCESS; -} diff --git a/opal/mca/pmix/pmix2x/Makefile.am b/opal/mca/pmix/pmix2x/Makefile.am new file mode 100644 index 00000000000..206f22c225d --- /dev/null +++ b/opal/mca/pmix/pmix2x/Makefile.am @@ -0,0 +1,53 @@ +# +# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. +# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2015 Research Organization for Information Science +# and Technology (RIST). All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +EXTRA_DIST = autogen.subdirs + +SUBDIRS = pmix + +sources = \ + pmix2x.h \ + pmix2x_component.c \ + pmix2x.c \ + pmix2x_client.c \ + pmix2x_server_south.c \ + pmix2x_server_north.c + +# Make the output library in this directory, and name it either +# mca__.la (for DSO builds) or libmca__.la +# (for static builds). + +if MCA_BUILD_opal_pmix_pmix2x_DSO +component_noinst = +component_install = mca_pmix_pmix2x.la +else +component_noinst = libmca_pmix_pmix2x.la +component_install = +endif + +mcacomponentdir = $(opallibdir) +mcacomponent_LTLIBRARIES = $(component_install) +mca_pmix_pmix2x_la_SOURCES = $(sources) +mca_pmix_pmix2x_la_CFLAGS = $(opal_pmix_pmix2x_CFLAGS) +mca_pmix_pmix2x_la_CPPFLAGS = \ + -I$(srcdir)/pmix/include $(opal_pmix_pmix2x_CPPFLAGS) +mca_pmix_pmix2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix2x_LDFLAGS) +mca_pmix_pmix2x_la_LIBADD = $(opal_pmix_pmix2x_LIBS) +mca_pmix_pmix2x_la_DEPENDENCIES = $(opal_pmix_pmix2x_DEPENDENCIES) + +noinst_LTLIBRARIES = $(component_noinst) +libmca_pmix_pmix2x_la_SOURCES =$(sources) +libmca_pmix_pmix2x_la_CFLAGS = $(opal_pmix_pmix2x_CFLAGS) +libmca_pmix_pmix2x_la_CPPFLAGS = $(opal_pmix_pmix2x_CPPFLAGS) +libmca_pmix_pmix2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix2x_LDFLAGS) +libmca_pmix_pmix2x_la_LIBADD = $(opal_pmix_pmix2x_LIBS) +libmca_pmix_pmix2x_la_DEPENDENCIES = $(opal_pmix_pmix2x_DEPENDENCIES) diff --git a/opal/mca/pmix/pmix3x/autogen.subdirs b/opal/mca/pmix/pmix2x/autogen.subdirs similarity index 100% rename from opal/mca/pmix/pmix3x/autogen.subdirs rename to opal/mca/pmix/pmix2x/autogen.subdirs diff --git a/opal/mca/pmix/pmix3x/common_sym_whitelist.txt b/opal/mca/pmix/pmix2x/common_sym_whitelist.txt similarity index 100% rename from opal/mca/pmix/pmix3x/common_sym_whitelist.txt rename to opal/mca/pmix/pmix2x/common_sym_whitelist.txt diff --git a/opal/mca/pmix/pmix3x/configure.m4 b/opal/mca/pmix/pmix2x/configure.m4 similarity index 54% rename from opal/mca/pmix/pmix3x/configure.m4 rename to opal/mca/pmix/pmix2x/configure.m4 index 55275532eaa..c9ba1fa9f36 100644 --- a/opal/mca/pmix/pmix3x/configure.m4 +++ b/opal/mca/pmix/pmix2x/configure.m4 @@ -23,19 +23,19 @@ # $HEADER$ # -# MCA_pmix_pmix3x_CONFIG([action-if-found], [action-if-not-found]) +# MCA_pmix_pmix2x_CONFIG([action-if-found], [action-if-not-found]) # ----------------------------------------------------------- -AC_DEFUN([MCA_opal_pmix_pmix3x_CONFIG],[ - AC_CONFIG_FILES([opal/mca/pmix/pmix3x/Makefile]) +AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[ + AC_CONFIG_FILES([opal/mca/pmix/pmix2x/Makefile]) - OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix3x_save_CPPFLAGS opal_pmix_pmix3x_save_LDFLAGS opal_pmix_pmix3x_save_LIBS opal_pmix_pmix3x_basedir opal_pmix_pmix3x_save_cflags opal_pmix_pmix3x_sm_flag]) + OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix2x_save_CPPFLAGS opal_pmix_pmix2x_save_LDFLAGS opal_pmix_pmix2x_save_LIBS opal_pmix_pmix2x_basedir opal_pmix_pmix2x_save_cflags opal_pmix_pmix2x_sm_flag]) - opal_pmix_pmix3x_basedir=opal/mca/pmix/pmix3x + opal_pmix_pmix2x_basedir=opal/mca/pmix/pmix2x - opal_pmix_pmix3x_save_CFLAGS=$CFLAGS - opal_pmix_pmix3x_save_CPPFLAGS=$CPPFLAGS - opal_pmix_pmix3x_save_LDFLAGS=$LDFLAGS - opal_pmix_pmix3x_save_LIBS=$LIBS + opal_pmix_pmix2x_save_CFLAGS=$CFLAGS + opal_pmix_pmix2x_save_CPPFLAGS=$CPPFLAGS + opal_pmix_pmix2x_save_LDFLAGS=$LDFLAGS + opal_pmix_pmix2x_save_LIBS=$LIBS AC_ARG_ENABLE([pmix3-dstore], [AC_HELP_STRING([--enable-pmix3-dstore], @@ -43,55 +43,55 @@ AC_DEFUN([MCA_opal_pmix_pmix3x_CONFIG],[ AC_MSG_CHECKING([if PMIx3 shared memory data store is enabled]) if test "$enable_pmix3_dstore" != "no"; then AC_MSG_RESULT([yes]) - opal_pmix_pmix3x_sm_flag=--enable-dstore + opal_pmix_pmix2x_sm_flag=--enable-dstore else AC_MSG_RESULT([no (disabled)]) - opal_pmix_pmix3x_sm_flag=--disable-dstore + opal_pmix_pmix2x_sm_flag=--disable-dstore fi - opal_pmix_pmix3x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX3X_ $opal_pmix_pmix3x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --enable-embedded-hwloc --with-hwloc-header=\\\"$opal_hwloc_base_include\\\"" + opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX3X_ $opal_pmix_pmix2x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --enable-embedded-hwloc --with-hwloc-header=\\\"$opal_hwloc_base_include\\\"" AS_IF([test "$enable_debug" = "yes"], - [opal_pmix_pmix3x_args="--enable-debug $opal_pmix_pmix3x_args" + [opal_pmix_pmix2x_args="--enable-debug $opal_pmix_pmix2x_args" CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"], - [opal_pmix_pmix3x_args="--disable-debug $opal_pmix_pmix3x_args" + [opal_pmix_pmix2x_args="--disable-debug $opal_pmix_pmix2x_args" CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"]) AS_IF([test "$with_devel_headers" = "yes"], [], - [opal_pmix_pmix3x_args="--enable-embedded-mode $opal_pmix_pmix3x_args"]) + [opal_pmix_pmix2x_args="--enable-embedded-mode $opal_pmix_pmix2x_args"]) CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS" - OPAL_CONFIG_SUBDIR([$opal_pmix_pmix3x_basedir/pmix], - [$opal_pmix_pmix3x_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'], - [opal_pmix_pmix3x_happy=1], [opal_pmix_pmix3x_happy=0]) + OPAL_CONFIG_SUBDIR([$opal_pmix_pmix2x_basedir/pmix], + [$opal_pmix_pmix2x_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'], + [opal_pmix_pmix2x_happy=1], [opal_pmix_pmix2x_happy=0]) - CFLAGS=$opal_pmix_pmix3x_save_CFLAGS - CPPFLAGS=$opal_pmix_pmix3x_save_CPPFLAGS - LDFLAGS=$opal_pmix_pmix3x_save_LDFLAGS - LIBS=$opal_pmix_pmix3x_save_LIBS + CFLAGS=$opal_pmix_pmix2x_save_CFLAGS + CPPFLAGS=$opal_pmix_pmix2x_save_CPPFLAGS + LDFLAGS=$opal_pmix_pmix2x_save_LDFLAGS + LIBS=$opal_pmix_pmix2x_save_LIBS # If we are not building the internal pmix, then check to see - # if we are linking to an external v3.x library. If not, then + # if we are linking to an external v2.x library. If not, then # do not use this component. NOTE: we still did all the # above configury so that all the proper GNU Autotools # infrastructure is setup properly (e.g., w.r.t. SUBDIRS=pmix in # this directory's Makefile.am, we still need the Autotools "make # distclean" infrastructure to work properly). - AC_MSG_CHECKING([if v3.x component is to be used]) + AC_MSG_CHECKING([if v2.x component is to be used]) AS_IF([test "$opal_external_pmix_happy" = "yes"], [AC_MSG_RESULT([no - disqualifying this component]) - opal_pmix_pmix3x_happy=0], - [AC_MSG_RESULT([yes - using the internal v3.x library]) + opal_pmix_pmix2x_happy=0], + [AC_MSG_RESULT([yes - using the internal v2.x library]) # Build flags for our Makefile.am - opal_pmix_pmix3x_LDFLAGS= - opal_pmix_pmix3x_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix3x_basedir"'/pmix/src/libpmix.la' - opal_pmix_pmix3x_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix3x/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix3x/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix3x/pmix/include -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix3x/pmix' - opal_pmix_pmix3x_DEPENDENCIES='$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix3x/pmix/src/libpmix.la']) + opal_pmix_pmix2x_LDFLAGS= + opal_pmix_pmix2x_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix2x_basedir"'/pmix/src/libpmix.la' + opal_pmix_pmix2x_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix' + opal_pmix_pmix2x_DEPENDENCIES='$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/src/libpmix.la']) - AC_SUBST([opal_pmix_pmix3x_LIBS]) - AC_SUBST([opal_pmix_pmix3x_CPPFLAGS]) - AC_SUBST([opal_pmix_pmix3x_LDFLAGS]) - AC_SUBST([opal_pmix_pmix3x_DEPENDENCIES]) + AC_SUBST([opal_pmix_pmix2x_LIBS]) + AC_SUBST([opal_pmix_pmix2x_CPPFLAGS]) + AC_SUBST([opal_pmix_pmix2x_LDFLAGS]) + AC_SUBST([opal_pmix_pmix2x_DEPENDENCIES]) - AS_IF([test $opal_pmix_pmix3x_happy -eq 1], + AS_IF([test $opal_pmix_pmix2x_happy -eq 1], [$1], [$2]) diff --git a/opal/mca/pmix/pmix3x/pmix/AUTHORS b/opal/mca/pmix/pmix2x/pmix/AUTHORS similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/AUTHORS rename to opal/mca/pmix/pmix2x/pmix/AUTHORS diff --git a/opal/mca/pmix/pmix3x/pmix/INSTALL b/opal/mca/pmix/pmix2x/pmix/INSTALL similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/INSTALL rename to opal/mca/pmix/pmix2x/pmix/INSTALL index 005301463ff..4c7087c0a60 100644 --- a/opal/mca/pmix/pmix3x/pmix/INSTALL +++ b/opal/mca/pmix/pmix2x/pmix/INSTALL @@ -9,7 +9,7 @@ Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, Copyright (c) 2004-2005 The Regents of the University of California. All rights reserved. Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved. -Copyright (c) 2013-2015 Intel, Inc. All rights reserved. +Copyright (c) 2013-2016 Intel, Inc. All rights reserved. $COPYRIGHT$ Additional copyrights may follow @@ -85,4 +85,3 @@ shell$ make install Parallel make is generally only helpful in the build phase; the installation process is mostly serial and does not benefit much from parallel make. - diff --git a/opal/mca/pmix/pmix3x/pmix/LICENSE b/opal/mca/pmix/pmix2x/pmix/LICENSE similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/LICENSE rename to opal/mca/pmix/pmix2x/pmix/LICENSE index f9e6f047910..367b0c3c9c1 100644 --- a/opal/mca/pmix/pmix3x/pmix/LICENSE +++ b/opal/mca/pmix/pmix2x/pmix/LICENSE @@ -45,7 +45,7 @@ Copyright (c) 2010 ARM ltd. All rights reserved. Copyright (c) 2010-2011 Alex Brick . All rights reserved. Copyright (c) 2012 The University of Wisconsin-La Crosse. All rights reserved. -Copyright (c) 2013-2014 Intel, Inc. All rights reserved. +Copyright (c) 2013-2016 Intel, Inc. All rights reserved. Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved. $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/Makefile.am b/opal/mca/pmix/pmix2x/pmix/Makefile.am similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/Makefile.am index 1001fd43dab..cb0401665ab 100644 --- a/opal/mca/pmix/pmix3x/pmix/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/Makefile.am @@ -61,4 +61,3 @@ nroff: dist-hook: env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(PMIX_VERSION)" "$(PMIX_REPO_REV)" - diff --git a/opal/mca/pmix/pmix3x/pmix/NEWS b/opal/mca/pmix/pmix2x/pmix/NEWS similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/NEWS rename to opal/mca/pmix/pmix2x/pmix/NEWS diff --git a/opal/mca/pmix/pmix3x/pmix/README b/opal/mca/pmix/pmix2x/pmix/README similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/README rename to opal/mca/pmix/pmix2x/pmix/README index 55b7c61f5e3..3b435f1d668 100644 --- a/opal/mca/pmix/pmix3x/pmix/README +++ b/opal/mca/pmix/pmix2x/pmix/README @@ -15,7 +15,7 @@ Copyright (c) 2007 Myricom, Inc. All rights reserved. Copyright (c) 2008 IBM Corporation. All rights reserved. Copyright (c) 2010 Oak Ridge National Labs. All rights reserved. Copyright (c) 2011 University of Houston. All rights reserved. -Copyright (c) 2013-2015 Intel, Inc. All rights reserved +Copyright (c) 2013-2016 Intel, Inc. All rights reserved. $COPYRIGHT$ Additional copyrights may follow @@ -269,7 +269,7 @@ PMIx provides forward ABI compatibility in all versions of a given feature release series and its corresponding super stable series. For example, on a single platform, an pmix application linked against PMIx v1.3.2 shared libraries can be -updated to point to the shared libraries in any successive v1.3.x or +updated to point to the shared libraries in any successive v1.2.x or v1.4 release and still work properly (e.g., via the LD_LIBRARY_PATH environment variable or other operating system mechanism). diff --git a/opal/mca/pmix/pmix3x/pmix/VERSION b/opal/mca/pmix/pmix2x/pmix/VERSION similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/VERSION rename to opal/mca/pmix/pmix2x/pmix/VERSION diff --git a/opal/mca/pmix/pmix3x/pmix/autogen.pl b/opal/mca/pmix/pmix2x/pmix/autogen.pl similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/autogen.pl rename to opal/mca/pmix/pmix2x/pmix/autogen.pl diff --git a/opal/mca/pmix/pmix3x/pmix/config/Makefile.am b/opal/mca/pmix/pmix2x/pmix/config/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/config/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/config/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/config/c_get_alignment.m4 b/opal/mca/pmix/pmix2x/pmix/config/c_get_alignment.m4 similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/config/c_get_alignment.m4 rename to opal/mca/pmix/pmix2x/pmix/config/c_get_alignment.m4 index db379100994..e785357cefe 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/c_get_alignment.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/c_get_alignment.m4 @@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. -dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/config/distscript.sh b/opal/mca/pmix/pmix2x/pmix/config/distscript.sh old mode 100755 new mode 100644 similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/config/distscript.sh rename to opal/mca/pmix/pmix2x/pmix/config/distscript.sh index fbb37a78716..e0775b95950 --- a/opal/mca/pmix/pmix3x/pmix/config/distscript.sh +++ b/opal/mca/pmix/pmix2x/pmix/config/distscript.sh @@ -15,6 +15,7 @@ # and Technology (RIST). All rights reserved. # Copyright (c) 2015 Los Alamos National Security, LLC. All rights # reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/config/pmix.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix.m4 index 2b4b4a2a812..8013167e2d4 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix.m4 @@ -278,7 +278,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[ # fails # - checks for __inline__, which then emits no error, and works # - # This also works nicely for gcc 3.x because "inline" will work on + # This also works nicely for gcc 2.x because "inline" will work on # the first check, and all is fine. :-) PMIX_CFLAGS_save=$CFLAGS diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_attributes.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_attributes.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_attributes.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_attributes.m4 index bbafcc2b8b5..84146ac7136 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_attributes.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_attributes.m4 @@ -1,6 +1,6 @@ # -*- shell-script -*- # PMIx copyrights: -# Copyright (c) 2013 Intel, Inc. All rights reserved +# Copyright (c) 2013-2016 Intel, Inc. All rights reserved. # ######################### # diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_broken_qsort.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_broken_qsort.m4 similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_broken_qsort.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_broken_qsort.m4 index da4d14047e3..62351f339f9 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_broken_qsort.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_broken_qsort.m4 @@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. -dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. dnl $COPYRIGHT$ dnl diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_compiler_version.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_compiler_version.m4 similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_compiler_version.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_compiler_version.m4 index b0a347e27bf..e90258b7ca9 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_compiler_version.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_compiler_version.m4 @@ -1,7 +1,7 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. -dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved. dnl dnl $COPYRIGHT$ dnl diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_icc.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_icc.m4 similarity index 96% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_icc.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_icc.m4 index e8a06b25148..fcdf3c31962 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_icc.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_icc.m4 @@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. -dnl Copyright (c) 2014 Intel, Inc. All rights reserved. +dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved. dnl Copyright (c) 2016 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_ident.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_ident.m4 similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_ident.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_ident.m4 index de2fa573bc9..6b99483ed48 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_ident.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_ident.m4 @@ -1,7 +1,7 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. -dnl Copyright (c) 2015 Intel, Inc. All rights reserved +dnl Copyright (c) 2015-2016 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_os_flavors.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_os_flavors.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_os_flavors.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_os_flavors.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_package.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_package.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_package.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_package.m4 index f4833c3b0ae..4ea549c071b 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_package.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_package.m4 @@ -12,7 +12,7 @@ # All rights reserved. # Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2014 Intel, Inc. All rights reserved. +# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_vendor.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_vendor.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_vendor.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_vendor.m4 index cf96c462563..1021d9cdc8a 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_vendor.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_vendor.m4 @@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. -dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_visibility.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_visibility.m4 similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_check_visibility.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_check_visibility.m4 index 1a4c45cc44f..1f46849ae2d 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_check_visibility.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_check_visibility.m4 @@ -12,6 +12,7 @@ # All rights reserved. # Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_config_subdir.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir.m4 similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_config_subdir.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir.m4 index ff60f311b05..e249197bec1 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_config_subdir.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir.m4 @@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2012-2016 Cisco Systems, Inc. All rights reserved. -dnl Copyright (c) 2014 Intel, Inc. All rights reserved. +dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_config_subdir_args.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir_args.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_config_subdir_args.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir_args.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_ensure_contains_optflags.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_ensure_contains_optflags.m4 similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_ensure_contains_optflags.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_ensure_contains_optflags.m4 index 68bf36090ba..375207393ac 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_ensure_contains_optflags.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_ensure_contains_optflags.m4 @@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved. -dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_functions.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_functions.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_functions.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_functions.m4 index 4b1eadcd865..187f4a5a38c 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_functions.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_functions.m4 @@ -13,7 +13,7 @@ dnl All rights reserved. dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved. -dnl Copyright (c) 2013 Intel, Inc. All rights reserved +dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved. dnl dnl $COPYRIGHT$ dnl diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_get_version.sh b/opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh old mode 100755 new mode 100644 similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_get_version.sh rename to opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh index 6106af60c38..926911ec927 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_get_version.sh +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh @@ -11,7 +11,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2015 Intel, Inc. All rights reserved +# Copyright (c) 2015-2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_load_platform.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_load_platform.m4 similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_load_platform.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_load_platform.m4 index 53d4afbf7d0..0c8cc215a57 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_load_platform.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_load_platform.m4 @@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. -dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_mca.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_mca.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_mca.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_mca.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_mca_priority_sort.pl b/opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl old mode 100755 new mode 100644 similarity index 92% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_mca_priority_sort.pl rename to opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl index 4026e990edc..98691004681 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_mca_priority_sort.pl +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl @@ -2,6 +2,7 @@ # # Copyright (c) 2010 Sandia National Laboratories. All rights reserved. # +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_search_libs.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_search_libs.m4 similarity index 94% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_search_libs.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_search_libs.m4 index 9d7a8af9a74..9b288e2c35b 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_search_libs.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_search_libs.m4 @@ -1,7 +1,7 @@ dnl -*- shell-script -*- dnl dnl Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved. -dnl Copyright (c) 2014 Intel, Inc. All rights reserved. +dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cc.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_cc.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cc.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_setup_cc.m4 index 5e58631099c..394cd00662f 100644 --- a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_cc.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_cc.m4 @@ -16,7 +16,7 @@ dnl Copyright (c) 2012 Los Alamos National Security, LLC. All rights dnl reserved. dnl Copyright (c) 2015 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. -dnl Copyright (c) 2015 Intel, Inc. All rights reserved +dnl Copyright (c) 2015-2016 Intel, Inc. All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_hwloc.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_hwloc.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_setup_hwloc.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_setup_hwloc.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libevent.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix_setup_libevent.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/config/pmix_setup_libevent.m4 rename to opal/mca/pmix/pmix2x/pmix/config/pmix_setup_libevent.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/configure.ac b/opal/mca/pmix/pmix2x/pmix/configure.ac similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/configure.ac rename to opal/mca/pmix/pmix2x/pmix/configure.ac index f6b3ec2b491..2c438a0c411 100644 --- a/opal/mca/pmix/pmix3x/pmix/configure.ac +++ b/opal/mca/pmix/pmix2x/pmix/configure.ac @@ -19,7 +19,7 @@ # Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. -# Copyright (c) 2014-2015 Intel, Inc. All rights reserved +# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. # Copyright (c) 2016 IBM Corporation. All rights reserved. # Copyright (c) 2016 Research Organization for Information Science # and Technology (RIST). All rights reserved. diff --git a/opal/mca/pmix/pmix3x/pmix/contrib/pmix-valgrind.supp b/opal/mca/pmix/pmix2x/pmix/contrib/pmix-valgrind.supp similarity index 93% rename from opal/mca/pmix/pmix3x/pmix/contrib/pmix-valgrind.supp rename to opal/mca/pmix/pmix2x/pmix/contrib/pmix-valgrind.supp index 4de2cf66b33..464f5704a0f 100644 --- a/opal/mca/pmix/pmix3x/pmix/contrib/pmix-valgrind.supp +++ b/opal/mca/pmix/pmix2x/pmix/contrib/pmix-valgrind.supp @@ -1,6 +1,6 @@ # -*- text -*- # -# Copyright (c) 2015 Intel, Inc. All rights reserved. +# Copyright (c) 2015-2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -44,5 +44,3 @@ fun:PMIx_init fun:main } - - diff --git a/opal/mca/pmix/pmix3x/pmix/examples/Makefile.am b/opal/mca/pmix/pmix2x/pmix/examples/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/examples/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/examples/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/examples/client.c b/opal/mca/pmix/pmix2x/pmix/examples/client.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/examples/client.c rename to opal/mca/pmix/pmix2x/pmix/examples/client.c diff --git a/opal/mca/pmix/pmix3x/pmix/examples/dmodex.c b/opal/mca/pmix/pmix2x/pmix/examples/dmodex.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/examples/dmodex.c rename to opal/mca/pmix/pmix2x/pmix/examples/dmodex.c diff --git a/opal/mca/pmix/pmix3x/pmix/examples/dynamic.c b/opal/mca/pmix/pmix2x/pmix/examples/dynamic.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/examples/dynamic.c rename to opal/mca/pmix/pmix2x/pmix/examples/dynamic.c diff --git a/opal/mca/pmix/pmix3x/pmix/examples/fault.c b/opal/mca/pmix/pmix2x/pmix/examples/fault.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/examples/fault.c rename to opal/mca/pmix/pmix2x/pmix/examples/fault.c diff --git a/opal/mca/pmix/pmix3x/pmix/examples/pub.c b/opal/mca/pmix/pmix2x/pmix/examples/pub.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/examples/pub.c rename to opal/mca/pmix/pmix2x/pmix/examples/pub.c diff --git a/opal/mca/pmix/pmix3x/pmix/examples/tool.c b/opal/mca/pmix/pmix2x/pmix/examples/tool.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/examples/tool.c rename to opal/mca/pmix/pmix2x/pmix/examples/tool.c diff --git a/opal/mca/pmix/pmix3x/pmix/include/Makefile.am b/opal/mca/pmix/pmix2x/pmix/include/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/include/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmi.h b/opal/mca/pmix/pmix2x/pmix/include/pmi.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmi.h rename to opal/mca/pmix/pmix2x/pmix/include/pmi.h diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmi2.h b/opal/mca/pmix/pmix2x/pmix/include/pmi2.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmi2.h rename to opal/mca/pmix/pmix2x/pmix/include/pmi2.h diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmix.h b/opal/mca/pmix/pmix2x/pmix/include/pmix.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmix.h rename to opal/mca/pmix/pmix2x/pmix/include/pmix.h diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmix_common.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_common.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmix_common.h rename to opal/mca/pmix/pmix2x/pmix/include/pmix_common.h diff --git a/opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h new file mode 100644 index 00000000000..c3e3e404190 --- /dev/null +++ b/opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2016 Intel, Inc. All rights reserved + * Copyright (c) 2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef PMIX_RENAME_H +#define PMIX_RENAME_H + +#define PMIx_Init OPAL_MCA_PMIX3X_PMIx_Init +#define PMIx_Initialized OPAL_MCA_PMIX3X_PMIx_Initialized +#define PMIx_Finalize OPAL_MCA_PMIX3X_PMIx_Finalize +#define PMIx_Abort OPAL_MCA_PMIX3X_PMIx_Abort +#define PMIx_Put OPAL_MCA_PMIX3X_PMIx_Put +#define PMIx_Commit OPAL_MCA_PMIX3X_PMIx_Commit +#define PMIx_Fence OPAL_MCA_PMIX3X_PMIx_Fence +#define PMIx_Fence_nb OPAL_MCA_PMIX3X_PMIx_Fence_nb +#define PMIx_Get OPAL_MCA_PMIX3X_PMIx_Get +#define PMIx_Get_nb OPAL_MCA_PMIX3X_PMIx_Get_nb +#define PMIx_Publish OPAL_MCA_PMIX3X_PMIx_Publish +#define PMIx_Publish_nb OPAL_MCA_PMIX3X_PMIx_Publish_nb +#define PMIx_Lookup OPAL_MCA_PMIX3X_PMIx_Lookup +#define PMIx_Lookup_nb OPAL_MCA_PMIX3X_PMIx_Lookup_nb +#define PMIx_Unpublish OPAL_MCA_PMIX3X_PMIx_Unpublish +#define PMIx_Unpublish_nb OPAL_MCA_PMIX3X_PMIx_Unpublish_nb +#define PMIx_Spawn OPAL_MCA_PMIX3X_PMIx_Spawn +#define PMIx_Spawn_nb OPAL_MCA_PMIX3X_PMIx_Spawn_nb +#define PMIx_Connect OPAL_MCA_PMIX3X_PMIx_Connect +#define PMIx_Connect_nb OPAL_MCA_PMIX3X_PMIx_Connect_nb +#define PMIx_Disconnect OPAL_MCA_PMIX3X_PMIx_Disconnect +#define PMIx_Disconnect_nb OPAL_MCA_PMIX3X_PMIx_Disconnect_nb +#define PMIx_Resolve_peers OPAL_MCA_PMIX3X_PMIx_Resolve_peers +#define PMIx_Resolve_nodes OPAL_MCA_PMIX3X_PMIx_Resolve_nodes +#define PMIx_Query_info_nb OPAL_MCA_PMIX3X_PMIx_Query_info_nb +#define PMIx_Log_nb OPAL_MCA_PMIX3X_PMIx_Log_nb + +#define PMIx_server_init OPAL_MCA_PMIX3X_PMIx_server_init +#define PMIx_server_finalize OPAL_MCA_PMIX3X_PMIx_server_finalize +#define PMIx_generate_regex OPAL_MCA_PMIX3X_PMIx_generate_regex +#define PMIx_generate_ppn OPAL_MCA_PMIX3X_PMIx_generate_ppn +#define PMIx_server_register_nspace OPAL_MCA_PMIX3X_PMIx_server_register_nspace +#define PMIx_server_deregister_nspace OPAL_MCA_PMIX3X_PMIx_server_deregister_nspace +#define PMIx_server_register_client OPAL_MCA_PMIX3X_PMIx_server_register_client +#define PMIx_server_deregister_client OPAL_MCA_PMIX3X_PMIx_server_deregister_client +#define PMIx_server_setup_fork OPAL_MCA_PMIX3X_PMIx_server_setup_fork +#define PMIx_server_dmodex_request OPAL_MCA_PMIX3X_PMIx_server_dmodex_request + +#define PMIx_tool_init OPAL_MCA_PMIX3X_PMIx_tool_init +#define PMIx_tool_finalize OPAL_MCA_PMIX3X_PMIx_tool_finalize + +#define PMIx_Register_event_handler OPAL_MCA_PMIX3X_PMIx_Register_event_handler +#define PMIx_Deregister_event_handler OPAL_MCA_PMIX3X_PMIx_Deregister_event_handler +#define PMIx_Notify_event OPAL_MCA_PMIX3X_PMIx_Notify_event +#define PMIx_Error_string OPAL_MCA_PMIX3X_PMIx_Error_string +#define PMIx_Proc_state_string OPAL_MCA_PMIX3X_PMIx_Proc_state_string +#define PMIx_Persistence_string OPAL_MCA_PMIX3X_PMIx_Persistence_string +#define PMIx_Data_range_string OPAL_MCA_PMIX3X_PMIx_Data_range_string +#define PMIx_Info_directives_string OPAL_MCA_PMIX3X_PMIx_Info_directives_string +#define PMIx_Data_type_string OPAL_MCA_PMIX3X_PMIx_Data_type_string +#define PMIx_Get_version OPAL_MCA_PMIX3X_PMIx_Get_version +#define PMIx_Store_internal OPAL_MCA_PMIX3X_PMIx_Store_internal + +#define pmix_value_load OPAL_MCA_PMIX3X_pmix_value_load +#define pmix_value_xfer OPAL_MCA_PMIX3X_pmix_value_xfer +#define pmix_globals OPAL_MCA_PMIX3X_pmix_globals +#define pmix_output OPAL_MCA_PMIX3X_pmix_output +#define pmix_output_verbose OPAL_MCA_PMIX3X_pmix_output_verbose + +#endif diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmix_rename.h.in b/opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h.in similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmix_rename.h.in rename to opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h.in diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmix_server.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_server.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmix_server.h rename to opal/mca/pmix/pmix2x/pmix/include/pmix_server.h diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmix_tool.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_tool.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmix_tool.h rename to opal/mca/pmix/pmix2x/pmix/include/pmix_tool.h diff --git a/opal/mca/pmix/pmix2x/pmix/include/pmix_version.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_version.h new file mode 100644 index 00000000000..bb8bf7c6fbb --- /dev/null +++ b/opal/mca/pmix/pmix2x/pmix/include/pmix_version.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2016 Mellanox Technologies, Inc. + * All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + + +#ifndef PMIx_VERSION_H +#define PMIx_VERSION_H + +/* define PMIx version */ +#define PMIX_VERSION_MAJOR 2L +#define PMIX_VERSION_MINOR 0L + +#endif diff --git a/opal/mca/pmix/pmix3x/pmix/include/pmix_version.h.in b/opal/mca/pmix/pmix2x/pmix/include/pmix_version.h.in similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/include/pmix_version.h.in rename to opal/mca/pmix/pmix2x/pmix/include/pmix_version.h.in diff --git a/opal/mca/pmix/pmix3x/pmix/man/Makefile.am b/opal/mca/pmix/pmix2x/pmix/man/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/man/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/man/README b/opal/mca/pmix/pmix2x/pmix/man/README similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/README rename to opal/mca/pmix/pmix2x/pmix/man/README diff --git a/opal/mca/pmix/pmix3x/pmix/man/man3/pmix_abort.3 b/opal/mca/pmix/pmix2x/pmix/man/man3/pmix_abort.3 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man3/pmix_abort.3 rename to opal/mca/pmix/pmix2x/pmix/man/man3/pmix_abort.3 diff --git a/opal/mca/pmix/pmix3x/pmix/man/man3/pmix_commit.3 b/opal/mca/pmix/pmix2x/pmix/man/man3/pmix_commit.3 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man3/pmix_commit.3 rename to opal/mca/pmix/pmix2x/pmix/man/man3/pmix_commit.3 diff --git a/opal/mca/pmix/pmix3x/pmix/man/man3/pmix_finalize.3 b/opal/mca/pmix/pmix2x/pmix/man/man3/pmix_finalize.3 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man3/pmix_finalize.3 rename to opal/mca/pmix/pmix2x/pmix/man/man3/pmix_finalize.3 diff --git a/opal/mca/pmix/pmix3x/pmix/man/man3/pmix_init.3 b/opal/mca/pmix/pmix2x/pmix/man/man3/pmix_init.3 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man3/pmix_init.3 rename to opal/mca/pmix/pmix2x/pmix/man/man3/pmix_init.3 diff --git a/opal/mca/pmix/pmix3x/pmix/man/man3/pmix_initialized.3 b/opal/mca/pmix/pmix2x/pmix/man/man3/pmix_initialized.3 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man3/pmix_initialized.3 rename to opal/mca/pmix/pmix2x/pmix/man/man3/pmix_initialized.3 diff --git a/opal/mca/pmix/pmix3x/pmix/man/man3/pmix_put.3 b/opal/mca/pmix/pmix2x/pmix/man/man3/pmix_put.3 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man3/pmix_put.3 rename to opal/mca/pmix/pmix2x/pmix/man/man3/pmix_put.3 diff --git a/opal/mca/pmix/pmix3x/pmix/man/man7/pmix.7 b/opal/mca/pmix/pmix2x/pmix/man/man7/pmix.7 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man7/pmix.7 rename to opal/mca/pmix/pmix2x/pmix/man/man7/pmix.7 diff --git a/opal/mca/pmix/pmix3x/pmix/man/man7/pmix_constants.7 b/opal/mca/pmix/pmix2x/pmix/man/man7/pmix_constants.7 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/man/man7/pmix_constants.7 rename to opal/mca/pmix/pmix2x/pmix/man/man7/pmix_constants.7 diff --git a/opal/mca/pmix/pmix3x/pmix/src/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/buffer_ops.h b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/buffer_ops.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/buffer_ops.h rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/buffer_ops.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/copy.c b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/copy.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/copy.c rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/copy.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/internal.h b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/internal.h rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/internal_functions.c b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/internal_functions.c rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c index 55b126b07fa..c8b4bc70e61 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/internal_functions.c +++ b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/internal_functions.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved. * $COPYRIGHT$ * diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/open_close.c b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/open_close.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/open_close.c rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/open_close.c index b3c4d723a37..f569d2d4f83 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/open_close.c +++ b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/open_close.c @@ -662,4 +662,3 @@ pmix_status_t pmix_value_unload(pmix_value_t *kv, void **data, } return rc; } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/pack.c b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/pack.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/pack.c rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/pack.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/print.c b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/print.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/print.c rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/print.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/types.h b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/types.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/types.h rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/types.h index c48a30b8b5c..5a1f7c8b94b 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/types.h +++ b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/types.h @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/buffer_ops/unpack.c b/opal/mca/pmix/pmix2x/pmix/src/buffer_ops/unpack.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/buffer_ops/unpack.c rename to opal/mca/pmix/pmix2x/pmix/src/buffer_ops/unpack.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/class/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/class/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/class/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_hash_table.c b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_hash_table.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_hash_table.c rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_hash_table.c index ead33aecfa4..971ed4e478e 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_hash_table.c +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_hash_table.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_hash_table.h b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_hash_table.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_hash_table.h rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_hash_table.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_hotel.c b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_hotel.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_hotel.c rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_hotel.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_hotel.h b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_hotel.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_hotel.h rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_hotel.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_list.c b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_list.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_list.c rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_list.c index 933c5bcd5a7..dd2bb3f2abb 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_list.c +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_list.c @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007 Voltaire All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_list.h b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_list.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_list.h rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_list.h index 4d8a195bb32..c0b0a331052 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_list.h +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_list.h @@ -13,7 +13,7 @@ * Copyright (c) 2007 Voltaire All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_object.c b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_object.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_object.c rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_object.c index 59f77752abe..2166f2109cd 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_object.c +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_object.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -200,4 +200,3 @@ static void expand_array(void) classes[i] = NULL; } } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_object.h b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_object.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_object.h rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_object.h index 26c5f12af9e..c794a1b9edb 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_object.h +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_object.h @@ -11,7 +11,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -498,4 +498,3 @@ static inline int pmix_obj_update(pmix_object_t *object, int inc) END_C_DECLS #endif - diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_pointer_array.c b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_pointer_array.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_pointer_array.c rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_pointer_array.c index e24526ffeee..a3b3f534a43 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_pointer_array.c +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_pointer_array.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -265,7 +265,7 @@ bool pmix_pointer_array_test_and_set_item (pmix_pointer_array_t *table, if ( index == table->lowest_free ) { int i; - table->lowest_free = table->size; + table->lowest_free = table->size; for ( i=index; isize; i++) { if ( NULL == table->addr[i] ){ table->lowest_free = i; diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_pointer_array.h b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_pointer_array.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_pointer_array.h rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_pointer_array.h index 9674ef3e980..aca3578fc07 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_pointer_array.h +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_pointer_array.h @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_ring_buffer.c b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_ring_buffer.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_ring_buffer.c rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_ring_buffer.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_ring_buffer.h b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_ring_buffer.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_ring_buffer.h rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_ring_buffer.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_value_array.c b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_value_array.c rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.c index f46e494c381..166759beee1 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_value_array.c +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.c @@ -64,4 +64,3 @@ int pmix_value_array_set_size(pmix_value_array_t* array, size_t size) array->array_size = size; return PMIX_SUCCESS; } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_value_array.h b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/class/pmix_value_array.h rename to opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.h index e6e74dc3621..84692d42d97 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/class/pmix_value_array.h +++ b/opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.h @@ -278,4 +278,3 @@ static inline int pmix_value_array_remove_item(pmix_value_array_t *array, size_t END_C_DECLS #endif - diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/client/Makefile.include similarity index 91% rename from opal/mca/pmix/pmix3x/pmix/src/client/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/client/Makefile.include index 2f4fd6eeb19..f7a7ddefbd3 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/client/Makefile.include +++ b/opal/mca/pmix/pmix2x/pmix/src/client/Makefile.include @@ -1,6 +1,6 @@ # -*- makefile -*- # -# Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. # Copyright (c) 2014 Artem Y. Polyakov . # All rights reserved. # Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmi1.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmi1.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmi1.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmi1.c index fa894bed685..5ddc6917b80 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/client/pmi1.c +++ b/opal/mca/pmix/pmix2x/pmix/src/client/pmi1.c @@ -46,7 +46,7 @@ #define PMI_CHECK() \ - do { \ + do { \ if (!pmi_init) { \ return PMI_FAIL; \ } \ diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmi2.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmi2.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmi2.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmi2.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmix_client.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmix_client.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_connect.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_connect.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_connect.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_connect.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_fence.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_fence.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_fence.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_fence.c index c62906923d5..a6655c67bc9 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_fence.c +++ b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_fence.c @@ -252,4 +252,3 @@ static void op_cbfunc(pmix_status_t status, void *cbdata) cb->status = status; cb->active = false; } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_get.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_get.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_ops.h b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_ops.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_ops.h rename to opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_ops.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_pub.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_pub.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_pub.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_pub.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_spawn.c b/opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_spawn.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/client/pmix_client_spawn.c rename to opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_spawn.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/common/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/common/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/common/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/common/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/common/pmix_jobdata.c b/opal/mca/pmix/pmix2x/pmix/src/common/pmix_jobdata.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/common/pmix_jobdata.c rename to opal/mca/pmix/pmix2x/pmix/src/common/pmix_jobdata.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/common/pmix_log.c b/opal/mca/pmix/pmix2x/pmix/src/common/pmix_log.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/common/pmix_log.c rename to opal/mca/pmix/pmix2x/pmix/src/common/pmix_log.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/common/pmix_query.c b/opal/mca/pmix/pmix2x/pmix/src/common/pmix_query.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/common/pmix_query.c rename to opal/mca/pmix/pmix2x/pmix/src/common/pmix_query.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/common/pmix_strings.c b/opal/mca/pmix/pmix2x/pmix/src/common/pmix_strings.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/common/pmix_strings.c rename to opal/mca/pmix/pmix2x/pmix/src/common/pmix_strings.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/dstore/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/dstore/Makefile.include similarity index 83% rename from opal/mca/pmix/pmix3x/pmix/src/dstore/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/dstore/Makefile.include index a317230d073..465071084f7 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/dstore/Makefile.include +++ b/opal/mca/pmix/pmix2x/pmix/src/dstore/Makefile.include @@ -1,5 +1,6 @@ # Copyright (c) 2015-2016 Mellanox Technologies, Inc. # All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_dstore.c b/opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_dstore.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_dstore.c rename to opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_dstore.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_dstore.h b/opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_dstore.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_dstore.h rename to opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_dstore.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_esh.c b/opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_esh.c rename to opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_esh.h b/opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/dstore/pmix_esh.h rename to opal/mca/pmix/pmix2x/pmix/src/dstore/pmix_esh.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/event/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/event/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/event/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/event/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/event/pmix_event.h b/opal/mca/pmix/pmix2x/pmix/src/event/pmix_event.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/event/pmix_event.h rename to opal/mca/pmix/pmix2x/pmix/src/event/pmix_event.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/event/pmix_event_notification.c b/opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_notification.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/event/pmix_event_notification.c rename to opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_notification.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/event/pmix_event_registration.c b/opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_registration.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/event/pmix_event_registration.c rename to opal/mca/pmix/pmix2x/pmix/src/event/pmix_event_registration.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/include/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/include/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/include/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/align.h b/opal/mca/pmix/pmix2x/pmix/src/include/align.h similarity index 94% rename from opal/mca/pmix/pmix3x/pmix/src/include/align.h rename to opal/mca/pmix/pmix2x/pmix/src/include/align.h index e55c303603c..354e2760c61 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/include/align.h +++ b/opal/mca/pmix/pmix2x/pmix/src/include/align.h @@ -12,6 +12,7 @@ * Copyright (c) 2006 Voltaire All rights reserved. * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. * + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/hash_string.h b/opal/mca/pmix/pmix2x/pmix/src/include/hash_string.h similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/src/include/hash_string.h rename to opal/mca/pmix/pmix2x/pmix/src/include/hash_string.h index a079f793caf..1f5dedcdfea 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/include/hash_string.h +++ b/opal/mca/pmix/pmix2x/pmix/src/include/hash_string.h @@ -2,6 +2,7 @@ * Copyright (c) 2004-2007 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_config_bottom.h b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_config_bottom.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/include/pmix_config_bottom.h rename to opal/mca/pmix/pmix2x/pmix/src/include/pmix_config_bottom.h index 13ce998a70c..ecf6d03feb3 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_config_bottom.h +++ b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_config_bottom.h @@ -13,7 +13,7 @@ * Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved. * $COPYRIGHT$ * @@ -390,11 +390,11 @@ typedef PMIX_PTRDIFF_TYPE ptrdiff_t; #include #endif #if defined(PATH_MAX) -#define PMIX_PATH_MAX (PATH_MAX + 1) +#define PMIX_PATH_MAX (PATH_MAX + 1) #elif defined(_POSIX_PATH_MAX) -#define PMIX_PATH_MAX (_POSIX_PATH_MAX + 1) +#define PMIX_PATH_MAX (_POSIX_PATH_MAX + 1) #else -#define PMIX_PATH_MAX 256 +#define PMIX_PATH_MAX 256 #endif #if defined(MAXHOSTNAMELEN) @@ -578,4 +578,3 @@ typedef PMIX_PTRDIFF_TYPE ptrdiff_t; #endif /* PMIX_BUILDING */ #endif /* PMIX_CONFIG_BOTTOM_H */ - diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_config_top.h b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_config_top.h similarity index 95% rename from opal/mca/pmix/pmix3x/pmix/src/include/pmix_config_top.h rename to opal/mca/pmix/pmix2x/pmix/src/include/pmix_config_top.h index 725a6c7c36c..aeefec4ad7a 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_config_top.h +++ b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_config_top.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved. * $COPYRIGHT$ * diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_globals.c b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_globals.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/include/pmix_globals.c rename to opal/mca/pmix/pmix2x/pmix/src/include/pmix_globals.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_globals.h b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_globals.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/include/pmix_globals.h rename to opal/mca/pmix/pmix2x/pmix/src/include/pmix_globals.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_jobdata.h b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_jobdata.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/include/pmix_jobdata.h rename to opal/mca/pmix/pmix2x/pmix/src/include/pmix_jobdata.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_socket_errno.h b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_socket_errno.h similarity index 93% rename from opal/mca/pmix/pmix3x/pmix/src/include/pmix_socket_errno.h rename to opal/mca/pmix/pmix2x/pmix/src/include/pmix_socket_errno.h index 2b7ecb506c2..e0619bac175 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_socket_errno.h +++ b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_socket_errno.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_stdint.h b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_stdint.h similarity index 56% rename from opal/mca/pmix/pmix3x/pmix/src/include/pmix_stdint.h rename to opal/mca/pmix/pmix2x/pmix/src/include/pmix_stdint.h index 88cf28b2b4e..982a442671b 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/include/pmix_stdint.h +++ b/opal/mca/pmix/pmix2x/pmix/src/include/pmix_stdint.h @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -191,123 +192,123 @@ typedef unsigned long long uintptr_t; #else # if SIZEOF_LONG == 8 -# define __PRI64_PREFIX "l" -# define __PRIPTR_PREFIX "l" +# define __PRI64_PREFIX "l" +# define __PRIPTR_PREFIX "l" # else -# define __PRI64_PREFIX "ll" +# define __PRI64_PREFIX "ll" # define __PRIPTR_PREFIX # endif /* Decimal notation. */ -# define PRId8 "d" -# define PRId16 "d" -# define PRId32 "d" -# define PRId64 __PRI64_PREFIX "d" - -# define PRIdLEAST8 "d" -# define PRIdLEAST16 "d" -# define PRIdLEAST32 "d" -# define PRIdLEAST64 __PRI64_PREFIX "d" - -# define PRIdFAST8 "d" -# define PRIdFAST16 __PRIPTR_PREFIX "d" -# define PRIdFAST32 __PRIPTR_PREFIX "d" -# define PRIdFAST64 __PRI64_PREFIX "d" - -# define PRIi8 "i" -# define PRIi16 "i" -# define PRIi32 "i" -# define PRIi64 __PRI64_PREFIX "i" - -# define PRIiLEAST8 "i" -# define PRIiLEAST16 "i" -# define PRIiLEAST32 "i" -# define PRIiLEAST64 __PRI64_PREFIX "i" - -# define PRIiFAST8 "i" -# define PRIiFAST16 __PRIPTR_PREFIX "i" -# define PRIiFAST32 __PRIPTR_PREFIX "i" -# define PRIiFAST64 __PRI64_PREFIX "i" +# define PRId8 "d" +# define PRId16 "d" +# define PRId32 "d" +# define PRId64 __PRI64_PREFIX "d" + +# define PRIdLEAST8 "d" +# define PRIdLEAST16 "d" +# define PRIdLEAST32 "d" +# define PRIdLEAST64 __PRI64_PREFIX "d" + +# define PRIdFAST8 "d" +# define PRIdFAST16 __PRIPTR_PREFIX "d" +# define PRIdFAST32 __PRIPTR_PREFIX "d" +# define PRIdFAST64 __PRI64_PREFIX "d" + +# define PRIi8 "i" +# define PRIi16 "i" +# define PRIi32 "i" +# define PRIi64 __PRI64_PREFIX "i" + +# define PRIiLEAST8 "i" +# define PRIiLEAST16 "i" +# define PRIiLEAST32 "i" +# define PRIiLEAST64 __PRI64_PREFIX "i" + +# define PRIiFAST8 "i" +# define PRIiFAST16 __PRIPTR_PREFIX "i" +# define PRIiFAST32 __PRIPTR_PREFIX "i" +# define PRIiFAST64 __PRI64_PREFIX "i" /* Octal notation. */ -# define PRIo8 "o" -# define PRIo16 "o" -# define PRIo32 "o" -# define PRIo64 __PRI64_PREFIX "o" +# define PRIo8 "o" +# define PRIo16 "o" +# define PRIo32 "o" +# define PRIo64 __PRI64_PREFIX "o" -# define PRIoLEAST8 "o" -# define PRIoLEAST16 "o" -# define PRIoLEAST32 "o" -# define PRIoLEAST64 __PRI64_PREFIX "o" +# define PRIoLEAST8 "o" +# define PRIoLEAST16 "o" +# define PRIoLEAST32 "o" +# define PRIoLEAST64 __PRI64_PREFIX "o" -# define PRIoFAST8 "o" -# define PRIoFAST16 __PRIPTR_PREFIX "o" -# define PRIoFAST32 __PRIPTR_PREFIX "o" -# define PRIoFAST64 __PRI64_PREFIX "o" +# define PRIoFAST8 "o" +# define PRIoFAST16 __PRIPTR_PREFIX "o" +# define PRIoFAST32 __PRIPTR_PREFIX "o" +# define PRIoFAST64 __PRI64_PREFIX "o" /* Unsigned integers. */ -# define PRIu8 "u" -# define PRIu16 "u" -# define PRIu32 "u" -# define PRIu64 __PRI64_PREFIX "u" +# define PRIu8 "u" +# define PRIu16 "u" +# define PRIu32 "u" +# define PRIu64 __PRI64_PREFIX "u" -# define PRIuLEAST8 "u" -# define PRIuLEAST16 "u" -# define PRIuLEAST32 "u" -# define PRIuLEAST64 __PRI64_PREFIX "u" +# define PRIuLEAST8 "u" +# define PRIuLEAST16 "u" +# define PRIuLEAST32 "u" +# define PRIuLEAST64 __PRI64_PREFIX "u" -# define PRIuFAST8 "u" -# define PRIuFAST16 __PRIPTR_PREFIX "u" -# define PRIuFAST32 __PRIPTR_PREFIX "u" -# define PRIuFAST64 __PRI64_PREFIX "u" +# define PRIuFAST8 "u" +# define PRIuFAST16 __PRIPTR_PREFIX "u" +# define PRIuFAST32 __PRIPTR_PREFIX "u" +# define PRIuFAST64 __PRI64_PREFIX "u" /* lowercase hexadecimal notation. */ -# define PRIx8 "x" -# define PRIx16 "x" -# define PRIx32 "x" -# define PRIx64 __PRI64_PREFIX "x" +# define PRIx8 "x" +# define PRIx16 "x" +# define PRIx32 "x" +# define PRIx64 __PRI64_PREFIX "x" -# define PRIxLEAST8 "x" -# define PRIxLEAST16 "x" -# define PRIxLEAST32 "x" -# define PRIxLEAST64 __PRI64_PREFIX "x" +# define PRIxLEAST8 "x" +# define PRIxLEAST16 "x" +# define PRIxLEAST32 "x" +# define PRIxLEAST64 __PRI64_PREFIX "x" -# define PRIxFAST8 "x" -# define PRIxFAST16 __PRIPTR_PREFIX "x" -# define PRIxFAST32 __PRIPTR_PREFIX "x" -# define PRIxFAST64 __PRI64_PREFIX "x" +# define PRIxFAST8 "x" +# define PRIxFAST16 __PRIPTR_PREFIX "x" +# define PRIxFAST32 __PRIPTR_PREFIX "x" +# define PRIxFAST64 __PRI64_PREFIX "x" /* UPPERCASE hexadecimal notation. */ -# define PRIX8 "X" -# define PRIX16 "X" -# define PRIX32 "X" -# define PRIX64 __PRI64_PREFIX "X" +# define PRIX8 "X" +# define PRIX16 "X" +# define PRIX32 "X" +# define PRIX64 __PRI64_PREFIX "X" -# define PRIXLEAST8 "X" -# define PRIXLEAST16 "X" -# define PRIXLEAST32 "X" -# define PRIXLEAST64 __PRI64_PREFIX "X" +# define PRIXLEAST8 "X" +# define PRIXLEAST16 "X" +# define PRIXLEAST32 "X" +# define PRIXLEAST64 __PRI64_PREFIX "X" -# define PRIXFAST8 "X" -# define PRIXFAST16 __PRIPTR_PREFIX "X" -# define PRIXFAST32 __PRIPTR_PREFIX "X" -# define PRIXFAST64 __PRI64_PREFIX "X" +# define PRIXFAST8 "X" +# define PRIXFAST16 __PRIPTR_PREFIX "X" +# define PRIXFAST32 __PRIPTR_PREFIX "X" +# define PRIXFAST64 __PRI64_PREFIX "X" /* Macros for printing `intmax_t' and `uintmax_t'. */ -# define PRIdMAX __PRI64_PREFIX "d" -# define PRIiMAX __PRI64_PREFIX "i" -# define PRIoMAX __PRI64_PREFIX "o" -# define PRIuMAX __PRI64_PREFIX "u" -# define PRIxMAX __PRI64_PREFIX "x" -# define PRIXMAX __PRI64_PREFIX "X" +# define PRIdMAX __PRI64_PREFIX "d" +# define PRIiMAX __PRI64_PREFIX "i" +# define PRIoMAX __PRI64_PREFIX "o" +# define PRIuMAX __PRI64_PREFIX "u" +# define PRIxMAX __PRI64_PREFIX "x" +# define PRIXMAX __PRI64_PREFIX "X" /* Macros for printing `intptr_t' and `uintptr_t'. */ -# define PRIdPTR __PRIPTR_PREFIX "d" -# define PRIiPTR __PRIPTR_PREFIX "i" -# define PRIoPTR __PRIPTR_PREFIX "o" -# define PRIuPTR __PRIPTR_PREFIX "u" -# define PRIxPTR __PRIPTR_PREFIX "x" -# define PRIXPTR __PRIPTR_PREFIX "X" +# define PRIdPTR __PRIPTR_PREFIX "d" +# define PRIiPTR __PRIPTR_PREFIX "i" +# define PRIoPTR __PRIPTR_PREFIX "o" +# define PRIuPTR __PRIPTR_PREFIX "u" +# define PRIxPTR __PRIPTR_PREFIX "x" +# define PRIXPTR __PRIPTR_PREFIX "X" #endif @@ -324,4 +325,3 @@ typedef unsigned long long uintptr_t; #endif #endif /* PMIX_STDINT_H */ - diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/prefetch.h b/opal/mca/pmix/pmix2x/pmix/src/include/prefetch.h similarity index 93% rename from opal/mca/pmix/pmix3x/pmix/src/include/prefetch.h rename to opal/mca/pmix/pmix2x/pmix/src/include/prefetch.h index 78fc3f49aeb..c01f31f748a 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/include/prefetch.h +++ b/opal/mca/pmix/pmix2x/pmix/src/include/prefetch.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2004-2006 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2014 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/include/types.h b/opal/mca/pmix/pmix2x/pmix/src/include/types.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/include/types.h rename to opal/mca/pmix/pmix2x/pmix/src/include/types.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/mca/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/mca/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/base/Makefile.am similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/Makefile.am index 948d687eed2..8de612d9282 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/base/Makefile.am @@ -10,6 +10,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/base/base.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/base.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/base.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/help-mca-base.txt b/opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-base.txt similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/help-mca-base.txt rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-base.txt index c0b82510767..32e00ef35a8 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/help-mca-base.txt +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-base.txt @@ -11,6 +11,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/help-mca-var.txt b/opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-var.txt similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/help-mca-var.txt rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-var.txt index b306c31ff90..9000837dd24 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/help-mca-var.txt +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-var.txt @@ -13,6 +13,7 @@ # Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2013 Los Alamos National Security, LLC. All rights # reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_close.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_close.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_close.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_close.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_compare.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_compare.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_compare.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_compare.c index e4c95070698..78ae2781a9d 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_compare.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_compare.c @@ -149,4 +149,3 @@ char * pmix_mca_base_component_to_string(const pmix_mca_base_component_t *a) { } return str; } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_find.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_find.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_find.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_find.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_repository.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_repository.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_repository.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_repository.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_repository.h b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_repository.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_component_repository.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_component_repository.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_close.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_close.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_close.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_close.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_open.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_open.c similarity index 83% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_open.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_open.c index 5489ab52595..63aa9f19974 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_open.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_open.c @@ -115,8 +115,8 @@ static int open_components(pmix_mca_base_framework_t *framework) "mca: base: components_open: found loaded component %s", component->pmix_mca_component_name); - if (NULL != component->pmix_mca_open_component) { - /* Call open if register didn't call it already */ + if (NULL != component->pmix_mca_open_component) { + /* Call open if register didn't call it already */ ret = component->pmix_mca_open_component(); if (PMIX_SUCCESS == ret) { @@ -125,37 +125,37 @@ static int open_components(pmix_mca_base_framework_t *framework) "component %s open function successful", component->pmix_mca_component_name); } else { - if (PMIX_ERR_NOT_AVAILABLE != ret) { - /* If the component returns PMIX_ERR_NOT_AVAILABLE, - it's a cue to "silently ignore me" -- it's not a - failure, it's just a way for the component to say - "nope!". - - Otherwise, however, display an error. We may end - up displaying this twice, but it may go to separate - streams. So better to be redundant than to not - display the error in the stream where it was - expected. */ - - if (pmix_mca_base_component_show_load_errors) { - pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_ERROR, output_id, + if (PMIX_ERR_NOT_AVAILABLE != ret) { + /* If the component returns PMIX_ERR_NOT_AVAILABLE, + it's a cue to "silently ignore me" -- it's not a + failure, it's just a way for the component to say + "nope!". + + Otherwise, however, display an error. We may end + up displaying this twice, but it may go to separate + streams. So better to be redundant than to not + display the error in the stream where it was + expected. */ + + if (pmix_mca_base_component_show_load_errors) { + pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_ERROR, output_id, "mca: base: components_open: component %s " "/ %s open function failed", component->pmix_mca_type_name, component->pmix_mca_component_name); - } - pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id, + } + pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_open: " "component %s open function failed", component->pmix_mca_component_name); - } + } pmix_mca_base_component_close (component, output_id); - pmix_list_remove_item (components, &cli->super); - PMIX_RELEASE(cli); - } - } + pmix_list_remove_item (components, &cli->super); + PMIX_RELEASE(cli); + } + } } /* All done */ diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_register.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_register.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_register.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_register.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_select.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_select.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_components_select.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_components_select.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_framework.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_framework.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_framework.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_framework.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_framework.h b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_framework.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_framework.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_framework.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_list.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_list.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_list.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_list.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_open.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_open.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_open.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_open.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_parse_paramfile.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_parse_paramfile.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_parse_paramfile.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_parse_paramfile.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var.c index 4e0b568b1fc..a54613d231f 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var.c @@ -2253,4 +2253,3 @@ int pmix_mca_base_var_dump(int vari, char ***out, pmix_mca_base_var_dump_type_t return PMIX_SUCCESS; } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.h b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_enum.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_enum.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_enum.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_enum.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_enum.h b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_enum.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_enum.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_enum.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_group.c b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_group.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_group.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_group.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_group.h b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_group.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_var_group.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_var_group.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_vari.h b/opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_vari.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/base/pmix_mca_base_vari.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_vari.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/mca.h b/opal/mca/pmix/pmix2x/pmix/src/mca/mca.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/mca.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/mca.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/Makefile.am similarity index 94% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/Makefile.am index fdd56a8e2ef..3e130185e0c 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/Makefile.am @@ -3,6 +3,7 @@ # University Research and Technology # Corporation. All rights reserved. # Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/Makefile.am similarity index 84% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/Makefile.am index efc770a274e..a38047a09d4 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/Makefile.am @@ -1,5 +1,6 @@ # # Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/base.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/base.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/base.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_close.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_close.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_close.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_close.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_fns.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_fns.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_fns.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_fns.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_open.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_open.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_open.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_open.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_select.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_select.c similarity index 96% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_select.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_select.c index e42db673be9..78b88f48f66 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/base/pdl_base_select.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/base/pdl_base_select.c @@ -4,6 +4,7 @@ * All rights reserved. * * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdl.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdl.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdl.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdl.h index e34ac5bd6b2..2d98c621bd5 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdl.h +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdl.h @@ -3,6 +3,7 @@ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/Makefile.am similarity index 91% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/Makefile.am index c2811eecd82..cd31f806790 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/Makefile.am @@ -2,6 +2,7 @@ # Copyright (c) 2004-2010 The Trustees of Indiana University. # All rights reserved. # Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_component.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_component.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_component.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_component.c index 8e061d5ca96..e93bc408ecb 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_component.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_component.c @@ -3,6 +3,7 @@ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_module.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_module.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_module.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pdl/pdlopen/pdl_pdlopen_module.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/base/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/base/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/base/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/base/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/base/base.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/base/base.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/base/base.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/base/pif_base_components.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/base/pif_base_components.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/base/pif_base_components.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/base/pif_base_components.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv4/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv4/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv4/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv4/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv4/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv4/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv4/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv4/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv4/pif_bsdx.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv4/pif_bsdx.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv4/pif_bsdx.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv4/pif_bsdx.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv6/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv6/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv6/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv6/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv6/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv6/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv6/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv6/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv6/pif_bsdx_ipv6.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv6/pif_bsdx_ipv6.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/bsdx_ipv6/pif_bsdx_ipv6.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/bsdx_ipv6/pif_bsdx_ipv6.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/linux_ipv6/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/linux_ipv6/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/linux_ipv6/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/linux_ipv6/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/linux_ipv6/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/linux_ipv6/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/linux_ipv6/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/linux_ipv6/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/linux_ipv6/pif_linux_ipv6.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/linux_ipv6/pif_linux_ipv6.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/linux_ipv6/pif_linux_ipv6.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/linux_ipv6/pif_linux_ipv6.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/pif.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/pif.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/pif.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/pif.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/posix_ipv4/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/posix_ipv4/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/posix_ipv4/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/posix_ipv4/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/posix_ipv4/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/posix_ipv4/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/posix_ipv4/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/posix_ipv4/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/posix_ipv4/pif_posix.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/posix_ipv4/pif_posix.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/posix_ipv4/pif_posix.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/posix_ipv4/pif_posix.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/solaris_ipv6/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/solaris_ipv6/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/solaris_ipv6/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/solaris_ipv6/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/solaris_ipv6/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/solaris_ipv6/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/solaris_ipv6/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/solaris_ipv6/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pif/solaris_ipv6/pif_solaris_ipv6.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pif/solaris_ipv6/pif_solaris_ipv6.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pif/solaris_ipv6/pif_solaris_ipv6.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pif/solaris_ipv6/pif_solaris_ipv6.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/Makefile.am similarity index 84% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/Makefile.am index 1617f5688c1..7f31473a174 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/Makefile.am @@ -1,6 +1,7 @@ # # Copyright (c) 2006 Los Alamos National Security, LLC. All rights # reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/base.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/base.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/base.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_components.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_components.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_components.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_components.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_expand.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_expand.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_expand.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/base/pinstalldirs_base_expand.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/configure.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/configure.m4 index 2f652e9c660..c057b438d02 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/configure.m4 +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/configure.m4 @@ -29,4 +29,3 @@ AC_DEFUN([MCA_pmix_pinstalldirs_config_CONFIG],[ AC_CONFIG_FILES([src/mca/pinstalldirs/config/Makefile src/mca/pinstalldirs/config/pinstall_dirs.h]) ]) - diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h new file mode 100644 index 00000000000..d97fa68eaea --- /dev/null +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2007 Los Alamos National Security, LLC. + * All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + * This file should be included by any file that needs the + * installation directories hard-coded into the object file. This + * should be avoided if at all possible, but there are some places + * (like the wrapper compilers) where it is infinitely easier to have + * the paths stored. + * + * If you have questions about which directory to use, we try as best + * we can to follow the GNU coding standards on this issue. The + * description of each directory can be found at the following URL: + * + * http://www.gnu.org/prep/standards/html_node/Directory-Variables.html + * + * The line below is to shut AC 2.60 up about datarootdir. Don't remove. + * datarootdir=foo + */ + +#ifndef PMIX_INST_DIRS_H +#define PMIX_INST_DIRS_H + +#define PMIX_INSTALL_PREFIX "/home/common/openmpi/build/foobar" +#define PMIX_EXEC_PREFIX "${prefix}" + +/* The directory for installing executable programs that users can + run. */ +#define PMIX_BINDIR "${exec_prefix}/bin" + +/* The directory for installing executable programs that can be run + from the shell, but are only generally useful to system + administrators. */ +#define PMIX_SBINDIR "${exec_prefix}/sbin" + +/* The directory for installing executable programs to be run by other + programs rather than by users. + + The definition of ‘libexecdir’ is the same for all packages, so + you should install your data in a subdirectory thereof. Most + packages install their data under $(libexecdir)/package-name/, + possibly within additional subdirectories thereof, such as + $(libexecdir)/package-name/machine/version. */ +#define PMIX_LIBEXECDIR "${exec_prefix}/libexec" + +/* The root of the directory tree for read-only + architecture-independent data files. + + See not about PMIX_DATADIR. And you probably want that one, not + this one. This is one of those "building block" paths, that is + really only used for defining other paths. */ +#define PMIX_DATAROOTDIR "${prefix}/share" + +/* The directory for installing idiosyncratic read-only + architecture-independent data files for this program. + + The definition of ‘datadir’ is the same for all packages, so you + should install your data in a subdirectory thereof. Most packages + install their data under $(datadir)/package-name/. */ +#define PMIX_DATADIR "${datarootdir}" + +/* $(datadir)/package-name/. You probably want to use this instead of + PMIX_DATADIR */ +#define PMIX_PKGDATADIR "${datadir}/pmix" + +/* The directory for installing read-only data files that pertain to a + single machine–that is to say, files for configuring a host. Mailer + and network configuration files, /etc/passwd, and so forth belong + here. All the files in this directory should be ordinary ASCII text + files. + + Do not install executables here in this directory (they probably + belong in $(libexecdir) or $(sbindir)). Also do not install files + that are modified in the normal course of their use (programs whose + purpose is to change the configuration of the system + excluded). Those probably belong in $(localstatedir). */ +#define PMIX_SYSCONFDIR "${prefix}/etc" + +/* The directory for installing architecture-independent data files + which the programs modify while they run. */ +#define PMIX_SHAREDSTATEDIR "${prefix}/com" + +/* The directory for installing data files which the programs modify + while they run, and that pertain to one specific machine. Users + should never need to modify files in this directory to configure + the package's operation; put such configuration information in + separate files that go in $(datadir) or + $(sysconfdir). */ +#define PMIX_LOCALSTATEDIR "${prefix}/var" + +/* The directory for object files and libraries of object code. Do not + install executables here, they probably ought to go in + $(libexecdir) instead. */ +#define PMIX_LIBDIR "${exec_prefix}/lib" + +/* $(libdir)/package-name/. This is where components should go */ +#define PMIX_PKGLIBDIR "${libdir}/pmix" + +/* The directory for installing header files to be included by user + programs with the C ‘#include’ preprocessor directive. */ +#define PMIX_INCLUDEDIR "${prefix}/include" + +/* $(includedir)/package-name/. The devel headers go in here */ +#define PMIX_PKGINCLUDEDIR "${includedir}/pmix" + +/* The directory for installing the Info files for this package. */ +#define PMIX_INFODIR "${datarootdir}/info" + +/* The top-level directory for installing the man pages (if any) for + this package. */ +#define PMIX_MANDIR "${datarootdir}/man" + +#endif diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h.in b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h.in similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h.in rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h.in diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/pmix_pinstalldirs_config.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pmix_pinstalldirs_config.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/pmix_pinstalldirs_config.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pmix_pinstalldirs_config.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/Makefile.am similarity index 87% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/Makefile.am index 61471d13922..cc22cf173a3 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/Makefile.am @@ -3,6 +3,7 @@ # reserved. # Copyright (c) 2009 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/configure.m4 similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/configure.m4 index 3fa7fa76741..47e18c3c51f 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/configure.m4 +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/configure.m4 @@ -27,4 +27,3 @@ AC_DEFUN([MCA_pmix_pinstalldirs_env_COMPILE_MODE], [ AC_DEFUN([MCA_pmix_pinstalldirs_env_CONFIG], [ AC_CONFIG_FILES([src/mca/pinstalldirs/env/Makefile]) ]) - diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/pmix_pinstalldirs_env.c b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/pmix_pinstalldirs_env.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/env/pmix_pinstalldirs_env.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/env/pmix_pinstalldirs_env.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/pinstalldirs.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/pinstalldirs.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/pinstalldirs.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/pinstalldirs.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/base.h b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/base.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/base.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/base.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/psec_base_fns.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/psec_base_fns.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/psec_base_fns.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/psec_base_fns.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/psec_base_frame.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/psec_base_frame.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/psec_base_frame.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/psec_base_frame.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/psec_base_select.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/psec_base_select.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/base/psec_base_select.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/base/psec_base_select.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/configure.m4 b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/configure.m4 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/configure.m4 rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/configure.m4 diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/psec_munge.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/psec_munge.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/psec_munge.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/psec_munge.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/psec_munge.h b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/psec_munge.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/psec_munge.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/psec_munge.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/psec_munge_component.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/psec_munge_component.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/munge/psec_munge_component.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/munge/psec_munge_component.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/psec_native.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/psec_native.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/psec_native.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/psec_native.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/psec_native.h b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/psec_native.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/psec_native.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/psec_native.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/psec_native_component.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/psec_native_component.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/native/psec_native_component.c rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/native/psec_native_component.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/mca/psec/psec.h b/opal/mca/pmix/pmix2x/pmix/src/mca/psec/psec.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/mca/psec/psec.h rename to opal/mca/pmix/pmix2x/pmix/src/mca/psec/psec.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/runtime/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/runtime/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/help-pmix-runtime.txt b/opal/mca/pmix/pmix2x/pmix/src/runtime/help-pmix-runtime.txt similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/help-pmix-runtime.txt rename to opal/mca/pmix/pmix2x/pmix/src/runtime/help-pmix-runtime.txt index 01b5a842273..5a4f222896a 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/runtime/help-pmix-runtime.txt +++ b/opal/mca/pmix/pmix2x/pmix/src/runtime/help-pmix-runtime.txt @@ -12,6 +12,7 @@ # All rights reserved. # Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. # Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_finalize.c b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_finalize.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_finalize.c rename to opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_finalize.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_init.c b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_init.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_init.c rename to opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_init.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_params.c b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_params.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_params.c rename to opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_params.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_progress_threads.c b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_progress_threads.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_progress_threads.c rename to opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_progress_threads.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_progress_threads.h b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_progress_threads.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_progress_threads.h rename to opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_progress_threads.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_rte.h b/opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_rte.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/runtime/pmix_rte.h rename to opal/mca/pmix/pmix2x/pmix/src/runtime/pmix_rte.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/server/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/server/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/server/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/help-pmix-server.txt b/opal/mca/pmix/pmix2x/pmix/src/server/help-pmix-server.txt similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/server/help-pmix-server.txt rename to opal/mca/pmix/pmix2x/pmix/src/server/help-pmix-server.txt diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/server/pmix_server.c rename to opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_get.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_get.c rename to opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_listener.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_listener.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_listener.c rename to opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_listener.c index 133a9baf97f..871d0ecc964 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_listener.c +++ b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_listener.c @@ -970,4 +970,3 @@ static void tool_handler(int sd, short flags, void* cbdata) PMIX_RELEASE(pnd); } } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_ops.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.c rename to opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_ops.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.h b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_ops.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.h rename to opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_ops.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_regex.c b/opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_regex.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_regex.c rename to opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_regex.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/sm/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/sm/Makefile.include similarity index 82% rename from opal/mca/pmix/pmix3x/pmix/src/sm/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/sm/Makefile.include index 9ce63027d2b..968aaf021a4 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/sm/Makefile.include +++ b/opal/mca/pmix/pmix2x/pmix/src/sm/Makefile.include @@ -1,6 +1,7 @@ # # Copyright (c) 2016 Mellanox Technologies, Inc. # All rights reserved. +# Copyright (c) 2016 Intel, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_mmap.c b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_mmap.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/sm/pmix_mmap.c rename to opal/mca/pmix/pmix2x/pmix/src/sm/pmix_mmap.c index 7b301808f85..b018c4714f0 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_mmap.c +++ b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_mmap.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2015-2016 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_mmap.h b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_mmap.h similarity index 86% rename from opal/mca/pmix/pmix3x/pmix/src/sm/pmix_mmap.h rename to opal/mca/pmix/pmix2x/pmix/src/sm/pmix_mmap.h index 349fb10c01d..ccebf28c609 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_mmap.h +++ b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_mmap.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2015-2016 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_sm.c b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_sm.c similarity index 96% rename from opal/mca/pmix/pmix3x/pmix/src/sm/pmix_sm.c rename to opal/mca/pmix/pmix2x/pmix/src/sm/pmix_sm.c index 26769267d0c..1762e5ccba5 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_sm.c +++ b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_sm.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2015-2016 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_sm.h b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_sm.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/sm/pmix_sm.h rename to opal/mca/pmix/pmix2x/pmix/src/sm/pmix_sm.h index 4e2495950ac..31b832834f3 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/sm/pmix_sm.h +++ b/opal/mca/pmix/pmix2x/pmix/src/sm/pmix_sm.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2015-2016 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/tool/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/tool/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/tool/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/tool/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/tool/pmix_tool.c b/opal/mca/pmix/pmix2x/pmix/src/tool/pmix_tool.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/tool/pmix_tool.c rename to opal/mca/pmix/pmix2x/pmix/src/tool/pmix_tool.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/usock/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/usock/Makefile.am similarity index 82% rename from opal/mca/pmix/pmix3x/pmix/src/usock/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/usock/Makefile.am index d26a6dd248e..a9026a2da83 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/usock/Makefile.am +++ b/opal/mca/pmix/pmix2x/pmix/src/usock/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (c) 2014-2015 Intel, Inc. All rights reserved. +# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. # Copyright (c) 2014 Artem Y. Polyakov . # All rights reserved. # $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/src/usock/usock.c b/opal/mca/pmix/pmix2x/pmix/src/usock/usock.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/usock/usock.c rename to opal/mca/pmix/pmix2x/pmix/src/usock/usock.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/usock/usock.h b/opal/mca/pmix/pmix2x/pmix/src/usock/usock.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/usock/usock.h rename to opal/mca/pmix/pmix2x/pmix/src/usock/usock.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/usock/usock_sendrecv.c b/opal/mca/pmix/pmix2x/pmix/src/usock/usock_sendrecv.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/usock/usock_sendrecv.c rename to opal/mca/pmix/pmix2x/pmix/src/usock/usock_sendrecv.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/Makefile.include b/opal/mca/pmix/pmix2x/pmix/src/util/Makefile.include similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/Makefile.include rename to opal/mca/pmix/pmix2x/pmix/src/util/Makefile.include diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/argv.c b/opal/mca/pmix/pmix2x/pmix/src/util/argv.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/argv.c rename to opal/mca/pmix/pmix2x/pmix/src/util/argv.c index 06d3d005e75..f5c08f80a0c 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/argv.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/argv.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2007 Voltaire. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -209,7 +209,7 @@ static char **pmix_argv_split_inter(const char *src_string, int delimiter, else if ('\0' == *p) { if (PMIX_SUCCESS != pmix_argv_append(&argc, &argv, src_string)) - return NULL; + return NULL; src_string = p; continue; } @@ -219,14 +219,14 @@ static char **pmix_argv_split_inter(const char *src_string, int delimiter, else if (arglen > (ARGSIZE - 1)) { argtemp = (char*) malloc(arglen + 1); if (NULL == argtemp) - return NULL; + return NULL; strncpy(argtemp, src_string, arglen); argtemp[arglen] = '\0'; if (PMIX_SUCCESS != pmix_argv_append(&argc, &argv, argtemp)) { - free(argtemp); - return NULL; + free(argtemp); + return NULL; } free(argtemp); @@ -239,7 +239,7 @@ static char **pmix_argv_split_inter(const char *src_string, int delimiter, arg[arglen] = '\0'; if (PMIX_SUCCESS != pmix_argv_append(&argc, &argv, arg)) - return NULL; + return NULL; } src_string = p + 1; diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/argv.h b/opal/mca/pmix/pmix2x/pmix/src/util/argv.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/util/argv.h rename to opal/mca/pmix/pmix2x/pmix/src/util/argv.h index d4edd198bb9..08ba066c406 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/argv.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/argv.h @@ -13,7 +13,7 @@ * All rights reserved. * Copyright (c) 2007 Voltaire. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/basename.c b/opal/mca/pmix/pmix2x/pmix/src/util/basename.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/basename.c rename to opal/mca/pmix/pmix2x/pmix/src/util/basename.c index 64e5c27e7e9..69dd1ed61cd 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/basename.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/basename.c @@ -12,7 +12,7 @@ * Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/basename.h b/opal/mca/pmix/pmix2x/pmix/src/util/basename.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/basename.h rename to opal/mca/pmix/pmix2x/pmix/src/util/basename.h index 55d29413b48..ea4d299b155 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/basename.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/basename.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix2x/pmix/src/util/crc.c b/opal/mca/pmix/pmix2x/pmix/src/util/crc.c new file mode 100644 index 00000000000..5045e4509c0 --- /dev/null +++ b/opal/mca/pmix/pmix2x/pmix/src/util/crc.c @@ -0,0 +1,1205 @@ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2006 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + + +#include + + +#ifdef HAVE_STDIO_H +#include +#endif /* HAVE_STDIO_H */ +#ifdef HAVE_STDLIB_H +#include +#endif /* HAVE_STDLIB_H */ +#ifdef HAVE_STRINGS_H +#include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_STRING_H +#include +#endif /* HAVE_STRING_H */ +#ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ + +#include "src/util/crc.h" + + +#if (PMIX_ALIGNMENT_LONG == 8) +#define PMIX_CRC_WORD_MASK_ 0x7 +#elif (PMIX_ALIGNMENT_LONG == 4) +#define PMIX_CRC_WORD_MASK_ 0x3 +#else +#define PMIX_CRC_WORD_MASK_ 0xFFFF +#endif + + +#define WORDALIGNED(v) \ + (((intptr_t)v & PMIX_CRC_WORD_MASK_) ? false : true) + + +#define INTALIGNED(v) \ + (((intptr_t)v & 3) ? false : true) + +/* + * this version of bcopy_csum() looks a little too long, but it + * handles cumulative checksumming for arbitrary lengths and address + * alignments as best as it can; the contents of lastPartialLong and + * lastPartialLength are updated to reflected the last partial word's + * value and length (in bytes) -- this should allow proper handling of + * checksumming contiguous or noncontiguous buffers via multiple calls + * of bcopy_csum() - Mitch + */ + +unsigned long +pmix_bcopy_csum_partial ( + const void * source, + void * destination, + size_t copylen, + size_t csumlen, + unsigned long * lastPartialLong, + size_t* lastPartialLength + ) +{ + unsigned long * src = (unsigned long *) source; + unsigned long * dest = (unsigned long *) destination; + unsigned long csum = 0; + size_t csumlenresidue; + unsigned long i, temp; + + csumlenresidue = (csumlen > copylen) ? (csumlen - copylen) : 0; + temp = *lastPartialLong; + + if (WORDALIGNED(source) && WORDALIGNED(dest)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned long) - *lastPartialLength)); + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); + csum += (temp - *lastPartialLong); + copylen -= sizeof(unsigned long) - *lastPartialLength; + /* now we have an unaligned source and an unaligned destination */ + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLength = 0; + *lastPartialLong = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned long *)((char *)src + copylen); + dest = (unsigned long *)((char *)dest + copylen); + csum += (temp - *lastPartialLong); + *lastPartialLong = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { /* fast path... */ + size_t numLongs = copylen/sizeof(unsigned long); + for(i = 0; i < numLongs; i++) { + csum += *src; + *dest++ = *src++; + } + *lastPartialLong = 0; + *lastPartialLength = 0; + if (WORDALIGNED(copylen) && (csumlenresidue == 0)) { + return(csum); + } + else { + copylen -= i * sizeof(unsigned long); + } + } + } else if (WORDALIGNED(source)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned long) - *lastPartialLength)); + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); + csum += (temp - *lastPartialLong); + copylen -= sizeof(unsigned long) - *lastPartialLength; + /* now we have an unaligned source and an unknown alignment for our destination */ + if (WORDALIGNED(dest)) { + size_t numLongs = copylen/sizeof(unsigned long); + for(i = 0; i < numLongs; i++) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + *dest++ = temp; + } + copylen -= i * sizeof(unsigned long); + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + } + *lastPartialLong = 0; + *lastPartialLength = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned long *)((char *)src + copylen); + dest = (unsigned long *)((char *)dest + copylen); + csum += (temp - *lastPartialLong); + *lastPartialLong = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + temp = *src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLong = 0; + *lastPartialLength = 0; + } + } else if (WORDALIGNED(dest)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned long) - *lastPartialLength)); + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); + csum += (temp - *lastPartialLong); + copylen -= sizeof(unsigned long) - *lastPartialLength; + /* now we have a source of unknown alignment and a unaligned destination */ + if (WORDALIGNED(src)) { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + temp = *src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLong = 0; + *lastPartialLength = 0; + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLength = 0; + *lastPartialLong = 0; + } + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned long *)((char *)src + copylen); + dest = (unsigned long *)((char *)dest + copylen); + csum += (temp - *lastPartialLong); + *lastPartialLong = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + *dest++ = temp; + } + *lastPartialLength = 0; + *lastPartialLong = 0; + } + } else { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned long) - *lastPartialLength)); + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); + csum += (temp - *lastPartialLong); + copylen -= sizeof(unsigned long) - *lastPartialLength; + /* now we have an unknown alignment for our source and destination */ + if (WORDALIGNED(src) && WORDALIGNED(dest)) { + size_t numLongs = copylen/sizeof(unsigned long); + for(i = 0; i < numLongs; i++) { + csum += *src; + *dest++ = *src++; + } + copylen -= i * sizeof(unsigned long); + } + else { /* safe but slower for all other alignments */ + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + } + *lastPartialLong = 0; + *lastPartialLength = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned long *)((char *)src + copylen); + dest = (unsigned long *)((char *)dest + copylen); + csum += (temp - *lastPartialLong); + *lastPartialLong = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLength = 0; + *lastPartialLong = 0; + } + } + + /* if copylen is non-zero there was a bit left, less than an unsigned long's worth */ + if ((copylen != 0) && (csumlenresidue == 0)) { + temp = *lastPartialLong; + if (*lastPartialLength) { + if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { + /* copy all remaining bytes from src to dest */ + unsigned long copytemp = 0; + memcpy(©temp, src, copylen); + memcpy(dest, ©temp, copylen); + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + /* avoid unsigned arithmetic overflow by subtracting the old partial + * word from the new one before adding to the checksum... + */ + csum += (temp - *lastPartialLong); + copylen -= sizeof(unsigned long) - *lastPartialLength; + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + *lastPartialLength = copylen; + /* reset temp, and calculate next partial word */ + temp = 0; + if (copylen) { + memcpy(&temp, src, copylen); + } + /* add it to the the checksum */ + csum += temp; + *lastPartialLong = temp; + } + else { + /* copy all remaining bytes from src to dest */ + unsigned long copytemp = 0; + memcpy(©temp, src, copylen); + memcpy(dest, ©temp, copylen); + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + copylen); + /* avoid unsigned arithmetic overflow by subtracting the old partial + * word from the new one before adding to the checksum... + */ + csum += temp - *lastPartialLong; + *lastPartialLong = temp; + *lastPartialLength += copylen; + } + } + else { /* fast path... */ + /* temp and *lastPartialLong are 0 if *lastPartialLength is 0... */ + memcpy(&temp, src, copylen); + csum += temp; + memcpy(dest, &temp, copylen); + *lastPartialLong = temp; + *lastPartialLength = copylen; + /* done...return the checksum */ + } + } + else if (csumlenresidue != 0) { + if (copylen != 0) { + temp = 0; + memcpy(&temp, src, copylen); + memcpy(dest, &temp, copylen); + } + if (csumlenresidue < (sizeof(unsigned long) - copylen - *lastPartialLength)) { + temp = *lastPartialLong; + memcpy(((char *)&temp + *lastPartialLength), src, (copylen + csumlenresidue)); + /* avoid unsigned arithmetic overflow by subtracting the old partial */ + /* word from the new one before adding to the checksum... */ + csum += temp - *lastPartialLong; + src++; + *lastPartialLong = temp; + *lastPartialLength += copylen + csumlenresidue; + csumlenresidue = 0; + } + else { + /* we have enough chksum data to fill out our last partial */ + /* word */ + temp = *lastPartialLong; + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + /* avoid unsigned arithmetic overflow by subtracting the old partial */ + /* word from the new one before adding to the checksum... */ + csum += temp - *lastPartialLong; + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + csumlenresidue -= sizeof(unsigned long) - *lastPartialLength - copylen; + *lastPartialLength = 0; + *lastPartialLong = 0; + } + if (WORDALIGNED(src)) { + for (i = 0; i < csumlenresidue/sizeof(unsigned long); i++) { + csum += *src++; + } + } + else { + for (i = 0; i < csumlenresidue/sizeof(unsigned long); i++) { + memcpy(&temp, src, sizeof(temp)); + csum += temp; + src++; + } + } + csumlenresidue -= i * sizeof(unsigned long); + if (csumlenresidue) { + temp = 0; + memcpy(&temp, src, csumlenresidue); + csum += temp; + *lastPartialLong = temp; + *lastPartialLength = csumlenresidue; + } + } /* end else if (csumlenresidue != 0) */ + + return csum; +} + +unsigned int +pmix_bcopy_uicsum_partial ( + const void * source, + void * destination, + size_t copylen, + size_t csumlen, + unsigned int* lastPartialInt, + size_t* lastPartialLength + ) +{ + unsigned int * src = (unsigned int *) source; + unsigned int * dest = (unsigned int *) destination; + unsigned int csum = 0; + size_t csumlenresidue; + unsigned long i; + unsigned int temp; + + csumlenresidue = (csumlen > copylen) ? (csumlen - copylen) : 0; + temp = *lastPartialInt; + + if (INTALIGNED(source) && INTALIGNED(dest)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned int) - *lastPartialLength)); + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); + csum += (temp - *lastPartialInt); + copylen -= sizeof(unsigned int) - *lastPartialLength; + /* now we have an unaligned source and an unaligned destination */ + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLength = 0; + *lastPartialInt = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned int *)((char *)src + copylen); + dest = (unsigned int *)((char *)dest + copylen); + csum += (temp - *lastPartialInt); + *lastPartialInt = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { /* fast path... */ + size_t numLongs = copylen/sizeof(unsigned int); + for(i = 0; i < numLongs; i++) { + csum += *src; + *dest++ = *src++; + } + *lastPartialInt = 0; + *lastPartialLength = 0; + if (INTALIGNED(copylen) && (csumlenresidue == 0)) { + return(csum); + } + else { + copylen -= i * sizeof(unsigned int); + } + } + } else if (INTALIGNED(source)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned int) - *lastPartialLength)); + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); + csum += (temp - *lastPartialInt); + copylen -= sizeof(unsigned int) - *lastPartialLength; + /* now we have an unaligned source and an unknown alignment for our destination */ + if (INTALIGNED(dest)) { + size_t numLongs = copylen/sizeof(unsigned int); + for(i = 0; i < numLongs; i++) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + *dest++ = temp; + } + copylen -= i * sizeof(unsigned int); + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + } + *lastPartialInt = 0; + *lastPartialLength = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned int *)((char *)src + copylen); + dest = (unsigned int *)((char *)dest + copylen); + csum += (temp - *lastPartialInt); + *lastPartialInt = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + temp = *src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialInt = 0; + *lastPartialLength = 0; + } + } else if (INTALIGNED(dest)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned int) - *lastPartialLength)); + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); + csum += (temp - *lastPartialInt); + copylen -= sizeof(unsigned int) - *lastPartialLength; + /* now we have a source of unknown alignment and a unaligned destination */ + if (INTALIGNED(src)) { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + temp = *src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialInt = 0; + *lastPartialLength = 0; + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLength = 0; + *lastPartialInt = 0; + } + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned int *)((char *)src + copylen); + dest = (unsigned int *)((char *)dest + copylen); + csum += (temp - *lastPartialInt); + *lastPartialInt = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + *dest++ = temp; + } + *lastPartialLength = 0; + *lastPartialInt = 0; + } + } else { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + memcpy(dest, ((char *)&temp + *lastPartialLength), + (sizeof(unsigned int) - *lastPartialLength)); + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); + csum += (temp - *lastPartialInt); + copylen -= sizeof(unsigned int) - *lastPartialLength; + /* now we have an unknown alignment for our source and destination */ + if (INTALIGNED(src) && INTALIGNED(dest)) { + size_t numLongs = copylen/sizeof(unsigned int); + for(i = 0; i < numLongs; i++) { + csum += *src; + *dest++ = *src++; + } + copylen -= i * sizeof(unsigned int); + } + else { /* safe but slower for all other alignments */ + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + } + *lastPartialInt = 0; + *lastPartialLength = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, copylen); + memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); + src = (unsigned int *)((char *)src + copylen); + dest = (unsigned int *)((char *)dest + copylen); + csum += (temp - *lastPartialInt); + *lastPartialInt = temp; + *lastPartialLength += copylen; + copylen = 0; + } + } + else { + for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + memcpy(dest, &temp, sizeof(temp)); + dest++; + } + *lastPartialLength = 0; + *lastPartialInt = 0; + } + } + + /* if copylen is non-zero there was a bit left, less than an unsigned int's worth */ + if ((copylen != 0) && (csumlenresidue == 0)) { + temp = *lastPartialInt; + if (*lastPartialLength) { + if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { + /* copy all remaining bytes from src to dest */ + unsigned int copytemp = 0; + memcpy(©temp, src, copylen); + memcpy(dest, ©temp, copylen); + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + /* avoid unsigned arithmetic overflow by subtracting the old partial + * word from the new one before adding to the checksum... + */ + csum += (temp - *lastPartialInt); + copylen -= sizeof(unsigned int) - *lastPartialLength; + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + *lastPartialLength = copylen; + /* reset temp, and calculate next partial word */ + temp = 0; + if (copylen) { + memcpy(&temp, src, copylen); + } + /* add it to the the checksum */ + csum += temp; + *lastPartialInt = temp; + } + else { + /* copy all remaining bytes from src to dest */ + unsigned int copytemp = 0; + memcpy(©temp, src, copylen); + memcpy(dest, ©temp, copylen); + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + copylen); + /* avoid unsigned arithmetic overflow by subtracting the old partial + * word from the new one before adding to the checksum... + */ + csum += temp - *lastPartialInt; + *lastPartialInt = temp; + *lastPartialLength += copylen; + } + } + else { /* fast path... */ + /* temp and *lastPartialInt are 0 if *lastPartialLength is 0... */ + memcpy(&temp, src, copylen); + csum += temp; + memcpy(dest, &temp, copylen); + *lastPartialInt = temp; + *lastPartialLength = copylen; + /* done...return the checksum */ + } + } + else if (csumlenresidue != 0) { + if (copylen != 0) { + temp = 0; + memcpy(&temp, src, copylen); + memcpy(dest, &temp, copylen); + } + if (csumlenresidue < (sizeof(unsigned int) - copylen - *lastPartialLength)) { + temp = *lastPartialInt; + memcpy(((char *)&temp + *lastPartialLength), src, (copylen + csumlenresidue)); + /* avoid unsigned arithmetic overflow by subtracting the old partial + * word from the new one before adding to the checksum... + */ + csum += temp - *lastPartialInt; + src++; + *lastPartialInt = temp; + *lastPartialLength += copylen + csumlenresidue; + csumlenresidue = 0; + } + else { + /* we have enough chksum data to fill out our last partial + * word + */ + temp = *lastPartialInt; + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + /* avoid unsigned arithmetic overflow by subtracting the old partial + * word from the new one before adding to the checksum... + */ + csum += temp - *lastPartialInt; + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + csumlenresidue -= sizeof(unsigned int) - *lastPartialLength - copylen; + *lastPartialLength = 0; + *lastPartialInt = 0; + } + if (INTALIGNED(src)) { + for (i = 0; i < csumlenresidue/sizeof(unsigned int); i++) { + csum += *src++; + } + } + else { + for (i = 0; i < csumlenresidue/sizeof(unsigned int); i++) { + memcpy(&temp, src, sizeof(temp)); + csum += temp; + src++; + } + } + csumlenresidue -= i * sizeof(unsigned int); + if (csumlenresidue) { + temp = 0; + memcpy(&temp, src, csumlenresidue); + csum += temp; + *lastPartialInt = temp; + *lastPartialLength = csumlenresidue; + } + } /* end else if (csumlenresidue != 0) */ + + return csum; +} + + +/* + * csum() generates a bcopy_csum() - compatible checksum that can be + * called multiple times + */ + +unsigned long +pmix_csum_partial ( + const void * source, + size_t csumlen, + unsigned long* lastPartialLong, + size_t* lastPartialLength + ) +{ + unsigned long * src = (unsigned long *) source; + unsigned long csum = 0; + unsigned long i, temp; + + + + temp = *lastPartialLong; + + if (WORDALIGNED(source)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (csumlen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + csum += (temp - *lastPartialLong); + csumlen -= sizeof(unsigned long) - *lastPartialLength; + /* now we have an unaligned source */ + for(i = 0; i < csumlen/sizeof(unsigned long); i++) { + memcpy(&temp, src, sizeof(temp)); + csum += temp; + src++; + } + csumlen -= i * sizeof(unsigned long); + *lastPartialLong = 0; + *lastPartialLength = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, csumlen); + src = (unsigned long *)((char *)src + csumlen); + csum += (temp - *lastPartialLong); + *lastPartialLong = temp; + *lastPartialLength += csumlen; + csumlen = 0; + } + } + else { /* fast path... */ + size_t numLongs = csumlen/sizeof(unsigned long); + for(i = 0; i < numLongs; i++) { + csum += *src++; + } + *lastPartialLong = 0; + *lastPartialLength = 0; + if (WORDALIGNED(csumlen)) { + return(csum); + } + else { + csumlen -= i * sizeof(unsigned long); + } + } + } else { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (csumlen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + csum += (temp - *lastPartialLong); + csumlen -= sizeof(unsigned long) - *lastPartialLength; + /* now we have a source of unknown alignment */ + if (WORDALIGNED(src)) { + for(i = 0; i < csumlen/sizeof(unsigned long); i++) { + csum += *src++; + } + csumlen -= i * sizeof(unsigned long); + *lastPartialLong = 0; + *lastPartialLength = 0; + } + else { + for(i = 0; i < csumlen/sizeof(unsigned long); i++) { + memcpy(&temp, src, sizeof(temp)); + csum += temp; + src++; + } + csumlen -= i * sizeof(unsigned long); + *lastPartialLong = 0; + *lastPartialLength = 0; + } + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, csumlen); + src = (unsigned long *)((char *)src + csumlen); + csum += (temp - *lastPartialLong); + *lastPartialLong = temp; + *lastPartialLength += csumlen; + csumlen = 0; + } + } + else { + for( ;csumlen >= sizeof(*src); csumlen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + } + *lastPartialLength = 0; + *lastPartialLong = 0; + } + } + + /* if csumlen is non-zero there was a bit left, less than an unsigned long's worth */ + if (csumlen != 0) { + temp = *lastPartialLong; + if (*lastPartialLength) { + if (csumlen >= (sizeof(unsigned long) - *lastPartialLength)) { + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned long) - *lastPartialLength)); + csum += (temp - *lastPartialLong); + csumlen -= sizeof(unsigned long) - *lastPartialLength; + src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); + *lastPartialLength = csumlen; + /* reset temp, and calculate next partial word */ + temp = 0; + if (csumlen) { + memcpy(&temp, src, csumlen); + } + /* add it to the the checksum */ + csum += temp; + *lastPartialLong = temp; + } + else { + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + csumlen); + csum += (temp - *lastPartialLong); + *lastPartialLong = temp; + *lastPartialLength += csumlen; + } + } + else { /* fast path... */ + /* temp and *lastPartialLong are 0 if *lastPartialLength is 0... */ + memcpy(&temp, src, csumlen); + csum += temp; + *lastPartialLong = temp; + *lastPartialLength = csumlen; + /* done...return the checksum */ + } + } + + return csum; +} + +unsigned int +pmix_uicsum_partial ( + const void * source, + size_t csumlen, + unsigned int* lastPartialInt, + size_t* lastPartialLength + ) +{ + unsigned int * src = (unsigned int *) source; + unsigned int csum = 0; + unsigned int temp; + unsigned long i; + + + temp = *lastPartialInt; + + if (INTALIGNED(source)) { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (csumlen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + csum += (temp - *lastPartialInt); + csumlen -= sizeof(unsigned int) - *lastPartialLength; + /* now we have an unaligned source */ + for(i = 0; i < csumlen/sizeof(unsigned int); i++) { + memcpy(&temp, src, sizeof(temp)); + csum += temp; + src++; + } + csumlen -= i * sizeof(unsigned int); + *lastPartialInt = 0; + *lastPartialLength = 0; + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, csumlen); + src = (unsigned int *)((char *)src + csumlen); + csum += (temp - *lastPartialInt); + *lastPartialInt = temp; + *lastPartialLength += csumlen; + csumlen = 0; + } + } + else { /* fast path... */ + size_t numLongs = csumlen/sizeof(unsigned int); + for(i = 0; i < numLongs; i++) { + csum += *src++; + } + *lastPartialInt = 0; + *lastPartialLength = 0; + if (INTALIGNED(csumlen)) { + return(csum); + } + else { + csumlen -= i * sizeof(unsigned int); + } + } + } else { + if (*lastPartialLength) { + /* do we have enough data to fill out the partial word? */ + if (csumlen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + csum += (temp - *lastPartialInt); + csumlen -= sizeof(unsigned int) - *lastPartialLength; + /* now we have a source of unknown alignment */ + if (INTALIGNED(src)) { + for(i = 0; i < csumlen/sizeof(unsigned int); i++) { + csum += *src++; + } + csumlen -= i * sizeof(unsigned int); + *lastPartialInt = 0; + *lastPartialLength = 0; + } + else { + for(i = 0; i < csumlen/sizeof(unsigned int); i++) { + memcpy(&temp, src, sizeof(temp)); + csum += temp; + src++; + } + csumlen -= i * sizeof(unsigned int); + *lastPartialInt = 0; + *lastPartialLength = 0; + } + } + else { /* NO, we don't... */ + memcpy(((char *)&temp + *lastPartialLength), src, csumlen); + src = (unsigned int *)((char *)src + csumlen); + csum += (temp - *lastPartialInt); + *lastPartialInt = temp; + *lastPartialLength += csumlen; + csumlen = 0; + } + } + else { + for( ;csumlen >= sizeof(*src); csumlen -= sizeof(*src)) { + memcpy(&temp, src, sizeof(temp)); + src++; + csum += temp; + } + *lastPartialLength = 0; + *lastPartialInt = 0; + } + } + + /* if csumlen is non-zero there was a bit left, less than an unsigned int's worth */ + if (csumlen != 0) { + temp = *lastPartialInt; + if (*lastPartialLength) { + if (csumlen >= (sizeof(unsigned int) - *lastPartialLength)) { + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + (sizeof(unsigned int) - *lastPartialLength)); + csum += (temp - *lastPartialInt); + csumlen -= sizeof(unsigned int) - *lastPartialLength; + src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); + *lastPartialLength = csumlen; + /* reset temp, and calculate next partial word */ + temp = 0; + if (csumlen) { + memcpy(&temp, src, csumlen); + } + /* add it to the the checksum */ + csum += temp; + *lastPartialInt = temp; + } + else { + /* fill out rest of partial word and add to checksum */ + memcpy(((char *)&temp + *lastPartialLength), src, + csumlen); + csum += (temp - *lastPartialInt); + *lastPartialInt = temp; + *lastPartialLength += csumlen; + } + } + else { /* fast path... */ + /* temp and *lastPartialInt are 0 if *lastPartialLength is 0... */ + memcpy(&temp, src, csumlen); + csum += temp; + *lastPartialInt = temp; + *lastPartialLength = csumlen; + /* done...return the checksum */ + } + } + + return csum; +} + +/* globals for CRC32 bcopy and calculation routines */ + +static bool _pmix_crc_table_initialized = false; +static unsigned int _pmix_crc_table[256]; + +/* CRC32 table generation routine - thanks to Charles Michael Heard for his + * optimized CRC32 code... + */ + +void pmix_initialize_crc_table(void) +{ + register int i,j; + register unsigned int crc_accum; + + for (i = 0; i < 256; i++) { + crc_accum = (i << 24); + for (j = 0; j < 8; j++) { + if (crc_accum & 0x80000000) + crc_accum = (crc_accum << 1) ^ CRC_POLYNOMIAL; + else + crc_accum = (crc_accum << 1); + } + _pmix_crc_table[i] = crc_accum; + } + + /* set global bool to true to do this work once! */ + _pmix_crc_table_initialized = true; + return; +} + +unsigned int pmix_bcopy_uicrc_partial( + const void * source, + void * destination, + size_t copylen, + size_t crclen, + unsigned int partial_crc) +{ + size_t crclenresidue = (crclen > copylen) ? (crclen - copylen) : 0; + register int i, j; + register unsigned char t; + unsigned int tmp; + + if (!_pmix_crc_table_initialized) { + pmix_initialize_crc_table(); + } + + if (INTALIGNED(source) && INTALIGNED(destination)) { + register unsigned int * src = (unsigned int *)source; + register unsigned int * dst = (unsigned int *)destination; + register unsigned char *ts, *td; + /* copy whole integers */ + while (copylen >= sizeof(unsigned int)) { + tmp = *src++; + *dst++ = tmp; + ts = (unsigned char *)&tmp; + for (j = 0; j < (int)sizeof(unsigned int); j++) { + i = ((partial_crc >> 24) ^ *ts++) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + copylen -= sizeof(unsigned int); + } + ts = (unsigned char *)src; + td = (unsigned char *)dst; + /* copy partial integer */ + while (copylen--) { + t = *ts++; + *td++ = t; + i = ((partial_crc >> 24) ^ t) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + /* calculate CRC over remaining bytes... */ + while (crclenresidue--) { + i = ((partial_crc >> 24) ^ *ts++) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + } + else { + register unsigned char * src = (unsigned char *)source; + register unsigned char * dst = (unsigned char *)destination; + while (copylen--) { + t = *src++; + *dst++ = t; + i = ((partial_crc >> 24) ^ t) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + while (crclenresidue--) { + i = ((partial_crc >> 24) ^ *src++) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + } + + return partial_crc; +} + + +unsigned int pmix_uicrc_partial( + const void * source, size_t crclen, unsigned int partial_crc) +{ + register int i, j; + register unsigned char * t; + unsigned int tmp; + + if (!_pmix_crc_table_initialized) { + pmix_initialize_crc_table(); + } + + if (INTALIGNED(source)) { + register unsigned int * src = (unsigned int *)source; + while (crclen >= sizeof(unsigned int)) { + tmp = *src++; + t = (unsigned char *)&tmp; + for (j = 0; j < (int)sizeof(unsigned int); j++) { + i = ((partial_crc >> 24) ^ *t++) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + crclen -= sizeof(unsigned int); + } + t = (unsigned char *)src; + while (crclen--) { + i = ((partial_crc >> 24) ^ *t++) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + } + else { + register unsigned char * src = (unsigned char *)source; + while (crclen--) { + i = ((partial_crc >> 24) ^ *src++) & 0xff; + partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; + } + } + + return partial_crc; +} diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/crc.h b/opal/mca/pmix/pmix2x/pmix/src/util/crc.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/crc.h rename to opal/mca/pmix/pmix2x/pmix/src/util/crc.h index d04bbdefba6..ed1e43d01c2 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/crc.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/crc.h @@ -12,7 +12,7 @@ * Copyright (c) 2009 IBM Corporation. All rights reserved. * Copyright (c) 2009 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -114,7 +114,7 @@ pmix_csum16 (const void * source, size_t csumlen) register uint32_t csum = 0; while (csumlen > 1) { - csum += *src++; + csum += *src++; csumlen -= 2; } /* Add leftover byte, if any */ @@ -183,4 +183,3 @@ pmix_uicrc(const void * source, size_t crclen) END_C_DECLS #endif - diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/error.c b/opal/mca/pmix/pmix2x/pmix/src/util/error.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/error.c rename to opal/mca/pmix/pmix2x/pmix/src/util/error.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/error.h b/opal/mca/pmix/pmix2x/pmix/src/util/error.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/error.h rename to opal/mca/pmix/pmix2x/pmix/src/util/error.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/fd.c b/opal/mca/pmix/pmix2x/pmix/src/util/fd.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/fd.c rename to opal/mca/pmix/pmix2x/pmix/src/util/fd.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/fd.h b/opal/mca/pmix/pmix2x/pmix/src/util/fd.h similarity index 96% rename from opal/mca/pmix/pmix3x/pmix/src/util/fd.h rename to opal/mca/pmix/pmix2x/pmix/src/util/fd.h index ab950ba8179..ffd52e3167d 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/fd.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/fd.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Sandia National Laboratories. All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/getid.c b/opal/mca/pmix/pmix2x/pmix/src/util/getid.c similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/src/util/getid.c rename to opal/mca/pmix/pmix2x/pmix/src/util/getid.c index f3ad8a9dd46..d2ae01f54d3 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/getid.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/getid.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/getid.h b/opal/mca/pmix/pmix2x/pmix/src/util/getid.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/util/getid.h rename to opal/mca/pmix/pmix2x/pmix/src/util/getid.h index 871eb6a2593..f34d0ebfb0f 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/getid.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/getid.h @@ -28,4 +28,3 @@ pmix_status_t pmix_util_getid(int sd, uid_t *uid, gid_t *gid); END_C_DECLS #endif /* PMIX_PRINTF_H */ - diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/hash.c b/opal/mca/pmix/pmix2x/pmix/src/util/hash.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/util/hash.c rename to opal/mca/pmix/pmix2x/pmix/src/util/hash.c index ba479ab3351..b6d4d3f1581 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/hash.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/hash.c @@ -6,7 +6,7 @@ * reserved. * Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016 Mellanox Technologies, Inc. diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/hash.h b/opal/mca/pmix/pmix2x/pmix/src/util/hash.h similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/src/util/hash.h rename to opal/mca/pmix/pmix2x/pmix/src/util/hash.h index 6b385b27104..4930948c4ac 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/hash.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/hash.h @@ -1,7 +1,7 @@ /* * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/keyval/Makefile.am b/opal/mca/pmix/pmix2x/pmix/src/util/keyval/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/keyval/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/src/util/keyval/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/keyval/keyval_lex.h b/opal/mca/pmix/pmix2x/pmix/src/util/keyval/keyval_lex.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/keyval/keyval_lex.h rename to opal/mca/pmix/pmix2x/pmix/src/util/keyval/keyval_lex.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/keyval/keyval_lex.l b/opal/mca/pmix/pmix2x/pmix/src/util/keyval/keyval_lex.l similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/keyval/keyval_lex.l rename to opal/mca/pmix/pmix2x/pmix/src/util/keyval/keyval_lex.l index 9b9d0d6d14c..88bb11708ae 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/keyval/keyval_lex.l +++ b/opal/mca/pmix/pmix2x/pmix/src/util/keyval/keyval_lex.l @@ -16,6 +16,7 @@ * All rights reserved. * Copyright (c) 2012 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/keyval_parse.c b/opal/mca/pmix/pmix2x/pmix/src/util/keyval_parse.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/keyval_parse.c rename to opal/mca/pmix/pmix2x/pmix/src/util/keyval_parse.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/keyval_parse.h b/opal/mca/pmix/pmix2x/pmix/src/util/keyval_parse.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/keyval_parse.h rename to opal/mca/pmix/pmix2x/pmix/src/util/keyval_parse.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/net.c b/opal/mca/pmix/pmix2x/pmix/src/util/net.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/net.c rename to opal/mca/pmix/pmix2x/pmix/src/util/net.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/net.h b/opal/mca/pmix/pmix2x/pmix/src/util/net.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/net.h rename to opal/mca/pmix/pmix2x/pmix/src/util/net.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/os_path.c b/opal/mca/pmix/pmix2x/pmix/src/util/os_path.c similarity index 88% rename from opal/mca/pmix/pmix3x/pmix/src/util/os_path.c rename to opal/mca/pmix/pmix2x/pmix/src/util/os_path.c index a29414de833..6abedaf8a30 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/os_path.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/os_path.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -55,15 +55,15 @@ char *pmix_os_path(bool relative, ...) va_end(ap); if (0 == num_elements) { /* must be looking for a simple answer */ - path = (char *)malloc(3); + path = (char *)malloc(3); path[0] = '\0'; - if (relative) { - strcpy(path, "."); + if (relative) { + strcpy(path, "."); strcat(path, path_sep); - } else { - strcpy(path, path_sep); - } - return(path); + } else { + strcpy(path, path_sep); + } + return(path); } /* setup path with enough room for the string terminator, the elements, and @@ -74,7 +74,7 @@ char *pmix_os_path(bool relative, ...) } if (total_length > PMIX_PATH_MAX) { /* path length is too long - reject it */ - return(NULL); + return(NULL); } path = (char *)malloc(total_length); @@ -89,13 +89,13 @@ char *pmix_os_path(bool relative, ...) va_start(ap, relative); if( NULL != (element = va_arg(ap, char*)) ) { - if (path_sep[0] != element[0]) { + if (path_sep[0] != element[0]) { strcat(path, path_sep); } strcat(path, element); } while (NULL != (element=va_arg(ap, char*))) { - if (path_sep[0] != element[0]) { + if (path_sep[0] != element[0]) { strcat(path, path_sep); } strcat(path, element); diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/os_path.h b/opal/mca/pmix/pmix2x/pmix/src/util/os_path.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/os_path.h rename to opal/mca/pmix/pmix2x/pmix/src/util/os_path.h index 010e7086cf6..7057c49524c 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/os_path.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/os_path.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/output.c b/opal/mca/pmix/pmix2x/pmix/src/util/output.c similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/src/util/output.c rename to opal/mca/pmix/pmix2x/pmix/src/util/output.c index ef211479db1..d7d36a1e92b 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/output.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/output.c @@ -502,10 +502,10 @@ void pmix_output_finalize(void) free (output_prefix); free (output_dir); if(NULL != temp_str) { - free(temp_str); - temp_str = NULL; - temp_str_len = 0; - } + free(temp_str); + temp_str = NULL; + temp_str_len = 0; + } PMIX_DESTRUCT(&verbose); } } @@ -780,20 +780,20 @@ static void free_descriptor(int output_id) output_desc_t *ldi; if (output_id >= 0 && output_id < PMIX_OUTPUT_MAX_STREAMS && - info[output_id].ldi_used && info[output_id].ldi_enabled) { - ldi = &info[output_id]; + info[output_id].ldi_used && info[output_id].ldi_enabled) { + ldi = &info[output_id]; - if (-1 != ldi->ldi_fd) { - close(ldi->ldi_fd); - } - ldi->ldi_used = false; + if (-1 != ldi->ldi_fd) { + close(ldi->ldi_fd); + } + ldi->ldi_used = false; - /* If we strduped a prefix, suffix, or syslog ident, free it */ + /* If we strduped a prefix, suffix, or syslog ident, free it */ - if (NULL != ldi->ldi_prefix) { - free(ldi->ldi_prefix); - } - ldi->ldi_prefix = NULL; + if (NULL != ldi->ldi_prefix) { + free(ldi->ldi_prefix); + } + ldi->ldi_prefix = NULL; if (NULL != ldi->ldi_suffix) { free(ldi->ldi_suffix); @@ -801,14 +801,14 @@ static void free_descriptor(int output_id) ldi->ldi_suffix = NULL; if (NULL != ldi->ldi_file_suffix) { - free(ldi->ldi_file_suffix); - } - ldi->ldi_file_suffix = NULL; - - if (NULL != ldi->ldi_syslog_ident) { - free(ldi->ldi_syslog_ident); - } - ldi->ldi_syslog_ident = NULL; + free(ldi->ldi_file_suffix); + } + ldi->ldi_file_suffix = NULL; + + if (NULL != ldi->ldi_syslog_ident) { + free(ldi->ldi_syslog_ident); + } + ldi->ldi_syslog_ident = NULL; } } diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/output.h b/opal/mca/pmix/pmix2x/pmix/src/util/output.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/output.h rename to opal/mca/pmix/pmix2x/pmix/src/util/output.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/path.c b/opal/mca/pmix/pmix2x/pmix/src/util/path.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/path.c rename to opal/mca/pmix/pmix2x/pmix/src/util/path.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/path.h b/opal/mca/pmix/pmix2x/pmix/src/util/path.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/path.h rename to opal/mca/pmix/pmix2x/pmix/src/util/path.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/pif.c b/opal/mca/pmix/pmix2x/pmix/src/util/pif.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/pif.c rename to opal/mca/pmix/pmix2x/pmix/src/util/pif.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/pif.h b/opal/mca/pmix/pmix2x/pmix/src/util/pif.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/pif.h rename to opal/mca/pmix/pmix2x/pmix/src/util/pif.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/pmix_environ.c b/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/util/pmix_environ.c rename to opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.c index 9587a464d26..ff5ef60da84 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/pmix_environ.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.c @@ -237,4 +237,3 @@ const char* pmix_home_directory( void ) return home; } - diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/pmix_environ.h b/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/pmix_environ.h rename to opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.h index f6ec9c95b2f..852152f5f44 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/pmix_environ.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/pmix_environ.h @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2007-2013 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved. diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/printf.c b/opal/mca/pmix/pmix2x/pmix/src/util/printf.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/util/printf.c rename to opal/mca/pmix/pmix2x/pmix/src/util/printf.c index 410c9521542..897b9b47d79 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/printf.c +++ b/opal/mca/pmix/pmix2x/pmix/src/util/printf.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/printf.h b/opal/mca/pmix/pmix2x/pmix/src/util/printf.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/src/util/printf.h rename to opal/mca/pmix/pmix2x/pmix/src/util/printf.h index f4ab098596a..d71cfd78cf1 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/printf.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/printf.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -129,4 +129,3 @@ int pmix_vasprintf(char **ptr, const char *fmt, va_list ap) __pmix_attribute_fo END_C_DECLS #endif /* PMIX_PRINTF_H */ - diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/show_help.c b/opal/mca/pmix/pmix2x/pmix/src/util/show_help.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/show_help.c rename to opal/mca/pmix/pmix2x/pmix/src/util/show_help.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/show_help.h b/opal/mca/pmix/pmix2x/pmix/src/util/show_help.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/show_help.h rename to opal/mca/pmix/pmix2x/pmix/src/util/show_help.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/show_help_lex.h b/opal/mca/pmix/pmix2x/pmix/src/util/show_help_lex.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/show_help_lex.h rename to opal/mca/pmix/pmix2x/pmix/src/util/show_help_lex.h diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/show_help_lex.l b/opal/mca/pmix/pmix2x/pmix/src/util/show_help_lex.l similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/show_help_lex.l rename to opal/mca/pmix/pmix2x/pmix/src/util/show_help_lex.l diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/strnlen.h b/opal/mca/pmix/pmix2x/pmix/src/util/strnlen.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/util/strnlen.h rename to opal/mca/pmix/pmix2x/pmix/src/util/strnlen.h index ecb976207f0..15f334f792b 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/strnlen.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/strnlen.h @@ -35,4 +35,3 @@ #endif #endif /* PMIX_STRNLEN_H */ - diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/timings.c b/opal/mca/pmix/pmix2x/pmix/src/util/timings.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/timings.c rename to opal/mca/pmix/pmix2x/pmix/src/util/timings.c diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/timings.h b/opal/mca/pmix/pmix2x/pmix/src/util/timings.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/src/util/timings.h rename to opal/mca/pmix/pmix2x/pmix/src/util/timings.h index 06dc993c05e..5c0d14d2011 100644 --- a/opal/mca/pmix/pmix3x/pmix/src/util/timings.h +++ b/opal/mca/pmix/pmix2x/pmix/src/util/timings.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2014 Artem Polyakov - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2014-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/tsd.h b/opal/mca/pmix/pmix2x/pmix/src/util/tsd.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/src/util/tsd.h rename to opal/mca/pmix/pmix2x/pmix/src/util/tsd.h diff --git a/opal/mca/pmix/pmix3x/pmix/test/Makefile.am b/opal/mca/pmix/pmix2x/pmix/test/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/test/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/test/README b/opal/mca/pmix/pmix2x/pmix/test/README similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/README rename to opal/mca/pmix/pmix2x/pmix/test/README diff --git a/opal/mca/pmix/pmix3x/pmix/test/cli_stages.c b/opal/mca/pmix/pmix2x/pmix/test/cli_stages.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/cli_stages.c rename to opal/mca/pmix/pmix2x/pmix/test/cli_stages.c index 94a89304a0f..4a5c7332224 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/cli_stages.c +++ b/opal/mca/pmix/pmix2x/pmix/test/cli_stages.c @@ -274,4 +274,3 @@ void errhandler_reg_callbk (pmix_status_t status, TEST_VERBOSE(("ERRHANDLER REGISTRATION CALLBACK CALLED WITH STATUS %d, ref=%lu", status, (unsigned long)errhandler_ref)); } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/cli_stages.h b/opal/mca/pmix/pmix2x/pmix/test/cli_stages.h similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/cli_stages.h rename to opal/mca/pmix/pmix2x/pmix/test/cli_stages.h index 37d418c032d..173a384797c 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/cli_stages.h +++ b/opal/mca/pmix/pmix2x/pmix/test/cli_stages.h @@ -75,5 +75,3 @@ void op_callbk(pmix_status_t status, void errhandler_reg_callbk (pmix_status_t status, size_t errhandler_ref, void *cbdata); - - diff --git a/opal/mca/pmix/pmix3x/pmix/test/pmi2_client.c b/opal/mca/pmix/pmix2x/pmix/test/pmi2_client.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/pmi2_client.c rename to opal/mca/pmix/pmix2x/pmix/test/pmi2_client.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/pmi_client.c b/opal/mca/pmix/pmix2x/pmix/test/pmi_client.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/pmi_client.c rename to opal/mca/pmix/pmix2x/pmix/test/pmi_client.c index 70e72dfb1ac..53673e85615 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/pmi_client.c +++ b/opal/mca/pmix/pmix2x/pmix/test/pmi_client.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/test/pmix_client.c b/opal/mca/pmix/pmix2x/pmix/test/pmix_client.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/pmix_client.c rename to opal/mca/pmix/pmix2x/pmix/test/pmix_client.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/pmix_client_otheruser.sh b/opal/mca/pmix/pmix2x/pmix/test/pmix_client_otheruser.sh old mode 100755 new mode 100644 similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/pmix_client_otheruser.sh rename to opal/mca/pmix/pmix2x/pmix/test/pmix_client_otheruser.sh diff --git a/opal/mca/pmix/pmix3x/pmix/test/pmix_regex.c b/opal/mca/pmix/pmix2x/pmix/test/pmix_regex.c similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/test/pmix_regex.c rename to opal/mca/pmix/pmix2x/pmix/test/pmix_regex.c index 027f6fc5a33..d4511e6c0f2 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/pmix_regex.c +++ b/opal/mca/pmix/pmix2x/pmix/test/pmix_regex.c @@ -13,7 +13,7 @@ * All rights reserved. * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -87,4 +87,3 @@ int main(int argc, char **argv) return 0; } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/pmix_test.c b/opal/mca/pmix/pmix2x/pmix/test/pmix_test.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/pmix_test.c rename to opal/mca/pmix/pmix2x/pmix/test/pmix_test.c index 6969c55f5db..0366e4534b5 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/pmix_test.c +++ b/opal/mca/pmix/pmix2x/pmix/test/pmix_test.c @@ -203,4 +203,3 @@ int main(int argc, char **argv) return test_fail; } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/server_callbacks.c b/opal/mca/pmix/pmix2x/pmix/test/server_callbacks.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/server_callbacks.c rename to opal/mca/pmix/pmix2x/pmix/test/server_callbacks.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/server_callbacks.h b/opal/mca/pmix/pmix2x/pmix/test/server_callbacks.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/server_callbacks.h rename to opal/mca/pmix/pmix2x/pmix/test/server_callbacks.h diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/Makefile.am b/opal/mca/pmix/pmix2x/pmix/test/simple/Makefile.am similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/simple/Makefile.am rename to opal/mca/pmix/pmix2x/pmix/test/simple/Makefile.am diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/simpclient.c b/opal/mca/pmix/pmix2x/pmix/test/simple/simpclient.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/simple/simpclient.c rename to opal/mca/pmix/pmix2x/pmix/test/simple/simpclient.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/simpdmodex.c b/opal/mca/pmix/pmix2x/pmix/test/simple/simpdmodex.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/simple/simpdmodex.c rename to opal/mca/pmix/pmix2x/pmix/test/simple/simpdmodex.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/simpdyn.c b/opal/mca/pmix/pmix2x/pmix/test/simple/simpdyn.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/simple/simpdyn.c rename to opal/mca/pmix/pmix2x/pmix/test/simple/simpdyn.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/simpft.c b/opal/mca/pmix/pmix2x/pmix/test/simple/simpft.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/simple/simpft.c rename to opal/mca/pmix/pmix2x/pmix/test/simple/simpft.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/simppub.c b/opal/mca/pmix/pmix2x/pmix/test/simple/simppub.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/simple/simppub.c rename to opal/mca/pmix/pmix2x/pmix/test/simple/simppub.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/simptest.c b/opal/mca/pmix/pmix2x/pmix/test/simple/simptest.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/simple/simptest.c rename to opal/mca/pmix/pmix2x/pmix/test/simple/simptest.c index 970356e62d6..74b5241e3db 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/simple/simptest.c +++ b/opal/mca/pmix/pmix2x/pmix/test/simple/simptest.c @@ -807,4 +807,3 @@ static void wait_signal_callback(int fd, short event, void *arg) } } } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/simptool.c b/opal/mca/pmix/pmix2x/pmix/test/simple/simptool.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/simple/simptool.c rename to opal/mca/pmix/pmix2x/pmix/test/simple/simptool.c diff --git a/opal/mca/pmix/pmix2x/pmix/test/simple/test_pmix.c b/opal/mca/pmix/pmix2x/pmix/test/simple/test_pmix.c new file mode 100644 index 00000000000..6bfa3d793d9 --- /dev/null +++ b/opal/mca/pmix/pmix2x/pmix/test/simple/test_pmix.c @@ -0,0 +1,67 @@ + +#include +#include +#include + +int main(int argc, char **argv) +{ + pmix_proc_t myproc; + pmix_status_t rc; + + int rank; + rc = PMIx_Init(&myproc, NULL, 0); + assert(PMIX_SUCCESS == rc); + + { + pmix_value_t *value; + rc = PMIx_Get(&myproc, PMIX_RANK, NULL, 0, &value); + assert(PMIX_SUCCESS == rc); + printf("%d\n", value->type); + assert(value->type == PMIX_INT); + rank = value->data.uint32; + PMIX_VALUE_RELEASE(value); + } + + if (rank == 0 ) { + pmix_info_t *info; + PMIX_INFO_CREATE(info, 1); + snprintf(info[0].key, PMIX_MAX_KEYLEN, "magic-found"); + info[0].value.type = PMIX_STRING; + info[0].value.data.string = "yes"; + rc = PMIx_Publish(info, 1); + assert(PMIX_SUCCESS == rc); + } + + printf("I am rank %d\n", rank); + + { + bool flag; + pmix_info_t *info; + PMIX_INFO_CREATE(info, 1); + flag = true; + PMIX_INFO_LOAD(info, PMIX_COLLECT_DATA, &flag, PMIX_BOOL); + rc = PMIx_Fence(&myproc, 1, info, 1); + assert(PMIX_SUCCESS == rc); + PMIX_INFO_FREE(info, 1); + } + + if (rank == 1) { + int i; + pmix_pdata_t *pdata; + PMIX_PDATA_CREATE(pdata, 2); + snprintf(pdata[0].key, PMIX_MAX_KEYLEN, "magic-found"); + snprintf(pdata[1].key, PMIX_MAX_KEYLEN, "magic-not-found"); + rc = PMIx_Lookup(&pdata[0], 2, NULL, 0); + assert((PMIX_SUCCESS == rc) || (PMIX_ERR_NOT_FOUND == rc)); + for ( i = 0 ; i < 2 ; i++ ) + if (pdata[i].value.type == PMIX_STRING) + printf("Found[%d] %d %s\n", i, pdata[i].value.type, pdata[i].value.data.string); + else + printf("Found[%d] %d\n", i, pdata[i].value.type); + PMIX_PDATA_FREE(pdata, 1); + } + + rc = PMIx_Finalize(NULL, 0); + assert(PMIX_SUCCESS == rc); + +} diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_cd.c b/opal/mca/pmix/pmix2x/pmix/test/test_cd.c similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/test/test_cd.c rename to opal/mca/pmix/pmix2x/pmix/test/test_cd.c index 68673922c97..c078595eb5c 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_cd.c +++ b/opal/mca/pmix/pmix2x/pmix/test/test_cd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -85,4 +85,3 @@ int test_connect_disconnect(char *my_nspace, int my_rank) TEST_VERBOSE(("%s:%d: Disconnect non-blocking test succeded.", my_nspace, my_rank)); return PMIX_SUCCESS; } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_cd.h b/opal/mca/pmix/pmix2x/pmix/test/test_cd.h similarity index 83% rename from opal/mca/pmix/pmix3x/pmix/test/test_cd.h rename to opal/mca/pmix/pmix2x/pmix/test/test_cd.h index d4e789102f2..5aea5eda1f7 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_cd.h +++ b/opal/mca/pmix/pmix2x/pmix/test/test_cd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_common.c b/opal/mca/pmix/pmix2x/pmix/test/test_common.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/test_common.c rename to opal/mca/pmix/pmix2x/pmix/test/test_common.c index ae053569e7b..6efa267eb1d 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_common.c +++ b/opal/mca/pmix/pmix2x/pmix/test/test_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Artem Y. Polyakov . * All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. @@ -540,4 +540,3 @@ int get_all_ranks_from_namespace(test_params params, char *nspace, pmix_proc_t * } return PMIX_SUCCESS; } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_common.h b/opal/mca/pmix/pmix2x/pmix/test/test_common.h similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/test/test_common.h rename to opal/mca/pmix/pmix2x/pmix/test/test_common.h index e54e75c050a..12c02f8766c 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_common.h +++ b/opal/mca/pmix/pmix2x/pmix/test/test_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Artem Y. Polyakov . * All rights reserved. * Copyright (c) 2015 Research Organization for Information Science diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_error.c b/opal/mca/pmix/pmix2x/pmix/test/test_error.c similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/test_error.c rename to opal/mca/pmix/pmix2x/pmix/test/test_error.c diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_error.h b/opal/mca/pmix/pmix2x/pmix/test/test_error.h similarity index 78% rename from opal/mca/pmix/pmix3x/pmix/test/test_error.h rename to opal/mca/pmix/pmix2x/pmix/test/test_error.h index ed17831a088..151ad62bb24 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_error.h +++ b/opal/mca/pmix/pmix2x/pmix/test/test_error.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_fence.c b/opal/mca/pmix/pmix2x/pmix/test/test_fence.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/test_fence.c rename to opal/mca/pmix/pmix2x/pmix/test/test_fence.c index dd2c80c5d4e..d9e0b74a4f0 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_fence.c +++ b/opal/mca/pmix/pmix2x/pmix/test/test_fence.c @@ -554,4 +554,3 @@ int test_job_fence(test_params params, char *my_nspace, pmix_rank_t my_rank) } return PMIX_SUCCESS; } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_fence.h b/opal/mca/pmix/pmix2x/pmix/test/test_fence.h similarity index 100% rename from opal/mca/pmix/pmix3x/pmix/test/test_fence.h rename to opal/mca/pmix/pmix2x/pmix/test/test_fence.h diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_publish.c b/opal/mca/pmix/pmix2x/pmix/test/test_publish.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/test/test_publish.c rename to opal/mca/pmix/pmix2x/pmix/test/test_publish.c index 86f799bdead..3357531b712 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_publish.c +++ b/opal/mca/pmix/pmix2x/pmix/test/test_publish.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ @@ -193,4 +193,3 @@ int test_publish_lookup(char *my_nspace, int my_rank) } return PMIX_SUCCESS; } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_publish.h b/opal/mca/pmix/pmix2x/pmix/test/test_publish.h similarity index 83% rename from opal/mca/pmix/pmix3x/pmix/test/test_publish.h rename to opal/mca/pmix/pmix2x/pmix/test/test_publish.h index bd436b8a3c8..8634b96b9fd 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_publish.h +++ b/opal/mca/pmix/pmix2x/pmix/test/test_publish.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_resolve_peers.c b/opal/mca/pmix/pmix2x/pmix/test/test_resolve_peers.c similarity index 98% rename from opal/mca/pmix/pmix3x/pmix/test/test_resolve_peers.c rename to opal/mca/pmix/pmix2x/pmix/test/test_resolve_peers.c index e9582cb0df8..8c85031fc77 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_resolve_peers.c +++ b/opal/mca/pmix/pmix2x/pmix/test/test_resolve_peers.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_resolve_peers.h b/opal/mca/pmix/pmix2x/pmix/test/test_resolve_peers.h similarity index 84% rename from opal/mca/pmix/pmix3x/pmix/test/test_resolve_peers.h rename to opal/mca/pmix/pmix2x/pmix/test/test_resolve_peers.h index d92883610e2..874c3d272b0 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_resolve_peers.h +++ b/opal/mca/pmix/pmix2x/pmix/test/test_resolve_peers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_spawn.c b/opal/mca/pmix/pmix2x/pmix/test/test_spawn.c similarity index 97% rename from opal/mca/pmix/pmix3x/pmix/test/test_spawn.c rename to opal/mca/pmix/pmix2x/pmix/test/test_spawn.c index 3afbdc19753..d230b9a77cb 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_spawn.c +++ b/opal/mca/pmix/pmix2x/pmix/test/test_spawn.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ @@ -77,4 +77,3 @@ int test_spawn(char *my_nspace, int my_rank) TEST_VERBOSE(("%s:%d: Spawn non-blocking test succeded.", my_nspace, my_rank)); return PMIX_SUCCESS; } - diff --git a/opal/mca/pmix/pmix3x/pmix/test/test_spawn.h b/opal/mca/pmix/pmix2x/pmix/test/test_spawn.h similarity index 83% rename from opal/mca/pmix/pmix3x/pmix/test/test_spawn.h rename to opal/mca/pmix/pmix2x/pmix/test/test_spawn.h index d074be2a3ba..c217c659a89 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/test_spawn.h +++ b/opal/mca/pmix/pmix2x/pmix/test/test_spawn.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix/test/utils.c b/opal/mca/pmix/pmix2x/pmix/test/utils.c similarity index 99% rename from opal/mca/pmix/pmix3x/pmix/test/utils.c rename to opal/mca/pmix/pmix2x/pmix/test/utils.c index fb864aedb56..633cd75ee7f 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/utils.c +++ b/opal/mca/pmix/pmix2x/pmix/test/utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2016 Research Organization for Information Science diff --git a/opal/mca/pmix/pmix3x/pmix/test/utils.h b/opal/mca/pmix/pmix2x/pmix/test/utils.h similarity index 88% rename from opal/mca/pmix/pmix3x/pmix/test/utils.h rename to opal/mca/pmix/pmix2x/pmix/test/utils.h index bbeebaa2f7a..e984d018ab9 100644 --- a/opal/mca/pmix/pmix3x/pmix/test/utils.h +++ b/opal/mca/pmix/pmix2x/pmix/test/utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. * Copyright (c) 2015 Mellanox Technologies, Inc. * All rights reserved. * $COPYRIGHT$ diff --git a/opal/mca/pmix/pmix3x/pmix3x.c b/opal/mca/pmix/pmix2x/pmix2x.c similarity index 81% rename from opal/mca/pmix/pmix3x/pmix3x.c rename to opal/mca/pmix/pmix2x/pmix2x.c index f2b3a4429ab..8856c96b822 100644 --- a/opal/mca/pmix/pmix3x/pmix3x.c +++ b/opal/mca/pmix/pmix2x/pmix2x.c @@ -35,7 +35,7 @@ #include "opal/util/proc.h" #include "opal/util/show_help.h" -#include "pmix3x.h" +#include "pmix2x.h" #include "opal/mca/pmix/base/base.h" #include "opal/mca/pmix/pmix_types.h" @@ -47,8 +47,8 @@ /* These are functions used by both client and server to * access common functions in the embedded PMIx library */ -static const char *pmix3x_get_nspace(opal_jobid_t jobid); -static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace); +static const char *pmix2x_get_nspace(opal_jobid_t jobid); +static void pmix2x_register_jobid(opal_jobid_t jobid, const char *nspace); static void register_handler(opal_list_t *event_codes, opal_list_t *info, opal_pmix_notification_fn_t evhandler, @@ -62,66 +62,66 @@ static int notify_event(int status, opal_pmix_data_range_t range, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -static void pmix3x_query(opal_list_t *queries, +static void pmix2x_query(opal_list_t *queries, opal_pmix_info_cbfunc_t cbfunc, void *cbdata); -static void pmix3x_log(opal_list_t *info, +static void pmix2x_log(opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -const opal_pmix_base_module_t opal_pmix_pmix3x_module = { +const opal_pmix_base_module_t opal_pmix_pmix2x_module = { /* client APIs */ - .init = pmix3x_client_init, - .finalize = pmix3x_client_finalize, - .initialized = pmix3x_initialized, - .abort = pmix3x_abort, - .commit = pmix3x_commit, - .fence = pmix3x_fence, - .fence_nb = pmix3x_fencenb, - .put = pmix3x_put, - .get = pmix3x_get, - .get_nb = pmix3x_getnb, - .publish = pmix3x_publish, - .publish_nb = pmix3x_publishnb, - .lookup = pmix3x_lookup, - .lookup_nb = pmix3x_lookupnb, - .unpublish = pmix3x_unpublish, - .unpublish_nb = pmix3x_unpublishnb, - .spawn = pmix3x_spawn, - .spawn_nb = pmix3x_spawnnb, - .connect = pmix3x_connect, - .connect_nb = pmix3x_connectnb, - .disconnect = pmix3x_disconnect, - .disconnect_nb = pmix3x_disconnectnb, - .resolve_peers = pmix3x_resolve_peers, - .resolve_nodes = pmix3x_resolve_nodes, - .query = pmix3x_query, - .log = pmix3x_log, + .init = pmix2x_client_init, + .finalize = pmix2x_client_finalize, + .initialized = pmix2x_initialized, + .abort = pmix2x_abort, + .commit = pmix2x_commit, + .fence = pmix2x_fence, + .fence_nb = pmix2x_fencenb, + .put = pmix2x_put, + .get = pmix2x_get, + .get_nb = pmix2x_getnb, + .publish = pmix2x_publish, + .publish_nb = pmix2x_publishnb, + .lookup = pmix2x_lookup, + .lookup_nb = pmix2x_lookupnb, + .unpublish = pmix2x_unpublish, + .unpublish_nb = pmix2x_unpublishnb, + .spawn = pmix2x_spawn, + .spawn_nb = pmix2x_spawnnb, + .connect = pmix2x_connect, + .connect_nb = pmix2x_connectnb, + .disconnect = pmix2x_disconnect, + .disconnect_nb = pmix2x_disconnectnb, + .resolve_peers = pmix2x_resolve_peers, + .resolve_nodes = pmix2x_resolve_nodes, + .query = pmix2x_query, + .log = pmix2x_log, /* server APIs */ - .server_init = pmix3x_server_init, - .server_finalize = pmix3x_server_finalize, - .generate_regex = pmix3x_server_gen_regex, - .generate_ppn = pmix3x_server_gen_ppn, - .server_register_nspace = pmix3x_server_register_nspace, - .server_deregister_nspace = pmix3x_server_deregister_nspace, - .server_register_client = pmix3x_server_register_client, - .server_deregister_client = pmix3x_server_deregister_client, - .server_setup_fork = pmix3x_server_setup_fork, - .server_dmodex_request = pmix3x_server_dmodex, - .server_notify_event = pmix3x_server_notify_event, + .server_init = pmix2x_server_init, + .server_finalize = pmix2x_server_finalize, + .generate_regex = pmix2x_server_gen_regex, + .generate_ppn = pmix2x_server_gen_ppn, + .server_register_nspace = pmix2x_server_register_nspace, + .server_deregister_nspace = pmix2x_server_deregister_nspace, + .server_register_client = pmix2x_server_register_client, + .server_deregister_client = pmix2x_server_deregister_client, + .server_setup_fork = pmix2x_server_setup_fork, + .server_dmodex_request = pmix2x_server_dmodex, + .server_notify_event = pmix2x_server_notify_event, /* utility APIs */ .get_version = PMIx_Get_version, .register_evhandler = register_handler, .deregister_evhandler = deregister_handler, .notify_event = notify_event, - .store_local = pmix3x_store_local, - .get_nspace = pmix3x_get_nspace, - .register_jobid = pmix3x_register_jobid + .store_local = pmix2x_store_local, + .get_nspace = pmix2x_get_nspace, + .register_jobid = pmix2x_register_jobid }; -static const char *pmix3x_get_nspace(opal_jobid_t jobid) +static const char *pmix2x_get_nspace(opal_jobid_t jobid) { - opal_pmix3x_jobid_trkr_t *jptr; + opal_pmix2x_jobid_trkr_t *jptr; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { return jptr->nspace; } @@ -129,25 +129,25 @@ static const char *pmix3x_get_nspace(opal_jobid_t jobid) return NULL; } -static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace) +static void pmix2x_register_jobid(opal_jobid_t jobid, const char *nspace) { - opal_pmix3x_jobid_trkr_t *jptr; + opal_pmix2x_jobid_trkr_t *jptr; /* if we don't already have it, add this to our jobid tracker */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { return; } } - jptr = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + jptr = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN); jptr->jobid = jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &jptr->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &jptr->super); } static void completion_handler(int status, void *cbdata) { - opal_pmix3x_event_chain_t *chain = (opal_pmix3x_event_chain_t*)cbdata; + opal_pmix2x_event_chain_t *chain = (opal_pmix2x_event_chain_t*)cbdata; if (NULL != chain->info) { OPAL_LIST_RELEASE(chain->info); } @@ -158,12 +158,12 @@ static void progress_local_event_hdlr(int status, opal_pmix_op_cbfunc_t cbfunc, void *thiscbdata, void *notification_cbdata) { - opal_pmix3x_event_chain_t *chain = (opal_pmix3x_event_chain_t*)notification_cbdata; + opal_pmix2x_event_chain_t *chain = (opal_pmix2x_event_chain_t*)notification_cbdata; size_t n; opal_list_item_t *nxt; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; /* if the caller indicates that the chain is completed, then stop here */ if (OPAL_ERR_HANDLERS_COMPLETE == status) { @@ -181,8 +181,8 @@ static void progress_local_event_hdlr(int status, if (NULL != chain->sing) { /* the last handler was for a single code - see if there are * any others that match this event */ - while (opal_list_get_end(&mca_pmix_pmix3x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) { - sing = (opal_pmix3x_single_event_t*)nxt; + while (opal_list_get_end(&mca_pmix_pmix2x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) { + sing = (opal_pmix2x_single_event_t*)nxt; if (sing->code == chain->status) { OBJ_RETAIN(chain); chain->sing = sing; @@ -199,15 +199,15 @@ static void progress_local_event_hdlr(int status, * events that match */ chain->sing = NULL; /* pickup the beginning of the multi-code event list */ - if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.multi_events)) { - chain->multi = (opal_pmix3x_multi_event_t*)opal_list_get_begin(&mca_pmix_pmix3x_component.multi_events); + if (0 < opal_list_get_size(&mca_pmix_pmix2x_component.multi_events)) { + chain->multi = (opal_pmix2x_multi_event_t*)opal_list_get_begin(&mca_pmix_pmix2x_component.multi_events); } } /* see if we need to continue with the multi code events */ if (NULL != chain->multi) { - while (opal_list_get_end(&mca_pmix_pmix3x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) { - multi = (opal_pmix3x_multi_event_t*)nxt; + while (opal_list_get_end(&mca_pmix_pmix2x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) { + multi = (opal_pmix2x_multi_event_t*)nxt; for (n=0; n < multi->ncodes; n++) { if (multi->codes[n] == chain->status) { /* found it - invoke the handler, pointing its @@ -228,8 +228,8 @@ static void progress_local_event_hdlr(int status, * events that match */ chain->multi = NULL; /* pickup the beginning of the default event list */ - if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) { - chain->def = (opal_pmix3x_default_event_t*)opal_list_get_begin(&mca_pmix_pmix3x_component.default_events); + if (0 < opal_list_get_size(&mca_pmix_pmix2x_component.default_events)) { + chain->def = (opal_pmix2x_default_event_t*)opal_list_get_begin(&mca_pmix_pmix2x_component.default_events); } } @@ -239,8 +239,8 @@ static void progress_local_event_hdlr(int status, } if (NULL != chain->def) { - if (opal_list_get_end(&mca_pmix_pmix3x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) { - def = (opal_pmix3x_default_event_t*)nxt; + if (opal_list_get_end(&mca_pmix_pmix2x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) { + def = (opal_pmix2x_default_event_t*)nxt; OBJ_RETAIN(chain); chain->def = def; opal_output_verbose(2, opal_pmix_base_framework.framework_output, @@ -267,18 +267,18 @@ static void progress_local_event_hdlr(int status, static void _event_hdlr(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; size_t n; - opal_pmix3x_event_chain_t *chain; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + opal_pmix2x_event_chain_t *chain; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s _EVENT_HDLR RECEIVED NOTIFICATION OF STATUS %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), cd->status); - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); /* point it at our final callback */ chain->final_cbfunc = completion_handler; chain->final_cbdata = chain; @@ -290,7 +290,7 @@ static void _event_hdlr(int sd, short args, void *cbdata) chain->nondefault = cd->nondefault; /* cycle thru the single-event registrations first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) { + OPAL_LIST_FOREACH(sing, &mca_pmix_pmix2x_component.single_events, opal_pmix2x_single_event_t) { if (sing->code == chain->status) { /* found it - invoke the handler, pointing its * callback function to our progression function */ @@ -308,7 +308,7 @@ static void _event_hdlr(int sd, short args, void *cbdata) /* if we didn't find any match in the single-event registrations, * then cycle thru the multi-event registrations next */ - OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) { + OPAL_LIST_FOREACH(multi, &mca_pmix_pmix2x_component.multi_events, opal_pmix2x_multi_event_t) { for (n=0; n < multi->ncodes; n++) { if (multi->codes[n] == chain->status) { /* found it - invoke the handler, pointing its @@ -330,7 +330,7 @@ static void _event_hdlr(int sd, short args, void *cbdata) if (chain->nondefault) { /* if we get here, then we need to cache this event in case they * register for it later - we cannot lose individual events */ - opal_list_append(&mca_pmix_pmix3x_component.cache, &chain->super); + opal_list_append(&mca_pmix_pmix2x_component.cache, &chain->super); return; } @@ -338,8 +338,8 @@ static void _event_hdlr(int sd, short args, void *cbdata) OBJ_RELEASE(cd); /* finally, pass it to any default handlers */ - if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) { - def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_pmix3x_component.default_events); + if (0 < opal_list_get_size(&mca_pmix_pmix2x_component.default_events)) { + def = (opal_pmix2x_default_event_t*)opal_list_get_first(&mca_pmix_pmix2x_component.default_events); OBJ_RETAIN(chain); chain->def = def; opal_output_verbose(2, opal_pmix_base_framework.framework_output, @@ -364,14 +364,14 @@ static void _event_hdlr(int sd, short args, void *cbdata) * by mpirun), directly from a RM (when direct launched), or * from another process (via the local daemon). * The call will occur in the PMIx event base */ -void pmix3x_event_hdlr(size_t evhdlr_registration_id, +void pmix2x_event_hdlr(size_t evhdlr_registration_id, pmix_status_t status, const pmix_proc_t *source, pmix_info_t info[], size_t ninfo, pmix_info_t results[], size_t nresults, pmix_event_notification_cbfunc_fn_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; int rc; opal_value_t *iptr; size_t n; @@ -384,10 +384,10 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, "%s RECEIVED NOTIFICATION OF STATUS %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status); - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); /* convert the incoming status */ - cd->status = pmix3x_convert_rc(status); + cd->status = pmix2x_convert_rc(status); opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s CONVERTED STATUS %d TO STATUS %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status, cd->status); @@ -402,7 +402,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, OBJ_RELEASE(cd); return; } - cd->pname.vpid = pmix3x_convert_rank(source->rank); + cd->pname.vpid = pmix2x_convert_rank(source->rank); } /* convert the array of info */ @@ -414,7 +414,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, } iptr = OBJ_NEW(opal_value_t); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OPAL_ERROR_LOG(rc); OBJ_RELEASE(iptr); continue; @@ -435,7 +435,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id, } } -opal_vpid_t pmix3x_convert_rank(int rank) +opal_vpid_t pmix2x_convert_rank(int rank) { switch(rank) { case PMIX_RANK_UNDEF: @@ -447,7 +447,7 @@ opal_vpid_t pmix3x_convert_rank(int rank) } } -pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid) +pmix_rank_t pmix2x_convert_opalrank(opal_vpid_t vpid) { switch(vpid) { case OPAL_VPID_WILDCARD: @@ -459,7 +459,7 @@ pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid) } } -pmix_status_t pmix3x_convert_opalrc(int rc) +pmix_status_t pmix2x_convert_opalrc(int rc) { switch (rc) { case OPAL_ERR_DEBUGGER_RELEASE: @@ -540,7 +540,7 @@ pmix_status_t pmix3x_convert_opalrc(int rc) } } -int pmix3x_convert_rc(pmix_status_t rc) +int pmix2x_convert_rc(pmix_status_t rc) { switch (rc) { case PMIX_ERR_DEBUGGER_RELEASE: @@ -624,7 +624,7 @@ int pmix3x_convert_rc(pmix_status_t rc) } } -opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope) +opal_pmix_scope_t pmix2x_convert_scope(pmix_scope_t scope) { switch(scope) { case PMIX_SCOPE_UNDEF: @@ -640,7 +640,7 @@ opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope) } } -pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope) { +pmix_scope_t pmix2x_convert_opalscope(opal_pmix_scope_t scope) { switch(scope) { case OPAL_PMIX_LOCAL: return PMIX_LOCAL; @@ -653,7 +653,7 @@ pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope) { } } -pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range) { +pmix_data_range_t pmix2x_convert_opalrange(opal_pmix_data_range_t range) { switch(range) { case OPAL_PMIX_RANGE_UNDEF: return PMIX_RANGE_UNDEF; @@ -672,7 +672,7 @@ pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range) { } } -opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range) { +opal_pmix_data_range_t pmix2x_convert_range(pmix_data_range_t range) { switch(range) { case PMIX_RANGE_UNDEF: return OPAL_PMIX_RANGE_UNDEF; @@ -691,7 +691,7 @@ opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range) { } } -opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t persist) +opal_pmix_persistence_t pmix2x_convert_persist(pmix_persistence_t persist) { switch(persist) { case PMIX_PERSIST_INDEF: @@ -709,7 +709,7 @@ opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t persist) } } -pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t persist) +pmix_persistence_t pmix2x_convert_opalpersist(opal_pmix_persistence_t persist) { switch(persist) { case OPAL_PMIX_PERSIST_INDEF: @@ -730,7 +730,7 @@ pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t persist) /**** RHC: NEED TO ADD SUPPORT FOR NEW PMIX DATA TYPES, INCLUDING **** CONVERSION OF PROC STATES ****/ -void pmix3x_value_load(pmix_value_t *v, +void pmix2x_value_load(pmix_value_t *v, opal_value_t *kv) { switch(kv->type) { @@ -823,14 +823,14 @@ void pmix3x_value_load(pmix_value_t *v, break; case OPAL_VPID: v->type = PMIX_PROC_RANK; - v->data.rank = pmix3x_convert_opalrank(kv->data.name.vpid); + v->data.rank = pmix2x_convert_opalrank(kv->data.name.vpid); break; case OPAL_NAME: v->type = PMIX_PROC; /* have to stringify the jobid */ PMIX_PROC_CREATE(v->data.proc, 1); (void)opal_snprintf_jobid(v->data.proc->nspace, PMIX_MAX_NSLEN, kv->data.name.vpid); - v->data.proc->rank = pmix3x_convert_opalrank(kv->data.name.vpid); + v->data.proc->rank = pmix2x_convert_opalrank(kv->data.name.vpid); break; case OPAL_BYTE_OBJECT: v->type = PMIX_BYTE_OBJECT; @@ -845,15 +845,15 @@ void pmix3x_value_load(pmix_value_t *v, break; case OPAL_PERSIST: v->type = PMIX_PERSIST; - v->data.persist = pmix3x_convert_opalpersist(kv->data.uint8); + v->data.persist = pmix2x_convert_opalpersist(kv->data.uint8); break; case OPAL_SCOPE: v->type = PMIX_SCOPE; - v->data.scope = pmix3x_convert_opalscope(kv->data.uint8); + v->data.scope = pmix2x_convert_opalscope(kv->data.uint8); break; case OPAL_DATA_RANGE: v->type = PMIX_DATA_RANGE; - v->data.range = pmix3x_convert_opalrange(kv->data.uint8); + v->data.range = pmix2x_convert_opalrange(kv->data.uint8); break; case OPAL_PROC_STATE: v->type = PMIX_PROC_STATE; @@ -871,7 +871,7 @@ void pmix3x_value_load(pmix_value_t *v, } } -int pmix3x_value_unload(opal_value_t *kv, +int pmix2x_value_unload(opal_value_t *kv, const pmix_value_t *v) { int rc=OPAL_SUCCESS; @@ -965,14 +965,14 @@ int pmix3x_value_unload(opal_value_t *kv, break; case PMIX_PROC_RANK: kv->type = OPAL_VPID; - kv->data.name.vpid = pmix3x_convert_rank(v->data.rank); + kv->data.name.vpid = pmix2x_convert_rank(v->data.rank); break; case PMIX_PROC: kv->type = OPAL_NAME; if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&kv->data.name.jobid, v->data.proc->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - kv->data.name.vpid = pmix3x_convert_rank(v->data.proc->rank); + kv->data.name.vpid = pmix2x_convert_rank(v->data.proc->rank); break; case PMIX_BYTE_OBJECT: kv->type = OPAL_BYTE_OBJECT; @@ -987,15 +987,15 @@ int pmix3x_value_unload(opal_value_t *kv, break; case PMIX_PERSIST: kv->type = OPAL_PERSIST; - kv->data.uint8 = pmix3x_convert_persist(v->data.persist); + kv->data.uint8 = pmix2x_convert_persist(v->data.persist); break; case PMIX_SCOPE: kv->type = OPAL_SCOPE; - kv->data.uint8 = pmix3x_convert_scope(v->data.scope); + kv->data.uint8 = pmix2x_convert_scope(v->data.scope); break; case PMIX_DATA_RANGE: kv->type = OPAL_DATA_RANGE; - kv->data.uint8 = pmix3x_convert_range(v->data.range); + kv->data.uint8 = pmix2x_convert_range(v->data.range); break; case PMIX_PROC_STATE: kv->type = OPAL_PROC_STATE; @@ -1017,11 +1017,11 @@ int pmix3x_value_unload(opal_value_t *kv, static void _reg_hdlr(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_event_chain_t *chain; - opal_pmix3x_single_event_t *sing = NULL; - opal_pmix3x_multi_event_t *multi = NULL; - opal_pmix3x_default_event_t *def = NULL; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_event_chain_t *chain; + opal_pmix2x_single_event_t *sing = NULL; + opal_pmix2x_multi_event_t *multi = NULL; + opal_pmix2x_default_event_t *def = NULL; opal_value_t *kv; int i; bool prepend = false; @@ -1043,40 +1043,40 @@ static void _reg_hdlr(int sd, short args, void *cbdata) if (NULL == cd->event_codes) { /* this is a default handler */ - def = OBJ_NEW(opal_pmix3x_default_event_t); + def = OBJ_NEW(opal_pmix2x_default_event_t); def->handler = cd->evhandler; - def->index = mca_pmix_pmix3x_component.evindex; + def->index = mca_pmix_pmix2x_component.evindex; if (prepend) { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s PREPENDING TO DEFAULT EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_prepend(&mca_pmix_pmix3x_component.default_events, &def->super); + opal_list_prepend(&mca_pmix_pmix2x_component.default_events, &def->super); } else { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s APPENDING TO DEFAULT EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_append(&mca_pmix_pmix3x_component.default_events, &def->super); + opal_list_append(&mca_pmix_pmix2x_component.default_events, &def->super); } } else if (1 == opal_list_get_size(cd->event_codes)) { /* single handler */ - sing = OBJ_NEW(opal_pmix3x_single_event_t); + sing = OBJ_NEW(opal_pmix2x_single_event_t); kv = (opal_value_t*)opal_list_get_first(cd->event_codes); sing->code = kv->data.integer; - sing->index = mca_pmix_pmix3x_component.evindex; + sing->index = mca_pmix_pmix2x_component.evindex; sing->handler = cd->evhandler; if (prepend) { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s PREPENDING TO SINGLE EVENTS WITH CODE %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code); - opal_list_prepend(&mca_pmix_pmix3x_component.single_events, &sing->super); + opal_list_prepend(&mca_pmix_pmix2x_component.single_events, &sing->super); } else { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s APPENDING TO SINGLE EVENTS WITH CODE %d", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code); - opal_list_append(&mca_pmix_pmix3x_component.single_events, &sing->super); + opal_list_append(&mca_pmix_pmix2x_component.single_events, &sing->super); } } else { - multi = OBJ_NEW(opal_pmix3x_multi_event_t); + multi = OBJ_NEW(opal_pmix2x_multi_event_t); multi->ncodes = opal_list_get_size(cd->event_codes); multi->codes = (int*)malloc(multi->ncodes * sizeof(int)); i=0; @@ -1084,35 +1084,35 @@ static void _reg_hdlr(int sd, short args, void *cbdata) multi->codes[i] = kv->data.integer; ++i; } - multi->index = mca_pmix_pmix3x_component.evindex; + multi->index = mca_pmix_pmix2x_component.evindex; multi->handler = cd->evhandler; if (prepend) { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s PREPENDING TO MULTI EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_prepend(&mca_pmix_pmix3x_component.multi_events, &multi->super); + opal_list_prepend(&mca_pmix_pmix2x_component.multi_events, &multi->super); } else { opal_output_verbose(2, opal_pmix_base_framework.framework_output, "%s APPENDING TO MULTI EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME)); - opal_list_append(&mca_pmix_pmix3x_component.multi_events, &multi->super); + opal_list_append(&mca_pmix_pmix2x_component.multi_events, &multi->super); } } /* release the caller */ if (NULL != cd->cbfunc) { - cd->cbfunc(OPAL_SUCCESS, mca_pmix_pmix3x_component.evindex, cd->cbdata); + cd->cbfunc(OPAL_SUCCESS, mca_pmix_pmix2x_component.evindex, cd->cbdata); } - mca_pmix_pmix3x_component.evindex++; + mca_pmix_pmix2x_component.evindex++; /* check if any matching notifications have been cached - only nondefault * events will have been cached*/ if (NULL == def) { /* check single code registrations */ if (NULL != sing) { - OPAL_LIST_FOREACH(chain, &mca_pmix_pmix3x_component.cache, opal_pmix3x_event_chain_t) { + OPAL_LIST_FOREACH(chain, &mca_pmix_pmix2x_component.cache, opal_pmix2x_event_chain_t) { if (sing->code == chain->status) { - opal_list_remove_item(&mca_pmix_pmix3x_component.cache, &chain->super); + opal_list_remove_item(&mca_pmix_pmix2x_component.cache, &chain->super); chain->sing = sing; sing->handler(chain->status, &chain->source, chain->info, &chain->results, @@ -1123,10 +1123,10 @@ static void _reg_hdlr(int sd, short args, void *cbdata) } } else if (NULL != multi) { /* check for multi code registrations */ - OPAL_LIST_FOREACH(chain, &mca_pmix_pmix3x_component.cache, opal_pmix3x_event_chain_t) { + OPAL_LIST_FOREACH(chain, &mca_pmix_pmix2x_component.cache, opal_pmix2x_event_chain_t) { for (n=0; n < multi->ncodes; n++) { if (multi->codes[n] == chain->status) { - opal_list_remove_item(&mca_pmix_pmix3x_component.cache, &chain->super); + opal_list_remove_item(&mca_pmix_pmix2x_component.cache, &chain->super); chain->multi = multi; multi->handler(chain->status, &chain->source, chain->info, &chain->results, @@ -1157,31 +1157,31 @@ static void register_handler(opal_list_t *event_codes, static void _dereg_hdlr(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; /* check the single events first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) { + OPAL_LIST_FOREACH(sing, &mca_pmix_pmix2x_component.single_events, opal_pmix2x_single_event_t) { if (cd->handler == sing->index) { - opal_list_remove_item(&mca_pmix_pmix3x_component.single_events, &sing->super); + opal_list_remove_item(&mca_pmix_pmix2x_component.single_events, &sing->super); OBJ_RELEASE(sing); goto release; } } /* check multi events */ - OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) { + OPAL_LIST_FOREACH(multi, &mca_pmix_pmix2x_component.multi_events, opal_pmix2x_multi_event_t) { if (cd->handler == multi->index) { - opal_list_remove_item(&mca_pmix_pmix3x_component.multi_events, &multi->super); + opal_list_remove_item(&mca_pmix_pmix2x_component.multi_events, &multi->super); OBJ_RELEASE(multi); goto release; } } /* check default events */ - OPAL_LIST_FOREACH(def, &mca_pmix_pmix3x_component.default_events, opal_pmix3x_default_event_t) { + OPAL_LIST_FOREACH(def, &mca_pmix_pmix2x_component.default_events, opal_pmix2x_default_event_t) { if (cd->handler == def->index) { - opal_list_remove_item(&mca_pmix_pmix3x_component.default_events, &def->super); + opal_list_remove_item(&mca_pmix_pmix2x_component.default_events, &def->super); OBJ_RELEASE(def); break; } @@ -1206,21 +1206,21 @@ static void deregister_handler(size_t evhandler, static void _notify_event(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; size_t i; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; - opal_pmix3x_event_chain_t *chain; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; + opal_pmix2x_event_chain_t *chain; /* check the single events first */ - OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) { + OPAL_LIST_FOREACH(sing, &mca_pmix_pmix2x_component.single_events, opal_pmix2x_single_event_t) { if (cd->status == sing->code) { /* found it - invoke the handler, pointing its * callback function to our progression function */ - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); chain->status = cd->status; - chain->range = pmix3x_convert_opalrange(cd->range); + chain->range = pmix2x_convert_opalrange(cd->range); chain->source = *(cd->source); chain->info = cd->info; chain->final_cbfunc = cd->opcbfunc; @@ -1237,14 +1237,14 @@ static void _notify_event(int sd, short args, void *cbdata) } } /* check multi events */ - OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) { + OPAL_LIST_FOREACH(multi, &mca_pmix_pmix2x_component.multi_events, opal_pmix2x_multi_event_t) { for (i=0; i < multi->ncodes; i++) { if (cd->status == multi->codes[i]) { /* found it - invoke the handler, pointing its * callback function to our progression function */ - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); chain->status = cd->status; - chain->range = pmix3x_convert_opalrange(cd->range); + chain->range = pmix2x_convert_opalrange(cd->range); chain->source = *(cd->source); chain->info = cd->info; chain->final_cbfunc = cd->opcbfunc; @@ -1262,11 +1262,11 @@ static void _notify_event(int sd, short args, void *cbdata) } } /* check default events */ - if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) { - def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_pmix3x_component.default_events); - chain = OBJ_NEW(opal_pmix3x_event_chain_t); + if (0 < opal_list_get_size(&mca_pmix_pmix2x_component.default_events)) { + def = (opal_pmix2x_default_event_t*)opal_list_get_first(&mca_pmix_pmix2x_component.default_events); + chain = OBJ_NEW(opal_pmix2x_event_chain_t); chain->status = cd->status; - chain->range = pmix3x_convert_opalrange(cd->range); + chain->range = pmix2x_convert_opalrange(cd->range); chain->source = *(cd->source); chain->info = cd->info; chain->final_cbfunc = cd->opcbfunc; @@ -1302,7 +1302,7 @@ static int notify_event(int status, return OPAL_SUCCESS; } -static void pmix3x_query(opal_list_t *queries, +static void pmix2x_query(opal_list_t *queries, opal_pmix_info_cbfunc_t cbfunc, void *cbdata) { if (NULL != cbfunc) { @@ -1313,21 +1313,21 @@ static void pmix3x_query(opal_list_t *queries, static void opcbfunc(pmix_status_t status, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; if (NULL != op->opcbfunc) { - op->opcbfunc(pmix3x_convert_rc(status), op->cbdata); + op->opcbfunc(pmix2x_convert_rc(status), op->cbdata); } OBJ_RELEASE(op); } -static void pmix3x_log(opal_list_t *info, +static void pmix2x_log(opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; opal_value_t *ival; size_t n, ninfo; - pmix3x_opcaddy_t *cd; + pmix2x_opcaddy_t *cd; /* bozo check */ if (NULL == info || 0 == (ninfo = opal_list_get_size(info))) { @@ -1336,7 +1336,7 @@ static void pmix3x_log(opal_list_t *info, } /* setup the operation */ - cd = OBJ_NEW(pmix3x_opcaddy_t); + cd = OBJ_NEW(pmix2x_opcaddy_t); cd->opcbfunc = cbfunc; cd->cbdata = cbdata; cd->ninfo = ninfo; @@ -1346,7 +1346,7 @@ static void pmix3x_log(opal_list_t *info, n=0; OPAL_LIST_FOREACH(ival, info, opal_value_t) { (void)strncpy(cd->info[n].key, ival->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&cd->info[n].value, ival); + pmix2x_value_load(&cd->info[n].value, ival); ++n; } @@ -1362,34 +1362,34 @@ static void pmix3x_log(opal_list_t *info, } /**** INSTANTIATE INTERNAL CLASSES ****/ -OBJ_CLASS_INSTANCE(opal_pmix3x_jobid_trkr_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_jobid_trkr_t, opal_list_item_t, NULL, NULL); -OBJ_CLASS_INSTANCE(opal_pmix3x_single_event_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_single_event_t, opal_list_item_t, NULL, NULL); -static void mtevcon(opal_pmix3x_multi_event_t *p) +static void mtevcon(opal_pmix2x_multi_event_t *p) { p->codes = NULL; p->ncodes = 0; } -static void mtevdes(opal_pmix3x_multi_event_t *p) +static void mtevdes(opal_pmix2x_multi_event_t *p) { if (NULL != p->codes) { free(p->codes); } } -OBJ_CLASS_INSTANCE(opal_pmix3x_multi_event_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_multi_event_t, opal_list_item_t, mtevcon, mtevdes); -OBJ_CLASS_INSTANCE(opal_pmix3x_default_event_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_default_event_t, opal_list_item_t, NULL, NULL); -static void chcon(opal_pmix3x_event_chain_t *p) +static void chcon(opal_pmix2x_event_chain_t *p) { p->nondefault = false; p->info = NULL; @@ -1400,15 +1400,15 @@ static void chcon(opal_pmix3x_event_chain_t *p) p->final_cbfunc = NULL; p->final_cbdata = NULL; } -static void chdes(opal_pmix3x_event_chain_t *p) +static void chdes(opal_pmix2x_event_chain_t *p) { OPAL_LIST_DESTRUCT(&p->results); } -OBJ_CLASS_INSTANCE(opal_pmix3x_event_chain_t, +OBJ_CLASS_INSTANCE(opal_pmix2x_event_chain_t, opal_list_item_t, chcon, chdes); -static void opcon(pmix3x_opcaddy_t *p) +static void opcon(pmix2x_opcaddy_t *p) { memset(&p->p, 0, sizeof(pmix_proc_t)); p->procs = NULL; @@ -1427,7 +1427,7 @@ static void opcon(pmix3x_opcaddy_t *p) p->spcbfunc = NULL; p->cbdata = NULL; } -static void opdes(pmix3x_opcaddy_t *p) +static void opdes(pmix2x_opcaddy_t *p) { if (NULL != p->procs) { PMIX_PROC_FREE(p->procs, p->nprocs); @@ -1442,11 +1442,11 @@ static void opdes(pmix3x_opcaddy_t *p) PMIX_APP_FREE(p->apps, p->sz); } } -OBJ_CLASS_INSTANCE(pmix3x_opcaddy_t, +OBJ_CLASS_INSTANCE(pmix2x_opcaddy_t, opal_object_t, opcon, opdes); -static void ocadcon(pmix3x_opalcaddy_t *p) +static void ocadcon(pmix2x_opalcaddy_t *p) { OBJ_CONSTRUCT(&p->procs, opal_list_t); OBJ_CONSTRUCT(&p->info, opal_list_t); @@ -1462,17 +1462,17 @@ static void ocadcon(pmix3x_opalcaddy_t *p) p->toolcbfunc = NULL; p->ocbdata = NULL; } -static void ocaddes(pmix3x_opalcaddy_t *p) +static void ocaddes(pmix2x_opalcaddy_t *p) { OPAL_LIST_DESTRUCT(&p->procs); OPAL_LIST_DESTRUCT(&p->info); OPAL_LIST_DESTRUCT(&p->apps); } -OBJ_CLASS_INSTANCE(pmix3x_opalcaddy_t, +OBJ_CLASS_INSTANCE(pmix2x_opalcaddy_t, opal_object_t, ocadcon, ocaddes); -static void tscon(pmix3x_threadshift_t *p) +static void tscon(pmix2x_threadshift_t *p) { p->active = false; p->source = NULL; @@ -1484,6 +1484,6 @@ static void tscon(pmix3x_threadshift_t *p) p->opcbfunc = NULL; p->cbdata = NULL; } -OBJ_CLASS_INSTANCE(pmix3x_threadshift_t, +OBJ_CLASS_INSTANCE(pmix2x_threadshift_t, opal_object_t, tscon, NULL); diff --git a/opal/mca/pmix/pmix3x/pmix3x.h b/opal/mca/pmix/pmix2x/pmix2x.h similarity index 69% rename from opal/mca/pmix/pmix3x/pmix3x.h rename to opal/mca/pmix/pmix2x/pmix2x.h index 3b85167fa79..c93aa9d4a07 100644 --- a/opal/mca/pmix/pmix3x/pmix3x.h +++ b/opal/mca/pmix/pmix2x/pmix2x.h @@ -44,27 +44,27 @@ typedef struct { opal_list_t default_events; int cache_size; opal_list_t cache; -} mca_pmix_pmix3x_component_t; +} mca_pmix_pmix2x_component_t; -OPAL_DECLSPEC extern mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component; +OPAL_DECLSPEC extern mca_pmix_pmix2x_component_t mca_pmix_pmix2x_component; -OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_pmix3x_module; +OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_pmix2x_module; /**** INTERNAL OBJECTS ****/ typedef struct { opal_list_item_t super; opal_jobid_t jobid; char nspace[PMIX_MAX_NSLEN + 1]; -} opal_pmix3x_jobid_trkr_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_jobid_trkr_t); +} opal_pmix2x_jobid_trkr_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_jobid_trkr_t); typedef struct { opal_list_item_t super; size_t index; int code; opal_pmix_notification_fn_t handler; -} opal_pmix3x_single_event_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_single_event_t); +} opal_pmix2x_single_event_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_single_event_t); typedef struct { opal_list_item_t super; @@ -72,15 +72,15 @@ typedef struct { int *codes; size_t ncodes; opal_pmix_notification_fn_t handler; -} opal_pmix3x_multi_event_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_multi_event_t); +} opal_pmix2x_multi_event_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_multi_event_t); typedef struct { opal_list_item_t super; size_t index; opal_pmix_notification_fn_t handler; -} opal_pmix3x_default_event_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_default_event_t); +} opal_pmix2x_default_event_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_default_event_t); typedef struct { opal_list_item_t super; @@ -90,13 +90,13 @@ typedef struct { pmix_data_range_t range; opal_list_t *info; opal_list_t results; - opal_pmix3x_single_event_t *sing; - opal_pmix3x_multi_event_t *multi; - opal_pmix3x_default_event_t *def; + opal_pmix2x_single_event_t *sing; + opal_pmix2x_multi_event_t *multi; + opal_pmix2x_default_event_t *def; opal_pmix_op_cbfunc_t final_cbfunc; void *final_cbdata; -} opal_pmix3x_event_chain_t; -OBJ_CLASS_DECLARATION(opal_pmix3x_event_chain_t); +} opal_pmix2x_event_chain_t; +OBJ_CLASS_DECLARATION(opal_pmix2x_event_chain_t); typedef struct { opal_object_t super; @@ -117,8 +117,8 @@ typedef struct { opal_pmix_lookup_cbfunc_t lkcbfunc; opal_pmix_spawn_cbfunc_t spcbfunc; void *cbdata; -} pmix3x_opcaddy_t; -OBJ_CLASS_DECLARATION(pmix3x_opcaddy_t); +} pmix2x_opcaddy_t; +OBJ_CLASS_DECLARATION(pmix2x_opcaddy_t); typedef struct { opal_object_t super; @@ -135,8 +135,8 @@ typedef struct { void *cbdata; opal_pmix_release_cbfunc_t odmdxfunc; void *ocbdata; -} pmix3x_opalcaddy_t; -OBJ_CLASS_DECLARATION(pmix3x_opalcaddy_t); +} pmix2x_opalcaddy_t; +OBJ_CLASS_DECLARATION(pmix2x_opalcaddy_t); typedef struct { opal_object_t super; @@ -156,13 +156,13 @@ typedef struct { opal_pmix_evhandler_reg_cbfunc_t cbfunc; opal_pmix_op_cbfunc_t opcbfunc; void *cbdata; -} pmix3x_threadshift_t; -OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); +} pmix2x_threadshift_t; +OBJ_CLASS_DECLARATION(pmix2x_threadshift_t); #define OPAL_PMIX_OPCD_THREADSHIFT(i, s, sr, if, nif, fn, cb, cd) \ do { \ - pmix3x_opalcaddy_t *_cd; \ - _cd = OBJ_NEW(pmix3x_opalcaddy_t); \ + pmix2x_opalcaddy_t *_cd; \ + _cd = OBJ_NEW(pmix2x_opalcaddy_t); \ _cd->id = (i); \ _cd->status = (s); \ _cd->source = (sr); \ @@ -176,8 +176,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); #define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \ do { \ - pmix3x_threadshift_t *_cd; \ - _cd = OBJ_NEW(pmix3x_threadshift_t); \ + pmix2x_threadshift_t *_cd; \ + _cd = OBJ_NEW(pmix2x_threadshift_t); \ _cd->handler = (e); \ _cd->opcbfunc = (cb); \ _cd->cbdata = (cd); \ @@ -188,8 +188,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); #define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \ do { \ - pmix3x_threadshift_t *_cd; \ - _cd = OBJ_NEW(pmix3x_threadshift_t); \ + pmix2x_threadshift_t *_cd; \ + _cd = OBJ_NEW(pmix2x_threadshift_t); \ _cd->event_codes = (e); \ _cd->info = (i); \ _cd->evhandler = (eh); \ @@ -202,8 +202,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); #define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \ do { \ - pmix3x_threadshift_t *_cd; \ - _cd = OBJ_NEW(pmix3x_threadshift_t); \ + pmix2x_threadshift_t *_cd; \ + _cd = OBJ_NEW(pmix2x_threadshift_t); \ _cd->status = (s); \ _cd->source = (sr); \ _cd->range = (r); \ @@ -216,106 +216,106 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t); } while(0) /**** CLIENT FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int pmix3x_client_init(void); -OPAL_MODULE_DECLSPEC int pmix3x_client_finalize(void); -OPAL_MODULE_DECLSPEC int pmix3x_initialized(void); -OPAL_MODULE_DECLSPEC int pmix3x_abort(int flag, const char *msg, +OPAL_MODULE_DECLSPEC int pmix2x_client_init(void); +OPAL_MODULE_DECLSPEC int pmix2x_client_finalize(void); +OPAL_MODULE_DECLSPEC int pmix2x_initialized(void); +OPAL_MODULE_DECLSPEC int pmix2x_abort(int flag, const char *msg, opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_commit(void); -OPAL_MODULE_DECLSPEC int pmix3x_fence(opal_list_t *procs, int collect_data); -OPAL_MODULE_DECLSPEC int pmix3x_fencenb(opal_list_t *procs, int collect_data, +OPAL_MODULE_DECLSPEC int pmix2x_commit(void); +OPAL_MODULE_DECLSPEC int pmix2x_fence(opal_list_t *procs, int collect_data); +OPAL_MODULE_DECLSPEC int pmix2x_fencenb(opal_list_t *procs, int collect_data, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_put(opal_pmix_scope_t scope, +OPAL_MODULE_DECLSPEC int pmix2x_put(opal_pmix_scope_t scope, opal_value_t *val); -OPAL_MODULE_DECLSPEC int pmix3x_get(const opal_process_name_t *proc, const char *key, +OPAL_MODULE_DECLSPEC int pmix2x_get(const opal_process_name_t *proc, const char *key, opal_list_t *info, opal_value_t **val); -OPAL_MODULE_DECLSPEC int pmix3x_getnb(const opal_process_name_t *proc, const char *key, +OPAL_MODULE_DECLSPEC int pmix2x_getnb(const opal_process_name_t *proc, const char *key, opal_list_t *info, opal_pmix_value_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_publish(opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_publishnb(opal_list_t *info, +OPAL_MODULE_DECLSPEC int pmix2x_publish(opal_list_t *info); +OPAL_MODULE_DECLSPEC int pmix2x_publishnb(opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_lookup(opal_list_t *data, opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_lookupnb(char **keys, opal_list_t *info, +OPAL_MODULE_DECLSPEC int pmix2x_lookup(opal_list_t *data, opal_list_t *info); +OPAL_MODULE_DECLSPEC int pmix2x_lookupnb(char **keys, opal_list_t *info, opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_unpublish(char **keys, opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_unpublishnb(char **keys, opal_list_t *info, +OPAL_MODULE_DECLSPEC int pmix2x_unpublish(char **keys, opal_list_t *info); +OPAL_MODULE_DECLSPEC int pmix2x_unpublishnb(char **keys, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid); -OPAL_MODULE_DECLSPEC int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps, +OPAL_MODULE_DECLSPEC int pmix2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid); +OPAL_MODULE_DECLSPEC int pmix2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_connect(opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_connectnb(opal_list_t *procs, +OPAL_MODULE_DECLSPEC int pmix2x_connect(opal_list_t *procs); +OPAL_MODULE_DECLSPEC int pmix2x_connectnb(opal_list_t *procs, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_disconnect(opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_disconnectnb(opal_list_t *procs, +OPAL_MODULE_DECLSPEC int pmix2x_disconnect(opal_list_t *procs); +OPAL_MODULE_DECLSPEC int pmix2x_disconnectnb(opal_list_t *procs, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, +OPAL_MODULE_DECLSPEC int pmix2x_resolve_peers(const char *nodename, opal_jobid_t jobid, opal_list_t *procs); -OPAL_MODULE_DECLSPEC int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist); +OPAL_MODULE_DECLSPEC int pmix2x_resolve_nodes(opal_jobid_t jobid, char **nodelist); /**** COMMON FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int pmix3x_store_local(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC int pmix2x_store_local(const opal_process_name_t *proc, opal_value_t *val); /**** SERVER SOUTHBOUND FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC int pmix3x_server_init(opal_pmix_server_module_t *module, +OPAL_MODULE_DECLSPEC int pmix2x_server_init(opal_pmix_server_module_t *module, opal_list_t *info); -OPAL_MODULE_DECLSPEC int pmix3x_server_finalize(void); -OPAL_MODULE_DECLSPEC int pmix3x_server_gen_regex(const char *input, char **regex); -OPAL_MODULE_DECLSPEC int pmix3x_server_gen_ppn(const char *input, char **ppn); -OPAL_MODULE_DECLSPEC int pmix3x_server_register_nspace(opal_jobid_t jobid, +OPAL_MODULE_DECLSPEC int pmix2x_server_finalize(void); +OPAL_MODULE_DECLSPEC int pmix2x_server_gen_regex(const char *input, char **regex); +OPAL_MODULE_DECLSPEC int pmix2x_server_gen_ppn(const char *input, char **ppn); +OPAL_MODULE_DECLSPEC int pmix2x_server_register_nspace(opal_jobid_t jobid, int nlocalprocs, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC void pmix3x_server_deregister_nspace(opal_jobid_t jobid, +OPAL_MODULE_DECLSPEC void pmix2x_server_deregister_nspace(opal_jobid_t jobid, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_server_register_client(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC int pmix2x_server_register_client(const opal_process_name_t *proc, uid_t uid, gid_t gid, void *server_object, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC void pmix3x_server_deregister_client(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC void pmix2x_server_deregister_client(const opal_process_name_t *proc, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env); -OPAL_MODULE_DECLSPEC int pmix3x_server_dmodex(const opal_process_name_t *proc, +OPAL_MODULE_DECLSPEC int pmix2x_server_setup_fork(const opal_process_name_t *proc, char ***env); +OPAL_MODULE_DECLSPEC int pmix2x_server_dmodex(const opal_process_name_t *proc, opal_pmix_modex_cbfunc_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC int pmix3x_server_notify_event(int status, +OPAL_MODULE_DECLSPEC int pmix2x_server_notify_event(int status, const opal_process_name_t *source, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata); /**** COMPONENT UTILITY FUNCTIONS ****/ -OPAL_MODULE_DECLSPEC void pmix3x_event_hdlr(size_t evhdlr_registration_id, +OPAL_MODULE_DECLSPEC void pmix2x_event_hdlr(size_t evhdlr_registration_id, pmix_status_t status, const pmix_proc_t *source, pmix_info_t info[], size_t ninfo, pmix_info_t results[], size_t nresults, pmix_event_notification_cbfunc_fn_t cbfunc, void *cbdata); -OPAL_MODULE_DECLSPEC pmix_status_t pmix3x_convert_opalrc(int rc); -OPAL_MODULE_DECLSPEC int pmix3x_convert_rc(pmix_status_t rc); +OPAL_MODULE_DECLSPEC pmix_status_t pmix2x_convert_opalrc(int rc); +OPAL_MODULE_DECLSPEC int pmix2x_convert_rc(pmix_status_t rc); -OPAL_MODULE_DECLSPEC opal_vpid_t pmix3x_convert_rank(int rank); -OPAL_MODULE_DECLSPEC pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid); +OPAL_MODULE_DECLSPEC opal_vpid_t pmix2x_convert_rank(int rank); +OPAL_MODULE_DECLSPEC pmix_rank_t pmix2x_convert_opalrank(opal_vpid_t vpid); -OPAL_MODULE_DECLSPEC opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope); -OPAL_MODULE_DECLSPEC pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope); +OPAL_MODULE_DECLSPEC opal_pmix_scope_t pmix2x_convert_scope(pmix_scope_t scope); +OPAL_MODULE_DECLSPEC pmix_scope_t pmix2x_convert_opalscope(opal_pmix_scope_t scope); -OPAL_MODULE_DECLSPEC pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range); -OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range); +OPAL_MODULE_DECLSPEC pmix_data_range_t pmix2x_convert_opalrange(opal_pmix_data_range_t range); +OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix2x_convert_range(pmix_data_range_t range); -OPAL_MODULE_DECLSPEC opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t scope); -OPAL_MODULE_DECLSPEC pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t scope); +OPAL_MODULE_DECLSPEC opal_pmix_persistence_t pmix2x_convert_persist(pmix_persistence_t scope); +OPAL_MODULE_DECLSPEC pmix_persistence_t pmix2x_convert_opalpersist(opal_pmix_persistence_t scope); -OPAL_MODULE_DECLSPEC void pmix3x_value_load(pmix_value_t *v, +OPAL_MODULE_DECLSPEC void pmix2x_value_load(pmix_value_t *v, opal_value_t *kv); -OPAL_MODULE_DECLSPEC int pmix3x_value_unload(opal_value_t *kv, +OPAL_MODULE_DECLSPEC int pmix2x_value_unload(opal_value_t *kv, const pmix_value_t *v); END_C_DECLS diff --git a/opal/mca/pmix/pmix3x/pmix3x_client.c b/opal/mca/pmix/pmix2x/pmix2x_client.c similarity index 79% rename from opal/mca/pmix/pmix3x/pmix3x_client.c rename to opal/mca/pmix/pmix2x/pmix2x_client.c index ca7c7995475..1bf3713c80c 100644 --- a/opal/mca/pmix/pmix3x/pmix3x_client.c +++ b/opal/mca/pmix/pmix2x/pmix2x_client.c @@ -31,7 +31,7 @@ #include "opal/util/proc.h" #include "opal/mca/pmix/base/base.h" -#include "pmix3x.h" +#include "pmix2x.h" #include "pmix.h" static pmix_proc_t my_proc; @@ -56,12 +56,12 @@ static void errreg_cbfunc (pmix_status_t status, status, (unsigned long)errhandler_ref); } -int pmix3x_client_init(void) +int pmix2x_client_init(void) { opal_process_name_t pname; pmix_status_t rc; int dbg; - opal_pmix3x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client init"); @@ -73,14 +73,14 @@ int pmix3x_client_init(void) rc = PMIx_Init(&my_proc, NULL, 0); if (PMIX_SUCCESS != rc) { - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } /* store our jobid and rank */ if (NULL != getenv(OPAL_MCA_PREFIX"orte_launch")) { /* if we were launched by the OMPI RTE, then * the jobid is in a special format - so get it */ - mca_pmix_pmix3x_component.native_launch = true; + mca_pmix_pmix2x_component.native_launch = true; opal_convert_string_to_jobid(&pname.jobid, my_proc.nspace); } else { /* we were launched by someone else, so make the @@ -89,21 +89,21 @@ int pmix3x_client_init(void) } /* insert this into our list of jobids - it will be the * first, and so we'll check it first */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, my_proc.nspace, PMIX_MAX_NSLEN); job->jobid = pname.jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); - pname.vpid = pmix3x_convert_rank(my_proc.rank); + pname.vpid = pmix2x_convert_rank(my_proc.rank); opal_proc_set_name(&pname); /* register the default event handler */ - PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix3x_event_hdlr, errreg_cbfunc, NULL); + PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix2x_event_hdlr, errreg_cbfunc, NULL); return OPAL_SUCCESS; } -int pmix3x_client_finalize(void) +int pmix2x_client_finalize(void) { pmix_status_t rc; @@ -114,10 +114,10 @@ int pmix3x_client_finalize(void) PMIx_Deregister_event_handler(errhdler_ref, NULL, NULL); rc = PMIx_Finalize(NULL, 0); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_initialized(void) +int pmix2x_initialized(void) { opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client initialized"); @@ -125,14 +125,14 @@ int pmix3x_initialized(void) return PMIx_Initialized(); } -int pmix3x_abort(int flag, const char *msg, +int pmix2x_abort(int flag, const char *msg, opal_list_t *procs) { pmix_status_t rc; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client abort"); @@ -146,7 +146,7 @@ int pmix3x_abort(int flag, const char *msg, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; @@ -157,7 +157,7 @@ int pmix3x_abort(int flag, const char *msg, return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } } @@ -168,15 +168,15 @@ int pmix3x_abort(int flag, const char *msg, /* release the array */ PMIX_PROC_FREE(parray, cnt); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_store_local(const opal_process_name_t *proc, opal_value_t *val) +int pmix2x_store_local(const opal_process_name_t *proc, opal_value_t *val) { pmix_value_t kv; pmix_status_t rc; pmix_proc_t p; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -185,7 +185,7 @@ int pmix3x_store_local(const opal_process_name_t *proc, opal_value_t *val) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == proc->jobid) { job = jptr; break; @@ -196,48 +196,48 @@ int pmix3x_store_local(const opal_process_name_t *proc, opal_value_t *val) return OPAL_ERR_NOT_FOUND; } (void)strncpy(p.nspace, job->nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); } else { /* use our name */ (void)strncpy(p.nspace, my_proc.nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(OPAL_PROC_MY_NAME.vpid); + p.rank = pmix2x_convert_opalrank(OPAL_PROC_MY_NAME.vpid); } PMIX_VALUE_CONSTRUCT(&kv); - pmix3x_value_load(&kv, val); + pmix2x_value_load(&kv, val); rc = PMIx_Store_internal(&p, val->key, &kv); PMIX_VALUE_DESTRUCT(&kv); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_commit(void) +int pmix2x_commit(void) { pmix_status_t rc; rc = PMIx_Commit(); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } static void opcbfunc(pmix_status_t status, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; if (NULL != op->opcbfunc) { - op->opcbfunc(pmix3x_convert_rc(status), op->cbdata); + op->opcbfunc(pmix2x_convert_rc(status), op->cbdata); } OBJ_RELEASE(op); } -int pmix3x_fence(opal_list_t *procs, int collect_data) +int pmix2x_fence(opal_list_t *procs, int collect_data) { pmix_status_t rc; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; pmix_info_t info, *iptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client fence"); @@ -251,7 +251,7 @@ int pmix3x_fence(opal_list_t *procs, int collect_data) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; @@ -262,7 +262,7 @@ int pmix3x_fence(opal_list_t *procs, int collect_data) return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } } @@ -287,20 +287,20 @@ int pmix3x_fence(opal_list_t *procs, int collect_data) PMIX_INFO_DESTRUCT(&info); } - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_fencenb(opal_list_t *procs, int collect_data, +int pmix2x_fencenb(opal_list_t *procs, int collect_data, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t rc; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; pmix_info_t info, *iptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -317,7 +317,7 @@ int pmix3x_fencenb(opal_list_t *procs, int collect_data, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; @@ -328,7 +328,7 @@ int pmix3x_fencenb(opal_list_t *procs, int collect_data, return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } } @@ -346,7 +346,7 @@ int pmix3x_fencenb(opal_list_t *procs, int collect_data, } /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; op->procs = parray; @@ -358,29 +358,29 @@ int pmix3x_fencenb(opal_list_t *procs, int collect_data, OBJ_RELEASE(op); } - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_put(opal_pmix_scope_t opal_scope, +int pmix2x_put(opal_pmix_scope_t opal_scope, opal_value_t *val) { pmix_value_t kv; - pmix_scope_t pmix_scope = pmix3x_convert_opalscope(opal_scope); + pmix_scope_t pmix_scope = pmix2x_convert_opalscope(opal_scope); pmix_status_t rc; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client put"); PMIX_VALUE_CONSTRUCT(&kv); - pmix3x_value_load(&kv, val); + pmix2x_value_load(&kv, val); rc = PMIx_Put(pmix_scope, val->key, &kv); PMIX_VALUE_DESTRUCT(&kv); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_get(const opal_process_name_t *proc, const char *key, +int pmix2x_get(const opal_process_name_t *proc, const char *key, opal_list_t *info, opal_value_t **val) { int ret; @@ -390,7 +390,7 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key, size_t ninfo, n; pmix_info_t *pinfo; opal_value_t *ival; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "%s PMIx_client get on proc %s key %s", @@ -403,7 +403,7 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == proc->jobid) { job = jptr; break; @@ -413,7 +413,7 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key, return OPAL_ERR_NOT_FOUND; } (void)strncpy(p.nspace, job->nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); pptr = &p; } else { /* if they are asking for our jobid, then return it */ @@ -425,7 +425,7 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key, } else if (0 == strcmp(key, OPAL_PMIX_RANK)) { (*val) = OBJ_NEW(opal_value_t); (*val)->type = OPAL_INT; - (*val)->data.integer = pmix3x_convert_rank(my_proc.rank); + (*val)->data.integer = pmix2x_convert_rank(my_proc.rank); return OPAL_SUCCESS; } pptr = NULL; @@ -438,7 +438,7 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key, n=0; OPAL_LIST_FOREACH(ival, info, opal_value_t) { (void)strncpy(pinfo[n].key, ival->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, ival); + pmix2x_value_load(&pinfo[n].value, ival); ++n; } } else { @@ -456,11 +456,11 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key, ret = OPAL_SUCCESS; } else { *val = OBJ_NEW(opal_value_t); - ret = pmix3x_value_unload(*val, kv); + ret = pmix2x_value_unload(*val, kv); PMIX_VALUE_FREE(kv, 1); } } else { - ret = pmix3x_convert_rc(rc); + ret = pmix2x_convert_rc(rc); } PMIX_INFO_FREE(pinfo, ninfo); return ret; @@ -469,13 +469,13 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key, static void val_cbfunc(pmix_status_t status, pmix_value_t *kv, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; int rc; opal_value_t val, *v=NULL; - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); if (PMIX_SUCCESS == status && NULL != kv) { - rc = pmix3x_value_unload(&val, kv); + rc = pmix2x_value_unload(&val, kv); v = &val; } @@ -485,15 +485,15 @@ static void val_cbfunc(pmix_status_t status, OBJ_RELEASE(op); } -int pmix3x_getnb(const opal_process_name_t *proc, const char *key, +int pmix2x_getnb(const opal_process_name_t *proc, const char *key, opal_list_t *info, opal_pmix_value_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; pmix_status_t rc; size_t n; opal_value_t *ival; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access shared lists/objects */ @@ -504,7 +504,7 @@ int pmix3x_getnb(const opal_process_name_t *proc, const char *key, (NULL == proc) ? "NULL" : OPAL_NAME_PRINT(*proc), key); /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->valcbfunc = cbfunc; op->cbdata = cbdata; @@ -512,7 +512,7 @@ int pmix3x_getnb(const opal_process_name_t *proc, const char *key, /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == proc->jobid) { job = jptr; break; @@ -522,10 +522,10 @@ int pmix3x_getnb(const opal_process_name_t *proc, const char *key, return OPAL_ERR_NOT_FOUND; } (void)strncpy(op->p.nspace, job->nspace, PMIX_MAX_NSLEN); - op->p.rank = pmix3x_convert_opalrank(proc->vpid); + op->p.rank = pmix2x_convert_opalrank(proc->vpid); } else { (void)strncpy(op->p.nspace, my_proc.nspace, PMIX_MAX_NSLEN); - op->p.rank = pmix3x_convert_rank(PMIX_RANK_WILDCARD); + op->p.rank = pmix2x_convert_rank(PMIX_RANK_WILDCARD); } if (NULL != info) { @@ -535,7 +535,7 @@ int pmix3x_getnb(const opal_process_name_t *proc, const char *key, n=0; OPAL_LIST_FOREACH(ival, info, opal_value_t) { (void)strncpy(op->info[n].key, ival->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, ival); + pmix2x_value_load(&op->info[n].value, ival); ++n; } } @@ -547,10 +547,10 @@ int pmix3x_getnb(const opal_process_name_t *proc, const char *key, OBJ_RELEASE(op); } - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_publish(opal_list_t *info) +int pmix2x_publish(opal_list_t *info) { pmix_info_t *pinfo; pmix_status_t ret; @@ -570,7 +570,7 @@ int pmix3x_publish(opal_list_t *info) n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, iptr); + pmix2x_value_load(&pinfo[n].value, iptr); ++n; } } else { @@ -579,16 +579,16 @@ int pmix3x_publish(opal_list_t *info) ret = PMIx_Publish(pinfo, sz); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_publishnb(opal_list_t *info, +int pmix2x_publishnb(opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; opal_value_t *iptr; size_t n; - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; opal_output_verbose(1, opal_pmix_base_framework.framework_output, "PMIx_client publish_nb"); @@ -598,7 +598,7 @@ int pmix3x_publishnb(opal_list_t *info, } /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; @@ -608,17 +608,17 @@ int pmix3x_publishnb(opal_list_t *info, n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, iptr); + pmix2x_value_load(&op->info[n].value, iptr); ++n; } } ret = PMIx_Publish_nb(op->info, op->sz, opcbfunc, op); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_lookup(opal_list_t *data, opal_list_t *info) +int pmix2x_lookup(opal_list_t *data, opal_list_t *info) { pmix_pdata_t *pdata; pmix_info_t *pinfo; @@ -627,7 +627,7 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info) pmix_status_t ret; opal_pmix_pdata_t *d; opal_value_t *iptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access shared lists/objects */ @@ -651,7 +651,7 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info) n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, iptr); + pmix2x_value_load(&pinfo[n].value, iptr); ++n; } } else { @@ -666,7 +666,7 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info) /* transfer the data back */ n=0; OPAL_LIST_FOREACH(d, data, opal_pmix_pdata_t) { - if (mca_pmix_pmix3x_component.native_launch) { + if (mca_pmix_pmix2x_component.native_launch) { /* if we were launched by the OMPI RTE, then * the jobid is in a special format - so get it */ opal_convert_string_to_jobid(&d->proc.jobid, pdata[n].proc.nspace); @@ -677,20 +677,20 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info) } /* if we don't already have it, add this to our jobid tracker */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == d->proc.jobid) { job = jptr; break; } } if (NULL == job) { - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, pdata[n].proc.nspace, PMIX_MAX_NSLEN); job->jobid = d->proc.jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); } - d->proc.vpid = pmix3x_convert_rank(pdata[n].proc.rank); - rc = pmix3x_value_unload(&d->value, &pdata[n].value); + d->proc.vpid = pmix2x_convert_rank(pdata[n].proc.rank); + rc = pmix2x_value_unload(&d->value, &pdata[n].value); if (OPAL_SUCCESS != rc) { OPAL_ERROR_LOG(rc); PMIX_PDATA_FREE(pdata, sz); @@ -700,19 +700,19 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info) } } - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } static void lk_cbfunc(pmix_status_t status, pmix_pdata_t data[], size_t ndata, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; opal_pmix_pdata_t *d; opal_list_t results, *r = NULL; int rc; size_t n; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* this is in the PMIx local thread - need to threadshift to * our own thread as we will be accessing framework-global @@ -723,13 +723,13 @@ static void lk_cbfunc(pmix_status_t status, return; } - rc = pmix3x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (OPAL_SUCCESS == rc) { OBJ_CONSTRUCT(&results, opal_list_t); for (n=0; n < ndata; n++) { d = OBJ_NEW(opal_pmix_pdata_t); opal_list_append(&results, &d->super); - if (mca_pmix_pmix3x_component.native_launch) { + if (mca_pmix_pmix2x_component.native_launch) { /* if we were launched by the OMPI RTE, then * the jobid is in a special format - so get it */ opal_convert_string_to_jobid(&d->proc.jobid, data[n].proc.nspace); @@ -740,21 +740,21 @@ static void lk_cbfunc(pmix_status_t status, } /* if we don't already have it, add this to our jobid tracker */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == d->proc.jobid) { job = jptr; break; } } if (NULL == job) { - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, data[n].proc.nspace, PMIX_MAX_NSLEN); job->jobid = d->proc.jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); } - d->proc.vpid = pmix3x_convert_rank(data[n].proc.rank); + d->proc.vpid = pmix2x_convert_rank(data[n].proc.rank); d->value.key = strdup(data[n].key); - rc = pmix3x_value_unload(&d->value, &data[n].value); + rc = pmix2x_value_unload(&d->value, &data[n].value); if (OPAL_SUCCESS != rc) { rc = OPAL_ERR_BAD_PARAM; OPAL_ERROR_LOG(rc); @@ -773,11 +773,11 @@ static void lk_cbfunc(pmix_status_t status, OBJ_RELEASE(op); } -int pmix3x_lookupnb(char **keys, opal_list_t *info, +int pmix2x_lookupnb(char **keys, opal_list_t *info, opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; opal_value_t *iptr; size_t n; @@ -786,7 +786,7 @@ int pmix3x_lookupnb(char **keys, opal_list_t *info, "PMIx_client lookup_nb"); /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->lkcbfunc = cbfunc; op->cbdata = cbdata; @@ -797,7 +797,7 @@ int pmix3x_lookupnb(char **keys, opal_list_t *info, n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, iptr); + pmix2x_value_load(&op->info[n].value, iptr); ++n; } } @@ -805,10 +805,10 @@ int pmix3x_lookupnb(char **keys, opal_list_t *info, ret = PMIx_Lookup_nb(keys, op->info, op->sz, lk_cbfunc, op); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_unpublish(char **keys, opal_list_t *info) +int pmix2x_unpublish(char **keys, opal_list_t *info) { pmix_status_t ret; size_t ninfo, n; @@ -821,7 +821,7 @@ int pmix3x_unpublish(char **keys, opal_list_t *info) n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, iptr); + pmix2x_value_load(&pinfo[n].value, iptr); ++n; } } else { @@ -832,19 +832,19 @@ int pmix3x_unpublish(char **keys, opal_list_t *info) ret = PMIx_Unpublish(keys, pinfo, ninfo); PMIX_INFO_FREE(pinfo, ninfo); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_unpublishnb(char **keys, opal_list_t *info, +int pmix2x_unpublishnb(char **keys, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; opal_value_t *iptr; size_t n; /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; @@ -855,7 +855,7 @@ int pmix3x_unpublishnb(char **keys, opal_list_t *info, n=0; OPAL_LIST_FOREACH(iptr, info, opal_value_t) { (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, iptr); + pmix2x_value_load(&op->info[n].value, iptr); ++n; } } @@ -863,10 +863,10 @@ int pmix3x_unpublishnb(char **keys, opal_list_t *info, ret = PMIx_Unpublish_nb(keys, op->info, op->sz, opcbfunc, op); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) +int pmix2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) { pmix_status_t ret; pmix_info_t *pinfo = NULL; @@ -875,14 +875,14 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) char nspace[PMIX_MAX_NSLEN+1]; opal_value_t *info; opal_pmix_app_t *app; - opal_pmix3x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; if (NULL != job_info && 0 < (ninfo = opal_list_get_size(job_info))) { PMIX_INFO_CREATE(pinfo, ninfo); n=0; OPAL_LIST_FOREACH(info, job_info, opal_value_t) { (void)strncpy(pinfo[n].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, info); + pmix2x_value_load(&pinfo[n].value, info); ++n; } } @@ -901,7 +901,7 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) m=0; OPAL_LIST_FOREACH(info, &app->info, opal_value_t) { (void)strncpy(papps[n].info[m].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&papps[n].info[m].value, info); + pmix2x_value_load(&papps[n].info[m].value, info); ++m; } } @@ -910,7 +910,7 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) ret = PMIx_Spawn(pinfo, ninfo, papps, napps, nspace); if (PMIX_SUCCESS == ret) { - if (mca_pmix_pmix3x_component.native_launch) { + if (mca_pmix_pmix2x_component.native_launch) { /* if we were launched by the OMPI RTE, then * the jobid is in a special format - so get it */ opal_convert_string_to_jobid(jobid, nspace); @@ -920,31 +920,31 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid) OPAL_HASH_JOBID(nspace, *jobid); } /* add this to our jobid tracker */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = *jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); } PMIX_APP_FREE(papps, napps); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } static void spcbfunc(pmix_status_t status, char *nspace, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; int rc; opal_jobid_t jobid=OPAL_JOBID_INVALID; - opal_pmix3x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; /* this is in the PMIx local thread - need to threadshift to * our own thread as we will be accessing framework-global * lists and objects */ - rc = pmix3x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (PMIX_SUCCESS == status) { - if (mca_pmix_pmix3x_component.native_launch) { + if (mca_pmix_pmix2x_component.native_launch) { /* if we were launched by the OMPI RTE, then * the jobid is in a special format - so get it */ opal_convert_string_to_jobid(&jobid, nspace); @@ -954,27 +954,27 @@ static void spcbfunc(pmix_status_t status, OPAL_HASH_JOBID(nspace, jobid); } /* add this to our jobid tracker */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); } op->spcbfunc(rc, jobid, op->cbdata); OBJ_RELEASE(op); } -int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps, +int pmix2x_spawnnb(opal_list_t *job_info, opal_list_t *apps, opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; size_t n, m; opal_value_t *info; opal_pmix_app_t *app; /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->spcbfunc = cbfunc; op->cbdata = cbdata; @@ -983,7 +983,7 @@ int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps, n=0; OPAL_LIST_FOREACH(info, job_info, opal_value_t) { (void)strncpy(op->info[n].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->info[n].value, info); + pmix2x_value_load(&op->info[n].value, info); ++n; } } @@ -1002,7 +1002,7 @@ int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps, m=0; OPAL_LIST_FOREACH(info, &app->info, opal_value_t) { (void)strncpy(op->apps[n].info[m].key, info->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&op->apps[n].info[m].value, info); + pmix2x_value_load(&op->apps[n].info[m].value, info); ++m; } } @@ -1011,16 +1011,16 @@ int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps, ret = PMIx_Spawn_nb(op->info, op->ninfo, op->apps, op->sz, spcbfunc, op); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_connect(opal_list_t *procs) +int pmix2x_connect(opal_list_t *procs) { pmix_status_t ret; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* protect against bozo error */ if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { @@ -1035,7 +1035,7 @@ int pmix3x_connect(opal_list_t *procs) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == ptr->name.jobid) { job = jptr; break; @@ -1047,25 +1047,25 @@ int pmix3x_connect(opal_list_t *procs) return OPAL_ERR_NOT_FOUND; } (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Connect(parray, cnt, NULL, 0); PMIX_PROC_FREE(parray, cnt); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_connectnb(opal_list_t *procs, +int pmix2x_connectnb(opal_list_t *procs, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; size_t n, cnt=0; opal_namelist_t *ptr; - pmix3x_opcaddy_t *op; - opal_pmix3x_jobid_trkr_t *job; + pmix2x_opcaddy_t *op; + opal_pmix2x_jobid_trkr_t *job; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1076,7 +1076,7 @@ int pmix3x_connectnb(opal_list_t *procs, } /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; op->nprocs = cnt; @@ -1088,28 +1088,28 @@ int pmix3x_connectnb(opal_list_t *procs, OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { /* look thru our list of jobids and find the * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(job, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (job->jobid == ptr->name.jobid) { (void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN); break; } } - op->procs[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); + op->procs[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Connect_nb(op->procs, op->nprocs, NULL, 0, opcbfunc, op); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_disconnect(opal_list_t *procs) +int pmix2x_disconnect(opal_list_t *procs) { pmix_status_t ret; pmix_proc_t *parray=NULL; size_t n, cnt=0; opal_namelist_t *ptr; - opal_pmix3x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; /* protect against bozo error */ if (NULL == procs || 0 == (cnt = opal_list_get_size(procs))) { @@ -1123,31 +1123,31 @@ int pmix3x_disconnect(opal_list_t *procs) OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { /* look thru our list of jobids and find the * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(job, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (job->jobid == ptr->name.jobid) { (void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN); break; } } - parray[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); + parray[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Disconnect(parray, cnt, NULL, 0); PMIX_PROC_FREE(parray, cnt); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_disconnectnb(opal_list_t *procs, +int pmix2x_disconnectnb(opal_list_t *procs, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { pmix_status_t ret; size_t n, cnt=0; opal_namelist_t *ptr; - pmix3x_opcaddy_t *op; - opal_pmix3x_jobid_trkr_t *job; + pmix2x_opcaddy_t *op; + opal_pmix2x_jobid_trkr_t *job; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1158,7 +1158,7 @@ int pmix3x_disconnectnb(opal_list_t *procs, } /* create the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->opcbfunc = cbfunc; op->cbdata = cbdata; op->nprocs = cnt; @@ -1170,23 +1170,23 @@ int pmix3x_disconnectnb(opal_list_t *procs, OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) { /* look thru our list of jobids and find the * corresponding nspace */ - OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(job, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (job->jobid == ptr->name.jobid) { (void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN); break; } } - op->procs[n].rank = pmix3x_convert_opalrank(ptr->name.vpid); + op->procs[n].rank = pmix2x_convert_opalrank(ptr->name.vpid); ++n; } ret = PMIx_Disconnect_nb(op->procs, op->nprocs, NULL, 0, opcbfunc, op); - return pmix3x_convert_rc(ret); + return pmix2x_convert_rc(ret); } -int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, +int pmix2x_resolve_peers(const char *nodename, opal_jobid_t jobid, opal_list_t *procs) { char *nspace; @@ -1195,7 +1195,7 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, opal_namelist_t *nm; int rc; pmix_status_t ret; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1204,7 +1204,7 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, nspace = NULL; } else { job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { job = jptr; break; @@ -1217,13 +1217,13 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, } ret = PMIx_Resolve_peers(nodename, nspace, &array, &nprocs); - rc = pmix3x_convert_rc(ret); + rc = pmix2x_convert_rc(ret); if (NULL != array && 0 < nprocs) { for (n=0; n < nprocs; n++) { nm = OBJ_NEW(opal_namelist_t); opal_list_append(procs, &nm->super); - if (mca_pmix_pmix3x_component.native_launch) { + if (mca_pmix_pmix2x_component.native_launch) { /* if we were launched by the OMPI RTE, then * the jobid is in a special format - so get it */ opal_convert_string_to_jobid(&nm->name.jobid, array[n].nspace); @@ -1234,19 +1234,19 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, } /* if we don't already have it, add this to our jobid tracker */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == nm->name.jobid) { job = jptr; break; } } if (NULL == job) { - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); } - nm->name.vpid = pmix3x_convert_rank(array[n].rank); + nm->name.vpid = pmix2x_convert_rank(array[n].rank); } } PMIX_PROC_FREE(array, nprocs); @@ -1254,11 +1254,11 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid, return rc; } -int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist) +int pmix2x_resolve_nodes(opal_jobid_t jobid, char **nodelist) { pmix_status_t ret; char *nspace=NULL; - opal_pmix3x_jobid_trkr_t *job, *jptr; + opal_pmix2x_jobid_trkr_t *job, *jptr; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -1267,7 +1267,7 @@ int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist) /* look thru our list of jobids and find the * corresponding nspace */ job = NULL; - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == jobid) { job = jptr; break; @@ -1281,5 +1281,5 @@ int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist) ret = PMIx_Resolve_nodes(nspace, nodelist); - return pmix3x_convert_rc(ret);; + return pmix2x_convert_rc(ret);; } diff --git a/opal/mca/pmix/pmix3x/pmix3x_component.c b/opal/mca/pmix/pmix2x/pmix2x_component.c similarity index 73% rename from opal/mca/pmix/pmix3x/pmix3x_component.c rename to opal/mca/pmix/pmix2x/pmix2x_component.c index cd76f551098..3079cbc3b75 100644 --- a/opal/mca/pmix/pmix3x/pmix3x_component.c +++ b/opal/mca/pmix/pmix2x/pmix2x_component.c @@ -22,13 +22,13 @@ #include "opal/class/opal_list.h" #include "opal/util/proc.h" #include "opal/mca/pmix/pmix.h" -#include "pmix3x.h" +#include "pmix2x.h" /* * Public string showing the pmix external component version number */ -const char *opal_pmix_pmix3x_component_version_string = - "OPAL pmix3x MCA component version " OPAL_VERSION; +const char *opal_pmix_pmix2x_component_version_string = + "OPAL pmix2x MCA component version " OPAL_VERSION; /* * Local function @@ -44,7 +44,7 @@ static int external_register(void); * and pointers to our public functions in it */ -mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component = { +mca_pmix_pmix2x_component_t mca_pmix_pmix2x_component = { { /* First, the mca_component_t struct containing meta information about the component itself */ @@ -57,7 +57,7 @@ mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component = { /* Component name and version */ - .mca_component_name = "pmix3x", + .mca_component_name = "pmix2x", MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION), @@ -79,12 +79,12 @@ mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component = { static int external_register(void) { - mca_pmix_pmix3x_component.cache_size = 256; - mca_base_component_var_register(&mca_pmix_pmix3x_component.super.base_version, + mca_pmix_pmix2x_component.cache_size = 256; + mca_base_component_var_register(&mca_pmix_pmix2x_component.super.base_version, "cache_size", "Size of the ring buffer cache for events", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_CONSTANT, - &mca_pmix_pmix3x_component.cache_size); + &mca_pmix_pmix2x_component.cache_size); return OPAL_SUCCESS; } @@ -92,23 +92,23 @@ static int external_register(void) static int external_open(void) { - mca_pmix_pmix3x_component.evindex = 0; - OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.jobids, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.single_events, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.multi_events, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.default_events, opal_list_t); - OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.cache, opal_list_t); + mca_pmix_pmix2x_component.evindex = 0; + OBJ_CONSTRUCT(&mca_pmix_pmix2x_component.jobids, opal_list_t); + OBJ_CONSTRUCT(&mca_pmix_pmix2x_component.single_events, opal_list_t); + OBJ_CONSTRUCT(&mca_pmix_pmix2x_component.multi_events, opal_list_t); + OBJ_CONSTRUCT(&mca_pmix_pmix2x_component.default_events, opal_list_t); + OBJ_CONSTRUCT(&mca_pmix_pmix2x_component.cache, opal_list_t); return OPAL_SUCCESS; } static int external_close(void) { - OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.jobids); - OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.single_events); - OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.multi_events); - OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.default_events); - OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.cache); + OPAL_LIST_DESTRUCT(&mca_pmix_pmix2x_component.jobids); + OPAL_LIST_DESTRUCT(&mca_pmix_pmix2x_component.single_events); + OPAL_LIST_DESTRUCT(&mca_pmix_pmix2x_component.multi_events); + OPAL_LIST_DESTRUCT(&mca_pmix_pmix2x_component.default_events); + OPAL_LIST_DESTRUCT(&mca_pmix_pmix2x_component.cache); return OPAL_SUCCESS; } @@ -126,6 +126,6 @@ static int external_component_query(mca_base_module_t **module, int *priority) /* we could be a server, so we still need to be considered */ *priority = 5; } - *module = (mca_base_module_t *)&opal_pmix_pmix3x_module; + *module = (mca_base_module_t *)&opal_pmix_pmix2x_module; return OPAL_SUCCESS; } diff --git a/opal/mca/pmix/ext3x/pmix3x_server_north.c b/opal/mca/pmix/pmix2x/pmix2x_server_north.c similarity index 83% rename from opal/mca/pmix/ext3x/pmix3x_server_north.c rename to opal/mca/pmix/pmix2x/pmix2x_server_north.c index 3161f4c6b5f..3caf433bc6b 100644 --- a/opal/mca/pmix/ext3x/pmix3x_server_north.c +++ b/opal/mca/pmix/pmix2x/pmix2x_server_north.c @@ -35,7 +35,7 @@ #include "opal/util/proc.h" #include "opal/util/show_help.h" #include "opal/mca/pmix/base/base.h" -#include "pmix3x.h" +#include "pmix2x.h" #include "pmix.h" #include "pmix_server.h" @@ -126,10 +126,10 @@ opal_pmix_server_module_t *host_module = NULL; static void opal_opcbfunc(int status, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; if (NULL != opalcaddy->opcbfunc) { - opalcaddy->opcbfunc(pmix3x_convert_opalrc(status), opalcaddy->cbdata); + opalcaddy->opcbfunc(pmix2x_convert_opalrc(status), opalcaddy->cbdata); } OBJ_RELEASE(opalcaddy); } @@ -139,33 +139,33 @@ static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *serv { int rc; opal_process_name_t proc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; if (NULL == host_module || NULL == host_module->client_connected) { return PMIX_SUCCESS; } - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* pass it up */ rc = host_module->client_connected(&proc, server_object, opal_opcbfunc, opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* server_object, pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; if (NULL == host_module || NULL == host_module->client_finalized) { @@ -174,12 +174,12 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -188,7 +188,7 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, @@ -200,7 +200,7 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, opal_namelist_t *nm; opal_process_name_t proc; int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; if (NULL == host_module || NULL == host_module->abort) { return PMIX_ERR_NOT_SUPPORTED; @@ -208,12 +208,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -223,9 +223,9 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* pass it up */ @@ -234,12 +234,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object, if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void _data_release(void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; if (NULL != opalcaddy->odmdxfunc) { opalcaddy->odmdxfunc(opalcaddy->ocbdata); @@ -251,9 +251,9 @@ static void opmdx_response(int status, const char *data, size_t sz, void *cbdata opal_pmix_release_cbfunc_t relcbfunc, void *relcbdata) { pmix_status_t rc; - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; - rc = pmix3x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (NULL != opalcaddy->mdxcbfunc) { opalcaddy->odmdxfunc = relcbfunc; opalcaddy->ocbdata = relcbdata; @@ -269,7 +269,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, char *data, size_t ndata, pmix_modex_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; size_t n; opal_namelist_t *nm; opal_value_t *iptr; @@ -280,7 +280,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->mdxcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -290,9 +290,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* convert the array of pmix_info_t to the list of info */ @@ -300,9 +300,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -312,7 +312,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs, if (OPAL_SUCCESS != rc) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, @@ -320,7 +320,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, pmix_modex_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *iptr; size_t n; @@ -331,12 +331,12 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->mdxcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -345,9 +345,9 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -359,7 +359,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p, if (OPAL_ERR_IN_PROCESS == rc) { rc = OPAL_SUCCESS; } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_publish_fn(const pmix_proc_t *p, @@ -368,7 +368,7 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, { int rc; size_t n; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *oinfo; @@ -378,12 +378,12 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -392,9 +392,9 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -404,21 +404,21 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void opal_lkupcbfunc(int status, opal_list_t *data, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; pmix_status_t rc; pmix_pdata_t *d=NULL; size_t nd=0, n; opal_pmix_pdata_t *p; if (NULL != opalcaddy->lkupcbfunc) { - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* convert any returned data */ if (NULL != data) { nd = opal_list_get_size(data); @@ -427,9 +427,9 @@ static void opal_lkupcbfunc(int status, OPAL_LIST_FOREACH(p, data, opal_pmix_pdata_t) { /* convert the jobid */ (void)opal_snprintf_jobid(d[n].proc.nspace, PMIX_MAX_NSLEN, p->proc.jobid); - d[n].proc.rank = pmix3x_convert_opalrank(p->proc.vpid); + d[n].proc.rank = pmix2x_convert_opalrank(p->proc.vpid); (void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&d[n].value, &p->value); + pmix2x_value_load(&d[n].value, &p->value); } } opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata); @@ -442,7 +442,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, pmix_lookup_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *iptr; size_t n; @@ -453,12 +453,12 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->lkupcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -467,9 +467,9 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -479,7 +479,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } @@ -488,7 +488,7 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_value_t *iptr; size_t n; @@ -499,12 +499,12 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -513,9 +513,9 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, iptr = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &iptr->super); iptr->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -525,17 +525,17 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; pmix_status_t rc; char nspace[PMIX_MAX_NSLEN]; if (NULL != opalcaddy->spwncbfunc) { - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* convert the jobid */ (void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid); opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata); @@ -548,7 +548,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, const pmix_app_t apps[], size_t napps, pmix_spawn_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t proc; opal_pmix_app_t *app; opal_value_t *oinfo; @@ -561,12 +561,12 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, /* convert the nspace/rank to an opal_process_name_t */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) { - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - proc.vpid = pmix3x_convert_rank(p->rank); + proc.vpid = pmix2x_convert_rank(p->rank); /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->spwncbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -575,9 +575,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(job_info[k].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &job_info[k].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &job_info[k].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -600,9 +600,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&app->info, &oinfo->super); oinfo->key = strdup(apps[n].info[k].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &apps[n].info[k].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &apps[n].info[k].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } } @@ -614,7 +614,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } @@ -623,7 +623,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_namelist_t *nm; size_t n; opal_value_t *oinfo; @@ -633,7 +633,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -643,9 +643,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* convert the info */ @@ -653,9 +653,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -665,7 +665,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } @@ -674,7 +674,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro pmix_op_cbfunc_t cbfunc, void *cbdata) { int rc; - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_namelist_t *nm; size_t n; opal_value_t *oinfo; @@ -684,7 +684,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -694,9 +694,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro opal_list_append(&opalcaddy->procs, &nm->super); if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - nm->name.vpid = pmix3x_convert_rank(procs[n].rank); + nm->name.vpid = pmix2x_convert_rank(procs[n].rank); } /* convert the info */ @@ -704,9 +704,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -716,20 +716,20 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, const pmix_info_t info[], size_t ninfo, pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; size_t n; opal_value_t *oinfo; int rc; /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -738,9 +738,9 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -750,7 +750,7 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes, @@ -765,7 +765,7 @@ static pmix_status_t server_notify_event(pmix_status_t code, pmix_info_t info[], size_t ninfo, pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t src; size_t n; opal_value_t *oinfo; @@ -776,20 +776,20 @@ static pmix_status_t server_notify_event(pmix_status_t code, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; /* convert the code */ - status = pmix3x_convert_rc(code); + status = pmix2x_convert_rc(code); /* convert the source */ if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&src.jobid, source->nspace))) { opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__); OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - src.vpid = pmix3x_convert_rank(source->rank); + src.vpid = pmix2x_convert_rank(source->rank); /* ignore the range for now */ @@ -798,9 +798,9 @@ static pmix_status_t server_notify_event(pmix_status_t code, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } @@ -809,12 +809,12 @@ static pmix_status_t server_notify_event(pmix_status_t code, opal_opcbfunc, opalcaddy))) { OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void _info_rel(void *cbdata) { - pmix3x_opcaddy_t *pcaddy = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *pcaddy = (pmix2x_opcaddy_t*)cbdata; OBJ_RELEASE(pcaddy); } @@ -824,15 +824,15 @@ static void info_cbfunc(int status, opal_pmix_release_cbfunc_t release_fn, void *release_cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; - pmix3x_opcaddy_t *pcaddy; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; + pmix2x_opcaddy_t *pcaddy; opal_value_t *kv; size_t n; - pcaddy = OBJ_NEW(pmix3x_opcaddy_t); + pcaddy = OBJ_NEW(pmix2x_opcaddy_t); /* convert the status */ - pcaddy->status = pmix3x_convert_opalrc(status); + pcaddy->status = pmix2x_convert_opalrc(status); /* convert the list to a pmix_info_t array */ if (NULL != info) { @@ -842,7 +842,7 @@ static void info_cbfunc(int status, n = 0; OPAL_LIST_FOREACH(kv, info, opal_value_t) { (void)strncpy(pcaddy->info[n].key, kv->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pcaddy->info[n].value, kv); + pmix2x_value_load(&pcaddy->info[n].value, kv); } } } @@ -864,7 +864,7 @@ static pmix_status_t server_query(pmix_proc_t *proct, pmix_info_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t requestor; int rc; size_t n, m; @@ -876,7 +876,7 @@ static pmix_status_t server_query(pmix_proc_t *proct, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->infocbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -884,9 +884,9 @@ static pmix_status_t server_query(pmix_proc_t *proct, if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) { opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__); OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } - requestor.vpid = pmix3x_convert_rank(proct->rank); + requestor.vpid = pmix2x_convert_rank(proct->rank); /* convert the queries */ for (n=0; n < nqueries; n++) { @@ -899,9 +899,9 @@ static pmix_status_t server_query(pmix_proc_t *proct, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&q->qualifiers, &oinfo->super); oinfo->key = strdup(queries[n].qualifiers[m].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &queries[n].qualifiers[m].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &queries[n].qualifiers[m].value))) { OBJ_RELEASE(opalcaddy); - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } } } @@ -913,23 +913,23 @@ static pmix_status_t server_query(pmix_proc_t *proct, OBJ_RELEASE(opalcaddy); } - return pmix3x_convert_opalrc(rc); + return pmix2x_convert_opalrc(rc); } static void toolcbfunc(int status, opal_process_name_t proc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata; + pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata; pmix_status_t rc; pmix_proc_t p; /* convert the status */ - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* convert the process name */ (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc.jobid); - p.rank = pmix3x_convert_opalrank(proc.vpid); + p.rank = pmix2x_convert_opalrank(proc.vpid); /* pass it down */ if (NULL != opalcaddy->toolcbfunc) { @@ -942,14 +942,14 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo, pmix_tool_connection_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; size_t n; opal_value_t *oinfo; int rc; pmix_status_t err; /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->toolcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -958,9 +958,9 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo, oinfo = OBJ_NEW(opal_value_t); opal_list_append(&opalcaddy->info, &oinfo->super); oinfo->key = strdup(info[n].key); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) { OBJ_RELEASE(opalcaddy); - err = pmix3x_convert_opalrc(rc); + err = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(err, NULL, cbdata); } @@ -976,7 +976,7 @@ static void server_log(const pmix_proc_t *proct, const pmix_info_t directives[], size_t ndirs, pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opalcaddy_t *opalcaddy; + pmix2x_opalcaddy_t *opalcaddy; opal_process_name_t requestor; int rc; size_t n; @@ -991,7 +991,7 @@ static void server_log(const pmix_proc_t *proct, } /* setup the caddy */ - opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t); + opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t); opalcaddy->opcbfunc = cbfunc; opalcaddy->cbdata = cbdata; @@ -999,13 +999,13 @@ static void server_log(const pmix_proc_t *proct, if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) { opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__); OBJ_RELEASE(opalcaddy); - ret = pmix3x_convert_opalrc(rc); + ret = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(ret, cbdata); } return; } - requestor.vpid = pmix3x_convert_rank(proct->rank); + requestor.vpid = pmix2x_convert_rank(proct->rank); /* convert the data */ for (n=0; n < ndata; n++) { @@ -1013,9 +1013,9 @@ static void server_log(const pmix_proc_t *proct, /* we "borrow" the info field of the caddy as we and the * server function both agree on what will be there */ opal_list_append(&opalcaddy->info, &oinfo->super); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &data[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &data[n].value))) { OBJ_RELEASE(opalcaddy); - ret = pmix3x_convert_opalrc(rc); + ret = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(ret, cbdata); } @@ -1029,9 +1029,9 @@ static void server_log(const pmix_proc_t *proct, /* we "borrow" the apps field of the caddy as we and the * server function both agree on what will be there */ opal_list_append(&opalcaddy->apps, &oinfo->super); - if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &directives[n].value))) { + if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &directives[n].value))) { OBJ_RELEASE(opalcaddy); - ret = pmix3x_convert_opalrc(rc); + ret = pmix2x_convert_opalrc(rc); if (NULL != cbfunc) { cbfunc(ret, cbdata); } diff --git a/opal/mca/pmix/pmix3x/pmix3x_server_south.c b/opal/mca/pmix/pmix2x/pmix2x_server_south.c similarity index 80% rename from opal/mca/pmix/pmix3x/pmix3x_server_south.c rename to opal/mca/pmix/pmix2x/pmix2x_server_south.c index fbe945f3a19..6256eb560e7 100644 --- a/opal/mca/pmix/pmix3x/pmix3x_server_south.c +++ b/opal/mca/pmix/pmix2x/pmix2x_server_south.c @@ -36,7 +36,7 @@ #include "opal/util/proc.h" #include "opal/util/show_help.h" #include "opal/mca/pmix/base/base.h" -#include "pmix3x.h" +#include "pmix2x.h" #include "pmix.h" #include "pmix_server.h" @@ -73,10 +73,10 @@ static void errreg_cbfunc (pmix_status_t status, static void opcbfunc(pmix_status_t status, void *cbdata) { - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; if (NULL != op->opcbfunc) { - op->opcbfunc(pmix3x_convert_rc(status), op->cbdata); + op->opcbfunc(pmix2x_convert_rc(status), op->cbdata); } if (op->active) { op->status = status; @@ -93,7 +93,7 @@ static void op2cbfunc(pmix_status_t status, void *cbdata) *active = false; } -int pmix3x_server_init(opal_pmix_server_module_t *module, +int pmix2x_server_init(opal_pmix_server_module_t *module, opal_list_t *info) { pmix_status_t rc; @@ -102,7 +102,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, pmix_info_t *pinfo; size_t sz, n; volatile bool active; - opal_pmix3x_jobid_trkr_t *job; + opal_pmix2x_jobid_trkr_t *job; if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) { asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg); @@ -116,7 +116,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, n = 0; OPAL_LIST_FOREACH(kv, info, opal_value_t) { (void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, kv); + pmix2x_value_load(&pinfo[n].value, kv); ++n; } } else { @@ -126,14 +126,14 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, /* insert ourselves into our list of jobids - it will be the * first, and so we'll check it first */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)opal_snprintf_jobid(job->nspace, PMIX_MAX_NSLEN, OPAL_PROC_MY_NAME.jobid); job->jobid = OPAL_PROC_MY_NAME.jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) { PMIX_INFO_FREE(pinfo, sz); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } PMIX_INFO_FREE(pinfo, sz); @@ -142,7 +142,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module, /* register the default event handler */ active = true; - PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix3x_event_hdlr, errreg_cbfunc, (void*)&active); + PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix2x_event_hdlr, errreg_cbfunc, (void*)&active); PMIX_WAIT_FOR_COMPLETION(active); /* as we might want to use some client-side functions, be sure @@ -160,7 +160,7 @@ static void fincb(pmix_status_t status, void *cbdata) *active = false; } -int pmix3x_server_finalize(void) +int pmix2x_server_finalize(void) { pmix_status_t rc; volatile bool active; @@ -171,37 +171,37 @@ int pmix3x_server_finalize(void) PMIX_WAIT_FOR_COMPLETION(active); rc = PMIx_server_finalize(); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_server_gen_regex(const char *input, char **regex) +int pmix2x_server_gen_regex(const char *input, char **regex) { pmix_status_t rc; rc = PMIx_generate_regex(input, regex); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } -int pmix3x_server_gen_ppn(const char *input, char **ppn) +int pmix2x_server_gen_ppn(const char *input, char **ppn) { pmix_status_t rc; rc = PMIx_generate_ppn(input, ppn); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } static void _reg_nspace(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; opal_value_t *kv, *k2; pmix_info_t *pinfo = NULL, *pmap; size_t sz, szmap, m, n; char nspace[PMIX_MAX_NSLEN]; pmix_status_t rc; opal_list_t *pmapinfo; - opal_pmix3x_jobid_trkr_t *job; - pmix3x_opcaddy_t op; + opal_pmix2x_jobid_trkr_t *job; + pmix2x_opcaddy_t op; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ @@ -210,10 +210,10 @@ static void _reg_nspace(int sd, short args, void *cbdata) (void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, cd->jobid); /* store this job in our list of known nspaces */ - job = OBJ_NEW(opal_pmix3x_jobid_trkr_t); + job = OBJ_NEW(opal_pmix2x_jobid_trkr_t); (void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN); job->jobid = cd->jobid; - opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super); + opal_list_append(&mca_pmix_pmix2x_component.jobids, &job->super); /* convert the list to an array of pmix_info_t */ if (NULL != cd->info) { @@ -236,11 +236,11 @@ static void _reg_nspace(int sd, short args, void *cbdata) m = 0; OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) { (void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pmap[m].value, k2); + pmix2x_value_load(&pmap[m].value, k2); ++m; } } else { - pmix3x_value_load(&pinfo[n].value, kv); + pmix2x_value_load(&pinfo[n].value, kv); } ++n; } @@ -249,7 +249,7 @@ static void _reg_nspace(int sd, short args, void *cbdata) pinfo = NULL; } - OBJ_CONSTRUCT(&op, pmix3x_opcaddy_t); + OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t); op.active = true; rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz, opcbfunc, (void*)&op); @@ -260,7 +260,7 @@ static void _reg_nspace(int sd, short args, void *cbdata) } /* ensure we execute the cbfunc so the caller doesn't hang */ if (NULL != cd->opcbfunc) { - cd->opcbfunc(pmix3x_convert_rc(op.status), cd->cbdata); + cd->opcbfunc(pmix2x_convert_rc(op.status), cd->cbdata); } if (NULL != pinfo) { PMIX_INFO_FREE(pinfo, sz); @@ -269,17 +269,17 @@ static void _reg_nspace(int sd, short args, void *cbdata) OBJ_RELEASE(cd); } -int pmix3x_server_register_nspace(opal_jobid_t jobid, +int pmix2x_server_register_nspace(opal_jobid_t jobid, int nlocalprocs, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; /* we must threadshift this request as it touches * shared lists of objects */ - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); cd->jobid = jobid; cd->status = nlocalprocs; cd->info = info; @@ -300,10 +300,10 @@ int pmix3x_server_register_nspace(opal_jobid_t jobid, static void tdcbfunc(pmix_status_t status, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; if (NULL != cd->opcbfunc) { - cd->opcbfunc(pmix3x_convert_rc(status), cd->cbdata); + cd->opcbfunc(pmix2x_convert_rc(status), cd->cbdata); } if (cd->active) { cd->active = false; @@ -314,11 +314,11 @@ static void tdcbfunc(pmix_status_t status, void *cbdata) static void _dereg_nspace(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_jobid_trkr_t *jptr; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_jobid_trkr_t *jptr; /* if we don't already have it, we can ignore this */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == cd->jobid) { /* found it - tell the server to deregister */ cd->active = true; @@ -326,7 +326,7 @@ static void _dereg_nspace(int sd, short args, void *cbdata) PMIX_WAIT_FOR_COMPLETION(cd->active); OBJ_RELEASE(cd); /* now get rid of it from our list */ - opal_list_remove_item(&mca_pmix_pmix3x_component.jobids, &jptr->super); + opal_list_remove_item(&mca_pmix_pmix2x_component.jobids, &jptr->super); OBJ_RELEASE(jptr); return; } @@ -335,15 +335,15 @@ static void _dereg_nspace(int sd, short args, void *cbdata) tdcbfunc(PMIX_ERR_NOT_FOUND, cd); } -void pmix3x_server_deregister_nspace(opal_jobid_t jobid, +void pmix2x_server_deregister_nspace(opal_jobid_t jobid, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; /* we must threadshift this request as it touches * shared lists of objects */ - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); cd->jobid = jobid; cd->opcbfunc = cbfunc; cd->cbdata = cbdata; @@ -356,7 +356,7 @@ void pmix3x_server_deregister_nspace(opal_jobid_t jobid, } } -int pmix3x_server_register_client(const opal_process_name_t *proc, +int pmix2x_server_register_client(const opal_process_name_t *proc, uid_t uid, gid_t gid, void *server_object, opal_pmix_op_cbfunc_t cbfunc, @@ -364,13 +364,13 @@ int pmix3x_server_register_client(const opal_process_name_t *proc, { pmix_status_t rc; pmix_proc_t p; - pmix3x_opcaddy_t op; + pmix2x_opcaddy_t op; /* convert the jobid */ (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid); - p.rank = pmix3x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); - OBJ_CONSTRUCT(&op, pmix3x_opcaddy_t); + OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t); op.active = true; rc = PMIx_server_register_client(&p, uid, gid, server_object, opcbfunc, (void*)&op); @@ -379,21 +379,21 @@ int pmix3x_server_register_client(const opal_process_name_t *proc, rc = op.status; } OBJ_DESTRUCT(&op); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } static void _dereg_client(int sd, short args, void *cbdata) { - pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata; - opal_pmix3x_jobid_trkr_t *jptr; + pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata; + opal_pmix2x_jobid_trkr_t *jptr; pmix_proc_t p; /* if we don't already have it, we can ignore this */ - OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) { + OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix2x_component.jobids, opal_pmix2x_jobid_trkr_t) { if (jptr->jobid == cd->source->jobid) { /* found it - tell the server to deregister */ (void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN); - p.rank = pmix3x_convert_opalrank(cd->source->vpid); + p.rank = pmix2x_convert_opalrank(cd->source->vpid); cd->active = true; PMIx_server_deregister_client(&p, tdcbfunc, (void*)cd); PMIX_WAIT_FOR_COMPLETION(cd->active); @@ -405,15 +405,15 @@ static void _dereg_client(int sd, short args, void *cbdata) /* tell the local PMIx server to cleanup this client as it is * done executing */ -void pmix3x_server_deregister_client(const opal_process_name_t *proc, +void pmix2x_server_deregister_client(const opal_process_name_t *proc, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) { - pmix3x_threadshift_t *cd; + pmix2x_threadshift_t *cd; /* we must threadshift this request as we might not be in an event * and we are going to access framework-global lists/objects */ - cd = OBJ_NEW(pmix3x_threadshift_t); + cd = OBJ_NEW(pmix2x_threadshift_t); cd->source = proc; cd->opcbfunc = cbfunc; cd->cbdata = cbdata; @@ -427,17 +427,17 @@ void pmix3x_server_deregister_client(const opal_process_name_t *proc, } /* have the local PMIx server setup the environment for this client */ -int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env) +int pmix2x_server_setup_fork(const opal_process_name_t *proc, char ***env) { pmix_status_t rc; pmix_proc_t p; /* convert the jobid */ (void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid); - p.rank = pmix3x_convert_opalrank(proc->vpid); + p.rank = pmix2x_convert_opalrank(proc->vpid); rc = PMIx_server_setup_fork(&p, env); - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } /* this is the call back up from the embedded PMIx server that @@ -446,9 +446,9 @@ int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env) static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbdata) { int rc; - pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata; + pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata; - rc = pmix3x_convert_rc(status); + rc = pmix2x_convert_rc(status); if (NULL != op->mdxcbfunc) { op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL); } @@ -456,31 +456,31 @@ static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbd } /* request modex data for a local proc from the PMIx server */ -int pmix3x_server_dmodex(const opal_process_name_t *proc, +int pmix2x_server_dmodex(const opal_process_name_t *proc, opal_pmix_modex_cbfunc_t cbfunc, void *cbdata) { - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; pmix_status_t rc; /* setup the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->mdxcbfunc = cbfunc; op->cbdata = cbdata; /* convert the jobid */ (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, proc->jobid); - op->p.rank = pmix3x_convert_opalrank(proc->vpid); + op->p.rank = pmix2x_convert_opalrank(proc->vpid); /* find the internally-cached data for this proc */ rc = PMIx_server_dmodex_request(&op->p, dmdx_response, op); if (PMIX_SUCCESS != rc) { OBJ_RELEASE(op); } - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } /* tell the PMIx server to notify its local clients of an event */ -int pmix3x_server_notify_event(int status, +int pmix2x_server_notify_event(int status, const opal_process_name_t *source, opal_list_t *info, opal_pmix_op_cbfunc_t cbfunc, void *cbdata) @@ -489,7 +489,7 @@ int pmix3x_server_notify_event(int status, pmix_info_t *pinfo; size_t sz, n; pmix_status_t rc; - pmix3x_opcaddy_t *op; + pmix2x_opcaddy_t *op; /* convert the list to an array of pmix_info_t */ if (NULL != info) { @@ -498,14 +498,14 @@ int pmix3x_server_notify_event(int status, n = 0; OPAL_LIST_FOREACH(kv, info, opal_value_t) { (void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN); - pmix3x_value_load(&pinfo[n].value, kv); + pmix2x_value_load(&pinfo[n].value, kv); } } else { sz = 0; pinfo = NULL; } /* setup the caddy */ - op = OBJ_NEW(pmix3x_opcaddy_t); + op = OBJ_NEW(pmix2x_opcaddy_t); op->info = pinfo; op->sz = sz; op->opcbfunc = cbfunc; @@ -513,14 +513,14 @@ int pmix3x_server_notify_event(int status, /* convert the jobid */ if (NULL == source) { (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, OPAL_JOBID_INVALID); - op->p.rank = pmix3x_convert_opalrank(OPAL_VPID_INVALID); + op->p.rank = pmix2x_convert_opalrank(OPAL_VPID_INVALID); } else { (void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid); - op->p.rank = pmix3x_convert_opalrank(source->vpid); + op->p.rank = pmix2x_convert_opalrank(source->vpid); } - rc = pmix3x_convert_opalrc(status); + rc = pmix2x_convert_opalrc(status); /* the range is irrelevant here as the server is passing * the event down to its local clients */ rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL, @@ -528,5 +528,5 @@ int pmix3x_server_notify_event(int status, if (PMIX_SUCCESS != rc) { OBJ_RELEASE(op); } - return pmix3x_convert_rc(rc); + return pmix2x_convert_rc(rc); } diff --git a/opal/mca/pmix/pmix3x/Makefile.am b/opal/mca/pmix/pmix3x/Makefile.am deleted file mode 100644 index f5dbf8d09b7..00000000000 --- a/opal/mca/pmix/pmix3x/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2014-2016 Intel, Inc. All rights reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2015 Research Organization for Information Science -# and Technology (RIST). All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -EXTRA_DIST = autogen.subdirs - -SUBDIRS = pmix - -sources = \ - pmix3x.h \ - pmix3x_component.c \ - pmix3x.c \ - pmix3x_client.c \ - pmix3x_server_south.c \ - pmix3x_server_north.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_opal_pmix_pmix3x_DSO -component_noinst = -component_install = mca_pmix_pmix3x.la -else -component_noinst = libmca_pmix_pmix3x.la -component_install = -endif - -mcacomponentdir = $(opallibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_pmix_pmix3x_la_SOURCES = $(sources) -mca_pmix_pmix3x_la_CFLAGS = $(opal_pmix_pmix3x_CFLAGS) -mca_pmix_pmix3x_la_CPPFLAGS = \ - -I$(srcdir)/pmix/include $(opal_pmix_pmix3x_CPPFLAGS) -mca_pmix_pmix3x_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix3x_LDFLAGS) -mca_pmix_pmix3x_la_LIBADD = $(opal_pmix_pmix3x_LIBS) -mca_pmix_pmix3x_la_DEPENDENCIES = $(opal_pmix_pmix3x_DEPENDENCIES) - -noinst_LTLIBRARIES = $(component_noinst) -libmca_pmix_pmix3x_la_SOURCES =$(sources) -libmca_pmix_pmix3x_la_CFLAGS = $(opal_pmix_pmix3x_CFLAGS) -libmca_pmix_pmix3x_la_CPPFLAGS = $(opal_pmix_pmix3x_CPPFLAGS) -libmca_pmix_pmix3x_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix3x_LDFLAGS) -libmca_pmix_pmix3x_la_LIBADD = $(opal_pmix_pmix3x_LIBS) -libmca_pmix_pmix3x_la_DEPENDENCIES = $(opal_pmix_pmix3x_DEPENDENCIES) diff --git a/opal/mca/pmix/pmix3x/pmix/src/util/crc.c b/opal/mca/pmix/pmix3x/pmix/src/util/crc.c deleted file mode 100644 index 5a0f55fd01b..00000000000 --- a/opal/mca/pmix/pmix3x/pmix/src/util/crc.c +++ /dev/null @@ -1,1206 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include - - -#ifdef HAVE_STDIO_H -#include -#endif /* HAVE_STDIO_H */ -#ifdef HAVE_STDLIB_H -#include -#endif /* HAVE_STDLIB_H */ -#ifdef HAVE_STRINGS_H -#include -#endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STRING_H -#include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNISTD_H */ - -#include "src/util/crc.h" - - -#if (PMIX_ALIGNMENT_LONG == 8) -#define PMIX_CRC_WORD_MASK_ 0x7 -#elif (PMIX_ALIGNMENT_LONG == 4) -#define PMIX_CRC_WORD_MASK_ 0x3 -#else -#define PMIX_CRC_WORD_MASK_ 0xFFFF -#endif - - -#define WORDALIGNED(v) \ - (((intptr_t)v & PMIX_CRC_WORD_MASK_) ? false : true) - - -#define INTALIGNED(v) \ - (((intptr_t)v & 3) ? false : true) - -/* - * this version of bcopy_csum() looks a little too long, but it - * handles cumulative checksumming for arbitrary lengths and address - * alignments as best as it can; the contents of lastPartialLong and - * lastPartialLength are updated to reflected the last partial word's - * value and length (in bytes) -- this should allow proper handling of - * checksumming contiguous or noncontiguous buffers via multiple calls - * of bcopy_csum() - Mitch - */ - -unsigned long -pmix_bcopy_csum_partial ( - const void * source, - void * destination, - size_t copylen, - size_t csumlen, - unsigned long * lastPartialLong, - size_t* lastPartialLength - ) -{ - unsigned long * src = (unsigned long *) source; - unsigned long * dest = (unsigned long *) destination; - unsigned long csum = 0; - size_t csumlenresidue; - unsigned long i, temp; - - csumlenresidue = (csumlen > copylen) ? (csumlen - copylen) : 0; - temp = *lastPartialLong; - - if (WORDALIGNED(source) && WORDALIGNED(dest)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned long) - *lastPartialLength)); - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); - csum += (temp - *lastPartialLong); - copylen -= sizeof(unsigned long) - *lastPartialLength; - /* now we have an unaligned source and an unaligned destination */ - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLength = 0; - *lastPartialLong = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned long *)((char *)src + copylen); - dest = (unsigned long *)((char *)dest + copylen); - csum += (temp - *lastPartialLong); - *lastPartialLong = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { /* fast path... */ - size_t numLongs = copylen/sizeof(unsigned long); - for(i = 0; i < numLongs; i++) { - csum += *src; - *dest++ = *src++; - } - *lastPartialLong = 0; - *lastPartialLength = 0; - if (WORDALIGNED(copylen) && (csumlenresidue == 0)) { - return(csum); - } - else { - copylen -= i * sizeof(unsigned long); - } - } - } else if (WORDALIGNED(source)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned long) - *lastPartialLength)); - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); - csum += (temp - *lastPartialLong); - copylen -= sizeof(unsigned long) - *lastPartialLength; - /* now we have an unaligned source and an unknown alignment for our destination */ - if (WORDALIGNED(dest)) { - size_t numLongs = copylen/sizeof(unsigned long); - for(i = 0; i < numLongs; i++) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - *dest++ = temp; - } - copylen -= i * sizeof(unsigned long); - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - } - *lastPartialLong = 0; - *lastPartialLength = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned long *)((char *)src + copylen); - dest = (unsigned long *)((char *)dest + copylen); - csum += (temp - *lastPartialLong); - *lastPartialLong = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - temp = *src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLong = 0; - *lastPartialLength = 0; - } - } else if (WORDALIGNED(dest)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned long) - *lastPartialLength)); - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); - csum += (temp - *lastPartialLong); - copylen -= sizeof(unsigned long) - *lastPartialLength; - /* now we have a source of unknown alignment and a unaligned destination */ - if (WORDALIGNED(src)) { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - temp = *src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLong = 0; - *lastPartialLength = 0; - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLength = 0; - *lastPartialLong = 0; - } - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned long *)((char *)src + copylen); - dest = (unsigned long *)((char *)dest + copylen); - csum += (temp - *lastPartialLong); - *lastPartialLong = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - *dest++ = temp; - } - *lastPartialLength = 0; - *lastPartialLong = 0; - } - } else { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned long) - *lastPartialLength)); - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - dest = (unsigned long *)((char *)dest + sizeof(unsigned long) - *lastPartialLength); - csum += (temp - *lastPartialLong); - copylen -= sizeof(unsigned long) - *lastPartialLength; - /* now we have an unknown alignment for our source and destination */ - if (WORDALIGNED(src) && WORDALIGNED(dest)) { - size_t numLongs = copylen/sizeof(unsigned long); - for(i = 0; i < numLongs; i++) { - csum += *src; - *dest++ = *src++; - } - copylen -= i * sizeof(unsigned long); - } - else { /* safe but slower for all other alignments */ - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - } - *lastPartialLong = 0; - *lastPartialLength = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned long *)((char *)src + copylen); - dest = (unsigned long *)((char *)dest + copylen); - csum += (temp - *lastPartialLong); - *lastPartialLong = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLength = 0; - *lastPartialLong = 0; - } - } - - /* if copylen is non-zero there was a bit left, less than an unsigned long's worth */ - if ((copylen != 0) && (csumlenresidue == 0)) { - temp = *lastPartialLong; - if (*lastPartialLength) { - if (copylen >= (sizeof(unsigned long) - *lastPartialLength)) { - /* copy all remaining bytes from src to dest */ - unsigned long copytemp = 0; - memcpy(©temp, src, copylen); - memcpy(dest, ©temp, copylen); - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - /* avoid unsigned arithmetic overflow by subtracting the old partial - * word from the new one before adding to the checksum... - */ - csum += (temp - *lastPartialLong); - copylen -= sizeof(unsigned long) - *lastPartialLength; - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - *lastPartialLength = copylen; - /* reset temp, and calculate next partial word */ - temp = 0; - if (copylen) { - memcpy(&temp, src, copylen); - } - /* add it to the the checksum */ - csum += temp; - *lastPartialLong = temp; - } - else { - /* copy all remaining bytes from src to dest */ - unsigned long copytemp = 0; - memcpy(©temp, src, copylen); - memcpy(dest, ©temp, copylen); - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - copylen); - /* avoid unsigned arithmetic overflow by subtracting the old partial - * word from the new one before adding to the checksum... - */ - csum += temp - *lastPartialLong; - *lastPartialLong = temp; - *lastPartialLength += copylen; - } - } - else { /* fast path... */ - /* temp and *lastPartialLong are 0 if *lastPartialLength is 0... */ - memcpy(&temp, src, copylen); - csum += temp; - memcpy(dest, &temp, copylen); - *lastPartialLong = temp; - *lastPartialLength = copylen; - /* done...return the checksum */ - } - } - else if (csumlenresidue != 0) { - if (copylen != 0) { - temp = 0; - memcpy(&temp, src, copylen); - memcpy(dest, &temp, copylen); - } - if (csumlenresidue < (sizeof(unsigned long) - copylen - *lastPartialLength)) { - temp = *lastPartialLong; - memcpy(((char *)&temp + *lastPartialLength), src, (copylen + csumlenresidue)); - /* avoid unsigned arithmetic overflow by subtracting the old partial */ - /* word from the new one before adding to the checksum... */ - csum += temp - *lastPartialLong; - src++; - *lastPartialLong = temp; - *lastPartialLength += copylen + csumlenresidue; - csumlenresidue = 0; - } - else { - /* we have enough chksum data to fill out our last partial */ - /* word */ - temp = *lastPartialLong; - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - /* avoid unsigned arithmetic overflow by subtracting the old partial */ - /* word from the new one before adding to the checksum... */ - csum += temp - *lastPartialLong; - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - csumlenresidue -= sizeof(unsigned long) - *lastPartialLength - copylen; - *lastPartialLength = 0; - *lastPartialLong = 0; - } - if (WORDALIGNED(src)) { - for (i = 0; i < csumlenresidue/sizeof(unsigned long); i++) { - csum += *src++; - } - } - else { - for (i = 0; i < csumlenresidue/sizeof(unsigned long); i++) { - memcpy(&temp, src, sizeof(temp)); - csum += temp; - src++; - } - } - csumlenresidue -= i * sizeof(unsigned long); - if (csumlenresidue) { - temp = 0; - memcpy(&temp, src, csumlenresidue); - csum += temp; - *lastPartialLong = temp; - *lastPartialLength = csumlenresidue; - } - } /* end else if (csumlenresidue != 0) */ - - return csum; -} - -unsigned int -pmix_bcopy_uicsum_partial ( - const void * source, - void * destination, - size_t copylen, - size_t csumlen, - unsigned int* lastPartialInt, - size_t* lastPartialLength - ) -{ - unsigned int * src = (unsigned int *) source; - unsigned int * dest = (unsigned int *) destination; - unsigned int csum = 0; - size_t csumlenresidue; - unsigned long i; - unsigned int temp; - - csumlenresidue = (csumlen > copylen) ? (csumlen - copylen) : 0; - temp = *lastPartialInt; - - if (INTALIGNED(source) && INTALIGNED(dest)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned int) - *lastPartialLength)); - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); - csum += (temp - *lastPartialInt); - copylen -= sizeof(unsigned int) - *lastPartialLength; - /* now we have an unaligned source and an unaligned destination */ - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLength = 0; - *lastPartialInt = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned int *)((char *)src + copylen); - dest = (unsigned int *)((char *)dest + copylen); - csum += (temp - *lastPartialInt); - *lastPartialInt = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { /* fast path... */ - size_t numLongs = copylen/sizeof(unsigned int); - for(i = 0; i < numLongs; i++) { - csum += *src; - *dest++ = *src++; - } - *lastPartialInt = 0; - *lastPartialLength = 0; - if (INTALIGNED(copylen) && (csumlenresidue == 0)) { - return(csum); - } - else { - copylen -= i * sizeof(unsigned int); - } - } - } else if (INTALIGNED(source)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned int) - *lastPartialLength)); - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); - csum += (temp - *lastPartialInt); - copylen -= sizeof(unsigned int) - *lastPartialLength; - /* now we have an unaligned source and an unknown alignment for our destination */ - if (INTALIGNED(dest)) { - size_t numLongs = copylen/sizeof(unsigned int); - for(i = 0; i < numLongs; i++) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - *dest++ = temp; - } - copylen -= i * sizeof(unsigned int); - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - } - *lastPartialInt = 0; - *lastPartialLength = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned int *)((char *)src + copylen); - dest = (unsigned int *)((char *)dest + copylen); - csum += (temp - *lastPartialInt); - *lastPartialInt = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - temp = *src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialInt = 0; - *lastPartialLength = 0; - } - } else if (INTALIGNED(dest)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned int) - *lastPartialLength)); - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); - csum += (temp - *lastPartialInt); - copylen -= sizeof(unsigned int) - *lastPartialLength; - /* now we have a source of unknown alignment and a unaligned destination */ - if (INTALIGNED(src)) { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - temp = *src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialInt = 0; - *lastPartialLength = 0; - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLength = 0; - *lastPartialInt = 0; - } - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned int *)((char *)src + copylen); - dest = (unsigned int *)((char *)dest + copylen); - csum += (temp - *lastPartialInt); - *lastPartialInt = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - *dest++ = temp; - } - *lastPartialLength = 0; - *lastPartialInt = 0; - } - } else { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - memcpy(dest, ((char *)&temp + *lastPartialLength), - (sizeof(unsigned int) - *lastPartialLength)); - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - dest = (unsigned int *)((char *)dest + sizeof(unsigned int) - *lastPartialLength); - csum += (temp - *lastPartialInt); - copylen -= sizeof(unsigned int) - *lastPartialLength; - /* now we have an unknown alignment for our source and destination */ - if (INTALIGNED(src) && INTALIGNED(dest)) { - size_t numLongs = copylen/sizeof(unsigned int); - for(i = 0; i < numLongs; i++) { - csum += *src; - *dest++ = *src++; - } - copylen -= i * sizeof(unsigned int); - } - else { /* safe but slower for all other alignments */ - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - } - *lastPartialInt = 0; - *lastPartialLength = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, copylen); - memcpy(dest, ((char *)&temp + *lastPartialLength), copylen); - src = (unsigned int *)((char *)src + copylen); - dest = (unsigned int *)((char *)dest + copylen); - csum += (temp - *lastPartialInt); - *lastPartialInt = temp; - *lastPartialLength += copylen; - copylen = 0; - } - } - else { - for( ;copylen >= sizeof(*src); copylen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - memcpy(dest, &temp, sizeof(temp)); - dest++; - } - *lastPartialLength = 0; - *lastPartialInt = 0; - } - } - - /* if copylen is non-zero there was a bit left, less than an unsigned int's worth */ - if ((copylen != 0) && (csumlenresidue == 0)) { - temp = *lastPartialInt; - if (*lastPartialLength) { - if (copylen >= (sizeof(unsigned int) - *lastPartialLength)) { - /* copy all remaining bytes from src to dest */ - unsigned int copytemp = 0; - memcpy(©temp, src, copylen); - memcpy(dest, ©temp, copylen); - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - /* avoid unsigned arithmetic overflow by subtracting the old partial - * word from the new one before adding to the checksum... - */ - csum += (temp - *lastPartialInt); - copylen -= sizeof(unsigned int) - *lastPartialLength; - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - *lastPartialLength = copylen; - /* reset temp, and calculate next partial word */ - temp = 0; - if (copylen) { - memcpy(&temp, src, copylen); - } - /* add it to the the checksum */ - csum += temp; - *lastPartialInt = temp; - } - else { - /* copy all remaining bytes from src to dest */ - unsigned int copytemp = 0; - memcpy(©temp, src, copylen); - memcpy(dest, ©temp, copylen); - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - copylen); - /* avoid unsigned arithmetic overflow by subtracting the old partial - * word from the new one before adding to the checksum... - */ - csum += temp - *lastPartialInt; - *lastPartialInt = temp; - *lastPartialLength += copylen; - } - } - else { /* fast path... */ - /* temp and *lastPartialInt are 0 if *lastPartialLength is 0... */ - memcpy(&temp, src, copylen); - csum += temp; - memcpy(dest, &temp, copylen); - *lastPartialInt = temp; - *lastPartialLength = copylen; - /* done...return the checksum */ - } - } - else if (csumlenresidue != 0) { - if (copylen != 0) { - temp = 0; - memcpy(&temp, src, copylen); - memcpy(dest, &temp, copylen); - } - if (csumlenresidue < (sizeof(unsigned int) - copylen - *lastPartialLength)) { - temp = *lastPartialInt; - memcpy(((char *)&temp + *lastPartialLength), src, (copylen + csumlenresidue)); - /* avoid unsigned arithmetic overflow by subtracting the old partial - * word from the new one before adding to the checksum... - */ - csum += temp - *lastPartialInt; - src++; - *lastPartialInt = temp; - *lastPartialLength += copylen + csumlenresidue; - csumlenresidue = 0; - } - else { - /* we have enough chksum data to fill out our last partial - * word - */ - temp = *lastPartialInt; - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - /* avoid unsigned arithmetic overflow by subtracting the old partial - * word from the new one before adding to the checksum... - */ - csum += temp - *lastPartialInt; - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - csumlenresidue -= sizeof(unsigned int) - *lastPartialLength - copylen; - *lastPartialLength = 0; - *lastPartialInt = 0; - } - if (INTALIGNED(src)) { - for (i = 0; i < csumlenresidue/sizeof(unsigned int); i++) { - csum += *src++; - } - } - else { - for (i = 0; i < csumlenresidue/sizeof(unsigned int); i++) { - memcpy(&temp, src, sizeof(temp)); - csum += temp; - src++; - } - } - csumlenresidue -= i * sizeof(unsigned int); - if (csumlenresidue) { - temp = 0; - memcpy(&temp, src, csumlenresidue); - csum += temp; - *lastPartialInt = temp; - *lastPartialLength = csumlenresidue; - } - } /* end else if (csumlenresidue != 0) */ - - return csum; -} - - -/* - * csum() generates a bcopy_csum() - compatible checksum that can be - * called multiple times - */ - -unsigned long -pmix_csum_partial ( - const void * source, - size_t csumlen, - unsigned long* lastPartialLong, - size_t* lastPartialLength - ) -{ - unsigned long * src = (unsigned long *) source; - unsigned long csum = 0; - unsigned long i, temp; - - - - temp = *lastPartialLong; - - if (WORDALIGNED(source)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (csumlen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - csum += (temp - *lastPartialLong); - csumlen -= sizeof(unsigned long) - *lastPartialLength; - /* now we have an unaligned source */ - for(i = 0; i < csumlen/sizeof(unsigned long); i++) { - memcpy(&temp, src, sizeof(temp)); - csum += temp; - src++; - } - csumlen -= i * sizeof(unsigned long); - *lastPartialLong = 0; - *lastPartialLength = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, csumlen); - src = (unsigned long *)((char *)src + csumlen); - csum += (temp - *lastPartialLong); - *lastPartialLong = temp; - *lastPartialLength += csumlen; - csumlen = 0; - } - } - else { /* fast path... */ - size_t numLongs = csumlen/sizeof(unsigned long); - for(i = 0; i < numLongs; i++) { - csum += *src++; - } - *lastPartialLong = 0; - *lastPartialLength = 0; - if (WORDALIGNED(csumlen)) { - return(csum); - } - else { - csumlen -= i * sizeof(unsigned long); - } - } - } else { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (csumlen >= (sizeof(unsigned long) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - csum += (temp - *lastPartialLong); - csumlen -= sizeof(unsigned long) - *lastPartialLength; - /* now we have a source of unknown alignment */ - if (WORDALIGNED(src)) { - for(i = 0; i < csumlen/sizeof(unsigned long); i++) { - csum += *src++; - } - csumlen -= i * sizeof(unsigned long); - *lastPartialLong = 0; - *lastPartialLength = 0; - } - else { - for(i = 0; i < csumlen/sizeof(unsigned long); i++) { - memcpy(&temp, src, sizeof(temp)); - csum += temp; - src++; - } - csumlen -= i * sizeof(unsigned long); - *lastPartialLong = 0; - *lastPartialLength = 0; - } - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, csumlen); - src = (unsigned long *)((char *)src + csumlen); - csum += (temp - *lastPartialLong); - *lastPartialLong = temp; - *lastPartialLength += csumlen; - csumlen = 0; - } - } - else { - for( ;csumlen >= sizeof(*src); csumlen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - } - *lastPartialLength = 0; - *lastPartialLong = 0; - } - } - - /* if csumlen is non-zero there was a bit left, less than an unsigned long's worth */ - if (csumlen != 0) { - temp = *lastPartialLong; - if (*lastPartialLength) { - if (csumlen >= (sizeof(unsigned long) - *lastPartialLength)) { - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned long) - *lastPartialLength)); - csum += (temp - *lastPartialLong); - csumlen -= sizeof(unsigned long) - *lastPartialLength; - src = (unsigned long *)((char *)src + sizeof(unsigned long) - *lastPartialLength); - *lastPartialLength = csumlen; - /* reset temp, and calculate next partial word */ - temp = 0; - if (csumlen) { - memcpy(&temp, src, csumlen); - } - /* add it to the the checksum */ - csum += temp; - *lastPartialLong = temp; - } - else { - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - csumlen); - csum += (temp - *lastPartialLong); - *lastPartialLong = temp; - *lastPartialLength += csumlen; - } - } - else { /* fast path... */ - /* temp and *lastPartialLong are 0 if *lastPartialLength is 0... */ - memcpy(&temp, src, csumlen); - csum += temp; - *lastPartialLong = temp; - *lastPartialLength = csumlen; - /* done...return the checksum */ - } - } - - return csum; -} - -unsigned int -pmix_uicsum_partial ( - const void * source, - size_t csumlen, - unsigned int* lastPartialInt, - size_t* lastPartialLength - ) -{ - unsigned int * src = (unsigned int *) source; - unsigned int csum = 0; - unsigned int temp; - unsigned long i; - - - temp = *lastPartialInt; - - if (INTALIGNED(source)) { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (csumlen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - csum += (temp - *lastPartialInt); - csumlen -= sizeof(unsigned int) - *lastPartialLength; - /* now we have an unaligned source */ - for(i = 0; i < csumlen/sizeof(unsigned int); i++) { - memcpy(&temp, src, sizeof(temp)); - csum += temp; - src++; - } - csumlen -= i * sizeof(unsigned int); - *lastPartialInt = 0; - *lastPartialLength = 0; - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, csumlen); - src = (unsigned int *)((char *)src + csumlen); - csum += (temp - *lastPartialInt); - *lastPartialInt = temp; - *lastPartialLength += csumlen; - csumlen = 0; - } - } - else { /* fast path... */ - size_t numLongs = csumlen/sizeof(unsigned int); - for(i = 0; i < numLongs; i++) { - csum += *src++; - } - *lastPartialInt = 0; - *lastPartialLength = 0; - if (INTALIGNED(csumlen)) { - return(csum); - } - else { - csumlen -= i * sizeof(unsigned int); - } - } - } else { - if (*lastPartialLength) { - /* do we have enough data to fill out the partial word? */ - if (csumlen >= (sizeof(unsigned int) - *lastPartialLength)) { /* YES, we do... */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - csum += (temp - *lastPartialInt); - csumlen -= sizeof(unsigned int) - *lastPartialLength; - /* now we have a source of unknown alignment */ - if (INTALIGNED(src)) { - for(i = 0; i < csumlen/sizeof(unsigned int); i++) { - csum += *src++; - } - csumlen -= i * sizeof(unsigned int); - *lastPartialInt = 0; - *lastPartialLength = 0; - } - else { - for(i = 0; i < csumlen/sizeof(unsigned int); i++) { - memcpy(&temp, src, sizeof(temp)); - csum += temp; - src++; - } - csumlen -= i * sizeof(unsigned int); - *lastPartialInt = 0; - *lastPartialLength = 0; - } - } - else { /* NO, we don't... */ - memcpy(((char *)&temp + *lastPartialLength), src, csumlen); - src = (unsigned int *)((char *)src + csumlen); - csum += (temp - *lastPartialInt); - *lastPartialInt = temp; - *lastPartialLength += csumlen; - csumlen = 0; - } - } - else { - for( ;csumlen >= sizeof(*src); csumlen -= sizeof(*src)) { - memcpy(&temp, src, sizeof(temp)); - src++; - csum += temp; - } - *lastPartialLength = 0; - *lastPartialInt = 0; - } - } - - /* if csumlen is non-zero there was a bit left, less than an unsigned int's worth */ - if (csumlen != 0) { - temp = *lastPartialInt; - if (*lastPartialLength) { - if (csumlen >= (sizeof(unsigned int) - *lastPartialLength)) { - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - (sizeof(unsigned int) - *lastPartialLength)); - csum += (temp - *lastPartialInt); - csumlen -= sizeof(unsigned int) - *lastPartialLength; - src = (unsigned int *)((char *)src + sizeof(unsigned int) - *lastPartialLength); - *lastPartialLength = csumlen; - /* reset temp, and calculate next partial word */ - temp = 0; - if (csumlen) { - memcpy(&temp, src, csumlen); - } - /* add it to the the checksum */ - csum += temp; - *lastPartialInt = temp; - } - else { - /* fill out rest of partial word and add to checksum */ - memcpy(((char *)&temp + *lastPartialLength), src, - csumlen); - csum += (temp - *lastPartialInt); - *lastPartialInt = temp; - *lastPartialLength += csumlen; - } - } - else { /* fast path... */ - /* temp and *lastPartialInt are 0 if *lastPartialLength is 0... */ - memcpy(&temp, src, csumlen); - csum += temp; - *lastPartialInt = temp; - *lastPartialLength = csumlen; - /* done...return the checksum */ - } - } - - return csum; -} - -/* globals for CRC32 bcopy and calculation routines */ - -static bool _pmix_crc_table_initialized = false; -static unsigned int _pmix_crc_table[256]; - -/* CRC32 table generation routine - thanks to Charles Michael Heard for his - * optimized CRC32 code... - */ - -void pmix_initialize_crc_table(void) -{ - register int i,j; - register unsigned int crc_accum; - - for (i = 0; i < 256; i++) { - crc_accum = (i << 24); - for (j = 0; j < 8; j++) { - if (crc_accum & 0x80000000) - crc_accum = (crc_accum << 1) ^ CRC_POLYNOMIAL; - else - crc_accum = (crc_accum << 1); - } - _pmix_crc_table[i] = crc_accum; - } - - /* set global bool to true to do this work once! */ - _pmix_crc_table_initialized = true; - return; -} - -unsigned int pmix_bcopy_uicrc_partial( - const void * source, - void * destination, - size_t copylen, - size_t crclen, - unsigned int partial_crc) -{ - size_t crclenresidue = (crclen > copylen) ? (crclen - copylen) : 0; - register int i, j; - register unsigned char t; - unsigned int tmp; - - if (!_pmix_crc_table_initialized) { - pmix_initialize_crc_table(); - } - - if (INTALIGNED(source) && INTALIGNED(destination)) { - register unsigned int * src = (unsigned int *)source; - register unsigned int * dst = (unsigned int *)destination; - register unsigned char *ts, *td; - /* copy whole integers */ - while (copylen >= sizeof(unsigned int)) { - tmp = *src++; - *dst++ = tmp; - ts = (unsigned char *)&tmp; - for (j = 0; j < (int)sizeof(unsigned int); j++) { - i = ((partial_crc >> 24) ^ *ts++) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - copylen -= sizeof(unsigned int); - } - ts = (unsigned char *)src; - td = (unsigned char *)dst; - /* copy partial integer */ - while (copylen--) { - t = *ts++; - *td++ = t; - i = ((partial_crc >> 24) ^ t) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - /* calculate CRC over remaining bytes... */ - while (crclenresidue--) { - i = ((partial_crc >> 24) ^ *ts++) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - } - else { - register unsigned char * src = (unsigned char *)source; - register unsigned char * dst = (unsigned char *)destination; - while (copylen--) { - t = *src++; - *dst++ = t; - i = ((partial_crc >> 24) ^ t) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - while (crclenresidue--) { - i = ((partial_crc >> 24) ^ *src++) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - } - - return partial_crc; -} - - -unsigned int pmix_uicrc_partial( - const void * source, size_t crclen, unsigned int partial_crc) -{ - register int i, j; - register unsigned char * t; - unsigned int tmp; - - if (!_pmix_crc_table_initialized) { - pmix_initialize_crc_table(); - } - - if (INTALIGNED(source)) { - register unsigned int * src = (unsigned int *)source; - while (crclen >= sizeof(unsigned int)) { - tmp = *src++; - t = (unsigned char *)&tmp; - for (j = 0; j < (int)sizeof(unsigned int); j++) { - i = ((partial_crc >> 24) ^ *t++) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - crclen -= sizeof(unsigned int); - } - t = (unsigned char *)src; - while (crclen--) { - i = ((partial_crc >> 24) ^ *t++) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - } - else { - register unsigned char * src = (unsigned char *)source; - while (crclen--) { - i = ((partial_crc >> 24) ^ *src++) & 0xff; - partial_crc = (partial_crc << 8) ^ _pmix_crc_table[i]; - } - } - - return partial_crc; -} - diff --git a/opal/mca/pmix/pmix3x/pmix/test/simple/test_pmix.c b/opal/mca/pmix/pmix3x/pmix/test/simple/test_pmix.c deleted file mode 100644 index 8ecf6c1f6b6..00000000000 --- a/opal/mca/pmix/pmix3x/pmix/test/simple/test_pmix.c +++ /dev/null @@ -1,67 +0,0 @@ - -#include -#include -#include - -int main(int argc, char **argv) -{ - pmix_proc_t myproc; - pmix_status_t rc; - - int rank; - rc = PMIx_Init(&myproc, NULL, 0); - assert(PMIX_SUCCESS == rc); - - { - pmix_value_t *value; - rc = PMIx_Get(&myproc, PMIX_RANK, NULL, 0, &value); - assert(PMIX_SUCCESS == rc); - printf("%d\n", value->type); - assert(value->type == PMIX_INT); - rank = value->data.uint32; - PMIX_VALUE_RELEASE(value); - } - - if (rank == 0 ) { - pmix_info_t *info; - PMIX_INFO_CREATE(info, 1); - snprintf(info[0].key, PMIX_MAX_KEYLEN, "magic-found"); - info[0].value.type = PMIX_STRING; - info[0].value.data.string = "yes"; - rc = PMIx_Publish(info, 1); - assert(PMIX_SUCCESS == rc); - } - - printf("I am rank %d\n", rank); - - { - bool flag; - pmix_info_t *info; - PMIX_INFO_CREATE(info, 1); - flag = true; - PMIX_INFO_LOAD(info, PMIX_COLLECT_DATA, &flag, PMIX_BOOL); - rc = PMIx_Fence(&myproc, 1, info, 1); - assert(PMIX_SUCCESS == rc); - PMIX_INFO_FREE(info, 1); - } - - if (rank == 1) { - int i; - pmix_pdata_t *pdata; - PMIX_PDATA_CREATE(pdata, 2); - snprintf(pdata[0].key, PMIX_MAX_KEYLEN, "magic-found"); - snprintf(pdata[1].key, PMIX_MAX_KEYLEN, "magic-not-found"); - rc = PMIx_Lookup(&pdata[0], 2, NULL, 0); - assert((PMIX_SUCCESS == rc) || (PMIX_ERR_NOT_FOUND == rc)); - for ( i = 0 ; i < 2 ; i++ ) - if (pdata[i].value.type == PMIX_STRING) - printf("Found[%d] %d %s\n", i, pdata[i].value.type, pdata[i].value.data.string); - else - printf("Found[%d] %d\n", i, pdata[i].value.type); - PMIX_PDATA_FREE(pdata, 1); - } - - rc = PMIx_Finalize(NULL, 0); - assert(PMIX_SUCCESS == rc); - -} diff --git a/orte/mca/rml/ofi/rml_ofi_component.c b/orte/mca/rml/ofi/rml_ofi_component.c index f8dca46b396..238f46ef35a 100644 --- a/orte/mca/rml/ofi/rml_ofi_component.c +++ b/orte/mca/rml/ofi/rml_ofi_component.c @@ -11,6 +11,7 @@ #include "orte/constants.h" #include "opal/mca/base/base.h" +#include "opal/util/argv.h" #include "opal/util/output.h" #include "opal/mca/backtrace/backtrace.h" #include "opal/mca/event/event.h" From 8e64382edf7265d974a69aeefd3d13da5f2083bb Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 2 Dec 2016 19:16:07 -0800 Subject: [PATCH 2/4] Update to correct tarball Signed-off-by: Ralph Castain --- opal/mca/pmix/pmix2x/pmix/README | 2 +- opal/mca/pmix/pmix2x/pmix/VERSION | 4 +- opal/mca/pmix/pmix2x/pmix/config/pmix.m4 | 2 +- .../pmix/pmix2x/pmix/include/pmix_rename.h | 74 ---------- .../pmix/pmix2x/pmix/include/pmix_version.h | 20 --- .../mca/pinstalldirs/config/pinstall_dirs.h | 129 ------------------ 6 files changed, 4 insertions(+), 227 deletions(-) delete mode 100644 opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h delete mode 100644 opal/mca/pmix/pmix2x/pmix/include/pmix_version.h delete mode 100644 opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h diff --git a/opal/mca/pmix/pmix2x/pmix/README b/opal/mca/pmix/pmix2x/pmix/README index 3b435f1d668..60df07dc77d 100644 --- a/opal/mca/pmix/pmix2x/pmix/README +++ b/opal/mca/pmix/pmix2x/pmix/README @@ -269,7 +269,7 @@ PMIx provides forward ABI compatibility in all versions of a given feature release series and its corresponding super stable series. For example, on a single platform, an pmix application linked against PMIx v1.3.2 shared libraries can be -updated to point to the shared libraries in any successive v1.2.x or +updated to point to the shared libraries in any successive v1.3.x or v1.4 release and still work properly (e.g., via the LD_LIBRARY_PATH environment variable or other operating system mechanism). diff --git a/opal/mca/pmix/pmix2x/pmix/VERSION b/opal/mca/pmix/pmix2x/pmix/VERSION index 8b3aadd77a7..9602917ea8c 100644 --- a/opal/mca/pmix/pmix2x/pmix/VERSION +++ b/opal/mca/pmix/pmix2x/pmix/VERSION @@ -30,7 +30,7 @@ greek= # command, or with the date (if "git describe" fails) in the form of # "date". -repo_rev=git211a0ef +repo_rev=gitc8f26f9 # If tarball_version is not empty, it is used as the version string in # the tarball filename, regardless of all other versions listed in @@ -44,7 +44,7 @@ tarball_version= # The date when this release was created -date="Dec 01, 2016" +date="Dec 02, 2016" # The shared library version of each of PMIx's public libraries. # These versions are maintained in accordance with the "Library diff --git a/opal/mca/pmix/pmix2x/pmix/config/pmix.m4 b/opal/mca/pmix/pmix2x/pmix/config/pmix.m4 index 8013167e2d4..2b4b4a2a812 100644 --- a/opal/mca/pmix/pmix2x/pmix/config/pmix.m4 +++ b/opal/mca/pmix/pmix2x/pmix/config/pmix.m4 @@ -278,7 +278,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[ # fails # - checks for __inline__, which then emits no error, and works # - # This also works nicely for gcc 2.x because "inline" will work on + # This also works nicely for gcc 3.x because "inline" will work on # the first check, and all is fine. :-) PMIX_CFLAGS_save=$CFLAGS diff --git a/opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h deleted file mode 100644 index c3e3e404190..00000000000 --- a/opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2016 Intel, Inc. All rights reserved - * Copyright (c) 2016 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef PMIX_RENAME_H -#define PMIX_RENAME_H - -#define PMIx_Init OPAL_MCA_PMIX3X_PMIx_Init -#define PMIx_Initialized OPAL_MCA_PMIX3X_PMIx_Initialized -#define PMIx_Finalize OPAL_MCA_PMIX3X_PMIx_Finalize -#define PMIx_Abort OPAL_MCA_PMIX3X_PMIx_Abort -#define PMIx_Put OPAL_MCA_PMIX3X_PMIx_Put -#define PMIx_Commit OPAL_MCA_PMIX3X_PMIx_Commit -#define PMIx_Fence OPAL_MCA_PMIX3X_PMIx_Fence -#define PMIx_Fence_nb OPAL_MCA_PMIX3X_PMIx_Fence_nb -#define PMIx_Get OPAL_MCA_PMIX3X_PMIx_Get -#define PMIx_Get_nb OPAL_MCA_PMIX3X_PMIx_Get_nb -#define PMIx_Publish OPAL_MCA_PMIX3X_PMIx_Publish -#define PMIx_Publish_nb OPAL_MCA_PMIX3X_PMIx_Publish_nb -#define PMIx_Lookup OPAL_MCA_PMIX3X_PMIx_Lookup -#define PMIx_Lookup_nb OPAL_MCA_PMIX3X_PMIx_Lookup_nb -#define PMIx_Unpublish OPAL_MCA_PMIX3X_PMIx_Unpublish -#define PMIx_Unpublish_nb OPAL_MCA_PMIX3X_PMIx_Unpublish_nb -#define PMIx_Spawn OPAL_MCA_PMIX3X_PMIx_Spawn -#define PMIx_Spawn_nb OPAL_MCA_PMIX3X_PMIx_Spawn_nb -#define PMIx_Connect OPAL_MCA_PMIX3X_PMIx_Connect -#define PMIx_Connect_nb OPAL_MCA_PMIX3X_PMIx_Connect_nb -#define PMIx_Disconnect OPAL_MCA_PMIX3X_PMIx_Disconnect -#define PMIx_Disconnect_nb OPAL_MCA_PMIX3X_PMIx_Disconnect_nb -#define PMIx_Resolve_peers OPAL_MCA_PMIX3X_PMIx_Resolve_peers -#define PMIx_Resolve_nodes OPAL_MCA_PMIX3X_PMIx_Resolve_nodes -#define PMIx_Query_info_nb OPAL_MCA_PMIX3X_PMIx_Query_info_nb -#define PMIx_Log_nb OPAL_MCA_PMIX3X_PMIx_Log_nb - -#define PMIx_server_init OPAL_MCA_PMIX3X_PMIx_server_init -#define PMIx_server_finalize OPAL_MCA_PMIX3X_PMIx_server_finalize -#define PMIx_generate_regex OPAL_MCA_PMIX3X_PMIx_generate_regex -#define PMIx_generate_ppn OPAL_MCA_PMIX3X_PMIx_generate_ppn -#define PMIx_server_register_nspace OPAL_MCA_PMIX3X_PMIx_server_register_nspace -#define PMIx_server_deregister_nspace OPAL_MCA_PMIX3X_PMIx_server_deregister_nspace -#define PMIx_server_register_client OPAL_MCA_PMIX3X_PMIx_server_register_client -#define PMIx_server_deregister_client OPAL_MCA_PMIX3X_PMIx_server_deregister_client -#define PMIx_server_setup_fork OPAL_MCA_PMIX3X_PMIx_server_setup_fork -#define PMIx_server_dmodex_request OPAL_MCA_PMIX3X_PMIx_server_dmodex_request - -#define PMIx_tool_init OPAL_MCA_PMIX3X_PMIx_tool_init -#define PMIx_tool_finalize OPAL_MCA_PMIX3X_PMIx_tool_finalize - -#define PMIx_Register_event_handler OPAL_MCA_PMIX3X_PMIx_Register_event_handler -#define PMIx_Deregister_event_handler OPAL_MCA_PMIX3X_PMIx_Deregister_event_handler -#define PMIx_Notify_event OPAL_MCA_PMIX3X_PMIx_Notify_event -#define PMIx_Error_string OPAL_MCA_PMIX3X_PMIx_Error_string -#define PMIx_Proc_state_string OPAL_MCA_PMIX3X_PMIx_Proc_state_string -#define PMIx_Persistence_string OPAL_MCA_PMIX3X_PMIx_Persistence_string -#define PMIx_Data_range_string OPAL_MCA_PMIX3X_PMIx_Data_range_string -#define PMIx_Info_directives_string OPAL_MCA_PMIX3X_PMIx_Info_directives_string -#define PMIx_Data_type_string OPAL_MCA_PMIX3X_PMIx_Data_type_string -#define PMIx_Get_version OPAL_MCA_PMIX3X_PMIx_Get_version -#define PMIx_Store_internal OPAL_MCA_PMIX3X_PMIx_Store_internal - -#define pmix_value_load OPAL_MCA_PMIX3X_pmix_value_load -#define pmix_value_xfer OPAL_MCA_PMIX3X_pmix_value_xfer -#define pmix_globals OPAL_MCA_PMIX3X_pmix_globals -#define pmix_output OPAL_MCA_PMIX3X_pmix_output -#define pmix_output_verbose OPAL_MCA_PMIX3X_pmix_output_verbose - -#endif diff --git a/opal/mca/pmix/pmix2x/pmix/include/pmix_version.h b/opal/mca/pmix/pmix2x/pmix/include/pmix_version.h deleted file mode 100644 index bb8bf7c6fbb..00000000000 --- a/opal/mca/pmix/pmix2x/pmix/include/pmix_version.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2016 Mellanox Technologies, Inc. - * All rights reserved. - * Copyright (c) 2016 Intel, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#ifndef PMIx_VERSION_H -#define PMIx_VERSION_H - -/* define PMIx version */ -#define PMIX_VERSION_MAJOR 2L -#define PMIX_VERSION_MINOR 0L - -#endif diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h b/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h deleted file mode 100644 index d97fa68eaea..00000000000 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * Copyright (c) 2004-2005 The Regents of the University of California. - * All rights reserved. - * Copyright (c) 2007 Los Alamos National Security, LLC. - * All rights reserved. - * Copyright (c) 2016 Intel, Inc. All rights reserved - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - * This file should be included by any file that needs the - * installation directories hard-coded into the object file. This - * should be avoided if at all possible, but there are some places - * (like the wrapper compilers) where it is infinitely easier to have - * the paths stored. - * - * If you have questions about which directory to use, we try as best - * we can to follow the GNU coding standards on this issue. The - * description of each directory can be found at the following URL: - * - * http://www.gnu.org/prep/standards/html_node/Directory-Variables.html - * - * The line below is to shut AC 2.60 up about datarootdir. Don't remove. - * datarootdir=foo - */ - -#ifndef PMIX_INST_DIRS_H -#define PMIX_INST_DIRS_H - -#define PMIX_INSTALL_PREFIX "/home/common/openmpi/build/foobar" -#define PMIX_EXEC_PREFIX "${prefix}" - -/* The directory for installing executable programs that users can - run. */ -#define PMIX_BINDIR "${exec_prefix}/bin" - -/* The directory for installing executable programs that can be run - from the shell, but are only generally useful to system - administrators. */ -#define PMIX_SBINDIR "${exec_prefix}/sbin" - -/* The directory for installing executable programs to be run by other - programs rather than by users. - - The definition of ‘libexecdir’ is the same for all packages, so - you should install your data in a subdirectory thereof. Most - packages install their data under $(libexecdir)/package-name/, - possibly within additional subdirectories thereof, such as - $(libexecdir)/package-name/machine/version. */ -#define PMIX_LIBEXECDIR "${exec_prefix}/libexec" - -/* The root of the directory tree for read-only - architecture-independent data files. - - See not about PMIX_DATADIR. And you probably want that one, not - this one. This is one of those "building block" paths, that is - really only used for defining other paths. */ -#define PMIX_DATAROOTDIR "${prefix}/share" - -/* The directory for installing idiosyncratic read-only - architecture-independent data files for this program. - - The definition of ‘datadir’ is the same for all packages, so you - should install your data in a subdirectory thereof. Most packages - install their data under $(datadir)/package-name/. */ -#define PMIX_DATADIR "${datarootdir}" - -/* $(datadir)/package-name/. You probably want to use this instead of - PMIX_DATADIR */ -#define PMIX_PKGDATADIR "${datadir}/pmix" - -/* The directory for installing read-only data files that pertain to a - single machine–that is to say, files for configuring a host. Mailer - and network configuration files, /etc/passwd, and so forth belong - here. All the files in this directory should be ordinary ASCII text - files. - - Do not install executables here in this directory (they probably - belong in $(libexecdir) or $(sbindir)). Also do not install files - that are modified in the normal course of their use (programs whose - purpose is to change the configuration of the system - excluded). Those probably belong in $(localstatedir). */ -#define PMIX_SYSCONFDIR "${prefix}/etc" - -/* The directory for installing architecture-independent data files - which the programs modify while they run. */ -#define PMIX_SHAREDSTATEDIR "${prefix}/com" - -/* The directory for installing data files which the programs modify - while they run, and that pertain to one specific machine. Users - should never need to modify files in this directory to configure - the package's operation; put such configuration information in - separate files that go in $(datadir) or - $(sysconfdir). */ -#define PMIX_LOCALSTATEDIR "${prefix}/var" - -/* The directory for object files and libraries of object code. Do not - install executables here, they probably ought to go in - $(libexecdir) instead. */ -#define PMIX_LIBDIR "${exec_prefix}/lib" - -/* $(libdir)/package-name/. This is where components should go */ -#define PMIX_PKGLIBDIR "${libdir}/pmix" - -/* The directory for installing header files to be included by user - programs with the C ‘#include’ preprocessor directive. */ -#define PMIX_INCLUDEDIR "${prefix}/include" - -/* $(includedir)/package-name/. The devel headers go in here */ -#define PMIX_PKGINCLUDEDIR "${includedir}/pmix" - -/* The directory for installing the Info files for this package. */ -#define PMIX_INFODIR "${datarootdir}/info" - -/* The top-level directory for installing the man pages (if any) for - this package. */ -#define PMIX_MANDIR "${datarootdir}/man" - -#endif From 342dbfcf4e5ee2b8fbd6ba6a797e2f0b8fc98cfb Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 2 Dec 2016 20:33:03 -0800 Subject: [PATCH 3/4] Update Signed-off-by: Ralph Castain --- opal/mca/pmix/pmix2x/configure.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opal/mca/pmix/pmix2x/configure.m4 b/opal/mca/pmix/pmix2x/configure.m4 index c9ba1fa9f36..0c5441e9fb4 100644 --- a/opal/mca/pmix/pmix2x/configure.m4 +++ b/opal/mca/pmix/pmix2x/configure.m4 @@ -37,11 +37,11 @@ AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[ opal_pmix_pmix2x_save_LDFLAGS=$LDFLAGS opal_pmix_pmix2x_save_LIBS=$LIBS - AC_ARG_ENABLE([pmix3-dstore], - [AC_HELP_STRING([--enable-pmix3-dstore], + AC_ARG_ENABLE([pmix-dstore], + [AC_HELP_STRING([--enable-pmix-dstore], [Enable PMIx shared memory data store (default: disabled)])]) - AC_MSG_CHECKING([if PMIx3 shared memory data store is enabled]) - if test "$enable_pmix3_dstore" != "no"; then + AC_MSG_CHECKING([if PMIx shared memory data store is enabled]) + if test "$enable_pmix2_dstore" != "no"; then AC_MSG_RESULT([yes]) opal_pmix_pmix2x_sm_flag=--enable-dstore else From a4e3f615e3dee38f57e6cc1173dba985a12b406b Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 2 Dec 2016 20:50:59 -0800 Subject: [PATCH 4/4] Fix executable modes of pmix config scripts Signed-off-by: Ralph Castain --- opal/mca/pmix/pmix2x/pmix/config/distscript.sh | 0 opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh | 0 opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 opal/mca/pmix/pmix2x/pmix/config/distscript.sh mode change 100644 => 100755 opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh mode change 100644 => 100755 opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl diff --git a/opal/mca/pmix/pmix2x/pmix/config/distscript.sh b/opal/mca/pmix/pmix2x/pmix/config/distscript.sh old mode 100644 new mode 100755 diff --git a/opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh b/opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh old mode 100644 new mode 100755 diff --git a/opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl b/opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl old mode 100644 new mode 100755