Skip to content

Pull in the topology early and set cache line size #8760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rd-party/prrte
Submodule prrte updated 47 files
+45 −1,126 config/prte_config_asm.m4
+2 −3 configure.ac
+2 −1 src/class/prte_list.c
+7 −5 src/class/prte_object.c
+14 −27 src/include/prte_stdatomic.h
+3 −1 src/runtime/prte_finalize.c
+6 −12 src/runtime/prte_locks.c
+7 −5 src/runtime/prte_locks.h
+3 −1 src/runtime/prte_quit.c
+2 −1 src/runtime/prte_wait.c
+2 −1 src/runtime/prte_wait.h
+3 −11 src/sys/Makefile.am
+0 −49 src/sys/architecture.h
+0 −25 src/sys/arm/Makefile.am
+0 −248 src/sys/arm/atomic.h
+0 −35 src/sys/arm/timer.h
+0 −38 src/sys/arm/update.sh
+0 −25 src/sys/arm64/Makefile.am
+0 −335 src/sys/arm64/atomic.h
+0 −44 src/sys/arm64/timer.h
+0 −38 src/sys/arm64/update.sh
+6 −597 src/sys/atomic.h
+82 −54 src/sys/atomic_gcc_builtin.h
+0 −516 src/sys/atomic_impl.h
+5 −76 src/sys/atomic_stdc.h
+0 −87 src/sys/cma.h
+0 −26 src/sys/gcc_builtin/Makefile.am
+0 −24 src/sys/ia32/Makefile.am
+0 −153 src/sys/ia32/atomic.h
+0 −55 src/sys/ia32/timer.h
+0 −38 src/sys/ia32/update.sh
+0 −24 src/sys/powerpc/Makefile.am
+0 −396 src/sys/powerpc/atomic.h
+0 −50 src/sys/powerpc/timer.h
+0 −41 src/sys/powerpc/update.sh
+0 −115 src/sys/timer.h
+0 −26 src/sys/x86_64/Makefile.am
+0 −244 src/sys/x86_64/atomic.h
+0 −73 src/sys/x86_64/timer.h
+0 −38 src/sys/x86_64/update.sh
+2 −8 src/threads/mutex.c
+2 −22 src/threads/mutex.h
+6 −57 src/threads/mutex_unix.h
+13 −12 src/tools/prte/prte.c
+9 −50 src/tools/prun/help-prun.txt
+21 −13 src/tools/prun/prun.c
+13 −5 src/tools/pterm/pterm.c
2 changes: 1 addition & 1 deletion contrib/platform/intel/bend/mac
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enable_ipv6=no
enable_man_pages=no
enable_mpi_fortran=no
enable_memchecker=no
enable_mca_no_build=memchecker,coll-adapt,coll-cuda,coll-demo,coll-ftagree,coll-han,coll-hcoll,coll-inter,coll-libnbc,coll-monitoring,coll-portals4,coll-tuned,common-monitoring,common-ompio,fbtl,fcoll,fs,io,mtl,osc,pml-cm,pml-monitoring,pml-ucx,pml-v,sharedfp,topo,vprotocol,btl-ofi,btl-portals4,btl-smcuda,btl-uct,btl-ugni,btl-usnic,common-cuda,common-ofi,common-ucx
enable_mca_no_build=memchecker,common-monitoring,common-ompio,fbtl,fcoll,fs,io,mtl,osc,pml-cm,pml-monitoring,pml-ucx,pml-v,sharedfp,topo,vprotocol,btl-ofi,btl-portals4,btl-smcuda,btl-uct,btl-ugni,btl-usnic,common-cuda,common-ofi,common-ucx
enable_contrib_no_build=libompitrace
with_memory_manager=no
with_devel_headers=yes
Expand Down
37 changes: 37 additions & 0 deletions ompi/runtime/ompi_mpi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
* All Rights reserved.
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -402,6 +403,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
pmix_status_t rc;
OMPI_TIMING_INIT(64);
opal_pmix_lock_t mylock;
opal_process_name_t pname;

ompi_hook_base_mpi_init_top(argc, argv, requested, provided);

Expand Down Expand Up @@ -445,6 +447,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
ompi_mpi_thread_level(requested, provided);

/* Setup enough to check get/set MCA params */
memset(&opal_process_info, 0, sizeof(opal_process_info));
if (OPAL_SUCCESS != (ret = opal_init_util(&argc, &argv))) {
error = "ompi_mpi_init: opal_init_util failed";
goto error;
Expand All @@ -470,6 +473,40 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
goto error;
}

/* setup our internal nspace hack */
opal_pmix_setup_nspace_tracker();
/* init PMIx */
if (PMIX_SUCCESS != (ret = PMIx_Init(&opal_process_info.myprocid, NULL, 0))) {
/* if we get PMIX_ERR_UNREACH indicating that we cannot reach the
* server, then we assume we are operating as a singleton */
if (PMIX_ERR_UNREACH == ret) {
ompi_singleton = true;
} else {
/* we cannot run - this could be due to being direct launched
* without the required PMI support being built, so print
* out a help message indicating it */
opal_show_help("help-mpi-runtime.txt", "no-pmi", true, PMIx_Error_string(ret));
return OPAL_ERR_SILENT;
}
}
/* setup the process name fields - also registers the new nspace */
OPAL_PMIX_CONVERT_PROCT(ret, &pname, &opal_process_info.myprocid);
if (OPAL_SUCCESS != ret) {
error = "ompi_mpi_init: converting process name";
goto error;
}
OPAL_PROC_MY_NAME.jobid = pname.jobid;
OPAL_PROC_MY_NAME.vpid = pname.vpid;
opal_process_info.my_name.jobid = OPAL_PROC_MY_NAME.jobid;
opal_process_info.my_name.vpid = OPAL_PROC_MY_NAME.vpid;

/* get our topology and cache line size */
ret = opal_hwloc_base_get_topology();
if (OPAL_SUCCESS != ret) {
error = "ompi_mpi_init: get topology";
goto error;
}

if (OPAL_SUCCESS != (ret = opal_arch_set_fortran_logical_size(sizeof(ompi_fortran_logical_t)))) {
error = "ompi_mpi_init: opal_arch_set_fortran_logical_size failed";
goto error;
Expand Down
29 changes: 0 additions & 29 deletions ompi/runtime/ompi_rte.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ int ompi_rte_init(int *pargc, char ***pargv)

u32ptr = &u32;
u16ptr = &u16;
memset(&opal_process_info, 0, sizeof(opal_process_info));

/* Convince OPAL to use our naming scheme */
opal_process_name_print = _process_name_print_for_opal;
Expand All @@ -561,34 +560,6 @@ int ompi_rte_init(int *pargc, char ***pargv)
goto error;
}

/* setup our internal nspace hack */
opal_pmix_setup_nspace_tracker();

/* initialize the selected module */
if (PMIX_SUCCESS != (ret = PMIx_Init(&opal_process_info.myprocid, NULL, 0))) {
/* if we get PMIX_ERR_UNREACH indicating that we cannot reach the
* server, then we assume we are operating as a singleton */
if (PMIX_ERR_UNREACH == ret) {
ompi_singleton = true;
} else {
/* we cannot run - this could be due to being direct launched
* without the required PMI support being built, so print
* out a help message indicating it */
opal_show_help("help-mpi-runtime.txt", "no-pmi", true, PMIx_Error_string(ret));
return OPAL_ERR_SILENT;
}
}

/* setup the process name fields - also registers the new nspace */
OPAL_PMIX_CONVERT_PROCT(rc, &pname, &opal_process_info.myprocid);
if (OPAL_SUCCESS != rc) {
return rc;
}
OPAL_PROC_MY_NAME.jobid = pname.jobid;
OPAL_PROC_MY_NAME.vpid = pname.vpid;
opal_process_info.my_name.jobid = OPAL_PROC_MY_NAME.jobid;
opal_process_info.my_name.vpid = OPAL_PROC_MY_NAME.vpid;

/* set our hostname */
ev1 = NULL;
OPAL_MODEX_RECV_VALUE_OPTIONAL(ret, PMIX_HOSTNAME, &OPAL_PROC_MY_NAME,
Expand Down