commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
February 2016
- 1 participants
- 27 discussions
[mpich] MPICH primary repository branch, master, updated. v3.2-209-g0e37fd5
by noreply@mpich.org 19 Feb '16
by noreply@mpich.org 19 Feb '16
19 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 0e37fd5d6c375aeb7d00eaaae23d709af1c88388 (commit)
via fe136b43a7242db04ce3eddf3e4fe5c41ae92827 (commit)
via 3f83856bba2d70686692d38652cd69294ec46dc6 (commit)
from 9f06000c160665b8a39b49b92c950b47bbf5dea1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/0e37fd5d6c375aeb7d00eaaae23d709af…
commit 0e37fd5d6c375aeb7d00eaaae23d709af1c88388
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Wed Oct 14 11:02:19 2015 -0500
a test for fs-aware split_type
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/comm/cmsplit_type.c b/test/mpi/comm/cmsplit_type.c
index 5385fac..819812a 100644
--- a/test/mpi/comm/cmsplit_type.c
+++ b/test/mpi/comm/cmsplit_type.c
@@ -14,9 +14,10 @@
int main(int argc, char *argv[])
{
- int rank, size, verbose = 0;
+ int rank, size, verbose = 0, errs=0, tot_errs=0;
int wrank;
MPI_Comm comm;
+ MPI_Info info;
MPI_Init(&argc, &argv);
@@ -27,38 +28,87 @@ int main(int argc, char *argv[])
/* Check to see if MPI_COMM_TYPE_SHARED works correctly */
MPI_Comm_split_type(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, &comm);
- if (comm == MPI_COMM_NULL)
+ if (comm == MPI_COMM_NULL) {
printf("Expected a non-null communicator, but got MPI_COMM_NULL\n");
+ errs++;
+ }
+ else {
+ MPI_Comm_rank(comm, &rank);
+ MPI_Comm_size(comm, &size);
+ if (rank == 0 && verbose)
+ printf("Created shared subcommunicator of size %d\n", size);
+ MPI_Comm_free(&comm);
+ }
+
+#ifdef MPIX_COMM_TYPE_NEIGHBORHOOD
+ /* the MPICH-specific MPIX_COMM_TYPE_NEIGHBORHOOD*/
+ /* test #1: expected behavior -- user provided a directory, and we
+ * determine which processes share access to it */
+ MPI_Info_create(&info);
+ if (argc == 2)
+ MPI_Info_set(info, "nbhd_common_dirname", argv[1]);
+ else
+ MPI_Info_set(info, "nbhd_common_dirname", ".");
+ MPI_Comm_split_type(MPI_COMM_WORLD, MPIX_COMM_TYPE_NEIGHBORHOOD, 0,
+ info, &comm);
+ if (comm == MPI_COMM_NULL) {
+ printf("Expected a non-null communicator, but got MPI_COMM_NULL\n");
+ errs++;
+ }
else {
MPI_Comm_rank(comm, &rank);
MPI_Comm_size(comm, &size);
if (rank == 0 && verbose)
- printf("Created subcommunicator of size %d\n", size);
+ printf("Correctly created common-file subcommunicator of size %d\n", size);
MPI_Comm_free(&comm);
}
+ /* test #2: a hint we don't know about */
+ MPI_Info_delete(info, "nbhd_common_dirname");
+ MPI_Info_set(info, "mpix_tooth_fairy", "enable");
+ MPI_Comm_split_type(MPI_COMM_WORLD, MPIX_COMM_TYPE_NEIGHBORHOOD, 0,
+ info, &comm);
+ if (comm != MPI_COMM_NULL) {
+ printf("Expected a NULL communicator, but got something else\n");
+ errs++;
+ MPI_Comm_free(&comm);
+ }
+ else {
+ if (rank == 0 && verbose)
+ printf("Unknown hint correctly resulted in NULL communicator\n");
+ }
+
+
+ MPI_Info_free(&info);
+#endif
+
/* Check to see if MPI_UNDEFINED is respected */
MPI_Comm_split_type(MPI_COMM_WORLD, (wrank % 2 == 0) ? MPI_COMM_TYPE_SHARED : MPI_UNDEFINED,
0, MPI_INFO_NULL, &comm);
- if ((wrank % 2) && (comm != MPI_COMM_NULL))
+ if ((wrank % 2) && (comm != MPI_COMM_NULL)) {
printf("Expected MPI_COMM_NULL, but did not get one\n");
+ errs++;
+ }
if (wrank % 2 == 0) {
- if (comm == MPI_COMM_NULL)
+ if (comm == MPI_COMM_NULL) {
printf("Expected a non-null communicator, but got MPI_COMM_NULL\n");
+ errs++;
+ }
else {
MPI_Comm_rank(comm, &rank);
MPI_Comm_size(comm, &size);
if (rank == 0 && verbose)
- printf("Created subcommunicator of size %d\n", size);
+ printf("Created shared subcommunicator of size %d\n", size);
MPI_Comm_free(&comm);
}
}
+ MPI_Reduce(&errs, &tot_errs, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
/* Use wrank because Comm_split_type may return more than one communicator
* across the job, and if so, each will have a rank 0 entry. Test
* output rules are for a single process to write the successful
* test (No Errors) output. */
- if (wrank == 0)
+ if (wrank == 0 && errs == 0)
printf(" No errors\n");
MPI_Finalize();
diff --git a/test/mpi/comm/testlist b/test/mpi/comm/testlist
index c14e078..8e0411e 100644
--- a/test/mpi/comm/testlist
+++ b/test/mpi/comm/testlist
@@ -15,7 +15,11 @@ cmfree 4
cmsplit 4
cmsplit2 12
probe-intercomm 2
-cmsplit_type 4 mpiversion=3.0
+# one way to split a communicator, if implementation supports it, is by access
+# to a common file system. argument is a directory whose presence or
+# non-presence will determine the communicator split. the other split_type
+# cases will ignore the argument
+cmsplit_type 4 mpiversion=3.0 arg="."
comm_create_group 4 mpiversion=3.0
comm_create_group 8 mpiversion=3.0
comm_group_half 2 mpiversion=3.0
http://git.mpich.org/mpich.git/commitdiff/fe136b43a7242db04ce3eddf3e4fe5c41…
commit fe136b43a7242db04ce3eddf3e4fe5c41ae92827
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Thu Oct 15 15:12:37 2015 -0500
extend comm_split_type based on neighborhood props
In this first extension, we split the communicator based on common
access to a filesystem.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index eeb656c..d95e4a9 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -545,6 +545,9 @@ typedef int MPI_Info;
/* predefined types for MPI_Comm_split_type */
#define MPI_COMM_TYPE_SHARED 1
+/* MPICH-specific types */
+#define MPIX_COMM_TYPE_NEIGHBORHOOD 2
+
/* Definitions that are determined by configure. */
typedef @MPI_AINT@ MPI_Aint;
typedef @MPI_FINT@ MPI_Fint;
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 23ef928..73c5472 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -70,6 +70,10 @@ int usleep(useconds_t usec);
#include "mpidpre.h"
#include "mpir_refcount.h"
+#if defined(HAVE_ROMIO)
+int MPIR_Comm_split_filesystem(MPI_Comm comm, int key, const char *dirname, MPI_Comm *newcomm);
+#endif
+
#if defined(HAVE_LONG_LONG_INT)
/* tt#1776: some platforms have "long long" but not a LLONG_MAX/ULLONG_MAX,
* usually because some feature test macro has turned them off in glibc's
diff --git a/src/mpi/comm/comm_split_type.c b/src/mpi/comm/comm_split_type.c
index c4e2f59..838c561 100644
--- a/src/mpi/comm/comm_split_type.c
+++ b/src/mpi/comm/comm_split_type.c
@@ -35,8 +35,43 @@ int MPIR_Comm_split_type_impl(MPID_Comm * comm_ptr, int split_type, int key,
{
int mpi_errno = MPI_SUCCESS;
- /* Only MPI_COMM_TYPE_SHARED and MPI_UNDEFINED are supported */
- MPIU_Assert(split_type == MPI_COMM_TYPE_SHARED || split_type == MPI_UNDEFINED);
+ /* Only MPI_COMM_TYPE_SHARED, MPI_UNDEFINED, and
+ * NEIGHBORHOOD are supported */
+ MPIU_Assert(split_type == MPI_COMM_TYPE_SHARED ||
+ split_type == MPI_UNDEFINED ||
+ split_type == MPIX_COMM_TYPE_NEIGHBORHOOD);
+
+ if (split_type == MPIX_COMM_TYPE_NEIGHBORHOOD) {
+ int flag;
+ char hintval[MPI_MAX_INFO_VAL+1];
+
+ /* We plan on dispatching different NEIGHBORHOOD support to
+ * different parts of MPICH, based on the key provided in the
+ * info object. Right now, the one NEIGHBORHOOD we support is
+ * "nbhd_common_dirname", implementation of which lives in ROMIO */
+
+ MPIR_Info_get_impl(info_ptr, "nbhd_common_dirname", MPI_MAX_INFO_VAL, hintval,
+ &flag);
+ if (flag) {
+ MPI_Comm dummycomm;
+ MPID_Comm * dummycomm_ptr;
+
+ mpi_errno = MPIR_Comm_split_filesystem(comm_ptr->handle, key,
+ hintval, &dummycomm);
+ MPID_Comm_get_ptr(dummycomm, dummycomm_ptr);
+ *newcomm_ptr = dummycomm_ptr;
+
+ goto fn_exit;
+ }
+ /* we don't work with other hints yet, but if we did (e.g.
+ * nbhd_network, nbhd_partition), we'd do so here */
+
+ /* In the mean time, the user passed in COMM_TYPE_NEIGHBORHOOD
+ * but did not give us an info we know how to work with.
+ * Throw up our hands and treat it like UNDEFINED. This will
+ * result in MPI_COMM_NULL being returned to the user. */
+ split_type = MPI_UNDEFINED;
+ }
if (MPID_Comm_fns == NULL || MPID_Comm_fns->split_type == NULL) {
int color = (split_type == MPI_COMM_TYPE_SHARED) ? comm_ptr->rank : MPI_UNDEFINED;
diff --git a/src/mpi/romio/mpi-io/Makefile.mk b/src/mpi/romio/mpi-io/Makefile.mk
index d4d5a29..275cb98 100644
--- a/src/mpi/romio/mpi-io/Makefile.mk
+++ b/src/mpi/romio/mpi-io/Makefile.mk
@@ -77,7 +77,8 @@ romio_other_sources += \
mpi-io/mpich_fileutil.c \
mpi-io/mpir-mpioinit.c \
mpi-io/mpiu_greq.c \
- mpi-io/mpiu_external32.c
+ mpi-io/mpiu_external32.c \
+ mpi-io/mpir_cst_filesys.c
# helper variables for conditionally compiled sources
mpio_request_sources= \
diff --git a/src/mpi/romio/mpi-io/mpir_cst_filesys.c b/src/mpi/romio/mpi-io/mpir_cst_filesys.c
new file mode 100644
index 0000000..74df86a
--- /dev/null
+++ b/src/mpi/romio/mpi-io/mpir_cst_filesys.c
@@ -0,0 +1,184 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2016 UChicago/Argonne LLC
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "mpioimpl.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+/* not to be called directly (note the MPIR_ prefix), but instead from
+ * MPI-level MPI_Comm_split_type implementation (e.g.
+ * MPIR_Comm_split_type_impl). */
+#undef FUNCNAME
+#define FUNCNAME MPIR_Comm_split_filesystem
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+
+/* split communicator based on access to directory 'dirname'. */
+int MPIR_Comm_split_filesystem(MPI_Comm comm, int key, const char *dirname, MPI_Comm * newcomm)
+{
+
+ int i, mpi_errno = MPI_SUCCESS;
+ int rank, nprocs;
+ int id;
+ int32_t *all_ids;
+ char *filename = NULL;
+ int challenge_rank, globally_visible = 0;
+ MPI_Request check_req;
+
+ MPI_Comm_rank(comm, &rank);
+ MPI_Comm_size(comm, &nprocs);
+ MPIR_Get_node_id(comm, rank, &id);
+
+ /* We could detect the common file systems by parsing 'df'-style
+ * output, but that's fidgety, fragile, and error prone. Instead,
+ * determine who shares a file system through testing.
+ *
+ * We shouldn't create a lot of files, though -- we want something
+ * that could work at hundreds of thousands of nodes, and creating a
+ * hundred thousand files in a directory is a recipe for sadness
+ *
+ * In CH3 and in wider practice "shared memory" is the same as "on
+ * the same node, so let's start there.
+ *
+ * - Create file on one processor
+ * - pick a processor outside the "on this node" group
+ * - if that processor can see the file, then assume the file is
+ * visible to all groups.
+ *
+ * note that this scheme works really well for traditional linux clusters:
+ * think nodes with a local scratch drive. this scheme works less well for
+ * a deeper heirarchy. what if the directory in question was hosted by an
+ * i/o forwarding agent?
+ */
+
+ /* learn a bit about what groups were created: as a scalable
+ * optimization we want to check a file's presence from a group
+ * other than which created it */
+ all_ids = MPL_malloc(nprocs * sizeof(*all_ids));
+
+ mpi_errno = MPI_Gather(&id, 1, MPI_INT32_T, all_ids, 1, MPI_INT32_T, 0, comm);
+
+ if (rank == 0) {
+ for (i = 0; i < nprocs; i++) {
+ if (all_ids[i] != id)
+ break;
+ }
+ if (i >= nprocs)
+ /* everyone is in the same group; pick a process that's not rank 0
+ * just in case the file system is really weird */
+ challenge_rank = nprocs - 1;
+ else
+ challenge_rank = i;
+ }
+ mpi_errno = MPI_Bcast(&challenge_rank, 1, MPI_INT, 0, comm);
+
+ /* now that we've informally lumped everyone into groups based on node
+ * (like shared memory does) it's time to poke the file system and see
+ * which group can see what files */
+
+ /* here come a bunch of assumptions:
+ * - file system layouts are homogenous: if one system has /scratch,
+ * all have /scratch
+ * - a globally visible parallel file system will have the same name
+ * everywhere: e.g /gpfs/users/something
+ * - a file created on one node will be deterministically visible on
+ * another. NFS has problems with this
+ * - if a process from one group creates a file, and a process from
+ * another group finds that file, then a process from all groups
+ * can find that file
+ */
+
+ /* is the file globally visible to all? create on rank 0, test on a
+ * different off-group rank.
+ * Use a single short message to force check after create: ordering
+ * is a little odd in case we are creating and checking on the same
+ * rank */
+
+ filename = MPL_calloc(PATH_MAX, sizeof(char));
+
+ if (rank == 0) {
+ int i, pid;
+
+ /* same algorithim as shared file pointer name */
+ srand(time(NULL));
+ i = rand();
+ pid = (int) getpid();
+
+ MPL_snprintf(filename, PATH_MAX, "%s/.commonfstest.%d.%d.%d",
+ dirname == NULL ? "." : dirname, rank, i, pid);
+ }
+
+ MPI_Bcast(filename, PATH_MAX, MPI_BYTE, 0, comm);
+
+ if (rank == challenge_rank) {
+ MPI_Irecv(NULL, 0, MPI_BYTE, 0, 0, comm, &check_req);
+ }
+
+ if (rank == 0) {
+ MPI_File fh;
+ mpi_errno = MPI_File_open(MPI_COMM_SELF, filename,
+ MPI_MODE_CREATE | MPI_MODE_EXCL | MPI_MODE_WRONLY,
+ MPI_INFO_NULL, &fh);
+ if (mpi_errno != MPI_SUCCESS)
+ goto fn_exit;
+ MPI_File_close(&fh);
+ /* the check for file has to happen after file created. only need one
+ * process, though, not a full barrier */
+ MPI_Send(NULL, 0, MPI_BYTE, challenge_rank, 0, comm);
+ }
+
+ if (rank == challenge_rank) {
+ MPI_File fh;
+
+ MPI_Wait(&check_req, MPI_STATUS_IGNORE);
+
+ /* too bad there's no ADIO equivalent of access: we'll have to
+ * open/close the file instead */
+
+ mpi_errno = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY, MPI_INFO_NULL, &fh);
+ if (mpi_errno != MPI_SUCCESS)
+ goto fn_exit;
+ if (mpi_errno == MPI_SUCCESS)
+ globally_visible = 1;
+ MPI_File_close(&fh);
+ }
+ MPI_Bcast(&globally_visible, 1, MPI_INT, challenge_rank, comm);
+
+ /* with the above assumptions, we have two cases for a flie
+ * created on one process:
+ * -- either a process not in the group can access it (node-local
+ * storage of some sort)
+ * -- or a process not in the group cannot access it (globally
+ * accessable parallel file system) */
+
+ if (globally_visible) {
+ MPI_Comm_dup(comm, newcomm);
+ }
+ else {
+ MPI_Comm_split(comm, id, key, newcomm);
+ }
+ if (rank == 0)
+ MPI_File_delete(filename, MPI_INFO_NULL);
+
+ fn_exit:
+ MPL_free(all_ids);
+ MPL_free(filename);
+ return mpi_errno;
+
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+/*
+ * vim: ts=8 sts=4 sw=4 noexpandtab
+ */
http://git.mpich.org/mpich.git/commitdiff/3f83856bba2d70686692d38652cd69294…
commit 3f83856bba2d70686692d38652cd69294ec46dc6
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Fri Feb 12 10:33:01 2016 -0600
Expose get_node_id to ROMIO
some optimizations are easier for ROMIO if it has access to the node id.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/glue/romio/glue_romio.c b/src/glue/romio/glue_romio.c
index 6080327..c44928d 100644
--- a/src/glue/romio/glue_romio.c
+++ b/src/glue/romio/glue_romio.c
@@ -97,3 +97,16 @@ fn_fail:
return mpi_errno;
}
+/* ROMIO could parse hostnames but it's easier if we can let it know
+ * node ids */
+int MPIR_Get_node_id(MPI_Comm comm, int rank, int *id)
+{
+ MPID_Comm *comm_ptr;
+ MPID_Node_id_t node_id;
+
+ MPID_Comm_get_ptr(comm, comm_ptr);
+ MPID_Get_node_id(comm_ptr, rank, &node_id);
+ *id = node_id;
+
+ return MPI_SUCCESS;
+}
diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index 0acc5bd..fc16212 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -41,5 +41,8 @@ void MPIR_Ext_cs_yield(void);
/* to facilitate error checking */
int MPIR_Ext_datatype_iscommitted(MPI_Datatype datatype);
+/* make comm split based on access to a common file system easier */
+int MPIR_Get_node_id(MPI_Comm comm, int rank, int *id);
+
#endif /* defined(GLUE_ROMIO_H_INCLUDED) */
-----------------------------------------------------------------------
Summary of changes:
src/glue/romio/glue_romio.c | 13 ++
src/include/glue_romio.h.in | 3 +
src/include/mpi.h.in | 3 +
src/include/mpiimpl.h | 4 +
src/mpi/comm/comm_split_type.c | 39 ++++++-
src/mpi/romio/mpi-io/Makefile.mk | 3 +-
src/mpi/romio/mpi-io/mpir_cst_filesys.c | 184 +++++++++++++++++++++++++++++++
test/mpi/comm/cmsplit_type.c | 64 ++++++++++-
test/mpi/comm/testlist | 6 +-
9 files changed, 308 insertions(+), 11 deletions(-)
create mode 100644 src/mpi/romio/mpi-io/mpir_cst_filesys.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-206-g9f06000
by noreply@mpich.org 18 Feb '16
by noreply@mpich.org 18 Feb '16
18 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 9f06000c160665b8a39b49b92c950b47bbf5dea1 (commit)
from 9ee96c63c52299e0bc382d0a5817eedaabdceba5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/9f06000c160665b8a39b49b92c950b47b…
commit 9f06000c160665b8a39b49b92c950b47bbf5dea1
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Thu Feb 18 16:06:24 2016 -0600
mpl/dbg: add missing call to va_end
Coverity #122176.
No reviewer.
diff --git a/src/mpl/src/dbg/mpl_dbg.c b/src/mpl/src/dbg/mpl_dbg.c
index 761e147..9d4eadf 100644
--- a/src/mpl/src/dbg/mpl_dbg.c
+++ b/src/mpl/src/dbg/mpl_dbg.c
@@ -186,6 +186,7 @@ int MPL_dbg_outevent(const char *file, int line, int class, int kind, const char
str = va_arg(list, char *);
fprintf(dbg_fp, "%d\t%d\t%llx[%d]\t%d\t%f\t%s\t%d\t%s\n",
world_num, world_rank, threadID, pid, class, curtime, file, line, str);
+ va_end(list);
break;
case 1:
va_start(list, fmat);
-----------------------------------------------------------------------
Summary of changes:
src/mpl/src/dbg/mpl_dbg.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-205-g9ee96c6
by noreply@mpich.org 18 Feb '16
by noreply@mpich.org 18 Feb '16
18 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 9ee96c63c52299e0bc382d0a5817eedaabdceba5 (commit)
via d335259e9deac6b53b47afe6736503a7d71eea35 (commit)
from a5748c7c039db29cf6a4cee5316251ecee1a7f9c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/9ee96c63c52299e0bc382d0a5817eedaa…
commit 9ee96c63c52299e0bc382d0a5817eedaabdceba5
Author: Sangmin Seo <sseo(a)anl.gov>
Date: Tue Feb 16 17:31:00 2016 +0000
Hydra-specific patches for hwloc.
Applied [23821aa1487b] and [637cf86f6f7d].
NOTE for dropped patches:
- [5ce7102445fe]: hwloc-1.11.2 includes the same patch.
- [23cbd2969684]: picked up a different patch in hwloc-1.11.2.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index 69ae667..724f96f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
@@ -9,10 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS = src include
if HWLOC_BUILD_STANDALONE
-SUBDIRS += tests utils
+# SUBDIRS += tests utils
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
-SUBDIRS += doc
+# SUBDIRS += doc
endif
# Do not let automake automatically add the non-standalone dirs to the
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index df42802..c73edc2 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,2 +1,9 @@
-:
-autoreconf ${autoreconf_args:-"-ivf"}
+#!/bin/sh
+
+if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
+ autoreconf=${MPICH_AUTOTOOLS_DIR}/autoreconf
+else
+ autoreconf=${AUTORECONF:-autoreconf}
+fi
+
+$autoreconf ${autoreconf_args:-"-ivf"}
http://git.mpich.org/mpich.git/commitdiff/d335259e9deac6b53b47afe6736503a7d…
commit d335259e9deac6b53b47afe6736503a7d71eea35
Author: Sangmin Seo <sseo(a)anl.gov>
Date: Tue Feb 16 17:10:23 2016 +0000
Upgraded to hwloc-1.11.2.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore b/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore
index 99d4e38..b3a60f9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore
@@ -5,6 +5,12 @@ Makefile
test-suite.log
*~
+/auto.out
+/config.out
+/dist.out
+/doc/doc.out
+/doc/readme.out
+
/config/ar-lib
/config/argz.m4
/config/compile
@@ -41,14 +47,15 @@ test-suite.log
/doc/doxygen-doc/
/doc/images/diagram.eps
/doc/images/diagram.png
-/doc/hwloc-hello
-/doc/hwloc-hello-cpp
-/doc/hwloc-hello-cpp.cpp
-/doc/*.o
-/doc/*.log
-/doc/*.trs
-/doc/doc.out
-/doc/readme.out
+/doc/examples/hwloc-hello
+/doc/examples/hwloc-hello-cpp
+/doc/examples/hwloc-hello-cpp.cpp
+/doc/examples/cpuset+bitmap+cpubind
+/doc/examples/nodeset+membind+policy
+/doc/examples/sharedcaches
+/doc/examples/*.o
+/doc/examples/*.log
+/doc/examples/*.trs
/src/static-components.h
/src/*.lo
@@ -58,6 +65,7 @@ test-suite.log
/tests/wrapper.sh
/tests/hwloc_list_components
/tests/hwloc_bitmap
+/tests/hwloc_bitmap_compare_inclusion
/tests/hwloc_bitmap_string
/tests/hwloc_get_closest_objs
/tests/hwloc_get_obj_covering_cpuset
@@ -102,7 +110,6 @@ test-suite.log
/tests/*.log
/tests/*.trs
-/tests/linux/hwloc-gather-topology
/tests/linux/test-topology.sh
/tests/linux/*.log
/tests/linux/*.trs
@@ -138,6 +145,9 @@ test-suite.log
/utils/hwloc/hwloc-distances.1
/utils/hwloc/hwloc-distrib
/utils/hwloc/hwloc-distrib.1
+/utils/hwloc/hwloc-dump-hwdata
+/utils/hwloc/hwloc-dump-hwdata.1
+/utils/hwloc/hwloc-gather-topology
/utils/hwloc/hwloc-gather-topology.1
/utils/hwloc/hwloc-info
/utils/hwloc/hwloc-info.1
@@ -161,7 +171,7 @@ test-suite.log
/utils/lstopo/*.o
/utils/lstopo/lstopo
/utils/lstopo/lstopo-no-graphics
-/utils/lstopo/lstopo.1
+/utils/lstopo/lstopo-no-graphics.1
/utils/lstopo/test-hwloc-ls.sh
/utils/lstopo/test-*.sh.log
/utils/lstopo/test-*.sh.trs
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS b/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS
index 837b27f..0e52215 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS
@@ -1,8 +1,10 @@
Cédric Augonnet <Cedric.Augonnet(a)labri.fr>
+Guillaume Beauchamp <Guillaume.Beauchamp(a)inria.fr>
Jérôme Clet-Ortega <Jerome.Clet-Ortega(a)labri.fr>
Ludovic Courtès <Ludovic.Courtes(a)inria.fr>
-Brice Goglin <Brice.Goglin(a)inria.fr>
Nathalie Furmento <Nathalie.Furmento(a)labri.fr>
-Samuel Thibault <Samuel.Thibault(a)labri.fr>
-Jeff Squyres <jsquyres(a)cisco.com>
+Brice Goglin <Brice.Goglin(a)inria.fr>
Alexey Kardashevskiy <aik(a)au1.ibm.com>
+Antoine Rougier (University of Bordeaux intern)
+Jeff Squyres <jsquyres(a)cisco.com>
+Samuel Thibault <Samuel.Thibault(a)labri.fr>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
index 5449f70..69ae667 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
@@ -9,10 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS = src include
if HWLOC_BUILD_STANDALONE
-# SUBDIRS += utils tests
+SUBDIRS += tests utils
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
-# SUBDIRS += doc
+SUBDIRS += doc
endif
# Do not let automake automatically add the non-standalone dirs to the
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
index df246fe..c44f16f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
@@ -17,6 +17,93 @@ bug fixes (and other actions) for each version of hwloc since version
in v0.9.1).
+Version 1.11.2
+--------------
+* Improve support for Intel Knights Landing Xeon Phi on Linux:
+ + Group local NUMA nodes of normal memory (DDR) and high-bandwidth memory
+ (MCDRAM) together through "Cluster" groups so that the local MCDRAM is
+ easy to find.
+ - See "How do I find the local MCDRAM NUMA node on Intel Knights
+ Landing Xeon Phi?" in the documentation.
+ - For uniformity across all KNL configurations, always have a NUMA node
+ object even if the host is UMA.
+ + Fix the detection of the memory-side cache:
+ - Add the hwloc-dump-hwdata superuser utility to dump SMBIOS information
+ into /var/run/hwloc/ as root during boot, and load this dumped
+ information from the hwloc library at runtime.
+ - See "Why do I need hwloc-dump-hwdata for caches on Intel Knights
+ Landing Xeon Phi?" in the documentation.
+ Thanks to Grzegorz Andrejczuk for the patches and for the help.
+* The x86 and linux backends may now be combined for discovering CPUs
+ through x86 CPUID and memory from the Linux kernel.
+ This is useful for working around buggy CPU information reported by Linux
+ (for instance the AMD Bulldozer/Piledriver bug below).
+ Combination is enabled by passing HWLOC_COMPONENTS=x86 in the environment.
+* Fix L3 cache sharing on AMD Opteron 63xx (Piledriver) and 62xx (Bulldozer)
+ in the x86 backend. Thanks to many users who helped.
+* Fix the overzealous L3 cache sharing fix added to the x86 backend in 1.11.1
+ for AMD Opteron 61xx (Magny-Cours) processors.
+* The x86 backend may now add the info attribute Inclusive=0 or 1 to caches
+ it discovers, or to caches discovered by other backends earlier.
+ Thanks to Guillaume Beauchamp for the patch.
+* Fix the management on alloc_membind() allocation failures on AIX, HP-UX
+ and OSF/Tru64.
+* Fix spurious failures to load with ENOMEM on AIX in case of Misc objects
+ below PUs.
+* lstopo improvements in X11 and Windows graphical mode:
+ + Add + - f 1 shortcuts to manually zoom-in, zoom-out, reset the scale,
+ or fit the entire window.
+ + Display all keyboard shortcuts in the console.
+* Debug messages may be disabled at runtime by passing HWLOC_DEBUG_VERBOSE=0
+ in the environment when --enable-debug was passed to configure.
+* Add a FAQ entry "What are these Group objects in my topology?".
+
+
+Version 1.11.1
+--------------
+* Detection fixes
+ + Hardwire the topology of Fujitsu K-computer, FX10, FX100 servers to
+ workaround buggy Linux kernels.
+ Thanks to Takahiro Kawashima and Gilles Gouaillardet.
+ + Fix L3 cache information on AMD Opteron 61xx Magny-Cours processors
+ in the x86 backend. Thanks to Guillaume Beauchamp for the patch.
+ + Detect block devices directly attached to PCI without a controller,
+ for instance NVMe disks. Thanks to Barry M. Tannenbaum.
+ + Add the PCISlot attribute to all PCI functions instead of only the
+ first one.
+* Miscellaneous internal fixes
+ + Ignore PCI bridges that could fail assertions by reporting buggy
+ secondary-subordinate bus numbers
+ Thanks to George Bosilca for reporting the issue.
+ + Fix an overzealous assertion when inserting an intermediate Group object
+ while Groups are totally ignored.
+ + Fix a memory leak on Linux on AMD processors with dual-core compute units.
+ Thanks to Bob Benner.
+ + Fix a memory leak on failure to load a xml diff file.
+ + Fix some segfaults when inputting an invalid synthetic description.
+ + Fix a segfault when plugins fail to find core symbols.
+ Thanks to Guy Streeter.
+* Many fixes and improvements in the Windows backend:
+ + Fix the discovery of more than 32 processors and multiple processor
+ groups. Thanks to Barry M. Tannenbaum for the help.
+ + Add thread binding set support in case of multiple process groups.
+ + Add thread binding get support.
+ + Add get_last_cpu_location() support for the current thread.
+ + Disable the unsupported process binding in case of multiple processor
+ groups.
+ + Fix/update the Visual Studio support under contrib/windows.
+ Thanks to Eloi Gaudry for the help.
+* Tools fixes
+ + Fix a segfault when displaying logical indexes in the graphical lstopo.
+ Thanks to Guillaume Mercier for reporting the issue.
+ + Fix lstopo linking with X11 libraries, for instance on Mac OS X.
+ Thanks to Scott Atchley and Pierre Ramet for reporting the issue.
+ + hwloc-annotate, hwloc-diff and hwloc-patch do not drop unavailable
+ resources from the output anymore and those may be annotated as well.
+ + Command-line tools may now import XML from the standard input with -i -.xml
+ + Add missing documentation for the hwloc-info --no-icaches option.
+
+
Version 1.11.0
--------------
* API
@@ -33,7 +120,7 @@ Version 1.11.0
info attributes to Block OS devices on Linux. Thanks to Vineet Pedaballe
for the help.
- Add --disable-libudev to avoid dependency on the libudev library.
- + Add "MemoryDevice" Misc objects with information about DIMMs, on Linux
+ + Add "MemoryModule" Misc objects with information about DIMMs, on Linux
when privileged and when I/O is enabled.
Thanks to Vineet Pedaballe for the help.
+ Add a PCISlot attribute to PCI devices on Linux when supported to
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/README b/src/pm/hydra/tools/topo/hwloc/hwloc/README
index fed9319..6332fbc 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/README
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/README
@@ -557,7 +557,7 @@ Questions and Bugs
Questions should be sent to the devel mailing list (http://www.open-mpi.org/
community/lists/hwloc.php). Bug reports should be reported in the tracker (
-https://git.open-mpi.org/trac/hwloc/).
+https://github.com/open-mpi/hwloc/issues).
If hwloc discovers an incorrect topology for your machine, the very first thing
you should check is to ensure that you have the most recent updates installed
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
index 7233789..3943a7f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
@@ -7,7 +7,7 @@
major=1
minor=11
-release=0
+release=2
# greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be
@@ -16,7 +16,7 @@ release=0
# requirement is that it must be entirely printable ASCII characters
# and have no white space.
-greek=rc3
+greek=rc2
# The date when this release was created
@@ -39,4 +39,4 @@ snapshot_version=${major}.${minor}.${release}${greek}-git
# 2. Version numbers are described in the Libtool current:revision:age
# format.
-libhwloc_so_version=11:6:6
+libhwloc_so_version=11:8:6
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
index c73edc2..df42802 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
@@ -1,9 +1,2 @@
-#!/bin/sh
-
-if [ -n "$MPICH_AUTOTOOLS_DIR" ] ; then
- autoreconf=${MPICH_AUTOTOOLS_DIR}/autoreconf
-else
- autoreconf=${AUTORECONF:-autoreconf}
-fi
-
-$autoreconf ${autoreconf_args:-"-ivf"}
+:
+autoreconf ${autoreconf_args:-"-ivf"}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
index 2f44504..1b4f490 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
@@ -1,7 +1,7 @@
dnl -*- Autoconf -*-
dnl
dnl Copyright © 2009-2015 Inria. All rights reserved.
-dnl Copyright © 2009-2012 Université Bordeaux
+dnl Copyright © 2009-2012, 2015 Université Bordeaux
dnl Copyright © 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology
dnl Corporation. All rights reserved.
@@ -398,7 +398,8 @@ EOF])
GROUP_RELATIONSHIP,
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX,
PSAPI_WORKING_SET_EX_BLOCK,
- PSAPI_WORKING_SET_EX_INFORMATION],
+ PSAPI_WORKING_SET_EX_INFORMATION,
+ PROCESSOR_NUMBER],
[],[],[[#include <windows.h>]])
CPPFLAGS="$old_CPPFLAGS"
AC_CHECK_LIB([gdi32], [main],
@@ -573,15 +574,13 @@ EOF])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
- AC_MSG_CHECKING([for working _syscall3])
+ AC_MSG_CHECKING([for working syscall])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
- #include <linux/unistd.h>
- #include <errno.h>
- #define __NR_hwloc_test 123
- _syscall3(int, hwloc_test, int, param1, int, param2, int, param3);
- ]], [[ hwloc_test(1, 2, 3); ]])],
- [AC_DEFINE([HWLOC_HAVE__SYSCALL3], [1], [Define to 1 if the _syscall3 macro works])
+ #include <unistd.h>
+ #include <sys/syscall.h>
+ ]], [[syscall(1, 2, 3);]])],
+ [AC_DEFINE([HWLOC_HAVE_SYSCALL], [1], [Define to 1 if function `syscall' is available])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
@@ -885,8 +884,11 @@ EOF])
# lstopo needs more
AC_CHECK_HEADERS([X11/Xutil.h],
[AC_CHECK_HEADERS([X11/keysym.h],
- [AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.])])
- AC_SUBST([HWLOC_X11_LIBS], ["-lX11"])
+ [AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.])
+ HWLOC_X11_CPPFLAGS="$X_CFLAGS"
+ AC_SUBST([HWLOC_X11_CPPFLAGS])
+ HWLOC_X11_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+ AC_SUBST([HWLOC_X11_LIBS])])
], [], [#include <X11/Xlib.h>])
])
])
@@ -1211,6 +1213,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
AM_CONDITIONAL([HWLOC_HAVE_WINDOWS], [test "x$hwloc_windows" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_MINGW32], [test "x$target_os" = "xmingw32"])
+ AM_CONDITIONAL([HWLOC_HAVE_X86], [test "x$hwloc_x86_32" = "xyes" -o "x$hwloc_x86_64" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_X86_32], [test "x$hwloc_x86_32" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_X86_64], [test "x$hwloc_x86_64" = "xyes"])
AM_CONDITIONAL([HWLOC_HAVE_X86_CPUID], [test "x$hwloc_have_x86_cpuid" = "xyes"])
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh
new file mode 100755
index 0000000..ce51b1c
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Copyright © 2012-2015 Inria. All rights reserved.
+# See COPYING in top-level directory.
+#
+
+set -e
+set -x
+
+# environment variables
+test -f $HOME/.ciprofile && . $HOME/.ciprofile
+branch=$( echo $GIT_BRANCH | sed -r -e 's@^.*/([^/]+)$@\1@' )
+if test -d $HOME/local/hwloc-$branch ; then
+ export PATH=$HOME/local/hwloc-${branch}/bin:$PATH
+ echo using specific $HOME/local/hwloc-$branch
+else
+ export PATH=$HOME/local/hwloc-master/bin:$PATH
+ echo using generic $HOME/local/hwloc-master
+fi
+
+# remove everything but the last 10 builds
+ls -td hwloc-* | tail -n +11 | xargs chmod u+w -R || true
+ls -td hwloc-* | tail -n +11 | xargs rm -rf || true
+
+# display autotools versions
+automake --version | head -1
+libtool --version | head -1
+autoconf --version | head -1
+
+# append a better version string
+VERSION=$branch-`date +%Y%m%d.%H%M`.git`git show --format=format:%h -s`
+
+# let's go
+./autogen.sh
+./configure
+make
+make distcheck VERSION=$VERSION
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh
new file mode 100755
index 0000000..b8fc443
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# Copyright © 2012-2015 Inria. All rights reserved.
+# See COPYING in top-level directory.
+#
+
+set -e
+set -x
+
+# environment variables
+test -f $HOME/.ciprofile && . $HOME/.ciprofile
+
+# remove everything but the last 10 builds
+ls | grep -v ^hwloc- | grep -v ^job- | xargs rm -rf || true
+ls -td hwloc-* | tail -n +11 | xargs chmod u+w -R || true
+ls -td hwloc-* | tail -n +11 | xargs rm -rf || true
+
+# find the tarball, extract it
+tarball=$(ls -tr hwloc-*.tar.gz | grep -v build.tar.gz | tail -1)
+basename=$(basename $tarball .tar.gz)
+test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
+tar xfz $tarball
+rm $tarball
+cd $basename
+
+# ignore clock problems
+touch configure
+
+# build without plugins
+mkdir build
+cd build
+../configure
+make
+make check
+utils/lstopo/lstopo-no-graphics -v
+cd ..
+
+# build with plugins
+mkdir build-plugins
+cd build-plugins
+../configure --enable-plugins
+make
+make check
+tests/wrapper.sh utils/lstopo/lstopo-no-graphics -v
+cd ..
+
+# check renaming
+(cd build/tests/rename && make check)
+
+# cleanup
+rm -rf doc build/doc build-plugins/doc
+cd ..
+tar cfz ${basename}.build.tar.gz $basename
+rm -rf $basename
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh
new file mode 100755
index 0000000..e8fedff
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh
@@ -0,0 +1,150 @@
+#!/bin/sh
+#
+# Copyright © 2012-2015 Inria. All rights reserved.
+# See COPYING in top-level directory.
+#
+
+set -e
+set -x
+
+dotar=1
+dokeeptar=0
+doconf=1
+dobuild32=1
+dobuild64=1
+docheck=1
+doinstall=1
+confopts=
+
+while test $# -gt 0; do
+ if test "$1" = "--no-tar"; then
+ dotar=0
+ else if test "$1" = "--keep-tar"; then
+ dokeeptar=1
+ else if test "$1" = "--no-conf"; then
+ doconf=0
+ else if test "$1" = "--debug"; then
+ confopts="$confopts --enable-debug"
+ else if test "$1" = "--no-32"; then
+ dobuild32=0
+ else if test "$1" = "--no-64"; then
+ dobuild64=0
+ else if test "$1" = "--no-check"; then
+ docheck=0
+ else if test "$1" = "--no-install"; then
+ doinstall=0
+ else if test "$1" = "--help" -o "$1" = "-h"; then
+ echo " --no-tar Use current directory instead of latest hwloc-*.tar.gz"
+ echo " --keep-tar Don't delete tarball after unpacking"
+ echo " --no-conf Don't reconfigure tarball"
+ echo " --debug Enable debug"
+ echo " --no-32 Don't build in 32bits"
+ echo " --no-64 Don't build in 64bits"
+ echo " --no-check Don't run make check"
+ echo " --no-install Don't install"
+ echo " --help Show this help"
+ exit 0
+ fi fi fi fi fi fi fi fi fi
+ shift
+done
+
+oldPATH=$PATH
+
+if test x$dotar = x1; then
+ # remove everything but the last 10 builds
+ rm -rf $(ls | grep -v ^hwloc- | grep -v ^job-) || true
+ chmod u+w -R $(ls -td hwloc-* | tail -n +11) || true
+ rm -rf $(ls -td hwloc-* | tail -n +11) || true
+
+ # find the tarball and extract it
+ tarball=$(ls -tr hwloc-*.tar.gz | tail -1)
+ basename=$(basename $tarball .tar.gz)
+ version=$(echo $basename | cut -d- -f2)
+ test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
+ tar xfz $tarball
+ if test x$dokeeptar = x0; then
+ rm $tarball
+ fi
+else
+ basename=./
+ version=custom
+fi
+
+if test x$dobuild32 = x1; then
+
+ mkdir ${basename}/build32 || true
+ cd ${basename}/build32
+
+ export PATH=/c/Builds:/c/Builds/mingw32/bin/:/c/Builds/mingw64/bin/:/c/Builds/mingw32/i686-w64-mingw32/lib:"/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin":"/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE":$oldPATH
+ if test x$doconf = x1; then
+ winball=hwloc-win32-build-${version}
+ prefix=${PWD}/../${winball}
+ ../configure --prefix=$prefix --enable-static --host=i686-w64-mingw32 CC_FOR_BUILD=x86_64-w64-mingw32-gcc $confopts
+ fi
+
+ make
+
+ if test x$docheck = x1; then
+ make check
+ fi
+
+ if test x$doinstall = x1; then
+ make install
+ #make install-winball || true # not needed anymore in v1.7+
+ winball=$(basename $(head config.log | sed -r -n -e 's/.*--prefix=([^ ]+).*/\1/p'))
+ cd ..
+
+ zip -r ../${winball}.zip ${winball}
+ test -f ${winball}/lib/libhwloc.lib || false
+ else
+ cd ..
+ fi
+
+ build32/utils/lstopo/lstopo-no-graphics -v
+
+ if test x$dotar = x1; then
+ cd ..
+ fi
+
+fi
+
+
+if test x$dobuild64 = x1; then
+
+ mkdir ${basename}/build64 || true
+ cd ${basename}/build64
+
+ export PATH=/c/Builds:/c/Builds/mingw64/bin/:/c/Builds/mingw32/i686-w64-mingw32/lib/:"/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin":"/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE":$oldPATH
+ if test x$doconf = x1; then
+ winball=hwloc-win64-build-${version}
+ prefix=${PWD}/../${winball}
+ ../configure --prefix=$prefix --enable-static --host=x86_64-w64-mingw32 $confopts
+ fi
+
+ make
+
+ if test x$docheck = x1; then
+ make check
+ fi
+
+ if test x$doinstall = x1; then
+ make install
+ #make install-winball || true # not needed anymore in v1.7+
+ winball=$(basename $(head config.log | sed -r -n -e 's/.*--prefix=([^ ]+).*/\1/p'))
+ cd ..
+
+ zip -r ../${winball}.zip ${winball}
+ test -f ${winball}/lib/libhwloc.lib || false
+ else
+ cd ..
+ fi
+
+ build64/utils/lstopo/lstopo-no-graphics -v
+
+ if test x$dotar = x1; then
+ cd ..
+ fi
+
+fi
+
+PATH=$oldPATH
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat
new file mode 100644
index 0000000..abeb9c3
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat
@@ -0,0 +1,33 @@
+REM
+REM Copyright © 2012-2015 Inria. All rights reserved.
+REM See COPYING in top-level directory.
+REM
+
+set PATH=%PATH%;C:\Builds\MSYS-20111123\msys\bin
+
+REM remove everything but the last 10 builds
+sh -c "rm -rf $(ls | grep -v ^hwloc- | grep -v ^job-) || true"
+sh -c "rm -rf $(ls -td hwloc-* | tail -n +21) || true"
+REM chmod not needed when not doing make distcheck
+
+REM find the tarball name
+for /f %%i in ('sh -c "ls -tr hwloc-*.tar.gz | grep -v build.tar.gz | tail -1 | sed -e s/.tar.gz//"') do set TARBALL=%%i
+
+sh -c "tar xfz %TARBALL%.tar.gz"
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+cd %TARBALL%\contrib\windows
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild hwloc.sln /p:Configuration=Release /p:Platform=x64
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+x64\Release\lstopo-no-graphics.exe
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+cd ..\..\..
+
+sh -c "tar cfz %TARBALL%-build.tar.gz %TARBALL%"
+if %errorlevel% neq 0 exit /b %errorlevel%
+
+sh -c "rm -rf %TARBALL%"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README
index 04a2ae9..c7d8d47 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/README
@@ -11,6 +11,9 @@ Enforce a specific toolset before building if needed.
hwloc-assembler-remote is not built because it requires a hardwired
path to hwloc-assembler and it uses ssh.
+hwloc-compress-dir not built because needs work.
+
+hwloc-gather-topology is Linux specific.
hwloc-ps is not built because it does nothing on Windows anyway.
Possible code proposed by Eloi Gaudry:
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj
index cd89930..42e9ca0 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8F}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters
index f950ed4..8c95a9b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-annotate.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -65,7 +62,7 @@
<ClInclude Include="..\..\include\hwloc\autogen\config.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\utils\hwloc\hwloc-calc.h">
+ <ClInclude Include="..\..\utils\hwloc\misc.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj
index 88e25bd..aba819a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-assembler.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB9A}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj
index 1416ab9..a544967 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB91}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters
index e32415f..dea4bf6 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj
index df32755..65e172d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB92}</ProjectGuid>
<RootNamespace>hwloc-calc</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters
index 71e798b..96caf5d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj
index f55a3d2..c5d3750 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB93}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters
index 336e844..7b648e9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj
index 998cff5..aadbb45 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB94}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters
index 41de164..7a1af48 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distances.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj
index b7fcf74..5407924 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB95}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters
index 9ee60a4..7b77f48 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-distrib.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj
index 5adba72..ce01efe 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB96}</ProjectGuid>
<RootNamespace>hwloc-info</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters
index 143148b..9769af1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-info.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj
index 645190a..64faf42 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB97}</ProjectGuid>
<RootNamespace>hwloc-bind</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,7 +60,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
@@ -77,7 +78,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters
index 0c1ed29..de6769d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc-patch.vcxproj.filters
@@ -44,9 +44,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln
index 5f4f4e4..bfb53e2 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/hwloc.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libhwloc", "libhwloc.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB8D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lstopo-no-graphics", "lstopo-no-graphics.vcxproj", "{9DE76C6D-4773-4766-9F93-69C56166CB8E}"
@@ -65,47 +65,55 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lstopo-win", "lstopo-win.vc
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- ReleaseDll|x64 = ReleaseDll|x64
+ Release|x64 = Release|x64
ReleaseStatic|x64 = ReleaseStatic|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseDll|x64.ActiveCfg = ReleaseDll|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseDll|x64.Build.0 = ReleaseDll|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8D}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8D}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseStatic|x64.ActiveCfg = ReleaseStatic|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8D}.ReleaseStatic|x64.Build.0 = ReleaseStatic|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8E}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8E}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8E}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8E}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8E}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8F}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB8F}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8F}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB8F}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB8F}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB90}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB90}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB90}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB90}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB90}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB91}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB91}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB91}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB91}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB91}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB92}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB92}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB92}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB92}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB92}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB93}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB93}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB93}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB93}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB93}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB94}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB94}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB94}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB94}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB94}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB95}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB95}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB95}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB95}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB95}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB96}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB96}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB96}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB96}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB96}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB97}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB97}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB97}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB97}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB97}.ReleaseStatic|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB98}.ReleaseDll|x64.ActiveCfg = Release|x64
- {9DE76C6D-4773-4766-9F93-69C56166CB98}.ReleaseDll|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB98}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB98}.Release|x64.Build.0 = Release|x64
{9DE76C6D-4773-4766-9F93-69C56166CB98}.ReleaseStatic|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.Release|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.ReleaseStatic|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB99}.ReleaseStatic|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.Release|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.Release|x64.Build.0 = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.ReleaseStatic|x64.ActiveCfg = Release|x64
+ {9DE76C6D-4773-4766-9F93-69C56166CB9A}.ReleaseStatic|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj
index 8ff75ec..e1475e6 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8D}</ProjectGuid>
@@ -18,8 +18,8 @@
<Configuration>ReleaseStatic</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="ReleaseDll|x64">
- <Configuration>ReleaseDll</Configuration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
@@ -28,23 +28,27 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -55,7 +59,7 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'">
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="PropertySheets">
@@ -76,7 +80,7 @@
<IntDir>$(SolutionDir)$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<EmbedManifest>true</EmbedManifest>
<TargetName>$(ProjectName)-5</TargetName>
@@ -124,7 +128,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>copy /V /Y private_config.h ..\..\include\private\autogen\config.h && copy /V /Y hwloc_config.h ..\..\include\hwloc\autogen\config.h && copy /V /Y static-components.h ..\..\src\static-components.h</Command>
</PreBuildEvent>
@@ -198,8 +202,8 @@
<ClCompile Include="..\..\src\distances.c" />
<ClCompile Include="..\..\src\diff.c" />
<ClCompile Include="..\..\src\misc.c" />
+ <ClCompile Include="..\..\src\pci-common.c" />
<ClCompile Include="..\..\src\topology-custom.c" />
- <ClCompile Include="..\..\src\topology-fake.c" />
<ClCompile Include="..\..\src\topology-noos.c" />
<ClCompile Include="..\..\src\topology-synthetic.c" />
<ClCompile Include="..\..\src\topology-windows.c" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters
index 2bfb4c7..77b4f77 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/libhwloc.vcxproj.filters
@@ -36,10 +36,10 @@
<ClCompile Include="..\..\src\misc.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\topology-custom.c">
+ <ClCompile Include="..\..\src\pci-common.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\topology-fake.c">
+ <ClCompile Include="..\..\src\topology-custom.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\topology-noos.c">
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj
index 942a743..48659e8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,12 +60,13 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\utils\lstopo\lstopo.c" />
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-draw.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-fig.c" />
@@ -82,7 +84,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters
index c3625c5..d888f3a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-no-graphics.vcxproj.filters
@@ -18,6 +18,9 @@
<ClCompile Include="..\..\utils\lstopo\lstopo.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -59,9 +62,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj
index 4c0ca4f..fdbefca 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB99}</ProjectGuid>
<RootNamespace>lstopo-no-graphics</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,13 +60,14 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\utils\lstopo\lstopo.c" />
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-draw.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-fig.c" />
@@ -84,7 +86,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters
index d7aeda7..4ce0ed8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo-win.vcxproj.filters
@@ -18,6 +18,9 @@
<ClCompile Include="..\..\utils\lstopo\lstopo.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -62,9 +65,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj
index fd5ee50..ba75246 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
- <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB8E}</ProjectGuid>
+ <ProjectGuid>{9DE76C6D-4773-4766-9F93-69C56166CB98}</ProjectGuid>
<RootNamespace>lstopo-no-graphics</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
@@ -17,6 +17,7 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -59,12 +60,13 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetMachine>MachineX64</TargetMachine>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\ReleaseDll;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\Release;$(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libhwloc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\utils\lstopo\lstopo.c" />
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-draw.c" />
<ClCompile Include="..\..\utils\lstopo\lstopo-fig.c" />
@@ -83,7 +85,6 @@
<ClInclude Include="..\..\include\hwloc\plugins.h" />
<ClInclude Include="..\..\include\hwloc\rename.h" />
<ClInclude Include="..\..\include\private\components.h" />
- <ClInclude Include="..\..\include\private\cpuid.h" />
<ClInclude Include="..\..\include\private\debug.h" />
<ClInclude Include="..\..\include\private\misc.h" />
<ClInclude Include="..\..\include\private\private.h" />
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters
index d7aeda7..4ce0ed8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/lstopo.vcxproj.filters
@@ -18,6 +18,9 @@
<ClCompile Include="..\..\utils\lstopo\lstopo.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\utils\lstopo\lstopo-ascii.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
<ClCompile Include="..\..\utils\lstopo\lstopo-color.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -62,9 +65,6 @@
<ClInclude Include="..\..\include\private\components.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\include\private\cpuid.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\include\private\debug.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h
index b2b426d..942aed7 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/contrib/windows/private_config.h
@@ -1,7 +1,7 @@
/*
* Copyright © 2009, 2011, 2012 CNRS. All rights reserved.
- * Copyright © 2009-2014 Inria. All rights reserved.
- * Copyright © 2009, 2011, 2012 Université Bordeaux. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
+ * Copyright © 2009, 2011, 2012, 2015 Université Bordeaux. All rights reserved.
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
@@ -232,6 +232,9 @@
*/
/* #undef HAVE_PSAPI_WORKING_SET_EX_INFORMATION */
+/* Define to 1 if the system has the type `PROCESSOR_NUMBER'. */
+#define HAVE_PROCESSOR_NUMBER 1
+
/* Define to 1 if you have the <pthread_np.h> header file. */
/* #undef HAVE_PTHREAD_NP_H */
@@ -514,8 +517,8 @@
/* Define to 1 if X11 headers including Xutil.h and keysym.h are available. */
/* #undef HWLOC_HAVE_X11_KEYSYM */
-/* Define to 1 if the _syscall3 macro works */
-/* #undef HWLOC_HAVE__SYSCALL3 */
+/* Define to 1 if function `syscall' is available */
+/* #undef HWLOC_HAVE_SYSCALL */
/* Define to 1 on HP-UX */
/* #undef HWLOC_HPUX_SYS */
@@ -579,7 +582,7 @@
#define PACKAGE_NAME "hwloc"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "hwloc 1.7.2"
+#define PACKAGE_STRING "hwloc"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "hwloc"
@@ -588,7 +591,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.7.2"
+#define PACKAGE_VERSION HWLOC_VERSION
/* The size of `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT 4
@@ -642,7 +645,8 @@
/* Version number of package */
-#define VERSION "1.9"
+#define HWLOC_VERSION "1.11.1"
+#define VERSION HWLOC_VERSION
/* Define to 1 if the X Window System is missing or not being used. */
#define X_DISPLAY_MISSING 1
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
index 5dc4883..8d3eeaf 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy
@@ -48,9 +48,10 @@ hwloc supports the following operating systems:
<ul>
<li>Linux (including old kernels not having sysfs topology
-information, with knowledge of cpusets, offline CPUs, ScaleMP vSMP,
-NumaScale NumaConnect, and Kerrighed support) on all supported hardware, including Intel Xeon Phi
-(either standalone or as a coprocessor).</li>
+information, with knowledge of cpusets, offline CPUs, ScaleMP vSMP and Kerrighed support)
+on all supported hardware, including Intel Xeon Phi
+(KNL and KNC, either standalone or as a coprocessor)
+and NumaScale NumaConnect.</li>
<li>Solaris</li>
<li>AIX</li>
<li>Darwin / OS X</li>
@@ -473,7 +474,7 @@ shell$
Questions should be sent to the devel mailing
list (http://www.open-mpi.org/community/lists/hwloc.php)
Bug reports should be reported in the tracker
-(https://git.open-mpi.org/trac/hwloc/).
+(https://github.com/open-mpi/hwloc/issues).
If hwloc discovers an incorrect topology for your machine, the very
first thing you should check is to ensure that you have the most
@@ -486,7 +487,7 @@ the most recent version of the BIOS for your machine.
If those things fail, contact us on the mailing list for additional
help. Please attach the output of lstopo after having given the
-<tt>--enable-debug</tt> option to ./configure and rebuilt completely, to get
+<tt>\--enable-debug</tt> option to ./configure and rebuilt completely, to get
debugging output. Also attach the <tt>/proc</tt> + <tt>/sys</tt> tarball
generated by the installed script <tt>hwloc-gather-topology</tt>
when submitting problems about Linux, or send the
@@ -615,7 +616,7 @@ Make sure to have had a look at those too!
of parent/child links between the root object and the given object.
If the topology is asymmetric, the difference between some parent
and child depths may be larger than one when some intermediate levels
- (for instance caches) are missing in only some parts of the machine.
+ (for instance groups) are missing in only some parts of the machine.
</dd>
<dt>OS or physical index</dt>
@@ -661,10 +662,11 @@ Make sure to have had a look at those too!
The following diagram can help to understand the vocabulary of the relationships
by showing the example of a machine with two dual core packages (with no
-hardware threads); thus, a topology with 4 levels. Each box with rounded corner
-corresponds to one hwloc_obj_t, containing the values of the different integer
-fields (depth, logical_index, etc.), and arrows show to which other hwloc_obj_t
+hardware threads); thus, a topology with 5 levels. Each box with rounded corner
+corresponds to one ::hwloc_obj_t, containing the values of the different integer
+fields (depth, logical_index, etc.), and arrows show to which other ::hwloc_obj_t
pointers point to (first_child, parent, etc.). The L2 cache of the last core is intentionally missing to show how asymmetric topologies are handled.
+See \ref faq_asymmetric for more information about such strange topologies.
\image html diagram.png
\image latex diagram.eps "" width=\textwidth
@@ -672,8 +674,6 @@ pointers point to (first_child, parent, etc.). The L2 cache of the last core is
It should be noted that for PU objects, the logical index -- as
computed linearly by hwloc -- is not the same as the OS index.
-See also \ref faq_asymmetric for more details.
-
\page tools Command-Line Tools
@@ -697,7 +697,7 @@ Textual outputs (those that do not depend on heavy external libraries
such as Cairo) are supported in both lstopo and lstopo-no-graphics.
This command can also display the processes currently bound to a part
-of the machine (via the <tt>--ps</tt> option).
+of the machine (via the <tt>\--ps</tt> option).
Note that lstopo can read XML files and/or alternate chroot
filesystems and display topological maps representing those systems
@@ -760,6 +760,16 @@ relevant topology files of the current machine into a tarball
later (possibly offline) for simulating or debugging a machine
without actually running on it.
+\section cli_hwloc_dump_hwdata hwloc-dump-hwdata
+
+hwloc-dump-hwdata is a Linux and x86-specific tool that dumps
+(during boot, privileged) some topology and locality information
+from raw hardware files (SMBIOS and ACPI tables) to human-readable
+and world-accessible files that the hwloc library will later reuse.
+
+Currently only used on Intel Knights Landing Xeon Phi platforms.
+See \ref faq_knl_dump.
+
\section cli_hwloc_distances hwloc-distances
hwloc-distances displays all distance matrices attached to
@@ -851,7 +861,7 @@ following environment variables.
<dt>HWLOC_THISSYSTEM=1</dt>
<dd>enforces the return value of hwloc_topology_is_thissystem(), as if
- HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM was set with hwloc_topology_set_flags().
+ ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM was set with hwloc_topology_set_flags().
It means that it makes hwloc assume that the selected backend provides the
topology for the system on which we are running, even if it is not the
OS-specific backend but the XML backend for instance.
@@ -951,6 +961,11 @@ following environment variables.
and which components are successfully loaded.
</dd>
+<dt>HWLOC_DUMPED_HWDATA_DIR=/path/to/dumped/files/</dt>
+ <dd>loads files dumped by <tt>hwloc-dump-hwdata</tt> (on Linux)
+ from the given directory instead of <tt>/var/run/hwloc/</tt>.
+ </dd>
+
<dt>HWLOC_COMPONENTS=list,of,components</dt>
<dd>forces a list of components to enable or disable.
Enable or disable the given comma-separated list of components
@@ -983,6 +998,11 @@ following environment variables.
(all of them are <em>registered</em> at startup).
</dd>
+<dt>HWLOC_DEBUG_VERBOSE=0</dt>
+ <dd>disables all verbose messages that are enabled by default
+ when <tt>--enable-debug</tt> is passed to configure.
+ </dd>
+
</dl>
<!-- not documented:
@@ -992,8 +1012,10 @@ following environment variables.
HWLOC_LINUX_USE_CPUINFO
uses /proc/cpuinfo instead of sysfs.
may be useful in the doc for debugging?
+ HWLOC_KNL_NUMA_QUIRK
+ disables the KNL NUMA Cluster quirk in the linux backend
HWLOC_DEBUG_CHECK
- runs sanity checks during discovery, as if --enable-debug was passed but
+ runs sanity checks during discovery, as if \--enable-debug was passed but
without debug messages
may be useful in the doc for debugging?
HWLOC_HIDE_DEPRECATED
@@ -1025,9 +1047,9 @@ when they provide better binding support.
If the application does not want the CPU binding to change when
changing the memory policy, it needs to use the
-HWLOC_MEMBIND_NOCPUBIND flag to prevent hwloc from using OS functions
+::HWLOC_MEMBIND_NOCPUBIND flag to prevent hwloc from using OS functions
which would change the CPU binding. Additionally,
-HWLOC_CPUBIND_NOMEMBIND can be passed to CPU binding function to
+::HWLOC_CPUBIND_NOMEMBIND can be passed to CPU binding function to
prevent hwloc from using OS functions would change the memory binding
policy. Of course, using these flags will reduce hwloc's overall support for
binding, so their use is discouraged.
@@ -1077,7 +1099,8 @@ There are some examples under doc/examples/ in the source tree.
hwloc usually manipulates processing units and memory but it can also
discover I/O devices and report their locality as well.
This is useful for placing I/O intensive applications on cores near the
-I/O devices they use.
+I/O devices they use, or for gathering information about all platform
+components.
\section iodevices_enabling Enabling and requirements
@@ -1088,27 +1111,44 @@ to hwloc_topology_set_flags() before loading the topology.
Note that I/O discovery requires significant help from the operating system.
The pciaccess library (the development package is usually <tt>libpciaccess-devel</tt>
-or <tt>libpciaccess-dev</tt>) is needed to fully detect PCI devices and bridges,
-and the actual locality of these devices is only currently detected
-on Linux. Also, some operating systems require privileges for probing PCI
-devices, see \ref faq_privileged for details.
+or <tt>libpciaccess-dev</tt>) is needed to fully detect PCI devices and bridges.
+On Linux, PCI discovery may still be performed even if <tt>libpciaccess</tt> cannot
+be used. But it misses PCI device names.
+Moreover, some operating systems require privileges for probing PCI devices,
+see \ref faq_privileged for details.
-On Linux, PCI discovery may still be performed even
-if <tt>libpciaccess</tt> cannot be used.
-But it misses PCI device names.
+The actual locality of I/O devices is only currently detected on Linux.
+Other operating system will just reported I/O devices as being attached
+to the topology root object.
-\section iodevices_hierarchy I/O object hierarchy
+\section iodevices_objects I/O objects
When I/O discovery is enabled and supported, some additional objects
-(types <tt>::HWLOC_OBJ_BRIDGE</tt>, <tt>::HWLOC_OBJ_PCI_DEVICE</tt> and
-<tt>::HWLOC_OBJ_OS_DEVICE</tt>)
-are added to the topology as a child of the object they are close to.
-For instance, if a I/O Hub is connected to a package, the corresponding
-hwloc bridge object (and its PCI bridges and devices children) is inserted
-as a child of the corresponding hwloc package object.
-
-These new objects have neither CPU sets nor node sets (NULL pointers) because
-they are not directly usable by the user applications.
+are added to the topology.
+The corresponding I/O object types are:
+<ul><li>
+<tt>::HWLOC_OBJ_OS_DEVICE</tt> describes an operating-system-specific
+handle such as the <em>sda</em> drive or the <em>eth0</em> network interface.
+See \ref iodevices_osdev.
+</li><li>
+<tt>::HWLOC_OBJ_PCI_DEVICE</tt> and <tt>::HWLOC_OBJ_BRIDGE</tt> build up
+a PCI hierarchy made of devices and bridges.
+See \ref iodevices_pci.
+</li><li>
+<tt>::HWLOC_OBJ_MISC</tt> describes miscellaneous devices such as
+memory modules (DIMMs).
+These are neither PCI nor OS handles, therefore they appear as Misc objects.
+See \ref miscobjs_auto.
+</li></ul>
+
+hwloc tries to attach these new objects to normal objects
+(usually NUMA nodes) to match their actual physical location.
+For instance, if a I/O Hub is physically connected to a package,
+the corresponding hwloc bridge object (and its PCI bridges and devices children)
+is inserted as a child of the corresponding hwloc Package object.
+
+I/O objects also have neither CPU sets nor node sets (NULL pointers) because
+they are not directly usable by the user applications for binding.
Moreover I/O hierarchies may be highly complex (asymmetric trees of bridges).
So I/O objects are placed in specific levels with custom depths.
Their lists may still be traversed with regular helpers such as
@@ -1116,22 +1156,12 @@ hwloc_get_next_obj_by_type().
However, hwloc offers some dedicated helpers such as hwloc_get_next_pcidev()
and hwloc_get_next_osdev() for convenience (see \ref hwlocality_advanced_io).
-An I/O hierarchy is organized as follows:
-A hostbridge object ( <tt>::HWLOC_OBJ_BRIDGE</tt> object with upstream
-type <em>Host</em> and downstream type <em>PCI</em>) is attached below
-a regular object (usually the entire machine or a NUMA node).
-There may be multiple hostbridges in the machine, attached to
-different places, but all I/O devices are below one of them.
-Each hostbridge contains one or several children, either other bridges
-(usually PCI to PCI) or PCI devices (<tt>::HWLOC_OBJ_PCI_DEVICE</tt>).
-The number of bridges between the hostbridge and a PCI device depends
-on the machine and on the topology flags.
-
-\section iodevices_osdev Software devices
+\section iodevices_osdev OS devices
Although each PCI device is uniquely identified by its bus ID
-(e.g. 0000:01:02.3), the application can hardly find out which
-PCI device is actually used when manipulating software handle
+(e.g. 0000:01:02.3), a user-space application can hardly find out which
+PCI device it is actually using.
+Applications rather use software handles
(such as the <em>eth0</em> network interface,
the <em>sda</em> hard drive,
or the <em>mlx4_0</em> OpenFabrics HCA).
@@ -1139,15 +1169,14 @@ Therefore hwloc tries to add software devices
(<tt>::HWLOC_OBJ_OS_DEVICE</tt>, also known as OS devices)
below their PCI objects.
-hwloc first tries to discover the corresponding names,
-e.g. <em>eth0</em>, <em>sda</em> or <em>mlx4_0</em>,
-from the operating system.
+hwloc first tries to discover OS devices from the operating system,
+e.g. <em>eth0</em>, <em>sda</em> or <em>mlx4_0</em>.
However, this ability is currently only available on Linux for some
classes of devices.
hwloc then tries to discover software devices through additional
I/O components using external libraries.
-For instance proprietary graphics drivers do not offer any OS name,
+For instance proprietary graphics drivers do not expose any named OS device,
but hwloc may still create one OS object per software handle when
supported.
For instance the <tt>opencl</tt> and <tt>cuda</tt> components may
@@ -1157,22 +1186,22 @@ Here is a list of OS device objects commonly created by hwloc
components when I/O discovery is enabled and supported.
<ul>
-<li>Hard disks (HWLOC_OBJ_OSDEV_BLOCK)
+<li>Hard disks (::HWLOC_OBJ_OSDEV_BLOCK)
<ul>
<li><em>sda</em> (Linux component)</li>
</ul>
</li>
-<li>Network interfaces (HWLOC_OBJ_OSDEV_NETWORK)
+<li>Network interfaces (::HWLOC_OBJ_OSDEV_NETWORK)
<ul>
<li><em>eth0</em>, <em>wlan0</em>, <em>ib0</em> (Linux component)</li>
</ul>
</li>
-<li>OpenFabrics HCAs (HWLOC_OBJ_OSDEV_OPENFABRICS)
+<li>OpenFabrics HCAs (::HWLOC_OBJ_OSDEV_OPENFABRICS)
<ul>
<li><em>mlx4_0</em>, <em>qib0</em> (Linux component)</li>
</ul>
</li>
-<li>GPUs (HWLOC_OBJ_OSDEV_GPU)
+<li>GPUs (::HWLOC_OBJ_OSDEV_GPU)
<ul>
<li><em>nvml0</em> for the first NVML device
(NVML component, using the NVIDIA Management Library)</li>
@@ -1180,7 +1209,7 @@ components when I/O discovery is enabled and supported.
(GL component, using the NV-CONTROL X extension library, NVCtrl)</li>
</ul>
</li>
-<li>Co-Processors (HWLOC_OBJ_OSDEV_COPROC)
+<li>Co-Processors (::HWLOC_OBJ_OSDEV_COPROC)
<ul>
<li><em>opencl0d0</em> for the first device of the first OpenCL platform,
<em>opencl1d3</em> for the fourth device of the second OpenCL platform
@@ -1191,9 +1220,9 @@ components when I/O discovery is enabled and supported.
(Linux component)</li>
</ul>
</li>
-<li>DMA engine channel (HWLOC_OBJ_OSDEV_DMA)
+<li>DMA engine channel (::HWLOC_OBJ_OSDEV_DMA)
<ul>
- <li><em>dma0chan0</em> (Linux component)</li>
+ <li><em>dma0chan0</em> (Linux component) when full I/O discovery is enabled (::HWLOC_TOPOLOGY_FLAG_WHOLE_IO)</li>
</ul>
</li>
</ul>
@@ -1206,6 +1235,20 @@ Note that some PCI devices may contain multiple software devices
See also \ref interoperability for managing these devices without
considering them as hwloc objects.
+\section iodevices_pci PCI devices and bridges
+
+A PCI hierarchy is usually organized as follows:
+A hostbridge object ( <tt>::HWLOC_OBJ_BRIDGE</tt> object with upstream
+type <em>Host</em> and downstream type <em>PCI</em>) is attached below
+a normal object (usually the entire machine or a NUMA node).
+There may be multiple hostbridges in the machine, attached to
+different places, but all PCI devices are below one of them.
+
+Each hostbridge contains one or several children, either other bridges
+(usually PCI to PCI) or PCI devices (<tt>::HWLOC_OBJ_PCI_DEVICE</tt>).
+The number of bridges between the hostbridge and a PCI device depends
+on the machine and on the topology flags.
+
\section iodevices_consult Consulting I/O devices and binding
I/O devices may be consulted by traversing the topology manually
@@ -1227,7 +1270,7 @@ a NUMA node with the same locality.
Command-line tools are also aware of I/O devices.
lstopo displays the interesting ones by default
-(passing <tt>--no-io</tt> disables it).
+(passing <tt>\--no-io</tt> disables it).
hwloc-calc and hwloc-bind may manipulate I/O devices specified
by PCI bus ID or by OS device name.
@@ -1262,7 +1305,7 @@ are an unused IDE controller (no disk attached)
and a graphic card (no corresponding software device reported
to the user by the operating system).
-On the contrary, it should be noted three different software
+On the contrary, it should be noted that three different software
devices were found for the last PCI device (<em>PCI 15b3:634a</em>).
Indeed this OpenFabrics HCA PCI device object contains one
one OpenFabrics software device (<em>mlx4_0</em>) and two virtual
@@ -1307,7 +1350,7 @@ Machine (24GB)
\page miscobjs Miscellaneous objects
hwloc topologies may be annotated with Misc objects
-(of type <tt>HWLOC_OBJ_MISC</tt>)
+(of type <tt>::HWLOC_OBJ_MISC</tt>)
either automatically or by the user.
This is an flexible way to annotate topologies with
large sets of information since Misc objects may be inserted
@@ -1325,8 +1368,10 @@ hwloc only uses Misc objects when other object types are not sufficient.
This currently includes:
<ul>
<li>
-Memory devices (DIMMs), on Linux when privileged, and when I/O discovery is enabled.
-These objects have a <tt>Type</tt> info attribute of value <tt>MemoryDevice</tt>.
+Memory modules (DIMMs), on Linux when privileged and when
+<tt>dmi-sysfs</tt> is supported by the kernel,
+and when I/O discovery is enabled.
+These objects have a <tt>Type</tt> info attribute of value <tt>MemoryModule</tt>.
They are currently always attached to the root object.
Their attributes describe the DIMM vendor, model, etc.
<tt>lstopo -v</tt> displays them as:
@@ -1335,7 +1380,7 @@ Misc(MemoryModule) (P#1 Type=MemoryModule DeviceLocation="Bottom-Slot 2(right)"
\endcode
</li>
<li>
-Displaying process binding in <tt>lstopo --top</tt>.
+Displaying process binding in <tt>lstopo \--top</tt>.
These objects have a <tt>Type</tt> info attribute of value <tt>Process</tt>
and a name attribute made of their PID and program name.
They are attached below the object they are bound to.
@@ -1549,7 +1594,7 @@ Each object contains a list of such pairs that may be consulted
manually (looking at the object <tt>infos</tt> array field)
or using the hwloc_obj_get_info_by_name().
The user may additionally add new key-value pairs to any object using
-::hwloc_obj_add_info() or the \ref cli_hwloc_annotate program.
+hwloc_obj_add_info() or the \ref cli_hwloc_annotate program.
Here is a non-exhaustive list of attributes that may be automatically
added by hwloc (with the usual corresponding object in parentheses).
@@ -1605,6 +1650,10 @@ Currently only available on Linux.
Usually added to Package objects, but can be in Machine instead if
hwloc failed to discover any package.
</dd>
+<dt>Inclusive (Caches)</dt>
+<dd>The inclusiveness of a cache (1 if inclusive, 0 otherwise).
+Currently only available on x86 processors.
+</dd>
<dt>PCIVendor, PCIDevice (PCI devices and bridges)</dt>
<dd>The vendor and device names of the PCI device.
</dd>
@@ -1612,7 +1661,7 @@ hwloc failed to discover any package.
<dd>The name/number of the physical slot where the PCI device is plugged.
</dd>
<dt>Vendor, Model, Revision, SerialNumber</dt>
-<dd>The vendor and model names, and revision and serial numbers of a Block OS device.
+<dd>The vendor and model names, revision, and serial number of a Block OS device.
</dd>
<dt>LinuxDeviceID</dt>
<dd>The major/minor device number such as 8:0 on Linux for a Block OS device.
@@ -1680,14 +1729,15 @@ and GID #1 of port #3.
<dt>Type</dt>
<dd>A better type name than the usual one.
This may be used to specify where Groups come from.
-For instance Linux s390 <em>books</em> appear as Groups of type <em>Book</em>.
+For instance Linux S/390 <em>books</em> appear as Groups of type <em>Book</em>
+(see also \ref faq_groups).
Block OS devices may have a Type of "Disk", "Tape", "Removable Media Device"
or "Other".
The Type attribute value is displayed instead of the default object type name in lstopo.
</dd>
-<dt>Vendor, AssetTag, PartNumber, DeviceLocation, BankLocation (MemoryDevice Misc objects)</dt>
+<dt>Vendor, AssetTag, PartNumber, DeviceLocation, BankLocation (MemoryModule Misc objects)</dt>
<dd>
-Information about memory devices (DIMMs) extracted from SMBIOS.
+Information about memory modules (DIMMs) extracted from SMBIOS.
</dd>
<dt>hwlocVersion</dt>
<dd>The version number of the hwloc library that was used to generate
@@ -1729,14 +1779,14 @@ The lstopo program can also serve as a XML topology export tool.
XML topologies may then be reloaded later with hwloc_topology_set_xml()
and hwloc_topology_set_xmlbuffer().
-The XMLFILE environment variable also tells hwloc to load the topology
+The HWLOC_XMLFILE environment variable also tells hwloc to load the topology
from the given XML file.
\note Loading XML topologies disables binding because the loaded
topology may not correspond to the physical machine that loads it.
This behavior may be reverted by asserting that loaded file really
matches the underlying system with the HWLOC_THISSYSTEM environment
-variable or the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM topology flag.
+variable or the ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM topology flag.
\note hwloc also offers the ability to export/import \ref hwlocality_diff.
@@ -1763,7 +1813,7 @@ headers are available (the relevant development package is usually
<tt>libxml2-devel</tt> or <tt>libxml2-dev</tt>).
If libxml2 is not available at configure time,
-or if <tt>--disable-libxml2</tt> is passed, hwloc falls back to a
+or if <tt>\--disable-libxml2</tt> is passed, hwloc falls back to a
custom backend.
Contrary to the aforementioned full XML backend with libxml2, this
minimalistic XML backend cannot be guaranteed to work with external
@@ -1776,9 +1826,9 @@ any external dependency.
If libxml2 is available but the core hwloc library should not directly
depend on it, the libxml2 support may be built as a dynamicall-loaded
plugin.
-One should pass <tt>--enable-plugins</tt> to enable plugin support
+One should pass <tt>\--enable-plugins</tt> to enable plugin support
(when supported) and build as plugins all component that support it.
-Or pass <tt>--enable-plugins=xml_libxml</tt> to only build this
+Or pass <tt>\--enable-plugins=xml_libxml</tt> to only build this
libxml2 support as a plugin.
\section xml_errors XML import error management
@@ -1852,9 +1902,7 @@ if a Machine level is specified in the string.
Cache level depths are automatically chosen by hwloc (only a L2 first,
then a L1 under it, then L3 above, then L4 etc.) unless they are specified.
-Memory and cache sizes are also automatically chosen.
-The only way to modifying them is to export to XML and manually modify
-the file.
+Memory and cache sizes are also automatically chosen if needed.
Each item may be followed parentheses containing a list of
space-separated attributes. For instance:
@@ -1887,7 +1935,7 @@ space-separated attributes. For instance:
Aside from lstopo, the hwloc programming interface offers the same
ability by passing the synthetic description string to
-::hwloc_topology_set_synthetic() before hwloc_topology_load().
+hwloc_topology_set_synthetic() before hwloc_topology_load().
Synthetic topologies are created by the <tt>synthetic</tt> component.
This component may be enabled by force by setting the HWLOC_COMPONENTS
@@ -1897,12 +1945,12 @@ environment variable to something such as
Loading a synthetic topology disables binding support since the
topology usually does not match the underlying hardware.
Binding may be reenabled as usual by setting HWLOC_THISSYSTEM=1 in the
-environment or by setting the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM
+environment or by setting the ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM
topology flag.
\section synthetic_export Exporting a topology as a synthetic string
-The function ::hwloc_topology_export_synthetic() may export
+The function hwloc_topology_export_synthetic() may export
a topology as a synthetic string.
It offers a convenient way to quickly describe the contents of a machine.
The lstopo tool may also perform such an export by forcing the output format.
@@ -1914,15 +1962,15 @@ Package:1 Cache:1 Cache:2 Cache:1 Cache:1 Core:1 PU:2
The exported string may be passed back to hwloc for recreating
another similar topology.
-The entire tree will be similar, but some special attributes such
-processort types may be missing.
+The entire tree will be similar, but some attributes such as
+the processor model will be missing.
Such an export is only possible if the topology is totally symmetric,
which means the <tt>symmetric_subtree</tt> field of the root object
is set.
This usually implies that I/O objects are disabled since attaching I/O
busses often cause the topology to become asymmetric.
-Passing <tt>--no-io</tt> to lstopo is therefore often useful to make
+Passing <tt>\--no-io</tt> to lstopo is therefore often useful to make
synthetic export work (as well as not passing any I/O topology flag
before exporting with ::hwloc_topology_export_synthetic()).
@@ -2045,7 +2093,7 @@ enabled for the current topology.
string in fixed-size subsets and separates them with commas).
To ease interoperability, hwloc offers routines to convert
hwloc CPU sets from/to taskset-specific string format.
- Most hwloc command-line tools also support the <tt>--taskset</tt>
+ Most hwloc command-line tools also support the <tt>\--taskset</tt>
option to manipulate taskset-specific strings.
</dd>
@@ -2057,23 +2105,23 @@ enabled for the current topology.
Like most libraries that mainly fill data structures, hwloc is not
thread safe but rather reentrant: all state is held in a
-\ref hwloc_topology_t instance without mutex protection. That means, for
+::hwloc_topology_t instance without mutex protection. That means, for
example, that two threads can safely operate on and modify two
-different \ref hwloc_topology_t instances, but they should not
+different ::hwloc_topology_t instances, but they should not
simultaneously invoke functions that modify the <em>same</em>
instance. Similarly, one thread should not modify a
-\ref hwloc_topology_t instance while another thread is reading or
+::hwloc_topology_t instance while another thread is reading or
traversing it. However, two threads can safely read or traverse the
-same \ref hwloc_topology_t instance concurrently.
+same ::hwloc_topology_t instance concurrently.
When running in multiprocessor environments, be aware that proper thread
synchronization and/or memory coherency protection is needed to pass hwloc
-data (such as \ref hwloc_topology_t pointers) from one processor
+data (such as ::hwloc_topology_t pointers) from one processor
to another (e.g., a mutex, semaphore, or a memory barrier).
Note that this is not a hwloc-specific requirement, but it is worth
mentioning.
-For reference, \ref hwloc_topology_t modification operations include
+For reference, ::hwloc_topology_t modification operations include
(but may not be limited to):
<dl>
@@ -2092,7 +2140,7 @@ For reference, \ref hwloc_topology_t modification operations include
<dd><tt>hwloc_topology_insert_misc_object_by_*</tt> (see
\ref hwlocality_tinker) may modify the topology significantly by adding
objects inside the tree, changing the topology depth, etc.
- <tt>hwloc_topology_restrict</tt> modifies the topology even more
+ <tt>hwloc_topology_restrict()</tt> modifies the topology even more
dramatically by removing some objects.
Although references to former objects <em>may</em> still be valid
@@ -2215,7 +2263,7 @@ or <tt>hwloc_topology_set_synthetic()</tt>.
Components may optionally be built as plugins so that the hwloc core
library does not directly depend on their dependencies (for instance
the <tt>libpciaccess</tt> library).
-Plugin support may be enabled with the <tt>--enable-plugins</tt>
+Plugin support may be enabled with the <tt>\--enable-plugins</tt>
configure option.
All components buildable as plugins will then be built as plugins.
The configure option may be given a comma-separated list of component
@@ -2245,10 +2293,10 @@ anything under the <tt>include/hwloc</tt> subdirectory) and nothing from the
\subsection plugins_disc_basic Basics of discovery components
-Each discovery component is defined by a <tt>hwloc_disc_component</tt>
+Each discovery component is defined by a <tt>::hwloc_disc_component</tt>
structure which contains an <tt>instantiate()</tt> callback.
This function is invoked when this component is actually used by a topology.
-It fills a new <tt>hwloc_backend</tt> structure that usually contains
+It fills a new <tt>::hwloc_backend</tt> structure that usually contains
<tt>discover()</tt> and/or <tt>notify_new_object()</tt> callbacks taking
care of the actual topology discovery.
@@ -2258,16 +2306,16 @@ This offers a way for third-party plugins to override existing components.
\subsection plugins_disc_register Registering a new discovery component
-Registering components to the hwloc core relies on a <tt>hwloc_component</tt> structure.
-Its <tt>data</tt> field points to the previously defined <tt>hwloc_disc_component</tt>
-structure while its <tt>type</tt> should be HWLOC_COMPONENT_TYPE_DISC.
+Registering components to the hwloc core relies on a <tt>::hwloc_component</tt> structure.
+Its <tt>data</tt> field points to the previously defined <tt>::hwloc_disc_component</tt>
+structure while its <tt>type</tt> should be ::HWLOC_COMPONENT_TYPE_DISC.
This structure should be named <tt>hwloc_<name>_component</tt>.
The configure script should be modified to add <tt><name></tt>
to its <tt>hwloc_components</tt> shell variable so that the component
is actually available.
-\note The symbol name of the <tt>hwloc_component</tt> structure
+\note The symbol name of the <tt>::hwloc_component</tt> structure
is independent of the name of the discovery component mentioned
in the previous section.
@@ -2310,7 +2358,7 @@ environment variable (see \ref envvar).
<dt>bgq</dt>
<dd>
This component is specific to IBM BlueGene/Q compute node (running CNK).
- It is built and enabled by default when <tt>--host=powerpc64-bgq-linux</tt>
+ It is built and enabled by default when <tt>\--host=powerpc64-bgq-linux</tt>
is passed to configure (see \ref faq_bgq).
</dd>
<dt>no_os</dt>
@@ -2637,7 +2685,7 @@ by default).
This includes I/O device discovery through PCI libraries as well as external
libraries such as NVML.
To speed up lstopo, you may disable such features with command-line
-options such as <tt>--no-io</tt>.
+options such as <tt>\--no-io</tt>.
When NVIDIA GPU probing is enabled with CUDA or NVML, one should make sure that
the <em>Persistent</em> mode is enabled (with <tt>nvidia-smi -pm 1</tt>)
@@ -2651,7 +2699,7 @@ display (usually <tt>:0</tt>) instead of only setting the <tt>COMPUTE</tt>
variable may avoid this.
Also remember that these components may be disabled at build-time with
-configure flags such as <tt>--disable-opencl</tt>, <tt>--disable-cuda</tt> or <tt>--disable-nvml</tt>,
+configure flags such as <tt>\--disable-opencl</tt>, <tt>\--disable-cuda</tt> or <tt>\--disable-nvml</tt>,
and at runtime with the environment variable
<tt>HWLOC_COMPONENTS=-opencl,cuda,nvml</tt>.
@@ -2681,25 +2729,24 @@ resulting topology will miss some objects and may be asymmetric
****************************************************************************
\endverbatim
-As explained in the message, reporting this issue to the hwloc developers
-(by sending the tarball that is generated by the hwloc-gather-topology script
- on this platform) is a good way to make sure that this is a software
-(operating system) or hardware bug (BIOS, etc).
-
-These errors are common on large AMD platforms because several BIOS releases
-fail to properly report L3 caches. In the above example, the hardware reports
+These errors are common on large AMD platforms because of BIOS and/or Linux
+kernel bugs causing invalid L3 cache information.
+In the above example, the hardware reports
a L3 cache that is shared by 2 cores in the first NUMA node and 4 cores
in the second NUMA node. That's wrong, it should actually be shared by all 6
cores in a single NUMA node.
The resulting topology will miss some L3 caches.
+
If your application not care about cache sharing, or if you do not plan to
request cache-aware binding in your process launcher, you may likely ignore
-this error.
+this error (and hide it by setting HWLOC_HIDE_ERRORS=1 in your environment).
Some platforms report similar warnings about conflicting Packages and NUMANodes.
Upgrading the BIOS and/or the operating system may help.
-Otherwise, the warning may be hidden by setting HWLOC_HIDE_ERRORS=1
-in your environment.
+Otherwise, as explained in the message, reporting this issue to the hwloc developers
+(by sending the tarball that is generated by the hwloc-gather-topology script
+ on this platform) is a good way to make sure that this is a software
+(operating system) or hardware bug (BIOS, etc).
\section faq_privileged Does hwloc require privileged access?
@@ -2707,10 +2754,11 @@ in your environment.
hwloc discovers the topology by querying the operating system.
Some minor features may require privileged access to the operation
system.
-For instance memory device and PCI link speed discovery on Linux
+For instance memory module and PCI link speed discovery on Linux
is reserved to root,
-and the entire PCI discovery on FreeBSD requires access to the
-/dev/pci special file.
+and the entire PCI discovery on Solaris and BSDs requires access to
+some special files that are usually restricted to root
+(/dev/pci* or /devices/pci*).
To workaround this limitation, it is recommended to export the
topology as a XML file generated by the administrator (with the
@@ -2725,6 +2773,11 @@ This XML-based model also has the advantage of speeding up the
discovery because reading a XML topology is usually much faster
than querying the operating system again.
+The utility <tt>hwloc-dump-hwdata</tt> is also involved in gathering
+privileged information at boot time and making it available to
+non-privileged users. However it only applies to Intel Knights Landing
+Xeon Phi for now (see \ref faq_knl_dump).
+
\section faq_onedim hwloc only has a one-dimensional view of the architecture, it ignores distances
@@ -2832,17 +2885,51 @@ hello from a single thread on core #3
\endverbatim
+\section faq_groups What are these Group objects in my topology?
+
+hwloc comes with a set of predefined object types (Core, Package, NUMA node, Caches)
+that match the vast majority of hardware platforms.
+The ::HWLOC_OBJ_GROUP type was designed for cases where this set is not sufficient.
+Groups may be used anywhere to add more structure information to the topology,
+for instance to show that 2 out of 4 NUMA nodes are actually closer than the others.
+When applicable, the <tt>Type</tt> info attribute describes why a Group
+was actually added (see also \ref attributes_info).
+
+hwloc currently uses Groups for the following reasons:
+<ul>
+<li>AMD dual-core compute units (<tt>Type=ComputeUnit</tt>, in the x86 backend),
+ but these objects are usually merged with the L2 caches.</li>
+<li>Intel x2APIC non-core and non-package levels (in the x86 backend).</li>
+<li>Windows processor groups.</li>
+<li>IBM S/390 "Books" on Linux (<tt>Type=Book</tt>).</li>
+<li>AIX unknown hierarchy levels.</li>
+<li>Distance-based groups made of close objects.</li>
+<li>I/O parents when I/O locality does not match any existing object.</li>
+</ul>
+
+
\section faq_asymmetric What happens if my topology is asymmetric?
hwloc supports asymmetric topologies even if most platforms are usually
-symmetric. For example, there may be different types of processors
+symmetric. For example, there could be different types of processors
in a single machine, each with different numbers of cores, symmetric
multithreading, or levels of caches.
+In practice, asymmetric topologies mostly appear when intermediate groups
+are added for I/O affinity: on a 4-package machine, an I/O bus may be
+connected to 2 packages. These packages are below an additional Group
+object, while the other packages are not (see also \ref faq_groups).
+
+Before hwloc v2.0, hwloc_topology_ignore_type_keep_structure() and
+hwloc_topology_ignore_all_keep_structure() may also make topologies
+assymetric by removing parts of levels, especially when part of the
+machine is disallowed by administrator restrictions
+(e.g. Linux cgroups).
+
To understand how hwloc manages such cases, one should first remember
the meaning of levels and cousin objects. All objects of the same type
are gathered as horizontal levels with a given depth. They are also
-connected through the cousin pointers of the hwloc_obj structure.
+connected through the cousin pointers of the ::hwloc_obj structure.
Some types, such as Caches or Groups, are annotated with a depth or
level attribute (for instance L2 cache or Group1). Moreover caches
have a type attribute (for instance L1i or L1d). Such
@@ -2850,8 +2937,8 @@ attributes are also taken in account when gathering objects as
horizontal levels. To be clear: there will be one level for L1i
caches, another level for L1d caches, another one for L2, etc.
-If the topology is asymmetric (e.g., if a cache is missing in one of
-the processors), a given horizontal level will still exist if there
+If the topology is asymmetric (e.g., if a group is missing above some
+processors), a given horizontal level will still exist if there
exist any objects of that type. However, some branches of the overall
tree may not have an object located in that horizontal level. Note
that this specific hole within one horizontal level does not imply
@@ -2859,11 +2946,14 @@ anything for other levels. All objects of the same type are gathered
in horizontal levels even if their parents or children have different
depths and types.
+See the diagram in \ref termsanddefs for a graphical representation
+of such topologies.
+
Moreover, it is important to understand that a same parent object may
have children of different types (and therefore, different
depths). <strong>These children are therefore siblings (because they
have the same parent), but they are <em>not</em> cousins (because they
-do not belong to the same horizontal levels).</strong>
+do not belong to the same horizontal level).</strong>
\section faq_annotate How do I annotate the topology with private notes?
@@ -2946,7 +3036,21 @@ to fix several issues of the 1.x interface.
The ABI will be broken, which means
<b>applications must be recompiled against the new 2.0 interface</b>.
-To check that you are not mixing old/recent headers with a recent/old runtime library:
+To check that you are not mixing old/recent headers with a recent/old runtime library,
+check the major revision number in the API version:
+\verbatim
+#include <hwloc.h>
+ unsigned version = hwloc_get_api_version();
+ if ((version >> 16) != (HWLOC_API_VERSION >> 16)) {
+ fprintf(stderr,
+ "%s compiled for hwloc API 0x%x but running on library API 0x%x.\n"
+ "You may need to point LD_LIBRARY_PATH to the right hwloc library.\n"
+ "Aborting since the new ABI is not backward compatible.\n",
+ callname, HWLOC_API_VERSION, version);
+ exit(EXIT_FAILURE);
+ }
+\endverbatim
+To specifically detect v2.0 issues:
\verbatim
#include <hwloc.h>
#if HWLOC_API_VERSION >= 0x00020000
@@ -2961,7 +3065,7 @@ To check that you are not mixing old/recent headers with a recent/old runtime li
\endverbatim
You should not try to remain compatible with very old releases such as
-1.1.x or earlier because <tt>HWLOC_API_VERSION</tt> was added in 1.0.0
+1.1.x or earlier because <tt>::HWLOC_API_VERSION</tt> was added in 1.0.0
and <tt>hwloc_get_api_version()</tt> came only in 1.1.1.
Also do not use the old cpuset API since it was deprecated and superseded
by the bitmap API in 1.1, and later removed in 1.5.
@@ -2995,9 +3099,63 @@ sysctl variable must be set to 1 to do so.
Otherwise, only the number of logical processors will be detected.
+\section faq_knl_numa How do I find the local MCDRAM NUMA node on Intel Knights Landing Xeon Phi?
+
+Intel Knights Landing Xeon Phi processors introduce a new memory architecture by
+possibly having two distinct local memories:
+some normal memory (DDR) and some high-bandwidth on-package memory (MCDRAM).
+Processors can be configured in various clustering modes to have up to 4 <em>Clusters</em>.
+Moreover, each <em>Cluster</em> (quarter, half or whole processor) of the processor may have its own local
+parts of the DDR and of the MCDRAM.
+
+The upcoming hwloc 2.0 will address this new architecture by presenting memory
+in an improved way.
+For now, starting with 1.11.2, hwloc releases use the following approximate representation:
+
+If a cluster only contains DDR or MCDRAM but not both, that memory is available
+as a local NUMA node above cores as usual.
+
+If a cluster contains both, two distinct NUMA nodes appear.
+They are sibling children of a Group object of type <tt>Cluster</tt>
+(or sibling children of the Package object for non-clustered processors).
+
+The DDR memory is the local NUMA node above cores as usual.
+Allocating memory from one core to its local NUMA node will therefore actually
+allocate it on the normal memory by default.
+
+The local high-bandwidth MCDRAM is the second NUMA node (without any Core or PU below it).
+It is the next sibling of the local DDR NUMA node below the same parent object.
+To allocate on the faster MCDRAM, one should first find the local NUMA node (the DDR memory,
+by looking up parent objects), and then take the next sibling to reach the local MCDRAM
+NUMA node (if any).
+
+The MCDRAM NUMA nodes may also be identified thanks to the <tt>Type</tt> info attribute
+which is set to <tt>MCDRAM</tt>.
+
+
+\section faq_knl_dump Why do I need hwloc-dump-hwdata for caches on Intel Knights Landing Xeon Phi?
+
+Intel Knights Landing Xeon Phi processors may use the on-package memory (MCDRAM)
+as either memory or a memory-side cache (currently reported as a L3 cache by hwloc).
+Details about this cache (especially its size) are currently only available to privileged users.
+
+The hwloc-dump-hwdata utility may be used to dump this privileged binary information
+into human-readable and world-accessible files that the hwloc library will later load.
+The utility should usually run as root once during boot, in order to update dumped
+information (stored under /var/run/hwloc by default) in case the MCDRAM configuration
+changed between reboots.
+
+hwloc-dump-hwdata requires <tt>dmi-sysfs</tt> kernel module loaded.
+
+The utility is currently unneeded on non-KNL platforms.
+
+
\section faq_phi How do I build for Intel Xeon Phi coprocessor?
-Intel Xeon Phi coprocessors usually runs a Linux environment but cross-compiling from the host is required.
+\note This section does not apply to standalone Intel Knights Landing Xeon Phi.
+
+Intel Knights Corner Xeon Phi coprocessors usually runs a Linux environment
+but cross-compiling from the host is required.
hwloc uses standard autotools options for cross-compiling.
For instance, to build for a <em>Knights Corner (KNC)</em> coprocessor:
@@ -3006,7 +3164,7 @@ If building with <tt>icc</tt>:
./configure CC="icc -mmic" --host=x86_64-k1om-linux --build=x86_64-unknown-linux-gnu
\endverbatim
-If building with the Xeon Phi-specific GCC that comes with the MPSS environment\n
+If building with the Xeon Phi-specific GCC that comes with the MPSS environment,
for instance <tt>/usr/linux-k1om-4.7/bin/x86_64-k1om-linux-gcc</tt>:
\verbatim
export PATH=$PATH:/usr/linux-k1om-4.7/bin/
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
index 66e1220..deb5141 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc.h
@@ -80,7 +80,10 @@ extern "C" {
/** \brief Indicate at build time which hwloc API version is being used. */
#define HWLOC_API_VERSION 0x00010b00
-/** \brief Indicate at runtime which hwloc API version was used at build time. */
+/** \brief Indicate at runtime which hwloc API version was used at build time.
+ *
+ * Should be ::HWLOC_API_VERSION if running on the same version.
+ */
HWLOC_DECLSPEC unsigned hwloc_get_api_version(void);
/** \brief Current component and plugin ABI version (see hwloc/plugins.h) */
@@ -208,6 +211,7 @@ typedef enum {
* expose their arbitrary processors aggregation this
* way. And hwloc may insert such objects to group
* NUMA nodes according to their distances.
+ * See also \ref faq_groups.
*
* These objects are ignored when they do not bring
* any structure.
@@ -216,7 +220,7 @@ typedef enum {
HWLOC_OBJ_MISC, /**< \brief Miscellaneous objects.
* Objects without particular meaning, that can e.g. be
* added by the application for its own use, or by hwloc
- * for miscellaneous objects such as MemoryDevice.
+ * for miscellaneous objects such as MemoryModule (DIMMs).
*/
HWLOC_OBJ_BRIDGE, /**< \brief Bridge.
@@ -254,7 +258,7 @@ typedef enum hwloc_obj_cache_type_e {
HWLOC_OBJ_CACHE_UNIFIED, /**< \brief Unified cache. */
HWLOC_OBJ_CACHE_DATA, /**< \brief Data cache. */
HWLOC_OBJ_CACHE_INSTRUCTION /**< \brief Instruction cache.
- * Only used when the HWLOC_TOPOLOGY_FLAG_ICACHES topology flag is set. */
+ * Only used when the ::HWLOC_TOPOLOGY_FLAG_ICACHES topology flag is set. */
} hwloc_obj_cache_type_t;
/** \brief Type of one side (upstream or downstream) of an I/O bridge. */
@@ -289,12 +293,12 @@ typedef enum hwloc_obj_osdev_type_e {
* respectively if \p type1 objects usually include \p type2 objects, are the
* same as \p type2 objects, or are included in \p type2 objects. If the types
* can not be compared (because neither is usually contained in the other),
- * HWLOC_TYPE_UNORDERED is returned. Object types containing CPUs can always
+ * ::HWLOC_TYPE_UNORDERED is returned. Object types containing CPUs can always
* be compared (usually, a system contains machines which contain nodes which
* contain packages which contain caches, which contain cores, which contain
* processors).
*
- * \note HWLOC_OBJ_PU will always be the deepest.
+ * \note ::HWLOC_OBJ_PU will always be the deepest.
* \note This does not mean that the actual topology will respect that order:
* e.g. as of today cores may also contain caches, and packages may also contain
* nodes. This is thus just to be seen as a fallback comparison method.
@@ -302,7 +306,7 @@ typedef enum hwloc_obj_osdev_type_e {
HWLOC_DECLSPEC int hwloc_compare_types (hwloc_obj_type_t type1, hwloc_obj_type_t type2) __hwloc_attribute_const;
enum hwloc_compare_types_e {
- HWLOC_TYPE_UNORDERED = INT_MAX /**< \brief Value returned by hwloc_compare_types when types can not be compared. \hideinitializer */
+ HWLOC_TYPE_UNORDERED = INT_MAX /**< \brief Value returned by hwloc_compare_types() when types can not be compared. \hideinitializer */
};
/** @} */
@@ -393,22 +397,22 @@ struct hwloc_obj {
* object and known how (the children path between this object and the PU
* objects).
*
- * If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
+ * If the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
* these CPUs may be offline, or not allowed for binding, see online_cpuset
* and allowed_cpuset.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_cpuset_t complete_cpuset; /**< \brief The complete CPU set of logical processors of this object,
*
* This includes not only the same as the cpuset field, but also the CPUs for
* which topology information is unknown or incomplete, and the CPUs that are
- * ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
+ * ignored when the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
* Thus no corresponding PU object may be found in the topology, because the
* precise position is undefined. It is however known that it would be somewhere
* under this object.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_cpuset_t online_cpuset; /**< \brief The CPU set of online logical processors
*
@@ -416,7 +420,7 @@ struct hwloc_obj {
* power and can execute threads. It may however not be allowed to bind to
* them due to administration rules, see allowed_cpuset.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_cpuset_t allowed_cpuset; /**< \brief The CPU set of allowed logical processors
*
@@ -426,7 +430,7 @@ struct hwloc_obj {
* Some of them may however be offline so binding to them may still not be
* possible, see online_cpuset.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_nodeset_t nodeset; /**< \brief NUMA nodes covered by this object or containing this object
@@ -438,19 +442,19 @@ struct hwloc_obj {
*
* In the end, these nodes are those that are close to the current object.
*
- * If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
+ * If the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of
* these nodes may not be allowed for allocation, see allowed_nodeset.
*
* If there are no NUMA nodes in the machine, all the memory is close to this
* object, so \p nodeset is full.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_nodeset_t complete_nodeset; /**< \brief The complete NUMA node set of this object,
*
* This includes not only the same as the nodeset field, but also the NUMA
* nodes for which topology information is unknown or incomplete, and the nodes
- * that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
+ * that are ignored when the ::HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set.
* Thus no corresponding NODE object may be found in the topology, because the
* precise position is undefined. It is however known that it would be
* somewhere under this object.
@@ -458,7 +462,7 @@ struct hwloc_obj {
* If there are no NUMA nodes in the machine, all the memory is close to this
* object, so \p complete_nodeset is full.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_nodeset_t allowed_nodeset; /**< \brief The set of allowed NUMA memory nodes
*
@@ -470,7 +474,7 @@ struct hwloc_obj {
* If there are no NUMA nodes in the machine, all the memory is close to this
* object, so \p allowed_nodeset is full.
*
- * \note Its value must not be changed, hwloc_bitmap_dup must be used instead.
+ * \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
struct hwloc_distances_s **distances; /**< \brief Distances between all objects at same depth below this object */
@@ -679,7 +683,7 @@ HWLOC_DECLSPEC void hwloc_topology_check(hwloc_topology_t topology);
/** \brief Ignore an object type.
*
* Ignore all objects from the given type.
- * The bottom-level type HWLOC_OBJ_PU may not be ignored.
+ * The bottom-level type ::HWLOC_OBJ_PU may not be ignored.
* The top-level object of the hierarchy will never be ignored, even if this function
* succeeds.
* Group objects are always ignored if they do not bring any structure
@@ -693,7 +697,7 @@ HWLOC_DECLSPEC int hwloc_topology_ignore_type(hwloc_topology_t topology, hwloc_o
*
* Ignore all objects from the given type as long as they do not bring any structure:
* Each ignored object should have a single children or be the only child of its parent.
- * The bottom-level type HWLOC_OBJ_PU may not be ignored.
+ * The bottom-level type ::HWLOC_OBJ_PU may not be ignored.
* I/O objects may not be ignored, topology flags should be used to configure
* their discovery instead.
*/
@@ -702,9 +706,8 @@ HWLOC_DECLSPEC int hwloc_topology_ignore_type_keep_structure(hwloc_topology_t to
/** \brief Ignore all objects that do not bring any structure.
*
* Ignore all objects that do not bring any structure:
- * Each ignored object should have a single children or be the only child of its parent.
- * I/O objects may not be ignored, topology flags should be used to configure
- * their discovery instead.
+ * This is equivalent to calling hwloc_topology_ignore_type_keep_structure()
+ * for all object types.
*/
HWLOC_DECLSPEC int hwloc_topology_ignore_all_keep_structure(hwloc_topology_t topology);
@@ -719,6 +722,10 @@ enum hwloc_topology_flags_e {
* Gather all resources, even if some were disabled by the administrator.
* For instance, ignore Linux Cgroup/Cpusets and gather all processors and memory nodes,
* and ignore the fact that some resources may be offline.
+ *
+ * When this flag is not set, PUs that are disallowed are not added to the topology.
+ * Parent objects (package, core, cache, etc.) are added only if some of their children are allowed.
+ * NUMA nodes are always added but their available memory is set to 0 when disallowed.
* \hideinitializer
*/
HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM = (1UL<<0),
@@ -726,7 +733,7 @@ enum hwloc_topology_flags_e {
/** \brief Assume that the selected backend provides the topology for the
* system on which we are running.
*
- * This forces hwloc_topology_is_thissystem to return 1, i.e. makes hwloc assume that
+ * This forces hwloc_topology_is_thissystem() to return 1, i.e. makes hwloc assume that
* the selected backend provides the topology for the system on which we are running,
* even if it is not the OS-specific backend but the XML backend for instance.
* This means making the binding functions actually call the OS-specific
@@ -749,7 +756,7 @@ enum hwloc_topology_flags_e {
* detection using the pci backend. Only the common PCI devices (GPUs,
* NICs, block devices, ...) and host bridges (objects that connect the host
* objects to an I/O subsystem) will be added to the topology.
- * Additionally it also enables MemoryDevice misc objects.
+ * Additionally it also enables MemoryModule misc objects.
* Uncommon devices and other bridges (such as PCI-to-PCI bridges) will be
* ignored.
* \hideinitializer
@@ -758,7 +765,7 @@ enum hwloc_topology_flags_e {
/** \brief Detect PCI bridges.
*
- * This flag should be combined with HWLOC_TOPOLOGY_FLAG_IO_DEVICES to enable
+ * This flag should be combined with ::HWLOC_TOPOLOGY_FLAG_IO_DEVICES to enable
* the detection of both common devices and of all useful bridges (bridges that
* have at least one device behind them).
* \hideinitializer
@@ -767,10 +774,10 @@ enum hwloc_topology_flags_e {
/** \brief Detect the whole PCI hierarchy.
*
- * This flag enables detection of all I/O devices (even the uncommon ones)
- * and bridges (even those that have no device behind them) using the pci
- * backend.
- * This implies HWLOC_TOPOLOGY_FLAG_IO_DEVICES.
+ * This flag enables detection of all I/O devices (even the uncommon ones
+ * such as DMA channels) and bridges (even those that have no device behind
+ * them) using the pci backend.
+ * This implies ::HWLOC_TOPOLOGY_FLAG_IO_DEVICES.
* \hideinitializer
*/
HWLOC_TOPOLOGY_FLAG_WHOLE_IO = (1UL<<4),
@@ -803,7 +810,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_flags (hwloc_topology_t topology, unsigned
*/
HWLOC_DECLSPEC unsigned long hwloc_topology_get_flags (hwloc_topology_t topology);
-/** \brief Change which pid the topology is viewed from
+/** \brief Change which process the topology is viewed from
*
* On some systems, processes may have different views of the machine, for
* instance the set of allowed CPUs. By default, hwloc exposes the view from
@@ -838,7 +845,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_pid(hwloc_topology_t __hwloc_restrict topo
*
* \note For convenience, this backend provides empty binding hooks which just
* return success. To have hwloc still actually call OS-specific hooks, the
- * HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
+ * ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
* file is really the underlying system.
*
* \note On success, the Linux component replaces the previously enabled
@@ -895,7 +902,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_synthetic(hwloc_topology_t __hwloc_restric
*
* \note For convenience, this backend provides empty binding hooks which just
* return success. To have hwloc still actually call OS-specific hooks, the
- * HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
+ * ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
* file is really the underlying system.
*
* \note On success, the XML component replaces the previously enabled
@@ -923,7 +930,7 @@ HWLOC_DECLSPEC int hwloc_topology_set_xml(hwloc_topology_t __hwloc_restrict topo
*
* \note For convenience, this backend provides empty binding hooks which just
* return success. To have hwloc still actually call OS-specific hooks, the
- * HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
+ * ::HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded
* file is really the underlying system.
*
* \note On success, the XML component replaces the previously enabled
@@ -1099,7 +1106,7 @@ HWLOC_DECLSPEC void * hwloc_topology_get_userdata(hwloc_topology_t topology);
/** \brief Get the depth of the hierarchical tree of objects.
*
- * This is the depth of HWLOC_OBJ_PU objects plus one.
+ * This is the depth of ::HWLOC_OBJ_PU objects plus one.
*/
HWLOC_DECLSPEC unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure;
@@ -1107,14 +1114,14 @@ HWLOC_DECLSPEC unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restri
*
* If no object of this type is present on the underlying architecture, or if
* the OS doesn't provide this kind of information, the function returns
- * HWLOC_TYPE_DEPTH_UNKNOWN.
+ * ::HWLOC_TYPE_DEPTH_UNKNOWN.
*
* If type is absent but a similar type is acceptable, see also
* hwloc_get_type_or_below_depth() and hwloc_get_type_or_above_depth().
*
* If some objects of the given type exist in different levels,
* for instance L1 and L2 caches, or L1i and L1d caches,
- * the function returns HWLOC_TYPE_DEPTH_MULTIPLE.
+ * the function returns ::HWLOC_TYPE_DEPTH_MULTIPLE.
* See hwloc_get_cache_type_depth() in hwloc/helper.h to better handle this
* case.
*
@@ -1142,7 +1149,7 @@ enum hwloc_get_type_depth_e {
* inside \p type.
*
* If some objects of the given type exist in different levels, for instance
- * L1 and L2 caches, the function returns HWLOC_TYPE_DEPTH_MULTIPLE.
+ * L1 and L2 caches, the function returns ::HWLOC_TYPE_DEPTH_MULTIPLE.
*/
static __hwloc_inline int
hwloc_get_type_or_below_depth (hwloc_topology_t topology, hwloc_obj_type_t type) __hwloc_attribute_pure;
@@ -1154,13 +1161,15 @@ hwloc_get_type_or_below_depth (hwloc_topology_t topology, hwloc_obj_type_t type)
* containing \p type.
*
* If some objects of the given type exist in different levels, for instance
- * L1 and L2 caches, the function returns HWLOC_TYPE_DEPTH_MULTIPLE.
+ * L1 and L2 caches, the function returns ::HWLOC_TYPE_DEPTH_MULTIPLE.
*/
static __hwloc_inline int
hwloc_get_type_or_above_depth (hwloc_topology_t topology, hwloc_obj_type_t type) __hwloc_attribute_pure;
/** \brief Returns the type of objects at depth \p depth.
*
+ * \p depth should between 0 and hwloc_topology_get_depth()-1.
+ *
* \return -1 if depth \p depth does not exist.
*/
HWLOC_DECLSPEC hwloc_obj_type_t hwloc_get_depth_type (hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure;
@@ -1243,7 +1252,7 @@ HWLOC_DECLSPEC const char * hwloc_obj_type_string (hwloc_obj_type_t type) __hwlo
* Attributes that are not specified in the string (for instance "Group"
* without a depth, or "L2Cache" without a cache type) are set to -1.
*
- * \p typeattrd is only filled if the size specified in \p typeattrsize
+ * \p typeattrp is only filled if the size specified in \p typeattrsize
* is large enough. It is currently only used for caches, and the required
* size is at least the size of hwloc_obj_cache_type_t.
*
@@ -1457,10 +1466,10 @@ HWLOC_DECLSPEC int hwloc_get_cpubind(hwloc_topology_t topology, hwloc_cpuset_t s
* and \p HANDLE on native Windows platforms.
*
* \note As a special case on Linux, if a tid (thread ID) is supplied
- * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * instead of a pid (process ID) and ::HWLOC_CPUBIND_THREAD is passed in flags,
* the binding is applied to that specific thread.
*
- * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
+ * \note On non-Linux systems, ::HWLOC_CPUBIND_THREAD can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int flags);
@@ -1470,10 +1479,10 @@ HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t
* and \p HANDLE on native Windows platforms.
*
* \note As a special case on Linux, if a tid (thread ID) is supplied
- * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * instead of a pid (process ID) and ::HWLOC_CPUBIND_THREAD is passed in flags,
* the binding for that specific thread is returned.
*
- * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
+ * \note On non-Linux systems, ::HWLOC_CPUBIND_THREAD can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
@@ -1483,7 +1492,7 @@ HWLOC_DECLSPEC int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t
* \note \p hwloc_thread_t is \p pthread_t on Unix platforms,
* and \p HANDLE on native Windows platforms.
*
- * \note HWLOC_CPUBIND_PROCESS can not be used in \p flags.
+ * \note ::HWLOC_CPUBIND_PROCESS can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_set_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_const_cpuset_t set, int flags);
#endif
@@ -1494,7 +1503,7 @@ HWLOC_DECLSPEC int hwloc_set_thread_cpubind(hwloc_topology_t topology, hwloc_thr
* \note \p hwloc_thread_t is \p pthread_t on Unix platforms,
* and \p HANDLE on native Windows platforms.
*
- * \note HWLOC_CPUBIND_PROCESS can not be used in \p flags.
+ * \note ::HWLOC_CPUBIND_PROCESS can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_get_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_cpuset_t set, int flags);
#endif
@@ -1506,7 +1515,7 @@ HWLOC_DECLSPEC int hwloc_get_thread_cpubind(hwloc_topology_t topology, hwloc_thr
* so this function may return something that is already
* outdated.
*
- * \p flags can include either HWLOC_CPUBIND_PROCESS or HWLOC_CPUBIND_THREAD to
+ * \p flags can include either ::HWLOC_CPUBIND_PROCESS or ::HWLOC_CPUBIND_THREAD to
* specify whether the query should be for the whole process (union of all CPUs
* on which all threads are running), or only the current thread. If the
* process is single-threaded, flags can be set to zero to let hwloc use
@@ -1525,10 +1534,10 @@ HWLOC_DECLSPEC int hwloc_get_last_cpu_location(hwloc_topology_t topology, hwloc_
* and \p HANDLE on native Windows platforms.
*
* \note As a special case on Linux, if a tid (thread ID) is supplied
- * instead of a pid (process ID) and HWLOC_CPUBIND_THREAD is passed in flags,
+ * instead of a pid (process ID) and ::HWLOC_CPUBIND_THREAD is passed in flags,
* the last CPU location of that specific thread is returned.
*
- * \note On non-Linux systems, HWLOC_CPUBIND_THREAD can not be used in \p flags.
+ * \note On non-Linux systems, ::HWLOC_CPUBIND_THREAD can not be used in \p flags.
*/
HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
@@ -1611,8 +1620,8 @@ HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, h
typedef enum {
/** \brief Reset the memory allocation policy to the system default.
* Depending on the operating system, this may correspond to
- * HWLOC_MEMBIND_FIRSTTOUCH (Linux),
- * or HWLOC_MEMBIND_BIND (AIX, HP-UX, OSF, Solaris, Windows).
+ * ::HWLOC_MEMBIND_FIRSTTOUCH (Linux),
+ * or ::HWLOC_MEMBIND_BIND (AIX, HP-UX, OSF, Solaris, Windows).
* \hideinitializer */
HWLOC_MEMBIND_DEFAULT = 0,
@@ -2041,7 +2050,7 @@ HWLOC_DECLSPEC void *hwloc_alloc_membind(hwloc_topology_t topology, size_t len,
/** \brief Allocate some memory on the given nodeset \p nodeset
*
- * This is similar to hwloc_alloc_membind except that it is allowed to change
+ * This is similar to hwloc_alloc_membind() except that it is allowed to change
* the current memory binding policy, thus providing more binding support, at
* the expense of changing the current state.
*/
@@ -2050,7 +2059,7 @@ hwloc_alloc_membind_policy_nodeset(hwloc_topology_t topology, size_t len, hwloc_
/** \brief Allocate some memory on the memory nodes near given cpuset \p cpuset
*
- * This is similar to hwloc_alloc_membind_policy_nodeset, but for a given cpuset.
+ * This is similar to hwloc_alloc_membind_policy_nodeset(), but for a given cpuset.
*/
static __hwloc_inline void *
hwloc_alloc_membind_policy(hwloc_topology_t topology, size_t len, hwloc_const_cpuset_t set, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h
index bb18f65..5626428 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/bitmap.h
@@ -38,7 +38,7 @@ extern "C" {
*
* \note Several examples of using the bitmap API are available under the
* doc/examples/ directory in the source tree.
- * Regression tests such as tests/hwloc_bitmap*.c also make intensive use
+ * Regression tests such as tests/hwloc/hwloc_bitmap*.c also make intensive use
* of this API.
* @{
*/
@@ -257,27 +257,35 @@ HWLOC_DECLSPEC int hwloc_bitmap_last(hwloc_const_bitmap_t bitmap) __hwloc_attrib
HWLOC_DECLSPEC int hwloc_bitmap_weight(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Loop macro iterating on bitmap \p bitmap
- * \hideinitializer
+ *
+ * The loop must start with hwloc_bitmap_foreach_begin() and end
+ * with hwloc_bitmap_foreach_end() followed by a terminating ';'.
*
* \p index is the loop variable; it should be an unsigned int. The
* first iteration will set \p index to the lowest index in the bitmap.
* Successive iterations will iterate through, in order, all remaining
- * indexes that in the bitmap. To be specific: each iteration will return a
+ * indexes set in the bitmap. To be specific: each iteration will return a
* value for \p index such that hwloc_bitmap_isset(bitmap, index) is true.
*
* The assert prevents the loop from being infinite if the bitmap is infinite.
+ *
+ * \hideinitializer
*/
#define hwloc_bitmap_foreach_begin(id, bitmap) \
do { \
assert(hwloc_bitmap_weight(bitmap) != -1); \
for (id = hwloc_bitmap_first(bitmap); \
(unsigned) id != (unsigned) -1; \
- id = hwloc_bitmap_next(bitmap, id)) { \
-/** \brief End of loop. Needs a terminating ';'.
- * \hideinitializer
+ id = hwloc_bitmap_next(bitmap, id)) {
+
+/** \brief End of loop macro iterating on a bitmap.
+ *
+ * Needs a terminating ';'.
*
- * \sa hwloc_bitmap_foreach_begin */
-#define hwloc_bitmap_foreach_end() \
+ * \sa hwloc_bitmap_foreach_begin()
+ * \hideinitializer
+ */
+#define hwloc_bitmap_foreach_end() \
} \
} while (0)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h
index 3d09203..2a58120 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/deprecated.h
@@ -81,7 +81,7 @@ hwloc_distribute(hwloc_topology_t topology, hwloc_obj_t root, hwloc_cpuset_t *se
/** \brief Distribute \p n items over the topology under \p roots
*
- * This is the same as hwloc_distribute, but takes an array of roots instead of
+ * This is the same as hwloc_distribute(), but takes an array of roots instead of
* just one root.
*
* \note This function requires the \p roots objects to have a CPU set.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h
index 3f1beb1..8b2fe92 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/diff.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013-2014 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -59,19 +59,19 @@ extern "C" {
*/
typedef enum hwloc_topology_diff_obj_attr_type_e {
/** \brief The object local memory is modified.
- * The union is a hwloc_topology_diff_obj_attr_uint64_s
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_uint64_s
* (and the index field is ignored).
*/
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_SIZE,
/** \brief The object name is modified.
- * The union is a hwloc_topology_diff_obj_attr_string_s
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_string_s
* (and the name field is ignored).
*/
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_NAME,
/** \brief the value of an info attribute is modified.
- * The union is a hwloc_topology_diff_obj_attr_string_s.
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_string_s.
*/
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR_INFO
} hwloc_topology_diff_obj_attr_type_t;
@@ -107,17 +107,17 @@ union hwloc_topology_diff_obj_attr_u {
/** \brief Type of one element of a difference list.
*/
typedef enum hwloc_topology_diff_type_e {
- /*< \brief An object attribute was changed.
- * The union is a hwloc_topology_diff_obj_attr_s.
- */
+ /** \brief An object attribute was changed.
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_obj_attr_s.
+ */
HWLOC_TOPOLOGY_DIFF_OBJ_ATTR,
- /*< \brief The difference is too complex,
+ /** \brief The difference is too complex,
* it cannot be represented. The difference below
* this object has not been checked.
* hwloc_topology_diff_build() will return 1.
*
- * The union is a hwloc_topology_diff_too_complex_s.
+ * The union is a hwloc_topology_diff_obj_attr_u::hwloc_topology_diff_too_complex_s.
*/
HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
} hwloc_topology_diff_type_t;
@@ -133,7 +133,7 @@ typedef union hwloc_topology_diff_u {
/* A difference in an object attribute. */
struct hwloc_topology_diff_obj_attr_s {
- hwloc_topology_diff_type_t type; /* must be HWLOC_TOPOLOGY_DIFF_OBJ_ATTR */
+ hwloc_topology_diff_type_t type; /* must be ::HWLOC_TOPOLOGY_DIFF_OBJ_ATTR */
union hwloc_topology_diff_u * next;
/* List of attribute differences for a single object */
unsigned obj_depth;
@@ -143,7 +143,7 @@ typedef union hwloc_topology_diff_u {
/* A difference that is too complex. */
struct hwloc_topology_diff_too_complex_s {
- hwloc_topology_diff_type_t type; /* must be HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX */
+ hwloc_topology_diff_type_t type; /* must be ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX */
union hwloc_topology_diff_u * next;
/* Where we had to stop computing the diff in the first topology */
unsigned obj_depth;
@@ -154,14 +154,14 @@ typedef union hwloc_topology_diff_u {
/** \brief Compute the difference between 2 topologies.
*
- * The difference is stored as a list of hwloc_topology_diff_t entries
+ * The difference is stored as a list of ::hwloc_topology_diff_t entries
* starting at \p diff.
* It is computed by doing a depth-first traversal of both topology trees
* simultaneously.
*
* If the difference between 2 objects is too complex to be represented
* (for instance if some objects have different types, or different numbers
- * of children), a special diff entry of type HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
+ * of children), a special diff entry of type ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX
* is queued.
* The computation of the diff does not continue below these objects.
* So each such diff entry means that the difference between two subtrees
@@ -173,7 +173,7 @@ typedef union hwloc_topology_diff_u {
* between the topologies.
*
* \return 1 if the difference is too complex (see above). Some entries in
- * the list will be of type HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX.
+ * the list will be of type ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX.
*
* \return -1 on any other error.
*
@@ -183,7 +183,7 @@ typedef union hwloc_topology_diff_u {
*
* \note The output diff can only be exported to XML or passed to
* hwloc_topology_diff_apply() if 0 was returned, i.e. if no entry of type
- * HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX is listed.
+ * ::HWLOC_TOPOLOGY_DIFF_TOO_COMPLEX is listed.
*
* \note The output diff may be modified by removing some entries from
* the list. The removed entries should be freed by passing them to
@@ -202,7 +202,7 @@ enum hwloc_topology_diff_apply_flags_e {
/** \brief Apply a topology diff to an existing topology.
*
- * \p flags is an OR'ed set of hwloc_topology_diff_apply_flags_e.
+ * \p flags is an OR'ed set of ::hwloc_topology_diff_apply_flags_e.
*
* The new topology is modified in place. hwloc_topology_dup()
* may be used to duplicate it before patching.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h
index 70d7d17..029f2a3 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/helper.h
@@ -379,7 +379,7 @@ hwloc_get_ancestor_obj_by_type (hwloc_topology_t topology __hwloc_attribute_unus
return ancestor;
}
-/** \brief Returns the common parent object to objects lvl1 and lvl2 */
+/** \brief Returns the common parent object to objects \p obj1 and \p obj2 */
static __hwloc_inline hwloc_obj_t
hwloc_get_common_ancestor_obj (hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj1, hwloc_obj_t obj2) __hwloc_attribute_pure;
static __hwloc_inline hwloc_obj_t
@@ -442,19 +442,19 @@ hwloc_get_next_child (hwloc_topology_t topology __hwloc_attribute_unused, hwloc_
* Return the depth of the topology level that contains cache objects
* whose attributes match \p cachedepth and \p cachetype. This function
* intends to disambiguate the case where hwloc_get_type_depth() returns
- * \p HWLOC_TYPE_DEPTH_MULTIPLE.
+ * ::HWLOC_TYPE_DEPTH_MULTIPLE.
*
- * If no cache level matches, \p HWLOC_TYPE_DEPTH_UNKNOWN is returned.
+ * If no cache level matches, ::HWLOC_TYPE_DEPTH_UNKNOWN is returned.
*
- * If \p cachetype is \p HWLOC_OBJ_CACHE_UNIFIED, the depth of the
+ * If \p cachetype is ::HWLOC_OBJ_CACHE_UNIFIED, the depth of the
* unique matching unified cache level is returned.
*
- * If \p cachetype is \p HWLOC_OBJ_CACHE_DATA or \p HWLOC_OBJ_CACHE_INSTRUCTION,
+ * If \p cachetype is ::HWLOC_OBJ_CACHE_DATA or ::HWLOC_OBJ_CACHE_INSTRUCTION,
* either a matching cache, or a unified cache is returned.
*
* If \p cachetype is \c -1, it is ignored and multiple levels may
* match. The function returns either the depth of a uniquely matching
- * level or \p HWLOC_TYPE_DEPTH_MULTIPLE.
+ * level or ::HWLOC_TYPE_DEPTH_MULTIPLE.
*/
static __hwloc_inline int
hwloc_get_cache_type_depth (hwloc_topology_t topology,
@@ -941,7 +941,7 @@ hwloc_cpuset_to_nodeset(hwloc_topology_t topology, hwloc_const_cpuset_t _cpuset,
/** \brief Convert a CPU set into a NUMA node set without handling non-NUMA cases
*
- * This is the strict variant of ::hwloc_cpuset_to_nodeset. It does not fix
+ * This is the strict variant of hwloc_cpuset_to_nodeset(). It does not fix
* non-NUMA cases. If the topology contains some NUMA nodes, behave exactly
* the same. However, if the topology contains no NUMA nodes, return an empty
* nodeset.
@@ -993,7 +993,7 @@ hwloc_cpuset_from_nodeset(hwloc_topology_t topology, hwloc_cpuset_t _cpuset, hwl
/** \brief Convert a NUMA node set into a CPU set without handling non-NUMA cases
*
- * This is the strict variant of ::hwloc_cpuset_from_nodeset. It does not fix
+ * This is the strict variant of hwloc_cpuset_from_nodeset(). It does not fix
* non-NUMA cases. If the topology contains some NUMA nodes, behave exactly
* the same. However, if the topology contains no NUMA nodes, return an empty
* cpuset.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h
index 4ddc900..565bfee 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/linux.h
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2013 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux
* See COPYING in top-level directory.
*/
@@ -55,14 +55,14 @@ HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t
* but uses a hwloc cpuset.
*
* \note This is equivalent to calling hwloc_get_proc_cpubind() with
- * HWLOC_CPUBIND_THREAD as flags.
+ * ::HWLOC_CPUBIND_THREAD as flags.
*/
HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
/** \brief Get the last physical CPU where thread \p tid ran.
*
* \note This is equivalent to calling hwloc_get_proc_last_cpu_location() with
- * HWLOC_CPUBIND_THREAD as flags.
+ * ::HWLOC_CPUBIND_THREAD as flags.
*/
HWLOC_DECLSPEC int hwloc_linux_get_tid_last_cpu_location(hwloc_topology_t topology, pid_t tid, hwloc_bitmap_t set);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
index 238a689..510157b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/plugins.h
@@ -56,7 +56,7 @@ struct hwloc_disc_component {
*/
const char *name;
- /** \brief Component types to exclude, as an OR'ed set of HWLOC_DISC_COMPONENT_TYPE_*.
+ /** \brief Component types to exclude, as an OR'ed set of ::hwloc_disc_component_type_e.
*
* For a GLOBAL component, this usually includes all other types (~0).
*
@@ -121,7 +121,7 @@ struct hwloc_backend {
/** \private Reserved for the core. Used internally to list backends topology->backends. */
struct hwloc_backend * next;
- /** \brief Backend flags, as an OR'ed set of HWLOC_BACKEND_FLAG_* */
+ /** \brief Backend flags, as an OR'ed set of ::hwloc_backend_flag_e */
unsigned long flags;
/** \brief Backend-specific 'is_custom' property.
@@ -143,7 +143,7 @@ struct hwloc_backend {
/** \brief Main discovery callback.
* returns > 0 if it modified the topology tree, -1 on error, 0 otherwise.
- * May be NULL if type is HWLOC_DISC_COMPONENT_TYPE_MISC. */
+ * May be NULL if type is ::HWLOC_DISC_COMPONENT_TYPE_MISC. */
int (*discover)(struct hwloc_backend *backend);
/** \brief Callback used by the PCI backend to retrieve the locality of a PCI object from the OS/cpu backend.
@@ -213,7 +213,7 @@ typedef enum hwloc_component_type_e {
* or dynamically loaded as a plugin.
*/
struct hwloc_component {
- /** \brief Component ABI version, set to HWLOC_COMPONENT_ABI */
+ /** \brief Component ABI version, set to ::HWLOC_COMPONENT_ABI */
unsigned abi;
/** \brief Process-wide component initialization callback.
@@ -379,7 +379,7 @@ hwloc_plugin_check_namespace(const char *pluginname __hwloc_attribute_unused, co
static int verboseenv_value = 0;
if (!verboseenv_checked) {
const char *verboseenv = getenv("HWLOC_PLUGINS_VERBOSE");
- verboseenv_value = atoi(verboseenv);
+ verboseenv_value = verboseenv ? atoi(verboseenv) : 0;
verboseenv_checked = 1;
}
if (verboseenv_value)
@@ -426,6 +426,8 @@ HWLOC_DECLSPEC int hwloc_pci_find_linkspeed(const unsigned char *config, unsigne
/** \brief Modify the PCI device object into a bridge and fill its attribute if a bridge is found in the PCI config space.
*
* This function requires 64 bytes of common configuration header at the beginning of config.
+ *
+ * Returns -1 and destroys /p obj if bridge fields are invalid.
*/
HWLOC_DECLSPEC int hwloc_pci_prepare_bridge(hwloc_obj_t obj, const unsigned char *config);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
index 7b4b8a3..27a6f9d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/hwloc/rename.h
@@ -1,6 +1,6 @@
/*
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
- * Copyright © 2010-2014 Inria. All rights reserved.
+ * Copyright © 2010-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -510,6 +510,7 @@ extern "C" {
/* private/debug.h */
+#define hwloc_debug_enabled HWLOC_NAME(debug_enabled)
#define hwloc_debug HWLOC_NAME(debug)
/* private/misc.h */
@@ -604,6 +605,10 @@ extern "C" {
#define hwloc_set_netbsd_hooks HWLOC_NAME(set_netbsd_hooks)
#define hwloc_set_hpux_hooks HWLOC_NAME(set_hpux_hooks)
+#define hwloc_look_hardwired_fujitsu_k HWLOC_NAME(look_hardwired_fujitsu_k)
+#define hwloc_look_hardwired_fujitsu_fx10 HWLOC_NAME(look_hardwired_fujitsu_fx10)
+#define hwloc_look_hardwired_fujitsu_fx100 HWLOC_NAME(look_hardwired_fujitsu_fx100)
+
#define hwloc_add_uname_info HWLOC_NAME(add_uname_info)
#define hwloc_free_unlinked_object HWLOC_NAME(free_unlinked_object)
#define hwloc__duplicate_objects HWLOC_NAME(_duplicate_objects)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/cpuid-x86.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/cpuid-x86.h
index ca5cb97..9a5f544 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/cpuid-x86.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/cpuid-x86.h
@@ -73,11 +73,10 @@ static __hwloc_inline void hwloc_x86_cpuid(unsigned *eax, unsigned *ebx, unsigne
"+c" (*ecx), "=&d" (*edx));
#elif defined(HWLOC_X86_32_ARCH)
__asm__(
- "xchg %%ebx,%1\n\t"
+ "mov %%ebx,%1\n\t"
"cpuid\n\t"
"xchg %%ebx,%1\n\t"
- : "=a" (*eax), "=r" (*ebx), "=c"(*ecx), "=d" (*edx)
- : "0" (*eax), "2" (*ecx));
+ : "+a" (*eax), "=SD" (*ebx), "+c" (*ecx), "=d" (*edx));
#else
#error unknown architecture
#endif
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h
index 4de91bf..2038a4c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/debug.h
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2012 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009, 2011 Université Bordeaux
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -18,36 +18,57 @@
#include <stdio.h>
#endif
+#ifdef HWLOC_DEBUG
+static __hwloc_inline int hwloc_debug_enabled(void)
+{
+ static int checked = 0;
+ static int enabled = 1;
+ if (!checked) {
+ const char *env = getenv("HWLOC_DEBUG_VERBOSE");
+ if (env)
+ enabled = atoi(env);
+ if (enabled)
+ fprintf(stderr, "hwloc verbose debug enabled, may be disabled with HWLOC_DEBUG_VERBOSE=0 in the environment.\n");
+ checked = 1;
+ }
+ return enabled;
+}
+#endif
+
static __hwloc_inline void hwloc_debug(const char *s __hwloc_attribute_unused, ...)
{
#ifdef HWLOC_DEBUG
+ if (hwloc_debug_enabled()) {
va_list ap;
-
va_start(ap, s);
vfprintf(stderr, s, ap);
va_end(ap);
+ }
#endif
}
#ifdef HWLOC_DEBUG
#define hwloc_debug_bitmap(fmt, bitmap) do { \
+if (hwloc_debug_enabled()) { \
char *s; \
hwloc_bitmap_asprintf(&s, bitmap); \
fprintf(stderr, fmt, s); \
free(s); \
-} while (0)
+} } while (0)
#define hwloc_debug_1arg_bitmap(fmt, arg1, bitmap) do { \
+if (hwloc_debug_enabled()) { \
char *s; \
hwloc_bitmap_asprintf(&s, bitmap); \
fprintf(stderr, fmt, arg1, s); \
free(s); \
-} while (0)
+} } while (0)
#define hwloc_debug_2args_bitmap(fmt, arg1, arg2, bitmap) do { \
+if (hwloc_debug_enabled()) { \
char *s; \
hwloc_bitmap_asprintf(&s, bitmap); \
fprintf(stderr, fmt, arg1, arg2, s); \
free(s); \
-} while (0)
+} } while (0)
#else
#define hwloc_debug_bitmap(s, bitmap) do { } while(0)
#define hwloc_debug_1arg_bitmap(s, arg1, bitmap) do { } while(0)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
index 0d59298..dafc266 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/private.h
@@ -192,6 +192,10 @@ extern void hwloc_set_netbsd_hooks(struct hwloc_binding_hooks *binding_hooks, st
extern void hwloc_set_hpux_hooks(struct hwloc_binding_hooks *binding_hooks, struct hwloc_topology_support *support);
#endif /* HWLOC_HPUX_SYS */
+extern int hwloc_look_hardwired_fujitsu_k(struct hwloc_topology *topology);
+extern int hwloc_look_hardwired_fujitsu_fx10(struct hwloc_topology *topology);
+extern int hwloc_look_hardwired_fujitsu_fx100(struct hwloc_topology *topology);
+
/* Insert uname-specific names/values in the object infos array.
* If cached_uname isn't NULL, it is used as a struct utsname instead of recalling uname.
* Any field that starts with \0 is ignored.
@@ -256,8 +260,13 @@ extern void hwloc_group_by_distances(struct hwloc_topology *topology);
} \
} while(0)
#else /* HAVE_USELOCALE */
+#if __HWLOC_HAVE_ATTRIBUTE_UNUSED
#define hwloc_localeswitch_declare int __dummy_nolocale __hwloc_attribute_unused
#define hwloc_localeswitch_init()
+#else
+#define hwloc_localeswitch_declare int __dummy_nolocale
+#define hwloc_localeswitch_init() (void)__dummy_nolocale
+#endif
#define hwloc_localeswitch_fini()
#endif /* HAVE_USELOCALE */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
index 41aa35c..a241d70 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/Makefile.am
@@ -118,7 +118,7 @@ sources += topology-solaris-chiptype.c
endif HWLOC_HAVE_SOLARIS
if HWLOC_HAVE_LINUX
-sources += topology-linux.c
+sources += topology-linux.c topology-hardwired.c
endif HWLOC_HAVE_LINUX
if HWLOC_HAVE_BGQ
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c
index 7a3392f..4e1976f 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c
@@ -178,7 +178,7 @@ hwloc_encode_to_base64(const char *src, size_t srclength, char *target, size_t t
if (datalength >= targsize)
return (-1);
target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
+ return (int)(datalength);
}
/* skips all whitespace anywhere.
@@ -213,7 +213,7 @@ hwloc_decode_from_base64(char const *src, char *target, size_t targsize)
if (target) {
if (tarindex >= targsize)
return (-1);
- target[tarindex] = (pos - Base64) << 2;
+ target[tarindex] = (char)(pos - Base64) << 2;
}
state = 1;
break;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
index e2b5a06..afef5e8 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c
@@ -2,7 +2,7 @@
* Copyright © 2009 CNRS
* Copyright © 2009-2011 inria. All rights reserved.
* Copyright © 2009-2010, 2012 Université Bordeaux
- * Copyright © 2011 Cisco Systems, Inc. All rights reserved.
+ * Copyright © 2011-2015 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -74,9 +74,13 @@ hwloc_set_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t set, int flags
if (topology->binding_hooks.set_thisthread_cpubind)
return topology->binding_hooks.set_thisthread_cpubind(topology, set, flags);
} else {
- if (topology->binding_hooks.set_thisproc_cpubind)
- return topology->binding_hooks.set_thisproc_cpubind(topology, set, flags);
- else if (topology->binding_hooks.set_thisthread_cpubind)
+ if (topology->binding_hooks.set_thisproc_cpubind) {
+ int err = topology->binding_hooks.set_thisproc_cpubind(topology, set, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.set_thisthread_cpubind)
return topology->binding_hooks.set_thisthread_cpubind(topology, set, flags);
}
@@ -94,9 +98,13 @@ hwloc_get_cpubind(hwloc_topology_t topology, hwloc_bitmap_t set, int flags)
if (topology->binding_hooks.get_thisthread_cpubind)
return topology->binding_hooks.get_thisthread_cpubind(topology, set, flags);
} else {
- if (topology->binding_hooks.get_thisproc_cpubind)
- return topology->binding_hooks.get_thisproc_cpubind(topology, set, flags);
- else if (topology->binding_hooks.get_thisthread_cpubind)
+ if (topology->binding_hooks.get_thisproc_cpubind) {
+ int err = topology->binding_hooks.get_thisproc_cpubind(topology, set, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.get_thisthread_cpubind)
return topology->binding_hooks.get_thisthread_cpubind(topology, set, flags);
}
@@ -164,9 +172,13 @@ hwloc_get_last_cpu_location(hwloc_topology_t topology, hwloc_bitmap_t set, int f
if (topology->binding_hooks.get_thisthread_last_cpu_location)
return topology->binding_hooks.get_thisthread_last_cpu_location(topology, set, flags);
} else {
- if (topology->binding_hooks.get_thisproc_last_cpu_location)
- return topology->binding_hooks.get_thisproc_last_cpu_location(topology, set, flags);
- else if (topology->binding_hooks.get_thisthread_last_cpu_location)
+ if (topology->binding_hooks.get_thisproc_last_cpu_location) {
+ int err = topology->binding_hooks.get_thisproc_last_cpu_location(topology, set, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.get_thisthread_last_cpu_location)
return topology->binding_hooks.get_thisthread_last_cpu_location(topology, set, flags);
}
@@ -272,9 +284,13 @@ hwloc_set_membind_nodeset(hwloc_topology_t topology, hwloc_const_nodeset_t nodes
if (topology->binding_hooks.set_thisthread_membind)
return topology->binding_hooks.set_thisthread_membind(topology, nodeset, policy, flags);
} else {
- if (topology->binding_hooks.set_thisproc_membind)
- return topology->binding_hooks.set_thisproc_membind(topology, nodeset, policy, flags);
- else if (topology->binding_hooks.set_thisthread_membind)
+ if (topology->binding_hooks.set_thisproc_membind) {
+ int err = topology->binding_hooks.set_thisproc_membind(topology, nodeset, policy, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.set_thisthread_membind)
return topology->binding_hooks.set_thisthread_membind(topology, nodeset, policy, flags);
}
@@ -307,9 +323,13 @@ hwloc_get_membind_nodeset(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hw
if (topology->binding_hooks.get_thisthread_membind)
return topology->binding_hooks.get_thisthread_membind(topology, nodeset, policy, flags);
} else {
- if (topology->binding_hooks.get_thisproc_membind)
- return topology->binding_hooks.get_thisproc_membind(topology, nodeset, policy, flags);
- else if (topology->binding_hooks.get_thisthread_membind)
+ if (topology->binding_hooks.get_thisproc_membind) {
+ int err = topology->binding_hooks.get_thisproc_membind(topology, nodeset, policy, flags);
+ if (err >= 0 || errno != ENOSYS)
+ return err;
+ /* ENOSYS, fallback */
+ }
+ if (topology->binding_hooks.get_thisthread_membind)
return topology->binding_hooks.get_thisthread_membind(topology, nodeset, policy, flags);
}
@@ -447,7 +467,7 @@ hwloc_get_area_membind(hwloc_topology_t topology, const void *addr, size_t len,
void *
hwloc_alloc_heap(hwloc_topology_t topology __hwloc_attribute_unused, size_t len)
{
- void *p;
+ void *p = NULL;
#if defined(hwloc_getpagesize) && defined(HAVE_POSIX_MEMALIGN)
errno = posix_memalign(&p, hwloc_getpagesize(), len);
if (errno)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c
index 1e78a96..d6b5c5e 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c
@@ -241,7 +241,7 @@ int hwloc_bitmap_snprintf(char * __hwloc_restrict buf, size_t buflen, const stru
return -1;
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
}
@@ -291,7 +291,7 @@ int hwloc_bitmap_snprintf(char * __hwloc_restrict buf, size_t buflen, const stru
#endif
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
@@ -422,7 +422,7 @@ int hwloc_bitmap_list_snprintf(char * __hwloc_restrict buf, size_t buflen, const
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
@@ -526,7 +526,7 @@ int hwloc_bitmap_taskset_snprintf(char * __hwloc_restrict buf, size_t buflen, co
return -1;
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
}
@@ -562,7 +562,7 @@ int hwloc_bitmap_taskset_snprintf(char * __hwloc_restrict buf, size_t buflen, co
return -1;
ret += res;
if (res >= size)
- res = size>0 ? size - 1 : 0;
+ res = size>0 ? (int)size - 1 : 0;
tmp += res;
size -= res;
}
@@ -620,7 +620,7 @@ int hwloc_bitmap_taskset_sscanf(struct hwloc_bitmap_s *set, const char * __hwloc
}
/* we know there are other characters now */
- chars = strlen(current);
+ chars = (int)strlen(current);
count = (chars * 4 + HWLOC_BITS_PER_LONG - 1) / HWLOC_BITS_PER_LONG;
hwloc_bitmap_reset_by_ulongs(set, count);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
index dc656e3..aa0c8f9 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/components.c
@@ -520,11 +520,11 @@ hwloc_disc_components_enable_others(struct hwloc_topology *topology)
char c, d;
/* replace libpci with pci for backward compatibility with v1.6 */
- if (!strncmp(curenv, "libpci", s)) {
+ if (!strncmp(curenv, "libpci", 6) && s == 6) {
curenv[0] = curenv[1] = curenv[2] = *HWLOC_COMPONENT_SEPS;
curenv += 3;
s -= 3;
- } else if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, "libpci", s-1)) {
+ } else if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, "libpci", 6) && s == 7 ) {
curenv[3] = curenv[0];
curenv[0] = curenv[1] = curenv[2] = *HWLOC_COMPONENT_SEPS;
curenv += 3;
@@ -583,7 +583,7 @@ nextname:
char *curenv = env;
while (*curenv) {
size_t s = strcspn(curenv, HWLOC_COMPONENT_SEPS);
- if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, comp->name, s-1)) {
+ if (curenv[0] == HWLOC_COMPONENT_EXCLUDE_CHAR && !strncmp(curenv+1, comp->name, s-1) && strlen(comp->name) == s-1) {
if (hwloc_components_verbose)
fprintf(stderr, "Excluding %s discovery component `%s' because of HWLOC_COMPONENTS environment variable\n",
hwloc_disc_component_type_string(comp->type), comp->name);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c
index 01d4e79..367d386 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/pci-common.c
@@ -6,6 +6,7 @@
#include <private/autogen/config.h>
#include <hwloc.h>
#include <hwloc/plugins.h>
+#include <private/private.h>
#include <private/debug.h>
#ifdef HWLOC_DEBUG
@@ -469,7 +470,7 @@ hwloc_pci_find_linkspeed(const unsigned char *config,
* PCIe Gen2 = 5 GT/s signal-rate per lane with 8/10 encoding = 0.5 GB/s data-rate per lane
* PCIe Gen3 = 8 GT/s signal-rate per lane with 128/130 encoding = 1 GB/s data-rate per lane
*/
- lanespeed = speed <= 2 ? 2.5 * speed * 0.8 : 8.0 * 128/130; /* Gbit/s per lane */
+ lanespeed = speed <= 2 ? 2.5f * speed * 0.8f : 8.0f * 128/130; /* Gbit/s per lane */
*linkspeed = lanespeed * width / 8; /* GB/s */
return 0;
}
@@ -499,9 +500,14 @@ hwloc_pci_prepare_bridge(hwloc_obj_t obj,
battr = &obj->attr->bridge;
- if (config[HWLOC_PCI_PRIMARY_BUS] != pattr->bus)
+ if (config[HWLOC_PCI_PRIMARY_BUS] != pattr->bus) {
+ /* Sometimes the config space contains 00 instead of the actual primary bus number.
+ * Always trust the bus ID because it was built by the system which has more information
+ * to workaround such problems (e.g. ACPI information about PCI parent/children).
+ */
hwloc_debug(" %04x:%02x:%02x.%01x bridge with (ignored) invalid PCI_PRIMARY_BUS %02x\n",
pattr->domain, pattr->bus, pattr->dev, pattr->func, config[HWLOC_PCI_PRIMARY_BUS]);
+ }
obj->type = HWLOC_OBJ_BRIDGE;
battr->upstream_type = HWLOC_OBJ_BRIDGE_PCI;
@@ -510,5 +516,21 @@ hwloc_pci_prepare_bridge(hwloc_obj_t obj,
battr->downstream.pci.secondary_bus = config[HWLOC_PCI_SECONDARY_BUS];
battr->downstream.pci.subordinate_bus = config[HWLOC_PCI_SUBORDINATE_BUS];
+ if (battr->downstream.pci.secondary_bus <= pattr->bus
+ || battr->downstream.pci.subordinate_bus <= pattr->bus
+ || battr->downstream.pci.secondary_bus > battr->downstream.pci.subordinate_bus) {
+ /* This should catch most cases of invalid bridge information
+ * (e.g. 00 for secondary and subordinate).
+ * Ideally we would also check that [secondary-subordinate] is included
+ * in the parent bridge [secondary+1:subordinate]. But that's hard to do
+ * because objects may be discovered out of order (especially in the fsroot case).
+ */
+ hwloc_debug(" %04x:%02x:%02x.%01x bridge has invalid secondary-subordinate buses [%02x-%02x]\n",
+ pattr->domain, pattr->bus, pattr->dev, pattr->func,
+ battr->downstream.pci.secondary_bus, battr->downstream.pci.subordinate_bus);
+ hwloc_free_unlinked_object(obj);
+ return -1;
+ }
+
return 0;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c
index 1b98ba6..37812f3 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-aix.c
@@ -585,7 +585,7 @@ hwloc_aix_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_nodes
ret = ra_mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0, R_RSET, rsid, aix_policy);
rs_free(rsid.at_rset);
- return ret;
+ return ret == (void*)-1 ? NULL : ret;
}
#endif /* P_DEFAULT */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
index 1258b65..f3aec62 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-bgq.c
@@ -15,6 +15,8 @@
#include <spi/include/kernel/location.h>
#include <spi/include/kernel/process.h>
+#ifndef HWLOC_DISABLE_BGQ_PORT_TEST
+
static int
hwloc_look_bgq(struct hwloc_backend *backend)
{
@@ -239,3 +241,5 @@ const struct hwloc_component hwloc_bgq_component = {
0,
&hwloc_bgq_disc_component
};
+
+#endif /* !HWLOC_DISABLE_BGQ_PORT_TEST */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c
new file mode 100644
index 0000000..03ffc83
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c
@@ -0,0 +1,191 @@
+/*
+ * Copyright © 2015 Inria. All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+
+#include <hwloc.h>
+#include <private/private.h>
+
+int hwloc_look_hardwired_fujitsu_k(struct hwloc_topology *topology)
+{
+ /* FIXME: what if a broken core is disabled? */
+ unsigned i;
+ hwloc_obj_t obj;
+ hwloc_bitmap_t set;
+
+ for(i=0; i<8; i++) {
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set(set, i);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_INSTRUCTION;
+ obj->attr->cache.depth = 1;
+ obj->attr->cache.size = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_DATA;
+ obj->attr->cache.depth = 1;
+ obj->attr->cache.size = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, i);
+ obj->cpuset = set;
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(set, 0, 7);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ obj->attr->cache.depth = 2;
+ obj->attr->cache.size = 6*1024*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 12;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PACKAGE, 0);
+ obj->cpuset = set;
+ hwloc_obj_add_info(obj, "CPUVendor", "Fujitsu");
+ hwloc_obj_add_info(obj, "CPUModel", "SPARC64 VIIIfx");
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ hwloc_setup_pu_level(topology, 8);
+
+ return 0;
+}
+
+int hwloc_look_hardwired_fujitsu_fx10(struct hwloc_topology *topology)
+{
+ /* FIXME: what if a broken core is disabled? */
+ unsigned i;
+ hwloc_obj_t obj;
+ hwloc_bitmap_t set;
+
+ for(i=0; i<16; i++) {
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set(set, i);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_INSTRUCTION;
+ obj->attr->cache.depth = 1;
+ obj->attr->cache.size = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_DATA;
+ obj->attr->cache.depth = 1;
+ obj->attr->cache.size = 32*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 2;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, i);
+ obj->cpuset = set;
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(set, 0, 15);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ obj->attr->cache.depth = 2;
+ obj->attr->cache.size = 12*1024*1024;
+ obj->attr->cache.linesize = 128;
+ obj->attr->cache.associativity = 24;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PACKAGE, 0);
+ obj->cpuset = set;
+ hwloc_obj_add_info(obj, "CPUVendor", "Fujitsu");
+ hwloc_obj_add_info(obj, "CPUModel", "SPARC64 IXfx");
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ hwloc_setup_pu_level(topology, 16);
+
+ return 0;
+}
+
+int hwloc_look_hardwired_fujitsu_fx100(struct hwloc_topology *topology)
+{
+ /* FIXME: what if a broken core is disabled? */
+ unsigned i;
+ hwloc_obj_t obj;
+ hwloc_bitmap_t set;
+
+ for(i=0; i<34; i++) {
+ set = hwloc_bitmap_alloc();
+ hwloc_bitmap_set(set, i);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_INSTRUCTION;
+ obj->attr->cache.depth = 1;
+ obj->attr->cache.size = 64*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 4;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_dup(set);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_DATA;
+ obj->attr->cache.depth = 1;
+ obj->attr->cache.size = 64*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 4;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CORE, i);
+ obj->cpuset = set;
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(obj->cpuset, 0, 15);
+ hwloc_bitmap_set(obj->cpuset, 32);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ obj->attr->cache.depth = 2;
+ obj->attr->cache.size = 12*1024*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 24;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(obj->cpuset, 16, 31);
+ hwloc_bitmap_set(obj->cpuset, 33);
+ obj->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ obj->attr->cache.depth = 2;
+ obj->attr->cache.size = 12*1024*1024;
+ obj->attr->cache.linesize = 256;
+ obj->attr->cache.associativity = 24;
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PACKAGE, 0);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_set_range(obj->cpuset, 0, 33);
+ hwloc_obj_add_info(obj, "CPUVendor", "Fujitsu");
+ hwloc_obj_add_info(obj, "CPUModel", "SPARC64 XIfx");
+ hwloc_insert_object_by_cpuset(topology, obj);
+
+ hwloc_setup_pu_level(topology, 34);
+
+ return 0;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c
index 44a4a4c..44258cc 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hpux.c
@@ -142,6 +142,7 @@ static void*
hwloc_hpux_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
{
int mmap_flags;
+ void *p;
/* Can not give a set of nodes. */
if (!hwloc_bitmap_isequal(nodeset, hwloc_topology_get_complete_nodeset(topology))) {
@@ -165,7 +166,8 @@ hwloc_hpux_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_node
return NULL;
}
- return mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | mmap_flags, -1, 0);
+ p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | mmap_flags, -1, 0);
+ return p == MAP_FAILED ? NULL : p;
}
#endif /* MAP_MEM_FIRST_TOUCH */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
index 2d9d4da..54490ff 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-linux.c
@@ -1,7 +1,7 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2015 Inria. All rights reserved.
- * Copyright © 2009-2013 Université Bordeaux
+ * Copyright © 2009-2013, 2015 Université Bordeaux
* Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
* Copyright © 2015 Intel, Inc. All rights reserved.
* Copyright © 2010 IBM
@@ -47,7 +47,8 @@ struct hwloc_linux_backend_data_s {
#ifdef HAVE_LIBUDEV_H
struct udev *udev; /* Global udev context */
#endif
-
+ char *dumped_hwdata_dirname;
+ int is_knl;
struct utsname utsname; /* fields contain \0 when unknown */
int deprecated_classlinks_model; /* -2 if never tried, -1 if unknown, 0 if new (device contains class/name), 1 if old (device contains class:name) */
@@ -61,8 +62,8 @@ struct hwloc_linux_backend_data_s {
* Misc Abstraction layers *
***************************/
-#if !(defined HWLOC_HAVE_SCHED_SETAFFINITY) && (defined HWLOC_HAVE__SYSCALL3)
-/* libc doesn't have support for sched_setaffinity, build system call
+#if !(defined HWLOC_HAVE_SCHED_SETAFFINITY) && (defined HWLOC_HAVE_SYSCALL)
+/* libc doesn't have support for sched_setaffinity, make system call
* ourselves: */
# include <linux/unistd.h>
# ifndef __NR_sched_setaffinity
@@ -96,7 +97,7 @@ struct hwloc_linux_backend_data_s {
# endif
# endif
# ifndef sched_setaffinity
- _syscall3(int, sched_setaffinity, pid_t, pid, unsigned int, lg, const void *, mask)
+# define sched_setaffinity(pid, lg, mask) syscall(__NR_sched_setaffinity, pid, lg, mask)
# endif
# ifndef __NR_sched_getaffinity
# ifdef __i386__
@@ -129,7 +130,7 @@ struct hwloc_linux_backend_data_s {
# endif
# endif
# ifndef sched_getaffinity
- _syscall3(int, sched_getaffinity, pid_t, pid, unsigned int, lg, void *, mask)
+# define sched_getaffinity(pid, lg, mask) (syscall(__NR_sched_getaffinity, pid, lg, mask) < 0 ? -1 : 0)
# endif
#endif
@@ -347,7 +348,7 @@ hwloc_linux_set_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
#else /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
return sched_setaffinity(tid, sizeof(linux_set), &linux_set);
#endif /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
-#elif defined(HWLOC_HAVE__SYSCALL3)
+#elif defined(HWLOC_HAVE_SYSCALL)
unsigned long mask = hwloc_bitmap_to_ulong(hwloc_set);
#ifdef HWLOC_HAVE_OLD_SCHED_SETAFFINITY
@@ -355,10 +356,10 @@ hwloc_linux_set_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
#else /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
return sched_setaffinity(tid, sizeof(mask), (void*) &mask);
#endif /* HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
-#else /* !_SYSCALL3 */
+#else /* !SYSCALL */
errno = ENOSYS;
return -1;
-#endif /* !_SYSCALL3 */
+#endif /* !SYSCALL */
}
#if defined(HWLOC_HAVE_CPU_SET_S) && !defined(HWLOC_HAVE_OLD_SCHED_SETAFFINITY)
@@ -427,7 +428,7 @@ hwloc_linux_find_kernel_nr_cpus(hwloc_topology_t topology)
/* start from scratch, the topology isn't ready yet (complete_cpuset is missing (-1) or empty (0))*/
nr_cpus = 1;
- possible = fopen("/sys/devices/system/cpu/possible", "r");
+ possible = fopen("/sys/devices/system/cpu/possible", "r"); /* binding only supported in real fsroot, no need for data->root_fd */
if (possible) {
hwloc_bitmap_t possible_bitmap = hwloc_bitmap_alloc();
if (hwloc_linux_parse_cpuset_file(possible, possible_bitmap) == 0) {
@@ -510,7 +511,7 @@ hwloc_linux_get_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
for(cpu=0; cpu<CPU_SETSIZE; cpu++)
if (CPU_ISSET(cpu, &linux_set))
hwloc_bitmap_set(hwloc_set, cpu);
-#elif defined(HWLOC_HAVE__SYSCALL3)
+#elif defined(HWLOC_HAVE_SYSCALL)
unsigned long mask;
#ifdef HWLOC_HAVE_OLD_SCHED_SETAFFINITY
@@ -522,10 +523,10 @@ hwloc_linux_get_tid_cpubind(hwloc_topology_t topology __hwloc_attribute_unused,
return -1;
hwloc_bitmap_from_ulong(hwloc_set, mask);
-#else /* !_SYSCALL3 */
+#else /* !SYSCALL */
errno = ENOSYS;
return -1;
-#endif /* !_SYSCALL3 */
+#endif /* !SYSCALL */
return 0;
}
@@ -2801,6 +2802,96 @@ look_powerpc_device_tree(struct hwloc_topology *topology,
free(cpus.p);
}
+/* Try to add memory-side caches for KNL.
+ * Returns 0 on success and -1 otherwise */
+static int hwloc_linux_try_add_knl_mcdram_caches(hwloc_topology_t topology, struct hwloc_linux_backend_data_s *data, hwloc_obj_t *nodes, unsigned nbnodes)
+{
+ char *knl_cache_file;
+ long long int cache_size = -1;
+ int associativity = -1;
+ int inclusiveness = -1;
+ int line_size = -1;
+ unsigned i;
+ FILE *f;
+ char buffer[512] = {0};
+ char *data_beg = NULL;
+ char *data_end = NULL;
+
+ if (asprintf(&knl_cache_file, "%s/knl_memoryside_cache", data->dumped_hwdata_dirname) < 0)
+ return -1;
+
+ hwloc_debug("Reading knl cache data from: %s\n", knl_cache_file);
+ f = hwloc_fopen(knl_cache_file, "r", data->root_fd);
+ if (!f) {
+ hwloc_debug("Unable to open KNL data file `%s' (%s)\n", knl_cache_file, strerror(errno));
+ free(knl_cache_file);
+ return -1;
+ }
+ free(knl_cache_file);
+
+ data_beg = &buffer[0];
+ data_end = data_beg + fread(buffer, 1, sizeof(buffer), f);
+
+ /* file must start with version information, only 1 accepted for now */
+ if (strncmp("version: 1\n", data_beg, strlen("version: 1\n"))) {
+ fprintf(stderr, "Invalid knl_memoryside_cache header, expected \"version: 1\".\n");
+ fclose(f);
+ return -1;
+ }
+ data_beg += strlen("version: 1\n");
+
+ while (data_beg < data_end) {
+ char *line_end = strstr(data_beg, "\n");
+ if (!line_end)
+ break;
+ if (!strncmp("cache_size:", data_beg, strlen("cache_size"))) {
+ sscanf(data_beg, "cache_size: %lld", &cache_size);
+ hwloc_debug("read cache_size=%lld\n", cache_size);
+ } else if (!strncmp("line_size:", data_beg, strlen("line_size:"))) {
+ sscanf(data_beg, "line_size: %d", &line_size);
+ hwloc_debug("read line_size=%d\n", line_size);
+ } else if (!strncmp("inclusiveness:", data_beg, strlen("inclusiveness:"))) {
+ sscanf(data_beg, "inclusiveness: %d", &inclusiveness);
+ hwloc_debug("read inclusiveness=%d\n", inclusiveness);
+ } else if (!strncmp("associativity:", data_beg, strlen("associativity:"))) {
+ sscanf(data_beg, "associativity: %d\n", &associativity);
+ hwloc_debug("read associativity=%d\n", associativity);
+ }
+ data_beg += line_end - data_beg +1;
+ }
+
+ fclose(f);
+
+ if (line_size == -1 || cache_size == -1 || associativity == -1 || inclusiveness == -1) {
+ hwloc_debug("Incorrect file format line_size=%d cache_size=%lld associativity=%d inclusiveness=%d\n",
+ line_size, cache_size, associativity, inclusiveness);
+ return -1;
+ }
+
+ for(i=0; i<nbnodes; i++) {
+ hwloc_obj_t cache;
+
+ if (hwloc_bitmap_iszero(nodes[i]->cpuset))
+ /* one L3 per DDR, none for MCDRAM nodes */
+ continue;
+
+ cache = hwloc_alloc_setup_object(HWLOC_OBJ_CACHE, -1);
+ if (!cache)
+ return -1;
+
+ cache->attr->cache.depth = 3;
+ cache->attr->cache.type = HWLOC_OBJ_CACHE_UNIFIED;
+ cache->attr->cache.associativity = associativity;
+ hwloc_obj_add_info(cache, "Inclusive", inclusiveness ? "1" : "0");
+ cache->attr->cache.size = cache_size;
+ cache->attr->cache.linesize = line_size;
+ cache->cpuset = hwloc_bitmap_dup(nodes[i]->cpuset);
+ hwloc_obj_add_info(cache, "Type", "MemorySideCache");
+ hwloc_insert_object_by_cpuset(topology, cache);
+ }
+ return 0;
+}
+
/**************************************
@@ -2838,18 +2929,17 @@ look_sysfsnode(struct hwloc_topology *topology,
else
return -1;
- if (nbnodes <= 1)
- {
- hwloc_bitmap_free(nodeset);
- return 0;
- }
+ if (!nbnodes || (nbnodes == 1 && !data->is_knl)) { /* always keep NUMA for KNL, or configs might look too different */
+ hwloc_bitmap_free(nodeset);
+ return 0;
+ }
/* For convenience, put these declarations inside a block. */
{
hwloc_obj_t * nodes = calloc(nbnodes, sizeof(hwloc_obj_t));
unsigned *indexes = calloc(nbnodes, sizeof(unsigned));
- float * distances;
+ float * distances = NULL;
int failednodes = 0;
unsigned index_;
@@ -2886,6 +2976,7 @@ look_sysfsnode(struct hwloc_topology *topology,
char nodepath[SYSFS_NUMA_NODE_PATH_LEN];
hwloc_bitmap_t cpuset;
hwloc_obj_t node, res_obj;
+ int annotate;
osnode = indexes[index_];
@@ -2897,32 +2988,43 @@ look_sysfsnode(struct hwloc_topology *topology,
continue;
}
- node = hwloc_alloc_setup_object(HWLOC_OBJ_NUMANODE, osnode);
- node->cpuset = cpuset;
- node->nodeset = hwloc_bitmap_alloc();
- hwloc_bitmap_set(node->nodeset, osnode);
-
+ node = hwloc_get_numanode_obj_by_os_index(topology, osnode);
+ annotate = (node != NULL);
+ if (!annotate) {
+ /* create a new node */
+ node = hwloc_alloc_setup_object(HWLOC_OBJ_NUMANODE, osnode);
+ node->cpuset = cpuset;
+ node->nodeset = hwloc_bitmap_alloc();
+ hwloc_bitmap_set(node->nodeset, osnode);
+ }
hwloc_sysfs_node_meminfo_info(topology, data, path, osnode, &node->memory);
hwloc_debug_1arg_bitmap("os node %u has cpuset %s\n",
osnode, node->cpuset);
- res_obj = hwloc_insert_object_by_cpuset(topology, node);
- if (node == res_obj) {
+
+ if (annotate) {
nodes[index_] = node;
} else {
- /* We got merged somehow, could be a buggy BIOS reporting wrong NUMA node cpuset.
- * This object disappeared, we'll ignore distances */
- failednodes++;
+ res_obj = hwloc_insert_object_by_cpuset(topology, node);
+ if (node == res_obj) {
+ nodes[index_] = node;
+ } else {
+ /* We got merged somehow, could be a buggy BIOS reporting wrong NUMA node cpuset.
+ * This object disappeared, we'll ignore distances */
+ failednodes++;
+ }
}
}
+ if (!failednodes && data->is_knl)
+ hwloc_linux_try_add_knl_mcdram_caches(topology, data, nodes, nbnodes);
+
if (failednodes) {
/* failed to read/create some nodes, don't bother reading/fixing
* a distance matrix that would likely be wrong anyway.
*/
nbnodes -= failednodes;
- distances = NULL;
- } else {
+ } else if (nbnodes > 1) {
distances = calloc(nbnodes*nbnodes, sizeof(float));
}
@@ -2944,6 +3046,46 @@ look_sysfsnode(struct hwloc_topology *topology,
hwloc_parse_node_distance(nodepath, nbnodes, distances+index_*nbnodes, data->root_fd);
}
+ if (data->is_knl) {
+ char *env = getenv("HWLOC_KNL_NUMA_QUIRK");
+ if (!(env && !atoi(env)) && nbnodes>=2) { /* SNC2 or SNC4, with 0 or 2/4 MCDRAM, and 0-4 DDR nodes */
+ unsigned i, j, closest;
+ for(i=0; i<nbnodes; i++) {
+ if (!hwloc_bitmap_iszero(nodes[i]->cpuset))
+ /* nodes with CPU, that's DDR, skip it */
+ continue;
+ hwloc_obj_add_info(nodes[i], "Type", "MCDRAM");
+
+ /* DDR is the closest node with CPUs */
+ closest = (unsigned)-1;
+ for(j=0; j<nbnodes; j++) {
+ if (j==i)
+ continue;
+ if (hwloc_bitmap_iszero(nodes[j]->cpuset))
+ /* nodes without CPU, that's another MCDRAM, skip it */
+ continue;
+ if (closest == (unsigned)-1 || distances[i*nbnodes+j]<distances[i*nbnodes+closest])
+ closest = j;
+ }
+ if (closest != (unsigned) -1) {
+ /* Add a Group for Cluster containing this MCDRAM + DDR */
+ hwloc_obj_t cluster = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, -1);
+ cluster->cpuset = hwloc_bitmap_dup(nodes[i]->cpuset);
+ cluster->nodeset = hwloc_bitmap_dup(nodes[i]->nodeset);
+ hwloc_bitmap_or(cluster->cpuset, cluster->cpuset, nodes[closest]->cpuset);
+ hwloc_bitmap_or(cluster->nodeset, cluster->nodeset, nodes[closest]->nodeset);
+ hwloc_obj_add_info(cluster, "Type", "Cluster");
+ hwloc_insert_object_by_cpuset(topology, cluster);
+ }
+ }
+ /* drop the distance matrix, it contradicts the above NUMA layout groups */
+ free(distances);
+ free(nodes);
+ free(indexes);
+ goto out;
+ }
+ }
+
hwloc_distances_set(topology, HWLOC_OBJ_NUMANODE, nbnodes, indexes, nodes, distances, 0 /* OS cannot force */);
}
@@ -3134,11 +3276,11 @@ package_done:
hwloc_bitmap_set(core->cpuset, i);
} else {
core->cpuset = coreset;
+ coreset = NULL; /* don't free it */
}
hwloc_debug_1arg_bitmap("os core %u has cpuset %s\n",
- mycoreid, coreset);
+ mycoreid, core->cpuset);
hwloc_insert_object_by_cpuset(topology, core);
- coreset = NULL; /* don't free it */
}
/* look at the books */
@@ -3224,6 +3366,11 @@ package_done:
kB = atol(str2); /* in kB */
fclose(fd);
}
+ /* KNL reports L3 with size=0 and full cpuset in cpuid.
+ * Let hwloc_linux_try_add_knl_mcdram_cache() detect it better.
+ */
+ if (!kB && depth == 2 && data->is_knl)
+ continue;
/* get the line size */
sprintf(mappath, "%s/cpu%d/cache/index%d/coherency_line_size", path, i, j);
@@ -3459,6 +3606,7 @@ hwloc_linux_parse_cpuinfo_generic(const char *prefix, const char *value,
return 0;
}
+/* Lprocs_p set to NULL unless returns > 0 */
static int
hwloc_linux_parse_cpuinfo(struct hwloc_linux_backend_data_s *data,
const char *path,
@@ -3606,6 +3754,7 @@ hwloc_linux_parse_cpuinfo(struct hwloc_linux_backend_data_s *data,
fclose(fd);
free(str);
free(Lprocs);
+ *Lprocs_p = NULL;
return -1;
}
@@ -3625,18 +3774,13 @@ hwloc_linux_free_cpuinfo(struct hwloc_linux_cpuinfo_proc * Lprocs, unsigned nump
static int
look_cpuinfo(struct hwloc_topology *topology,
- struct hwloc_linux_backend_data_s *data,
- const char *path, hwloc_bitmap_t online_cpuset)
+ struct hwloc_linux_cpuinfo_proc * Lprocs,
+ unsigned numprocs, hwloc_bitmap_t online_cpuset)
{
- struct hwloc_linux_cpuinfo_proc * Lprocs = NULL;
- struct hwloc_obj_info_s *global_infos = NULL;
- unsigned global_infos_count = 0;
/* P for physical/OS index, L for logical (e.g. in we order we get them, not in the final hwloc logical order) */
unsigned *Lcore_to_Pcore;
unsigned *Lcore_to_Ppkg; /* needed because Lcore is equivalent to Pcore+Ppkg, not to Pcore alone */
unsigned *Lpkg_to_Ppkg;
- int _numprocs;
- unsigned numprocs;
unsigned numpkgs=0;
unsigned numcores=0;
unsigned long Lproc;
@@ -3645,20 +3789,6 @@ look_cpuinfo(struct hwloc_topology *topology,
unsigned i,j;
hwloc_bitmap_t cpuset;
- /* parse the entire cpuinfo first, fill the Lprocs array and numprocs */
- _numprocs = hwloc_linux_parse_cpuinfo(data, path, &Lprocs, &global_infos, &global_infos_count);
-
-
- /* setup root info */
- hwloc__move_infos(&hwloc_get_root_obj(topology)->infos, &hwloc_get_root_obj(topology)->infos_count,
- &global_infos, &global_infos_count);
-
-
- if (_numprocs <= 0)
- /* found no processor */
- return -1;
- numprocs = _numprocs;
-
/* initialize misc arrays, there can be at most numprocs entries */
Lcore_to_Pcore = malloc(numprocs * sizeof(*Lcore_to_Pcore));
Lcore_to_Ppkg = malloc(numprocs * sizeof(*Lcore_to_Ppkg));
@@ -3713,7 +3843,7 @@ look_cpuinfo(struct hwloc_topology *topology,
* provide bogus information. We should rather drop it. */
missingpkg=0;
for(j=0; j<numprocs; j++)
- if (Lprocs[i].Ppkg == -1) {
+ if (Lprocs[j].Ppkg == -1) {
missingpkg=1;
break;
}
@@ -3757,7 +3887,7 @@ look_cpuinfo(struct hwloc_topology *topology,
* provide bogus information. We should rather drop it. */
missingcore=0;
for(j=0; j<numprocs; j++)
- if (Lprocs[i].Pcore == -1) {
+ if (Lprocs[j].Pcore == -1) {
missingcore=1;
break;
}
@@ -3779,10 +3909,6 @@ look_cpuinfo(struct hwloc_topology *topology,
free(Lcore_to_Pcore);
free(Lcore_to_Ppkg);
free(Lpkg_to_Ppkg);
-
- hwloc_linux_free_cpuinfo(Lprocs, numprocs, global_infos, global_infos_count);
-
- look_powerpc_device_tree(topology, data);
return 0;
}
@@ -3898,6 +4024,52 @@ hwloc_gather_system_info(struct hwloc_topology *topology,
}
}
+/* returns 0 on success, -1 on non-match or error during hardwired load */
+static int
+hwloc_linux_try_hardwired_cpuinfo(struct hwloc_backend *backend)
+{
+ struct hwloc_topology *topology = backend->topology;
+ struct hwloc_linux_backend_data_s *data = backend->private_data;
+ FILE *fd;
+ char line[128];
+
+ if (getenv("HWLOC_NO_HARDWIRED_TOPOLOGY"))
+ return -1;
+
+ if (!strcmp(data->utsname.machine, "s64fx")) {
+ /* Fujistu K-computer, FX10, and FX100 use specific processors
+ * whose Linux topology support is broken until 4.1 (acc455cffa75070d55e74fc7802b49edbc080e92and)
+ * and existing machines will likely never be fixed by kernel upgrade.
+ */
+
+ /* /proc/cpuinfo starts with one of these lines:
+ * "cpu : Fujitsu SPARC64 VIIIfx"
+ * "cpu : Fujitsu SPARC64 XIfx"
+ * "cpu : Fujitsu SPARC64 IXfx"
+ */
+ fd = hwloc_fopen("/proc/cpuinfo", "r", data->root_fd);
+ if (!fd)
+ return -1;
+
+ if (!fgets(line, sizeof(line), fd)) {
+ fclose(fd);
+ return -1;
+ }
+ fclose(fd);
+
+ if (strncmp(line, "cpu ", 4))
+ return -1;
+
+ if (strstr(line, "Fujitsu SPARC64 VIIIfx"))
+ return hwloc_look_hardwired_fujitsu_k(topology);
+ else if (strstr(line, "Fujitsu SPARC64 IXfx"))
+ return hwloc_look_hardwired_fujitsu_fx10(topology);
+ else if (strstr(line, "FUJITSU SPARC64 XIfx"))
+ return hwloc_look_hardwired_fujitsu_fx100(topology);
+ }
+ return -1;
+}
+
static int
hwloc_look_linuxfs(struct hwloc_backend *backend)
{
@@ -3906,17 +4078,58 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
DIR *nodes_dir;
unsigned nbnodes;
char *cpuset_mntpnt, *cgroup_mntpnt, *cpuset_name = NULL;
+ struct hwloc_linux_cpuinfo_proc * Lprocs = NULL;
+ struct hwloc_obj_info_s *global_infos = NULL;
+ unsigned global_infos_count = 0;
+ int numprocs = 0;
+ int already_pus;
int err;
- if (topology->levels[0][0]->cpuset)
- /* somebody discovered things */
- return 0;
+ already_pus = (topology->levels[0][0]->complete_cpuset != NULL
+ && !hwloc_bitmap_iszero(topology->levels[0][0]->complete_cpuset));
+ /* if there are PUs, still look at memory information
+ * since x86 misses NUMA node information (unless the processor supports topoext)
+ * memory size.
+ */
+
+ /* allocate root sets in case not done yet */
+ hwloc_alloc_obj_cpusets(topology->levels[0][0]);
+ /*********************************
+ * Platform information for later
+ */
hwloc_gather_system_info(topology, data);
- hwloc_alloc_obj_cpusets(topology->levels[0][0]);
+ /**********************
+ * /proc/cpuinfo
+ */
+ numprocs = hwloc_linux_parse_cpuinfo(data, "/proc/cpuinfo", &Lprocs, &global_infos, &global_infos_count);
- /* Gather the list of admin-disabled cpus and mems */
+ /* detect models for quirks */
+ if (numprocs > 0) {
+ /* KNL */
+ if (!strncmp(data->utsname.machine, "x86", 3)) { /* supports 32bits? */
+ unsigned i;
+ const char *cpuvendor = NULL, *cpufamilynumber = NULL, *cpumodelnumber = NULL;
+ for(i=0; i<Lprocs[0].infos_count; i++) {
+ if (!strcmp(Lprocs[0].infos[i].name, "CPUVendor")) {
+ cpuvendor = Lprocs[0].infos[i].value;
+ } else if (!strcmp(Lprocs[0].infos[i].name, "CPUFamilyNumber")) {
+ cpufamilynumber = Lprocs[0].infos[i].value;
+ } else if (!strcmp(Lprocs[0].infos[i].name, "CPUModelNumber")) {
+ cpumodelnumber = Lprocs[0].infos[i].value;
+ }
+ }
+ if (cpuvendor && !strcmp(cpuvendor, "GenuineIntel")
+ && cpufamilynumber && !strcmp(cpufamilynumber, "6")
+ && cpumodelnumber && !strcmp(cpumodelnumber, "87"))
+ data->is_knl = 1;
+ }
+ }
+
+ /**********************
+ * Gather the list of admin-disabled cpus and mems
+ */
hwloc_find_linux_cpuset_mntpnt(&cgroup_mntpnt, &cpuset_mntpnt, data->root_fd);
if (cgroup_mntpnt || cpuset_mntpnt) {
cpuset_name = hwloc_read_linux_cpuset_name(data->root_fd, topology->pid);
@@ -3936,6 +4149,10 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
hwloc_obj_t machine;
hwloc_bitmap_t machine_online_set;
+ if (already_pus)
+ /* we don't support extending kerrighed topologies */
+ return 0;
+
/* replace top-level object type with SYSTEM and add some MACHINE underneath */
topology->levels[0][0]->type = HWLOC_OBJ_SYSTEM;
@@ -3944,13 +4161,19 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
/* No cpuset support for now. */
/* No sys support for now. */
while ((dirent = readdir(nodes_dir)) != NULL) {
+ struct hwloc_linux_cpuinfo_proc * machine_Lprocs = NULL;
+ struct hwloc_obj_info_s *machine_global_infos = NULL;
+ unsigned machine_global_infos_count = 0;
+ int machine_numprocs = 0;
unsigned long node;
if (strncmp(dirent->d_name, "node", 4))
continue;
machine_online_set = hwloc_bitmap_alloc();
node = strtoul(dirent->d_name+4, NULL, 0);
snprintf(path, sizeof(path), "/proc/nodes/node%lu/cpuinfo", node);
- err = look_cpuinfo(topology, data, path, machine_online_set);
+ machine_numprocs = hwloc_linux_parse_cpuinfo(data, path, &machine_Lprocs, &machine_global_infos, &machine_global_infos_count);
+ err = look_cpuinfo(topology, machine_Lprocs, machine_numprocs, machine_online_set);
+ hwloc_linux_free_cpuinfo(machine_Lprocs, machine_numprocs, machine_global_infos, machine_global_infos_count);
if (err < 0) {
hwloc_bitmap_free(machine_online_set);
continue;
@@ -3972,6 +4195,10 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
}
closedir(nodes_dir);
} else {
+ /*********************
+ * Memory information
+ */
+
/* Get the machine memory attributes */
hwloc_get_procfs_meminfo_info(topology, data, &topology->levels[0][0]->memory);
@@ -3988,7 +4215,23 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
topology->levels[0][0]->memory.page_types[i].count = 0;
}
+ /**********************
+ * CPU information
+ */
+
+ /* Don't rediscover CPU resources if already done */
+ if (already_pus)
+ goto done;
+
/* Gather the list of cpus now */
+ err = hwloc_linux_try_hardwired_cpuinfo(backend);
+ if (!err)
+ goto done;
+
+ /* setup root info */
+ hwloc__move_infos(&hwloc_get_root_obj(topology)->infos, &hwloc_get_root_obj(topology)->infos_count,
+ &global_infos, &global_infos_count);
+
if (getenv("HWLOC_LINUX_USE_CPUINFO")
|| (hwloc_access("/sys/devices/system/cpu/cpu0/topology/core_siblings", R_OK, data->root_fd) < 0
&& hwloc_access("/sys/devices/system/cpu/cpu0/topology/thread_siblings", R_OK, data->root_fd) < 0
@@ -3996,26 +4239,28 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
&& hwloc_access("/sys/bus/cpu/devices/cpu0/topology/core_siblings", R_OK, data->root_fd) < 0)) {
/* revert to reading cpuinfo only if /sys/.../topology unavailable (before 2.6.16)
* or not containing anything interesting */
- err = look_cpuinfo(topology, data, "/proc/cpuinfo", topology->levels[0][0]->online_cpuset);
+ if (numprocs > 0)
+ err = look_cpuinfo(topology, Lprocs, numprocs, topology->levels[0][0]->online_cpuset);
+ else
+ err = -1;
if (err < 0)
hwloc_linux_fallback_pu_level(topology);
+ look_powerpc_device_tree(topology, data);
} else {
- struct hwloc_linux_cpuinfo_proc * Lprocs = NULL;
- struct hwloc_obj_info_s *global_infos = NULL;
- unsigned global_infos_count = 0;
- int numprocs = hwloc_linux_parse_cpuinfo(data, "/proc/cpuinfo", &Lprocs, &global_infos, &global_infos_count);
- if (numprocs <= 0)
- Lprocs = NULL;
+ /* sysfs */
if (look_sysfscpu(topology, data, "/sys/bus/cpu/devices", Lprocs, numprocs) < 0)
if (look_sysfscpu(topology, data, "/sys/devices/system/cpu", Lprocs, numprocs) < 0)
/* sysfs but we failed to read cpu topology, fallback */
hwloc_linux_fallback_pu_level(topology);
- hwloc__move_infos(&hwloc_get_root_obj(topology)->infos, &hwloc_get_root_obj(topology)->infos_count,
- &global_infos, &global_infos_count);
- hwloc_linux_free_cpuinfo(Lprocs, numprocs, global_infos, global_infos_count);
}
+ done:
+
+ /**********************
+ * Misc
+ */
+
/* Gather DMI info */
hwloc__get_dmi_id_info(data, topology->levels[0][0]);
if (hwloc_topology_get_flags(topology) & (HWLOC_TOPOLOGY_FLAG_IO_DEVICES|HWLOC_TOPOLOGY_FLAG_WHOLE_IO))
@@ -4033,6 +4278,7 @@ hwloc_look_linuxfs(struct hwloc_backend *backend)
/* data->utsname was filled with real uname or \0, we can safely pass it */
hwloc_add_uname_info(topology, &data->utsname);
+ hwloc_linux_free_cpuinfo(Lprocs, numprocs, global_infos, global_infos_count);
return 1;
}
@@ -4413,20 +4659,30 @@ hwloc_linux_block_class_fillinfos(struct hwloc_backend *backend,
if (!dev)
return;
prop = udev_device_get_property_value(dev, "ID_VENDOR");
- if (prop)
- strcpy(vendor, prop);
+ if (prop) {
+ strncpy(vendor, prop, sizeof(vendor));
+ vendor[sizeof(vendor)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_MODEL");
- if (prop)
- strcpy(model, prop);
+ if (prop) {
+ strncpy(model, prop, sizeof(model));
+ model[sizeof(model)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_REVISION");
- if (prop)
- strcpy(revision, prop);
+ if (prop) {
+ strncpy(revision, prop, sizeof(revision));
+ revision[sizeof(revision)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_SERIAL_SHORT");
- if (prop)
- strcpy(serial, prop);
+ if (prop) {
+ strncpy(serial, prop, sizeof(serial));
+ serial[sizeof(serial)-1] = '\0';
+ }
prop = udev_device_get_property_value(dev, "ID_TYPE");
- if (prop)
- strcpy(blocktype, prop);
+ if (prop) {
+ strncpy(blocktype, prop, sizeof(blocktype));
+ blocktype[sizeof(blocktype)-1] = '\0';
+ }
udev_device_unref(dev);
} else
@@ -4443,15 +4699,20 @@ hwloc_linux_block_class_fillinfos(struct hwloc_backend *backend,
if (tmp)
*tmp = '\0';
if (!strncmp(line, "E:ID_VENDOR=", strlen("E:ID_VENDOR="))) {
- strcpy(vendor, line+strlen("E:ID_VENDOR="));
+ strncpy(vendor, line+strlen("E:ID_VENDOR="), sizeof(vendor));
+ vendor[sizeof(vendor)-1] = '\0';
} else if (!strncmp(line, "E:ID_MODEL=", strlen("E:ID_MODEL="))) {
- strcpy(model, line+strlen("E:ID_MODEL="));
+ strncpy(model, line+strlen("E:ID_MODEL="), sizeof(model));
+ model[sizeof(model)-1] = '\0';
} else if (!strncmp(line, "E:ID_REVISION=", strlen("E:ID_REVISION="))) {
- strcpy(revision, line+strlen("E:ID_REVISION="));
+ strncpy(revision, line+strlen("E:ID_REVISION="), sizeof(revision));
+ revision[sizeof(revision)-1] = '\0';
} else if (!strncmp(line, "E:ID_SERIAL_SHORT=", strlen("E:ID_SERIAL_SHORT="))) {
- strcpy(serial, line+strlen("E:ID_SERIAL_SHORT="));
+ strncpy(serial, line+strlen("E:ID_SERIAL_SHORT="), sizeof(serial));
+ serial[sizeof(serial)-1] = '\0';
} else if (!strncmp(line, "E:ID_TYPE=", strlen("E:ID_TYPE="))) {
- strcpy(blocktype, line+strlen("E:ID_TYPE="));
+ strncpy(blocktype, line+strlen("E:ID_TYPE="), sizeof(blocktype));
+ blocktype[sizeof(blocktype)-1] = '\0';
}
}
fclose(fd);
@@ -4592,6 +4853,14 @@ hwloc_linux_lookup_block_class(struct hwloc_backend *backend,
strcpy(path, pcidevpath);
pathlen = strlen(path);
+ /* look for a direct block device here (such as NVMe, something without controller subdirs in the middle) */
+ res += hwloc_linux_class_readdir(backend, pcidev, path,
+ HWLOC_OBJ_OSDEV_BLOCK, "block",
+ hwloc_linux_block_class_fillinfos);
+ if (res)
+ return res;
+ /* otherwise try to find controller subdirectories */
+
devicedir = hwloc_opendir(pcidevpath, root_fd);
if (!devicedir)
return 0;
@@ -4772,7 +5041,7 @@ hwloc_linux_directlookup_mic_class(struct hwloc_backend *backend,
/* read the entire class and find the max id of mic%u dirents */
dir = hwloc_opendir("/sys/devices/virtual/mic", root_fd);
if (!dir) {
- dir = opendir("/sys/class/mic");
+ dir = hwloc_opendir("/sys/class/mic", root_fd);
if (!dir)
return 0;
}
@@ -4919,12 +5188,14 @@ hwloc_linux_component_instantiate(struct hwloc_disc_component *component,
}
backend->private_data = data;
+ backend->flags = HWLOC_BACKEND_FLAG_NEED_LEVELS;
backend->discover = hwloc_look_linuxfs;
backend->get_obj_cpuset = hwloc_linux_backend_get_obj_cpuset;
backend->notify_new_object = hwloc_linux_backend_notify_new_object;
backend->disable = hwloc_linux_backend_disable;
/* default values */
+ data->is_knl = 0;
data->is_real_fsroot = 1;
if (!fsroot_path)
fsroot_path = "/";
@@ -4964,6 +5235,10 @@ hwloc_linux_component_instantiate(struct hwloc_disc_component *component,
}
#endif
+ data->dumped_hwdata_dirname = getenv("HWLOC_DUMPED_HWDATA_DIR");
+ if (!data->dumped_hwdata_dirname)
+ data->dumped_hwdata_dirname = "/var/run/hwloc/";
+
data->deprecated_classlinks_model = -2; /* never tried */
data->mic_need_directlookup = -1; /* not initialized */
data->mic_directlookup_id_max = -1; /* not initialized */
@@ -5134,7 +5409,8 @@ hwloc_look_linuxfs_pci(struct hwloc_backend *backend)
fclose(file);
/* is this a bridge? */
- hwloc_pci_prepare_bridge(obj, config_space_cache);
+ if (hwloc_pci_prepare_bridge(obj, config_space_cache) < 0)
+ continue;
/* get the revision */
attr->revision = config_space_cache[HWLOC_PCI_REVISION_ID];
@@ -5170,10 +5446,8 @@ hwloc_look_linuxfs_pci(struct hwloc_backend *backend)
while (obj) {
if (obj->attr->pcidev.domain == domain
&& obj->attr->pcidev.bus == bus
- && obj->attr->pcidev.dev == dev
- && obj->attr->pcidev.func == 0) {
+ && obj->attr->pcidev.dev == dev) {
hwloc_obj_add_info(obj, "PCISlot", dirent->d_name);
- break;
}
obj = obj->next_sibling;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c
index 5715888..b403d13 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-osf.c
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -234,7 +234,7 @@ hwloc_osf_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_nodes
ptr = nmmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1,
0, &mattr);
radsetdestroy(&mattr.mattr_radset);
- return ptr;
+ return ptr == MAP_FAILED ? NULL : ptr;
}
static int
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
index 3a3ad6b..779bf17 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-pci.c
@@ -1,8 +1,10 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011, 2013 Université Bordeaux
* Copyright © 2014 Cisco Systems, Inc. All rights reserved.
+ * Copyright © 2015 Research Organization for Information Science
+ * and Technology (RIST). All rights reserved.
* See COPYING in top-level directory.
*/
@@ -206,7 +208,8 @@ hwloc_look_pci(struct hwloc_backend *backend)
if (offset > 0 && offset + 20 /* size of PCI express block up to link status */ <= CONFIG_SPACE_CACHESIZE)
hwloc_pci_find_linkspeed(config_space_cache, offset, &obj->attr->pcidev.linkspeed);
- hwloc_pci_prepare_bridge(obj, config_space_cache);
+ if (hwloc_pci_prepare_bridge(obj, config_space_cache) < 0)
+ continue;
if (obj->type == HWLOC_OBJ_PCI_DEVICE) {
memcpy(&tmp16, &config_space_cache[PCI_SUBSYSTEM_VENDOR_ID], sizeof(tmp16));
@@ -273,10 +276,8 @@ hwloc_look_pci(struct hwloc_backend *backend)
while (obj) {
if (obj->attr->pcidev.domain == domain
&& obj->attr->pcidev.bus == bus
- && obj->attr->pcidev.dev == dev
- && obj->attr->pcidev.func == 0) {
+ && obj->attr->pcidev.dev == dev) {
hwloc_obj_add_info(obj, "PCISlot", dirent->d_name);
- break;
}
obj = obj->next_sibling;
}
@@ -305,7 +306,12 @@ hwloc_pci_component_instantiate(struct hwloc_disc_component *component,
if (!backend)
return NULL;
backend->flags = HWLOC_BACKEND_FLAG_NEED_LEVELS;
- backend->discover = hwloc_look_pci;
+#ifdef HWLOC_SOLARIS_SYS
+ if ((uid_t)0 != geteuid())
+ backend->discover = NULL;
+ else
+#endif
+ backend->discover = hwloc_look_pci;
return backend;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
index cd0e5aa..255c5fc 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-solaris.c
@@ -732,7 +732,6 @@ hwloc_look_solaris(struct hwloc_backend *backend)
hwloc_look_lgrp(topology);
#endif /* HAVE_LIBLGRP */
#ifdef HAVE_LIBKSTAT
- nbprocs = 0;
if (hwloc_look_kstat(topology) > 0)
alreadypus = 1;
#endif /* HAVE_LIBKSTAT */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c
index db7087b..5e7a426 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-synthetic.c
@@ -60,7 +60,7 @@ hwloc_synthetic_process_level_indexes(struct hwloc_synthetic_backend_data_s *dat
unsigned long length = curlevel->index_string_length;
unsigned *array = NULL;
struct hwloc_synthetic_intlv_loop_s * loops = NULL;
- unsigned long i;
+ size_t i;
if (!attr)
return;
@@ -198,7 +198,7 @@ hwloc_synthetic_process_level_indexes(struct hwloc_synthetic_backend_data_s *dat
&& cachetypeattr != (hwloc_obj_cache_type_t) -1
&& cachetypeattr != data->level[i].cachetype)
continue;
- loops[cur_loop].level_depth = i;
+ loops[cur_loop].level_depth = (unsigned)i;
break;
}
if (i == curleveldepth) {
@@ -326,7 +326,7 @@ hwloc_synthetic_parse_level_attrs(const char *attrs, const char **next_posp,
const char *next_pos;
hwloc_uint64_t memorysize = 0;
const char *index_string = NULL;
- unsigned long index_string_length = 0;
+ size_t index_string_length = 0;
next_pos = (const char *) strchr(attrs, ')');
if (!next_pos) {
@@ -368,7 +368,7 @@ hwloc_synthetic_parse_level_attrs(const char *attrs, const char **next_posp,
curlevel->memorysize = memorysize;
curlevel->index_string = index_string;
- curlevel->index_string_length = index_string_length;
+ curlevel->index_string_length = (unsigned long)index_string_length;
*next_posp = next_pos+1;
return 0;
}
@@ -428,7 +428,7 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
errno = EINVAL;
goto error;
}
- if (type == HWLOC_OBJ_MISC || type == HWLOC_OBJ_BRIDGE || type == HWLOC_OBJ_PCI_DEVICE || type == HWLOC_OBJ_OS_DEVICE) {
+ if (type == HWLOC_OBJ_SYSTEM || type == HWLOC_OBJ_MISC || type == HWLOC_OBJ_BRIDGE || type == HWLOC_OBJ_PCI_DEVICE || type == HWLOC_OBJ_OS_DEVICE) {
if (verbose)
fprintf(stderr, "Synthetic string with disallowed object type at '%s'\n", pos);
errno = EINVAL;
@@ -455,6 +455,12 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
errno = EINVAL;
goto error;
}
+ if (!item) {
+ if (verbose)
+ fprintf(stderr,"Synthetic string with disallow 0 number of objects at '%s'\n", pos);
+ errno = EINVAL;
+ goto error;
+ }
data->level[count-1].arity = (unsigned)item;
totalarity *= item;
@@ -497,6 +503,19 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
type = curlevel->type;
+ if (i == count-1 && type != HWLOC_OBJ_TYPE_UNKNOWN && type != HWLOC_OBJ_PU) {
+ if (verbose)
+ fprintf(stderr, "Synthetic string cannot use non-PU type for last level\n");
+ errno = EINVAL;
+ return -1;
+ }
+ if (i != count-1 && type == HWLOC_OBJ_PU) {
+ if (verbose)
+ fprintf(stderr, "Synthetic string cannot use PU type for non-last level\n");
+ errno = EINVAL;
+ return -1;
+ }
+
if (type == HWLOC_OBJ_TYPE_UNKNOWN) {
if (i == count-1)
type = HWLOC_OBJ_PU;
@@ -908,7 +927,7 @@ static int hwloc_topology_export_synthetic_indexes(struct hwloc_topology * topol
}
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
@@ -931,7 +950,7 @@ static int hwloc_topology_export_synthetic_indexes(struct hwloc_topology * topol
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
cur = cur->next_cousin;
@@ -979,7 +998,7 @@ static int hwloc_topology_export_synthetic_obj_attr(struct hwloc_topology * topo
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -989,7 +1008,7 @@ static int hwloc_topology_export_synthetic_obj_attr(struct hwloc_topology * topo
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -998,7 +1017,7 @@ static int hwloc_topology_export_synthetic_obj_attr(struct hwloc_topology * topo
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
@@ -1053,7 +1072,7 @@ hwloc_topology_export_synthetic(struct hwloc_topology * topology,
if (ret > 0)
prefix = separator;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
@@ -1073,7 +1092,7 @@ hwloc_topology_export_synthetic(struct hwloc_topology * topology,
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -1084,7 +1103,7 @@ hwloc_topology_export_synthetic(struct hwloc_topology * topology,
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c
index 371aaa1..83b5492 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-windows.c
@@ -33,6 +33,10 @@ typedef enum _PROCESSOR_CACHE_TYPE {
#define CACHE_FULLY_ASSOCIATIVE 0xFF
#endif
+#ifndef MAXIMUM_PROC_PER_GROUP /* missing in MinGW */
+#define MAXIMUM_PROC_PER_GROUP 64
+#endif
+
#ifndef HAVE_CACHE_DESCRIPTOR
typedef struct _CACHE_DESCRIPTOR {
BYTE Level;
@@ -172,34 +176,259 @@ typedef struct _PSAPI_WORKING_SET_EX_INFORMATION {
} PSAPI_WORKING_SET_EX_INFORMATION;
#endif
+#ifndef HAVE_PROCESSOR_NUMBER
+typedef struct _PROCESSOR_NUMBER {
+ WORD Group;
+ BYTE Number;
+ BYTE Reserved;
+} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
+#endif
+
+/* Function pointers */
+
+typedef WORD (WINAPI *PFN_GETACTIVEPROCESSORGROUPCOUNT)(void);
+static PFN_GETACTIVEPROCESSORGROUPCOUNT GetActiveProcessorGroupCountProc;
+
+static unsigned long nr_processor_groups = 1;
+
+typedef WORD (WINAPI *PFN_GETACTIVEPROCESSORCOUNT)(WORD);
+static PFN_GETACTIVEPROCESSORCOUNT GetActiveProcessorCountProc;
+
+typedef DWORD (WINAPI *PFN_GETCURRENTPROCESSORNUMBER)(void);
+static PFN_GETCURRENTPROCESSORNUMBER GetCurrentProcessorNumberProc;
+
+typedef VOID (WINAPI *PFN_GETCURRENTPROCESSORNUMBEREX)(PPROCESSOR_NUMBER);
+static PFN_GETCURRENTPROCESSORNUMBEREX GetCurrentProcessorNumberExProc;
+
+typedef BOOL (WINAPI *PFN_GETLOGICALPROCESSORINFORMATION)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnLength);
+static PFN_GETLOGICALPROCESSORINFORMATION GetLogicalProcessorInformationProc;
+
+typedef BOOL (WINAPI *PFN_GETLOGICALPROCESSORINFORMATIONEX)(LOGICAL_PROCESSOR_RELATIONSHIP relationship, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer, PDWORD ReturnLength);
+static PFN_GETLOGICALPROCESSORINFORMATIONEX GetLogicalProcessorInformationExProc;
+
+typedef BOOL (WINAPI *PFN_SETTHREADGROUPAFFINITY)(HANDLE hThread, const GROUP_AFFINITY *GroupAffinity, PGROUP_AFFINITY PreviousGroupAffinity);
+static PFN_SETTHREADGROUPAFFINITY SetThreadGroupAffinityProc;
+
+typedef BOOL (WINAPI *PFN_GETTHREADGROUPAFFINITY)(HANDLE hThread, PGROUP_AFFINITY GroupAffinity);
+static PFN_GETTHREADGROUPAFFINITY GetThreadGroupAffinityProc;
+
+typedef BOOL (WINAPI *PFN_GETNUMAAVAILABLEMEMORYNODE)(UCHAR Node, PULONGLONG AvailableBytes);
+static PFN_GETNUMAAVAILABLEMEMORYNODE GetNumaAvailableMemoryNodeProc;
+
+typedef BOOL (WINAPI *PFN_GETNUMAAVAILABLEMEMORYNODEEX)(USHORT Node, PULONGLONG AvailableBytes);
+static PFN_GETNUMAAVAILABLEMEMORYNODEEX GetNumaAvailableMemoryNodeExProc;
+
+typedef LPVOID (WINAPI *PFN_VIRTUALALLOCEXNUMA)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect, DWORD nndPreferred);
+static PFN_VIRTUALALLOCEXNUMA VirtualAllocExNumaProc;
+
+typedef BOOL (WINAPI *PFN_VIRTUALFREEEX)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType);
+static PFN_VIRTUALFREEEX VirtualFreeExProc;
+
+typedef BOOL (WINAPI *PFN_QUERYWORKINGSETEX)(HANDLE hProcess, PVOID pv, DWORD cb);
+static PFN_QUERYWORKINGSETEX QueryWorkingSetExProc;
+
+static void hwloc_win_get_function_ptrs(void)
+{
+ static int done = 0;
+ if (!done) {
+ HMODULE kernel32;
+
+ kernel32 = LoadLibrary("kernel32.dll");
+ if (kernel32) {
+ GetActiveProcessorGroupCountProc =
+ (PFN_GETACTIVEPROCESSORGROUPCOUNT) GetProcAddress(kernel32, "GetActiveProcessorGroupCount");
+ GetActiveProcessorCountProc =
+ (PFN_GETACTIVEPROCESSORCOUNT) GetProcAddress(kernel32, "GetActiveProcessorCount");
+ GetLogicalProcessorInformationProc =
+ (PFN_GETLOGICALPROCESSORINFORMATION) GetProcAddress(kernel32, "GetLogicalProcessorInformation");
+ GetCurrentProcessorNumberProc =
+ (PFN_GETCURRENTPROCESSORNUMBER) GetProcAddress(kernel32, "GetCurrentProcessorNumber");
+ GetCurrentProcessorNumberExProc =
+ (PFN_GETCURRENTPROCESSORNUMBEREX) GetProcAddress(kernel32, "GetCurrentProcessorNumberEx");
+ SetThreadGroupAffinityProc =
+ (PFN_SETTHREADGROUPAFFINITY) GetProcAddress(kernel32, "SetThreadGroupAffinity");
+ GetThreadGroupAffinityProc =
+ (PFN_GETTHREADGROUPAFFINITY) GetProcAddress(kernel32, "GetThreadGroupAffinity");
+ GetNumaAvailableMemoryNodeProc =
+ (PFN_GETNUMAAVAILABLEMEMORYNODE) GetProcAddress(kernel32, "GetNumaAvailableMemoryNode");
+ GetNumaAvailableMemoryNodeExProc =
+ (PFN_GETNUMAAVAILABLEMEMORYNODEEX) GetProcAddress(kernel32, "GetNumaAvailableMemoryNodeEx");
+ GetLogicalProcessorInformationExProc =
+ (PFN_GETLOGICALPROCESSORINFORMATIONEX)GetProcAddress(kernel32, "GetLogicalProcessorInformationEx");
+ VirtualAllocExNumaProc =
+ (PFN_VIRTUALALLOCEXNUMA) GetProcAddress(kernel32, "K32QueryWorkingSetEx");
+ VirtualAllocExNumaProc =*
+ (PFN_VIRTUALALLOCEXNUMA) GetProcAddress(kernel32, "VirtualAllocExNuma");
+ VirtualFreeExProc =
+ (PFN_VIRTUALFREEEX) GetProcAddress(kernel32, "VirtualFreeEx");
+ }
+
+ if (GetActiveProcessorGroupCountProc)
+ nr_processor_groups = GetActiveProcessorGroupCountProc();
+
+ if (!VirtualAllocExNumaProc) {
+ HMODULE psapi = LoadLibrary("psapi.dll");
+ if (psapi)
+ VirtualAllocExNumaProc = (PFN_VIRTUALALLOCEXNUMA) GetProcAddress(psapi, "QueryWorkingSetEx");
+ }
+
+ done = 1;
+ }
+}
+
+/*
+ * ULONG_PTR and DWORD_PTR are 64/32bits depending on the arch
+ * while bitmaps use unsigned long (always 32bits)
+ */
+
+static void hwloc_bitmap_from_ULONG_PTR(hwloc_bitmap_t set, ULONG_PTR mask)
+{
+#if SIZEOF_VOID_P == 8
+ hwloc_bitmap_from_ulong(set, mask & 0xffffffff);
+ hwloc_bitmap_set_ith_ulong(set, 1, mask >> 32);
+#else
+ hwloc_bitmap_from_ulong(set, mask);
+#endif
+}
+
+static void hwloc_bitmap_from_ith_ULONG_PTR(hwloc_bitmap_t set, unsigned i, ULONG_PTR mask)
+{
+#if SIZEOF_VOID_P == 8
+ hwloc_bitmap_from_ith_ulong(set, 2*i, mask & 0xffffffff);
+ hwloc_bitmap_set_ith_ulong(set, 2*i+1, mask >> 32);
+#else
+ hwloc_bitmap_from_ith_ulong(set, i, mask);
+#endif
+}
+
static void hwloc_bitmap_set_ith_ULONG_PTR(hwloc_bitmap_t set, unsigned i, ULONG_PTR mask)
{
- /* ULONG_PTR is 64/32bits depending on the arch
- * while unsigned long is always 32bits */
#if SIZEOF_VOID_P == 8
- hwloc_bitmap_set_ith_ulong(set, 2*i, mask & 0xffffffff);
- hwloc_bitmap_set_ith_ulong(set, 2*i+1, mask >> 32);
+ hwloc_bitmap_set_ith_ulong(set, 2*i, mask & 0xffffffff);
+ hwloc_bitmap_set_ith_ulong(set, 2*i+1, mask >> 32);
#else
- hwloc_bitmap_set_ith_ulong(set, i, mask);
+ hwloc_bitmap_set_ith_ulong(set, i, mask);
#endif
}
-/* TODO: SetThreadIdealProcessor */
+static ULONG_PTR hwloc_bitmap_to_ULONG_PTR(hwloc_const_bitmap_t set)
+{
+#if SIZEOF_VOID_P == 8
+ ULONG_PTR up = hwloc_bitmap_to_ith_ulong(set, 1);
+ up <<= 32;
+ up |= hwloc_bitmap_to_ulong(set);
+ return up;
+#else
+ return hwloc_bitmap_to_ulong(set);
+#endif
+}
+
+static ULONG_PTR hwloc_bitmap_to_ith_ULONG_PTR(hwloc_const_bitmap_t set, unsigned i)
+{
+#if SIZEOF_VOID_P == 8
+ ULONG_PTR up = hwloc_bitmap_to_ith_ulong(set, 2*i+1);
+ up <<= 32;
+ up |= hwloc_bitmap_to_ith_ulong(set, 2*i);
+ return up;
+#else
+ return hwloc_bitmap_to_ith_ulong(set, i);
+#endif
+}
+
+/* convert set into index+mask if all set bits are in the same ULONG.
+ * otherwise return -1.
+ */
+static int hwloc_bitmap_to_single_ULONG_PTR(hwloc_const_bitmap_t set, unsigned *index, ULONG_PTR *mask)
+{
+ unsigned first_ulp, last_ulp;
+ if (hwloc_bitmap_weight(set) == -1)
+ return -1;
+ first_ulp = hwloc_bitmap_first(set) / (sizeof(ULONG_PTR)*8);
+ last_ulp = hwloc_bitmap_last(set) / (sizeof(ULONG_PTR)*8);
+ if (first_ulp != last_ulp)
+ return -1;
+ *mask = hwloc_bitmap_to_ith_ULONG_PTR(set, first_ulp);
+ *index = first_ulp;
+ return 0;
+}
+
+/**************************************************************
+ * hwloc PU numbering with respect to Windows processor groups
+ *
+ * Everywhere below we reserve 64 physical indexes per processor groups because that's
+ * the maximum (MAXIMUM_PROC_PER_GROUP). Windows may actually use less bits than that
+ * in some groups (either to avoid splitting NUMA nodes across groups, or because of OS
+ * tweaks such as "bcdedit /set groupsize 8") but we keep some unused indexes for simplicity.
+ * That means PU physical indexes and cpusets may be non-contigous.
+ * That also means hwloc_fallback_nbprocessors() below must return the last PU index + 1
+ * instead the actual number of processors.
+ */
+
+/********************
+ * last_cpu_location
+ */
+
+static int
+hwloc_win_get_thisthread_last_cpu_location(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t set, int flags __hwloc_attribute_unused)
+{
+ assert(GetCurrentProcessorNumberExProc || (GetCurrentProcessorNumberProc && nr_processor_groups == 1));
+
+ if (nr_processor_groups > 1 || !GetCurrentProcessorNumberProc) {
+ PROCESSOR_NUMBER num;
+ GetCurrentProcessorNumberExProc(&num);
+ hwloc_bitmap_from_ith_ULONG_PTR(set, num.Group, ((ULONG_PTR)1) << num.Number);
+ return 0;
+ }
+
+ hwloc_bitmap_from_ith_ULONG_PTR(set, 0, ((ULONG_PTR)1) << GetCurrentProcessorNumberProc());
+ return 0;
+}
+
+/* TODO: hwloc_win_get_thisproc_last_cpu_location() using
+ * CreateToolhelp32Snapshot(), Thread32First/Next()
+ * th.th32OwnerProcessID == GetCurrentProcessId() for filtering within process
+ * OpenThread(THREAD_SET_INFORMATION|THREAD_QUERY_INFORMATION, FALSE, te32.th32ThreadID) to get a handle.
+ */
+
+
+/******************************
+ * set cpu/membind for threads
+ */
+
+/* TODO: SetThreadIdealProcessor{,Ex} */
static int
hwloc_win_set_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t thread, hwloc_const_bitmap_t hwloc_set, int flags)
{
- DWORD mask;
+ DWORD_PTR mask;
+ unsigned group;
if (flags & HWLOC_CPUBIND_NOMEMBIND) {
errno = ENOSYS;
return -1;
}
- /* TODO: groups SetThreadGroupAffinity */
- /* The resulting binding is always strict */
- mask = hwloc_bitmap_to_ulong(hwloc_set);
- if (!SetThreadAffinityMask(thread, mask))
+
+ if (hwloc_bitmap_to_single_ULONG_PTR(hwloc_set, &group, &mask) < 0) {
+ errno = ENOSYS;
return -1;
+ }
+
+ assert(nr_processor_groups == 1 || SetThreadGroupAffinityProc);
+
+ if (nr_processor_groups > 1) {
+ GROUP_AFFINITY aff;
+ memset(&aff, 0, sizeof(aff)); /* we get Invalid Parameter error if Reserved field isn't cleared */
+ aff.Group = group;
+ aff.Mask = mask;
+ if (!SetThreadGroupAffinityProc(thread, &aff, NULL))
+ return -1;
+
+ } else {
+ /* SetThreadAffinityMask() only changes the mask inside the current processor group */
+ /* The resulting binding is always strict */
+ if (!SetThreadAffinityMask(thread, mask))
+ return -1;
+ }
return 0;
}
@@ -230,24 +459,85 @@ hwloc_win_set_thisthread_membind(hwloc_topology_t topology, hwloc_const_nodeset_
return ret;
}
+
+/******************************
+ * get cpu/membind for threads
+ */
+
+ static int
+hwloc_win_get_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_thread_t thread, hwloc_cpuset_t set, int flags __hwloc_attribute_unused)
+{
+ GROUP_AFFINITY aff;
+
+ assert(GetThreadGroupAffinityProc);
+
+ if (!GetThreadGroupAffinityProc(thread, &aff))
+ return -1;
+ hwloc_bitmap_from_ith_ULONG_PTR(set, aff.Group, aff.Mask);
+ return 0;
+}
+
+static int
+hwloc_win_get_thisthread_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t set, int flags __hwloc_attribute_unused)
+{
+ return hwloc_win_get_thread_cpubind(topology, GetCurrentThread(), set, flags);
+}
+
+static int
+hwloc_win_get_thisthread_membind(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags)
+{
+ int ret;
+ hwloc_cpuset_t cpuset = hwloc_bitmap_alloc();
+ ret = hwloc_win_get_thread_cpubind(topology, GetCurrentThread(), cpuset, flags);
+ if (!ret) {
+ *policy = HWLOC_MEMBIND_BIND;
+ hwloc_cpuset_to_nodeset(topology, cpuset, nodeset);
+ }
+ hwloc_bitmap_free(cpuset);
+ return ret;
+}
+
+
+/********************************
+ * set cpu/membind for processes
+ */
+
static int
hwloc_win_set_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t proc, hwloc_const_bitmap_t hwloc_set, int flags)
{
- DWORD mask;
+ DWORD_PTR mask;
+
+ assert(nr_processor_groups == 1);
+
if (flags & HWLOC_CPUBIND_NOMEMBIND) {
errno = ENOSYS;
return -1;
}
- /* TODO: groups, hard: has to manually bind all threads into the other group,
- * and the bind the process inside the group */
+
+ /* TODO: SetThreadGroupAffinity() for all threads doesn't enforce the whole process affinity,
+ * maybe because of process-specific resource locality */
+ /* TODO: if we are in a single group (check with GetProcessGroupAffinity()),
+ * SetProcessAffinityMask() changes the binding within that same group.
+ */
+ /* TODO: NtSetInformationProcess() works very well for binding to any mask in a single group,
+ * but it's an internal routine.
+ */
+ /* TODO: checks whether hwloc-bind.c needs to pass INHERIT_PARENT_AFFINITY to CreateProcess() instead of execvp(). */
+
/* The resulting binding is always strict */
- mask = hwloc_bitmap_to_ulong(hwloc_set);
+ mask = hwloc_bitmap_to_ULONG_PTR(hwloc_set);
if (!SetProcessAffinityMask(proc, mask))
return -1;
return 0;
}
static int
+hwloc_win_set_thisproc_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_set, int flags)
+{
+ return hwloc_win_set_proc_cpubind(topology, GetCurrentProcess(), hwloc_set, flags);
+}
+
+static int
hwloc_win_set_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
{
int ret;
@@ -267,17 +557,41 @@ hwloc_win_set_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_con
}
static int
+hwloc_win_set_thisproc_membind(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
+{
+ return hwloc_win_set_proc_membind(topology, GetCurrentProcess(), nodeset, policy, flags);
+}
+
+
+/********************************
+ * get cpu/membind for processes
+ */
+
+static int
hwloc_win_get_proc_cpubind(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_pid_t proc, hwloc_bitmap_t hwloc_set, int flags)
{
DWORD_PTR proc_mask, sys_mask;
+
+ assert(nr_processor_groups == 1);
+
if (flags & HWLOC_CPUBIND_NOMEMBIND) {
errno = ENOSYS;
return -1;
}
- /* TODO: groups, GetProcessGroupAffinity, or merge SetThreadGroupAffinity for all threads */
+
+ /* TODO: if we are in a single group (check with GetProcessGroupAffinity()),
+ * GetProcessAffinityMask() gives the mask within that group.
+ */
+ /* TODO: if we are in multiple groups, GetProcessGroupAffinity() gives their IDs,
+ * but we don't know their masks.
+ */
+ /* TODO: GetThreadGroupAffinity() for all threads can be smaller than the whole process affinity,
+ * maybe because of process-specific resource locality.
+ */
+
if (!GetProcessAffinityMask(proc, &proc_mask, &sys_mask))
return -1;
- hwloc_bitmap_from_ulong(hwloc_set, proc_mask);
+ hwloc_bitmap_from_ULONG_PTR(hwloc_set, proc_mask);
return 0;
}
@@ -296,18 +610,6 @@ hwloc_win_get_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nod
}
static int
-hwloc_win_set_thisproc_cpubind(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_set, int flags)
-{
- return hwloc_win_set_proc_cpubind(topology, GetCurrentProcess(), hwloc_set, flags);
-}
-
-static int
-hwloc_win_set_thisproc_membind(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
-{
- return hwloc_win_set_proc_membind(topology, GetCurrentProcess(), nodeset, policy, flags);
-}
-
-static int
hwloc_win_get_thisproc_cpubind(hwloc_topology_t topology, hwloc_bitmap_t hwloc_cpuset, int flags)
{
return hwloc_win_get_proc_cpubind(topology, GetCurrentProcess(), hwloc_cpuset, flags);
@@ -319,36 +621,10 @@ hwloc_win_get_thisproc_membind(hwloc_topology_t topology, hwloc_nodeset_t nodese
return hwloc_win_get_proc_membind(topology, GetCurrentProcess(), nodeset, policy, flags);
}
-static LPVOID (WINAPI *VirtualAllocExNumaProc)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect, DWORD nndPreferred);
-static BOOL (WINAPI *VirtualFreeExProc)(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType);
-static BOOL (WINAPI *QueryWorkingSetExProc)(HANDLE hProcess, PVOID pv, DWORD cb);
-
-static int hwloc_win_get_VirtualAllocExNumaProc(void) {
- if (VirtualAllocExNumaProc == NULL) {
- FARPROC alloc_fun = NULL, free_fun = NULL;
- HMODULE kernel32;
-
- kernel32 = LoadLibrary("kernel32.dll");
- if (kernel32) {
- alloc_fun = GetProcAddress(kernel32, "VirtualAllocExNuma");
- free_fun = GetProcAddress(kernel32, "VirtualFreeEx");
- }
-
- if (!alloc_fun || !free_fun) {
- VirtualAllocExNumaProc = (FARPROC) -1;
- errno = ENOSYS;
- return -1;
- }
- VirtualAllocExNumaProc = alloc_fun;
- VirtualFreeExProc = free_fun;
- } else if ((FARPROC) VirtualAllocExNumaProc == (FARPROC)-1) {
- errno = ENOSYS;
- return -1;
- }
-
- return 0;
-}
+/************************
+ * membind alloc/free
+ */
static void *
hwloc_win_alloc(hwloc_topology_t topology __hwloc_attribute_unused, size_t len) {
@@ -392,34 +668,10 @@ hwloc_win_free_membind(hwloc_topology_t topology __hwloc_attribute_unused, void
return 0;
}
-static int hwloc_win_get_QueryWorkingSetExProc(void) {
- if (QueryWorkingSetExProc == NULL) {
- FARPROC fun = NULL;
- HMODULE kernel32, psapi;
- kernel32 = LoadLibrary("kernel32.dll");
- if (kernel32)
- fun = GetProcAddress(kernel32, "K32QueryWorkingSetEx");
- if (!fun) {
- psapi = LoadLibrary("psapi.dll");
- if (psapi)
- fun = GetProcAddress(psapi, "QueryWorkingSetEx");
- }
-
- if (!fun) {
- QueryWorkingSetExProc = (FARPROC) -1;
- errno = ENOSYS;
- return -1;
- }
-
- QueryWorkingSetExProc = fun;
- } else if ((FARPROC) QueryWorkingSetExProc == (FARPROC)-1) {
- errno = ENOSYS;
- return -1;
- }
-
- return 0;
-}
+/**********************
+ * membind for areas
+ */
static int
hwloc_win_get_area_membind(hwloc_topology_t topology __hwloc_attribute_unused, const void *addr, size_t len, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags)
@@ -433,7 +685,7 @@ hwloc_win_get_area_membind(hwloc_topology_t topology __hwloc_attribute_unused, c
page_size = SystemInfo.dwPageSize;
start = (((uintptr_t) addr) / page_size) * page_size;
- nb = (((uintptr_t) addr + len - start) + page_size - 1) / page_size;
+ nb = (unsigned)((((uintptr_t) addr + len - start) + page_size - 1) / page_size);
if (!nb)
nb = 1;
@@ -472,19 +724,20 @@ hwloc_win_get_area_membind(hwloc_topology_t topology __hwloc_attribute_unused, c
}
}
+
+/*************************
+ * discovery
+ */
+
static int
hwloc_look_windows(struct hwloc_backend *backend)
{
struct hwloc_topology *topology = backend->topology;
- BOOL (WINAPI *GetLogicalProcessorInformationProc)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, PDWORD ReturnLength);
- BOOL (WINAPI *GetLogicalProcessorInformationExProc)(LOGICAL_PROCESSOR_RELATIONSHIP relationship, PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Buffer, PDWORD ReturnLength);
- BOOL (WINAPI *GetNumaAvailableMemoryNodeProc)(UCHAR Node, PULONGLONG AvailableBytes);
- BOOL (WINAPI *GetNumaAvailableMemoryNodeExProc)(USHORT Node, PULONGLONG AvailableBytes);
+ hwloc_bitmap_t groups_pu_set = NULL;
SYSTEM_INFO SystemInfo;
-
DWORD length;
- HMODULE kernel32;
+ hwloc_win_get_function_ptrs();
if (topology->levels[0][0]->cpuset)
/* somebody discovered things */
@@ -494,14 +747,7 @@ hwloc_look_windows(struct hwloc_backend *backend)
GetSystemInfo(&SystemInfo);
- kernel32 = LoadLibrary("kernel32.dll");
- if (kernel32) {
- GetLogicalProcessorInformationProc = GetProcAddress(kernel32, "GetLogicalProcessorInformation");
- GetNumaAvailableMemoryNodeProc = GetProcAddress(kernel32, "GetNumaAvailableMemoryNode");
- GetNumaAvailableMemoryNodeExProc = GetProcAddress(kernel32, "GetNumaAvailableMemoryNodeEx");
- GetLogicalProcessorInformationExProc = GetProcAddress(kernel32, "GetLogicalProcessorInformationEx");
-
- if (!GetLogicalProcessorInformationExProc && GetLogicalProcessorInformationProc) {
+ if (!GetLogicalProcessorInformationExProc && GetLogicalProcessorInformationProc) {
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION procInfo;
unsigned id;
unsigned i;
@@ -608,9 +854,9 @@ hwloc_look_windows(struct hwloc_backend *backend)
}
free(procInfo);
- }
+ }
- if (GetLogicalProcessorInformationExProc) {
+ if (GetLogicalProcessorInformationExProc) {
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX procInfoTotal, procInfo;
unsigned id;
@@ -676,6 +922,12 @@ hwloc_look_windows(struct hwloc_backend *backend)
/* KAFFINITY is ULONG_PTR */
hwloc_bitmap_set_ith_ULONG_PTR(obj->cpuset, id, mask);
hwloc_debug_2args_bitmap("group %u %d bitmap %s\n", id, procInfo->Group.GroupInfo[id].ActiveProcessorCount, obj->cpuset);
+
+ /* save the set of PUs so that we can create them at the end */
+ if (!groups_pu_set)
+ groups_pu_set = hwloc_bitmap_alloc();
+ hwloc_bitmap_or(groups_pu_set, groups_pu_set, obj->cpuset);
+
hwloc_insert_object_by_cpuset(topology, obj);
}
continue;
@@ -692,7 +944,7 @@ hwloc_look_windows(struct hwloc_backend *backend)
/* GROUP_AFFINITY.Mask is KAFFINITY, which is ULONG_PTR */
hwloc_bitmap_set_ith_ULONG_PTR(obj->cpuset, GroupMask[i].Group, GroupMask[i].Mask);
}
- hwloc_debug("%s#%u bitmap %s\n", hwloc_obj_type_string(type), id, obj->cpuset);
+ hwloc_debug_2args_bitmap("%s#%u bitmap %s\n", hwloc_obj_type_string(type), id, obj->cpuset);
switch (type) {
case HWLOC_OBJ_NUMANODE:
@@ -739,11 +991,39 @@ hwloc_look_windows(struct hwloc_backend *backend)
hwloc_insert_object_by_cpuset(topology, obj);
}
free(procInfoTotal);
- }
}
- /* add PU objects */
- hwloc_setup_pu_level(topology, hwloc_fallback_nbprocessors(topology));
+ if (groups_pu_set) {
+ /* the system supports multiple Groups.
+ * PU indexes may be discontiguous, especially if Groups contain less than 64 procs.
+ */
+ hwloc_obj_t obj;
+ unsigned idx;
+ hwloc_bitmap_foreach_begin(idx, groups_pu_set) {
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PU, idx);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_only(obj->cpuset, idx);
+ hwloc_debug_1arg_bitmap("cpu %u has cpuset %s\n",
+ idx, obj->cpuset);
+ hwloc_insert_object_by_cpuset(topology, obj);
+ } hwloc_bitmap_foreach_end();
+ hwloc_bitmap_free(groups_pu_set);
+ } else {
+ /* no processor groups */
+ SYSTEM_INFO sysinfo;
+ hwloc_obj_t obj;
+ unsigned idx;
+ GetSystemInfo(&sysinfo);
+ for(idx=0; idx<32; idx++)
+ if (sysinfo.dwActiveProcessorMask & (((DWORD_PTR)1)<<idx)) {
+ obj = hwloc_alloc_setup_object(HWLOC_OBJ_PU, idx);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_only(obj->cpuset, idx);
+ hwloc_debug_1arg_bitmap("cpu %u has cpuset %s\n",
+ idx, obj->cpuset);
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+ }
hwloc_obj_add_info(topology->levels[0][0], "Backend", "Windows");
if (topology->is_thissystem)
@@ -755,28 +1035,40 @@ void
hwloc_set_windows_hooks(struct hwloc_binding_hooks *hooks,
struct hwloc_topology_support *support)
{
- hooks->set_proc_cpubind = hwloc_win_set_proc_cpubind;
- hooks->get_proc_cpubind = hwloc_win_get_proc_cpubind;
- hooks->set_thread_cpubind = hwloc_win_set_thread_cpubind;
- hooks->set_thisproc_cpubind = hwloc_win_set_thisproc_cpubind;
- hooks->get_thisproc_cpubind = hwloc_win_get_thisproc_cpubind;
- hooks->set_thisthread_cpubind = hwloc_win_set_thisthread_cpubind;
- /* TODO: get_last_cpu_location: use GetCurrentProcessorNumber */
-
- hooks->set_proc_membind = hwloc_win_set_proc_membind;
- hooks->get_proc_membind = hwloc_win_get_proc_membind;
- hooks->set_thisproc_membind = hwloc_win_set_thisproc_membind;
- hooks->get_thisproc_membind = hwloc_win_get_thisproc_membind;
- hooks->set_thisthread_membind = hwloc_win_set_thisthread_membind;
-
- if (!hwloc_win_get_VirtualAllocExNumaProc()) {
+ hwloc_win_get_function_ptrs();
+
+ if (GetCurrentProcessorNumberExProc || (GetCurrentProcessorNumberProc && nr_processor_groups == 1))
+ hooks->get_thisthread_last_cpu_location = hwloc_win_get_thisthread_last_cpu_location;
+
+ if (nr_processor_groups == 1) {
+ hooks->set_proc_cpubind = hwloc_win_set_proc_cpubind;
+ hooks->get_proc_cpubind = hwloc_win_get_proc_cpubind;
+ hooks->set_thisproc_cpubind = hwloc_win_set_thisproc_cpubind;
+ hooks->get_thisproc_cpubind = hwloc_win_get_thisproc_cpubind;
+ hooks->set_proc_membind = hwloc_win_set_proc_membind;
+ hooks->get_proc_membind = hwloc_win_get_proc_membind;
+ hooks->set_thisproc_membind = hwloc_win_set_thisproc_membind;
+ hooks->get_thisproc_membind = hwloc_win_get_thisproc_membind;
+ }
+ if (nr_processor_groups == 1 || SetThreadGroupAffinityProc) {
+ hooks->set_thread_cpubind = hwloc_win_set_thread_cpubind;
+ hooks->set_thisthread_cpubind = hwloc_win_set_thisthread_cpubind;
+ hooks->set_thisthread_membind = hwloc_win_set_thisthread_membind;
+ }
+ if (GetThreadGroupAffinityProc) {
+ hooks->get_thread_cpubind = hwloc_win_get_thread_cpubind;
+ hooks->get_thisthread_cpubind = hwloc_win_get_thisthread_cpubind;
+ hooks->get_thisthread_membind = hwloc_win_get_thisthread_membind;
+ }
+
+ if (VirtualAllocExNumaProc) {
hooks->alloc_membind = hwloc_win_alloc_membind;
hooks->alloc = hwloc_win_alloc;
hooks->free_membind = hwloc_win_free_membind;
support->membind->bind_membind = 1;
}
- if (!hwloc_win_get_QueryWorkingSetExProc())
+ if (QueryWorkingSetExProc)
hooks->get_area_membind = hwloc_win_get_area_membind;
}
@@ -810,3 +1102,30 @@ const struct hwloc_component hwloc_windows_component = {
0,
&hwloc_windows_disc_component
};
+
+unsigned
+hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
+ int n;
+ SYSTEM_INFO sysinfo;
+
+ /* by default, ignore groups (return only the number in the current group) */
+ GetSystemInfo(&sysinfo);
+ n = sysinfo.dwNumberOfProcessors; /* FIXME could be non-contigous, rather return a mask from dwActiveProcessorMask? */
+
+ hwloc_win_get_function_ptrs();
+
+ if (nr_processor_groups > 1) {
+ /* assume n-1 groups are complete, since that's how we store things in cpusets */
+ if (GetActiveProcessorCountProc)
+ n = MAXIMUM_PROC_PER_GROUP*(nr_processor_groups-1)
+ + GetActiveProcessorCountProc((WORD)nr_processor_groups-1);
+ else
+ n = MAXIMUM_PROC_PER_GROUP*nr_processor_groups;
+ }
+
+ if (n >= 1)
+ topology->support.discovery->pu = 1;
+ else
+ n = 1;
+ return n;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c
index db91a5e..ab6de7c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-x86.c
@@ -26,6 +26,7 @@ struct hwloc_x86_backend_data_s {
unsigned nbprocs;
hwloc_bitmap_t apicid_set;
int apicid_unique;
+ int is_knl;
};
#define has_topoext(features) ((features)[6] & (1 << 22))
@@ -35,9 +36,11 @@ struct cacheinfo {
unsigned type;
unsigned level;
unsigned nbthreads_sharing;
+ unsigned cacheid;
unsigned linesize;
unsigned linepart;
+ int inclusive;
int ways;
unsigned sets;
unsigned long size;
@@ -99,6 +102,8 @@ static void fill_amd_cache(struct procinfo *infos, unsigned level, int type, uns
cache->nbthreads_sharing = infos->max_log_proc;
cache->linesize = cpuid & 0xff;
cache->linepart = 0;
+ cache->inclusive = 0; /* old AMD (K8-K10) supposed to have exclusive caches */
+
if (level == 1) {
cache->ways = (cpuid >> 16) & 0xff;
if (cache->ways == 0xff)
@@ -169,6 +174,9 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
}
infos->cpustepping = eax & 0xf;
+ if (cpuid_type == intel && infos->cpufamilynumber == 0x6 && infos->cpumodelnumber == 0x57)
+ data->is_knl = 1;
+
/* Get cpu vendor string from cpuid 0x00 */
memset(regs, 0, sizeof(regs));
regs[0] = 0;
@@ -283,6 +291,7 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
cache->ways = ways;
cache->sets = sets = ecx + 1;
cache->size = linesize * linepart * ways * sets;
+ cache->inclusive = edx & 0x2;
hwloc_debug("cache %u type %u L%u t%u c%u linesize %lu linepart %lu ways %lu sets %lu, size %uKB\n", cachenum, cache->type, cache->level, cache->nbthreads_sharing, infos->max_nbcores, linesize, linepart, ways, sets, cache->size >> 10);
@@ -310,9 +319,6 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
fill_amd_cache(infos, 2, 3, ecx); /* L2u */
if (edx & 0xf000)
fill_amd_cache(infos, 3, 3, edx); /* L3u */
- /* FIXME: AMD MagnyCours family 0x10 model 0x9 with 8 cores or more actually
- * have the L3 split in two halves, and associativity is divided as well (48)
- */
}
}
@@ -320,6 +326,7 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
* (not supported on AMD)
*/
if (cpuid_type != amd && highest_cpuid >= 0x04) {
+ unsigned level;
for (cachenum = 0; ; cachenum++) {
unsigned type;
eax = 0x04;
@@ -332,6 +339,10 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
if (type == 0)
break;
+ level = (eax >> 5) & 0x7;
+ if (data->is_knl && level == 3)
+ /* KNL reports wrong L3 information (size always 0, cpuset always the entire machine, ignore it */
+ break;
infos->numcaches++;
if (!cachenum) {
@@ -358,9 +369,13 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
if (type == 0)
break;
+ level = (eax >> 5) & 0x7;
+ if (data->is_knl && level == 3)
+ /* KNL reports wrong L3 information (size always 0, cpuset always the entire machine, ignore it */
+ break;
cache->type = type;
- cache->level = (eax >> 5) & 0x7;
+ cache->level = level;
cache->nbthreads_sharing = ((eax >> 14) & 0xfff) + 1;
cache->linesize = linesize = (ebx & 0xfff) + 1;
@@ -373,6 +388,7 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
cache->ways = ways;
cache->sets = sets = ecx + 1;
cache->size = linesize * linepart * ways * sets;
+ cache->inclusive = edx & 0x2;
hwloc_debug("cache %u type %u L%u t%u c%u linesize %lu linepart %lu ways %lu sets %lu, size %uKB\n", cachenum, cache->type, cache->level, cache->nbthreads_sharing, infos->max_nbcores, linesize, linepart, ways, sets, cache->size >> 10);
@@ -430,6 +446,48 @@ static void look_proc(struct hwloc_backend *backend, struct procinfo *infos, uns
}
}
+ /* Now that we have all info, compute cacheids and apply quirks */
+ for (cachenum = 0; cachenum < infos->numcaches; cachenum++) {
+ struct cacheinfo *cache = &infos->cache[cachenum];
+
+ /* default cacheid value */
+ cache->cacheid = infos->apicid / cache->nbthreads_sharing;
+
+ /* AMD quirk */
+ if (cpuid_type == amd
+ && infos->cpufamilynumber== 0x10 && infos->cpumodelnumber == 0x9
+ && cache->level == 3
+ && (cache->ways == -1 || (cache->ways % 2 == 0)) && cache->nbthreads_sharing >= 8) {
+ /* Fix AMD family 0x10 model 0x9 (Magny-Cours) with 8 or 12 cores.
+ * The L3 (and its associativity) is actually split into two halves).
+ */
+ if (cache->nbthreads_sharing == 16)
+ cache->nbthreads_sharing = 12; /* nbthreads_sharing is a power of 2 but the processor actually has 8 or 12 cores */
+ cache->nbthreads_sharing /= 2;
+ cache->size /= 2;
+ if (cache->ways != -1)
+ cache->ways /= 2;
+ /* AMD Magny-Cours 12-cores processor reserve APIC ids as AAAAAABBBBBB....
+ * among first L3 (A), second L3 (B), and unexisting cores (.).
+ * On multi-socket servers, L3 in non-first sockets may have APIC id ranges
+ * such as [16-21] that are not aligned on multiple of nbthreads_sharing (6).
+ * That means, we can't just compare apicid/nbthreads_sharing to identify siblings.
+ */
+ cache->cacheid = (infos->apicid % infos->max_log_proc) / cache->nbthreads_sharing /* cacheid within the package */
+ + 2 * (infos->apicid / infos->max_log_proc); /* add 2 caches per previous package */
+
+ } else if (cpuid_type == amd
+ && infos->cpufamilynumber == 0x15
+ && (infos->cpumodelnumber == 0x1 /* Bulldozer */ || infos->cpumodelnumber == 0x2 /* Piledriver */)
+ && cache->level == 3 && cache->nbthreads_sharing == 6) {
+ /* AMD Bulldozer and Piledriver 12-core processors have same APIC ids as Magny-Cours above,
+ * but we can't merge the checks because the original nbthreads_sharing must be exactly 6 here.
+ */
+ cache->cacheid = (infos->apicid % infos->max_log_proc) / cache->nbthreads_sharing /* cacheid within the package */
+ + 2 * (infos->apicid / infos->max_log_proc); /* add 2 cache per previous package */
+ }
+ }
+
if (hwloc_bitmap_isset(data->apicid_set, infos->apicid))
data->apicid_unique = 0;
else
@@ -620,6 +678,7 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
}
unit = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, unitid);
unit->cpuset = unit_cpuset;
+ hwloc_obj_add_info(unit, "Type", "ComputeUnit");
hwloc_debug_1arg_bitmap("os unit %u has cpuset %s\n",
unitid, unit_cpuset);
hwloc_insert_object_by_cpuset(topology, unit);
@@ -696,6 +755,20 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
hwloc_bitmap_free(cores_cpuset);
}
+ /* Look for PUs */
+ if (fulldiscovery) {
+ unsigned i;
+ hwloc_debug("%s", "\n\n * CPU cpusets *\n\n");
+ for (i=0; i<nbprocs; i++)
+ if(infos[i].present) { /* Only add present PU. We don't know if others actually exist */
+ struct hwloc_obj *obj = hwloc_alloc_setup_object(HWLOC_OBJ_PU, i);
+ obj->cpuset = hwloc_bitmap_alloc();
+ hwloc_bitmap_only(obj->cpuset, i);
+ hwloc_debug_1arg_bitmap("PU %u has cpuset %s\n", i, obj->cpuset);
+ hwloc_insert_object_by_cpuset(topology, obj);
+ }
+ }
+
/* Look for caches */
/* First find max level */
level = 0;
@@ -703,18 +776,14 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
for (j = 0; j < infos[i].numcaches; j++)
if (infos[i].cache[j].level > level)
level = infos[i].cache[j].level;
-
- /* Look for known types */
- if (fulldiscovery) while (level > 0) {
+ while (level > 0) {
for (type = 1; type <= 3; type++) {
/* Look for caches of that type at level level */
{
hwloc_bitmap_t caches_cpuset = hwloc_bitmap_dup(complete_cpuset);
- hwloc_bitmap_t cache_cpuset;
hwloc_obj_t cache;
while ((i = hwloc_bitmap_first(caches_cpuset)) != (unsigned) -1) {
- unsigned packageid = infos[i].packageid;
for (l = 0; l < infos[i].numcaches; l++) {
if (infos[i].cache[l].level == level && infos[i].cache[l].type == type)
@@ -726,9 +795,12 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
continue;
}
- /* Found a matching cache, now look for others sharing it */
- {
- unsigned cacheid = infos[i].apicid / infos[i].cache[l].nbthreads_sharing;
+ if (fulldiscovery) {
+ /* Add caches */
+ hwloc_bitmap_t cache_cpuset;
+ unsigned packageid = infos[i].packageid;
+ unsigned cacheid = infos[i].cache[l].cacheid;
+ /* Found a matching cache, now look for others sharing it */
cache_cpuset = hwloc_bitmap_alloc();
for (j = i; j < nbprocs; j++) {
@@ -742,7 +814,7 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
hwloc_bitmap_clr(caches_cpuset, j);
continue;
}
- if (infos[j].packageid == packageid && infos[j].apicid / infos[j].cache[l2].nbthreads_sharing == cacheid) {
+ if (infos[j].packageid == packageid && infos[j].cache[l2].cacheid == cacheid) {
hwloc_bitmap_set(cache_cpuset, j);
hwloc_bitmap_clr(caches_cpuset, j);
}
@@ -764,9 +836,31 @@ static void summarize(struct hwloc_backend *backend, struct procinfo *infos, int
break;
}
cache->cpuset = cache_cpuset;
+ hwloc_obj_add_info(cache, "Inclusive", infos[i].cache[l].inclusive ? "1" : "0");
hwloc_debug_2args_bitmap("os L%u cache %u has cpuset %s\n",
level, cacheid, cache_cpuset);
hwloc_insert_object_by_cpuset(topology, cache);
+
+ } else {
+ /* Annotate existing caches */
+ hwloc_bitmap_t set = hwloc_bitmap_alloc();
+ hwloc_obj_t cache = NULL;
+ int depth;
+ hwloc_bitmap_set(set, i);
+ depth = hwloc_get_cache_type_depth(topology, level,
+ type == 1 ? HWLOC_OBJ_CACHE_DATA : type == 2 ? HWLOC_OBJ_CACHE_INSTRUCTION : HWLOC_OBJ_CACHE_UNIFIED);
+ if (depth != HWLOC_TYPE_DEPTH_UNKNOWN)
+ cache = hwloc_get_next_obj_covering_cpuset_by_depth(topology, set, depth, NULL);
+ hwloc_bitmap_free(set);
+ if (cache) {
+ /* Found cache above that PU, annotate if no such attribute yet */
+ if (!hwloc_obj_get_info_by_name(cache, "Inclusive"))
+ hwloc_obj_add_info(cache, "Inclusive", infos[i].cache[l].inclusive ? "1" : "0");
+ hwloc_bitmap_andnot(caches_cpuset, caches_cpuset, cache->cpuset);
+ } else {
+ /* No cache above that PU?! */
+ hwloc_bitmap_clr(caches_cpuset, i);
+ }
}
}
hwloc_bitmap_free(caches_cpuset);
@@ -948,6 +1042,7 @@ int hwloc_look_x86(struct hwloc_backend *backend, int fulldiscovery)
if (highest_cpuid >= 0x7) {
eax = 0x7;
+ ecx = 0;
hwloc_x86_cpuid(&eax, &ebx, &ecx, &edx);
features[9] = ebx;
}
@@ -1021,11 +1116,11 @@ hwloc_x86_discover(struct hwloc_backend *backend)
}
fulldiscovery:
- hwloc_look_x86(backend, 1);
- /* if failed, just continue and create PUs */
-
- if (!alreadypus)
- hwloc_setup_pu_level(topology, data->nbprocs);
+ if (hwloc_look_x86(backend, 1) < 0) {
+ /* if failed, create PUs */
+ if (!alreadypus)
+ hwloc_setup_pu_level(topology, data->nbprocs);
+ }
hwloc_obj_add_info(topology->levels[0][0], "Backend", "x86");
@@ -1075,6 +1170,7 @@ hwloc_x86_component_instantiate(struct hwloc_disc_component *component,
backend->disable = hwloc_x86_backend_disable;
/* default values */
+ data->is_knl = 0;
data->apicid_set = hwloc_bitmap_alloc();
data->apicid_unique = 1;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c
index ce3250c..46fe4ae 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-libxml.c
@@ -257,7 +257,8 @@ hwloc_libxml_import_diff(struct hwloc__xml_import_state_s *state, const char *xm
if (state->global->next_attr(state, &attrname, &attrvalue) < 0)
break;
if (!strcmp(attrname, "refname")) {
- free(refname);
+ if (refname)
+ free(refname);
refname = strdup(attrvalue);
} else
goto out_with_doc;
@@ -266,13 +267,15 @@ hwloc_libxml_import_diff(struct hwloc__xml_import_state_s *state, const char *xm
ret = hwloc__xml_import_diff(state, firstdiffp);
if (refnamep && !ret)
*refnamep = refname;
- else
+ else if (refname)
free(refname);
xmlFreeDoc(doc);
return ret;
out_with_doc:
+ if (refname)
+ free(refname);
xmlFreeDoc(doc);
out:
return -1; /* failed */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c
index a93d9d4..ba52208 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml-nolibxml.c
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -48,7 +48,7 @@ static int
hwloc__nolibxml_import_next_attr(hwloc__xml_import_state_t state, char **namep, char **valuep)
{
hwloc__nolibxml_import_state_data_t nstate = (void*) state->data;
- int namelen;
+ size_t namelen;
size_t len, escaped;
char *buffer, *value, *end;
@@ -116,7 +116,7 @@ hwloc__nolibxml_import_find_child(hwloc__xml_import_state_t state,
hwloc__nolibxml_import_state_data_t nchildstate = (void*) childstate->data;
char *buffer = nstate->tagbuffer;
char *end;
- int namelen;
+ size_t namelen;
childstate->parent = state;
childstate->global = state->global;
@@ -502,7 +502,7 @@ hwloc__nolibxml_export_update_buffer(hwloc__nolibxml_export_state_data_t ndata,
if (res >= 0) {
ndata->written += res;
if (res >= (int) ndata->remaining)
- res = ndata->remaining>0 ? ndata->remaining-1 : 0;
+ res = ndata->remaining>0 ? (int)ndata->remaining-1 : 0;
ndata->buffer += res;
ndata->remaining -= res;
}
@@ -511,7 +511,7 @@ hwloc__nolibxml_export_update_buffer(hwloc__nolibxml_export_state_data_t ndata,
static char *
hwloc__nolibxml_export_escape_string(const char *src)
{
- int fulllen, sublen;
+ size_t fulllen, sublen;
char *escaped, *dst;
fulllen = strlen(src);
@@ -675,15 +675,15 @@ hwloc_nolibxml_export_buffer(hwloc_topology_t topology, char **bufferp, int *buf
bufferlen = 16384; /* random guess for large enough default */
buffer = malloc(bufferlen);
- res = hwloc___nolibxml_prepare_export(topology, buffer, bufferlen);
+ res = hwloc___nolibxml_prepare_export(topology, buffer, (int)bufferlen);
if (res > bufferlen) {
buffer = realloc(buffer, res);
- hwloc___nolibxml_prepare_export(topology, buffer, res);
+ hwloc___nolibxml_prepare_export(topology, buffer, (int)res);
}
*bufferp = buffer;
- *buflenp = res;
+ *buflenp = (int)res;
return 0;
}
@@ -709,7 +709,7 @@ hwloc_nolibxml_export_file(hwloc_topology_t topology, const char *filename)
}
}
- ret = fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
+ ret = (int)fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
if (ret == bufferlen-1) {
ret = 0;
} else {
@@ -767,15 +767,15 @@ hwloc_nolibxml_export_diff_buffer(hwloc_topology_diff_t diff, const char *refnam
bufferlen = 16384; /* random guess for large enough default */
buffer = malloc(bufferlen);
- res = hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, bufferlen);
+ res = hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, (int)bufferlen);
if (res > bufferlen) {
buffer = realloc(buffer, res);
- hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, res);
+ hwloc___nolibxml_prepare_export_diff(diff, refname, buffer, (int)res);
}
*bufferp = buffer;
- *buflenp = res;
+ *buflenp = (int)res;
return 0;
}
@@ -801,7 +801,7 @@ hwloc_nolibxml_export_diff_file(hwloc_topology_diff_t diff, const char *refname,
}
}
- ret = fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
+ ret = (int)fwrite(buffer, 1, bufferlen-1 /* don't write the ending \0 */, file);
if (ret == bufferlen-1) {
ret = 0;
} else {
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
index 8cf584d..52b7ddc 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-xml.c
@@ -998,6 +998,7 @@ hwloc_topology_diff_load_xml(hwloc_topology_t topology __hwloc_attribute_unused,
fakedata.msgprefix = strdup(basename);
if (!hwloc_libxml_callbacks && !hwloc_nolibxml_callbacks) {
+ free(fakedata.msgprefix);
errno = ENOSYS;
return -1;
}
@@ -1040,6 +1041,7 @@ hwloc_topology_diff_load_xmlbuffer(hwloc_topology_t topology __hwloc_attribute_u
fakedata.msgprefix = strdup("xmldiffbuffer");
if (!hwloc_libxml_callbacks && !hwloc_nolibxml_callbacks) {
+ free(fakedata.msgprefix);
errno = ENOSYS;
return -1;
}
@@ -1061,6 +1063,7 @@ hwloc_topology_diff_load_xmlbuffer(hwloc_topology_t topology __hwloc_attribute_u
}
hwloc_localeswitch_fini();
+
free(fakedata.msgprefix);
return ret;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
index 1636730..028c226 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c
@@ -132,6 +132,7 @@ int hwloc_get_sysctl(int name[], unsigned namelen, int *ret)
reading sysfs on Linux, this method is not virtualizable; thus it's only
used as a fall-back method, allowing `hwloc_set_fsroot ()' to
have the desired effect. */
+#ifndef HWLOC_WIN_SYS /* The windows implementation is in topology-windows.c */
unsigned
hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
int n;
@@ -157,10 +158,6 @@ hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
static int name[2] = {CTL_HW, HW_NPCU};
if (hwloc_get_sysctl(name, sizeof(name)/sizeof(*name)), &n)
n = -1;
-#elif defined(HWLOC_WIN_SYS)
- SYSTEM_INFO sysinfo;
- GetSystemInfo(&sysinfo);
- n = sysinfo.dwNumberOfProcessors;
#else
#ifdef __GNUC__
#warning No known way to discover number of available processors on this system
@@ -174,6 +171,7 @@ hwloc_fallback_nbprocessors(struct hwloc_topology *topology) {
n = 1;
return n;
}
+#endif /* !HWLOC_WIN_SYS */
/*
* Use the given number of processors and the optional online cpuset if given
@@ -351,9 +349,8 @@ void hwloc_obj_add_info_nodup(hwloc_obj_t obj, const char *name, const char *val
/* Get pointer to next childect. */ \
child = *pchild)
-/* Free an object and all its content. */
-void
-hwloc_free_unlinked_object(hwloc_obj_t obj)
+static void
+hwloc__free_object_contents(hwloc_obj_t obj)
{
switch (obj->type) {
default:
@@ -372,9 +369,34 @@ hwloc_free_unlinked_object(hwloc_obj_t obj)
hwloc_bitmap_free(obj->nodeset);
hwloc_bitmap_free(obj->complete_nodeset);
hwloc_bitmap_free(obj->allowed_nodeset);
+}
+
+/* Free an object and all its content. */
+void
+hwloc_free_unlinked_object(hwloc_obj_t obj)
+{
+ hwloc__free_object_contents(obj);
free(obj);
}
+/* Replace old with contents of new object, and make new freeable by the caller.
+ * Only updates next_sibling/first_child pointers,
+ * so may only be used during early discovery.
+ */
+static void
+hwloc_replace_linked_object(hwloc_obj_t old, hwloc_obj_t new)
+{
+ /* drop old fields */
+ hwloc__free_object_contents(old);
+ /* copy old tree pointers to new */
+ new->next_sibling = old->next_sibling;
+ new->first_child = old->first_child;
+ /* copy new contents to old now that tree pointers are OK */
+ memcpy(old, new, sizeof(*old));
+ /* clear new to that we may free it */
+ memset(new, 0,sizeof(*new));
+}
+
/* insert the (non-empty) list of sibling starting at firstnew as new children of newparent,
* and return the address of the pointer to the next one
*/
@@ -755,21 +777,56 @@ static int
hwloc_obj_cmp_sets(hwloc_obj_t obj1, hwloc_obj_t obj2)
{
hwloc_bitmap_t set1, set2;
+ int res = HWLOC_OBJ_DIFFERENT;
- /* compare cpusets if possible, or fallback to nodeset, or return */
- if (obj1->cpuset && !hwloc_bitmap_iszero(obj1->cpuset)
- && obj2->cpuset && !hwloc_bitmap_iszero(obj2->cpuset)) {
+ /* compare cpusets first */
+ if (obj1->complete_cpuset && obj2->complete_cpuset) {
+ set1 = obj1->complete_cpuset;
+ set2 = obj2->complete_cpuset;
+ } else {
set1 = obj1->cpuset;
set2 = obj2->cpuset;
- } else if (obj1->nodeset && !hwloc_bitmap_iszero(obj1->nodeset)
- && obj2->nodeset && !hwloc_bitmap_iszero(obj2->nodeset)) {
+ }
+ if (set1 && set2 && !hwloc_bitmap_iszero(set1) && !hwloc_bitmap_iszero(set2)) {
+ res = hwloc_bitmap_compare_inclusion(set1, set2);
+ if (res == HWLOC_OBJ_INTERSECTS)
+ return HWLOC_OBJ_INTERSECTS;
+ }
+
+ /* then compare nodesets, and combine the results */
+ if (obj1->complete_nodeset && obj2->complete_nodeset) {
+ set1 = obj1->complete_nodeset;
+ set2 = obj2->complete_nodeset;
+ } else {
set1 = obj1->nodeset;
set2 = obj2->nodeset;
- } else {
- return HWLOC_OBJ_DIFFERENT;
}
+ if (set1 && set2 && !hwloc_bitmap_iszero(set1) && !hwloc_bitmap_iszero(set2)) {
+ int noderes = hwloc_bitmap_compare_inclusion(set1, set2);
+ /* deal with conflicting cpusets/nodesets inclusions */
+ if (noderes == HWLOC_OBJ_INCLUDED) {
+ if (res == HWLOC_OBJ_CONTAINS)
+ /* contradicting order for cpusets and nodesets */
+ return HWLOC_OBJ_INTERSECTS;
+ res = HWLOC_OBJ_INCLUDED;
- return hwloc_bitmap_compare_inclusion(set1, set2);
+ } else if (noderes == HWLOC_OBJ_CONTAINS) {
+ if (res == HWLOC_OBJ_INCLUDED)
+ /* contradicting order for cpusets and nodesets */
+ return HWLOC_OBJ_INTERSECTS;
+ res = HWLOC_OBJ_CONTAINS;
+
+ } else if (noderes == HWLOC_OBJ_INTERSECTS) {
+ return HWLOC_OBJ_INTERSECTS;
+
+ } else {
+ /* nodesets are different, keep the cpuset order */
+ /* FIXME: with upcoming multiple levels of NUMA, we may have to report INCLUDED or CONTAINED here */
+
+ }
+ }
+
+ return res;
}
/* Compare object cpusets based on complete_cpuset if defined (always correctly ordered),
@@ -849,9 +906,7 @@ merge_insert_equal(hwloc_obj_t new, hwloc_obj_t old)
&new->infos, &new->infos_count);
}
- if (new->name) {
- if (old->name)
- free(old->name);
+ if (new->name && !old->name) {
old->name = new->name;
new->name = NULL;
}
@@ -860,21 +915,17 @@ merge_insert_equal(hwloc_obj_t new, hwloc_obj_t old)
switch(new->type) {
case HWLOC_OBJ_NUMANODE:
- /* Do not check these, it may change between calls */
- merge_sizes(new, old, memory.local_memory);
- merge_sizes(new, old, memory.total_memory);
- /* if both newects have a page_types array, just keep the biggest one for now */
- if (new->memory.page_types_len && old->memory.page_types_len)
- hwloc_debug("%s", "merging page_types by keeping the biggest one only\n");
- if (new->memory.page_types_len < old->memory.page_types_len) {
- free(new->memory.page_types);
- } else {
- free(old->memory.page_types);
+ if (new->memory.local_memory && !old->memory.local_memory) {
+ /* no memory in old, use new memory */
+ old->memory.local_memory = new->memory.local_memory;
+ if (old->memory.page_types)
+ free(old->memory.page_types);
old->memory.page_types_len = new->memory.page_types_len;
old->memory.page_types = new->memory.page_types;
new->memory.page_types = NULL;
new->memory.page_types_len = 0;
}
+ /* old->memory.total_memory will be updated by propagate_total_memory() */
break;
case HWLOC_OBJ_CACHE:
merge_sizes(new, old, attr->cache.size);
@@ -920,12 +971,22 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
if (res == HWLOC_OBJ_EQUAL) {
if (obj->type == HWLOC_OBJ_GROUP) {
- /* Group are ignored keep_structure. ignored always are handled earlier. Non-ignored Groups isn't possible. */
- assert(topology->ignored_types[HWLOC_OBJ_GROUP] == HWLOC_IGNORE_TYPE_KEEP_STRUCTURE);
+ /* Groups are ignored keep_structure or always. Non-ignored Groups isn't possible. */
+ assert(topology->ignored_types[HWLOC_OBJ_GROUP] != HWLOC_IGNORE_TYPE_NEVER);
/* Remove the Group now. The normal ignore code path wouldn't tell us whether the Group was removed or not.
*
- * Keep EQUAL so that the Group gets merged.
+ * The Group doesn't contain anything to keep, just let the caller free it.
*/
+ return child;
+
+ } else if (child->type == HWLOC_OBJ_GROUP) {
+
+ /* Replace the Group with the new object contents
+ * and let the caller free the new object
+ */
+ hwloc_replace_linked_object(child, obj);
+ return child;
+
} else {
/* otherwise compare actual types to decide of the inclusion */
res = hwloc_type_cmp(obj, child);
@@ -952,7 +1013,9 @@ hwloc___insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t cur
}
return NULL;
}
- /* Can be two objects with same type. Or one Group and anything else. */
+ /* Two objects with same type.
+ * Groups are handled above.
+ */
if (obj->type == child->type
&& (obj->type == HWLOC_OBJ_PU || obj->type == HWLOC_OBJ_NUMANODE)
&& obj->os_index != child->os_index) {
@@ -2131,6 +2194,12 @@ hwloc_level_filter_objects(hwloc_topology_t topology,
/* count interesting objects and allocate the new array */
for(i=0, nnew=0; i<nold; i++)
nnew += hwloc_level_filter_object(topology, NULL, old[i]);
+ if (!nnew) {
+ *objs = NULL;
+ *n_objs = 0;
+ free(old);
+ return 0;
+ }
new = malloc(nnew * sizeof(hwloc_obj_t));
if (!new) {
free(old);
@@ -2197,7 +2266,7 @@ hwloc_connect_levels(hwloc_topology_t topology)
/* don't touch next_group_depth, the Group objects are still here */
/* initialize all depth to unknown */
- for (l = HWLOC_OBJ_SYSTEM; l < HWLOC_OBJ_TYPE_MAX; l++)
+ for (l = HWLOC_OBJ_SYSTEM; l < HWLOC_OBJ_MISC; l++)
topology->type_depth[l] = HWLOC_TYPE_DEPTH_UNKNOWN;
/* initialize root type depth */
topology->type_depth[topology->levels[0][0]->type] = 0;
@@ -2207,17 +2276,14 @@ hwloc_connect_levels(hwloc_topology_t topology)
topology->bridge_level = NULL;
topology->bridge_nbobjects = 0;
topology->first_bridge = topology->last_bridge = NULL;
- topology->type_depth[HWLOC_OBJ_BRIDGE] = HWLOC_TYPE_DEPTH_BRIDGE;
free(topology->pcidev_level);
topology->pcidev_level = NULL;
topology->pcidev_nbobjects = 0;
topology->first_pcidev = topology->last_pcidev = NULL;
- topology->type_depth[HWLOC_OBJ_PCI_DEVICE] = HWLOC_TYPE_DEPTH_PCI_DEVICE;
free(topology->osdev_level);
topology->osdev_level = NULL;
topology->osdev_nbobjects = 0;
topology->first_osdev = topology->last_osdev = NULL;
- topology->type_depth[HWLOC_OBJ_OS_DEVICE] = HWLOC_TYPE_DEPTH_OS_DEVICE;
/* Start with children of the whole system. */
n_objs = topology->levels[0][0]->arity;
@@ -2345,13 +2411,20 @@ hwloc_connect_levels(hwloc_topology_t topology)
void hwloc_alloc_obj_cpusets(hwloc_obj_t obj)
{
- obj->cpuset = hwloc_bitmap_alloc_full();
- obj->complete_cpuset = hwloc_bitmap_alloc();
- obj->online_cpuset = hwloc_bitmap_alloc_full();
- obj->allowed_cpuset = hwloc_bitmap_alloc_full();
- obj->nodeset = hwloc_bitmap_alloc();
- obj->complete_nodeset = hwloc_bitmap_alloc();
- obj->allowed_nodeset = hwloc_bitmap_alloc_full();
+ if (!obj->cpuset)
+ obj->cpuset = hwloc_bitmap_alloc_full();
+ if (!obj->complete_cpuset)
+ obj->complete_cpuset = hwloc_bitmap_alloc();
+ if (!obj->online_cpuset)
+ obj->online_cpuset = hwloc_bitmap_alloc_full();
+ if (!obj->allowed_cpuset)
+ obj->allowed_cpuset = hwloc_bitmap_alloc_full();
+ if (!obj->nodeset)
+ obj->nodeset = hwloc_bitmap_alloc();
+ if (!obj->complete_nodeset)
+ obj->complete_nodeset = hwloc_bitmap_alloc();
+ if (!obj->allowed_nodeset)
+ obj->allowed_nodeset = hwloc_bitmap_alloc_full();
}
/* Main discovery loop */
@@ -2597,6 +2670,7 @@ void
hwloc_topology_setup_defaults(struct hwloc_topology *topology)
{
struct hwloc_obj *root_obj;
+ unsigned l;
/* reset support */
memset(&topology->binding_hooks, 0, sizeof(topology->binding_hooks));
@@ -2617,6 +2691,12 @@ hwloc_topology_setup_defaults(struct hwloc_topology *topology)
topology->first_bridge = topology->last_bridge = NULL;
topology->first_pcidev = topology->last_pcidev = NULL;
topology->first_osdev = topology->last_osdev = NULL;
+ /* sane values to type_depth */
+ for (l = HWLOC_OBJ_SYSTEM; l < HWLOC_OBJ_MISC; l++)
+ topology->type_depth[l] = HWLOC_TYPE_DEPTH_UNKNOWN;
+ topology->type_depth[HWLOC_OBJ_BRIDGE] = HWLOC_TYPE_DEPTH_BRIDGE;
+ topology->type_depth[HWLOC_OBJ_PCI_DEVICE] = HWLOC_TYPE_DEPTH_PCI_DEVICE;
+ topology->type_depth[HWLOC_OBJ_OS_DEVICE] = HWLOC_TYPE_DEPTH_OS_DEVICE;
/* Create the actual machine object, but don't touch its attributes yet
* since the OS backend may still change the object into something else
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c b/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
index 97b3e5b..e28bba1 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/src/traversal.c
@@ -207,7 +207,7 @@ hwloc_obj_type_of_string (const char * string)
if (!strcasecmp(string, "Cache")) return HWLOC_OBJ_CACHE;
if (!strcasecmp(string, "Core")) return HWLOC_OBJ_CORE;
if (!strcasecmp(string, "PU")) return HWLOC_OBJ_PU;
- if (!strcasecmp(string, "Bridge")) return HWLOC_OBJ_BRIDGE;
+ if (!strcasecmp(string, "Bridge") || !strcasecmp(string, "HostBridge") || !strcasecmp(string, "PCIBridge")) return HWLOC_OBJ_BRIDGE;
if (!strcasecmp(string, "PCIDev")) return HWLOC_OBJ_PCI_DEVICE;
if (!strcasecmp(string, "OSDev")) return HWLOC_OBJ_OS_DEVICE;
return (hwloc_obj_type_t) -1;
@@ -238,7 +238,9 @@ hwloc_obj_type_sscanf(const char *string, hwloc_obj_type_t *typep, int *depthatt
type = HWLOC_OBJ_PU;
} else if (!hwloc_strncasecmp(string, "misc", 2)) {
type = HWLOC_OBJ_MISC;
- } else if (!hwloc_strncasecmp(string, "bridge", 2)) {
+ } else if (!hwloc_strncasecmp(string, "bridge", 2)
+ || !hwloc_strncasecmp(string, "hostbridge", 6)
+ || !hwloc_strncasecmp(string, "pcibridge", 5)) {
type = HWLOC_OBJ_BRIDGE;
} else if (!hwloc_strncasecmp(string, "pci", 2)) {
type = HWLOC_OBJ_PCI_DEVICE;
@@ -261,7 +263,7 @@ hwloc_obj_type_sscanf(const char *string, hwloc_obj_type_t *typep, int *depthatt
}
} else if (!hwloc_strncasecmp(string, "group", 2)) {
- int length;
+ size_t length;
type = HWLOC_OBJ_GROUP;
length = strcspn(string, "0123456789");
if (length <= 5 && !hwloc_strncasecmp(string, "group", length)
@@ -499,7 +501,8 @@ hwloc_obj_type_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
case HWLOC_OBJ_OSDEV_GPU: return hwloc_snprintf(string, size, "GPU");
case HWLOC_OBJ_OSDEV_COPROC: return hwloc_snprintf(string, size, verbose ? "Co-Processor" : "CoProc");
default:
- *string = '\0';
+ if (size > 0)
+ *string = '\0';
return 0;
}
break;
@@ -552,7 +555,7 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
if (ret > 0)
prefix = separator;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -626,7 +629,7 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
if (ret > 0)
prefix = separator;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
@@ -648,7 +651,7 @@ hwloc_obj_attr_snprintf(char * __hwloc_restrict string, size_t size, hwloc_obj_t
return -1;
ret += res;
if (res >= tmplen)
- res = tmplen>0 ? tmplen - 1 : 0;
+ res = tmplen>0 ? (int)tmplen - 1 : 0;
tmp += res;
tmplen -= res;
if (ret > 0)
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c
index 3f71dc6..53e3f0c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/hwloc_backends.c
@@ -15,8 +15,15 @@
#include <errno.h>
#include <assert.h>
-#ifdef HWLOC_WIN_SYS
-#define mkstemp mktemp
+#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__)
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+static inline int mkstemp(char *name)
+{
+ mktemp(name);
+ return open(name, O_RDWR|O_CREAT, S_IRWXU);
+}
#endif
/* mostly useful with valgrind, to check if backend cleanup properly */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output
index e50dfb8..d00b2ad 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.output
@@ -116,6 +116,11 @@
</object>
</object>
</object>
+ <object type="PCIDev" os_index="32" pci_busid="0000:00:02.0" pci_type="0108 [8086:0953] [8086:3709] 01" pci_link_speed="0.000000">
+ <object type="OSDev" name="nvme0n1" osdev_type="0">
+ <info name="LinuxDeviceID" value="259:0"/>
+ </object>
+ </object>
<object type="PCIDev" os_index="64" pci_busid="0000:00:04.0" pci_type="0880 [8086:3c20] [1028:0518] 07" pci_link_speed="0.000000">
<object type="OSDev" name="dma0chan0" osdev_type="4"/>
</object>
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2
index 09d7bb9..efc086a 100644
Binary files a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 and b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 differ
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h
index 4b67abb..e029466 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/bgq/spi/include/kernel/location.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -11,4 +11,10 @@
uint32_t Kernel_ProcessorID( void );
uint32_t Kernel_MyTcoord( void );
+/* don't try to cross-build BGQ port on old Linux platforms */
+#if (!HAVE_DECL_PTHREAD_GETAFFINITY_NP) || (!HAVE_DECL_PTHREAD_SETAFFINITY_NP) || (!defined HWLOC_HAVE_CPU_SET)
+#warning Disabling BGQ port cross-build on old Linux platform
+#define HWLOC_DISABLE_BGQ_PORT_TEST
+#endif
+
#endif /* HWLOC_PORT_BGQ_KERNEL_LOCATION_H */
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
index eaf23e1..242b162 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/ports/include/windows/windows.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2009 inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2012 Université Bordeaux
* See COPYING in top-level directory.
*/
@@ -20,8 +20,9 @@ typedef unsigned char BYTE, UCHAR;
typedef unsigned short WORD, USHORT;
typedef unsigned long ULONG_PTR, DWORD_PTR, DWORD, *PDWORD, *PDWORD_PTR;
typedef const char *LPCSTR;
-typedef int (*FARPROC)();
+typedef int (*FARPROC)(void);
typedef void *PVOID,*LPVOID;
+typedef void VOID;
typedef ULONG_PTR SIZE_T;
/* This is to cope with linux using integers for hwloc_pid_t and hwloc_thread_t
@@ -65,6 +66,8 @@ BOOL GetNumaAvailableMemoryNode(UCHAR Node, PULONGLONG AvailableBytes);
typedef struct _SYSTEM_INFO {
DWORD dwPageSize;
+ DWORD_PTR dwActiveProcessorMask;
+ DWORD dwNumberOfProcessors;
} SYSTEM_INFO, *LPSYSTEM_INFO;
void WINAPI GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am
index 0519ceb..0c9ea0a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/tests/rename/Makefile.am
@@ -65,6 +65,7 @@ needed: dirs include/hwloc/autogen/config.h include/private/autogen/config.h
@if cpp $(CPPFLAGS) $(TEST_CPPFLAGS) -Iinclude -I$(HWLOC_top_srcdir)/include -I$(HWLOC_top_builddir)/include $(srcdir)/main.c \
| sed -e 's/foobar_ ## hwloc_ ## /foobar_hwloc_/g' \
| sed -e 's/FOOBAR_ ## hwloc_ ## /FOOBAR_hwloc_/g' \
+ | grep -vw HWLOC_DEBUG_VERBOSE \
| grep -vw hwloc_uint64_t \
| egrep -i '(^| |\*)hwloc_' ; then false ; else true ; fi
@echo "# done"
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am
index 08b3204..6983e7a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am
@@ -36,6 +36,16 @@ bin_PROGRAMS = \
hwloc-patch \
hwloc-ps
+if HWLOC_HAVE_LINUX
+if HWLOC_HAVE_X86
+sbin_PROGRAMS = hwloc-dump-hwdata
+endif HWLOC_HAVE_X86
+endif HWLOC_HAVE_LINUX
+
+hwloc_dump_hwdata_SOURCES = \
+ hwloc-dump-hwdata.c \
+ hwloc-dump-hwdata-knl.c
+
hwloc_calc_SOURCES = \
hwloc-calc.h \
hwloc-calc.c
@@ -78,6 +88,13 @@ man1_pages = \
hwloc-info.1 \
hwloc-patch.1 \
hwloc-ps.1
+
+if HWLOC_HAVE_LINUX
+if HWLOC_HAVE_X86
+man1_pages += hwloc-dump-hwdata.1in
+endif HWLOC_HAVE_X86
+endif HWLOC_HAVE_LINUX
+
EXTRA_DIST += $(man1_pages:.1=.1in)
nodist_man_MANS += $(man1_pages)
@@ -90,6 +107,16 @@ if HWLOC_HAVE_LINUX
nodist_man_MANS += $(hgt_page)
endif HWLOC_HAVE_LINUX
+# Same for dump-hwdata page on Linux/x86
+hdh_page = hwloc-dump-hwdata.1
+EXTRA_DIST += $(hdh_page:.1=.1in)
+if HWLOC_HAVE_LINUX
+if HWLOC_HAVE_X86
+nodist_man_MANS += $(hdh_page)
+endif HWLOC_HAVE_X86
+endif HWLOC_HAVE_LINUX
+
+
.1in.1:
@ echo Creating $@ man page...
@ $(SED) -e 's/#PACKAGE_NAME#/@PACKAGE_NAME@/g' \
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c
index 102821b..9ba283d 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c
@@ -7,11 +7,13 @@
#include <hwloc-calc.h>
#include <hwloc.h>
+#include "misc.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-static void usage(const char *callname __hwloc_attribute_unused, FILE *where)
+void usage(const char *callname __hwloc_attribute_unused, FILE *where)
{
fprintf(where, "Usage: hwloc-annotate [options] <input.xml> <output.xml> <location> <annotation>\n");
fprintf(where, " <location> may be:\n");
@@ -165,7 +167,7 @@ int main(int argc, char *argv[])
}
hwloc_topology_init(&topology);
- hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_WHOLE_IO|HWLOC_TOPOLOGY_FLAG_ICACHES);
+ hwloc_topology_set_flags(topology, HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM | HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES);
err = hwloc_topology_set_xml(topology, input);
if (err < 0)
goto out;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c
index 65f8ede..2dbf11c 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c
@@ -6,11 +6,13 @@
#include <private/autogen/config.h>
#include <hwloc.h>
+#include "misc.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-static void usage(char *name, FILE *where)
+void usage(const char *name, FILE *where)
{
fprintf (where, "Usage: %s [options] <output>.xml [-n <name1] <input1>.xml [-n name2] <input2>.xml ...\n", name);
fprintf (where, "Options:\n");
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c
index 3cddf1b..9191d14 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
- * Copyright © 2009-2014 Inria. All rights reserved.
+ * Copyright © 2009-2015 Inria. All rights reserved.
* Copyright © 2009-2010, 2012 Université Bordeaux
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
@@ -17,6 +17,11 @@
#include "misc.h"
+#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__)
+#include <process.h>
+#define execvp(a,b) (int)_execvp((a), (const char * const *)(b))
+#endif
+
void usage(const char *name, FILE *where)
{
fprintf(where, "Usage: %s [options] <location> -- command ...\n", name);
@@ -338,9 +343,11 @@ int main(int argc, char *argv[])
char *s;
hwloc_bitmap_asprintf(&s, membind_set);
if (pid_number > 0)
- fprintf(stderr, "hwloc_set_proc_membind %s %d failed (errno %d %s)\n", s, pid_number, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_proc_membind %s (policy %u flags %x) PID %d failed (errno %d %s)\n",
+ s, membind_policy, membind_flags, pid_number, bind_errno, errmsg);
else
- fprintf(stderr, "hwloc_set_membind %s failed (errno %d %s)\n", s, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_membind %s (policy %u flags %x) failed (errno %d %s)\n",
+ s, membind_policy, membind_flags, bind_errno, errmsg);
free(s);
}
if (ret && !force)
@@ -360,6 +367,11 @@ int main(int argc, char *argv[])
fprintf(stderr, "binding on cpu set %s\n", s);
free(s);
}
+ if (got_membind && !hwloc_bitmap_isequal(membind_set, cpubind_set)) {
+ if (verbose)
+ fprintf(stderr, "Conflicting CPU and memory binding requested, adding HWLOC_CPUBIND_NOMEMBIND flag.\n");
+ cpubind_flags |= HWLOC_CPUBIND_NOMEMBIND;
+ }
if (single)
hwloc_bitmap_singlify(cpubind_set);
if (pid_number > 0)
@@ -372,9 +384,11 @@ int main(int argc, char *argv[])
char *s;
hwloc_bitmap_asprintf(&s, cpubind_set);
if (pid_number > 0)
- fprintf(stderr, "hwloc_set_proc_cpubind %s %d failed (errno %d %s)\n", s, pid_number, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_proc_cpubind %s (flags %x) PID %d failed (errno %d %s)\n",
+ s, cpubind_flags, pid_number, bind_errno, errmsg);
else
- fprintf(stderr, "hwloc_set_cpubind %s failed (errno %d %s)\n", s, bind_errno, errmsg);
+ fprintf(stderr, "hwloc_set_cpubind %s (flags %x) failed (errno %d %s)\n",
+ s, cpubind_flags, bind_errno, errmsg);
free(s);
}
if (ret && !force)
@@ -396,6 +410,10 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
+ /* FIXME: check whether Windows execvp() passes INHERIT_PARENT_AFFINITY to CreateProcess()
+ * because we need to propagate processor group affinity. However process-wide affinity
+ * isn't supported with processor groups so far.
+ */
ret = execvp(argv[0], argv);
if (ret) {
fprintf(stderr, "%s: Failed to launch executable \"%s\"\n",
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c
index 3b4aa41..afdda1b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c
@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
char *current, *tmpline;
/* stop if line is empty */
- if (!fgets(line, len, stdin))
+ if (!fgets(line, (int)len, stdin))
break;
/* keep reading until we get EOL */
@@ -473,7 +473,7 @@ int main(int argc, char *argv[])
while (!strchr(tmpline, '\n')) {
line = realloc(line, len*2);
tmpline = line + len-1;
- if (!fgets(tmpline, len+1, stdin))
+ if (!fgets(tmpline, (int)(len+1), stdin))
break;
len *= 2;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c
index f6b9d69..8f0ba64 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013-2014 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -7,7 +7,9 @@
#include <hwloc.h>
#include <hwloc/diff.h>
-static void usage(const char *callname __hwloc_attribute_unused, FILE *where)
+#include "misc.h"
+
+void usage(const char *callname __hwloc_attribute_unused, FILE *where)
{
fprintf(where, "Usage: hwloc-diff [options] <old.xml> <new.xml> [<output.diff.xml>]\n");
fprintf(where, "Options:\n");
@@ -20,7 +22,7 @@ int main(int argc, char *argv[])
{
hwloc_topology_t topo1, topo2;
hwloc_topology_diff_t firstdiff = NULL, diff;
- unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
+ unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM | HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
char *callname, *input1, *input2, *output, *outputname, *refname = NULL;
char *xmlbuffer;
int xmlbuflen;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c
new file mode 100644
index 0000000..ac88845
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c
@@ -0,0 +1,462 @@
+/*
+ * Copyright © 2015-2016, 2015 Intel
+ * Copyright © 2015 Inria. All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#define KERNEL_SMBIOS_SYSFS "/sys/firmware/dmi/entries"
+
+#define KNL_SMBIOS_GROUP_STRING "Group: Knights Landing Information"
+
+/* Header is common part of all SMBIOS entries */
+struct smbios_header
+{
+ uint8_t type;
+ uint8_t length;
+ uint16_t handle;
+};
+
+struct smbios_group
+{
+ uint8_t group_name;
+};
+
+/* This structrures are padded by compiler
+ * So we hardcode size of the struct and use it
+ * instead of sizeof() */
+#define GROUP_ENTRY_SIZE 3
+struct smbios_group_entry
+{
+ uint8_t type;
+ uint16_t handle;
+};
+
+/* KNL header is similar as SMBIOS header
+ * decided to add it for readability */
+#define SMBIOS_KNL_HEADER_SIZE 7
+struct knl_smbios_header
+{
+ uint8_t type;
+ uint8_t length;
+ uint16_t handle;
+ uint16_t member_id;
+ uint8_t member_name;
+};
+
+/* general info data */
+#define SMBIOS_KNL_GENERAL_INFO_SIZE 5
+struct knl_general_info
+{
+ uint8_t supp_cluster_mode;
+ uint8_t cluster_mode;
+ uint8_t supp_memory_mode;
+ uint8_t memory_mode;
+ uint8_t cache_info;
+};
+
+/* memory info */
+#define SMBIOS_KNL_EDC_INFO_SIZE 9
+struct knl_edc_info
+{
+ uint8_t mcdram_present;
+ uint8_t mcdram_enabled;
+ uint8_t allowed_channels;
+ uint8_t reserved[4];
+ uint8_t mcdram_info_size;
+ uint8_t mcdram_info_count;
+};
+
+/* mcdram controller structure */
+struct knl_mcdram_info {
+ uint32_t status;
+ uint8_t controller;
+ uint8_t channel;
+ uint16_t size64MB;
+ uint8_t product_revision;
+ uint8_t fwmajor_revision;
+ uint8_t fwminor_revision;
+ uint8_t fwpatch_revision;
+};
+
+/* internal data */
+struct parser_data
+{
+ uint64_t mcdram_regular;
+ uint64_t mcdram_cache;
+ int cluster_mode;
+ int memory_mode;
+ int cache_info;
+ int type_count;
+ int knl_types[64];
+};
+
+enum cluster_mode
+{
+ QUADRANT = 1,
+ HEMISPHERE = 2,
+ SNC4 = 4,
+ SNC2 = 8,
+ ALL2ALL = 16
+};
+
+enum memory_mode
+{
+ CACHE = 1,
+ FLAT = 2,
+ HYBRID = 4
+};
+
+
+static int get_file_buffer(const char *file, char *buffer, int size)
+{
+ FILE *f;
+
+ if (!buffer) {
+ fprintf(stderr, "Unable to allocate buffer\n");
+ return 0;
+ }
+
+ f = fopen(file, "rb");
+ if (!f) {
+ fprintf(stderr, "Unable to open %s (%s)\n", file, strerror(errno));
+ return 0;
+ }
+
+ printf(" File = %s, size = %d\n", file, size);
+
+ size = fread(buffer, 1, size, f);
+ if (size == 0) {
+ fprintf(stderr, "Unable to read file\n");
+ fclose(f);
+ return 0;
+ }
+
+ fclose(f);
+ return size;
+}
+
+static int is_knl_entry(struct smbios_header *h, const char *end, const char *query)
+{
+ char *group_strings = (char*)h + h->length;
+ do {
+ int len = strlen(group_strings);
+ if (!strncmp(group_strings, query, len))
+ return 1;
+ /* SMBIOS string entries end with "\0\0"
+ * if length is 0 break and return
+ * */
+ if (len == 0)
+ break;
+ group_strings += len;
+ } while(group_strings < end);
+
+ return 0;
+}
+
+static int is_knl_group(struct smbios_header *h, const char *end)
+{
+ if (h->type != 14) {
+ fprintf(stderr, "SMBIOS table is not group table\n");
+ return -1;
+ }
+
+ return is_knl_entry(h, end, KNL_SMBIOS_GROUP_STRING);
+}
+
+#define KNL_MEMBER_ID_GENERAL 0x1
+#define KNL_MEMBER_ID_EDC 0x2
+
+#define PATH_SIZE 512
+#define SMBIOS_FILE_BUF_SIZE 4096
+
+static int process_smbios_group(const char *input_fsroot, char *dir_name, struct parser_data *data)
+{
+ char path[PATH_SIZE];
+ char file_buf[SMBIOS_FILE_BUF_SIZE];
+ struct smbios_header *h;
+ char *p;
+ char *end;
+ int size;
+ int i;
+ snprintf(path, PATH_SIZE-1, "%s/" KERNEL_SMBIOS_SYSFS "/%s/raw", input_fsroot, dir_name);
+ path[PATH_SIZE-1] = 0;
+
+ size = get_file_buffer(path, file_buf, SMBIOS_FILE_BUF_SIZE);
+ if (!size) {
+ fprintf(stderr, "Unable to read raw table file\n");
+ return -1;
+ }
+
+ h = (struct smbios_header*)file_buf;
+ end = file_buf+size;
+ if (!is_knl_group(h, end)) {
+ fprintf(stderr, "SMBIOS table does not contain KNL entries\n");
+ return -1;
+ }
+
+ p = file_buf + sizeof(struct smbios_header) + sizeof(struct smbios_group);
+ if ((char*)p >= end) {
+ fprintf(stderr, "SMBIOS table does not have entries\n");
+ return -1;
+ }
+
+ end = file_buf+h->length;
+
+ i = 0;
+ for (; p < end; i++, p+=3) {
+ struct smbios_group_entry *e = (struct smbios_group_entry*)p;
+ data->knl_types[i] = e->type;
+ printf(" Found KNL type = %d\n", e->type);
+ }
+
+ data->type_count = i;
+ return 0;
+}
+
+static int process_knl_entry(const char *input_fsroot, char *dir_name, struct parser_data *data)
+{
+ char path[PATH_SIZE];
+ char file_buf[SMBIOS_FILE_BUF_SIZE];
+ char *end;
+ int size;
+ struct knl_smbios_header *h;
+
+ snprintf(path, PATH_SIZE-1, "%s/" KERNEL_SMBIOS_SYSFS "/%s/raw", input_fsroot, dir_name);
+ path[PATH_SIZE-1] = 0;
+
+ size = get_file_buffer(path, file_buf, SMBIOS_FILE_BUF_SIZE);
+ if (!size) {
+ fprintf(stderr, "Unable to read raw table file\n");
+ return -1;
+ }
+
+ end = file_buf+size;
+ h = (struct knl_smbios_header*)file_buf;
+ if (h->member_id & KNL_MEMBER_ID_GENERAL) {
+ struct knl_general_info *info =
+ (struct knl_general_info*) (file_buf+SMBIOS_KNL_HEADER_SIZE);
+ printf(" Getting general KNL info\n");
+ data->cluster_mode = info->cluster_mode;
+ data->memory_mode = info->memory_mode;
+ data->cache_info = info->cache_info;
+ } else if (h->member_id & KNL_MEMBER_ID_EDC) {
+ struct knl_edc_info *info = (struct knl_edc_info*)(file_buf+SMBIOS_KNL_HEADER_SIZE);
+ if (info->mcdram_present && info->mcdram_enabled) {
+ struct knl_mcdram_info *mi = (struct knl_mcdram_info*)(info + 1);
+ /* we use always smbios size not struct size
+ * as it can change in future.*/
+ int struct_size = info->mcdram_info_size;
+ int i = 0;
+
+ if (0 == struct_size) {
+ printf(" MCDRAM info size is set to 0, falling back to known size\n");
+ struct_size = sizeof(*mi);
+ }
+ printf(" Getting MCDRAM KNL info. Count=%d struct size=%d\n",
+ (int)info->mcdram_info_count, struct_size);
+ for ( ; i < info->mcdram_info_count; i++) {
+ if ((char*)mi >= end) {
+ fprintf(stderr, "SMBIOS KNL entry is too small\n");
+ return -1;
+ }
+ printf(" MCDRAM controller %d\n", mi->controller);
+ if (mi->status & 0x1) {
+ printf(" Controller fused\n");
+ } else {
+ data->mcdram_regular += mi->size64MB;
+ printf(" Size = %d MB\n", (int)mi->size64MB*64);
+ }
+ mi = (struct knl_mcdram_info*)(((char*)mi)+struct_size);
+ }
+ /* convert to bytes */
+ printf(" Total MCDRAM %llu MB\n", (long long unsigned int)data->mcdram_regular*64);
+ data->mcdram_regular *= 64*1024*1024;
+ } else {
+ data->mcdram_regular = 0;
+ data->mcdram_cache = 0;
+ }
+
+ } else {
+ /* We skip unknown table */
+ fprintf(stderr, "Ignoring unknown SMBIOS entry type=%x\n", h->member_id);
+ }
+
+ return 0;
+}
+
+static int print_result(struct parser_data *data, const char *out_file)
+{
+ int node_count = 0;
+ int fd;
+ FILE *f;
+
+ switch (data->cluster_mode) {
+ case QUADRANT:
+ node_count = 1;
+ printf(" Cluster mode: Quadrant\n");
+ break;
+ case HEMISPHERE:
+ node_count = 1;
+ printf(" Cluster mode: Hemisphere\n");
+ break;
+ case ALL2ALL:
+ node_count = 1;
+ printf(" Cluster mode: All2All\n");
+ break;
+ case SNC2:
+ node_count = 2;
+ printf(" Cluster mode: SNC-2\n");
+ break;
+ case SNC4:
+ node_count = 4;
+ printf(" Cluster mode: SNC-4\n");
+ break;
+ default:
+ fprintf(stderr, "Incorrect cluster mode %d\n", data->cluster_mode);
+ return -1;
+ }
+
+ switch (data->memory_mode) {
+ case CACHE:
+ printf(" Memory Mode: Cache\n");
+ data->mcdram_cache = data->mcdram_regular;
+ data->mcdram_regular = 0;
+ break;
+ case FLAT:
+ printf(" Memory Mode: Flat\n");
+ printf(" Flat Mode: No MCDRAM cache available, nothing to dump.\n");
+ return 0;
+ case HYBRID:
+ printf(" Memory Mode: Hybrid");
+
+ if (data->cache_info == 0x1) {
+ printf("25\n");
+ data->mcdram_cache = data->mcdram_regular/4;
+ } else if (data->cache_info == 0x2) {
+ printf("50\n");
+ data->mcdram_cache = data->mcdram_regular/2;
+ } else if (data->cache_info == 0x4) {
+ printf("100\n");
+ data->mcdram_cache = data->mcdram_regular;
+ } else {
+ fprintf(stderr, "SMBIOS reserved cache info value %d\n", data->cache_info);
+ return -1;
+ }
+ data->mcdram_regular -= data->mcdram_cache;
+ break;
+ default:
+ fprintf(stderr, "Incorrect memory mode %d\n", data->memory_mode);
+ return -1;
+ }
+
+ printf(" MCDRAM total = %llu bytes, cache = %llu bytes\n",
+ (long long unsigned int)data->mcdram_regular,
+ (long long unsigned int)data->mcdram_cache);
+ data->mcdram_regular /= node_count;
+ data->mcdram_cache /= node_count;
+ printf(" MCDRAM total = %llu bytes, cache = %llu bytes per node\n",
+ (long long unsigned int)data->mcdram_regular, (long long unsigned int)data->mcdram_cache);
+
+ /* Now we can start printing stuff */
+ /* use open+fdopen so that we can specify the file creation mode */
+ fd = open(out_file, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ if (fd < 0) {
+ fprintf(stderr, "Unable to open file `%s' (%s).\n", out_file, strerror(errno));
+ return -1;
+ }
+ f = fdopen(fd, "w");
+ if (!f) {
+ fprintf(stderr, "Unable to fdopen file `%s' (%s).\n", out_file, strerror(errno));
+ close(fd);
+ return -1;
+ }
+
+ fprintf(f, "version: 1\n");
+ /* We cache is equal for node */
+ fprintf(f, "cache_size: %llu\n",
+ (long long unsigned int)data->mcdram_cache);
+ fprintf(f, "associativity: 1\n");// direct-mapped cache
+ fprintf(f, "inclusiveness: 1\n");// inclusive cache
+ fprintf(f, "line_size: 64\n");
+ fflush(f);
+ fclose(f);
+ close(fd);
+ return 0;
+}
+
+/**
+* Seeks SMBIOS sysfs for entry with type
+*/
+int hwloc_dump_hwdata_knl_smbios(const char *input_fsroot, const char *outfile);
+
+int hwloc_dump_hwdata_knl_smbios(const char *input_fsroot, const char *outfile)
+{
+ DIR *d;
+ int i;
+ struct dirent *dir;
+ struct parser_data data = { 0 };
+ char path[PATH_SIZE];
+ int err;
+
+ printf("Dumping KNL SMBIOS Memory-Side Cache information:\n");
+
+ snprintf(path, PATH_SIZE-1, "%s/" KERNEL_SMBIOS_SYSFS, input_fsroot);
+ path[PATH_SIZE-1] = 0;
+
+ d = opendir(path);
+ if (!d)
+ return -1;
+
+ /* process KNL entries
+ * start with group (type 14, dash os to omit 140 types) then find SMBIOS types for
+ * Knights Landing mcdram indofrmation
+ */
+ while ((dir = readdir(d))) {
+ if (strncmp("14-", dir->d_name, 3) == 0) {
+ err = process_smbios_group(input_fsroot, dir->d_name, &data);
+ if (err < 0) {
+ closedir(d);
+ return err;
+ }
+ }
+ }
+
+ if (!data.type_count) {
+ printf (" Couldn't find any KNL information.\n");
+ closedir(d);
+ return 0;
+ }
+
+ /* We probably have KNL type identifiers here */
+ for (i = 0; i < data.type_count; i++) {
+ char tab[16] = {0};
+ int l = snprintf(tab, sizeof(tab)-1, "%d-", data.knl_types[i]);
+ printf (" Seeking dir ̀`%s' %d\n", tab, l);
+ rewinddir(d);
+ while ((dir = readdir(d))) {
+ if (strncmp(dir->d_name, tab, l) == 0) {
+ err = process_knl_entry(input_fsroot, dir->d_name, &data);
+ if (err < 0) {
+ closedir(d);
+ return err;
+ }
+ }
+ }
+ }
+
+ closedir(d);
+
+ return print_result(&data, outfile);
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in
new file mode 100644
index 0000000..5c6ec3a
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in
@@ -0,0 +1,69 @@
+.\" -*- nroff -*-
+.\" Copyright © 2015 Inria. All rights reserved.
+.\" See COPYING in top-level directory.
+.TH HWLOC-DUMP-HWDATA "1" "#HWLOC_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
+.SH NAME
+hwloc-dump-hwdata \- Dump topology and locality information from hardware tables
+.
+.\" **************************
+.\" Synopsis Section
+.\" **************************
+.SH SYNOPSIS
+.
+.B hwloc-dump-hwdata
+[\fIoptions\fR]
+.
+.\" **************************
+.\" Options Section
+.\" **************************
+.SH OPTIONS
+.
+.TP 10
+\fB\-o <dir>\fR
+save output files to directory <dir> instead of the default
+\fI/var/run/hwloc/\fR.
+.
+.\" **************************
+.\" Description Section
+.\" **************************
+.SH DESCRIPTION
+.
+hwloc may benefit from some locality and topology information from
+SMBIOS or ACPI tables.
+They are accessible from raw hardware files under directories such
+/sys/firmware/dmi/ or /sys/firmware/acpi/ on Linux.
+These files are usually only accessible to root.
+.
+.PP
+The hwloc-dump-hwdata tool dumps the useful contents of such files into
+human-readable and world-accessible files. The intent is to run the tool
+once during boot and have the main (non-privileged) hwloc library gather
+information from these human-readable files.
+.
+.PP
+\fBhwloc-dump-hwdata is currently only useful on Intel Knights Landing
+Xeon Phi platforms\fR.
+.
+.PP
+The current list of dumped information is:
+.
+.TP 5
+\fBIntel Knights Landing memory-side cache characteristics\fR
+gathered from specific SMBIOS entries such as
+\fI/sys/firmware/dmi/entries/14-*\fR and
+\fI/sys/firmware/dmi/entries/160-*\fR,
+and saved in file \fIknl_memoryside_cache\fR.
+.
+.PP
+If the output directory is changed, you may want to set the
+HWLOC_DUMPED_HWDATA_DIR environment variable accordingly so that
+the hwloc library finds the dumped files.
+.
+.\" **************************
+.\" See also section
+.\" **************************
+.SH SEE ALSO
+.
+.ft R
+hwloc(7), lstopo(1)
+.sp
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c
new file mode 100644
index 0000000..b372c1f
--- /dev/null
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c
@@ -0,0 +1,82 @@
+/*
+ * Copyright © 2015 Intel, Inc. All rights reserved.
+ * Copyright © 2015 Inria. All rights reserved.
+ * See COPYING in top-level directory.
+ */
+
+#include <private/autogen/config.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include <assert.h>
+
+#define DEFAULT_DUMP_DIR "/var/run/hwloc"
+
+extern int hwloc_dump_hwdata_knl_smbios(const char *input_fsroot, const char *filename);
+
+static void usage(const char *name, FILE *where)
+{
+ fprintf (where, "Usage: %s [ options ] ...\n", name);
+ fprintf (where, "Options:\n");
+ fprintf (where, " -o <dir> Output files to directory <dir> instead of /var/run/hwloc/\n");
+}
+
+int main(int argc, char *argv[])
+{
+ const char *callname = argv[0];
+ char *dirname = DEFAULT_DUMP_DIR;
+ char *input_fsroot;
+ char *filename;
+ int err;
+
+ argv++; argc--;
+ while (argc) {
+ if (!strcmp(argv[0], "-h") || !strcmp(argv[0], "--help")) {
+ usage(callname, stdout);
+ exit(EXIT_SUCCESS);
+ } else if (!strcmp(argv[0], "-o")) {
+ if (argc == 1) {
+ fprintf(stderr, "Missing output directory name.\n");
+ usage(callname, stderr);
+ exit(EXIT_FAILURE);
+ }
+ dirname = argv[1];
+ argc -= 2;
+ argv += 2;
+ } else {
+ fprintf(stderr, "Unknown option: %s\n", argv[0]);
+ usage(callname, stderr);
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ err = mkdir(dirname, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
+ if (err < 0) {
+ if (errno == EEXIST) {
+ if (access(dirname, X_OK|W_OK)) {
+ fprintf(stderr, "Cannot enter and modify output directory `%s'.\n", dirname);
+ exit(EXIT_FAILURE);
+ }
+ } else {
+ fprintf(stderr, "Failed to create output directory `%s' (%s).\n", dirname, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ input_fsroot = getenv("HWLOC_FSROOT");
+ if (!input_fsroot)
+ input_fsroot = "/";
+
+ err = asprintf(&filename, "%s/knl_memoryside_cache", dirname);
+ assert(err >= 0);
+ hwloc_dump_hwdata_knl_smbios(input_fsroot, filename);
+ free(filename);
+ printf("\n");
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in
index 1cba9b3..aff7a9b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.1in
@@ -23,6 +23,9 @@ and the lstopo output for later (possibly offline) usage
\fB\-\-io\fR
Also gather I/O related files.
The gathering may be much slower, and the generated archive may be much bigger.
+\fB\-\-dmi\fR
+Also gather DMI/SMBIOS related files.
+The gathering requires root access, and the dmi-sysfs kernel module should be loaded.
.TP
\fB\-h\fR \fB\-\-help\fR
Display help message and exit
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in
index 9956208..655a83e 100755
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-gather-topology.in
@@ -21,6 +21,7 @@ LC_ALL=C
export LANG LC_ALL
gatherio=0
+gatherdmi=0
if [ ! -x "$lstopo" ]
then
@@ -40,6 +41,7 @@ usage()
echo " and the corresponding lstopo verbose output under <savepath>.output"
echo "Options:"
echo " --io Gather I/O files (takes much longer and generates much larger tarball)"
+ echo " --dmi Gather SMBIOS files. Works only when run as root. Requires dmi-sysfs kernel module"
echo "Example:"
echo " $0 /tmp/\$(uname -n)"
}
@@ -47,6 +49,7 @@ usage()
while [ x`echo "$1" | cut -c1` = x- ] ; do
case $1 in
--io) gatherio=1;;
+ --dmi) gatherdmi=1;;
*) echo "Unrecognized option: $1"; usage; exit 1;;
esac
shift
@@ -77,9 +80,11 @@ destdir=`mktemp -d`
savefile() {
local dest="$1"
local file="$2"
- dir=`dirname "$file"`
- mkdir -p "$dest/$dir" 2>/dev/null
- cat "$file" > "$dest/$file" 2>/dev/null
+ if test -r "$file"; then
+ dir=`dirname "$file"`
+ mkdir -p "$dest/$dir" 2>/dev/null
+ cat "$file" > "$dest/$file" 2>/dev/null
+ fi
}
savelink() {
@@ -132,6 +137,12 @@ cat << EOF | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
/proc/device-tree/cpus/
EOF
+if test "x$HWLOC_DUMPED_HWDATA_DIR" = x; then
+ savedir "$destdir/$basename" /var/run/hwloc/
+else
+ savedir "$destdir/$basename" "$HWLOC_DUMPED_HWDATA_DIR"
+fi
+
# Optionally gather I/O directories too
if [ x$gatherio = x1 ]; then
cat << EOF | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
@@ -145,9 +156,12 @@ if [ x$gatherio = x1 ]; then
/sys/class/net/
/sys/class/mic/
EOF
- ls -d /sys/devices/pci* | sed -e 's@$@/@' | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
- ls -d /run/udev/data/b* | while read -r path ; do savefile "$destdir/$basename" "$path" ; done
- ls -d /sys/firmware/dmi/entries/17-* | sed -e 's@$@/@' | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
+ ls -d /sys/devices/pci* 2>/dev/null | sed -e 's@$@/@' | while read -r path ; do savedir "$destdir/$basename" "$path" ; done
+ ls -d /run/udev/data/b* 2>/dev/null | while read -r path ; do savefile "$destdir/$basename" "$path" ; done
+fi
+
+if [ x$gatherdmi = x1 ]; then
+ savedir "$destdir/$basename" /sys/firmware/dmi/
fi
# Get an entire mount point, after decoding its path
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in
index 01a2281..d772281 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in
@@ -89,6 +89,9 @@ This option requires the use of the actual current machine topology
(or any other topology with \fB\-\-thissystem\fR or with
HWLOC_THISSYSTEM set to 1 in the environment).
.TP
+\fB\-\-no\-icaches\fR
+Do not show Instruction caches, only Data and Unified caches are considered.
+.TP
\fB\-\-no\-io\fB
Do not show any I/O device or bridge.
By default, common devices (GPUs, NICs, block devices, ...) and
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c
index bc3fc09..2d9f29a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-info.c
@@ -41,6 +41,7 @@ void usage(const char *name, FILE *where)
fprintf (where, "Object filtering options:\n");
fprintf (where, " --restrict <cpuset> Restrict the topology to processors listed in <cpuset>\n");
fprintf (where, " --restrict binding Restrict the topology to the current process binding\n");
+ fprintf (where, " --no-icaches Do not show instruction caches\n");
fprintf (where, " --no-io Do not show any I/O device or bridge\n");
fprintf (where, " --no-bridges Do not any I/O bridge except hostbridges\n");
fprintf (where, " --whole-io Show all I/O devices and bridges\n");
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c
index 616dff4..74afefa 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013-2014 Inria. All rights reserved.
+ * Copyright © 2013-2015 Inria. All rights reserved.
* See COPYING in top-level directory.
*/
@@ -7,7 +7,9 @@
#include <hwloc.h>
#include <hwloc/diff.h>
-static void usage(const char *callname __hwloc_attribute_unused, FILE *where)
+#include "misc.h"
+
+void usage(const char *callname __hwloc_attribute_unused, FILE *where)
{
fprintf(where, "Usage: hwloc-patch [options] [<old.xml> | refname] [<diff.xml> | -] [<output.xml>]\n");
fprintf(where, "Options:\n");
@@ -48,7 +50,7 @@ static int hwloc_diff_read(hwloc_topology_t topo, const char *inputdiff,
readlen = buflen/2;
}
- err = hwloc_topology_diff_load_xmlbuffer(topo, buffer, offset+1, firstdiffp, refnamep);
+ err = hwloc_topology_diff_load_xmlbuffer(topo, buffer, (int)(offset+1), firstdiffp, refnamep);
free(buffer);
return err;
@@ -62,7 +64,7 @@ int main(int argc, char *argv[])
{
hwloc_topology_t topo;
hwloc_topology_diff_t firstdiff = NULL;
- unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
+ unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM | HWLOC_TOPOLOGY_FLAG_WHOLE_IO | HWLOC_TOPOLOGY_FLAG_ICACHES;
unsigned long patchflags = 0;
char *callname, *input, *inputdiff, *output = NULL, *refname = NULL;
int err;
@@ -126,14 +128,14 @@ int main(int argc, char *argv[])
err = hwloc_topology_set_xml(topo, refname);
if (err < 0) {
fprintf(stderr, "Failed to load XML topology %s (from input diff %s refname)\n", refname, inputdiff);
- goto out;
+ goto out_with_diff;
}
} else {
/* use the given input */
err = hwloc_topology_set_xml(topo, input);
if (err < 0) {
fprintf(stderr, "Failed to load XML topology %s\n", input);
- goto out;
+ goto out_with_diff;
}
}
@@ -162,6 +164,5 @@ out_with_diff:
hwloc_topology_diff_destroy(topo, firstdiff);
out_with_topo:
hwloc_topology_destroy(topo);
-out:
exit(EXIT_FAILURE);
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h
index e0175ca..ef7b59b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/misc.h
@@ -140,6 +140,11 @@ hwloc_utils_enable_input_format(struct hwloc_topology *topology,
enum hwloc_utils_input_format input_format,
int verbose, const char *callname)
{
+ if (input_format == HWLOC_UTILS_INPUT_DEFAULT && !strcmp(input, "-.xml")) {
+ input_format = HWLOC_UTILS_INPUT_XML;
+ input = "-";
+ }
+
if (input_format == HWLOC_UTILS_INPUT_DEFAULT) {
struct stat inputst;
int err;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am
index 3f89ee3..1eb4f32 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/Makefile.am
@@ -37,7 +37,7 @@ lstopo_LDADD = $(lstopo_no_graphics_LDADD)
if HWLOC_HAVE_CAIRO
bin_PROGRAMS += lstopo
lstopo_SOURCES += lstopo-cairo.c
-lstopo_CPPFLAGS += -DLSTOPO_HAVE_GRAPHICS
+lstopo_CPPFLAGS += -DLSTOPO_HAVE_GRAPHICS $(HWLOC_X11_CPPFLAGS)
lstopo_CFLAGS = $(lstopo_no_graphics_CFLAGS) $(HWLOC_CAIRO_CFLAGS)
lstopo_LDADD += $(HWLOC_CAIRO_LIBS) $(HWLOC_X11_LIBS)
endif
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c
index 218304a..f81e38a 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c
@@ -80,7 +80,7 @@ ascii_init(void *_output)
{
struct lstopo_ascii_output *disp = _output;
unsigned width, height;
- int j, i;
+ unsigned j, i;
/* compute the required size */
disp->drawing = 0;
@@ -344,13 +344,13 @@ ascii_box(void *output, int r, int g, int b, unsigned depth __hwloc_attribute_un
y2 = y1 + height - 1;
if (!disp->drawing) {
- if (x1 >= disp->width)
+ if ((int)x1 >= disp->width)
disp->width = x1+1;
- if (x2 >= disp->width)
+ if ((int)x2 >= disp->width)
disp->width = x2+1;
- if (y1 >= disp->height)
+ if ((int)y1 >= disp->height)
disp->height = y1+1;
- if (y2 >= disp->height)
+ if ((int)y2 >= disp->height)
disp->height = y2+1;
return;
}
@@ -403,9 +403,9 @@ ascii_line(void *output, int r __hwloc_attribute_unused, int g __hwloc_attribute
}
if (!disp->drawing) {
- if (x2 >= disp->width)
+ if ((int)x2 >= disp->width)
disp->width = x2+1;
- if (y2 >= disp->height)
+ if ((int)y2 >= disp->height)
disp->height = y2+1;
return;
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c
index 1bc84aa..4edb52b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c
@@ -63,17 +63,17 @@ topo_cairo_box(void *_output, int r, int g, int b, unsigned depth __hwloc_attrib
struct lstopo_cairo_output *coutput = _output;
cairo_t *c = coutput->context;
- if (!coutput->drawing) {
- if (x > coutput->max_x)
- coutput->max_x = x;
- if (x + width > coutput->max_x)
- coutput->max_x = x + width;
- if (y > coutput->max_y)
- coutput->max_y = y;
- if (y + height > coutput->max_y)
- coutput->max_y = y + height;
+ if (x > coutput->max_x)
+ coutput->max_x = x;
+ if (x + width > coutput->max_x)
+ coutput->max_x = x + width;
+ if (y > coutput->max_y)
+ coutput->max_y = y;
+ if (y + height > coutput->max_y)
+ coutput->max_y = y + height;
+
+ if (!coutput->drawing)
return;
- }
cairo_rectangle(c, x, y, width, height);
cairo_set_source_rgb(c, (float)r / 255, (float) g / 255, (float) b / 255);
@@ -91,17 +91,17 @@ topo_cairo_line(void *_output, int r, int g, int b, unsigned depth __hwloc_attri
struct lstopo_cairo_output *coutput = _output;
cairo_t *c = coutput->context;
- if (!coutput->drawing) {
- if (x1 > coutput->max_x)
- coutput->max_x = x1;
- if (x2 > coutput->max_x)
- coutput->max_x = x2;
- if (y1 > coutput->max_y)
- coutput->max_y = y1;
- if (y2 > coutput->max_y)
- coutput->max_y = y2;
+ if (x1 > coutput->max_x)
+ coutput->max_x = x1;
+ if (x2 > coutput->max_x)
+ coutput->max_x = x2;
+ if (y1 > coutput->max_y)
+ coutput->max_y = y1;
+ if (y2 > coutput->max_y)
+ coutput->max_y = y2;
+
+ if (!coutput->drawing)
return;
- }
cairo_move_to(c, x1, y1);
cairo_set_source_rgb(c, (float) r / 255, (float) g / 255, (float) b / 255);
@@ -177,6 +177,7 @@ struct lstopo_x11_output {
int last_screen_width, last_screen_height; /** last visible part size */
int width, height; /** total normal display size */
int x, y; /** top left corner of the visible part */
+ float scale, last_scale;
};
static void
@@ -252,10 +253,24 @@ x11_init(void *_disp)
disp->orig_gridsize = gridsize;
disp->x = 0;
disp->y = 0;
+ disp->scale = disp->last_scale = 1.0f;
+ /* TODO: if window got truncated, scale down? */
x11_create(disp, coutput->max_x, coutput->max_y);
XMapWindow(dpy, top);
+
+ printf("\n");
+ printf("Keyboard shortcuts:\n");
+ printf(" Zoom-in or out .................... + -\n");
+ printf(" Try to fit scale to window ........ f F\n");
+ printf(" Reset scale to default ............ 1\n");
+ printf(" Scroll vertically ................. Up Down PageUp PageDown\n");
+ printf(" Scroll horizontally ............... Left Right Ctrl+PageUp/Down\n");
+ printf(" Scroll to the top-left corner ..... Home\n");
+ printf(" Scroll to the bottom-right corner . End\n");
+ printf(" Exit .............................. q Q Esc\n");
+ printf("\n\n");
}
static struct draw_methods x11_draw_methods = {
@@ -271,6 +286,36 @@ static struct draw_methods x11_draw_methods = {
static void
move_x11(struct lstopo_x11_output *disp)
{
+ if (disp->scale != disp->last_scale) {
+ disp->x = disp->scale / disp->last_scale * (float)disp->x;
+ disp->y = disp->scale / disp->last_scale * (float)disp->y;
+ }
+
+ if (disp->screen_width != disp->last_screen_width
+ || disp->screen_height != disp->last_screen_height
+ || disp->scale != disp->last_scale) {
+ disp->last_screen_width = disp->screen_width;
+ disp->last_screen_height = disp->screen_height;
+ disp->last_scale = disp->scale;
+ fontsize = disp->orig_fontsize * disp->scale;
+ gridsize = disp->orig_gridsize * disp->scale;
+
+ x11_destroy(disp);
+
+ x11_create(disp, disp->width, disp->height);
+ disp->coutput.max_x = 0;
+ disp->coutput.max_y = 0;
+ topo_cairo_paint(&disp->coutput);
+ if (disp->coutput.max_x > disp->width || disp->coutput.max_y > disp->height) {
+ /* need to extend the window and redraw */
+ x11_destroy(disp);
+ x11_create(disp, disp->coutput.max_x, disp->coutput.max_y);
+ topo_cairo_paint(&disp->coutput);
+ }
+ disp->width = disp->coutput.max_x;
+ disp->height = disp->coutput.max_y;
+ }
+
if (disp->width <= disp->screen_width) {
disp->x = 0;
} else {
@@ -288,31 +333,6 @@ move_x11(struct lstopo_x11_output *disp)
if (disp->y >= disp->height - disp->screen_height)
disp->y = disp->height - disp->screen_height;
}
-
- if (disp->screen_width > disp->width && disp->screen_height > disp->height
- && (disp->screen_width != disp->last_screen_width
- || disp->screen_height != disp->last_screen_height)) {
- disp->last_screen_width = disp->screen_width;
- disp->last_screen_height = disp->screen_height;
- fontsize = disp->orig_fontsize;
- gridsize = disp->orig_gridsize;
- if (disp->screen_width > disp->width) {
- fontsize = disp->orig_fontsize * disp->screen_width / disp->width;
- gridsize = disp->orig_gridsize * disp->screen_width / disp->width;
- }
- if (disp->screen_height > disp->height) {
- unsigned int new_fontsize = disp->orig_fontsize * disp->screen_height / disp->height;
- unsigned int new_gridsize = disp->orig_gridsize * disp->screen_height / disp->height;
- if (new_fontsize < fontsize)
- fontsize = new_fontsize;
- if (new_gridsize < gridsize)
- gridsize = new_gridsize;
- }
-
- x11_destroy(disp);
- x11_create(disp, disp->screen_width, disp->screen_height);
- topo_cairo_paint(&disp->coutput);
- }
}
void
@@ -358,16 +378,23 @@ output_x11(struct lstopo_output *loutput, const char *filename)
disp->y -= e.xmotion.y_root - y;
x = e.xmotion.x_root;
y = e.xmotion.y_root;
- move_x11(disp);
+ move_x11(disp);
}
break;
- case ConfigureNotify:
+ case ConfigureNotify: {
+ float wscale, hscale;
disp->screen_width = e.xconfigure.width;
disp->screen_height = e.xconfigure.height;
- move_x11(disp);
+ wscale = disp->screen_width / (float)disp->width;
+ hscale = disp->screen_height / (float)disp->height;
+ disp->scale *= wscale > hscale ? hscale : wscale;
+ if (disp->scale < 1.0f)
+ disp->scale = 1.0f;
+ move_x11(disp);
if (disp->x != lastx || disp->y != lasty)
XMoveWindow(disp->dpy, disp->win, -disp->x, -disp->y);
break;
+ }
case ButtonPress:
if (e.xbutton.button == Button1) {
state = 1;
@@ -435,8 +462,30 @@ output_x11(struct lstopo_output *loutput, const char *filename)
disp->y = INT_MAX;
move_x11(disp);
break;
- }
- break;
+ case XK_f:
+ case XK_F: {
+ float wscale = disp->screen_width / (float)disp->width;
+ float hscale = disp->screen_height / (float)disp->height;
+ disp->scale *= wscale > hscale ? hscale : wscale;
+ move_x11(disp);
+ break;
+ }
+ case XK_plus:
+ case XK_KP_Add:
+ disp->scale *= 1.2f;
+ move_x11(disp);
+ break;
+ case XK_minus:
+ case XK_KP_Subtract:
+ disp->scale /= 1.2f;
+ move_x11(disp);
+ break;
+ case XK_1:
+ case XK_KP_1:
+ disp->scale = 1.0f;
+ move_x11(disp);
+ break;
+ }
}
}
}
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c
index 38b87bb..0db863b 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c
@@ -771,8 +771,8 @@ os_device_draw(hwloc_topology_t topology __hwloc_attribute_unused, struct draw_m
n = lstopo_obj_snprintf(text, sizeof(text), level, logical);
textwidth = get_textwidth(output, methods, text, n, fontsize, gridsize);
for(i=0; i<nmorelines; i++) {
- int nn = strlen(morelines[i]);
- int ntextwidth = get_textwidth(output, methods, morelines[i], nn, fontsize, gridsize);
+ unsigned nn = (unsigned)strlen(morelines[i]);
+ unsigned ntextwidth = get_textwidth(output, methods, morelines[i], nn, fontsize, gridsize);
if (ntextwidth > textwidth)
textwidth = ntextwidth;
}
@@ -1326,6 +1326,8 @@ get_type_fun(hwloc_obj_type_t type)
case HWLOC_OBJ_MISC: return misc_draw;
case HWLOC_OBJ_TYPE_MAX: assert(0);
}
+ /* for dumb compilers */
+ return misc_draw;
}
void
@@ -1365,7 +1367,7 @@ output_compute_pu_min_textwidth(struct lstopo_output *output)
if (output->logical) {
unsigned depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PU);
- lastpu = hwloc_get_obj_by_depth(topology, HWLOC_OBJ_PU, hwloc_get_nbobjs_by_depth(topology, depth)-1);
+ lastpu = hwloc_get_obj_by_depth(topology, depth, hwloc_get_nbobjs_by_depth(topology, depth)-1);
} else {
unsigned lastidx = hwloc_bitmap_last(hwloc_topology_get_topology_cpuset(topology));
lastpu = hwloc_get_pu_obj_by_os_index(topology, lastidx);
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c
index 020df03..76f7602 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c
@@ -103,7 +103,7 @@ fig_text(void *loutput_, int r, int g, int b, int size, unsigned depth, unsigned
{
struct lstopo_output *loutput = loutput_;
FILE *file = loutput->file;
- unsigned len = strlen(text);
+ int len = (int)strlen(text);
int color = rgb_to_fig(r, g, b);
x *= FIG_FACTOR;
y *= FIG_FACTOR;
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in
index 8ae0fc9..1789c31 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-no-graphics.1in
@@ -115,6 +115,7 @@ Do not show caches.
.TP
\fB\-\-no\-useless\-caches\fR
Do not show caches which do not have a hierarchical impact.
+This calls hwloc_topology_ignore_type_keep_structure() for cache objects.
.TP
\fB\-\-no\-icaches\fR
Do not show Instruction caches, only Data and Unified caches are displayed.
@@ -124,6 +125,7 @@ Do not consider administration limitations.
.TP
\fB\-\-merge\fR
Do not show levels that do not have a hierarchical impact.
+This calls hwloc_topology_ignore_all_keep_structure().
.TP
\fB\-\-no\-collapse\fR
Do not collapse identical PCI devices.
diff --git a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c
index e41515b..f90fbec 100644
--- a/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c
+++ b/src/pm/hydra/tools/topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c
@@ -60,6 +60,7 @@ static int finish;
static int the_width, the_height;
static int win_width, win_height;
static unsigned int the_fontsize, the_gridsize;
+static float the_scale;
static void
windows_box(void *output, int r, int g, int b, unsigned depth __hwloc_attribute_unused, unsigned x, unsigned width, unsigned y, unsigned height);
@@ -69,13 +70,48 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
int redraw = 0;
switch (message) {
+ case WM_CHAR: {
+ switch (wparam) {
+ case '+':
+ the_scale *= 1.2f;
+ redraw = 1;
+ break;
+ case '-':
+ the_scale /= 1.2f;
+ redraw = 1;
+ break;
+ case 'f':
+ case 'F': {
+ float wscale, hscale;
+ wscale = win_width / (float)the_width;
+ hscale = win_height / (float)the_height;
+ the_scale *= wscale > hscale ? hscale : wscale;
+ redraw = 1;
+ break;
+ }
+ case '1':
+ the_scale = 1.0;
+ redraw = 1;
+ break;
+ case 'q':
+ case 'Q':
+ finish = 1;
+ break;
+ }
+ break;
+ }
+
case WM_PAINT: {
HFONT font;
BeginPaint(hwnd, &the_output.ps);
font = CreateFont(fontsize, 0, 0, 0, 0, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, NULL);
SelectObject(the_output.ps.hdc, (HGDIOBJ) font);
windows_box(&the_output, 0xff, 0xff, 0xff, 0, 0, win_width, 0, win_height);
+ the_output.max_x = 0;
+ the_output.max_y = 0;
output_draw(&the_output.loutput);
+ the_width = the_output.max_x;
+ the_height = the_output.max_y;
DeleteObject(font);
EndPaint(hwnd, &the_output.ps);
break;
@@ -103,8 +139,6 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
break;
case WM_KEYDOWN:
switch (wparam) {
- case 'q':
- case 'Q':
case VK_ESCAPE:
finish = 1;
break;
@@ -169,11 +203,18 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
if (hwnd == the_output.toplevel)
PostQuitMessage(0);
return 0;
- case WM_SIZE:
+ case WM_SIZE: {
+ float wscale, hscale;
win_width = LOWORD(lparam);
win_height = HIWORD(lparam);
+ wscale = win_width / (float)the_width;
+ hscale = win_height / (float)the_height;
+ the_scale *= wscale > hscale ? hscale : wscale;
+ if (the_scale < 1.0f)
+ the_scale = 1.0f;
redraw = 1;
break;
+ }
}
if (redraw) {
if (x_delta > the_width - win_width)
@@ -184,22 +225,8 @@ WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
x_delta = 0;
if (y_delta < 0)
y_delta = 0;
- if (win_width > the_width && win_height > the_height) {
- fontsize = the_fontsize;
- gridsize = the_gridsize;
- if (win_width > the_width) {
- fontsize = the_fontsize * win_width / the_width;
- gridsize = the_gridsize * win_width / the_width;
- }
- if (win_height > the_height) {
- unsigned int new_fontsize = the_fontsize * win_height / the_height;
- unsigned int new_gridsize = the_gridsize * win_height / the_height;
- if (new_fontsize < fontsize)
- fontsize = new_fontsize;
- if (new_gridsize < gridsize)
- gridsize = new_gridsize;
- }
- }
+ fontsize = (unsigned)(the_fontsize * the_scale);
+ gridsize = (unsigned)(the_gridsize * the_scale);
RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE);
}
return DefWindowProc(hwnd, message, wparam, lparam);
@@ -264,11 +291,25 @@ windows_init(void *output)
the_width = width;
the_height = height;
+ the_scale = 1.0f;
+
the_fontsize = fontsize;
the_gridsize = gridsize;
/* and display the window */
ShowWindow(toplevel, SW_SHOWDEFAULT);
+
+ printf("\n");
+ printf("Keyboard shortcuts:\n");
+ printf(" Zoom-in or out .................... + -\n");
+ printf(" Try to fit scale to window ........ f F\n");
+ printf(" Reset scale to default ............ 1\n");
+ printf(" Scroll vertically ................. Up Down PageUp PageDown\n");
+ printf(" Scroll horizontally ............... Left Right Ctrl+PageUp/Down\n");
+ printf(" Scroll to the top-left corner ..... Home\n");
+ printf(" Scroll to the bottom-right corner . End\n");
+ printf(" Exit .............................. q Q Esc\n");
+ printf("\n\n");
}
static void
@@ -302,17 +343,17 @@ windows_box(void *output, int r, int g, int b, unsigned depth __hwloc_attribute_
struct lstopo_windows_output *woutput = output;
PAINTSTRUCT *ps = &woutput->ps;
- if (!woutput->drawing) {
- if (x > woutput->max_x)
- woutput->max_x = x;
- if (x+width > woutput->max_x)
- woutput->max_x = x + width;
- if (y > woutput->max_y)
- woutput->max_y = y;
- if (y + height > woutput->max_y)
- woutput->max_y = y + height;
+ if (x > woutput->max_x)
+ woutput->max_x = x;
+ if (x+width > woutput->max_x)
+ woutput->max_x = x + width;
+ if (y > woutput->max_y)
+ woutput->max_y = y;
+ if (y + height > woutput->max_y)
+ woutput->max_y = y + height;
+
+ if (!woutput->drawing)
return;
- }
SelectObject(ps->hdc, rgb_to_brush(r, g, b));
SetBkColor(ps->hdc, RGB(r, g, b));
@@ -325,17 +366,17 @@ windows_line(void *output, int r, int g, int b, unsigned depth __hwloc_attribute
struct lstopo_windows_output *woutput = output;
PAINTSTRUCT *ps = &woutput->ps;
- if (!woutput->drawing) {
- if (x1 > woutput->max_x)
- woutput->max_x = x1;
- if (x2 > woutput->max_x)
- woutput->max_x = x2;
- if (y1 > woutput->max_y)
- woutput->max_y = y1;
- if (y2 > woutput->max_y)
- woutput->max_y = y2;
+ if (x1 > woutput->max_x)
+ woutput->max_x = x1;
+ if (x2 > woutput->max_x)
+ woutput->max_x = x2;
+ if (y1 > woutput->max_y)
+ woutput->max_y = y1;
+ if (y2 > woutput->max_y)
+ woutput->max_y = y2;
+
+ if (!woutput->drawing)
return;
- }
SelectObject(ps->hdc, rgb_to_brush(r, g, b));
MoveToEx(ps->hdc, x1 - x_delta, y1 - y_delta, NULL);
@@ -352,7 +393,7 @@ windows_text(void *output, int r, int g, int b, int size __hwloc_attribute_unuse
return;
SetTextColor(ps->hdc, RGB(r, g, b));
- TextOut(ps->hdc, x - x_delta, y - y_delta, text, strlen(text));
+ TextOut(ps->hdc, x - x_delta, y - y_delta, text, (int)strlen(text));
}
static void
-----------------------------------------------------------------------
Summary of changes:
src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore | 30 +-
src/pm/hydra/tools/topo/hwloc/hwloc/AUTHORS | 8 +-
src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am | 2 +-
src/pm/hydra/tools/topo/hwloc/hwloc/NEWS | 89 +++-
src/pm/hydra/tools/topo/hwloc/hwloc/README | 2 +-
src/pm/hydra/tools/topo/hwloc/hwloc/VERSION | 6 +-
.../hydra/tools/topo/hwloc/hwloc/config/hwloc.m4 | 25 +-
.../hwloc/contrib/ci.inria.fr/job-0-tarball.sh | 37 ++
.../hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh | 54 ++
.../hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh | 150 ++++++
.../contrib/ci.inria.fr/job-3-visualstudio.bat | 33 ++
.../tools/topo/hwloc/hwloc/contrib/windows/README | 3 +
.../hwloc/contrib/windows/hwloc-annotate.vcxproj | 6 +-
.../contrib/windows/hwloc-annotate.vcxproj.filters | 5 +-
.../hwloc/contrib/windows/hwloc-assembler.vcxproj | 5 +-
.../hwloc/hwloc/contrib/windows/hwloc-bind.vcxproj | 8 +-
.../contrib/windows/hwloc-bind.vcxproj.filters | 3 -
.../hwloc/hwloc/contrib/windows/hwloc-calc.vcxproj | 8 +-
.../contrib/windows/hwloc-calc.vcxproj.filters | 3 -
.../hwloc/hwloc/contrib/windows/hwloc-diff.vcxproj | 6 +-
.../contrib/windows/hwloc-diff.vcxproj.filters | 3 -
.../hwloc/contrib/windows/hwloc-distances.vcxproj | 6 +-
.../windows/hwloc-distances.vcxproj.filters | 3 -
.../hwloc/contrib/windows/hwloc-distrib.vcxproj | 6 +-
.../contrib/windows/hwloc-distrib.vcxproj.filters | 3 -
.../hwloc/hwloc/contrib/windows/hwloc-info.vcxproj | 8 +-
.../contrib/windows/hwloc-info.vcxproj.filters | 3 -
.../hwloc/contrib/windows/hwloc-patch.vcxproj | 6 +-
.../contrib/windows/hwloc-patch.vcxproj.filters | 3 -
.../topo/hwloc/hwloc/contrib/windows/hwloc.sln | 60 ++-
.../hwloc/hwloc/contrib/windows/libhwloc.vcxproj | 20 +-
.../hwloc/contrib/windows/libhwloc.vcxproj.filters | 4 +-
.../contrib/windows/lstopo-no-graphics.vcxproj | 5 +-
.../windows/lstopo-no-graphics.vcxproj.filters | 6 +-
.../hwloc/hwloc/contrib/windows/lstopo-win.vcxproj | 7 +-
.../contrib/windows/lstopo-win.vcxproj.filters | 6 +-
.../hwloc/hwloc/contrib/windows/lstopo.vcxproj | 7 +-
.../hwloc/contrib/windows/lstopo.vcxproj.filters | 6 +-
.../hwloc/hwloc/contrib/windows/private_config.h | 18 +-
src/pm/hydra/tools/topo/hwloc/hwloc/doc/hwloc.doxy | 406 ++++++++++-----
.../hydra/tools/topo/hwloc/hwloc/include/hwloc.h | 113 +++--
.../tools/topo/hwloc/hwloc/include/hwloc/bitmap.h | 24 +-
.../topo/hwloc/hwloc/include/hwloc/deprecated.h | 2 +-
.../tools/topo/hwloc/hwloc/include/hwloc/diff.h | 32 +-
.../tools/topo/hwloc/hwloc/include/hwloc/helper.h | 16 +-
.../tools/topo/hwloc/hwloc/include/hwloc/linux.h | 6 +-
.../tools/topo/hwloc/hwloc/include/hwloc/plugins.h | 12 +-
.../tools/topo/hwloc/hwloc/include/hwloc/rename.h | 7 +-
.../topo/hwloc/hwloc/include/private/cpuid-x86.h | 5 +-
.../tools/topo/hwloc/hwloc/include/private/debug.h | 31 +-
.../topo/hwloc/hwloc/include/private/private.h | 9 +
.../hydra/tools/topo/hwloc/hwloc/src/Makefile.am | 2 +-
src/pm/hydra/tools/topo/hwloc/hwloc/src/base64.c | 4 +-
src/pm/hydra/tools/topo/hwloc/hwloc/src/bind.c | 54 ++-
src/pm/hydra/tools/topo/hwloc/hwloc/src/bitmap.c | 12 +-
.../hydra/tools/topo/hwloc/hwloc/src/components.c | 6 +-
.../hydra/tools/topo/hwloc/hwloc/src/pci-common.c | 26 +-
.../tools/topo/hwloc/hwloc/src/topology-aix.c | 2 +-
.../tools/topo/hwloc/hwloc/src/topology-bgq.c | 4 +
.../topo/hwloc/hwloc/src/topology-hardwired.c | 191 +++++++
.../tools/topo/hwloc/hwloc/src/topology-hpux.c | 4 +-
.../tools/topo/hwloc/hwloc/src/topology-linux.c | 466 +++++++++++++----
.../tools/topo/hwloc/hwloc/src/topology-osf.c | 4 +-
.../tools/topo/hwloc/hwloc/src/topology-pci.c | 18 +-
.../tools/topo/hwloc/hwloc/src/topology-solaris.c | 1 -
.../topo/hwloc/hwloc/src/topology-synthetic.c | 45 ++-
.../tools/topo/hwloc/hwloc/src/topology-windows.c | 563 +++++++++++++++-----
.../tools/topo/hwloc/hwloc/src/topology-x86.c | 132 ++++-
.../topo/hwloc/hwloc/src/topology-xml-libxml.c | 7 +-
.../topo/hwloc/hwloc/src/topology-xml-nolibxml.c | 26 +-
.../tools/topo/hwloc/hwloc/src/topology-xml.c | 3 +
src/pm/hydra/tools/topo/hwloc/hwloc/src/topology.c | 166 +++++--
.../hydra/tools/topo/hwloc/hwloc/src/traversal.c | 17 +-
.../tools/topo/hwloc/hwloc/tests/hwloc_backends.c | 11 +-
.../hwloc/tests/linux/32em64t-2n8c+1mic.output | 5 +
.../hwloc/tests/linux/32em64t-2n8c+1mic.tar.bz2 | Bin 68952 -> 70952 bytes
.../include/bgq/spi/include/kernel/location.h | 8 +-
.../hwloc/tests/ports/include/windows/windows.h | 7 +-
.../topo/hwloc/hwloc/tests/rename/Makefile.am | 1 +
.../tools/topo/hwloc/hwloc/utils/hwloc/Makefile.am | 27 +
.../topo/hwloc/hwloc/utils/hwloc/hwloc-annotate.c | 6 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-assembler.c | 4 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-bind.c | 28 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-calc.c | 4 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-diff.c | 8 +-
.../hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c | 462 ++++++++++++++++
.../hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in | 69 +++
.../hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c | 82 +++
.../hwloc/utils/hwloc/hwloc-gather-topology.1in | 3 +
.../hwloc/utils/hwloc/hwloc-gather-topology.in | 26 +-
.../topo/hwloc/hwloc/utils/hwloc/hwloc-info.1in | 3 +
.../topo/hwloc/hwloc/utils/hwloc/hwloc-info.c | 1 +
.../topo/hwloc/hwloc/utils/hwloc/hwloc-patch.c | 15 +-
.../tools/topo/hwloc/hwloc/utils/hwloc/misc.h | 5 +
.../topo/hwloc/hwloc/utils/lstopo/Makefile.am | 2 +-
.../topo/hwloc/hwloc/utils/lstopo/lstopo-ascii.c | 14 +-
.../topo/hwloc/hwloc/utils/lstopo/lstopo-cairo.c | 149 ++++--
.../topo/hwloc/hwloc/utils/lstopo/lstopo-draw.c | 8 +-
.../topo/hwloc/hwloc/utils/lstopo/lstopo-fig.c | 2 +-
.../hwloc/utils/lstopo/lstopo-no-graphics.1in | 2 +
.../topo/hwloc/hwloc/utils/lstopo/lstopo-windows.c | 121 +++--
101 files changed, 3293 insertions(+), 859 deletions(-)
create mode 100755 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-0-tarball.sh
create mode 100755 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-1-check.sh
create mode 100755 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-mingw.sh
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/contrib/ci.inria.fr/job-3-visualstudio.bat
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/src/topology-hardwired.c
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata-knl.c
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.1in
create mode 100644 src/pm/hydra/tools/topo/hwloc/hwloc/utils/hwloc/hwloc-dump-hwdata.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-203-ga5748c7
by noreply@mpich.org 18 Feb '16
by noreply@mpich.org 18 Feb '16
18 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via a5748c7c039db29cf6a4cee5316251ecee1a7f9c (commit)
via 3b4dcea64224cdb24c0bf1664c9e743b401c0ff3 (commit)
from e0e55b74047115b594681955ce12a50d0d65bedd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/a5748c7c039db29cf6a4cee5316251ece…
commit a5748c7c039db29cf6a4cee5316251ecee1a7f9c
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Feb 2 12:12:58 2016 -0600
mpidbg: common code must use its own dbg class.
Using ch3 debug classes in common code is incorrect.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpid/common/sock/poll/mpidu_socki.h b/src/mpid/common/sock/poll/mpidu_socki.h
index 5958dfe..8f862fb 100644
--- a/src/mpid/common/sock/poll/mpidu_socki.h
+++ b/src/mpid/common/sock/poll/mpidu_socki.h
@@ -55,4 +55,8 @@ MPID_STATE_WRITE, \
MPID_STATE_WRITEV, \
MPID_STATE_POLL,
+#if defined (MPL_USE_DBG_LOGGING)
+extern MPL_dbg_class MPIDU_DBG_SOCK_CONNECT;
+#endif /* MPL_USE_DBG_LOGGING */
+
#endif /* !defined(SOCKI_H_INCLUDED) */
diff --git a/src/mpid/common/sock/poll/sock_init.i b/src/mpid/common/sock/poll/sock_init.i
index 26c0868..018db73 100644
--- a/src/mpid/common/sock/poll/sock_init.i
+++ b/src/mpid/common/sock/poll/sock_init.i
@@ -5,6 +5,10 @@
* See COPYRIGHT in top-level directory.
*/
+#if defined (MPL_USE_DBG_LOGGING)
+MPL_dbg_class MPIDU_DBG_SOCK_CONNECT;
+#endif /* MPL_USE_DBG_LOGGING */
+
/* FIXME: The usual missing documentation (what are these routines for?
preconditions? who calls? post conditions? */
#undef FUNCNAME
@@ -17,6 +21,10 @@ int MPIDU_Sock_init(void)
MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_INIT);
+#if defined (MPL_USE_DBG_LOGGING)
+ MPIDU_DBG_SOCK_CONNECT = MPL_dbg_class_alloc("SOCK_CONNECT", "sock_connect");
+#endif
+
MPIDU_Socki_initialized++;
MPIDI_FUNC_EXIT(MPID_STATE_MPIDU_SOCK_INIT);
diff --git a/src/mpid/common/sock/poll/sock_post.i b/src/mpid/common/sock/poll/sock_post.i
index ea510b2..8005466 100644
--- a/src/mpid/common/sock/poll/sock_post.i
+++ b/src/mpid/common/sock/poll/sock_post.i
@@ -125,10 +125,10 @@ int MPIDU_Sock_post_connect_ifaddr( struct MPIDU_Sock_set * sock_set,
/*
* Attempt to establish the connection
*/
- MPL_DBG_STMT(MPIDI_CH3_DBG_CONNECT,TYPICAL,{
+ MPL_DBG_STMT(MPIDU_DBG_SOCK_CONNECT,TYPICAL,{
char addrString[64];
MPIDU_Sock_AddrToStr( ifaddr, addrString, sizeof(addrString) );
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT,TYPICAL,(MPL_DBG_FDEST,
+ MPL_DBG_MSG_FMT(MPIDU_DBG_SOCK_CONNECT,TYPICAL,(MPL_DBG_FDEST,
"Connecting to %s:%d", addrString, port ));
})
@@ -141,7 +141,7 @@ int MPIDU_Sock_post_connect_ifaddr( struct MPIDU_Sock_set * sock_set,
if (rc == 0)
{
/* connection succeeded */
- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_CONNECTED_RW for sock %p",sock);
+ MPL_DBG_MSG_P(MPIDU_DBG_SOCK_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_CONNECTED_RW for sock %p",sock);
pollinfo->state = MPIDU_SOCKI_STATE_CONNECTED_RW;
MPIDU_SOCKI_EVENT_ENQUEUE(pollinfo, MPIDU_SOCK_OP_CONNECT, 0, user_ptr, MPI_SUCCESS, mpi_errno, fn_fail);
}
@@ -149,13 +149,13 @@ int MPIDU_Sock_post_connect_ifaddr( struct MPIDU_Sock_set * sock_set,
else if (errno == EINPROGRESS)
{
/* connection pending */
- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_CONNECTING for sock %p",sock);
+ MPL_DBG_MSG_P(MPIDU_DBG_SOCK_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_CONNECTING for sock %p",sock);
pollinfo->state = MPIDU_SOCKI_STATE_CONNECTING;
MPIDU_SOCKI_POLLFD_OP_SET(pollfd, pollinfo, POLLOUT);
}
else
{
- MPL_DBG_MSG_P(MPIDI_CH3_DBG_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_DISCONNECTED (failure in connect) for sock %p",sock);
+ MPL_DBG_MSG_P(MPIDU_DBG_SOCK_CONNECT,TYPICAL,"Setting state to SOCKI_STATE_DISCONNECTED (failure in connect) for sock %p",sock);
pollinfo->os_errno = errno;
pollinfo->state = MPIDU_SOCKI_STATE_DISCONNECTED;
diff --git a/src/mpid/common/sock/poll/socki_util.i b/src/mpid/common/sock/poll/socki_util.i
index f9dde27..98e6e33 100644
--- a/src/mpid/common/sock/poll/socki_util.i
+++ b/src/mpid/common/sock/poll/socki_util.i
@@ -988,7 +988,7 @@ int MPIDU_Sock_SetSockBufferSize( int fd, int firm )
if (rc <= 0) {
sockBufSize = 0;
}
- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CONNECT,TYPICAL,"Sock buf size = %d",sockBufSize);
+ MPL_DBG_MSG_D(MPIDU_DBG_SOCK_CONNECT,TYPICAL,"Sock buf size = %d",sockBufSize);
}
if (sockBufSize > 0) {
http://git.mpich.org/mpich.git/commitdiff/3b4dcea64224cdb24c0bf1664c9e743b4…
commit 3b4dcea64224cdb24c0bf1664c9e743b401c0ff3
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Mon Feb 1 17:31:16 2016 -0600
mpl: namespace cleanup to use MPL_<lowercase>.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/glue/romio/glue_romio.c b/src/glue/romio/glue_romio.c
index c3521c2..6080327 100644
--- a/src/glue/romio/glue_romio.c
+++ b/src/glue/romio/glue_romio.c
@@ -12,7 +12,7 @@
#include "glue_romio.h"
#if defined (MPL_USE_DBG_LOGGING)
-static MPL_DBG_Class DBG_ROMIO;
+static MPL_dbg_class DBG_ROMIO;
#endif /* MPL_USE_DBG_LOGGING */
int MPIR_Ext_dbg_romio_terse_enabled = 0;
@@ -28,7 +28,7 @@ int MPIR_Ext_init(void)
MPIR_Ext_dbg_romio_verbose_enabled = 0;
#if defined (MPL_USE_DBG_LOGGING)
- DBG_ROMIO = MPL_DBG_Class_alloc("ROMIO", "romio");
+ DBG_ROMIO = MPL_dbg_class_alloc("ROMIO", "romio");
if (MPL_DBG_SELECTED(DBG_ROMIO,TERSE))
MPIR_Ext_dbg_romio_terse_enabled = 1;
diff --git a/src/include/mpihandlemem.h b/src/include/mpihandlemem.h
index 02f30a7..a5bf419 100644
--- a/src/include/mpihandlemem.h
+++ b/src/include/mpihandlemem.h
@@ -119,7 +119,7 @@ const char *MPIU_Handle_get_kind_str(int kind);
#define HANDLE_INDEX(a) ((a)& HANDLE_MASK)
#if defined (MPL_USE_DBG_LOGGING)
-extern MPL_DBG_Class MPIR_DBG_HANDLE;
+extern MPL_dbg_class MPIR_DBG_HANDLE;
#endif /* MPL_USE_DBG_LOGGING */
/* ------------------------------------------------------------------------- */
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 72ad697..23ef928 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -2170,16 +2170,16 @@ typedef struct MPICH_PerProcess_t {
extern MPICH_PerProcess_t MPIR_Process;
#if defined (MPL_USE_DBG_LOGGING)
-extern MPL_DBG_Class MPIR_DBG_INIT;
-extern MPL_DBG_Class MPIR_DBG_PT2PT;
-extern MPL_DBG_Class MPIR_DBG_THREAD;
-extern MPL_DBG_Class MPIR_DBG_DATATYPE;
-extern MPL_DBG_Class MPIR_DBG_COMM;
-extern MPL_DBG_Class MPIR_DBG_BSEND;
-extern MPL_DBG_Class MPIR_DBG_ERRHAND;
-extern MPL_DBG_Class MPIR_DBG_OTHER;
-
-extern MPL_DBG_Class MPIR_DBG_ASSERT;
+extern MPL_dbg_class MPIR_DBG_INIT;
+extern MPL_dbg_class MPIR_DBG_PT2PT;
+extern MPL_dbg_class MPIR_DBG_THREAD;
+extern MPL_dbg_class MPIR_DBG_DATATYPE;
+extern MPL_dbg_class MPIR_DBG_COMM;
+extern MPL_dbg_class MPIR_DBG_BSEND;
+extern MPL_dbg_class MPIR_DBG_ERRHAND;
+extern MPL_dbg_class MPIR_DBG_OTHER;
+
+extern MPL_dbg_class MPIR_DBG_ASSERT;
#endif /* MPL_USE_DBG_LOGGING */
/* ------------------------------------------------------------------------- */
diff --git a/src/include/mpimem.h b/src/include/mpimem.h
index a247452..9250f4d 100644
--- a/src/include/mpimem.h
+++ b/src/include/mpimem.h
@@ -30,7 +30,7 @@ extern "C" {
#endif
#if defined (MPL_USE_DBG_LOGGING)
-extern MPL_DBG_Class MPIR_DBG_STRING;
+extern MPL_dbg_class MPIR_DBG_STRING;
#endif /* MPL_USE_DBG_LOGGING */
/* ------------------------------------------------------------------------- */
diff --git a/src/mpi/init/init.c b/src/mpi/init/init.c
index 00ccf01..b15489f 100644
--- a/src/mpi/init/init.c
+++ b/src/mpi/init/init.c
@@ -127,7 +127,7 @@ int MPI_Init( int *argc, char ***argv )
rc = MPID_Wtime_init();
#ifdef MPL_USE_DBG_LOGGING
- MPL_DBG_PreInit( argc, argv, rc );
+ MPL_dbg_pre_init( argc, argv, rc );
#endif
MPID_MPI_INIT_FUNC_ENTER(MPID_STATE_MPI_INIT);
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index fcd5888..f061094 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -295,19 +295,19 @@ MPI_F08_Status *MPI_F08_STATUSES_IGNORE = &MPIR_F08_MPI_STATUSES_IGNORE_OBJ[0];
#endif
#if defined (MPL_USE_DBG_LOGGING)
-MPL_DBG_Class MPIR_DBG_INIT;
-MPL_DBG_Class MPIR_DBG_PT2PT;
-MPL_DBG_Class MPIR_DBG_THREAD;
-MPL_DBG_Class MPIR_DBG_DATATYPE;
-MPL_DBG_Class MPIR_DBG_HANDLE;
-MPL_DBG_Class MPIR_DBG_COMM;
-MPL_DBG_Class MPIR_DBG_BSEND;
-MPL_DBG_Class MPIR_DBG_ERRHAND;
-MPL_DBG_Class MPIR_DBG_OTHER;
+MPL_dbg_class MPIR_DBG_INIT;
+MPL_dbg_class MPIR_DBG_PT2PT;
+MPL_dbg_class MPIR_DBG_THREAD;
+MPL_dbg_class MPIR_DBG_DATATYPE;
+MPL_dbg_class MPIR_DBG_HANDLE;
+MPL_dbg_class MPIR_DBG_COMM;
+MPL_dbg_class MPIR_DBG_BSEND;
+MPL_dbg_class MPIR_DBG_ERRHAND;
+MPL_dbg_class MPIR_DBG_OTHER;
/* these classes might need to move out later */
-MPL_DBG_Class MPIR_DBG_ASSERT;
-MPL_DBG_Class MPIR_DBG_STRING;
+MPL_dbg_class MPIR_DBG_ASSERT;
+MPL_dbg_class MPIR_DBG_STRING;
#endif /* MPL_USE_DBG_LOGGING */
#undef FUNCNAME
@@ -542,27 +542,27 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
* If the parent comm is not NULL, we always give the world number
* as "1" (false). */
#ifdef MPICH_IS_THREADED
- MPL_DBG_Init( argc, argv, has_args, has_env,
+ MPL_dbg_init( argc, argv, has_args, has_env,
MPIR_Process.comm_parent != NULL, MPIR_Process.comm_world->rank,
MPIR_ThreadInfo.isThreaded );
#else
- MPL_DBG_Init( argc, argv, has_args, has_env,
+ MPL_dbg_init( argc, argv, has_args, has_env,
MPIR_Process.comm_parent != NULL, MPIR_Process.comm_world->rank,
0 );
#endif
- MPIR_DBG_INIT = MPL_DBG_Class_alloc("INIT", "init");
- MPIR_DBG_PT2PT = MPL_DBG_Class_alloc("PT2PT", "pt2pt");
- MPIR_DBG_THREAD = MPL_DBG_Class_alloc("THREAD", "thread");
- MPIR_DBG_DATATYPE = MPL_DBG_Class_alloc("DATATYPE", "datatype");
- MPIR_DBG_HANDLE = MPL_DBG_Class_alloc("HANDLE", "handle");
- MPIR_DBG_COMM = MPL_DBG_Class_alloc("COMM", "comm");
- MPIR_DBG_BSEND = MPL_DBG_Class_alloc("BSEND", "bsend");
- MPIR_DBG_ERRHAND = MPL_DBG_Class_alloc("ERRHAND", "errhand");
- MPIR_DBG_OTHER = MPL_DBG_Class_alloc("OTHER", "other");
-
- MPIR_DBG_ASSERT = MPL_DBG_Class_alloc("ASSERT", "assert");
- MPIR_DBG_STRING = MPL_DBG_Class_alloc("STRING", "string");
+ MPIR_DBG_INIT = MPL_dbg_class_alloc("INIT", "init");
+ MPIR_DBG_PT2PT = MPL_dbg_class_alloc("PT2PT", "pt2pt");
+ MPIR_DBG_THREAD = MPL_dbg_class_alloc("THREAD", "thread");
+ MPIR_DBG_DATATYPE = MPL_dbg_class_alloc("DATATYPE", "datatype");
+ MPIR_DBG_HANDLE = MPL_dbg_class_alloc("HANDLE", "handle");
+ MPIR_DBG_COMM = MPL_dbg_class_alloc("COMM", "comm");
+ MPIR_DBG_BSEND = MPL_dbg_class_alloc("BSEND", "bsend");
+ MPIR_DBG_ERRHAND = MPL_dbg_class_alloc("ERRHAND", "errhand");
+ MPIR_DBG_OTHER = MPL_dbg_class_alloc("OTHER", "other");
+
+ MPIR_DBG_ASSERT = MPL_dbg_class_alloc("ASSERT", "assert");
+ MPIR_DBG_STRING = MPL_dbg_class_alloc("STRING", "string");
#endif
/* Initialize the C versions of the Fortran link-time constants.
@@ -662,7 +662,7 @@ int MPI_Init_thread( int *argc, char ***argv, int required, int *provided )
rc = MPID_Wtime_init();
#ifdef MPL_USE_DBG_LOGGING
- MPL_DBG_PreInit( argc, argv, rc );
+ MPL_dbg_pre_init( argc, argv, rc );
#endif
MPID_MPI_INIT_FUNC_ENTER(MPID_STATE_MPI_INIT_THREAD);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
index 56d6aa4..1cf13af 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
@@ -21,7 +21,7 @@ extern struct pollfd *MPID_nem_tcp_plfd_tbl;
extern sockconn_t MPID_nem_tcp_g_lstn_sc;
extern struct pollfd MPID_nem_tcp_g_lstn_plfd;
-extern MPL_DBG_Class MPIDI_NEM_TCP_DBG_DET;
+extern MPL_dbg_class MPIDI_NEM_TCP_DBG_DET;
typedef enum{MPID_NEM_TCP_VC_STATE_DISCONNECTED,
MPID_NEM_TCP_VC_STATE_CONNECTED,
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
index 62b18fe..4fbcef7 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
@@ -112,7 +112,7 @@ MPID_nem_netmod_funcs_t MPIDI_nem_tcp_funcs = {
/* in case there are no packet types defined (e.g., they're ifdef'ed out) make sure the array is not zero length */
static MPIDI_CH3_PktHandler_Fcn *pkt_handlers[MPIDI_NEM_TCP_PKT_NUM_TYPES ? MPIDI_NEM_TCP_PKT_NUM_TYPES : 1];
-MPL_DBG_Class MPIDI_NEM_TCP_DBG_DET;
+MPL_dbg_class MPIDI_NEM_TCP_DBG_DET;
#undef FUNCNAME
#define FUNCNAME set_up_listener
@@ -166,7 +166,7 @@ int MPID_nem_tcp_init (MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_
MPIU_Assert(sizeof(MPID_nem_tcp_vc_area) <= MPIDI_NEM_VC_NETMOD_AREA_LEN);
#if defined (MPL_USE_DBG_LOGGING)
- MPIDI_NEM_TCP_DBG_DET = MPL_DBG_Class_alloc("MPIDI_NEM_TCP_DBG_DET", "nem_sock_det");
+ MPIDI_NEM_TCP_DBG_DET = MPL_dbg_class_alloc("MPIDI_NEM_TCP_DBG_DET", "nem_sock_det");
#endif /* MPL_USE_DBG_LOGGING */
/* set up listener socket */
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 2ef9bec..142a8c8 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -48,14 +48,14 @@ extern char *MPIDI_failed_procs_string;
extern int MPIDI_Use_pmi2_api;
#if defined(MPL_USE_DBG_LOGGING)
-extern MPL_DBG_Class MPIDI_CH3_DBG_CONNECT;
-extern MPL_DBG_Class MPIDI_CH3_DBG_DISCONNECT;
-extern MPL_DBG_Class MPIDI_CH3_DBG_PROGRESS;
-extern MPL_DBG_Class MPIDI_CH3_DBG_CHANNEL;
-extern MPL_DBG_Class MPIDI_CH3_DBG_OTHER;
-extern MPL_DBG_Class MPIDI_CH3_DBG_MSG;
-extern MPL_DBG_Class MPIDI_CH3_DBG_VC;
-extern MPL_DBG_Class MPIDI_CH3_DBG_REFCOUNT;
+extern MPL_dbg_class MPIDI_CH3_DBG_CONNECT;
+extern MPL_dbg_class MPIDI_CH3_DBG_DISCONNECT;
+extern MPL_dbg_class MPIDI_CH3_DBG_PROGRESS;
+extern MPL_dbg_class MPIDI_CH3_DBG_CHANNEL;
+extern MPL_dbg_class MPIDI_CH3_DBG_OTHER;
+extern MPL_dbg_class MPIDI_CH3_DBG_MSG;
+extern MPL_dbg_class MPIDI_CH3_DBG_VC;
+extern MPL_dbg_class MPIDI_CH3_DBG_REFCOUNT;
#endif /* MPL_USE_DBG_LOGGING */
#define MPIDI_CHANGE_VC_STATE(vc, new_state) do { \
diff --git a/src/mpid/ch3/src/mpid_init.c b/src/mpid/ch3/src/mpid_init.c
index 3f364d2..a4a551d 100644
--- a/src/mpid/ch3/src/mpid_init.c
+++ b/src/mpid/ch3/src/mpid_init.c
@@ -44,14 +44,14 @@ MPIDI_CH3U_Win_hooks_t MPIDI_CH3U_Win_hooks = { NULL };
MPIDI_CH3U_Win_pkt_ordering_t MPIDI_CH3U_Win_pkt_orderings = { 0 };
#if defined(MPL_USE_DBG_LOGGING)
-MPL_DBG_Class MPIDI_CH3_DBG_CONNECT;
-MPL_DBG_Class MPIDI_CH3_DBG_DISCONNECT;
-MPL_DBG_Class MPIDI_CH3_DBG_PROGRESS;
-MPL_DBG_Class MPIDI_CH3_DBG_CHANNEL;
-MPL_DBG_Class MPIDI_CH3_DBG_OTHER;
-MPL_DBG_Class MPIDI_CH3_DBG_MSG;
-MPL_DBG_Class MPIDI_CH3_DBG_VC;
-MPL_DBG_Class MPIDI_CH3_DBG_REFCOUNT;
+MPL_dbg_class MPIDI_CH3_DBG_CONNECT;
+MPL_dbg_class MPIDI_CH3_DBG_DISCONNECT;
+MPL_dbg_class MPIDI_CH3_DBG_PROGRESS;
+MPL_dbg_class MPIDI_CH3_DBG_CHANNEL;
+MPL_dbg_class MPIDI_CH3_DBG_OTHER;
+MPL_dbg_class MPIDI_CH3_DBG_MSG;
+MPL_dbg_class MPIDI_CH3_DBG_VC;
+MPL_dbg_class MPIDI_CH3_DBG_REFCOUNT;
#endif /* MPL_USE_DBG_LOGGING */
#undef FUNCNAME
@@ -190,14 +190,14 @@ int MPID_Init(int *argc, char ***argv, int requested, int *provided,
MPIDI_CH3_Win_hooks_init(&MPIDI_CH3U_Win_hooks);
#ifdef MPL_USE_DBG_LOGGING
- MPIDI_CH3_DBG_CONNECT = MPL_DBG_Class_alloc("CH3_CONNECT", "ch3_connect");;
- MPIDI_CH3_DBG_DISCONNECT = MPL_DBG_Class_alloc("CH3_DISCONNECT", "ch3_disconnect");
- MPIDI_CH3_DBG_PROGRESS = MPL_DBG_Class_alloc("CH3_PROGRESS", "ch3_progress");
- MPIDI_CH3_DBG_CHANNEL = MPL_DBG_Class_alloc("CH3_CHANNEL", "ch3_channel");
- MPIDI_CH3_DBG_OTHER = MPL_DBG_Class_alloc("CH3_OTHER", "ch3_other");
- MPIDI_CH3_DBG_MSG = MPL_DBG_Class_alloc("CH3_MSG", "ch3_msg");
- MPIDI_CH3_DBG_VC = MPL_DBG_Class_alloc("VC", "vc");
- MPIDI_CH3_DBG_REFCOUNT = MPL_DBG_Class_alloc("REFCOUNT", "refcount");
+ MPIDI_CH3_DBG_CONNECT = MPL_dbg_class_alloc("CH3_CONNECT", "ch3_connect");;
+ MPIDI_CH3_DBG_DISCONNECT = MPL_dbg_class_alloc("CH3_DISCONNECT", "ch3_disconnect");
+ MPIDI_CH3_DBG_PROGRESS = MPL_dbg_class_alloc("CH3_PROGRESS", "ch3_progress");
+ MPIDI_CH3_DBG_CHANNEL = MPL_dbg_class_alloc("CH3_CHANNEL", "ch3_channel");
+ MPIDI_CH3_DBG_OTHER = MPL_dbg_class_alloc("CH3_OTHER", "ch3_other");
+ MPIDI_CH3_DBG_MSG = MPL_dbg_class_alloc("CH3_MSG", "ch3_msg");
+ MPIDI_CH3_DBG_VC = MPL_dbg_class_alloc("VC", "vc");
+ MPIDI_CH3_DBG_REFCOUNT = MPL_dbg_class_alloc("REFCOUNT", "refcount");
#endif /* MPL_USE_DBG_LOGGING */
/*
diff --git a/src/mpid/ch3/src/mpidi_pg.c b/src/mpid/ch3/src/mpidi_pg.c
index 68bc98f..ac619a6 100644
--- a/src/mpid/ch3/src/mpidi_pg.c
+++ b/src/mpid/ch3/src/mpidi_pg.c
@@ -1030,8 +1030,8 @@ int MPIDI_PrintConnStr( const char *file, int line,
{
int pg_size, i;
- MPL_DBG_Outevent( file, line, MPIDI_CH3_DBG_CONNECT, 0, "%s", label );
- MPL_DBG_Outevent( file, line, MPIDI_CH3_DBG_CONNECT, 0, "%s", str );
+ MPL_dbg_outevent( file, line, MPIDI_CH3_DBG_CONNECT, 0, "%s", label );
+ MPL_dbg_outevent( file, line, MPIDI_CH3_DBG_CONNECT, 0, "%s", str );
/* Skip the pg id */
while (*str) str++; str++;
@@ -1041,7 +1041,7 @@ int MPIDI_PrintConnStr( const char *file, int line,
while (*str) str++; str++;
for (i=0; i<pg_size; i++) {
- MPL_DBG_Outevent( file, line, MPIDI_CH3_DBG_CONNECT, 0, "%s", str );
+ MPL_dbg_outevent( file, line, MPIDI_CH3_DBG_CONNECT, 0, "%s", str );
while (*str) str++;
str++;
}
diff --git a/src/mpid/common/hcoll/hcoll.h b/src/mpid/common/hcoll/hcoll.h
index 601359e..a2a186f 100644
--- a/src/mpid/common/hcoll/hcoll.h
+++ b/src/mpid/common/hcoll/hcoll.h
@@ -14,7 +14,7 @@
extern int world_comm_destroying;
#if defined(MPL_USE_DBG_LOGGING)
-extern MPL_DBG_Class MPIR_DBG_HCOLL;
+extern MPL_dbg_class MPIR_DBG_HCOLL;
#endif /* MPL_USE_DBG_LOGGING */
int hcoll_comm_create(MPID_Comm * comm, void *param);
diff --git a/src/mpid/common/hcoll/hcoll_init.c b/src/mpid/common/hcoll/hcoll_init.c
index 750cc94..dfd5b5c 100644
--- a/src/mpid/common/hcoll/hcoll_init.c
+++ b/src/mpid/common/hcoll/hcoll_init.c
@@ -23,7 +23,7 @@ int hcoll_comm_attr_keyval = MPI_KEYVAL_INVALID;
int world_comm_destroying = 0;
#if defined(MPL_USE_DBG_LOGGING)
-MPL_DBG_Class MPIR_DBG_HCOLL;
+MPL_dbg_class MPIR_DBG_HCOLL;
#endif /* MPL_USE_DBG_LOGGING */
#undef FUNCNAME
@@ -79,7 +79,7 @@ int hcoll_initialize(void)
}
#if defined(MPL_USE_DBG_LOGGING)
- MPIR_DBG_HCOLL = MPL_DBG_Class_alloc("HCOLL", "hcoll");
+ MPIR_DBG_HCOLL = MPL_dbg_class_alloc("HCOLL", "hcoll");
#endif /* MPL_USE_DBG_LOGGING */
hcoll_rte_fns_setup();
diff --git a/src/mpl/include/mpl_argstr.h b/src/mpl/include/mpl_argstr.h
index 78a4d60..3943043 100644
--- a/src/mpl/include/mpl_argstr.h
+++ b/src/mpl/include/mpl_argstr.h
@@ -15,7 +15,7 @@
#include "mpl_dbg.h"
#if defined (MPL_USE_DBG_LOGGING)
-extern MPL_DBG_Class MPIR_DBG_STRING;
+extern MPL_dbg_class MPIR_DBG_STRING;
#endif /* MPL_USE_DBG_LOGGING */
#define MPL_STR_SUCCESS 0
diff --git a/src/mpl/include/mpl_dbg.h b/src/mpl/include/mpl_dbg.h
index 6587f90..df50f0d 100644
--- a/src/mpl/include/mpl_dbg.h
+++ b/src/mpl/include/mpl_dbg.h
@@ -23,33 +23,33 @@
#ifdef MPL_USE_DBG_LOGGING
#define MPL_DBG_SELECTED(_class, _level) \
- ((_class & MPL_DBG_ActiveClasses) && MPL_DBG_##_level <= MPL_DBG_MaxLevel)
+ ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level)
#define MPL_DBG_MSG(_class, _level, _string) \
{ \
- if ((_class & MPL_DBG_ActiveClasses) && MPL_DBG_##_level <= MPL_DBG_MaxLevel) { \
- MPL_DBG_Outevent(__FILE__, __LINE__, _class, 0, "%s", _string); \
+ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \
+ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _string); \
} \
}
#define MPL_DBG_MSG_S(_class, _level, _fmat, _string) \
{ \
- if ((_class & MPL_DBG_ActiveClasses) && MPL_DBG_##_level <= MPL_DBG_MaxLevel) { \
- MPL_DBG_Outevent(__FILE__, __LINE__, _class, 1, _fmat, _string); \
+ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \
+ MPL_dbg_outevent(__FILE__, __LINE__, _class, 1, _fmat, _string); \
} \
}
#define MPL_DBG_MSG_D(_class, _level, _fmat, _int) \
{ \
- if ((_class & MPL_DBG_ActiveClasses) && MPL_DBG_##_level <= MPL_DBG_MaxLevel) { \
- MPL_DBG_Outevent(__FILE__, __LINE__, _class, 2, _fmat, _int); \
+ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \
+ MPL_dbg_outevent(__FILE__, __LINE__, _class, 2, _fmat, _int); \
} \
}
#define MPL_DBG_MSG_P(_class, _level, _fmat, _pointer) \
{ \
- if ((_class & MPL_DBG_ActiveClasses) && MPL_DBG_##_level <= MPL_DBG_MaxLevel) { \
- MPL_DBG_Outevent(__FILE__, __LINE__, _class, 3, _fmat, _pointer); \
+ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \
+ MPL_dbg_outevent(__FILE__, __LINE__, _class, 3, _fmat, _pointer); \
} \
}
@@ -68,28 +68,28 @@
#define MPL_DBG_MSG_FMT(_class, _level, _fmatargs) \
{ \
- if ((_class & MPL_DBG_ActiveClasses) && MPL_DBG_##_level <= MPL_DBG_MaxLevel) { \
+ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \
char _s[MPL_DBG_MAXLINE]; \
MPL_snprintf _fmatargs ; \
- MPL_DBG_Outevent(__FILE__, __LINE__, _class, 0, "%s", _s); \
+ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _s); \
} \
}
#define MPL_DBG_STMT(_class, _level, _stmt) \
{ \
- if ((_class & MPL_DBG_ActiveClasses) && MPL_DBG_##_level <= MPL_DBG_MaxLevel) { \
+ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \
_stmt; \
} \
}
#define MPL_DBG_OUT(_class, _msg) \
- MPL_DBG_Outevent(__FILE__, __LINE__, _class, 0, "%s", _msg)
+ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _msg)
#define MPL_DBG_OUT_FMT(_class,_fmatargs) \
{ \
char _s[MPL_DBG_MAXLINE]; \
MPL_snprintf _fmatargs ; \
- MPL_DBG_Outevent(__FILE__, __LINE__, _class, 0, "%s", _s); \
+ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _s); \
}
#else
@@ -108,7 +108,7 @@
#define MPL_DBG_ERR_INTERN 1
#define MPL_DBG_ERR_OTHER 2
-typedef unsigned int MPL_DBG_Class;
+typedef unsigned int MPL_dbg_class;
/* Special constants */
enum MPL_DBG_LEVEL {
@@ -117,16 +117,16 @@ enum MPL_DBG_LEVEL {
MPL_DBG_VERBOSE = 99
};
-extern int MPL_DBG_ActiveClasses;
-extern int MPL_DBG_MaxLevel;
+extern int MPL_dbg_active_classes;
+extern int MPL_dbg_max_level;
-extern MPL_DBG_Class MPL_DBG_ROUTINE_ENTER;
-extern MPL_DBG_Class MPL_DBG_ROUTINE_EXIT;
-extern MPL_DBG_Class MPL_DBG_ROUTINE;
-extern MPL_DBG_Class MPL_DBG_ALL;
+extern MPL_dbg_class MPL_DBG_ROUTINE_ENTER;
+extern MPL_dbg_class MPL_DBG_ROUTINE_EXIT;
+extern MPL_dbg_class MPL_DBG_ROUTINE;
+extern MPL_dbg_class MPL_DBG_ALL;
-MPL_DBG_Class MPL_DBG_Class_alloc(const char *ucname, const char *lcname);
-void MPL_DBG_Class_register(MPL_DBG_Class class, const char *ucname, const char *lcname);
+MPL_dbg_class MPL_dbg_class_alloc(const char *ucname, const char *lcname);
+void MPL_dbg_class_register(MPL_dbg_class class, const char *ucname, const char *lcname);
#define MPL_DBG_CLASS_CLR(class) \
do { \
@@ -139,10 +139,10 @@ void MPL_DBG_Class_register(MPL_DBG_Class class, const char *ucname, const char
} while (0)
/* *INDENT-OFF* */
-int MPL_DBG_Outevent(const char *, int, int, int, const char *, ...) ATTRIBUTE((format(printf, 5, 6)));
+int MPL_dbg_outevent(const char *, int, int, int, const char *, ...) ATTRIBUTE((format(printf, 5, 6)));
/* *INDENT-ON* */
-int MPL_DBG_Init(int *, char ***, int, int, int, int, int);
-int MPL_DBG_PreInit(int *, char ***, int);
+int MPL_dbg_init(int *, char ***, int, int, int, int, int);
+int MPL_dbg_pre_init(int *, char ***, int);
#endif
diff --git a/src/mpl/src/dbg/mpl_dbg.c b/src/mpl/src/dbg/mpl_dbg.c
index 1df23e4..761e147 100644
--- a/src/mpl/src/dbg/mpl_dbg.c
+++ b/src/mpl/src/dbg/mpl_dbg.c
@@ -33,8 +33,8 @@ extern FILE *fdopen(int fd, const char *mode);
#define MAXPATHLEN 1024
#endif
-int MPL_DBG_ActiveClasses = 0;
-int MPL_DBG_MaxLevel = MPL_DBG_TYPICAL;
+int MPL_dbg_active_classes = 0;
+int MPL_dbg_max_level = MPL_DBG_TYPICAL;
static enum {
DBG_UNINIT,
@@ -136,7 +136,7 @@ static void set_fp(FILE * fp)
dbg_static_fp = fp;
}
-int MPL_DBG_Outevent(const char *file, int line, int class, int kind, const char *fmat, ...)
+int MPL_dbg_outevent(const char *file, int line, int class, int kind, const char *fmat, ...)
{
int mpl_errno = MPL_DBG_SUCCESS;
va_list list;
@@ -251,7 +251,7 @@ static const int level_values[] = {
static const char *level_name[] = { "TERSE", "TYPICAL", "VERBOSE", 0 };
static const char *lc_level_name[] = { "terse", "typical", "verbose", 0 };
-void MPL_DBG_Class_register(MPL_DBG_Class class, const char *ucname, const char *lcname)
+void MPL_dbg_class_register(MPL_dbg_class class, const char *ucname, const char *lcname)
{
int i, j;
@@ -270,7 +270,7 @@ void MPL_DBG_Class_register(MPL_DBG_Class class, const char *ucname, const char
if (len == slen && (strncmp(unregistered_classes[i], lcname, len) ||
strncmp(unregistered_classes[i], ucname, len))) {
/* got a match */
- MPL_DBG_ActiveClasses |= class;
+ MPL_dbg_active_classes |= class;
for (j = i; j < num_unregistered_classes - 1; j++)
unregistered_classes[j] = unregistered_classes[j + 1];
num_unregistered_classes--;
@@ -280,12 +280,12 @@ void MPL_DBG_Class_register(MPL_DBG_Class class, const char *ucname, const char
}
}
-MPL_DBG_Class MPL_DBG_Class_alloc(const char *ucname, const char *lcname)
+MPL_dbg_class MPL_dbg_class_alloc(const char *ucname, const char *lcname)
{
static unsigned int class = 1;
/* create a user handle for this class */
- MPL_DBG_Class_register(class, ucname, lcname);
+ MPL_dbg_class_register(class, ucname, lcname);
class <<= 1;
@@ -314,13 +314,13 @@ static int dbg_process_args(int *argc_p, char ***argv_p)
/* Found a command */
if (*s == 0) {
/* Just -mpich-dbg */
- MPL_DBG_MaxLevel = MPL_DBG_TYPICAL;
- MPL_DBG_ActiveClasses = MPL_DBG_ALL;
+ MPL_dbg_max_level = MPL_DBG_TYPICAL;
+ MPL_dbg_active_classes = MPL_DBG_ALL;
}
else if (*s == '=') {
/* look for file */
- MPL_DBG_MaxLevel = MPL_DBG_TYPICAL;
- MPL_DBG_ActiveClasses = MPL_DBG_ALL;
+ MPL_dbg_max_level = MPL_DBG_TYPICAL;
+ MPL_dbg_active_classes = MPL_DBG_ALL;
s++;
if (strncmp(s, "file", 4) == 0) {
file_pattern = default_file_pattern;
@@ -390,8 +390,8 @@ static int dbg_process_env(void)
s = getenv("MPICH_DBG");
if (s) {
/* Set the defaults */
- MPL_DBG_MaxLevel = MPL_DBG_TYPICAL;
- MPL_DBG_ActiveClasses = MPL_DBG_ALL;
+ MPL_dbg_max_level = MPL_DBG_TYPICAL;
+ MPL_dbg_active_classes = MPL_DBG_ALL;
if (strncmp(s, "FILE", 4) == 0) {
file_pattern = default_file_pattern;
}
@@ -428,17 +428,17 @@ static int dbg_process_env(void)
return MPL_DBG_SUCCESS;
}
-MPL_DBG_Class MPL_DBG_ROUTINE_ENTER;
-MPL_DBG_Class MPL_DBG_ROUTINE_EXIT;
-MPL_DBG_Class MPL_DBG_ROUTINE;
-MPL_DBG_Class MPL_DBG_ALL = ~(0); /* pre-initialize the ALL class */
+MPL_dbg_class MPL_DBG_ROUTINE_ENTER;
+MPL_dbg_class MPL_DBG_ROUTINE_EXIT;
+MPL_dbg_class MPL_DBG_ROUTINE;
+MPL_dbg_class MPL_DBG_ALL = ~(0); /* pre-initialize the ALL class */
/*
* Attempt to initialize the logging system. This works only if the
* full initialization is not required for updating the environment
* and/or command-line arguments.
*/
-int MPL_DBG_PreInit(int *argc_p, char ***argv_p, int wtimeNotReady)
+int MPL_dbg_pre_init(int *argc_p, char ***argv_p, int wtimeNotReady)
{
MPL_time_t t;
@@ -465,22 +465,22 @@ int MPL_DBG_PreInit(int *argc_p, char ***argv_p, int wtimeNotReady)
}
/* Allocate the predefined classes */
- MPL_DBG_ROUTINE_ENTER = MPL_DBG_Class_alloc("ROUTINE_ENTER", "routine_enter");
- MPL_DBG_ROUTINE_EXIT = MPL_DBG_Class_alloc("ROUTINE_EXIT", "routine_exit");
+ MPL_DBG_ROUTINE_ENTER = MPL_dbg_class_alloc("ROUTINE_ENTER", "routine_enter");
+ MPL_DBG_ROUTINE_EXIT = MPL_dbg_class_alloc("ROUTINE_EXIT", "routine_exit");
MPL_DBG_CLASS_CLR(MPL_DBG_ROUTINE);
MPL_DBG_CLASS_APPEND(MPL_DBG_ROUTINE, MPL_DBG_ROUTINE_ENTER);
MPL_DBG_CLASS_APPEND(MPL_DBG_ROUTINE, MPL_DBG_ROUTINE_EXIT);
- MPL_DBG_Class_register(MPL_DBG_ROUTINE, "ROUTINE", "routine");
+ MPL_dbg_class_register(MPL_DBG_ROUTINE, "ROUTINE", "routine");
- MPL_DBG_Class_register(MPL_DBG_ALL, "ALL", "all");
+ MPL_dbg_class_register(MPL_DBG_ALL, "ALL", "all");
dbg_initialized = DBG_PREINIT;
return MPL_DBG_SUCCESS;
}
-int MPL_DBG_Init(int *argc_p, char ***argv_p, int has_args, int has_env,
+int MPL_dbg_init(int *argc_p, char ***argv_p, int has_args, int has_env,
int wnum, int wrank, int threaded)
{
int ret;
@@ -528,7 +528,7 @@ int MPL_DBG_Init(int *argc_p, char ***argv_p, int has_args, int has_env,
if (which_rank >= 0 && which_rank != wrank) {
/* Turn off logging on this process */
- MPL_DBG_ActiveClasses = 0;
+ MPL_dbg_active_classes = 0;
}
/* If the file has already been opened with a temp filename,
@@ -891,7 +891,7 @@ static int dbg_openfile(FILE ** dbg_fp)
}
/* Support routines for processing mpich-dbg values */
-/* Update the GLOBAL variable MPL_DBG_ActiveClasses with the bits
+/* Update the GLOBAL variable MPL_dbg_active_classes with the bits
* corresponding to this name */
static int dbg_set_class(const char *s)
{
@@ -911,7 +911,7 @@ static int dbg_set_class(const char *s)
if (slen == len && (strncmp(str, classnames[i].lcname, len) ||
strncmp(str, classnames[i].ucname, len))) {
/* we have a match */
- MPL_DBG_ActiveClasses |= classnames[i].classbits;
+ MPL_dbg_active_classes |= classnames[i].classbits;
found_match = 1;
break;
}
@@ -931,7 +931,7 @@ static int dbg_set_class(const char *s)
return 0;
}
-/* Set the global MPL_DBG_MaxLevel if there is a match with the known
+/* Set the global MPL_dbg_max_level if there is a match with the known
* level names */
static int dbg_set_level(const char *s, const char *(names[]))
{
@@ -939,7 +939,7 @@ static int dbg_set_level(const char *s, const char *(names[]))
for (i = 0; names[i]; i++) {
if (strcmp(names[i], s) == 0) {
- MPL_DBG_MaxLevel = level_values[i];
+ MPL_dbg_max_level = level_values[i];
return 0;
}
}
-----------------------------------------------------------------------
Summary of changes:
src/glue/romio/glue_romio.c | 4 +-
src/include/mpihandlemem.h | 2 +-
src/include/mpiimpl.h | 20 ++++----
src/include/mpimem.h | 2 +-
src/mpi/init/init.c | 2 +-
src/mpi/init/initthread.c | 52 +++++++++---------
.../ch3/channels/nemesis/netmod/tcp/tcp_impl.h | 2 +-
.../ch3/channels/nemesis/netmod/tcp/tcp_init.c | 4 +-
src/mpid/ch3/include/mpidimpl.h | 16 +++---
src/mpid/ch3/src/mpid_init.c | 32 ++++++------
src/mpid/ch3/src/mpidi_pg.c | 6 +-
src/mpid/common/hcoll/hcoll.h | 2 +-
src/mpid/common/hcoll/hcoll_init.c | 4 +-
src/mpid/common/sock/poll/mpidu_socki.h | 4 ++
src/mpid/common/sock/poll/sock_init.i | 8 +++
src/mpid/common/sock/poll/sock_post.i | 10 ++--
src/mpid/common/sock/poll/socki_util.i | 2 +-
src/mpl/include/mpl_argstr.h | 2 +-
src/mpl/include/mpl_dbg.h | 52 +++++++++---------
src/mpl/src/dbg/mpl_dbg.c | 56 ++++++++++----------
20 files changed, 147 insertions(+), 135 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-201-ge0e55b7
by noreply@mpich.org 18 Feb '16
by noreply@mpich.org 18 Feb '16
18 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via e0e55b74047115b594681955ce12a50d0d65bedd (commit)
via 5d1e0e91c33829272e066922d505dae1c6e2b5ff (commit)
via e42f060cbad66a42619e88b0122c481e48fc173f (commit)
from 6fafa6da19a200a6aeb147e58cfadbece3ef6685 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/e0e55b74047115b594681955ce12a50d0…
commit e0e55b74047115b594681955ce12a50d0d65bedd
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Wed Jan 27 20:52:12 2016 -0600
Use (u)intptr_t instead of MPIU_(U)PINT.
We now assume the availability of some C99 features in MPICH, including
fixed-width integers. Macros that were created in place of these
capabilities can now be deleted.
This patch also deletes the associated typedefs that simply point to the
pointer types, such as MPIDI_msg_sz_t.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/configure.ac b/configure.ac
index ff936cf..0c2a789 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4722,49 +4722,6 @@ if test "$ac_cv_sizeof_int" = "$aint_size" ; then
AC_DEFINE(SIZEOF_INT_IS_AINT,1,[define if sizeof(int) = sizeof(MPI_Aint)])
fi
-# Find a pointer-sized int
-for type in int long long_long short ; do
- eval len=\$ac_cv_sizeof_$type
- if test "$len" = "$ac_cv_sizeof_void_p" ; then
- case $type in
- int)
- MPIU_PINT_FMT_DEC_SPEC="\"%d\""
- MPIU_UPINT_FMT_DEC_SPEC="\"%u\""
- ;;
- long)
- MPIU_PINT_FMT_DEC_SPEC="\"%ld\""
- MPIU_UPINT_FMT_DEC_SPEC="\"%lu\""
- ;;
- long_long)
- MPIU_PINT_FMT_DEC_SPEC="\"%lld\""
- MPIU_UPINT_FMT_DEC_SPEC="\"%llu\""
- ;;
- short)
- MPIU_PINT_FMT_DEC_SPEC="\"%hd\""
- MPIU_UPINT_FMT_DEC_SPEC="\"%hu\""
- ;;
- *)
- AC_MSG_WARN([unable to determine format specifiers for MPIU_Pint, defaulting to int])
- MPIU_PINT_FMT_DEC_SPEC="\"%d\""
- MPIU_UPINT_FMT_DEC_SPEC="\"%u\""
- ;;
- esac
- MPIU_PINT=`echo $type | sed -e 's/_/ /'`
- break
- fi
-done
-AC_DEFINE_UNQUOTED(MPIU_Pint,$MPIU_PINT,[MPIU_Pint is a pointer-sized integer])
-# allow @MPIU_PINT@ substitution in glue_romio.h
-AC_SUBST([MPIU_PINT])
-
-AC_DEFINE_UNQUOTED(MPIU_PINT_FMT_DEC_SPEC,
- $MPIU_PINT_FMT_DEC_SPEC,[MPIU_PINT_FMT_DEC_SPEC is the format
- specifier for printing Pint as a decimal])
-AC_DEFINE_UNQUOTED(MPIU_Upint,unsigned $MPIU_PINT,[MPIU_Upint is an unsigned pointer-sized integer])
-AC_DEFINE_UNQUOTED(MPIU_UPINT_FMT_DEC_SPEC,
- $MPIU_UPINT_FMT_DEC_SPEC,[MPIU_UPINT_FMT_DEC_SPEC is the format
- specifier for printing Upint as a decimal])
-
# ----------------------------------------------------------------------------
# MPI_AINT datatype
# ----------------------------------------------------------------------------
diff --git a/src/binding/fortran/mpif_h/buildiface b/src/binding/fortran/mpif_h/buildiface
index 488fb43..596835c 100755
--- a/src/binding/fortran/mpif_h/buildiface
+++ b/src/binding/fortran/mpif_h/buildiface
@@ -2363,7 +2363,7 @@ sub handle_array_in_arg {
# where an address is larger than an MPI_Fint. This is correct; these
# routines are for the MPI-1 routines that use an MPI_Fint where the
# C code uses a void * (MPI_Aint in MPI-2).
-# Instead of using MPI_Aint, we use MPIU_Pint. This allows the MPI
+# Instead of using MPI_Aint, we use intptr_t. This allows the MPI
# implementation to set MPI_Aint to be *larger* than a pointer-sized-int,
# which is needed (as a temporary workaround) on systems like Blue Gene, which
# have 4 byte pointers but file systems that need 8 byte datatypes (not just
@@ -2380,7 +2380,7 @@ sub addrint_in_decl {
}
sub addrint_in_arg {
my $count = $_[0];
- print $OUTFD "(void *)((MPIU_Pint)*(MPI_Fint *)v$count)";
+ print $OUTFD "(void *)((intptr_t)*(MPI_Fint *)v$count)";
}
sub attrint_ctof {
@@ -2399,7 +2399,7 @@ sub attrint_ctof {
*(MPI_Fint*)$cvar = 0;
}
else {
- *(MPI_Fint*)$cvar = (MPI_Fint)(MPIU_Pint)attr$cvar;
+ *(MPI_Fint*)$cvar = (MPI_Fint)(intptr_t)attr$cvar;
}\n";
}
diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index 3dbe5e0..0acc5bd 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -7,11 +7,6 @@
#ifndef GLUE_ROMIO_H_INCLUDED
#define GLUE_ROMIO_H_INCLUDED
-/* TODO we should probaly eliminate this type entirely and just patch up the
- * environment so that intptr_t and uintptr_t always work. */
-#define MPIU_Pint @MPIU_PINT@
-#define MPIU_Upint unsigned @MPIU_PINT@
-
int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num);
#if (!defined(NDEBUG) && (@HAVE_ERROR_CHECKING@))
@@ -33,7 +28,7 @@ extern int MPIR_Ext_dbg_romio_verbose_enabled;
/* a copy of MPIU_Ensure_Aint_fits_in_pointer for external use, slightly
* modified to use ROMIO's version of the pointer-casting macro */
#define MPIR_Ext_ensure_Aint_fits_in_pointer(aint) \
- MPIR_Ext_assert((aint) == (MPI_Aint)(MPIU_Upint) ADIOI_AINT_CAST_TO_VOID_PTR(aint));
+ MPIR_Ext_assert((aint) == (MPI_Aint)(uintptr_t) ADIOI_AINT_CAST_TO_VOID_PTR(aint));
/* to be called early by ROMIO's initialization process in order to setup init-time
* glue code that cannot be initialized statically */
diff --git a/src/mpi/attr/attr_get.c b/src/mpi/attr/attr_get.c
index 77f8abc..019dddf 100644
--- a/src/mpi/attr/attr_get.c
+++ b/src/mpi/attr/attr_get.c
@@ -93,9 +93,9 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag)
/* A common user error is to pass the address of a 4-byte
int when the address of a pointer (or an address-sized int)
should have been used. We can test for this specific
- case. Note that this code assumes sizeof(MPIU_Pint) is
+ case. Note that this code assumes sizeof(intptr_t) is
a power of 2. */
- MPIR_ERR_CHKANDJUMP((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1),
+ MPIR_ERR_CHKANDJUMP((intptr_t)attribute_val & (sizeof(intptr_t)-1),
mpi_errno,MPI_ERR_ARG,"**attrnotptr");
# endif
}
diff --git a/src/mpi/attr/attrutil.c b/src/mpi/attr/attrutil.c
index b9abbe6..4f15057 100644
--- a/src/mpi/attr/attrutil.c
+++ b/src/mpi/attr/attrutil.c
@@ -91,7 +91,7 @@ int MPIR_Call_attr_delete( int handle, MPID_Attribute *attr_p )
handle,
attr_p->keyval->handle,
attr_p->attrType,
- (void *)(MPIU_Pint)attr_p->value,
+ (void *)(intptr_t)attr_p->value,
attr_p->keyval->extra_state
);
/* --BEGIN ERROR HANDLING-- */
@@ -149,7 +149,7 @@ int MPIR_Call_attr_copy( int handle, MPID_Attribute *attr_p, void** value_copy,
attr_p->keyval->handle,
attr_p->keyval->extra_state,
attr_p->attrType,
- (void *)(MPIU_Pint)attr_p->value,
+ (void *)(intptr_t)attr_p->value,
value_copy,
flag
);
@@ -222,8 +222,8 @@ int MPIR_Attr_dup_list( int handle, MPID_Attribute *old_attrs,
new_p->attrType = p->attrType;
new_p->pre_sentinal = 0;
/* FIXME: This is not correct in some cases (size(MPI_Aint)>
- sizeof(MPIU_Pint)) */
- new_p->value = (MPID_AttrVal_t)(MPIU_Pint)new_value;
+ sizeof(intptr_t)) */
+ new_p->value = (MPID_AttrVal_t)(intptr_t)new_value;
new_p->post_sentinal = 0;
new_p->next = 0;
diff --git a/src/mpi/attr/comm_get_attr.c b/src/mpi/attr/comm_get_attr.c
index 74cebc1..400b4bf 100644
--- a/src/mpi/attr/comm_get_attr.c
+++ b/src/mpi/attr/comm_get_attr.c
@@ -61,9 +61,9 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
/* A common user error is to pass the address of a 4-byte
int when the address of a pointer (or an address-sized int)
should have been used. We can test for this specific
- case. Note that this code assumes sizeof(MPIU_Pint) is
+ case. Note that this code assumes sizeof(intptr_t) is
a power of 2. */
- if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
+ if ((intptr_t)attribute_val & (sizeof(intptr_t)-1)) {
MPIR_ERR_SETANDSTMT(mpi_errno,MPI_ERR_ARG,goto fn_fail,"**attrnotptr");
}
# endif
@@ -105,7 +105,7 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
/* This is an address-sized int instead of a Fortran (MPI_Fint)
integer because, even for the Fortran keyvals, the C interface is
used which stores the result in a pointer (hence we need a
- pointer-sized int). Thus we use MPIU_Pint instead of MPI_Fint.
+ pointer-sized int). Thus we use intptr_t instead of MPI_Fint.
On some 64-bit plaforms, such as Solaris-SPARC, using an MPI_Fint
will cause the value to placed into the high, rather than low,
end of the output value. */
@@ -203,7 +203,7 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
version of INTEGER (KIND=MPI_ADDRESS_KIND) ) */
if (*flag) {
/* Use the internal pointer-sized-int for systems (e.g., BG/P)
- that define MPI_Aint as a different size than MPIU_Pint.
+ that define MPI_Aint as a different size than intptr_t.
The casts must be as they are:
On the right, the value is a pointer to an int, so to
get the correct value, we need to extract the int.
@@ -212,12 +212,12 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
/* FIXME: This code is broken. The MPIR_ATTR_INT is for Fortran
MPI_Fint types, not int, and MPIR_ATTR_AINT is for Fortran
INTEGER(KIND=MPI_ADDRESS_KIND), which is probably an MPI_Aint,
- and MPIU_Pint is for exactly the case where MPI_Aint is not
- the same as MPIU_Pint.
+ and intptr_t is for exactly the case where MPI_Aint is not
+ the same as intptr_t.
This code needs to be fixed in every place that it occurs
(i.e., see the win and type get_attr routines). */
if (outAttrType == MPIR_ATTR_AINT)
- *(MPIU_Pint*)attr_val_p = *(int*)*(void **)attr_val_p;
+ *(intptr_t*)attr_val_p = *(int*)*(void **)attr_val_p;
else if (outAttrType == MPIR_ATTR_INT) {
/* *(int*)attr_val_p = *(int *)*(void **)attr_val_p;*/
/* This is correct, because the cooresponding code
@@ -226,7 +226,7 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
endian systems. Any changes made here must have
corresponding changes in src/binding/f77/attr_getf.c ,
which is generated by src/binding/f77/buildiface . */
- *(MPIU_Pint*)attr_val_p = *(int*)*(void **)attr_val_p;
+ *(intptr_t*)attr_val_p = *(int*)*(void **)attr_val_p;
}
}
}
@@ -260,11 +260,11 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
*(void**)attribute_val = &(p->value);
}
else {
- *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+ *(void**)attribute_val = (void *)(intptr_t)(p->value);
}
}
else {
- *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+ *(void**)attribute_val = (void *)(intptr_t)(p->value);
}
break;
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index bca3a6e..3065901 100644
--- a/src/mpi/attr/comm_set_attr.c
+++ b/src/mpi/attr/comm_set_attr.c
@@ -59,13 +59,13 @@ int MPIR_Comm_set_attr_impl(MPID_Comm *comm_ptr, int comm_keyval, void *attribut
}
p->attrType = attrType;
/* FIXME: This code is incorrect in some cases, particularly
- in the case where MPIU_Pint is different from MPI_Aint,
+ in the case where intptr_t is different from MPI_Aint,
since in that case, the Fortran 9x interface will provide
more bytes in the attribute_val than this allows. The
dual casts are a sign that this is faulty. This will
need to be fixed in the type/win set_attr routines as
well. */
- p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
/* printf( "Updating attr at %x\n", &p->value ); */
/* Does not change the reference count on the keyval */
break;
@@ -81,7 +81,7 @@ int MPIR_Comm_set_attr_impl(MPID_Comm *comm_ptr, int comm_keyval, void *attribut
new_p->attrType = attrType;
new_p->pre_sentinal = 0;
/* FIXME: See the comment above on this dual cast. */
- new_p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ new_p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
new_p->post_sentinal = 0;
new_p->next = comm_ptr->attributes;
MPIR_Keyval_add_ref( keyval_ptr );
diff --git a/src/mpi/attr/type_get_attr.c b/src/mpi/attr/type_get_attr.c
index a7d736a..8fe8060 100644
--- a/src/mpi/attr/type_get_attr.c
+++ b/src/mpi/attr/type_get_attr.c
@@ -56,9 +56,9 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
/* A common user error is to pass the address of a 4-byte
int when the address of a pointer (or an address-sized int)
should have been used. We can test for this specific
- case. Note that this code assumes sizeof(MPIU_Pint) is
+ case. Note that this code assumes sizeof(intptr_t) is
a power of 2. */
- if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
+ if ((intptr_t)attribute_val & (sizeof(intptr_t)-1)) {
MPIR_ERR_SETANDSTMT(mpi_errno,MPI_ERR_ARG,goto fn_fail,"**attrnotptr");
}
# endif
@@ -113,11 +113,11 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
*(void**)attribute_val = &(p->value);
}
else {
- *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+ *(void**)attribute_val = (void *)(intptr_t)(p->value);
}
}
else
- *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+ *(void**)attribute_val = (void *)(intptr_t)(p->value);
break;
}
diff --git a/src/mpi/attr/type_set_attr.c b/src/mpi/attr/type_set_attr.c
index e36badd..6f94dae 100644
--- a/src/mpi/attr/type_set_attr.c
+++ b/src/mpi/attr/type_set_attr.c
@@ -95,7 +95,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
goto fn_fail;
}
/* --END ERROR HANDLING-- */
- p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
p->attrType = attrType;
break;
}
@@ -106,7 +106,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
new_p->keyval = keyval_ptr;
new_p->attrType = attrType;
new_p->pre_sentinal = 0;
- new_p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ new_p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
new_p->post_sentinal = 0;
new_p->next = p->next;
MPIR_Keyval_add_ref( keyval_ptr );
@@ -125,7 +125,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
new_p->keyval = keyval_ptr;
new_p->attrType = attrType;
new_p->pre_sentinal = 0;
- new_p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ new_p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
new_p->post_sentinal = 0;
new_p->next = 0;
MPIR_Keyval_add_ref( keyval_ptr );
diff --git a/src/mpi/attr/win_get_attr.c b/src/mpi/attr/win_get_attr.c
index bf0e94c..dbf4021 100644
--- a/src/mpi/attr/win_get_attr.c
+++ b/src/mpi/attr/win_get_attr.c
@@ -52,9 +52,9 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
/* A common user error is to pass the address of a 4-byte
int when the address of a pointer (or an address-sized int)
should have been used. We can test for this specific
- case. Note that this code assumes sizeof(MPIU_Pint) is
+ case. Note that this code assumes sizeof(intptr_t) is
a power of 2. */
- if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
+ if ((intptr_t)attribute_val & (sizeof(intptr_t)-1)) {
MPIR_ERR_SETANDSTMT(mpi_errno,MPI_ERR_ARG,goto fn_fail,"**attrnotptr");
}
# endif
@@ -94,7 +94,7 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
#ifdef HAVE_FORTRAN_BINDING
/* Note that this routine only has a Fortran 90 binding,
so the attribute value is an address-sized int */
- MPIU_Pint *attr_int = (MPIU_Pint *)attribute_val;
+ intptr_t *attr_int = (intptr_t *)attribute_val;
#endif
*flag = 1;
@@ -180,11 +180,11 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
*(void**)attribute_val = &(p->value);
}
else {
- *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+ *(void**)attribute_val = (void *)(intptr_t)(p->value);
}
}
else
- *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+ *(void**)attribute_val = (void *)(intptr_t)(p->value);
break;
}
diff --git a/src/mpi/attr/win_set_attr.c b/src/mpi/attr/win_set_attr.c
index 94d7dc0..66a425c 100644
--- a/src/mpi/attr/win_set_attr.c
+++ b/src/mpi/attr/win_set_attr.c
@@ -100,7 +100,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
goto fn_fail;
}
/* --END ERROR HANDLING-- */
- p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
p->attrType = attrType;
/* Does not change the reference count on the keyval */
break;
@@ -112,7 +112,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
new_p->keyval = keyval_ptr;
new_p->attrType = attrType;
new_p->pre_sentinal = 0;
- new_p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ new_p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
new_p->post_sentinal = 0;
new_p->next = p->next;
MPIR_Keyval_add_ref( keyval_ptr );
@@ -131,7 +131,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
new_p->attrType = attrType;
new_p->keyval = keyval_ptr;
new_p->pre_sentinal = 0;
- new_p->value = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+ new_p->value = (MPID_AttrVal_t)(intptr_t)attribute_val;
new_p->post_sentinal = 0;
new_p->next = 0;
MPIR_Keyval_add_ref( keyval_ptr );
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index b797e86..7fc4444 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -126,11 +126,11 @@ int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtyp
else
{
char * buf;
- MPIDI_msg_sz_t buf_off;
+ intptr_t buf_off;
MPID_Segment sseg;
- MPIDI_msg_sz_t sfirst;
+ intptr_t sfirst;
MPID_Segment rseg;
- MPIDI_msg_sz_t rfirst;
+ intptr_t rfirst;
MPIU_CHKLMEM_MALLOC(buf, char *, COPY_BUFFER_SZ, mpi_errno, "buf");
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
index 7d82fa2..c5719c9 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
@@ -719,9 +719,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
others_req[i].lens =
ADIOI_Malloc(count_others_req_per_proc[i]*sizeof(ADIO_Offset));
- if ( (MPIU_Upint)others_req[i].offsets < (MPIU_Upint)recvBufForOffsets )
+ if ( (uintptr_t)others_req[i].offsets < (uintptr_t)recvBufForOffsets )
recvBufForOffsets = others_req[i].offsets;
- if ( (MPIU_Upint)others_req[i].lens < (MPIU_Upint)recvBufForLens )
+ if ( (uintptr_t)others_req[i].lens < (uintptr_t)recvBufForLens )
recvBufForLens = others_req[i].lens;
others_req[i].mem_ptrs = (MPI_Aint *)
@@ -750,13 +750,13 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
for (i=0; i<nprocs; i++)
{
if ( (my_req[i].count) &&
- ((MPIU_Upint)my_req[i].offsets <= (MPIU_Upint)sendBufForOffsets) )
+ ((uintptr_t)my_req[i].offsets <= (uintptr_t)sendBufForOffsets) )
{
sendBufForOffsets = my_req[i].offsets;
}
if ( (my_req[i].count) &&
- ((MPIU_Upint)my_req[i].lens <= (MPIU_Upint)sendBufForLens) )
+ ((uintptr_t)my_req[i].lens <= (uintptr_t)sendBufForLens) )
{
sendBufForLens = my_req[i].lens;
}
@@ -775,9 +775,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
sdispls[i] = 0;
else
sdispls[i] = (int)
- ( ( (MPIU_Upint)my_req[i].offsets -
- (MPIU_Upint)sendBufForOffsets ) /
- (MPIU_Upint)sizeof(ADIO_Offset) );
+ ( ( (uintptr_t)my_req[i].offsets -
+ (uintptr_t)sendBufForOffsets ) /
+ (uintptr_t)sizeof(ADIO_Offset) );
/* Receive these offsets from process i.*/
rcounts[i] = count_others_req_per_proc[i];
@@ -785,9 +785,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
rdispls[i] = 0;
else
rdispls[i] = (int)
- ( ( (MPIU_Upint)others_req[i].offsets -
- (MPIU_Upint)recvBufForOffsets ) /
- (MPIU_Upint)sizeof(ADIO_Offset) );
+ ( ( (uintptr_t)others_req[i].offsets -
+ (uintptr_t)recvBufForOffsets ) /
+ (uintptr_t)sizeof(ADIO_Offset) );
}
/* Exchange the offsets */
@@ -809,9 +809,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
sdispls[i] = 0;
else
sdispls[i] = (int)
- ( ( (MPIU_Upint)my_req[i].lens -
- (MPIU_Upint)sendBufForLens ) /
- (MPIU_Upint) sizeof(ADIO_Offset) );
+ ( ( (uintptr_t)my_req[i].lens -
+ (uintptr_t)sendBufForLens ) /
+ (uintptr_t) sizeof(ADIO_Offset) );
/* Receive these offsets from process i. */
rcounts[i] = count_others_req_per_proc[i];
@@ -819,9 +819,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
rdispls[i] = 0;
else
rdispls[i] = (int)
- ( ( (MPIU_Upint)others_req[i].lens -
- (MPIU_Upint)recvBufForLens ) /
- (MPIU_Upint) sizeof(ADIO_Offset) );
+ ( ( (uintptr_t)others_req[i].lens -
+ (uintptr_t)recvBufForLens ) /
+ (uintptr_t) sizeof(ADIO_Offset) );
}
/* Exchange the lengths */
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
index e5c23b7..d504836 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -692,7 +692,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
}
if (req_off < real_off + real_size) {
count[i]++;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIU_Upint)(read_buf+req_off-real_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+req_off-real_off) == (ADIO_Offset)(uintptr_t)(read_buf+req_off-real_off));
MPI_Address(read_buf+req_off-real_off,
&(others_req[i].mem_ptrs[j]));
ADIOI_Assert((real_off + real_size - req_off) == (int)(real_off + real_size - req_off));
@@ -776,7 +776,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
if (for_next_iter) {
tmp_buf = (char *) ADIOI_Malloc(for_next_iter);
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIU_Upint)(read_buf+real_size-for_next_iter));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(uintptr_t)(read_buf+real_size-for_next_iter));
ADIOI_Assert((for_next_iter+coll_bufsize) == (size_t)(for_next_iter+coll_bufsize));
memcpy(tmp_buf, read_buf+real_size-for_next_iter, for_next_iter);
ADIOI_Free(fd->io_buf);
@@ -991,7 +991,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
{ \
while (size) { \
size_in_buf = MPL_MIN(size, flat_buf_sz); \
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)(buf + user_buf_idx)); \
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)(buf + user_buf_idx)); \
ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
memcpy(((char *) buf) + user_buf_idx, \
&(recv_buf[p][recv_buf_idx[p]]), size_in_buf); \
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
index 19eff8e..f39e4dc 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
@@ -822,7 +822,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype
}
if (req_off < off + size) {
count[i]++;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
MPI_Address(write_buf+req_off-off,
&(others_req[i].mem_ptrs[j]));
ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off));
@@ -1268,7 +1268,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf
{ \
while (size) { \
size_in_buf = MPL_MIN(size, flat_buf_sz); \
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
memcpy(&(send_buf[p][send_buf_idx[p]]), \
((char *) buf) + user_buf_idx, size_in_buf); \
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
index 7250a21..36f5f28 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
@@ -494,7 +494,7 @@ static void ADIOI_LUSTRE_Exch_and_write(ADIO_File fd, const void *buf,
req_len = others_req[i].lens[j];
if (req_off < iter_st_off + max_size) {
recv_count[i]++;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
MPI_Address(write_buf + req_off - off,
&(others_req[i].mem_ptrs[j]));
recv_size[i] += req_len;
@@ -856,7 +856,7 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf,
{ \
while (size) { \
size_in_buf = MPL_MIN(size, flat_buf_sz); \
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
memcpy(&(send_buf[p][send_buf_idx[p]]), \
((char *) buf) + user_buf_idx, size_in_buf); \
diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index 1fe1a68..9fe2ead 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -787,7 +787,7 @@ static void ADIOI_Iread_and_exch_l1_begin(ADIOI_NBC_Request *nbc_req,
}
if (req_off < real_off + real_size) {
count[i]++;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf) + req_off - real_off) == (ADIO_Offset)(MPIU_Upint)(read_buf + req_off - real_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf) + req_off - real_off) == (ADIO_Offset)(uintptr_t)(read_buf + req_off - real_off));
MPI_Address(read_buf + req_off - real_off,
&(others_req[i].mem_ptrs[j]));
ADIOI_Assert((real_off + real_size - req_off) == (int)(real_off + real_size - req_off));
@@ -883,7 +883,7 @@ static void ADIOI_Iread_and_exch_l1_end(ADIOI_NBC_Request *nbc_req,
if (for_next_iter) {
tmp_buf = (char *)ADIOI_Malloc(for_next_iter);
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIU_Upint)(read_buf+real_size-for_next_iter));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(uintptr_t)(read_buf+real_size-for_next_iter));
ADIOI_Assert((for_next_iter+vars->coll_bufsize) == (size_t)(for_next_iter+vars->coll_bufsize));
memcpy(tmp_buf, read_buf+real_size-for_next_iter, for_next_iter);
ADIOI_Free(fd->io_buf);
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index 9d50b2c..62a932c 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -817,7 +817,7 @@ static void ADIOI_Iexch_and_write_l1_begin(ADIOI_NBC_Request *nbc_req,
}
if (req_off < off + size) {
count[i]++;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
MPI_Address(write_buf + req_off - off,
&(others_req[i].mem_ptrs[j]));
ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off));
diff --git a/src/mpi/romio/adio/common/ad_read_coll.c b/src/mpi/romio/adio/common/ad_read_coll.c
index f723a6e..0335374 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -679,7 +679,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
}
if (req_off < real_off + real_size) {
count[i]++;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIU_Upint)(read_buf+req_off-real_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+req_off-real_off) == (ADIO_Offset)(uintptr_t)(read_buf+req_off-real_off));
MPI_Address(read_buf+req_off-real_off,
&(others_req[i].mem_ptrs[j]));
ADIOI_Assert((real_off + real_size - req_off) == (int)(real_off + real_size - req_off));
@@ -732,7 +732,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
if (for_next_iter) {
tmp_buf = (char *) ADIOI_Malloc(for_next_iter);
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIU_Upint)(read_buf+real_size-for_next_iter));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(uintptr_t)(read_buf+real_size-for_next_iter));
ADIOI_Assert((for_next_iter+coll_bufsize) == (size_t)(for_next_iter+coll_bufsize));
memcpy(tmp_buf, read_buf+real_size-for_next_iter, for_next_iter);
ADIOI_Free(fd->io_buf);
@@ -926,7 +926,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
{ \
while (size) { \
size_in_buf = MPL_MIN(size, flat_buf_sz); \
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
memcpy(((char *) buf) + user_buf_idx, \
&(recv_buf[p][recv_buf_idx[p]]), size_in_buf); \
diff --git a/src/mpi/romio/adio/common/ad_read_str_naive.c b/src/mpi/romio/adio/common/ad_read_str_naive.c
index aad8c5e..62a32c5 100644
--- a/src/mpi/romio/adio/common/ad_read_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_read_str_naive.c
@@ -81,7 +81,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
req_off = off;
req_len = flat_buf->blocklens[b_index];
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
ADIOI_Assert(req_len == (int) req_len);
ADIO_ReadContig(fd,
(char *) buf + userbuf_off,
@@ -241,7 +241,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
req_off = off;
req_len = frd_size;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
ADIOI_Assert(req_len == (int) req_len);
ADIO_ReadContig(fd,
(char *) buf + userbuf_off,
@@ -305,7 +305,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
req_len = size;
userbuf_off = i_offset;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
ADIOI_Assert(req_len == (int) req_len);
ADIO_ReadContig(fd,
(char *) buf + userbuf_off,
diff --git a/src/mpi/romio/adio/common/ad_write_coll.c b/src/mpi/romio/adio/common/ad_write_coll.c
index 18f70b9..ac5aae7 100644
--- a/src/mpi/romio/adio/common/ad_write_coll.c
+++ b/src/mpi/romio/adio/common/ad_write_coll.c
@@ -463,7 +463,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype
}
if (req_off < off + size) {
count[i]++;
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
MPI_Address(write_buf+req_off-off,
&(others_req[i].mem_ptrs[j]));
ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off));
@@ -829,7 +829,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf,
{ \
while (size) { \
size_in_buf = MPL_MIN(size, flat_buf_sz); \
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
memcpy(&(send_buf[p][send_buf_idx[p]]), \
((char *) buf) + user_buf_idx, size_in_buf); \
diff --git a/src/mpi/romio/adio/common/ad_write_nolock.c b/src/mpi/romio/adio/common/ad_write_nolock.c
index e73e01a..3f0fb6a 100644
--- a/src/mpi/romio/adio/common/ad_write_nolock.c
+++ b/src/mpi/romio/adio/common/ad_write_nolock.c
@@ -141,7 +141,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
flat_buf->blocklens[i]);
#endif
ADIOI_Assert(flat_buf->blocklens[i] == (unsigned)flat_buf->blocklens[i]);
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]) == (ADIO_Offset)((MPIU_Upint)buf + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]) == (ADIO_Offset)((uintptr_t)buf + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]));
#ifdef ADIOI_MPE_LOGGING
MPE_Log_event( ADIOI_MPE_write_a, 0, NULL );
#endif
diff --git a/src/mpi/romio/adio/common/ad_write_str_naive.c b/src/mpi/romio/adio/common/ad_write_str_naive.c
index 74f8121..adcfc35 100644
--- a/src/mpi/romio/adio/common/ad_write_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_write_str_naive.c
@@ -83,7 +83,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
req_len = flat_buf->blocklens[b_index];
ADIOI_Assert(req_len == (int) req_len);
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
ADIO_WriteContig(fd,
(char *) buf + userbuf_off,
(int)req_len,
@@ -242,7 +242,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
req_len = fwr_size;
ADIOI_Assert(req_len == (int) req_len);
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
ADIO_WriteContig(fd,
(char *) buf + userbuf_off,
(int)req_len,
@@ -306,7 +306,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
userbuf_off = i_offset;
ADIOI_Assert(req_len == (int) req_len);
- ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+ ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
ADIO_WriteContig(fd,
(char *) buf + userbuf_off,
(int)req_len,
diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h
index 91fb770..7cf62fa 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -1011,7 +1011,7 @@ int ADIOI_MPE_iwrite_b;
MPIU_AINT_CAST_TO_VOID_PTR from configure (mpi.h) */
#include "glue_romio.h"
- #define ADIOI_AINT_CAST_TO_VOID_PTR (void*)(MPIU_Pint)
+ #define ADIOI_AINT_CAST_TO_VOID_PTR (void*)(intptr_t)
/* The next two casts are only used when you don't want sign extension
when casting a (possible 4 byte) aint to a (8 byte) long long or offset */
#define ADIOI_AINT_CAST_TO_LONG_LONG (long long)
@@ -1026,7 +1026,6 @@ int ADIOI_MPE_iwrite_b;
#define ADIOI_AINT_CAST_TO_OFFSET ADIOI_AINT_CAST_TO_LONG_LONG
#define ADIOI_ENSURE_AINT_FITS_IN_PTR(aint_value)
#define ADIOI_Assert assert
- #define MPIU_Upint unsigned long
#endif
#ifdef MPL_USE_DBG_LOGGING /*todo fix dependency on mpich?*/
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
index 3d3be04..a38417e 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
@@ -147,7 +147,7 @@
#define MPID_NEM_PKT_HEADER_FIELDS \
int source; \
int dest; \
- MPIU_Pint datalen; \
+ intptr_t datalen; \
unsigned short seqno; \
unsigned short type; /* currently used only with checkpointing */
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
index 2e8f862..5ceddf0 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -34,7 +34,7 @@ int MPIDI_CH3I_comm_destroy(MPID_Comm *comm, void *param);
/* rendezvous hooks */
int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint count, MPI_Datatype datatype, int dt_contig,
- MPIDI_msg_sz_t data_sz, MPI_Aint dt_true_lb, int rank, int tag, MPID_Comm * comm, int context_offset);
+ intptr_t data_sz, MPI_Aint dt_true_lb, int rank, int tag, MPID_Comm * comm, int context_offset);
int MPID_nem_lmt_RndvRecv(struct MPIDI_VC *vc, MPID_Request *rreq);
#define MPID_nem_mpich_release_fbox(cell) \
@@ -55,8 +55,8 @@ typedef struct MPID_nem_pkt_lmt_rts
MPIDI_CH3_Pkt_type_t type;
MPIDI_Message_match match;
MPI_Request sender_req_id;
- MPIDI_msg_sz_t data_sz;
- MPIDI_msg_sz_t cookie_len;
+ intptr_t data_sz;
+ intptr_t cookie_len;
}
MPID_nem_pkt_lmt_rts_t;
@@ -65,8 +65,8 @@ typedef struct MPID_nem_pkt_lmt_cts
MPIDI_CH3_Pkt_type_t type;
MPI_Request sender_req_id;
MPI_Request receiver_req_id;
- MPIDI_msg_sz_t data_sz;
- MPIDI_msg_sz_t cookie_len;
+ intptr_t data_sz;
+ intptr_t cookie_len;
}
MPID_nem_pkt_lmt_cts_t;
@@ -83,7 +83,7 @@ typedef struct MPID_nem_pkt_lmt_cookie
int from_sender;
MPI_Request sender_req_id;
MPI_Request receiver_req_id;
- MPIDI_msg_sz_t cookie_len;
+ intptr_t cookie_len;
}
MPID_nem_pkt_lmt_cookie_t;
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
index 71eda22..84e4be2 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
@@ -20,17 +20,17 @@ static inline int MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *v
static inline void MPID_nem_mpich_dequeue_fastbox (int local_rank);
static inline void MPID_nem_mpich_enqueue_fastbox (int local_rank);
static inline int MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
- void *ext_header, MPIDI_msg_sz_t ext_header_sz,
+ void *ext_header, intptr_t ext_header_sz,
MPIDI_VC_t *vc, int *again);
static inline int MPID_nem_recv_seqno_matches (MPID_nem_queue_ptr_t qhead);
static inline int MPID_nem_mpich_test_recv (MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress);
static inline int MPID_nem_mpich_blocking_recv (MPID_nem_cell_ptr_t *cell, int *in_fbox, int completions);
static inline int MPID_nem_mpich_test_recv_wait (MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout);
static inline int MPID_nem_mpich_release_cell (MPID_nem_cell_ptr_t cell, MPIDI_VC_t *vc);
-static inline void MPID_nem_mpich_send_seg_header (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first,
- MPIDI_msg_sz_t segment_size, void *header, MPIDI_msg_sz_t header_sz,
- void *ext_header, MPIDI_msg_sz_t ext_header_sz, MPIDI_VC_t *vc, int *again);
-static inline void MPID_nem_mpich_send_seg (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size,
+static inline void MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
+ intptr_t segment_size, void *header, intptr_t header_sz,
+ void *ext_header, intptr_t ext_header_sz, MPIDI_VC_t *vc, int *again);
+static inline void MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
MPIDI_VC_t *vc, int *again);
@@ -226,7 +226,7 @@ MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
int mpi_errno = MPI_SUCCESS;
MPID_nem_cell_ptr_t el;
char *cell_buf;
- MPIDI_msg_sz_t payload_len;
+ intptr_t payload_len;
int my_rank;
MPIDI_CH3I_VC *vc_ch = &vc->ch;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_MPICH_SENDV);
@@ -324,13 +324,13 @@ MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
#define FCNAME MPL_QUOTE(FUNCNAME)
static inline int
MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
- void *ext_hdr_ptr, MPIDI_msg_sz_t ext_hdr_sz,
+ void *ext_hdr_ptr, intptr_t ext_hdr_sz,
MPIDI_VC_t *vc, int *again)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_cell_ptr_t el;
char *cell_buf;
- MPIDI_msg_sz_t payload_len;
+ intptr_t payload_len;
int my_rank;
MPIDI_CH3I_VC *vc_ch = &vc->ch;
MPI_Aint buf_offset = 0;
@@ -484,14 +484,14 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
static inline void
-MPID_nem_mpich_send_seg_header (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size,
- void *header, MPIDI_msg_sz_t header_sz, void *ext_header, MPIDI_msg_sz_t ext_header_sz,
+MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
+ void *header, intptr_t header_sz, void *ext_header, intptr_t ext_header_sz,
MPIDI_VC_t *vc, int *again)
{
MPID_nem_cell_ptr_t el;
- MPIDI_msg_sz_t datalen;
+ intptr_t datalen;
int my_rank;
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPIDI_CH3I_VC *vc_ch = &vc->ch;
MPI_Aint buf_offset = 0;
@@ -630,12 +630,12 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, MPIDI_msg_sz_t *segment_f
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
static inline void
-MPID_nem_mpich_send_seg (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size, MPIDI_VC_t *vc, int *again)
+MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size, MPIDI_VC_t *vc, int *again)
{
MPID_nem_cell_ptr_t el;
- MPIDI_msg_sz_t datalen;
+ intptr_t datalen;
int my_rank;
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPIDI_CH3I_VC *vc_ch = &vc->ch;
MPIU_Assert(vc_ch->is_local); /* netmods will have their own implementation */
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
index 7e2fea0..22d64a7 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
@@ -37,7 +37,7 @@ int MPIDI_nem_ckpt_finalize(void);
int MPIDI_nem_ckpt_start(void);
int MPIDI_nem_ckpt_finish(void);
int MPIDI_nem_ckpt_pkthandler_init(int (*pktArray[])(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **req ), int arraySize);
+ intptr_t *buflen, MPID_Request **req ), int arraySize);
#endif
/* one-sided */
@@ -96,11 +96,11 @@ int MPID_nem_mpich_getv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_n
int MPID_nem_mpich_send_header(void* buf, int size, struct MPIDI_VC *vc, int *again);
int MPID_nem_mpich_sendv(MPL_IOV **iov, int *n_iov, struct MPIDI_VC *vc, int *again);
int MPID_nem_mpich_sendv_header(MPL_IOV **iov, int *n_iov, void *ext_header,
- MPIDI_msg_sz_t ext_header_sz, struct MPIDI_VC *vc, int *again);
-void MPID_nem_mpich_send_seg(MPID_Segment segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_sz, struct MPIDI_VC *vc, int *again);
-void MPID_nem_mpich_send_seg_header(MPID_Segment segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size,
- void *header, MPIDI_msg_sz_t header_sz, void *ext_header,
- MPIDI_msg_sz_t ext_header_sz, struct MPIDI_VC *vc, int *again);
+ intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again);
+void MPID_nem_mpich_send_seg(MPID_Segment segment, intptr_t *segment_first, intptr_t segment_sz, struct MPIDI_VC *vc, int *again);
+void MPID_nem_mpich_send_seg_header(MPID_Segment segment, intptr_t *segment_first, intptr_t segment_size,
+ void *header, intptr_t header_sz, void *ext_header,
+ intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again);
int MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress);
int MPID_nem_mpich_test_recv_wait(MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout);
int MPID_nem_recv_seqno_matches(MPID_nem_queue_ptr_t qhead) ;
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
index 6e4a55c..f65a192 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
@@ -57,7 +57,7 @@ int MPIDI_CH3I_Progress_deactivate_hook(int id);
int MPIDI_CH3I_Shm_send_progress(void);
int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc);
-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz );
+int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz );
int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
@@ -83,7 +83,7 @@ int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPID_Request *req);
int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
int MPID_nem_lmt_vmsplice_vc_terminated(MPIDI_VC_t *vc);
-int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen);
+int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen);
/* Nemesis-provided RMA implementation */
int MPIDI_CH3_SHM_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint *size, int *disp_unit, void *baseptr);
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
index c1fb527..14de935 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
@@ -85,12 +85,12 @@ typedef struct MPIDI_CH3I_VC
MPID_nem_queue_ptr_t free_queue;
#ifdef ENABLE_CHECKPOINTING
- MPIDI_msg_sz_t ckpt_msg_len;
+ intptr_t ckpt_msg_len;
void *ckpt_msg_buf;
#endif
/* temp buffer to store partially received header */
- MPIDI_msg_sz_t pending_pkt_len;
+ intptr_t pending_pkt_len;
union MPIDI_CH3_Pkt *pending_pkt;
/* can be used by netmods to put this vc on a send queue or list */
@@ -101,12 +101,12 @@ typedef struct MPIDI_CH3I_VC
/* iStartContigMsg -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size. If the
message cannot be sent immediately, the function should create a request and return a pointer in sreq_ptr. The network
module should complete the request once the message has been completely sent. */
- int (* iStartContigMsg)(struct MPIDI_VC *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+ int (* iStartContigMsg)(struct MPIDI_VC *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
struct MPID_Request **sreq_ptr);
/* iSentContig -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size. The
network module should complete the request once the message has been completely sent. */
- int (* iSendContig)(struct MPIDI_VC *vc, struct MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz);
+ int (* iSendContig)(struct MPIDI_VC *vc, struct MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz);
#ifdef ENABLE_CHECKPOINTING
/* ckpt_pause_send -- netmod should stop sending on this vc and queue messages to be sent after ckpt_continue()*/
@@ -131,7 +131,7 @@ typedef struct MPIDI_CH3I_VC
MPIU_SHMW_Hnd_t lmt_copy_buf_handle;
MPIU_SHMW_Hnd_t lmt_recv_copy_buf_handle;
int lmt_buf_num;
- MPIDI_msg_sz_t lmt_surfeit;
+ intptr_t lmt_surfeit;
struct {struct MPID_nem_lmt_shm_wait_element *head, *tail;} lmt_queue;
struct MPID_nem_lmt_shm_wait_element *lmt_active_lmt;
int lmt_enqueued; /* FIXME: used for debugging */
@@ -164,11 +164,11 @@ struct MPIDI_CH3I_Request
{
struct MPIDI_VC *vc;
int noncontig;
- MPIDI_msg_sz_t header_sz;
+ intptr_t header_sz;
MPI_Request lmt_req_id; /* request id of remote side */
struct MPID_Request *lmt_req; /* pointer to original send/recv request */
- MPIDI_msg_sz_t lmt_data_sz; /* data size to be transferred, after checking for truncation */
+ intptr_t lmt_data_sz; /* data size to be transferred, after checking for truncation */
MPL_IOV lmt_tmp_cookie; /* temporary storage for received cookie */
void *s_cookie; /* temporary storage for the cookie data in case the packet can't be sent immediately */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
index 9eb64be..dee01a2 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
@@ -83,14 +83,14 @@ int MPID_nem_llc_anysource_improbe(int tag, MPID_Comm * comm, int context_offset
MPID_Request ** message, MPI_Status * status);
int MPID_nem_llc_get_ordering(int *ordering);
-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz);
-int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
- MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
+int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz);
+int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+ intptr_t data_sz, MPID_Request ** sreq_ptr);
int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
- MPIDI_msg_sz_t hdr_sz);
+ intptr_t hdr_sz);
-int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, MPIDI_msg_sz_t consume);
+int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, intptr_t consume);
int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue);
int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
index 73ae1b6..93c4545 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
@@ -235,7 +235,7 @@ int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req)
{
int mpi_errno = MPI_SUCCESS, llc_errno;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr;
MPI_Aint dt_true_lb;
int i;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
index 5991a2a..2188f6b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -26,7 +26,7 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
{
int mpi_errno = MPI_SUCCESS, llc_errno;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr;
MPI_Aint dt_true_lb;
int i;
@@ -125,9 +125,9 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
#endif /* notdef_leak_0001_hack */
MPID_Segment_init(buf, count, datatype, segment_ptr, 0);
- MPIDI_msg_sz_t segment_first = 0;
- MPIDI_msg_sz_t segment_size = data_sz;
- MPIDI_msg_sz_t last = segment_size;
+ intptr_t segment_first = 0;
+ intptr_t segment_size = data_sz;
+ intptr_t last = segment_size;
MPIU_Assert(last > 0);
REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz);
MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory");
@@ -162,8 +162,8 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
#define FUNCNAME MPID_nem_llc_iStartContigMsg
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
- MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
+int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+ intptr_t data_sz, MPID_Request ** sreq_ptr)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *sreq = NULL;
@@ -254,8 +254,8 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_
#define FUNCNAME MPID_nem_llc_iSendContig
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_llc_vc_area *vc_llc = 0;
@@ -339,7 +339,7 @@ int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MP
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
- MPIDI_msg_sz_t hdr_sz)
+ intptr_t hdr_sz)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_SENDNONCONTIG);
@@ -348,7 +348,7 @@ int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t));
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_nem_llc_vc_area *vc_llc = 0;
int need_to_queue = 0;
@@ -472,10 +472,10 @@ int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue)
#define FUNCNAME MPIDI_nem_llc_Rqst_iov_update
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, MPIDI_msg_sz_t consume)
+int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, intptr_t consume)
{
int ret = TRUE;
- /* MPIDI_msg_sz_t oconsume = consume; */
+ /* intptr_t oconsume = consume; */
int iv, nv;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_NEM_LLC_RQST_IOV_UPDATE);
@@ -827,7 +827,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
/* set_request_info() sets req->dev.recv_data_sz to pkt->data_sz.
* pkt->data_sz is sender's request size.
*/
- MPIDI_msg_sz_t unpack_sz = events[0].side.initiator.length;
+ intptr_t unpack_sz = events[0].side.initiator.length;
MPID_Segment seg;
MPI_Aint last;
@@ -959,7 +959,7 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
{
int mpi_errno = MPI_SUCCESS, llc_errno;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr;
MPI_Aint dt_true_lb;
int i;
@@ -1046,9 +1046,9 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
sreq->dev.segment_ptr = segment_ptr;
MPID_Segment_init(buf, count, datatype, segment_ptr, 0);
- MPIDI_msg_sz_t segment_first = 0;
- MPIDI_msg_sz_t segment_size = data_sz;
- MPIDI_msg_sz_t last = segment_size;
+ intptr_t segment_first = 0;
+ intptr_t segment_size = data_sz;
+ intptr_t last = segment_size;
MPIU_Assert(last > 0);
REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz);
MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory");
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
index dd5dcb1..163c253 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
@@ -33,12 +33,12 @@ int MPID_nem_mxm_vc_terminate(MPIDI_VC_t * vc);
int MPID_nem_mxm_get_ordering(int *ordering);
/* alternate interface */
-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz);
-int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
- MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
+int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz);
+int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+ intptr_t data_sz, MPID_Request ** sreq_ptr);
int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *header,
- MPIDI_msg_sz_t hdr_sz);
+ intptr_t hdr_sz);
/* direct interface */
int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
index 9848062..41dcd62 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
@@ -18,7 +18,7 @@ static void _mxm_recv_completion_cb(void *context);
static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int id, mxm_mq_h mxm_mq,
mxm_tag_t mxm_tag);
static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
- MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+ MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
#undef FUNCNAME
@@ -84,7 +84,7 @@ void MPID_nem_mxm_get_adi_msg(mxm_conn_h conn, mxm_imm_t imm, void *data,
_dbg_mxm_output(5, "========> Getting ADI msg (from=%d data_size %d) \n", vc->pg_rank, length);
_dbg_mxm_out_buf(data, (length > 16 ? 16 : length));
- MPID_nem_handle_pkt(vc, data, (MPIDI_msg_sz_t) (length));
+ MPID_nem_handle_pkt(vc, data, (intptr_t) (length));
}
@@ -155,7 +155,7 @@ int MPID_nem_mxm_anysource_matched(MPID_Request * req)
int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype *dt_ptr;
@@ -233,9 +233,9 @@ static int _mxm_handle_rreq(MPID_Request * req)
int complete = FALSE, found = FALSE;
int dt_contig;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
- MPIDI_msg_sz_t userbuf_sz;
+ intptr_t userbuf_sz;
MPID_Datatype *dt_ptr;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_nem_mxm_vc_area *vc_area ATTRIBUTE((unused)) = NULL;
MPID_nem_mxm_req_area *req_area = NULL;
void *tmp_buf = NULL;
@@ -275,8 +275,8 @@ static int _mxm_handle_rreq(MPID_Request * req)
MPIR_STATUS_SET_COUNT(req->status, userbuf_sz);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, (MPL_DBG_FDEST,
"receive buffer too small; message truncated, msg_sz="
- MPIDI_MSG_SZ_FMT ", userbuf_sz="
- MPIDI_MSG_SZ_FMT, req->dev.recv_data_sz, userbuf_sz));
+ PRIdPTR ", userbuf_sz="
+ PRIdPTR, req->dev.recv_data_sz, userbuf_sz));
req->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, FCNAME, __LINE__,
MPI_ERR_TRUNCATE, "**truncate",
@@ -286,7 +286,7 @@ static int _mxm_handle_rreq(MPID_Request * req)
}
if (!dt_contig) {
- MPIDI_msg_sz_t last = 0;
+ intptr_t last = 0;
if (req->dev.tmpbuf != NULL) {
last = req->dev.recv_data_sz;
@@ -437,12 +437,12 @@ static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int i
static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
- MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+ MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *rreq = *rreq_p;
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPL_IOV *iov;
int n_iov = 0;
int index;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
index cf815cf..01ecd7a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -24,7 +24,7 @@ static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
int type, mxm_mq_h mxm_mq, int mxm_rank, int id, mxm_tag_t tag, int block);
#if 0 /* Consider using this function in case non contiguous data */
static int _mxm_process_sdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
- MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+ MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
#endif
@@ -32,8 +32,8 @@ static int _mxm_process_sdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
#define FUNCNAME MPID_nem_mxm_iSendContig
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_mxm_vc_area *vc_area = NULL;
@@ -97,8 +97,8 @@ int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MP
#define FUNCNAME MPID_nem_mxm_iStartContigMsg
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
- MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
+int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+ intptr_t data_sz, MPID_Request ** sreq_ptr)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *sreq = NULL;
@@ -163,10 +163,10 @@ int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
- MPIDI_msg_sz_t hdr_sz)
+ intptr_t hdr_sz)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPID_nem_mxm_vc_area *vc_area = NULL;
MPID_nem_mxm_req_area *req_area = NULL;
@@ -248,7 +248,7 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
MPID_Request *sreq = NULL;
MPID_Datatype *dt_ptr;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPI_Aint dt_true_lb;
MPID_nem_mxm_vc_area *vc_area = NULL;
MPID_nem_mxm_req_area *req_area = NULL;
@@ -296,7 +296,7 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
req_area->iov_buf[0].length = data_sz;
}
else {
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPI_Aint packsize = 0;
sreq->dev.segment_ptr = MPID_Segment_alloc();
@@ -351,7 +351,7 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
MPID_Request *sreq = NULL;
MPID_Datatype *dt_ptr;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPI_Aint dt_true_lb;
MPID_nem_mxm_vc_area *vc_area = NULL;
MPID_nem_mxm_req_area *req_area = NULL;
@@ -399,7 +399,7 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
req_area->iov_buf[0].length = data_sz;
}
else {
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPI_Aint packsize = 0;
sreq->dev.segment_ptr = MPID_Segment_alloc();
@@ -454,7 +454,7 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
MPID_Request *sreq = NULL;
MPID_Datatype *dt_ptr;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPI_Aint dt_true_lb;
MPID_nem_mxm_vc_area *vc_area = NULL;
MPID_nem_mxm_req_area *req_area = NULL;
@@ -502,7 +502,7 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
req_area->iov_buf[0].length = data_sz;
}
else {
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPI_Aint packsize = 0;
sreq->dev.segment_ptr = MPID_Segment_alloc();
@@ -557,7 +557,7 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
MPID_Request *sreq = NULL;
MPID_Datatype *dt_ptr;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPI_Aint dt_true_lb;
MPID_nem_mxm_vc_area *vc_area = NULL;
MPID_nem_mxm_req_area *req_area = NULL;
@@ -605,7 +605,7 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
req_area->iov_buf[0].length = data_sz;
}
else {
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPI_Aint packsize = 0;
sreq->ch.noncontig = TRUE;
@@ -787,12 +787,12 @@ static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
#if 0 /* Consider using this function in case non contiguous data */
static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
- MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+ MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *sreq = *sreq_p;
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPL_IOV *iov;
int n_iov = 0;
int index;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index c780bc0..b66bfae 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -294,11 +294,11 @@ DECLARE_TWO_API_SETS(void, MPID_nem_ofi_anysource_posted, MPID_Request * rreq);
int MPID_nem_ofi_anysource_matched(MPID_Request * rreq);
int MPID_nem_ofi_send_data(cq_tagged_entry_t * wc, MPID_Request * sreq);
int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq,
- void *hdr, MPIDI_msg_sz_t hdr_sz);
-int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
+ void *hdr, intptr_t hdr_sz);
+int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz, MPID_Request ** sreq_ptr);
int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
- MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
+ intptr_t hdr_sz, void *data, intptr_t data_sz);
/* ************************************************************************** */
/* OFI utility functions : not exposed as a netmod public API */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index fc64d51..3405722 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -215,16 +215,16 @@ static int MPID_nem_ofi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request *
#define FCNAME DECL_FUNC(MPID_nem_ofi_iSendContig)
int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc,
MPID_Request * sreq,
- void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz)
+ void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz)
{
int pgid, c, mpi_errno = MPI_SUCCESS;
char *pack_buffer = NULL;
uint64_t match_bits;
MPID_Request *cts_req;
- MPIDI_msg_sz_t buf_offset = 0;
+ intptr_t buf_offset = 0;
size_t pkt_len;
BEGIN_FUNC(FCNAME);
- MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+ MPIU_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t));
MPID_nem_ofi_init_req(sreq);
pkt_len = sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz;
if (sreq->dev.ext_hdr_sz > 0 && gl_data.iov_limit > 2) {
@@ -272,19 +272,19 @@ int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc,
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_SendNoncontig)
int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
- MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz)
+ MPID_Request * sreq, void *hdr, intptr_t hdr_sz)
{
int c, pgid, mpi_errno = MPI_SUCCESS;
char *pack_buffer;
MPI_Aint data_sz;
uint64_t match_bits;
MPID_Request *cts_req;
- MPIDI_msg_sz_t first, last;
- MPIDI_msg_sz_t buf_offset = 0;
+ intptr_t first, last;
+ intptr_t buf_offset = 0;
void *data = NULL;
size_t pkt_len;
BEGIN_FUNC(FCNAME);
- MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+ MPIU_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t));
MPID_nem_ofi_init_req(sreq);
first = sreq->dev.segment_first;
last = sreq->dev.segment_size;
@@ -309,8 +309,8 @@ int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
#define FCNAME DECL_FUNC(MPID_nem_ofi_iStartContigMsg)
int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc,
void *hdr,
- MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
+ intptr_t hdr_sz,
+ void *data, intptr_t data_sz, MPID_Request ** sreq_ptr)
{
int c, pgid, mpi_errno = MPI_SUCCESS;
MPID_Request *sreq;
@@ -319,7 +319,7 @@ int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc,
uint64_t match_bits;
size_t pkt_len;
BEGIN_FUNC(FCNAME);
- MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+ MPIU_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t));
MPID_nem_ofi_create_req(&sreq, 2);
sreq->kind = MPID_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
index 25a6df2..458b455 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
@@ -23,7 +23,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPID_Request
{
int err0, err1, src, mpi_errno = MPI_SUCCESS;
uint64_t ssend_bits;
- MPIDI_msg_sz_t sz;
+ intptr_t sz;
MPIDI_VC_t *vc;
MPID_Request *sync_req;
BEGIN_FUNC(FCNAME);
@@ -122,7 +122,7 @@ ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc,
uint64_t match_bits, ssend_match, ssend_mask;
MPI_Aint dt_true_lb;
MPID_Request *sreq = NULL, *sync_req = NULL;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr;
BEGIN_FUNC(FCNAME);
VC_READY_CHECK(vc);
@@ -282,7 +282,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques
int mpi_errno = MPI_SUCCESS, dt_contig, src, tag;
uint64_t match_bits = 0, mask_bits = 0;
fi_addr_t remote_proc = 0;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPI_Aint dt_true_lb;
MPID_Datatype *dt_ptr;
MPIU_Context_id_t context_id;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index d37fc99..e72a142 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -44,7 +44,7 @@ typedef struct {
int put_done;
void *recv_ptr; /* used for reordering in ptl_nm */
void *chunk_buffer[MPID_NEM_PTL_NUM_CHUNK_BUFFERS];
- MPIDI_msg_sz_t bytes_put;
+ intptr_t bytes_put;
int found; /* used in probes with PtlMESearch() */
event_handler_fn event_handler;
} MPID_nem_ptl_req_area;
@@ -86,7 +86,7 @@ typedef struct {
ptl_pt_index_t ptrg;
ptl_pt_index_t ptrc;
int id_initialized; /* TRUE iff id and pt have been initialized */
- MPIDI_msg_sz_t num_queued_sends; /* number of reqs for this vc in sendq */
+ intptr_t num_queued_sends; /* number of reqs for this vc in sendq */
} MPID_nem_ptl_vc_area;
/* macro for ptl private in VC */
@@ -141,11 +141,11 @@ int MPID_nem_ptl_nm_init(void);
int MPID_nem_ptl_nm_finalize(void);
int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e);
int MPID_nem_ptl_sendq_complete_with_error(MPIDI_VC_t *vc, int req_errno);
-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz);
-int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz);
+int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
MPID_Request **sreq_ptr);
-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz);
+int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz);
int MPID_nem_ptl_poll_init(void);
int MPID_nem_ptl_poll_finalize(void);
int MPID_nem_ptl_poll(int is_blocking_poll);
@@ -186,9 +186,9 @@ int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
/* packet handlers */
int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+ intptr_t *buflen, MPID_Request **rreqp);
int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+ intptr_t *buflen, MPID_Request **rreqp);
/* local packet types */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
index fb3ab31..bd2e22e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -191,7 +191,7 @@ int MPID_nem_ptl_nm_finalize(void)
#define FUNCNAME send_pkt
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int send_pkt(MPIDI_VC_t *vc, void *hdr_p, void *data_p, MPIDI_msg_sz_t data_sz,
+static inline int send_pkt(MPIDI_VC_t *vc, void *hdr_p, void *data_p, intptr_t data_sz,
MPID_Request *sreq)
{
int mpi_errno = MPI_SUCCESS;
@@ -288,8 +288,8 @@ static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
REQ_PTL(sreq)->put_done = 0;
if (data_sz) {
- MPIDI_msg_sz_t first = sreq->dev.segment_first;
- MPIDI_msg_sz_t last = sreq->dev.segment_first + sent_sz;
+ intptr_t first = sreq->dev.segment_first;
+ intptr_t last = sreq->dev.segment_first + sent_sz;
MPID_Segment_pack(sreq->dev.segment_ptr, first, &last, sendbuf_ptr);
sendbuf_ptr += sent_sz;
@@ -333,7 +333,7 @@ static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
#define FUNCNAME MPID_nem_ptl_SendNoncontig
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz)
+int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_SENDNONCONTIG);
@@ -355,8 +355,8 @@ int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MP
#define FUNCNAME MPID_nem_ptl_iStartContigMsg
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
- MPIDI_msg_sz_t data_sz, MPID_Request **sreq_ptr)
+int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data,
+ intptr_t data_sz, MPID_Request **sreq_ptr)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISTARTCONTIGMSG);
@@ -386,8 +386,8 @@ int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s
#define FUNCNAME MPID_nem_ptl_iSendContig
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISENDCONTIG);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index a21b89c..d8d0f1d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -307,7 +307,7 @@ int MPID_nem_ptl_anysource_improbe(int tag, MPID_Comm * comm, int context_offset
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+ intptr_t *buflen, MPID_Request **rreqp)
{
int ret, mpi_errno = MPI_SUCCESS;
MPIDI_nem_ptl_pkt_cancel_send_req_t *req_pkt = (MPIDI_nem_ptl_pkt_cancel_send_req_t *)pkt;
@@ -383,7 +383,7 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+ intptr_t *buflen, MPID_Request **rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *sreq;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
index 4623c79..b300af9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -93,7 +93,7 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
int is_contig;
MPI_Aint last;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr ATTRIBUTE((unused));
MPIDI_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE);
@@ -278,7 +278,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
MPID_nem_ptl_vc_area *vc_ptl;
int ret;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr;
MPI_Aint dt_true_lb;
MPI_Aint last;
@@ -430,7 +430,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
ptl_me_t me;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr;
MPI_Aint dt_true_lb;
MPI_Aint last;
@@ -693,7 +693,7 @@ int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_c
regular large transfers because we handle them directly on the netmod. */
int mpi_errno = MPI_SUCCESS;
int dt_contig;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype *dt_ptr;
MPI_Aint dt_true_lb;
ptl_match_bits_t match_bits;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
index 5b82965..b49a22c 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -106,7 +106,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
int mpi_errno = MPI_SUCCESS;
MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
int ret;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype *dt_ptr;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index b06106b..06d19e8 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -1591,7 +1591,7 @@ static int MPID_nem_tcp_recv_handler(sockconn_t *const sc)
}
}
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "New recv " MPIDI_MSG_SZ_FMT " (fd=%d, vc=%p, sc=%p)", bytes_recvd, sc_fd, sc_vc, sc));
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "New recv %" PRIdPTR " (fd=%d, vc=%p, sc=%p)", bytes_recvd, sc_fd, sc_vc, sc));
mpi_errno = MPID_nem_handle_pkt(sc_vc, recv_buf, bytes_recvd);
if (mpi_errno) MPIR_ERR_POP_LABEL(mpi_errno, fn_noncomm_fail);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h
index c36f0c0..281ec14 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h
@@ -162,7 +162,7 @@ typedef enum MPIDI_nem_tcp_socksm_pkt_type {
typedef struct MPIDI_nem_tcp_header {
MPIDI_nem_tcp_socksm_pkt_type_t pkt_type;
- MPIDI_msg_sz_t datalen;
+ intptr_t datalen;
} MPIDI_nem_tcp_header_t;
typedef struct MPIDI_nem_tcp_idinfo {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
index d398bd2..0e7af16 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
@@ -37,7 +37,7 @@ fn_fail:
#define FUNCNAME MPID_nem_tcp_ckpt_unpause_handler
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
index 5d84bb3..56d6aa4 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
@@ -97,12 +97,12 @@ int MPID_nem_tcp_ckpt_cleanup(void);
int MPID_nem_tcp_state_listening_handler(struct pollfd *const l_plfd, sockconn_t *const l_sc);
int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send_queue);
-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
-int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz);
+int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
MPID_Request **sreq_ptr);
-int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
MPID_Request **sreq_ptr);
-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz);
+int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz);
int MPID_nem_tcp_get_addr_port_from_bc(const char *business_card, struct in_addr *addr, in_port_t *port);
void MPID_nem_tcp_vc_dbg_print_sendq(FILE *stream, MPIDI_VC_t *vc);
@@ -113,7 +113,7 @@ int MPID_nem_tcp_vc_terminated(MPIDI_VC_t *vc);
int MPID_nem_tcp_get_ordering(int *ordering);
-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
/* Macros */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
index 84f475c..53ca9a7 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
@@ -71,7 +71,7 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *sreq;
- MPIDI_msg_sz_t offset;
+ intptr_t offset;
MPL_IOV *iov;
int complete;
MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
@@ -118,7 +118,7 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send
goto fn_exit; /* this vc is closed now, just bail out */
}
}
- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
complete = 1;
for (iov = &sreq->dev.iov[sreq->dev.iov_offset]; iov < &sreq->dev.iov[sreq->dev.iov_offset + sreq->dev.iov_count]; ++iov)
@@ -231,12 +231,12 @@ int MPID_nem_tcp_conn_est (MPIDI_VC_t *vc)
#define FUNCNAME MPID_nem_tcp_iStartContigMsg
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
MPID_Request **sreq_ptr)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request * sreq = NULL;
- MPIDI_msg_sz_t offset = 0;
+ intptr_t offset = 0;
MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
sockconn_t *sc = vc_tcp->sc;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG);
@@ -283,7 +283,7 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s
goto fn_fail;
}
}
- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz)
{
@@ -371,12 +371,12 @@ fn_fail:
#define FUNCNAME MPID_nem_tcp_iStartContigMsg_paused
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
MPID_Request **sreq_ptr)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request * sreq = NULL;
- MPIDI_msg_sz_t offset = 0;
+ intptr_t offset = 0;
MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
sockconn_t *sc = vc_tcp->sc;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG_PAUSED);
@@ -423,7 +423,7 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_
goto fn_fail;
}
}
- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz)
{
@@ -505,11 +505,11 @@ fn_fail:
#define FUNCNAME MPID_nem_tcp_iSendContig
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
- void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+ void *data, intptr_t data_sz)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t offset = 0;
+ intptr_t offset = 0;
MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
sockconn_t *sc = vc_tcp->sc;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISENDCONTIGMSG);
@@ -567,7 +567,7 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID
goto fn_fail;
}
}
- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
if (offset == sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz)
{
@@ -695,13 +695,13 @@ fn_fail:
#define FUNCNAME MPID_nem_tcp_SendNoncontig
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz)
+int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz)
{
int mpi_errno = MPI_SUCCESS;
int iov_n;
MPL_IOV iov[MPL_IOV_LIMIT];
MPL_IOV *iov_p;
- MPIDI_msg_sz_t offset;
+ intptr_t offset;
int complete;
MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
int iov_offset;
@@ -760,7 +760,7 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
}
}
- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write noncontig " MPIDI_MSG_SZ_FMT, offset);
+ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write noncontig %" PRIdPTR, offset);
}
}
else
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
index b9194bb..6144cc1 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
@@ -15,7 +15,7 @@
#define FUNCNAME MPIDI_CH3_iSend
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, MPIDI_msg_sz_t hdr_sz)
+int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, intptr_t hdr_sz)
{
int mpi_errno = MPI_SUCCESS;
int again = 0;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index 481eeea..6cdec55 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -24,7 +24,7 @@
#define FUNCNAME MPIDI_CH3_iStartMsg
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, MPID_Request **sreq_ptr)
+int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPID_Request **sreq_ptr)
{
int mpi_errno = MPI_SUCCESS;
int again = 0;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index a7c403a..99b57af 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -66,7 +66,7 @@ static int my_sigusr1_count = 0;
MPIDI_CH3I_shm_sendq_t MPIDI_CH3I_shm_sendq = {NULL, NULL};
struct MPID_Request *MPIDI_CH3I_shm_active_send = NULL;
-static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
static int shm_connection_terminated(MPIDI_VC_t * vc);
static int check_terminating_vcs(void);
@@ -514,7 +514,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
if (cell)
{
char *cell_buf = (char *)cell->pkt.mpich.p.payload;
- MPIDI_msg_sz_t payload_len = cell->pkt.mpich.datalen;
+ intptr_t payload_len = cell->pkt.mpich.datalen;
MPIDI_CH3_Pkt_t *pkt = (MPIDI_CH3_Pkt_t *)cell_buf;
/* Empty packets are not allowed */
@@ -523,7 +523,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
if (in_fbox)
{
MPIDI_CH3I_VC *vc_ch;
- MPIDI_msg_sz_t buflen = payload_len;
+ intptr_t buflen = payload_len;
/* This packet must be the first packet of a new message */
MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Recv pkt from fbox");
@@ -732,7 +732,7 @@ void MPIDI_CH3I_Progress_wakeup(void)
#define FUNCNAME MPID_nem_handle_pkt
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
+int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *rreq = NULL;
@@ -749,7 +749,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
/* handle fast-path first: received a new whole message */
do
{
- MPIDI_msg_sz_t len = buflen;
+ intptr_t len = buflen;
MPIDI_CH3_Pkt_t *pkt = (MPIDI_CH3_Pkt_t *)buf;
MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "received new message");
@@ -781,8 +781,8 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
else
{
/* collect header fragments in vc's pending_pkt */
- MPIDI_msg_sz_t copylen;
- MPIDI_msg_sz_t pktlen;
+ intptr_t copylen;
+ intptr_t pktlen;
MPIDI_CH3_Pkt_t *pkt = (MPIDI_CH3_Pkt_t *)vc_ch->pending_pkt;
MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "received header fragment");
@@ -861,7 +861,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
{
if (buflen > 0)
{
- MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " " MPIDI_MSG_SZ_FMT, buflen);
+ MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, " %" PRIdPTR, buflen);
if (rreq->dev.drop_data == FALSE) {
MPIU_Memcpy (iov->MPL_IOV_BUF, buf, buflen);
}
@@ -873,7 +873,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
rreq->dev.iov_offset = iov - rreq->dev.iov;
rreq->dev.iov_count = n_iov;
vc_ch->recv_active = rreq;
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, " remaining: " MPIDI_MSG_SZ_FMT " bytes + %d iov entries", iov->MPL_IOV_LEN, n_iov));
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, " remaining: %" PRIdPTR " bytes + %d iov entries", iov->MPL_IOV_LEN, n_iov));
}
else
{
@@ -1191,7 +1191,7 @@ int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc)
#define FUNCNAME pkt_NETMOD_handler
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_pkt_netmod_t * const netmod_pkt = (MPID_nem_pkt_netmod_t *)pkt;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
index 1909c8b..5247d9e 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
@@ -18,11 +18,11 @@
/* MPIDI_CH3I_SendNoncontig - Sends a message by packing
directly into cells. The caller must initialize sreq->dev.segment
as well as segment_first and segment_size. */
-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz )
+int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz )
{
int mpi_errno = MPI_SUCCESS;
int again = 0;
- MPIDI_msg_sz_t orig_segment_first = sreq->dev.segment_first;
+ intptr_t orig_segment_first = sreq->dev.segment_first;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
index ae1b927..c3fd575 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
@@ -197,7 +197,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
MPIU_CHKPMEM_MALLOC (addr, char *, segment_len + MPID_NEM_CACHE_LINE_LEN, mpi_errno, "segment");
memory->base_addr = addr;
- current_addr = (char *)(((MPIU_Upint)addr + (MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1)));
+ current_addr = (char *)(((uintptr_t)addr + (uintptr_t)MPID_NEM_CACHE_LINE_LEN-1) & (~((uintptr_t)MPID_NEM_CACHE_LINE_LEN-1)));
memory->symmetrical = 0;
/* must come before barrier_init since we use OPA in that function */
@@ -293,7 +293,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
MPIU_CHKPMEM_MALLOC (addr, char *, segment_len + MPID_NEM_CACHE_LINE_LEN, mpi_errno, "segment");
memory->base_addr = addr;
- current_addr = (char *)(((MPIU_Upint)addr + (MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1)));
+ current_addr = (char *)(((uintptr_t)addr + (uintptr_t)MPID_NEM_CACHE_LINE_LEN-1) & (~((uintptr_t)MPID_NEM_CACHE_LINE_LEN-1)));
memory->symmetrical = 0 ;
/* we still need to call barrier */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
index 055c01b..5cfc9b2 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
@@ -528,7 +528,7 @@ fn_fail:
#define FUNCNAME pkt_ckpt_marker_handler
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_ckpt_marker_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **req)
+static int pkt_ckpt_marker_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **req)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_pkt_ckpt_marker_t * const ckpt_pkt = (MPID_nem_pkt_ckpt_marker_t *)pkt;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index bdacac4..8f13cee 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -44,10 +44,10 @@ static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete);
static int do_cookie(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete);
/* packet handlers */
-static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
-static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
-static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
-static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
#undef FUNCNAME
#define FUNCNAME MPID_nem_lmt_pkthandler_init
@@ -84,7 +84,7 @@ int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int array
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint count,
MPI_Datatype datatype, int dt_contig ATTRIBUTE((unused)),
- MPIDI_msg_sz_t data_sz, MPI_Aint dt_true_lb ATTRIBUTE((unused)),
+ intptr_t data_sz, MPI_Aint dt_true_lb ATTRIBUTE((unused)),
int rank, int tag, MPID_Comm * comm, int context_offset)
{
int mpi_errno = MPI_SUCCESS;
@@ -106,7 +106,7 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint coun
}
MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,
- "sending lmt RTS, data_sz=" MPIDI_MSG_SZ_FMT, data_sz);
+ "sending lmt RTS, data_sz=%" PRIdPTR, data_sz);
sreq->partner_request = NULL;
sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
@@ -180,14 +180,14 @@ int MPID_nem_lmt_RndvRecv(MPIDI_VC_t *vc, MPID_Request *rreq)
#define FUNCNAME pkt_RTS_handler
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request * rreq;
int found;
MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
char *data_buf;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_PKT_RTS_HANDLER);
@@ -195,7 +195,7 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX);
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, "received LMT RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=" MPIDI_MSG_SZ_FMT,
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, "received LMT RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=%" PRIdPTR,
rts_pkt->sender_req_id, rts_pkt->match.parts.rank, rts_pkt->match.parts.tag, rts_pkt->match.parts.context_id,
rts_pkt->data_sz));
@@ -301,13 +301,13 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
#define FUNCNAME pkt_CTS_handler
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
{
MPID_nem_pkt_lmt_cts_t * const cts_pkt = (MPID_nem_pkt_lmt_cts_t *)pkt;
MPID_Request *sreq;
MPID_Request *rts_sreq;
char *data_buf;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
int mpi_errno = MPI_SUCCESS;
MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_PKT_CTS_HANDLER);
@@ -399,7 +399,7 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
#define FUNCNAME pkt_DONE_handler
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_pkt_lmt_done_t * const done_pkt = (MPID_nem_pkt_lmt_done_t *)pkt;
@@ -445,13 +445,13 @@ static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
#define FUNCNAME pkt_COOKIE_handler
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPID_nem_pkt_lmt_cookie_t * const cookie_pkt = (MPID_nem_pkt_lmt_cookie_t *)pkt;
MPID_Request *req;
char *data_buf;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_PKT_COOKIE_HANDLER);
@@ -535,7 +535,7 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
index e22a137..4f8f3bc 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
@@ -233,7 +233,7 @@ static int send_sreq_data(MPIDI_VC_t *vc, MPID_Request *sreq, knem_cookie_t *s_c
int mpi_errno = MPI_SUCCESS;
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype * dt_ptr;
/* MT: this code assumes only one thread can be at this point at a time */
@@ -357,7 +357,7 @@ int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_co
int nodma;
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype * dt_ptr;
volatile knem_status_t *status;
knem_status_t current_status;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
index 68beb93..e3091ad 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
@@ -68,7 +68,7 @@ typedef union
typedef union
{
- volatile MPIDI_msg_sz_t val;
+ volatile intptr_t val;
char padding[MPID_NEM_CACHE_LINE_LEN];
} MPID_nem_cacheline_msg_sz_t;
@@ -123,7 +123,7 @@ static int MPID_nem_delete_shm_region(MPID_nem_copy_buf_t **buf, MPIU_SHMW_Hnd_t
int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Request *req)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype * dt_ptr;
@@ -445,10 +445,10 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3I_VC *vc_ch = &vc->ch;
MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf;
- MPIDI_msg_sz_t first;
- MPIDI_msg_sz_t last;
+ intptr_t first;
+ intptr_t last;
int buf_num;
- MPIDI_msg_sz_t data_sz, copy_limit;
+ intptr_t data_sz, copy_limit;
MPIDI_STATE_DECL(MPID_STATE_LMT_SHM_SEND_PROGRESS);
MPIDI_FUNC_ENTER(MPID_STATE_LMT_SHM_SEND_PROGRESS);
@@ -476,7 +476,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
req->dev.segment_first = first;
vc_ch->lmt_buf_num = buf_num;
*done = FALSE;
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=" MPIDI_MSG_SZ_FMT " data_sz="MPIDI_MSG_SZ_FMT, first, data_sz));
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=%" PRIdPTR " data_sz=%" PRIdPTR, first, data_sz));
MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Waiting on full buffer %d", buf_num);
goto fn_exit;
}
@@ -500,7 +500,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
first = last;
buf_num = (buf_num+1) % NUM_BUFS;
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "sent data. last=" MPIDI_MSG_SZ_FMT " data_sz=" MPIDI_MSG_SZ_FMT, last, data_sz));
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "sent data. last=%" PRIdPTR " data_sz=%" PRIdPTR, last, data_sz));
}
while (last < data_sz);
@@ -537,12 +537,12 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3I_VC *vc_ch = &vc->ch;
MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf;
- MPIDI_msg_sz_t first;
- MPIDI_msg_sz_t last, expected_last;
+ intptr_t first;
+ intptr_t last, expected_last;
int buf_num;
- MPIDI_msg_sz_t data_sz, len;
+ intptr_t data_sz, len;
int i;
- MPIDI_msg_sz_t surfeit;
+ intptr_t surfeit;
char *src_buf;
char tmpbuf[MPID_NEM_CACHE_LINE_LEN];
MPIDI_STATE_DECL(MPID_STATE_LMT_SHM_RECV_PROGRESS);
@@ -571,7 +571,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
vc_ch->lmt_buf_num = buf_num;
vc_ch->lmt_surfeit = surfeit;
*done = FALSE;
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=" MPIDI_MSG_SZ_FMT " data_sz=" MPIDI_MSG_SZ_FMT, first, data_sz));
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=%" PRIdPTR " data_sz=%" PRIdPTR, first, data_sz));
MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Waiting on empty buffer %d", buf_num);
goto fn_exit;
}
@@ -587,7 +587,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
MPID_Segment_unpack(req->dev.segment_ptr, first, &last, src_buf);
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "recvd data. last=" MPIDI_MSG_SZ_FMT " data_sz=" MPIDI_MSG_SZ_FMT, last, data_sz));
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "recvd data. last=%" PRIdPTR " data_sz=%" PRIdPTR, last, data_sz));
if (surfeit && buf_num > 0)
{
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
index 78138ef..dea4739 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
@@ -92,7 +92,7 @@ static int populate_iov_from_req(MPID_Request *req)
int mpi_errno = MPI_SUCCESS;
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype * dt_ptr;
/* find out contig/noncontig, size, and lb for the datatype */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
index e84e90f..0eff9dc 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -82,7 +82,7 @@ fn_fail:
int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPL_IOV *iov, int n_iov)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int i;
int iov_data_copied;
MPID_Request *sreq = *sreq_ptr;
diff --git a/src/mpid/ch3/channels/sock/src/ch3_isend.c b/src/mpid/ch3/channels/sock/src/ch3_isend.c
index 34e8116..3773855 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_isend.c
@@ -11,7 +11,7 @@
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
static void update_request(MPID_Request * sreq, void * hdr,
- MPIDI_msg_sz_t hdr_sz, MPIU_Size_t nb)
+ intptr_t hdr_sz, MPIU_Size_t nb)
{
MPIDI_STATE_DECL(MPID_STATE_UPDATE_REQUEST);
@@ -29,7 +29,7 @@ static void update_request(MPID_Request * sreq, void * hdr,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr,
- MPIDI_msg_sz_t hdr_sz)
+ intptr_t hdr_sz)
{
int mpi_errno = MPI_SUCCESS;
int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
@@ -70,7 +70,7 @@ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr,
if (nb == hdr_sz)
{
MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
- "write complete " MPIDI_MSG_SZ_FMT " bytes, calling OnDataAvail fcn", nb);
+ "write complete %" PRIdPTR " bytes, calling OnDataAvail fcn", nb);
reqFn = sreq->dev.OnDataAvail;
if (!reqFn) {
MPIU_Assert(MPIDI_Request_get_type(sreq)!=MPIDI_REQUEST_TYPE_GET_RESP);
@@ -106,7 +106,7 @@ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr,
else
{
MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
- "partial write of " MPIDI_MSG_SZ_FMT " bytes, request enqueued at head", nb);
+ "partial write of %" PRIdPTR " bytes, request enqueued at head", nb);
update_request(sreq, hdr, hdr_sz, nb);
MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index 6c21874..e526174 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -10,7 +10,7 @@
#define FUNCNAME create_request
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-static MPID_Request * create_request(void * hdr, MPIDI_msg_sz_t hdr_sz,
+static MPID_Request * create_request(void * hdr, intptr_t hdr_sz,
MPIU_Size_t nb)
{
MPID_Request * sreq;
@@ -49,7 +49,7 @@ static MPID_Request * create_request(void * hdr, MPIDI_msg_sz_t hdr_sz,
#define FUNCNAME MPIDI_CH3_iStartMsg
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, MPIDI_msg_sz_t hdr_sz,
+int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
MPID_Request ** sreq_ptr)
{
MPID_Request * sreq = NULL;
@@ -92,13 +92,13 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, MPIDI_msg_sz_t hdr_sz,
if (nb == hdr_sz)
{
MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
- "entire write complete, " MPIDI_MSG_SZ_FMT " bytes", nb);
+ "entire write complete, %" PRIdPTR " bytes", nb);
/* done. get us out of here as quickly as possible. */
}
else
{
MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
- "partial write of " MPIDI_MSG_SZ_FMT " bytes, request enqueued at head", nb);
+ "partial write of %" PRIdPTR " bytes, request enqueued at head", nb);
sreq = create_request(hdr, hdr_sz, nb);
if (!sreq) {
MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
diff --git a/src/mpid/ch3/channels/sock/src/ch3_progress.c b/src/mpid/ch3/channels/sock/src/ch3_progress.c
index 08a5dfd..9ff94a5 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c
@@ -486,7 +486,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
{
if (conn->recv_active == NULL)
{
- MPIDI_msg_sz_t buflen = sizeof (MPIDI_CH3_Pkt_t);
+ intptr_t buflen = sizeof (MPIDI_CH3_Pkt_t);
MPIU_Assert(conn->pkt.type < MPIDI_CH3_PKT_END_CH3);
mpi_errno = pktArray[conn->pkt.type]( conn->vc, &conn->pkt,
@@ -624,7 +624,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
/* --END ERROR HANDLING-- */
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
- (MPL_DBG_FDEST,"immediate writev, vc=%p, sreq=0x%08x, nb=" MPIDI_MSG_SZ_FMT,
+ (MPL_DBG_FDEST,"immediate writev, vc=%p, sreq=0x%08x, nb=%" PRIdPTR,
conn->vc, sreq->handle, nb));
if (nb > 0 && adjust_iov(&iovp, &sreq->dev.iov_count, nb))
@@ -899,7 +899,7 @@ static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPID_Request *rreq )
/* --END ERROR HANDLING-- */
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
- (MPL_DBG_FDEST,"immediate readv, vc=%p nb=" MPIDI_MSG_SZ_FMT ", rreq=0x%08x",
+ (MPL_DBG_FDEST,"immediate readv, vc=%p nb=%" PRIdPTR ", rreq=0x%08x",
conn->vc, nb, rreq->handle));
if (nb > 0 && adjust_iov(&iovp, &rreq->dev.iov_count, nb)) {
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index 8c056d5..41c0b29 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -100,7 +100,7 @@ static inline void fill_in_derived_dtp_info(MPIDI_RMA_dtype_info * dtype_info, v
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
static int init_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
- MPID_Datatype * target_dtp, MPIDI_msg_sz_t stream_offset,
+ MPID_Datatype * target_dtp, intptr_t stream_offset,
void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz)
{
MPI_Aint _ext_hdr_sz = 0, _total_sz = 0;
@@ -183,7 +183,7 @@ static int init_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
static int init_get_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
- MPID_Datatype * target_dtp, MPIDI_msg_sz_t stream_offset,
+ MPID_Datatype * target_dtp, intptr_t stream_offset,
void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz)
{
int mpi_errno = MPI_SUCCESS;
@@ -217,7 +217,7 @@ static int init_get_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
#define FCNAME MPL_QUOTE(FUNCNAME)
static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
void *ext_hdr_ptr, MPI_Aint ext_hdr_sz,
- MPIDI_msg_sz_t stream_offset, MPIDI_msg_sz_t stream_size,
+ intptr_t stream_offset, intptr_t stream_size,
MPID_Request ** req_ptr)
{
MPI_Datatype target_datatype;
@@ -552,7 +552,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
rest_len = total_len;
MPIU_Assert(rma_op->issued_stream_count >= 0);
for (j = 0; j < stream_unit_count; j++) {
- MPIDI_msg_sz_t stream_offset, stream_size;
+ intptr_t stream_offset, stream_size;
MPID_Request *curr_req = NULL;
if (j < rma_op->issued_stream_count)
@@ -745,7 +745,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
MPIU_Assert(rma_op->issued_stream_count >= 0);
for (j = 0; j < stream_unit_count; j++) {
- MPIDI_msg_sz_t stream_offset, stream_size;
+ intptr_t stream_offset, stream_size;
MPID_Request *resp_req = NULL;
MPID_Request *curr_req = NULL;
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index c89be45..2ef9bec 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -26,10 +26,6 @@
/* Add the ch3 packet definitions */
#include "mpidpkt.h"
-/* We need to match the size of MPIU_Pint to the relevant Format control
- */
-#define MPIDI_MSG_SZ_FMT MPIU_PINT_FMT_DEC_SPEC
-
#if !defined(MPIDI_IOV_DENSITY_MIN)
# define MPIDI_IOV_DENSITY_MIN (16 * 1024)
#endif
@@ -173,17 +169,17 @@ extern MPIDI_Process_t MPIDI_Process;
(dt_ptr_) = NULL; \
(dt_contig_out_) = TRUE; \
(dt_true_lb_) = 0; \
- (data_sz_out_) = (MPIDI_msg_sz_t) (count_) * MPID_Datatype_get_basic_size(datatype_); \
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST,"basic datatype: dt_contig=%d, dt_sz=%d, data_sz=" MPIDI_MSG_SZ_FMT, \
+ (data_sz_out_) = (intptr_t) (count_) * MPID_Datatype_get_basic_size(datatype_); \
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST,"basic datatype: dt_contig=%d, dt_sz=%d, data_sz=%" PRIdPTR, \
(dt_contig_out_), MPID_Datatype_get_basic_size(datatype_), (data_sz_out_)));\
} \
else \
{ \
MPID_Datatype_get_ptr((datatype_), (dt_ptr_)); \
(dt_contig_out_) = (dt_ptr_)->is_contig; \
- (data_sz_out_) = (MPIDI_msg_sz_t) (count_) * (dt_ptr_)->size; \
+ (data_sz_out_) = (intptr_t) (count_) * (dt_ptr_)->size; \
(dt_true_lb_) = (dt_ptr_)->true_lb; \
- MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST, "user defined datatype: dt_contig=%d, dt_sz=" MPI_AINT_FMT_DEC_SPEC ", data_sz=" MPIDI_MSG_SZ_FMT, \
+ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST, "user defined datatype: dt_contig=%d, dt_sz=" MPI_AINT_FMT_DEC_SPEC ", data_sz=%" PRIdPTR, \
(dt_contig_out_), (dt_ptr_)->size, (data_sz_out_)));\
} \
}
@@ -723,7 +719,7 @@ typedef struct MPIDI_VC
/* rendezvous function pointers. Called to send a rendevous
message or when one is matched */
int (* rndvSend_fn)( struct MPID_Request **sreq_p, const void * buf, MPI_Aint count,
- MPI_Datatype datatype, int dt_contig, MPIDI_msg_sz_t data_sz,
+ MPI_Datatype datatype, int dt_contig, intptr_t data_sz,
MPI_Aint dt_true_lb, int rank, int tag,
struct MPID_Comm * comm, int context_offset );
int (* rndvRecv_fn)( struct MPIDI_VC * vc, struct MPID_Request *rreq );
@@ -738,7 +734,7 @@ typedef struct MPIDI_VC
sreq->dev.segment, _first and _size. Contiguous messages are
called directly from CH3 and cannot be overridden. */
int (* sendNoncontig_fn)( struct MPIDI_VC *vc, struct MPID_Request *sreq,
- void *header, MPIDI_msg_sz_t hdr_sz );
+ void *header, intptr_t hdr_sz );
#ifdef ENABLE_COMM_OVERRIDES
MPIDI_Comm_ops_t *comm_ops;
@@ -957,7 +953,7 @@ const char *MPIDI_Pkt_GetDescString( MPIDI_CH3_Pkt_t *pkt );
/* These macros help trace communication headers */
#define MPL_DBG_MSGPKT(_vc,_tag,_contextid,_dest,_size,_kind) \
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_MSG,TYPICAL,(MPL_DBG_FDEST,\
- "%s: vc=%p, tag=%d, context=%d, dest=%d, datasz=" MPIDI_MSG_SZ_FMT,\
+ "%s: vc=%p, tag=%d, context=%d, dest=%d, datasz=%" PRIdPTR,\
_kind,_vc,_tag,_contextid,_dest,_size) )
/* FIXME: Switch this to use the common debug code */
@@ -1287,7 +1283,7 @@ int MPID_PG_BCast( MPID_Comm *peercomm_p, MPID_Comm *comm_p, int root );
If the send completes immediately, the channel implementation should return
NULL.
@*/
-int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, MPIDI_msg_sz_t pkt_sz,
+int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, intptr_t pkt_sz,
MPID_Request **sreq_ptr);
@@ -1353,7 +1349,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int iov_n,
must set the request as complete.
@*/
int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * pkt,
- MPIDI_msg_sz_t pkt_sz);
+ intptr_t pkt_sz);
/*@
@@ -1432,12 +1428,12 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq);
void MPIDI_CH3U_Buffer_copy(const void * const sbuf, MPI_Aint scount,
MPI_Datatype sdt, int * smpi_errno,
void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt,
- MPIDI_msg_sz_t * rdata_sz, int * rmpi_errno);
+ intptr_t * rdata_sz, int * rmpi_errno);
int MPIDI_CH3U_Post_data_receive(int found, MPID_Request ** rreqp);
int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreqp);
int MPIDI_CH3U_Post_data_receive_unexpected(MPID_Request * rreqp);
-int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete);
-int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete);
+int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *buflen, int *complete);
+int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, intptr_t *buflen, int *complete);
/* Initialization routine for ch3u_comm.c */
int MPIDI_CH3I_Comm_init(void);
@@ -1545,7 +1541,7 @@ int MPIDI_CH3_Get_business_card(int myRank, char *value, int length);
if the channel has made guarantees about ordering.
E*/
int MPIDI_CH3U_Handle_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request ** rreqp);
+ intptr_t *buflen, MPID_Request ** rreqp);
/*@
MPIDI_CH3U_Handle_recv_req - Process a receive request for which all of the
@@ -1675,69 +1671,69 @@ int MPIDI_GetTagFromPort( const char *, int * );
/* Here are the packet handlers */
int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
#ifdef USE_EAGER_SHORT
int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
#endif
int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_EagerSyncAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_GetAccumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_CASResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_FOPResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Get_AccumResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_GetResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Lock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_LockAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_LockOpAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Unlock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Flush( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Ack( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_DecrAtCnt( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
- MPIDI_msg_sz_t *, MPID_Request ** );
+ intptr_t *, MPID_Request ** );
int MPIDI_CH3_PktHandler_Revoke(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+ intptr_t *buflen, MPID_Request **rreqp);
int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *[], int );
int MPIDI_CH3I_RMA_Make_progress_global(int *made_progress);
@@ -1757,29 +1753,29 @@ int MPIDI_CH3_PktPrint_EagerSyncAck( FILE *fp, MPIDI_CH3_Pkt_t *pkt );
/* Routines to create packets (used in implementing MPI communications */
int MPIDI_CH3_EagerNoncontigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t,
const void *, MPI_Aint,
- MPI_Datatype, MPIDI_msg_sz_t, int, int, MPID_Comm *,
+ MPI_Datatype, intptr_t, int, int, MPID_Comm *,
int );
int MPIDI_CH3_EagerContigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t,
- const void *, MPIDI_msg_sz_t, int,
+ const void *, intptr_t, int,
int, MPID_Comm *, int );
int MPIDI_CH3_EagerContigShortSend( MPID_Request **, MPIDI_CH3_Pkt_type_t,
- const void *, MPIDI_msg_sz_t,
+ const void *, intptr_t,
int, int, MPID_Comm *, int );
int MPIDI_CH3_EagerContigIsend( MPID_Request **, MPIDI_CH3_Pkt_type_t,
- const void *, MPIDI_msg_sz_t, int,
+ const void *, intptr_t, int,
int, MPID_Comm *, int );
int MPIDI_CH3_RndvSend( MPID_Request **, const void *, MPI_Aint, MPI_Datatype,
- int, MPIDI_msg_sz_t, MPI_Aint, int, int, MPID_Comm *, int );
+ int, intptr_t, MPI_Aint, int, int, MPID_Comm *, int );
int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **, const void *, int,
- MPI_Datatype, MPIDI_msg_sz_t, int, MPI_Aint,
+ MPI_Datatype, intptr_t, int, MPI_Aint,
int, int, MPID_Comm *, int );
int MPIDI_CH3_EagerSyncZero(MPID_Request **, int, int, MPID_Comm *, int );
int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPID_Request *sreq,
- void *header, MPIDI_msg_sz_t hdr_sz );
+ void *header, intptr_t hdr_sz );
/* Routines to ack packets, called in the receive routines when a
message is matched */
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index 82a0921..abe83f2 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -137,7 +137,7 @@ typedef struct MPIDI_CH3_Pkt_send {
MPIDI_CH3_Pkt_type_t type; /* XXX - uint8_t to conserve space ??? */
MPIDI_Message_match match;
MPI_Request sender_req_id; /* needed for ssend and send cancel */
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
#if defined(MPID_USE_SEQUENCE_NUMBERS)
MPID_Seqnum_t seqnum;
#endif
@@ -153,7 +153,7 @@ typedef MPIDI_CH3_Pkt_send_t MPIDI_CH3_Pkt_ready_send_t;
typedef struct MPIDI_CH3_Pkt_eagershort_send {
MPIDI_CH3_Pkt_type_t type; /* XXX - uint8_t to conserve space ??? */
MPIDI_Message_match match;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
#if defined(MPID_USE_SEQUENCE_NUMBERS)
MPID_Seqnum_t seqnum;
#endif
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 32ae02c..2c0a2d3 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -17,10 +17,6 @@ struct MPID_Request;
#include <sys/types.h>
#endif
-/* The maximum message size is the size of a pointer; this allows MPI_Aint
- to be larger than a pointer */
-typedef MPIU_Pint MPIDI_msg_sz_t;
-
#include "mpid_dataloop.h"
/* FIXME: Include here? */
@@ -50,7 +46,7 @@ struct MPID_Request;
(This decl needs to come before mpidi_ch3_pre.h)
*/
typedef int MPIDI_CH3_PktHandler_Fcn(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt,
- MPIDI_msg_sz_t *buflen, struct MPID_Request **req );
+ intptr_t *buflen, struct MPID_Request **req );
/* Include definitions from the channel which must exist before items in this
file (mpidpre.h) or the file it includes (mpiimpl.h) can be defined. */
@@ -92,7 +88,7 @@ typedef MPIDI_Rank_t MPID_Node_id_t;
information, which is beneficial for slower communication
links. Further, this allows the total structure size to be 64 bits
and the search operations can be optimized on 64-bit platforms. We
- use a union of the actual required structure with a MPIU_Upint, so
+ use a union of the actual required structure with a uintptr_t, so
in this optimized case, the "whole" field can be used for
comparisons.
@@ -115,7 +111,7 @@ typedef struct MPIDI_Message_match_parts {
} MPIDI_Message_match_parts_t;
typedef union {
MPIDI_Message_match_parts_t parts;
- MPIU_Upint whole;
+ uintptr_t whole;
} MPIDI_Message_match;
/* Provides MPIDI_CH3_Pkt_t. Must come after MPIDI_Message_match definition. */
@@ -386,8 +382,8 @@ typedef struct MPIDI_Request {
non-contiguous datatypes */
/* MPID_Segment segment; */
struct MPID_Segment *segment_ptr;
- MPIDI_msg_sz_t segment_first;
- MPIDI_msg_sz_t segment_size;
+ intptr_t segment_first;
+ intptr_t segment_size;
/* Pointer to datatype for reference counting purposes */
struct MPID_Datatype * datatype_ptr;
@@ -417,10 +413,10 @@ typedef struct MPIDI_Request {
unexpected eager messages and packing/unpacking
buffers. tmpuf_off is the current offset into the temporary buffer. */
void *tmpbuf;
- MPIDI_msg_sz_t tmpbuf_off;
- MPIDI_msg_sz_t tmpbuf_sz;
+ intptr_t tmpbuf_off;
+ intptr_t tmpbuf_sz;
- MPIDI_msg_sz_t recv_data_sz;
+ intptr_t recv_data_sz;
MPI_Request sender_req_id;
unsigned int state;
@@ -455,7 +451,7 @@ typedef struct MPIDI_Request {
void *ext_hdr_ptr; /* Pointer to extended packet header.
* It is allocated in RMA issuing/pkt_handler functions,
* and freed when release request. */
- MPIDI_msg_sz_t ext_hdr_sz;
+ intptr_t ext_hdr_sz;
struct MPIDI_RMA_Target *rma_target_ptr;
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 1775417..69a8aa3 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -320,7 +320,7 @@ static inline int send_flush_msg(int dest, MPID_Win * win_ptr)
/* enqueue an unsatisfied origin in passive target at target side. */
static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** reqp)
+ intptr_t * buflen, MPID_Request ** reqp)
{
MPIDI_RMA_Target_lock_entry_t *new_ptr = NULL;
MPIDI_CH3_Pkt_flags_t flag;
@@ -355,13 +355,13 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
else {
MPI_Aint type_size = 0;
MPI_Aint type_extent;
- MPIDI_msg_sz_t recv_data_sz = 0;
- MPIDI_msg_sz_t buf_size = 0;
+ intptr_t recv_data_sz = 0;
+ intptr_t buf_size = 0;
MPID_Request *req = NULL;
MPI_Datatype target_dtp;
int target_count;
int complete = 0;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
char *data_buf = NULL;
MPIDI_CH3_Pkt_flags_t flags;
@@ -1035,7 +1035,7 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
static inline int check_piggyback_lock(MPID_Win * win_ptr, MPIDI_VC_t * vc,
MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen,
+ intptr_t * buflen,
int *acquire_lock_fail, MPID_Request ** reqp)
{
int lock_type;
diff --git a/src/mpid/ch3/src/ch3u_buffer.c b/src/mpid/ch3/src/ch3u_buffer.c
index d601bef..9b586bc 100644
--- a/src/mpid/ch3/src/ch3u_buffer.c
+++ b/src/mpid/ch3/src/ch3u_buffer.c
@@ -34,14 +34,14 @@ Used indirectly by mpid_irecv, mpid_recv (through MPIDI_CH3_RecvFromSelf) and
#define FCNAME MPL_QUOTE(FUNCNAME)
void MPIDI_CH3U_Buffer_copy(
const void * const sbuf, MPI_Aint scount, MPI_Datatype sdt, int * smpi_errno,
- void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, MPIDI_msg_sz_t * rsz,
+ void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, intptr_t * rsz,
int * rmpi_errno)
{
int sdt_contig;
int rdt_contig;
MPI_Aint sdt_true_lb, rdt_true_lb;
- MPIDI_msg_sz_t sdata_sz;
- MPIDI_msg_sz_t rdata_sz;
+ intptr_t sdata_sz;
+ intptr_t rdata_sz;
MPID_Datatype * sdt_ptr;
MPID_Datatype * rdt_ptr;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_BUFFER_COPY);
@@ -58,7 +58,7 @@ void MPIDI_CH3U_Buffer_copy(
if (sdata_sz > rdata_sz)
{
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TYPICAL,(MPL_DBG_FDEST,
- "message truncated, sdata_sz=" MPIDI_MSG_SZ_FMT " rdata_sz=" MPIDI_MSG_SZ_FMT,
+ "message truncated, sdata_sz=%" PRIdPTR " rdata_sz=%" PRIdPTR,
sdata_sz, rdata_sz));
sdata_sz = rdata_sz;
*rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE, "**truncate", "**truncate %d %d", sdata_sz, rdata_sz );
@@ -86,10 +86,10 @@ void MPIDI_CH3U_Buffer_copy(
MPID_Segment_init(rbuf, rcount, rdt, &seg, 0);
last = sdata_sz;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "pre-unpack last=" MPIDI_MSG_SZ_FMT, last ));
+ "pre-unpack last=%" PRIdPTR, last ));
MPID_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "pre-unpack last=" MPIDI_MSG_SZ_FMT, last ));
+ "pre-unpack last=%" PRIdPTR, last ));
/* --BEGIN ERROR HANDLING-- */
if (last != sdata_sz)
{
@@ -107,10 +107,10 @@ void MPIDI_CH3U_Buffer_copy(
MPID_Segment_init(sbuf, scount, sdt, &seg, 0);
last = sdata_sz;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "pre-pack last=" MPIDI_MSG_SZ_FMT, last ));
+ "pre-pack last=%" PRIdPTR, last ));
MPID_Segment_pack(&seg, 0, &last, (char*)rbuf + rdt_true_lb);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "post-pack last=" MPIDI_MSG_SZ_FMT, last ));
+ "post-pack last=%" PRIdPTR, last ));
/* --BEGIN ERROR HANDLING-- */
if (last != sdata_sz)
{
@@ -123,11 +123,11 @@ void MPIDI_CH3U_Buffer_copy(
else
{
char * buf;
- MPIDI_msg_sz_t buf_off;
+ intptr_t buf_off;
MPID_Segment sseg;
- MPIDI_msg_sz_t sfirst;
+ intptr_t sfirst;
MPID_Segment rseg;
- MPIDI_msg_sz_t rfirst;
+ intptr_t rfirst;
buf = MPL_malloc(MPIDI_COPY_BUFFER_SZ);
/* --BEGIN ERROR HANDLING-- */
@@ -163,11 +163,11 @@ void MPIDI_CH3U_Buffer_copy(
}
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "pre-pack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+ "pre-pack first=%" PRIdPTR ", last=%" PRIdPTR,
sfirst, last ));
MPID_Segment_pack(&sseg, sfirst, &last, buf + buf_off);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "post-pack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+ "post-pack first=%" PRIdPTR ", last=%" PRIdPTR,
sfirst, last ));
/* --BEGIN ERROR HANDLING-- */
MPIU_Assert(last > sfirst);
@@ -177,11 +177,11 @@ void MPIDI_CH3U_Buffer_copy(
sfirst = last;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "pre-unpack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+ "pre-unpack first=%" PRIdPTR ", last=%" PRIdPTR,
rfirst, last ));
MPID_Segment_unpack(&rseg, rfirst, &last, buf);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "post-unpack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+ "post-unpack first=%" PRIdPTR ", last=%" PRIdPTR,
rfirst, last ));
/* --BEGIN ERROR HANDLING-- */
MPIU_Assert(last > rfirst);
@@ -208,7 +208,7 @@ void MPIDI_CH3U_Buffer_copy(
if (buf_off > 0)
{
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, (MPL_DBG_FDEST,
- "moved " MPIDI_MSG_SZ_FMT " bytes to the beginning of the tmp buffer", buf_off));
+ "moved %" PRIdPTR " bytes to the beginning of the tmp buffer", buf_off));
memmove(buf, buf_end - buf_off, buf_off);
}
}
@@ -234,7 +234,7 @@ int MPIDI_CH3_RecvFromSelf( MPID_Request *rreq, void *buf, MPI_Aint count,
if (sreq != NULL)
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPIDI_CH3U_Buffer_copy(sreq->dev.user_buf, sreq->dev.user_count,
sreq->dev.datatype, &sreq->status.MPI_ERROR,
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index 4f62505..aa880a5 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -21,7 +21,7 @@
IOV and calling iSendv. The caller must initialize
sreq->dev.segment as well as segment_first and segment_size. */
int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
- void *header, MPIDI_msg_sz_t hdr_sz )
+ void *header, intptr_t hdr_sz )
{
int mpi_errno = MPI_SUCCESS;
int iov_n;
@@ -88,7 +88,7 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
MPIDI_CH3_Pkt_type_t reqtype,
const void * buf, MPI_Aint count,
- MPI_Datatype datatype, MPIDI_msg_sz_t data_sz,
+ MPI_Datatype datatype, intptr_t data_sz,
int rank,
int tag, MPID_Comm * comm,
int context_offset )
@@ -100,7 +100,7 @@ int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "sending non-contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+ "sending non-contiguous eager message, data_sz=%" PRIdPTR,
data_sz));
sreq->dev.OnDataAvail = 0;
sreq->dev.OnFinal = 0;
@@ -153,7 +153,7 @@ int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
MPIDI_CH3_Pkt_type_t reqtype,
- const void * buf, MPIDI_msg_sz_t data_sz, int rank,
+ const void * buf, intptr_t data_sz, int rank,
int tag, MPID_Comm * comm, int context_offset )
{
int mpi_errno = MPI_SUCCESS;
@@ -174,7 +174,7 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
iov[0].MPL_IOV_LEN = sizeof(*eager_pkt);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "sending contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+ "sending contiguous eager message, data_sz=%" PRIdPTR,
data_sz));
iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) buf;
@@ -219,7 +219,7 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p,
MPIDI_CH3_Pkt_type_t reqtype,
- const void * buf, MPIDI_msg_sz_t data_sz, int rank,
+ const void * buf, intptr_t data_sz, int rank,
int tag, MPID_Comm * comm,
int context_offset )
{
@@ -238,7 +238,7 @@ int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p,
eagershort_pkt->data_sz = data_sz;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "sending contiguous short eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+ "sending contiguous short eager message, data_sz=%" PRIdPTR,
data_sz));
MPIDI_Comm_get_vc_set_active(comm, rank, &vc);
@@ -289,7 +289,7 @@ int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_eagershort_send_t * eagershort_pkt = &pkt->eagershort_send;
MPID_Request * rreq;
@@ -340,9 +340,9 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
if (found) {
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t userbuf_sz;
+ intptr_t userbuf_sz;
MPID_Datatype *dt_ptr;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
/* Make sure that we handle the general (non-contiguous)
datatypes correctly while optimizing for the
@@ -355,9 +355,9 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
}
else {
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "receive buffer too small; message truncated, msg_sz="
- MPIDI_MSG_SZ_FMT ", userbuf_sz="
- MPIDI_MSG_SZ_FMT,
+ "receive buffer too small; message truncated, msg_sz=%"
+ PRIdPTR ", userbuf_sz=%"
+ PRIdPTR,
rreq->dev.recv_data_sz, userbuf_sz));
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE,
@@ -396,7 +396,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
to fix this, but it will require a sweep of the code */
}
else {
- MPIDI_msg_sz_t recv_data_sz;
+ intptr_t recv_data_sz;
MPI_Aint last;
/* user buffer is not contiguous. Use the segment
code to unpack it, handling various errors and
@@ -436,7 +436,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
* cool in this case? No upper layer has a pointer to rreq yet
* (it's unexpected and freshly allocated)
*/
- MPIDI_msg_sz_t recv_data_sz;
+ intptr_t recv_data_sz;
/* This is easy; copy the data into a temporary buffer.
To begin with, we use the same temporary location as
is used in receiving eager unexpected data.
@@ -527,7 +527,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
MPIDI_CH3_Pkt_type_t reqtype,
- const void * buf, MPIDI_msg_sz_t data_sz, int rank,
+ const void * buf, intptr_t data_sz, int rank,
int tag, MPID_Comm * comm, int context_offset )
{
int mpi_errno = MPI_SUCCESS;
@@ -538,7 +538,7 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
MPL_IOV iov[MPL_IOV_LIMIT];
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "sending contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+ "sending contiguous eager message, data_sz=%" PRIdPTR,
data_sz));
sreq->dev.OnDataAvail = 0;
@@ -605,14 +605,14 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_eager_send_t * eager_pkt = &pkt->eager_send;
MPID_Request * rreq;
int found;
int complete;
char *data_buf;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
int mpi_errno = MPI_SUCCESS;
MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX);
@@ -695,14 +695,14 @@ int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_ready_send_t * ready_pkt = &pkt->ready_send;
MPID_Request * rreq;
int found;
int complete;
char *data_buf;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
int mpi_errno = MPI_SUCCESS;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index e1c635e..29157e2 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -28,7 +28,7 @@
*/
int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
const void * buf, int count,
- MPI_Datatype datatype, MPIDI_msg_sz_t data_sz,
+ MPI_Datatype datatype, intptr_t data_sz,
int dt_contig, MPI_Aint dt_true_lb,
int rank,
int tag, MPID_Comm * comm,
@@ -65,7 +65,7 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
{
MPL_IOV iov[2];
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "sending contiguous sync eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+ "sending contiguous sync eager message, data_sz=%" PRIdPTR,
data_sz));
iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)es_pkt;
@@ -90,7 +90,7 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
else
{
MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,
- "sending non-contiguous sync eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+ "sending non-contiguous sync eager message, data_sz=%" PRIdPTR,
data_sz);
sreq->dev.segment_ptr = MPID_Segment_alloc( );
@@ -145,7 +145,7 @@ int MPIDI_CH3_EagerSyncZero(MPID_Request **sreq_p, int rank, int tag,
MPIDI_Pkt_set_seqnum(es_pkt, seqnum);
MPIDI_Request_set_seqnum(sreq, seqnum);
- MPL_DBG_MSGPKT(vc,tag,es_pkt->match.parts.context_id,rank,(MPIDI_msg_sz_t)0,"EagerSync0");
+ MPL_DBG_MSGPKT(vc,tag,es_pkt->match.parts.context_id,rank,(intptr_t)0,"EagerSync0");
MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex);
mpi_errno = MPIDI_CH3_iSend(vc, sreq, es_pkt, sizeof(*es_pkt));
MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex);
@@ -213,14 +213,14 @@ int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *vc, MPID_Request *rreq )
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_eager_send_t * es_pkt = &pkt->eager_send;
MPID_Request * rreq;
int found;
int complete;
char *data_buf;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
int mpi_errno = MPI_SUCCESS;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
@@ -346,7 +346,7 @@ int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_EagerSyncAck( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_eager_sync_ack_t * esa_pkt = &pkt->eager_sync_ack;
MPID_Request * sreq;
diff --git a/src/mpid/ch3/src/ch3u_handle_connection.c b/src/mpid/ch3/src/ch3u_handle_connection.c
index 1d32a3b..37f2381 100644
--- a/src/mpid/ch3/src/ch3u_handle_connection.c
+++ b/src/mpid/ch3/src/ch3u_handle_connection.c
@@ -277,7 +277,7 @@ int MPIDI_CH3U_VC_SendClose( MPIDI_VC_t *vc, int rank )
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_close_t * close_pkt = &pkt->close;
int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
index 87c7604..316bf73 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
@@ -53,7 +53,7 @@
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3U_Handle_ordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request ** rreqp)
+ intptr_t *buflen, MPID_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
static MPIDI_CH3_PktHandler_Fcn *pktArray[MPIDI_CH3_PKT_END_CH3+1];
@@ -102,13 +102,13 @@ int MPIDI_CH3U_Handle_ordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#define FUNCNAME MPIDI_CH3U_Receive_data_found
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete)
+int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *buflen, int *complete)
{
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t userbuf_sz;
+ intptr_t userbuf_sz;
MPID_Datatype * dt_ptr = NULL;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECEIVE_DATA_FOUND);
@@ -124,8 +124,8 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t
}
else {
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "receive buffer too small; message truncated, msg_sz=" MPIDI_MSG_SZ_FMT ", userbuf_sz="
- MPIDI_MSG_SZ_FMT,
+ "receive buffer too small; message truncated, msg_sz=%" PRIdPTR ", userbuf_sz=%"
+ PRIdPTR,
rreq->dev.recv_data_sz, userbuf_sz));
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE,
@@ -186,7 +186,7 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t
iov and let the channel unpack */
if (data_sz == rreq->dev.recv_data_sz && *buflen >= data_sz)
{
- MPIDI_msg_sz_t last;
+ intptr_t last;
MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"Copying noncontiguous data to user buffer");
last = data_sz;
MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first,
@@ -235,7 +235,7 @@ fn_fail:
#define FUNCNAME MPIDI_CH3U_Receive_data_unexpected
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete)
+int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, intptr_t *buflen, int *complete)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECEIVE_DATA_UNEXPECTED);
@@ -298,9 +298,9 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
int mpi_errno = MPI_SUCCESS;
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t userbuf_sz;
+ intptr_t userbuf_sz;
MPID_Datatype * dt_ptr = NULL;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_FOUND);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_FOUND);
@@ -315,8 +315,8 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
}
else {
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "receive buffer too small; message truncated, msg_sz=" MPIDI_MSG_SZ_FMT ", userbuf_sz="
- MPIDI_MSG_SZ_FMT,
+ "receive buffer too small; message truncated, msg_sz=%" PRIdPTR ", userbuf_sz=%"
+ PRIdPTR,
rreq->dev.recv_data_sz, userbuf_sz));
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE,
@@ -484,7 +484,7 @@ int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win *win_ptr, int requested_lock)
#define FUNCNAME MPIDI_CH3_PktHandler_FlowCntlUpdate
#undef FCNAME
int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+ intptr_t *buflen, MPID_Request **rreqp)
{
*buflen = sizeof(MPIDI_CH3_Pkt_t);
return MPI_SUCCESS;
@@ -497,7 +497,7 @@ int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *vc ATTRIBUTE((unused)),
MPIDI_CH3_Pkt_t *pkt ATTRIBUTE((unused)),
- MPIDI_msg_sz_t *buflen ATTRIBUTE((unused)),
+ intptr_t *buflen ATTRIBUTE((unused)),
MPID_Request **rreqp ATTRIBUTE((unused)) )
{
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_ENDCH3);
diff --git a/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c b/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c
index 3d247fd..3980c76 100644
--- a/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c
@@ -11,7 +11,7 @@
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Revoke(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+ intptr_t *buflen, MPID_Request **rreqp)
{
MPIDI_CH3_Pkt_revoke_t *revoke_pkt = &pkt->revoke;
int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index 6f673a5..17ac413 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -148,7 +148,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
MPIU_Assert(sreq->dev.segment_ptr != NULL);
last = sreq->dev.segment_size;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
- "pre-pv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
+ "pre-pv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d",
sreq->dev.segment_first, last, *iov_n));
MPIU_Assert(sreq->dev.segment_first < last);
MPIU_Assert(last > 0);
@@ -156,7 +156,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first,
&last, iov, iov_n);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
- "post-pv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
+ "post-pv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d",
sreq->dev.segment_first, last, *iov_n));
MPIU_Assert(*iov_n > 0 && *iov_n <= MPL_IOV_LIMIT);
@@ -173,7 +173,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
}
else
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int i, iov_data_copied;
MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"low density. using SRBuf.");
@@ -207,12 +207,12 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
sreq->dev.segment_size :
sreq->dev.segment_first + sreq->dev.tmpbuf_sz - iov_data_copied;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
- "pre-pack: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+ "pre-pack: first=%" PRIdPTR ", last=%" PRIdPTR,
sreq->dev.segment_first, last));
MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first,
&last, (char*) sreq->dev.tmpbuf + iov_data_copied);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
- "post-pack: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+ "post-pack: first=%" PRIdPTR ", last=%" PRIdPTR,
sreq->dev.segment_first, last));
iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)sreq->dev.tmpbuf;
iov[0].MPL_IOV_LEN = last - sreq->dev.segment_first + iov_data_copied;
@@ -252,7 +252,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
{
MPI_Aint last;
- static MPIDI_msg_sz_t orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
+ static intptr_t orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_RECV_IOV);
@@ -270,8 +270,8 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_ACCUM_RECV &&
MPIDI_Request_get_srbuf_flag(rreq))
{
- MPIDI_msg_sz_t data_sz;
- MPIDI_msg_sz_t tmpbuf_sz;
+ intptr_t data_sz;
+ intptr_t tmpbuf_sz;
/* Once a SRBuf is in use, we continue to use it since a small
amount of data may already be present at the beginning
@@ -317,7 +317,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
rreq->dev.iov_count = MPL_IOV_LIMIT;
rreq->dev.iov_offset = 0;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
- "pre-upv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
+ "pre-upv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d",
rreq->dev.segment_first, last, rreq->dev.iov_count));
MPIU_Assert(rreq->dev.segment_first < last);
MPIU_Assert(last > 0);
@@ -325,7 +325,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
rreq->dev.segment_first,
&last, &rreq->dev.iov[0], &rreq->dev.iov_count);
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
- "post-upv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d, iov_offset=%lld",
+ "post-upv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d, iov_offset=%lld",
rreq->dev.segment_first, last, rreq->dev.iov_count, (long long)rreq->dev.iov_offset));
MPIU_Assert(rreq->dev.iov_count >= 0 && rreq->dev.iov_count <=
MPL_IOV_LIMIT);
@@ -403,7 +403,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
{
/* receive and toss any extra data that does not fit in the user's
buffer */
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
data_sz = rreq->dev.recv_data_sz - rreq->dev.segment_first;
if (!MPIDI_Request_get_srbuf_flag(rreq))
@@ -539,9 +539,9 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
{
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t userbuf_sz;
+ intptr_t userbuf_sz;
MPID_Datatype * dt_ptr;
- MPIDI_msg_sz_t unpack_sz;
+ intptr_t unpack_sz;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_REQUEST_UNPACK_UEBUF);
MPIDI_STATE_DECL(MPID_STATE_MEMCPY);
@@ -559,8 +559,8 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
{
/* --BEGIN ERROR HANDLING-- */
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
- "receive buffer overflow; message truncated, msg_sz=" MPIDI_MSG_SZ_FMT
- ", buf_sz=" MPIDI_MSG_SZ_FMT,
+ "receive buffer overflow; message truncated, msg_sz=%" PRIdPTR
+ ", buf_sz=%" PRIdPTR,
rreq->dev.recv_data_sz, userbuf_sz));
unpack_sz = userbuf_sz;
MPIR_STATUS_SET_COUNT(rreq->status, userbuf_sz);
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index 76de395..514672b 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -47,7 +47,7 @@ int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype
int dt_contig ATTRIBUTE((unused)), rank;
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int made_progress = 0;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PUT);
@@ -221,7 +221,7 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
MPID_Request * ureq)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t orig_data_sz, target_data_sz;
+ intptr_t orig_data_sz, target_data_sz;
int dt_contig ATTRIBUTE((unused)), rank;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
@@ -318,7 +318,7 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
MPID_Datatype_is_contig(target_datatype, &is_target_contig);
MPID_Datatype_get_size_macro(target_datatype, target_type_size);
- MPIU_Assign_trunc(target_data_sz, target_count * target_type_size, MPIDI_msg_sz_t);
+ MPIU_Assign_trunc(target_data_sz, target_count * target_type_size, intptr_t);
/* Judge if we can use IMMED data response packet */
if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype) &&
@@ -391,7 +391,7 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp
MPID_Win * win_ptr, MPID_Request * ureq)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig ATTRIBUTE((unused)), rank;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
@@ -603,7 +603,7 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
MPID_Win * win_ptr, MPID_Request * ureq)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_msg_sz_t orig_data_sz, target_data_sz;
+ intptr_t orig_data_sz, target_data_sz;
int rank;
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
@@ -715,7 +715,7 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
if (is_empty_origin == FALSE) {
MPID_Datatype_get_size_macro(origin_datatype, origin_type_size);
- MPIU_Assign_trunc(orig_data_sz, origin_count * origin_type_size, MPIDI_msg_sz_t);
+ MPIU_Assign_trunc(orig_data_sz, origin_count * origin_type_size, intptr_t);
}
else {
/* If origin buffer is empty, set origin data size to 0 */
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index 0b87edf..b571027 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -258,13 +258,13 @@ static int MPIDI_CH3_ExtPktHandler_GetAccumulate(MPIDI_CH3_Pkt_flags_t flags,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_put_t *put_pkt = &pkt->put;
MPID_Request *req = NULL;
int complete = 0;
char *data_buf = NULL;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPID_Win *win_ptr;
int acquire_lock_fail = 0;
int mpi_errno = MPI_SUCCESS;
@@ -432,14 +432,14 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_get_t *get_pkt = &pkt->get;
MPID_Request *req = NULL;
MPL_IOV iov[MPL_IOV_LIMIT];
int complete = 0;
char *data_buf = NULL;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPID_Win *win_ptr;
int mpi_errno = MPI_SUCCESS;
MPI_Aint type_size;
@@ -645,14 +645,14 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_accum_t *accum_pkt = &pkt->accum;
MPID_Request *req = NULL;
MPI_Aint extent;
int complete = 0;
char *data_buf = NULL;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPID_Win *win_ptr;
int acquire_lock_fail = 0;
int mpi_errno = MPI_SUCCESS;
@@ -857,14 +857,14 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_get_accum_t *get_accum_pkt = &pkt->get_accum;
MPID_Request *req = NULL;
MPI_Aint extent;
int complete = 0;
char *data_buf = NULL;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPID_Win *win_ptr;
int acquire_lock_fail = 0;
int mpi_errno = MPI_SUCCESS;
@@ -1145,7 +1145,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3_Pkt_t upkt;
@@ -1258,7 +1258,7 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3_Pkt_cas_resp_t *cas_resp_pkt = &pkt->cas_resp;
@@ -1319,7 +1319,7 @@ int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3_Pkt_fop_t *fop_pkt = &pkt->fop;
@@ -1427,7 +1427,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
MPID_Request *req = NULL;
char *data_buf = NULL;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPI_Aint extent;
int complete = 0;
int is_empty_origin = FALSE;
@@ -1508,14 +1508,14 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &pkt->fop_resp;
MPID_Request *req = NULL;
MPID_Win *win_ptr = NULL;
MPI_Aint type_size;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
char *data_buf = NULL;
int complete = 0;
int target_rank = fop_resp_pkt->target_rank;
@@ -1597,13 +1597,13 @@ int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &pkt->get_accum_resp;
MPID_Request *req;
int complete = 0;
char *data_buf = NULL;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
int mpi_errno = MPI_SUCCESS;
MPI_Aint type_size;
MPID_Win *win_ptr;
@@ -1735,7 +1735,7 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Lock(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_lock_t *lock_pkt = &pkt->lock;
MPID_Win *win_ptr = NULL;
@@ -1791,13 +1791,13 @@ int MPIDI_CH3_PktHandler_Lock(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_get_resp_t *get_resp_pkt = &pkt->get_resp;
MPID_Request *req;
int complete = 0;
char *data_buf = NULL;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
int mpi_errno = MPI_SUCCESS;
MPI_Aint type_size;
MPID_Win *win_ptr;
@@ -1877,7 +1877,7 @@ int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_LockAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_lock_ack_t *lock_ack_pkt = &pkt->lock_ack;
MPID_Win *win_ptr = NULL;
@@ -1925,7 +1925,7 @@ int MPIDI_CH3_PktHandler_LockAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_lock_op_ack_t *lock_op_ack_pkt = &pkt->lock_op_ack;
MPID_Win *win_ptr = NULL;
@@ -1980,7 +1980,7 @@ int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Ack(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_ack_t *ack_pkt = &pkt->ack;
MPID_Win *win_ptr = NULL;
@@ -2021,7 +2021,7 @@ int MPIDI_CH3_PktHandler_Ack(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)),
MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
MPIDI_CH3_Pkt_decr_at_counter_t *decr_at_cnt_pkt = &pkt->decr_at_cnt;
MPID_Win *win_ptr;
@@ -2063,7 +2063,7 @@ int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)),
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)),
MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3_Pkt_unlock_t *unlock_pkt = &pkt->unlock;
@@ -2106,7 +2106,7 @@ int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)),
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_Flush(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
- MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+ intptr_t * buflen, MPID_Request ** rreqp)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_CH3_Pkt_flush_t *flush_pkt = &pkt->flush;
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index 08b57ff..4882a48 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -21,7 +21,7 @@ int MPID_Rput(const void *origin_addr, int origin_count,
int dt_contig ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Request *ureq;
MPIDI_STATE_DECL(MPID_STATE_MPID_RPUT);
@@ -84,7 +84,7 @@ int MPID_Rget(void *origin_addr, int origin_count,
int dt_contig ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Request *ureq;
MPIDI_STATE_DECL(MPID_STATE_MPID_RGET);
@@ -147,7 +147,7 @@ int MPID_Raccumulate(const void *origin_addr, int origin_count,
int dt_contig ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Request *ureq;
MPIDI_STATE_DECL(MPID_STATE_MPID_RACCUMULATE);
@@ -211,7 +211,7 @@ int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
int dt_contig ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
- MPIDI_msg_sz_t data_sz, trg_data_sz;
+ intptr_t data_sz, trg_data_sz;
MPID_Request *ureq;
MPIDI_STATE_DECL(MPID_STATE_MPID_RGET_ACCUMULATE);
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index 0410368..96aa8c5 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -17,7 +17,7 @@
#define FCNAME MPL_QUOTE(FUNCNAME)
/* MPIDI_CH3_RndvSend - Send a request to perform a rendezvous send */
int MPIDI_CH3_RndvSend( MPID_Request **sreq_p, const void * buf, MPI_Aint count,
- MPI_Datatype datatype, int dt_contig, MPIDI_msg_sz_t data_sz,
+ MPI_Datatype datatype, int dt_contig, intptr_t data_sz,
MPI_Aint dt_true_lb,
int rank,
int tag, MPID_Comm * comm, int context_offset )
@@ -30,7 +30,7 @@ int MPIDI_CH3_RndvSend( MPID_Request **sreq_p, const void * buf, MPI_Aint count,
int mpi_errno = MPI_SUCCESS;
MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,
- "sending rndv RTS, data_sz=" MPIDI_MSG_SZ_FMT, data_sz);
+ "sending rndv RTS, data_sz=%" PRIdPTR, data_sz);
sreq->dev.OnDataAvail = 0;
@@ -108,7 +108,7 @@ int MPIDI_CH3_RndvSend( MPID_Request **sreq_p, const void * buf, MPI_Aint count,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPID_Request * rreq;
int found;
@@ -116,7 +116,7 @@ int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
int mpi_errno = MPI_SUCCESS;
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "received rndv RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=" MPIDI_MSG_SZ_FMT,
+ "received rndv RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=%" PRIdPTR,
rts_pkt->sender_req_id, rts_pkt->match.parts.rank,
rts_pkt->match.parts.tag,
rts_pkt->match.parts.context_id, rts_pkt->data_sz));
@@ -196,7 +196,7 @@ int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_rndv_clr_to_send_t * cts_pkt = &pkt->rndv_clr_to_send;
MPID_Request * sreq;
@@ -205,7 +205,7 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIDI_CH3_Pkt_rndv_send_t * rs_pkt = &upkt.rndv_send;
int dt_contig;
MPI_Aint dt_true_lb;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
MPID_Datatype * dt_ptr;
int mpi_errno = MPI_SUCCESS;
@@ -242,7 +242,7 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPL_IOV iov[MPL_IOV_LIMIT];
MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "sending contiguous rndv data, data_sz=" MPIDI_MSG_SZ_FMT,
+ "sending contiguous rndv data, data_sz=%" PRIdPTR,
data_sz));
iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)rs_pkt;
@@ -281,13 +281,13 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_rndv_send_t * rs_pkt = &pkt->rndv_send;
int mpi_errno = MPI_SUCCESS;
int complete;
char *data_buf;
- MPIDI_msg_sz_t data_len;
+ intptr_t data_len;
MPID_Request *req;
MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"received rndv send (data) pkt");
diff --git a/src/mpid/ch3/src/mpid_cancel_send.c b/src/mpid/ch3/src/mpid_cancel_send.c
index 1d159af..dba1fc8 100644
--- a/src/mpid/ch3/src/mpid_cancel_send.c
+++ b/src/mpid/ch3/src/mpid_cancel_send.c
@@ -227,7 +227,7 @@ int MPID_Cancel_send(MPID_Request * sreq)
*/
int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_cancel_send_req_t * req_pkt = &pkt->cancel_send_req;
MPID_Request * rreq;
@@ -291,7 +291,7 @@ int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *vc ATTRIBUTE((unused)),
MPIDI_CH3_Pkt_t *pkt,
- MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+ intptr_t *buflen, MPID_Request **rreqp )
{
MPIDI_CH3_Pkt_cancel_send_resp_t * resp_pkt = &pkt->cancel_send_resp;
MPID_Request * sreq;
diff --git a/src/mpid/ch3/src/mpid_irsend.c b/src/mpid/ch3/src/mpid_irsend.c
index aafe788..b11bb1b 100644
--- a/src/mpid/ch3/src/mpid_irsend.c
+++ b/src/mpid/ch3/src/mpid_irsend.c
@@ -20,7 +20,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_ready_send_t * const ready_pkt = &upkt.ready_send;
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_isend.c b/src/mpid/ch3/src/mpid_isend.c
index 12b7a31..f823d62 100644
--- a/src/mpid/ch3/src/mpid_isend.c
+++ b/src/mpid/ch3/src/mpid_isend.c
@@ -31,7 +31,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request)
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_issend.c b/src/mpid/ch3/src/mpid_issend.c
index 0bb336f..1d71357 100644
--- a/src/mpid/ch3/src/mpid_issend.c
+++ b/src/mpid/ch3/src/mpid_issend.c
@@ -18,7 +18,7 @@
int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request)
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_rsend.c b/src/mpid/ch3/src/mpid_rsend.c
index 933b15a..2b321fc 100644
--- a/src/mpid/ch3/src/mpid_rsend.c
+++ b/src/mpid/ch3/src/mpid_rsend.c
@@ -22,7 +22,7 @@
int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request)
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_send.c b/src/mpid/ch3/src/mpid_send.c
index a540c01..81f2416 100644
--- a/src/mpid/ch3/src/mpid_send.c
+++ b/src/mpid/ch3/src/mpid_send.c
@@ -19,7 +19,7 @@ int MPID_Send(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank,
int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request)
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_ssend.c b/src/mpid/ch3/src/mpid_ssend.c
index 3dd144b..31957b3 100644
--- a/src/mpid/ch3/src/mpid_ssend.c
+++ b/src/mpid/ch3/src/mpid_ssend.c
@@ -18,7 +18,7 @@
int MPID_Ssend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
MPID_Request ** request)
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
int dt_contig;
MPI_Aint dt_true_lb;
MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index 5336fa9..75e5d22 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -82,7 +82,7 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in
if (found)
{
- MPIDI_msg_sz_t data_sz;
+ intptr_t data_sz;
/* we found a posted req, which we now own, so we can release the CS */
MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX);
diff --git a/src/mpid/ch3/src/mpidi_printf.c b/src/mpid/ch3/src/mpidi_printf.c
index 99476ef..57ae376 100644
--- a/src/mpid/ch3/src/mpidi_printf.c
+++ b/src/mpid/ch3/src/mpidi_printf.c
@@ -212,14 +212,14 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
switch (pkt->type) {
case MPIDI_CH3_PKT_EAGER_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "EAGER_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+ "EAGER_SEND - (%d,%d,%d,)%" PRIdPTR,
pkt->eager_send.match.parts.context_id,
(int) pkt->eager_send.match.parts.tag,
pkt->eager_send.match.parts.rank, pkt->eager_send.data_sz);
break;
case MPIDI_CH3_PKT_EAGER_SYNC_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "EAGER_SYNC_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+ "EAGER_SYNC_SEND - (%d,%d,%d,)%" PRIdPTR " req=%d",
pkt->eager_sync_send.match.parts.context_id,
(int) pkt->eager_sync_send.match.parts.tag,
pkt->eager_sync_send.match.parts.rank,
@@ -231,14 +231,14 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
break;
case MPIDI_CH3_PKT_READY_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "READY_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+ "READY_SEND - (%d,%d,%d,)%" PRIdPTR,
pkt->ready_send.match.parts.context_id,
(int) pkt->ready_send.match.parts.tag,
pkt->ready_send.match.parts.rank, pkt->ready_send.data_sz);
break;
case MPIDI_CH3_PKT_RNDV_REQ_TO_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "RNDV_REQ_TO_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+ "RNDV_REQ_TO_SEND - (%d,%d,%d,)%" PRIdPTR " req=%d",
pkt->rndv_req_to_send.match.parts.context_id,
(int) pkt->rndv_req_to_send.match.parts.tag,
pkt->rndv_req_to_send.match.parts.rank,
diff --git a/src/mpid/pamid/include/mpidi_hooks.h b/src/mpid/pamid/include/mpidi_hooks.h
index b4228ca..16df7cb 100644
--- a/src/mpid/pamid/include/mpidi_hooks.h
+++ b/src/mpid/pamid/include/mpidi_hooks.h
@@ -40,7 +40,7 @@ typedef struct MPID_VCR_t * MPID_VCR ;
typedef struct MPIDI_VCRT * MPID_VCRT;
-typedef size_t MPIDI_msg_sz_t;
+typedef size_t intptr_t;
#define MPID_Irsend MPID_Isend
#define MPID_Rsend MPID_Send
diff --git a/src/mpid/pamid/include/mpidi_prototypes.h b/src/mpid/pamid/include/mpidi_prototypes.h
index d12f241..be09041 100644
--- a/src/mpid/pamid/include/mpidi_prototypes.h
+++ b/src/mpid/pamid/include/mpidi_prototypes.h
@@ -65,7 +65,7 @@ void MPIDI_Buffer_copy(const void * const sbuf,
void * const rbuf,
MPI_Aint rcount,
MPI_Datatype rdt,
- MPIDI_msg_sz_t * rsz,
+ intptr_t * rsz,
int * rmpi_errno);
pami_result_t MPIDI_Send_handoff (pami_context_t context, void * sreq);
diff --git a/src/mpid/pamid/src/mpid_buffer.c b/src/mpid/pamid/src/mpid_buffer.c
index 367f99f..6e21dea 100644
--- a/src/mpid/pamid/src/mpid_buffer.c
+++ b/src/mpid/pamid/src/mpid_buffer.c
@@ -47,13 +47,13 @@
*/
void MPIDI_Buffer_copy(
const void * const sbuf, MPI_Aint scount, MPI_Datatype sdt, int * smpi_errno,
- void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, MPIDI_msg_sz_t * rsz, int * rmpi_errno)
+ void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, intptr_t * rsz, int * rmpi_errno)
{
int sdt_contig;
int rdt_contig;
MPI_Aint sdt_true_lb, rdt_true_lb;
- MPIDI_msg_sz_t sdata_sz;
- MPIDI_msg_sz_t rdata_sz;
+ intptr_t sdata_sz;
+ intptr_t rdata_sz;
MPID_Datatype * sdt_ptr;
MPID_Datatype * rdt_ptr;
@@ -166,11 +166,11 @@ void MPIDI_Buffer_copy(
else
{
char * buf;
- MPIDI_msg_sz_t buf_off;
+ intptr_t buf_off;
MPID_Segment sseg;
- MPIDI_msg_sz_t sfirst;
+ intptr_t sfirst;
MPID_Segment rseg;
- MPIDI_msg_sz_t rfirst;
+ intptr_t rfirst;
buf = MPL_malloc(MPIDI_COPY_BUFFER_SZ);
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpid/pamid/src/onesided/mpidi_onesided.h b/src/mpid/pamid/src/onesided/mpidi_onesided.h
index 23e2cf8..e669d31 100644
--- a/src/mpid/pamid/src/onesided/mpidi_onesided.h
+++ b/src/mpid/pamid/src/onesided/mpidi_onesided.h
@@ -188,7 +188,7 @@ typedef struct
int count;
int contig;
MPI_Aint true_lb;
- MPIDI_msg_sz_t size;
+ intptr_t size;
int num_contig;
DLOOP_VECTOR * map;
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_done.c b/src/mpid/pamid/src/pt2pt/mpidi_done.c
index 31b4ac0..91ad3de 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_done.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_done.c
@@ -45,7 +45,7 @@ MPIDI_RecvDoneCB_copy(MPID_Request * rreq)
{
int smpi_errno;
MPID_assert(rreq->mpid.uebuf != NULL);
- MPIDI_msg_sz_t _count=0;
+ intptr_t _count=0;
MPIDI_Buffer_copy(rreq->mpid.uebuf, /* source buffer */
rreq->mpid.uebuflen,
MPI_CHAR,
@@ -146,7 +146,7 @@ void MPIDI_Recvq_process_out_of_order_msgs(pami_task_t src, pami_context_t conte
MPIDI_In_cntr_t *in_cntr;
MPID_Request *ooreq, *rreq, *prev_rreq;
pami_get_simple_t xferP;
- MPIDI_msg_sz_t _count=0;
+ intptr_t _count=0;
int matched;
void * it;
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
index 6eb7ced..05543bb 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
@@ -84,7 +84,7 @@ MPIDI_RecvMsg_Unexp(MPID_Request * rreq,
{
if (likely(MPIR_STATUS_GET_CANCEL_BIT(rreq->status) == FALSE))
{
- MPIDI_msg_sz_t _count=0;
+ intptr_t _count=0;
MPIDI_Buffer_copy(rreq->mpid.uebuf,
rreq->mpid.uebuflen,
MPI_CHAR,
diff --git a/src/util/pointer/mpiu_pointer.h b/src/util/pointer/mpiu_pointer.h
index 0dd23a6..d6d6597 100644
--- a/src/util/pointer/mpiu_pointer.h
+++ b/src/util/pointer/mpiu_pointer.h
@@ -53,7 +53,7 @@
* \param[in] aint Variable of type MPI_Aint
*/
#define MPIU_Ensure_Aint_fits_in_pointer(aint) \
- MPIU_Assert((aint) == (MPI_Aint)(MPIU_Upint) MPIU_AINT_CAST_TO_VOID_PTR(aint));
+ MPIU_Assert((aint) == (MPI_Aint)(uintptr_t) MPIU_AINT_CAST_TO_VOID_PTR(aint));
#endif /* !defined(MPIU_POINTER_H_INCLUDED) */
diff --git a/src/util/type/mpiu_type_defs.h b/src/util/type/mpiu_type_defs.h
index 2ae91c7..d04f5ae 100644
--- a/src/util/type/mpiu_type_defs.h
+++ b/src/util/type/mpiu_type_defs.h
@@ -64,7 +64,7 @@ typedef MPIU_SIZE_T MPIU_Size_t;
/* An MPI_Aint may be *larger* than a pointer. By using 2 casts, we can
keep some compilers from complaining about converting a pointer to an
integer of a different size */
-#define MPIU_PtrToAint(a) ((MPI_Aint)(MPIU_Upint)(a))
+#define MPIU_PtrToAint(a) ((MPI_Aint)(uintptr_t)(a))
#endif
/* AintToPtr converts an MPI_Aint to a pointer type, extending bits if necessary */
@@ -76,9 +76,9 @@ typedef MPIU_SIZE_T MPIU_Size_t;
/* Adding the 32-bit compute/64-bit I/O related type-casts in here as
* they are not a part of the MPI standard yet. */
-#define MPIU_AINT_CAST_TO_VOID_PTR (void *)(MPIU_Pint)
-#define MPIU_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(MPIU_Upint)
-#define MPIU_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(MPIU_Pint)
+#define MPIU_AINT_CAST_TO_VOID_PTR (void *)(intptr_t)
+#define MPIU_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(uintptr_t)
+#define MPIU_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(intptr_t)
#define MPIU_CONTEXT_ID_T_DATATYPE MPI_UINT16_T
typedef uint16_t MPIU_Context_id_t;
http://git.mpich.org/mpich.git/commitdiff/5d1e0e91c33829272e066922d505dae1c…
commit 5d1e0e91c33829272e066922d505dae1c6e2b5ff
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Wed Jan 27 15:59:15 2016 -0600
Move UNREFERENCED_ARG macro to MPL.
We had multiple versions of this lying around. One was in the MPIU
layer. A second was with the same name as the MPIU layer, but sitting
in the ROMIO glue code. A third was in the proper ROMIO code with the
name ADIOI_UNREFERENCED_ARG.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index ae0a65d..3dbe5e0 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -12,14 +12,6 @@
#define MPIU_Pint @MPIU_PINT@
#define MPIU_Upint unsigned @MPIU_PINT@
-/* used by ROMIO, should be handled by a romio-private version of this macro
- * instead */
-#ifdef HAVE_WINDOWS_H
-#define MPIU_UNREFERENCED_ARG(a) a
-#else
-#define MPIU_UNREFERENCED_ARG(a)
-#endif
-
int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num);
#if (!defined(NDEBUG) && (@HAVE_ERROR_CHECKING@))
diff --git a/src/mpi/attr/dup_fn.c b/src/mpi/attr/dup_fn.c
index 08ccdbe..e6f11da 100644
--- a/src/mpi/attr/dup_fn.c
+++ b/src/mpi/attr/dup_fn.c
@@ -19,9 +19,9 @@ int MPIR_Dup_fn ( MPI_Comm comm ATTRIBUTE((unused)),
{
/* No error checking at present */
- MPIU_UNREFERENCED_ARG(comm);
- MPIU_UNREFERENCED_ARG(keyval);
- MPIU_UNREFERENCED_ARG(extra_state);
+ MPL_UNREFERENCED_ARG(comm);
+ MPL_UNREFERENCED_ARG(keyval);
+ MPL_UNREFERENCED_ARG(extra_state);
/* Set attr_out, the flag and return success */
(*(void **)attr_out) = attr_in;
diff --git a/src/mpi/errhan/dynerrutil.c b/src/mpi/errhan/dynerrutil.c
index a4ed589..271b7e8 100644
--- a/src/mpi/errhan/dynerrutil.c
+++ b/src/mpi/errhan/dynerrutil.c
@@ -316,7 +316,7 @@ static int MPIR_Dynerrcodes_finalize( void *p ATTRIBUTE((unused)) )
{
int i;
- MPIU_UNREFERENCED_ARG(p);
+ MPL_UNREFERENCED_ARG(p);
if (not_initialized == 0) {
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index a8629d3..fcd5888 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -129,7 +129,7 @@ void mpirinitf_(void);
/* style: allow:fprintf:1 sig:0 */
static int assert_hook( int reportType, char *message, int *returnValue )
{
- MPIU_UNREFERENCED_ARG(reportType);
+ MPL_UNREFERENCED_ARG(reportType);
fprintf(stderr, "%s", message);
if (returnValue != NULL)
ExitProcess((UINT)(*returnValue));
diff --git a/src/mpi/pt2pt/bsendutil.c b/src/mpi/pt2pt/bsendutil.c
index 66df682..144d64e 100644
--- a/src/mpi/pt2pt/bsendutil.c
+++ b/src/mpi/pt2pt/bsendutil.c
@@ -630,7 +630,7 @@ static int MPIR_Bsend_finalize( void *p ATTRIBUTE((unused)) )
void *b;
int s;
- MPIU_UNREFERENCED_ARG(p);
+ MPL_UNREFERENCED_ARG(p);
if (BsendBuffer.buffer) {
/* Use detach to complete any communication */
diff --git a/src/mpi/pt2pt/ibsend.c b/src/mpi/pt2pt/ibsend.c
index e29644d..b8cc4cf 100644
--- a/src/mpi/pt2pt/ibsend.c
+++ b/src/mpi/pt2pt/ibsend.c
@@ -66,7 +66,7 @@ PMPI_LOCAL int MPIR_Ibsend_cancel( void *extra, int complete )
/* Note that this value should always be 1 because
Grequest_complete is called on this request when it is
created */
- MPIU_UNREFERENCED_ARG(complete);
+ MPL_UNREFERENCED_ARG(complete);
/* Try to cancel the underlying request */
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
index 755ae63..e5c23b7 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -1036,8 +1036,8 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node
/* Not sure unsigned is necessary, but it makes the math safer */
unsigned *curr_from_proc, *done_from_proc, *recv_buf_idx;
- ADIOI_UNREFERENCED_ARG(requests);
- ADIOI_UNREFERENCED_ARG(statuses);
+ MPL_UNREFERENCED_ARG(requests);
+ MPL_UNREFERENCED_ARG(statuses);
/* curr_from_proc[p] = amount of data recd from proc. p that has already
been accounted for so far
diff --git a/src/mpi/romio/adio/common/ad_aggregate.c b/src/mpi/romio/adio/common/ad_aggregate.c
index 0585562..ccd9764 100644
--- a/src/mpi/romio/adio/common/ad_aggregate.c
+++ b/src/mpi/romio/adio/common/ad_aggregate.c
@@ -81,7 +81,7 @@ int ADIOI_Calc_aggregator(ADIO_File fd,
int rank_index, rank;
ADIO_Offset avail_bytes;
- ADIOI_UNREFERENCED_ARG(fd_start);
+ MPL_UNREFERENCED_ARG(fd_start);
/* get an index into our array of aggregators */
rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1);
diff --git a/src/mpi/romio/adio/common/ad_end.c b/src/mpi/romio/adio/common/ad_end.c
index 88af934..2557c80 100644
--- a/src/mpi/romio/adio/common/ad_end.c
+++ b/src/mpi/romio/adio/common/ad_end.c
@@ -50,9 +50,9 @@ int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void
{
int error_code;
- ADIOI_UNREFERENCED_ARG(comm);
- ADIOI_UNREFERENCED_ARG(attribute_val);
- ADIOI_UNREFERENCED_ARG(extra_state);
+ MPL_UNREFERENCED_ARG(comm);
+ MPL_UNREFERENCED_ARG(attribute_val);
+ MPL_UNREFERENCED_ARG(extra_state);
MPI_Keyval_free(&keyval);
diff --git a/src/mpi/romio/adio/common/ad_fstype.c b/src/mpi/romio/adio/common/ad_fstype.c
index 75fb24f..a5f4708 100644
--- a/src/mpi/romio/adio/common/ad_fstype.c
+++ b/src/mpi/romio/adio/common/ad_fstype.c
@@ -460,8 +460,8 @@ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *erro
#endif /* STAT APPROACH */
#ifdef ROMIO_NTFS
- ADIOI_UNREFERENCED_ARG(filename);
- ADIOI_UNREFERENCED_ARG(error_code);
+ MPL_UNREFERENCED_ARG(filename);
+ MPL_UNREFERENCED_ARG(error_code);
*fstype = ADIO_NTFS; /* only supported FS on Windows */
#elif defined(ROMIO_NFS)
*fstype = ADIO_NFS;
diff --git a/src/mpi/romio/adio/common/ad_init.c b/src/mpi/romio/adio/common/ad_init.c
index 4fd56c8..fd1b167 100644
--- a/src/mpi/romio/adio/common/ad_init.c
+++ b/src/mpi/romio/adio/common/ad_init.c
@@ -52,8 +52,8 @@ void ADIO_Init(int *argc, char ***argv, int *error_code)
char *c;
#endif
- ADIOI_UNREFERENCED_ARG(argc);
- ADIOI_UNREFERENCED_ARG(argv);
+ MPL_UNREFERENCED_ARG(argc);
+ MPL_UNREFERENCED_ARG(argv);
#ifdef ROMIO_INSIDE_MPICH
MPIR_Ext_init();
diff --git a/src/mpi/romio/adio/common/ad_read_coll.c b/src/mpi/romio/adio/common/ad_read_coll.c
index 4a73112..f723a6e 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -971,8 +971,8 @@ void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node
/* Not sure unsigned is necessary, but it makes the math safer */
unsigned *curr_from_proc, *done_from_proc, *recv_buf_idx;
- ADIOI_UNREFERENCED_ARG(requests);
- ADIOI_UNREFERENCED_ARG(statuses);
+ MPL_UNREFERENCED_ARG(requests);
+ MPL_UNREFERENCED_ARG(statuses);
/* curr_from_proc[p] = amount of data recd from proc. p that has already
been accounted for so far
diff --git a/src/mpi/romio/adio/common/ad_seek.c b/src/mpi/romio/adio/common/ad_seek.c
index 78fa5c1..62c67cb 100644
--- a/src/mpi/romio/adio/common/ad_seek.c
+++ b/src/mpi/romio/adio/common/ad_seek.c
@@ -30,7 +30,7 @@ ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset,
int filetype_is_contig;
MPI_Aint filetype_extent;
- ADIOI_UNREFERENCED_ARG(whence);
+ MPL_UNREFERENCED_ARG(whence);
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
etype_size = fd->etype_size;
diff --git a/src/mpi/romio/adio/common/cb_config_list.c b/src/mpi/romio/adio/common/cb_config_list.c
index d7031ba..d8622c9 100644
--- a/src/mpi/romio/adio/common/cb_config_list.c
+++ b/src/mpi/romio/adio/common/cb_config_list.c
@@ -395,9 +395,9 @@ int ADIOI_cb_copy_name_array(MPI_Comm comm,
{
ADIO_cb_name_array array;
- ADIOI_UNREFERENCED_ARG(comm);
- ADIOI_UNREFERENCED_ARG(keyval);
- ADIOI_UNREFERENCED_ARG(extra);
+ MPL_UNREFERENCED_ARG(comm);
+ MPL_UNREFERENCED_ARG(keyval);
+ MPL_UNREFERENCED_ARG(extra);
array = (ADIO_cb_name_array) attr_in;
if (array != NULL) array->refct++;
@@ -417,8 +417,8 @@ int ADIOI_cb_delete_name_array(MPI_Comm comm,
{
ADIO_cb_name_array array;
- ADIOI_UNREFERENCED_ARG(comm);
- ADIOI_UNREFERENCED_ARG(extra);
+ MPL_UNREFERENCED_ARG(comm);
+ MPL_UNREFERENCED_ARG(extra);
array = (ADIO_cb_name_array) attr_val;
ADIOI_Assert(array != NULL);
diff --git a/src/mpi/romio/adio/common/lock.c b/src/mpi/romio/adio/common/lock.c
index e428f63..ba9524c 100644
--- a/src/mpi/romio/adio/common/lock.c
+++ b/src/mpi/romio/adio/common/lock.c
@@ -19,7 +19,7 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence,
OVERLAPPED Overlapped;
DWORD dwFlags;
- ADIOI_UNREFERENCED_ARG(whence);
+ MPL_UNREFERENCED_ARG(whence);
if (len == 0) return MPI_SUCCESS;
diff --git a/src/mpi/romio/adio/common/status_setb.c b/src/mpi/romio/adio/common/status_setb.c
index 0b37cf2..c54d958 100644
--- a/src/mpi/romio/adio/common/status_setb.c
+++ b/src/mpi/romio/adio/common/status_setb.c
@@ -16,7 +16,7 @@
int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype,
MPI_Count nbytes)
{
- ADIOI_UNREFERENCED_ARG(datatype);
+ MPL_UNREFERENCED_ARG(datatype);
/* it's ok that ROMIO stores number-of-bytes in status, not
* count-of-copies, as long as MPI_GET_COUNT knows what to do */
if (status != MPI_STATUS_IGNORE)
diff --git a/src/mpi/romio/adio/include/adio.h b/src/mpi/romio/adio/include/adio.h
index da77015..e508452 100644
--- a/src/mpi/romio/adio/include/adio.h
+++ b/src/mpi/romio/adio/include/adio.h
@@ -55,13 +55,6 @@
# define FORTRAN_API
#endif
-/* Use this macro for each parameter to a function that is not referenced in the body of the function */
-#ifdef HAVE_WINDOWS_H
-#define ADIOI_UNREFERENCED_ARG(a) a
-#else
-#define ADIOI_UNREFERENCED_ARG(a)
-#endif
-
/* Include romioconf.h if we haven't already (some include files may
need to include romioconf before some system includes) */
#ifndef ROMIOCONF_H_INCLUDED
diff --git a/src/mpi/romio/mpi-io/delete.c b/src/mpi/romio/mpi-io/delete.c
index 47b52a0..3272edc 100644
--- a/src/mpi/romio/mpi-io/delete.c
+++ b/src/mpi/romio/mpi-io/delete.c
@@ -46,7 +46,7 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
MPI_FILE_NULL, MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPIU_UNREFERENCED_ARG(info);
+ MPL_UNREFERENCED_ARG(info);
ROMIO_THREAD_CS_ENTER();
diff --git a/src/mpi/romio/mpi-io/mpioimpl.h b/src/mpi/romio/mpi-io/mpioimpl.h
index 074ad42..8f636d3 100644
--- a/src/mpi/romio/mpi-io/mpioimpl.h
+++ b/src/mpi/romio/mpi-io/mpioimpl.h
@@ -37,11 +37,6 @@
#define ROMIO_THREAD_CS_EXIT()
#define ROMIO_THREAD_CS_YIELD()
#define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) do {} while (0)
-#ifdef HAVE_WINDOWS_H
-#define MPIU_UNREFERENCED_ARG(a) a
-#else
-#define MPIU_UNREFERENCED_ARG(a)
-#endif
#endif /* ROMIO_INSIDE_MPICH */
/* info is a linked list of these structures */
diff --git a/src/mpi/romio/mpi-io/mpiu_greq.c b/src/mpi/romio/mpi-io/mpiu_greq.c
index cb6e9d2..82cd7c7 100644
--- a/src/mpi/romio/mpi-io/mpiu_greq.c
+++ b/src/mpi/romio/mpi-io/mpiu_greq.c
@@ -41,8 +41,8 @@ int MPIU_Greq_free_fn(void *extra_state)
}
int MPIU_Greq_cancel_fn(void *extra_state, int complete)
{
- MPIU_UNREFERENCED_ARG(extra_state);
- MPIU_UNREFERENCED_ARG(complete);
+ MPL_UNREFERENCED_ARG(extra_state);
+ MPL_UNREFERENCED_ARG(complete);
/* can't cancel */
return MPI_SUCCESS;
diff --git a/src/mpi/romio/mpi-io/read_alle.c b/src/mpi/romio/mpi-io/read_alle.c
index e2853c1..f6f92c6 100644
--- a/src/mpi/romio/mpi-io/read_alle.c
+++ b/src/mpi/romio/mpi-io/read_alle.c
@@ -58,7 +58,7 @@ int MPIOI_File_read_all_end(MPI_File fh,
int error_code = MPI_SUCCESS;
ADIO_File adio_fh;
- MPIU_UNREFERENCED_ARG(buf);
+ MPL_UNREFERENCED_ARG(buf);
ROMIO_THREAD_CS_ENTER();
diff --git a/src/mpi/romio/mpi-io/read_orde.c b/src/mpi/romio/mpi-io/read_orde.c
index 542f687..a69d51c 100644
--- a/src/mpi/romio/mpi-io/read_orde.c
+++ b/src/mpi/romio/mpi-io/read_orde.c
@@ -43,7 +43,7 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_READ_ORDERED_END";
- MPIU_UNREFERENCED_ARG(buf);
+ MPL_UNREFERENCED_ARG(buf);
ROMIO_THREAD_CS_ENTER();
diff --git a/src/mpi/romio/mpi-io/write_alle.c b/src/mpi/romio/mpi-io/write_alle.c
index 6dc7f6d..e43d9f2 100644
--- a/src/mpi/romio/mpi-io/write_alle.c
+++ b/src/mpi/romio/mpi-io/write_alle.c
@@ -57,7 +57,7 @@ int MPIOI_File_write_all_end(MPI_File fh,
int error_code;
ADIO_File adio_fh;
- MPIU_UNREFERENCED_ARG(buf);
+ MPL_UNREFERENCED_ARG(buf);
ROMIO_THREAD_CS_ENTER();
diff --git a/src/mpi/romio/mpi-io/write_orde.c b/src/mpi/romio/mpi-io/write_orde.c
index 8cfdba2..7190ffd 100644
--- a/src/mpi/romio/mpi-io/write_orde.c
+++ b/src/mpi/romio/mpi-io/write_orde.c
@@ -43,7 +43,7 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
static char myname[] = "MPI_FILE_WRITE_ORDERED_END";
ADIO_File adio_fh;
- MPIU_UNREFERENCED_ARG(buf);
+ MPL_UNREFERENCED_ARG(buf);
ROMIO_THREAD_CS_ENTER();
diff --git a/src/mpi/topo/cart_map.c b/src/mpi/topo/cart_map.c
index ccdd8d4..29547e4 100644
--- a/src/mpi/topo/cart_map.c
+++ b/src/mpi/topo/cart_map.c
@@ -35,7 +35,7 @@ int MPIR_Cart_map( const MPID_Comm *comm_ptr, int ndims, const int dims[],
{
int rank, nranks, i, size, mpi_errno = MPI_SUCCESS;
- MPIU_UNREFERENCED_ARG(periodic);
+ MPL_UNREFERENCED_ARG(periodic);
/* Determine number of processes needed for topology */
if (ndims == 0) {
diff --git a/src/mpi/topo/graph_map.c b/src/mpi/topo/graph_map.c
index 9e9cd05..6f85545 100644
--- a/src/mpi/topo/graph_map.c
+++ b/src/mpi/topo/graph_map.c
@@ -29,8 +29,8 @@ int MPIR_Graph_map( const MPID_Comm *comm_ptr, int nnodes,
const int indx[] ATTRIBUTE((unused)),
const int edges[] ATTRIBUTE((unused)), int *newrank )
{
- MPIU_UNREFERENCED_ARG(indx);
- MPIU_UNREFERENCED_ARG(edges);
+ MPL_UNREFERENCED_ARG(indx);
+ MPL_UNREFERENCED_ARG(edges);
/* This is the trivial version that does not remap any processes. */
if (comm_ptr->rank < nnodes) {
diff --git a/src/mpi/topo/topoutil.c b/src/mpi/topo/topoutil.c
index e97c11a..46ec563 100644
--- a/src/mpi/topo/topoutil.c
+++ b/src/mpi/topo/topoutil.c
@@ -81,7 +81,7 @@ int MPIR_Topology_put( MPID_Comm *comm_ptr, MPIR_Topology *topo_ptr )
static int MPIR_Topology_finalize( void *p ATTRIBUTE((unused)) )
{
- MPIU_UNREFERENCED_ARG(p);
+ MPL_UNREFERENCED_ARG(p);
if (MPIR_Topology_keyval != MPI_KEYVAL_INVALID) {
/* Just in case */
@@ -136,9 +136,9 @@ static int MPIR_Topology_copy_fn ( MPI_Comm comm ATTRIBUTE((unused)),
MPIU_CHKPMEM_DECL(5);
int mpi_errno = 0;
- MPIU_UNREFERENCED_ARG(comm);
- MPIU_UNREFERENCED_ARG(keyval);
- MPIU_UNREFERENCED_ARG(extra_data);
+ MPL_UNREFERENCED_ARG(comm);
+ MPL_UNREFERENCED_ARG(keyval);
+ MPL_UNREFERENCED_ARG(extra_data);
*flag = 0;
*(void **)attr_out = NULL;
@@ -210,9 +210,9 @@ static int MPIR_Topology_delete_fn ( MPI_Comm comm ATTRIBUTE((unused)),
{
MPIR_Topology *topology = (MPIR_Topology *)attr_val;
- MPIU_UNREFERENCED_ARG(comm);
- MPIU_UNREFERENCED_ARG(keyval);
- MPIU_UNREFERENCED_ARG(extra_data);
+ MPL_UNREFERENCED_ARG(comm);
+ MPL_UNREFERENCED_ARG(keyval);
+ MPL_UNREFERENCED_ARG(extra_data);
/* FIXME - free the attribute data structure */
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_init.c b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
index 6a8e393..27fe4da 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
@@ -120,7 +120,7 @@ int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns )
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PORTFNSINIT);
- MPIU_UNREFERENCED_ARG(portFns);
+ MPL_UNREFERENCED_ARG(portFns);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PORTFNSINIT);
return 0;
@@ -282,7 +282,7 @@ int MPIDI_CH3_PG_Init(MPIDI_PG_t *pg_p)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PG_INIT);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PG_INIT);
- MPIU_UNREFERENCED_ARG(pg_p);
+ MPL_UNREFERENCED_ARG(pg_p);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PG_INIT);
return MPI_SUCCESS;
@@ -293,7 +293,7 @@ int MPIDI_CH3_PG_Destroy(MPIDI_PG_t *pg_p)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PG_DESTROY);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PG_DESTROY);
- MPIU_UNREFERENCED_ARG(pg_p);
+ MPL_UNREFERENCED_ARG(pg_p);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PG_DESTROY);
return MPI_SUCCESS;
diff --git a/src/mpid/ch3/channels/sock/src/ch3_init.c b/src/mpid/ch3/channels/sock/src/ch3_init.c
index c0b0f6c..52db566 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_init.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_init.c
@@ -67,7 +67,7 @@ int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t * pg_p, int pg_rank )
MPI Port functions */
int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns ATTRIBUTE((unused)) )
{
- MPIU_UNREFERENCED_ARG(portFns);
+ MPL_UNREFERENCED_ARG(portFns);
return 0;
}
diff --git a/src/mpid/ch3/util/sock/ch3u_init_sock.c b/src/mpid/ch3/util/sock/ch3u_init_sock.c
index 85e39ef..9dccecf 100644
--- a/src/mpid/ch3/util/sock/ch3u_init_sock.c
+++ b/src/mpid/ch3/util/sock/ch3u_init_sock.c
@@ -41,8 +41,8 @@ int MPIDI_CH3U_Init_sock(int has_parent, MPIDI_PG_t *pg_p, int pg_rank,
int p;
/* FIXME: Why are these unused? */
- MPIU_UNREFERENCED_ARG(has_parent);
- MPIU_UNREFERENCED_ARG(pg_rank);
+ MPL_UNREFERENCED_ARG(has_parent);
+ MPL_UNREFERENCED_ARG(pg_rank);
/*
* Initialize the VCs associated with this process group (and thus
diff --git a/src/mpid/common/sock/iocp/sock.c b/src/mpid/common/sock/iocp/sock.c
index cc02e84..48414ab 100644
--- a/src/mpid/common/sock/iocp/sock.c
+++ b/src/mpid/common/sock/iocp/sock.c
@@ -723,7 +723,7 @@ int MPIDU_Sock_get_host_description(int myRank,
MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_GET_HOST_DESCRIPTION);
- MPIU_UNREFERENCED_ARG(myRank);
+ MPL_UNREFERENCED_ARG(myRank);
if (!g_init_called)
{
@@ -1532,7 +1532,7 @@ int MPIDU_Sock_post_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t minbr, MPIU_
MPIDI_STATE_DECL(MPID_STATE_MPIDU_SOCK_POST_READ);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_POST_READ);
- MPIU_UNREFERENCED_ARG(maxbr);
+ MPL_UNREFERENCED_ARG(maxbr);
sock->read.tiov.MPL_IOV_BUF = (MPL_IOV_BUF_CAST)buf;
sock->read.tiov.MPL_IOV_LEN = minbr;
mpi_errno = MPIDU_Sock_post_readv(sock, &sock->read.tiov, 1, fn);
@@ -1657,7 +1657,7 @@ int MPIDU_Sock_post_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t min, MPIU_S
MPIDI_STATE_DECL(MPID_STATE_MPIDU_SOCK_POST_WRITE);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_POST_WRITE);
- MPIU_UNREFERENCED_ARG(max);
+ MPL_UNREFERENCED_ARG(max);
sock->write.tiov.MPL_IOV_BUF = (MPL_IOV_BUF_CAST)buf;
sock->write.tiov.MPL_IOV_LEN = min;
mpi_errno = MPIDU_Sock_post_writev(sock, &sock->write.tiov, 1, fn);
diff --git a/src/mpl/include/mpl_base.h b/src/mpl/include/mpl_base.h
index 698da33..0d9de0c 100644
--- a/src/mpl/include/mpl_base.h
+++ b/src/mpl/include/mpl_base.h
@@ -80,6 +80,14 @@
#define MPL_MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MPL_MIN(a,b) (((a) < (b)) ? (a) : (b))
+/* Use this macro for each parameter to a function that is not referenced in
+ the body of the function */
+#ifdef MPL_HAVE_WINDOWS_H
+#define MPL_UNREFERENCED_ARG(a) a
+#else
+#define MPL_UNREFERENCED_ARG(a)
+#endif
+
/* This macro is used to silence warnings from the Mac OS X linker when
* an object file "has no symbols". The unused attribute prevents a
* warning about the unused dummy variable while the used attribute
diff --git a/src/nameserv/pmi/pmi_nameserv.c b/src/nameserv/pmi/pmi_nameserv.c
index 03f00c6..5034c9f 100644
--- a/src/nameserv/pmi/pmi_nameserv.c
+++ b/src/nameserv/pmi/pmi_nameserv.c
@@ -30,7 +30,7 @@ int MPID_NS_Create( const MPID_Info *info_ptr, MPID_NS_Handle *handle_ptr )
{
static struct MPID_NS_Handle nsHandleWithNoData;
- MPIU_UNREFERENCED_ARG(info_ptr);
+ MPL_UNREFERENCED_ARG(info_ptr);
/* MPID_NS_Create() should always create a valid handle */
*handle_ptr = &nsHandleWithNoData; /* The name service needs no local data */
return 0;
@@ -45,8 +45,8 @@ int MPID_NS_Publish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
{
int mpi_errno = MPI_SUCCESS;
int rc;
- MPIU_UNREFERENCED_ARG(info_ptr);
- MPIU_UNREFERENCED_ARG(handle);
+ MPL_UNREFERENCED_ARG(info_ptr);
+ MPL_UNREFERENCED_ARG(handle);
#ifdef USE_PMI2_API
/* release the global CS for PMI calls */
@@ -71,8 +71,8 @@ int MPID_NS_Lookup( MPID_NS_Handle handle, const MPID_Info *info_ptr,
{
int mpi_errno = MPI_SUCCESS;
int rc;
- MPIU_UNREFERENCED_ARG(info_ptr);
- MPIU_UNREFERENCED_ARG(handle);
+ MPL_UNREFERENCED_ARG(info_ptr);
+ MPL_UNREFERENCED_ARG(handle);
#ifdef USE_PMI2_API
/* release the global CS for PMI calls */
@@ -97,8 +97,8 @@ int MPID_NS_Unpublish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
{
int mpi_errno = MPI_SUCCESS;
int rc;
- MPIU_UNREFERENCED_ARG(info_ptr);
- MPIU_UNREFERENCED_ARG(handle);
+ MPL_UNREFERENCED_ARG(info_ptr);
+ MPL_UNREFERENCED_ARG(handle);
#ifdef USE_PMI2_API
/* release the global CS for PMI calls */
@@ -119,7 +119,7 @@ fn_fail:
int MPID_NS_Free( MPID_NS_Handle *handle_ptr )
{
/* MPID_NS_Handle is Null */
- MPIU_UNREFERENCED_ARG(handle_ptr);
+ MPL_UNREFERENCED_ARG(handle_ptr);
return 0;
}
diff --git a/src/util/type/mpiu_type_defs.h b/src/util/type/mpiu_type_defs.h
index 74a42c7..2ae91c7 100644
--- a/src/util/type/mpiu_type_defs.h
+++ b/src/util/type/mpiu_type_defs.h
@@ -43,13 +43,6 @@
#define BOOL int
#endif
#endif
-/* Use this macro for each parameter to a function that is not referenced in
- the body of the function */
-#ifdef HAVE_WINDOWS_H
-#define MPIU_UNREFERENCED_ARG(a) a
-#else
-#define MPIU_UNREFERENCED_ARG(a)
-#endif
#include "mpl.h"
diff --git a/src/util/wrappers/mpiu_shm_wrappers.h b/src/util/wrappers/mpiu_shm_wrappers.h
index 4534fb6..f5eab06 100644
--- a/src/util/wrappers/mpiu_shm_wrappers.h
+++ b/src/util/wrappers/mpiu_shm_wrappers.h
@@ -795,7 +795,7 @@ static inline int MPIU_SHMW_Seg_detach(
int mpi_errno = MPI_SUCCESS;
int rc = -1;
- MPIU_UNREFERENCED_ARG(seg_sz);
+ MPL_UNREFERENCED_ARG(seg_sz);
MPIR_ERR_CHKANDJUMP(!MPIU_SHMW_Hnd_is_valid(hnd),
mpi_errno, MPI_ERR_OTHER, "**shmw_badhnd");
MPIU_Assert(shm_addr_ptr);
diff --git a/src/util/wrappers/mpiu_sock_wrappers.h b/src/util/wrappers/mpiu_sock_wrappers.h
index eac8ba8..1b1236a 100644
--- a/src/util/wrappers/mpiu_sock_wrappers.h
+++ b/src/util/wrappers/mpiu_sock_wrappers.h
@@ -440,7 +440,7 @@ static inline void MPIU_SOCKW_Waitset_curindex_inc_(MPIU_SOCKW_Waitset_hnd_t wai
static inline void MPIU_SOCKW_Waitset_expand_(MPIU_SOCKW_Waitset_hnd_t waitset_hnd,
int *index_ptr)
{
- MPIU_UNREFERENCED_ARG(index_ptr);
+ MPL_UNREFERENCED_ARG(index_ptr);
(waitset_hnd)->nfds++;
MPIU_Assert((waitset_hnd)->nfds < FD_SETSIZE);
}
http://git.mpich.org/mpich.git/commitdiff/e42f060cbad66a42619e88b0122c481e4…
commit e42f060cbad66a42619e88b0122c481e48fc173f
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Thu Jan 28 09:46:40 2016 -0600
refcount: fix bug in the pobj header inclusion.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/refcount/mpir_refcount.h b/src/util/refcount/mpir_refcount.h
index f7d0e14..5130abc 100644
--- a/src/util/refcount/mpir_refcount.h
+++ b/src/util/refcount/mpir_refcount.h
@@ -15,7 +15,7 @@
#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL
#include "mpir_refcount_global.h"
#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
-#include "mpir_refcount_obj.h"
+#include "mpir_refcount_pobj.h"
#endif
#else
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 43 --------
src/binding/fortran/mpif_h/buildiface | 6 +-
src/include/glue_romio.h.in | 15 +---
src/mpi/attr/attr_get.c | 4 +-
src/mpi/attr/attrutil.c | 8 +-
src/mpi/attr/comm_get_attr.c | 20 ++--
src/mpi/attr/comm_set_attr.c | 6 +-
src/mpi/attr/dup_fn.c | 6 +-
src/mpi/attr/type_get_attr.c | 8 +-
src/mpi/attr/type_set_attr.c | 6 +-
src/mpi/attr/win_get_attr.c | 10 +-
src/mpi/attr/win_set_attr.c | 6 +-
src/mpi/coll/helper_fns.c | 6 +-
src/mpi/errhan/dynerrutil.c | 2 +-
src/mpi/init/initthread.c | 2 +-
src/mpi/pt2pt/bsendutil.c | 2 +-
src/mpi/pt2pt/ibsend.c | 2 +-
src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c | 32 +++---
src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c | 10 +-
src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c | 4 +-
src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c | 4 +-
src/mpi/romio/adio/common/ad_aggregate.c | 2 +-
src/mpi/romio/adio/common/ad_end.c | 6 +-
src/mpi/romio/adio/common/ad_fstype.c | 4 +-
src/mpi/romio/adio/common/ad_init.c | 4 +-
src/mpi/romio/adio/common/ad_iread_coll.c | 4 +-
src/mpi/romio/adio/common/ad_iwrite_coll.c | 2 +-
src/mpi/romio/adio/common/ad_read_coll.c | 10 +-
src/mpi/romio/adio/common/ad_read_str_naive.c | 6 +-
src/mpi/romio/adio/common/ad_seek.c | 2 +-
src/mpi/romio/adio/common/ad_write_coll.c | 4 +-
src/mpi/romio/adio/common/ad_write_nolock.c | 2 +-
src/mpi/romio/adio/common/ad_write_str_naive.c | 6 +-
src/mpi/romio/adio/common/cb_config_list.c | 10 +-
src/mpi/romio/adio/common/lock.c | 2 +-
src/mpi/romio/adio/common/status_setb.c | 2 +-
src/mpi/romio/adio/include/adio.h | 7 --
src/mpi/romio/adio/include/adioi.h | 3 +-
src/mpi/romio/mpi-io/delete.c | 2 +-
src/mpi/romio/mpi-io/mpioimpl.h | 5 -
src/mpi/romio/mpi-io/mpiu_greq.c | 4 +-
src/mpi/romio/mpi-io/read_alle.c | 2 +-
src/mpi/romio/mpi-io/read_orde.c | 2 +-
src/mpi/romio/mpi-io/write_alle.c | 2 +-
src/mpi/romio/mpi-io/write_orde.c | 2 +-
src/mpi/topo/cart_map.c | 2 +-
src/mpi/topo/graph_map.c | 4 +-
src/mpi/topo/topoutil.c | 14 ++--
.../channels/nemesis/include/mpid_nem_datatypes.h | 2 +-
.../ch3/channels/nemesis/include/mpid_nem_impl.h | 12 +-
.../ch3/channels/nemesis/include/mpid_nem_inline.h | 30 +++---
.../ch3/channels/nemesis/include/mpid_nem_post.h | 12 +-
.../ch3/channels/nemesis/include/mpidi_ch3_impl.h | 4 +-
.../ch3/channels/nemesis/include/mpidi_ch3_pre.h | 16 ++--
.../ch3/channels/nemesis/netmod/llc/llc_impl.h | 12 +-
.../ch3/channels/nemesis/netmod/llc/llc_poll.c | 2 +-
.../ch3/channels/nemesis/netmod/llc/llc_send.c | 34 +++---
.../ch3/channels/nemesis/netmod/mxm/mxm_impl.h | 10 +-
.../ch3/channels/nemesis/netmod/mxm/mxm_poll.c | 20 ++--
.../ch3/channels/nemesis/netmod/mxm/mxm_send.c | 34 +++---
.../ch3/channels/nemesis/netmod/ofi/ofi_impl.h | 8 +-
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c | 20 ++--
.../nemesis/netmod/ofi/ofi_tagged_template.c | 6 +-
.../channels/nemesis/netmod/portals4/ptl_impl.h | 16 ++--
.../ch3/channels/nemesis/netmod/portals4/ptl_nm.c | 16 ++--
.../channels/nemesis/netmod/portals4/ptl_probe.c | 4 +-
.../channels/nemesis/netmod/portals4/ptl_recv.c | 8 +-
.../channels/nemesis/netmod/portals4/ptl_send.c | 2 +-
src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c | 2 +-
src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h | 2 +-
.../ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c | 2 +-
.../ch3/channels/nemesis/netmod/tcp/tcp_impl.h | 10 +-
.../ch3/channels/nemesis/netmod/tcp/tcp_send.c | 30 +++---
src/mpid/ch3/channels/nemesis/src/ch3_init.c | 6 +-
src/mpid/ch3/channels/nemesis/src/ch3_isend.c | 2 +-
src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c | 2 +-
src/mpid/ch3/channels/nemesis/src/ch3_progress.c | 20 ++--
.../ch3/channels/nemesis/src/ch3i_eagernoncontig.c | 4 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c | 4 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c | 2 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c | 30 +++---
.../ch3/channels/nemesis/src/mpid_nem_lmt_dma.c | 4 +-
.../ch3/channels/nemesis/src/mpid_nem_lmt_shm.c | 26 +++---
.../channels/nemesis/src/mpid_nem_lmt_vmsplice.c | 2 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c | 2 +-
src/mpid/ch3/channels/sock/src/ch3_init.c | 2 +-
src/mpid/ch3/channels/sock/src/ch3_isend.c | 8 +-
src/mpid/ch3/channels/sock/src/ch3_istartmsg.c | 8 +-
src/mpid/ch3/channels/sock/src/ch3_progress.c | 6 +-
src/mpid/ch3/include/mpid_rma_issue.h | 10 +-
src/mpid/ch3/include/mpidimpl.h | 106 ++++++++++----------
src/mpid/ch3/include/mpidpkt.h | 4 +-
src/mpid/ch3/include/mpidpre.h | 22 ++---
src/mpid/ch3/include/mpidrma.h | 10 +-
src/mpid/ch3/src/ch3u_buffer.c | 34 +++---
src/mpid/ch3/src/ch3u_eager.c | 42 ++++----
src/mpid/ch3/src/ch3u_eagersync.c | 14 ++--
src/mpid/ch3/src/ch3u_handle_connection.c | 2 +-
src/mpid/ch3/src/ch3u_handle_recv_pkt.c | 28 +++---
src/mpid/ch3/src/ch3u_handle_revoke_pkt.c | 2 +-
src/mpid/ch3/src/ch3u_request.c | 30 +++---
src/mpid/ch3/src/ch3u_rma_ops.c | 12 +-
src/mpid/ch3/src/ch3u_rma_pkthandler.c | 50 +++++-----
src/mpid/ch3/src/ch3u_rma_reqops.c | 8 +-
src/mpid/ch3/src/ch3u_rndv.c | 18 ++--
src/mpid/ch3/src/mpid_cancel_send.c | 4 +-
src/mpid/ch3/src/mpid_irsend.c | 2 +-
src/mpid/ch3/src/mpid_isend.c | 2 +-
src/mpid/ch3/src/mpid_issend.c | 2 +-
src/mpid/ch3/src/mpid_rsend.c | 2 +-
src/mpid/ch3/src/mpid_send.c | 2 +-
src/mpid/ch3/src/mpid_ssend.c | 2 +-
src/mpid/ch3/src/mpidi_isend_self.c | 2 +-
src/mpid/ch3/src/mpidi_printf.c | 8 +-
src/mpid/ch3/util/sock/ch3u_init_sock.c | 4 +-
src/mpid/common/sock/iocp/sock.c | 6 +-
src/mpid/pamid/include/mpidi_hooks.h | 2 +-
src/mpid/pamid/include/mpidi_prototypes.h | 2 +-
src/mpid/pamid/src/mpid_buffer.c | 12 +-
src/mpid/pamid/src/onesided/mpidi_onesided.h | 2 +-
src/mpid/pamid/src/pt2pt/mpidi_done.c | 4 +-
src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c | 2 +-
src/mpl/include/mpl_base.h | 8 ++
src/nameserv/pmi/pmi_nameserv.c | 16 ++--
src/util/pointer/mpiu_pointer.h | 2 +-
src/util/refcount/mpir_refcount.h | 2 +-
src/util/type/mpiu_type_defs.h | 15 +--
src/util/wrappers/mpiu_shm_wrappers.h | 2 +-
src/util/wrappers/mpiu_sock_wrappers.h | 2 +-
129 files changed, 591 insertions(+), 667 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-198-g6fafa6d
by noreply@mpich.org 18 Feb '16
by noreply@mpich.org 18 Feb '16
18 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 6fafa6da19a200a6aeb147e58cfadbece3ef6685 (commit)
via a1f75282dfa0a868041b2a0a73d5d4925a5cebaa (commit)
via 1cafb32fe3c82fd6f79f528857fd1e12b3a2ec0e (commit)
via db4e7a4c8ccf64dec93b47f02b295ab610ba1b46 (commit)
via 226fb3468fee4f15a634948b6359e2fbb1084426 (commit)
from 7fee8d6406c73130f6ca311294fa37570455bf87 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/6fafa6da19a200a6aeb147e58cfadbece…
commit 6fafa6da19a200a6aeb147e58cfadbece3ef6685
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Fri Oct 2 14:18:58 2015 -0500
promote types to address 64-to-32 warnings
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index 5b5d887..d6b1013 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -122,14 +122,14 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype)
void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
ADIO_Offset st_offset, MPI_Count *curr_index)
{
- int i, k, m, n, basic_num, nonzeroth, is_hindexed_block=0;
+ int k, m, n, is_hindexed_block=0;
int lb_updated=0;
int combiner, old_combiner, old_is_contig;
int nints, nadds, ntypes, old_nints, old_nadds, old_ntypes;
/* By using ADIO_Offset we preserve +/- sign and
avoid >2G integer arithmetic problems */
ADIO_Offset top_count;
- MPI_Count j, old_size, prev_index, num;
+ MPI_Count i, j, old_size, prev_index, basic_num, num, nonzeroth;
MPI_Aint old_extent;/* Assume extents are non-negative */
int *ints;
MPI_Aint *adds; /* Make no assumptions about +/- sign on these */
@@ -145,15 +145,15 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
DBG_FPRINTF(stderr,"ADIOI_Flatten:: nints %#X, nadds %#X, ntypes %#X\n",nints, nadds, ntypes);
for(i=0; i< nints; ++i)
{
- DBG_FPRINTF(stderr,"ADIOI_Flatten:: ints[%d]=%#X\n",i,ints[i]);
+ DBG_FPRINTF(stderr,"ADIOI_Flatten:: ints[%lld]=%#X\n",i,ints[i]);
}
for(i=0; i< nadds; ++i)
{
- DBG_FPRINTF(stderr,"ADIOI_Flatten:: adds[%d]="MPI_AINT_FMT_HEX_SPEC"\n",i,adds[i]);
+ DBG_FPRINTF(stderr,"ADIOI_Flatten:: adds[%lld]="MPI_AINT_FMT_HEX_SPEC"\n",i,adds[i]);
}
for(i=0; i< ntypes; ++i)
{
- DBG_FPRINTF(stderr,"ADIOI_Flatten:: types[%d]=%#llX\n",i,(unsigned long long)(unsigned long)types[i]);
+ DBG_FPRINTF(stderr,"ADIOI_Flatten:: types[%lld]=%#llX\n",i,(unsigned long long)(unsigned long)types[i]);
}
#endif
/* Chapter 4, page 83: when processing datatypes, note this item from the
http://git.mpich.org/mpich.git/commitdiff/a1f75282dfa0a868041b2a0a73d5d4925…
commit a1f75282dfa0a868041b2a0a73d5d4925a5cebaa
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Wed Sep 30 15:55:09 2015 -0500
Removed unused variable
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c
index 0046a24..1d40c86 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c
@@ -20,7 +20,7 @@ void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
char *value;
int flag;
ADIO_Offset stripe_val[3], str_factor = -1, str_unit=0, start_iodev=-1;
- int err, myrank;
+ int myrank;
static char myname[] = "ADIOI_LUSTRE_SETINFO";
value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
http://git.mpich.org/mpich.git/commitdiff/1cafb32fe3c82fd6f79f528857fd1e12b…
commit 1cafb32fe3c82fd6f79f528857fd1e12b3a2ec0e
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Jan 19 16:34:39 2016 -0600
make romio flattening handle built-in types
we were not putting built-in types on the flattened type list. Now
that we store flattened information as an attribute on that type there's
no reason to treat built-in type special.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/common/ad_aggregate_new.c b/src/mpi/romio/adio/common/ad_aggregate_new.c
index fa6fa1e..53b0210 100644
--- a/src/mpi/romio/adio/common/ad_aggregate_new.c
+++ b/src/mpi/romio/adio/common/ad_aggregate_new.c
@@ -78,7 +78,7 @@ void ADIOI_Calc_file_realms (ADIO_File fd, ADIO_Offset min_st_offset,
MPI_Type_contiguous ((max_end_offset - min_st_offset + 1), MPI_BYTE,
file_realm_types);
MPI_Type_commit (file_realm_types);
- ADIOI_Add_contig_flattened (*file_realm_types);
+ ADIOI_Flatten_datatype(*file_realm_types);
}
else if (fd->file_realm_st_offs == NULL) {
file_realm_st_offs = (ADIO_Offset *)
diff --git a/src/mpi/romio/adio/common/ad_coll_exch_new.c b/src/mpi/romio/adio/common/ad_coll_exch_new.c
index 3c957c9..7d02090 100644
--- a/src/mpi/romio/adio/common/ad_coll_exch_new.c
+++ b/src/mpi/romio/adio/common/ad_coll_exch_new.c
@@ -58,51 +58,6 @@ void ADIOI_Print_flatlist_node(ADIOI_Flatlist_node *flatlist_node_p)
fprintf(stderr, "\n");
}
-/* delete this function when the flatten code adds a flatteed representation to
- * built-in datatypes */
-/* Since ADIOI_Flatten_datatype won't add a contig datatype to the
- * ADIOI_Flatlist, we can force it to do so with this function. */
-ADIOI_Flatlist_node * ADIOI_Add_contig_flattened(MPI_Datatype contig_type)
-{
-#if 0
- MPI_Count contig_type_sz = -1;
- ADIOI_Flatlist_node *flat_node_p = ADIOI_Flatlist;
-
- /* Add contig type to the end of the list if it doesn't already
- * exist. */
- while (flat_node_p->next)
- {
- if (flat_node_p->type == contig_type)
- return flat_node_p;
- flat_node_p = flat_node_p->next;
- }
- if (flat_node_p->type == contig_type)
- return flat_node_p;
-
- MPI_Type_size_x(contig_type, &contig_type_sz);
- if ((flat_node_p->next = (ADIOI_Flatlist_node *) ADIOI_Malloc
- (sizeof(ADIOI_Flatlist_node))) == NULL)
- {
- fprintf(stderr, "ADIOI_Add_contig_flattened: malloc next failed\n");
- }
- flat_node_p = flat_node_p->next;
- flat_node_p->type = contig_type;
- if ((flat_node_p->blocklens = (ADIO_Offset *) ADIOI_Malloc(sizeof(ADIO_Offset))) == NULL)
- {
- fprintf(stderr, "ADIOI_Flatlist_node: malloc blocklens failed\n");
- }
- if ((flat_node_p->indices = (ADIO_Offset *)
- ADIOI_Malloc(sizeof(ADIO_Offset))) == NULL)
- {
- fprintf(stderr, "ADIOI_Flatlist_node: malloc indices failed\n");
- }
- flat_node_p->blocklens[0] = contig_type_sz;
- flat_node_p->indices[0] = 0;
- flat_node_p->count = 1;
- flat_node_p->next = NULL;
-#endif
- return NULL;
-}
/* ADIOI_Exchange_file_views - Sends all the aggregators the file
* views and file view states of the clients. It fills in the
@@ -150,7 +105,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type,
MPI_Type_extent(datatype, &memtype_extent);
if (memtype_sz == memtype_extent) {
memtype_is_contig = 1;
- flat_mem_p = ADIOI_Add_contig_flattened(datatype);
+ flat_mem_p = ADIOI_Flatten_and_find(datatype);
flat_mem_p->blocklens[0] = memtype_sz*count;
}
else {
diff --git a/src/mpi/romio/adio/common/ad_set_view.c b/src/mpi/romio/adio/common/ad_set_view.c
index 1e9e803..449cf22 100644
--- a/src/mpi/romio/adio/common/ad_set_view.c
+++ b/src/mpi/romio/adio/common/ad_set_view.c
@@ -48,10 +48,8 @@ void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype,
MPI_Type_contiguous(1, filetype, ©_filetype);
MPI_Type_commit(©_filetype);
fd->filetype = copy_filetype;
- ADIOI_Flatten_datatype(fd->filetype);
- /* this function will not flatten the filetype if it turns out
- to be all contiguous. */
}
+ ADIOI_Flatten_datatype(fd->filetype);
MPI_Type_size_x(fd->etype, &(fd->etype_size));
fd->disp = disp;
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index af8beae..5b5d887 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -11,6 +11,24 @@
#define FLATTEN_DEBUG 1
#endif
+static ADIOI_Flatlist_node* flatlist_node_new(MPI_Datatype datatype,
+ MPI_Count count)
+{
+ ADIOI_Flatlist_node * flat;
+ flat = ADIOI_Malloc(sizeof(ADIOI_Flatlist_node));
+
+ flat->type = datatype;
+ flat->blocklens = NULL;
+ flat->indices = NULL;
+ flat->lb_idx = flat->ub_idx = -1;
+ flat->refct = 1;
+ flat->count = count;
+
+ flat->blocklens = (ADIO_Offset *) ADIOI_Malloc(flat->count * sizeof(ADIO_Offset));
+ flat->indices = (ADIO_Offset *) ADIOI_Malloc(flat->count * sizeof(ADIO_Offset));
+ return flat;
+}
+
void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type);
/* flatten datatype and add it to Flatlist */
ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype)
@@ -18,7 +36,7 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype)
#ifdef HAVE_MPIR_TYPE_FLATTEN
MPI_Aint flatten_idx;
#endif
- MPI_Count curr_index=0;
+ MPI_Count flat_count, curr_index=0;
int is_contig, flag;
ADIOI_Flatlist_node *flat;
@@ -31,12 +49,9 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype)
/* check if necessary to flatten. */
- /* is it entirely contiguous? */
- ADIOI_Datatype_iscontig(datatype, &is_contig);
#ifdef FLATTEN_DEBUG
DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: is_contig %#X\n",is_contig);
#endif
- if (is_contig) return NULL;
/* has it already been flattened? */
MPI_Type_get_attr(datatype, ADIOI_Flattened_type_keyval, &flat, &flag);
@@ -47,26 +62,26 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype)
return flat;
}
- /* flatten and add to the list */
- flat = ADIOI_Malloc(sizeof(ADIOI_Flatlist_node));
-
- flat->type = datatype;
- flat->blocklens = NULL;
- flat->indices = NULL;
- flat->lb_idx = flat->ub_idx = -1;
- flat->refct = 1;
-
- flat->count = ADIOI_Count_contiguous_blocks(datatype, &curr_index);
-#ifdef FLATTEN_DEBUG
- DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: count %llX, cur_idx = %#llX\n",flat->count,curr_index);
-#endif
-/* DBG_FPRINTF(stderr, "%d\n", flat->count);*/
-
- if (flat->count) {
- flat->blocklens = (ADIO_Offset *) ADIOI_Malloc(flat->count * sizeof(ADIO_Offset));
- flat->indices = (ADIO_Offset *) ADIOI_Malloc(flat->count * sizeof(ADIO_Offset));
+ /* is it entirely contiguous? */
+ ADIOI_Datatype_iscontig(datatype, &is_contig);
+ /* it would be great if ADIOI_Count_contiguous_blocks and the rest of the
+ * flattening code operated on the built-in named types, but
+ * it recursively processes types, stopping when it hits a named type. So
+ * we will do the little bit of work that named types require right here,
+ * and avoid touching the scary flattening code. */
+
+ if (is_contig)
+ flat_count = 1;
+ else {
+ flat_count = ADIOI_Count_contiguous_blocks(datatype, &curr_index);
}
-
+ /* flatten and add to datatype */
+ flat = flatlist_node_new(datatype, flat_count);
+ if (is_contig) {
+ MPI_Type_size_x(datatype, &(flat->blocklens[0]));
+ flat->indices[0] = 0;
+ } else {
+
curr_index = 0;
#ifdef HAVE_MPIR_TYPE_FLATTEN
flatten_idx = (MPI_Aint) flat->count;
@@ -94,6 +109,7 @@ ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype)
);
}
#endif
+ }
MPI_Type_set_attr(datatype, ADIOI_Flattened_type_keyval, flat);
return flat;
http://git.mpich.org/mpich.git/commitdiff/db4e7a4c8ccf64dec93b47f02b295ab61…
commit db4e7a4c8ccf64dec93b47f02b295ab610ba1b46
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Sep 21 17:39:21 2015 -0500
more places need to uses flatten_and_find
to lay the groundwork for more invasive type changes (using attributes
instead of global linked list) we need any place that follows the
global linked list of flattened types to use this accessor function
instead. Missed a few of those places in the change from last month.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
index 338d479..638636c 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
@@ -252,10 +252,7 @@ void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, const void *buf, int count,
fd->fp_ind = off;
} else {
/* noncontiguous in file */
- /* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype)
- flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
diff --git a/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c b/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
index e6a7141..8be751c 100644
--- a/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
+++ b/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
@@ -275,9 +275,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count,
else { /* noncontiguous in file */
-/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
diff --git a/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c b/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
index 896338f..68f5d11 100644
--- a/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
+++ b/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
@@ -376,9 +376,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count,
else { /* noncontiguous in file */
-/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
diff --git a/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c b/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
index 0d635a7..ffa5a87 100644
--- a/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
+++ b/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
@@ -171,9 +171,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count,
/* find starting location in the file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
- disp = fd->disp;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
if (file_ptr_type == ADIO_INDIVIDUAL) {
offset = fd->fp_ind; /* in bytes */
diff --git a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
index 5bf5e5c..87b4394 100644
--- a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
+++ b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
@@ -244,8 +244,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count,
/* noncontiguous in file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
diff --git a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
index b83c798..a1e4d18 100644
--- a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
+++ b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
@@ -267,8 +267,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count,
/* find starting location in the file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
@@ -631,8 +630,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count,
/* noncontiguous in file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c
index 0901252..b96825a 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c
@@ -28,7 +28,7 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count,
int i = -1;
MPI_Count etype_size;
PVFS_size pvfs_disp = -1;
- ADIOI_Flatlist_node *flat_file_p = ADIOI_Flatlist;
+ ADIOI_Flatlist_node *flat_file_p;
/* Use for offseting the PVFS2 filetype */
int pvfs_blk = 1;
@@ -79,11 +79,7 @@ int ADIOI_PVFS2_StridedDtypeIO(ADIO_File fd, void *buf, int count,
else
{
int flag = 0;
- /* Should have already been flattened in ADIO_Open*/
- while (flat_file_p->type != fd->filetype)
- {
- flat_file_p = flat_file_p->next;
- }
+ flat_file_p = ADIOI_Flatten_and_find(fd->filetype);
num_filetypes = -1;
while (!flag)
{
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
index ebb5f8f..d85dcf5 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
@@ -63,8 +63,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count,
* lines down below). We added a workaround, but common HDF5 file types
* are actually contiguous and do not need the expensive workarond */
if (!filetype_is_contig) {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
if (flat_file->count == 1 && !buftype_is_contig)
filetype_is_contig = 1;
}
@@ -195,8 +194,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count,
/* noncontiguous in file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
initial_off = offset;
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
index 281064c..af7f734 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
@@ -79,8 +79,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count,
* lines down below). We added a workaround, but common HDF5 file types
* are actually contiguous and do not need the expensive workarond */
if (!filetype_is_contig) {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
if (flat_file->count == 1 && !buftype_is_contig)
filetype_is_contig = 1;
}
@@ -237,8 +236,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count,
/* noncontiguous in file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_flie = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
initial_off = offset;
diff --git a/src/mpi/romio/adio/ad_testfs/ad_testfs_seek.c b/src/mpi/romio/adio/ad_testfs/ad_testfs_seek.c
index df6d30a..9d10ee2 100644
--- a/src/mpi/romio/adio/ad_testfs/ad_testfs_seek.c
+++ b/src/mpi/romio/adio/ad_testfs/ad_testfs_seek.c
@@ -44,8 +44,7 @@ ADIO_Offset ADIOI_TESTFS_SeekIndividual(ADIO_File fd, ADIO_Offset offset,
if (filetype_is_contig) off = fd->disp + etype_size * offset;
else {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size_x(fd->filetype, &filetype_size);
diff --git a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
index 4178750..26407df 100644
--- a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
+++ b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
@@ -65,8 +65,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count,
* lines down below). We added a workaround, but common HDF5 file types
* are actually contiguous and do not need the expensive workarond */
if (!filetype_is_contig) {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
if (flat_file->count == 1 && !buftype_is_contig)
filetype_is_contig = 1;
}
@@ -190,8 +189,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count,
/* noncontiguous in file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
initial_off = offset;
diff --git a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
index 9d417de..6c41f2a 100644
--- a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
+++ b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
@@ -79,8 +79,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count,
* lines down below). We added a workaround, but common HDF5 file types
* are actually contiguous and do not need the expensive workarond */
if (!filetype_is_contig) {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
if (flat_file->count == 1 && !buftype_is_contig)
filetype_is_contig = 1;
}
@@ -217,8 +216,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count,
/* noncontiguous in file */
/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
initial_off = offset;
diff --git a/src/mpi/romio/adio/common/ad_coll_build_req_new.c b/src/mpi/romio/adio/common/ad_coll_build_req_new.c
index 2ea9754..4e088c5 100644
--- a/src/mpi/romio/adio/common/ad_coll_build_req_new.c
+++ b/src/mpi/romio/adio/common/ad_coll_build_req_new.c
@@ -281,12 +281,11 @@ static inline int get_next_fr_off(ADIO_File fd,
{
MPI_Aint fr_extent = -1;
ADIO_Offset tmp_off, off_rem;
- ADIOI_Flatlist_node *fr_node_p = ADIOI_Flatlist;
+ ADIOI_Flatlist_node *fr_node_p;
int i = -1, fr_dtype_ct = 0;
/* Should have already been flattened in calc_file_realms() */
- while (fr_node_p->type != (*fr_type_p))
- fr_node_p = fr_node_p->next;
+ fr_node_p = ADIOI_Flatten_and_find(*fr_type_p);
assert(fr_node_p != NULL);
/* Did we get to the first region of the file realm? */
diff --git a/src/mpi/romio/adio/common/ad_coll_exch_new.c b/src/mpi/romio/adio/common/ad_coll_exch_new.c
index 8b14fcc..3c957c9 100644
--- a/src/mpi/romio/adio/common/ad_coll_exch_new.c
+++ b/src/mpi/romio/adio/common/ad_coll_exch_new.c
@@ -159,17 +159,12 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type,
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size_x(fd->filetype, &filetype_sz);
+ flat_file_p = ADIOI_Flatten_and_find(fd->filetype);
if (filetype_extent == filetype_sz) {
- flat_file_p = ADIOI_Add_contig_flattened(fd->filetype);
flat_file_p->blocklens[0] = memtype_sz*count;
filetype_extent = memtype_sz*count;
filetype_sz = filetype_extent;
}
- else {
- flat_file_p = ADIOI_Flatlist;
- while (flat_file_p->type != fd->filetype)
- flat_file_p = flat_file_p->next;
- }
disp_off_sz_ext_typesz[0] = fd->fp_ind;
disp_off_sz_ext_typesz[1] = fd->disp;
@@ -469,7 +464,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type,
#ifdef DEBUG
if (fd->is_agg == 1)
{
- ADIOI_Flatlist_node *fr_node_p = ADIOI_Flatlist;
+ ADIOI_Flatlist_node *fr_node_p;
for (i = 0; i < nprocs; i++)
{
fprintf(stderr, "client_file_view_state_arr[%d]=(fp_ind=%Ld,"
@@ -481,9 +476,8 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type,
client_file_view_state_arr[i].ext);
}
- while (fr_node_p->type !=
- fd->file_realm_types[fd->my_cb_nodes_index])
- fr_node_p = fr_node_p->next;
+ fr_node_p =
+ ADIOI_Flatten_and_find(fd->file_realm_types[fd->my-cb_nodes_index]);
assert(fr_node_p != NULL);
fprintf(stderr, "my file realm (idx=%d,st_off=%Ld) ",
diff --git a/src/mpi/romio/adio/common/ad_io_coll.c b/src/mpi/romio/adio/common/ad_io_coll.c
index 0afb43d..e2c4f16 100644
--- a/src/mpi/romio/adio/common/ad_io_coll.c
+++ b/src/mpi/romio/adio/common/ad_io_coll.c
@@ -733,8 +733,7 @@ void ADIOI_Calc_bounds (ADIO_File fd, int count, MPI_Datatype buftype,
end_byte_off = st_byte_off + total_io - 1;
}
else {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
/* we need to take care of some weirdness since fd->fp_ind
points at an accessible byte in file. the first accessible
diff --git a/src/mpi/romio/adio/common/ad_read_coll.c b/src/mpi/romio/adio/common/ad_read_coll.c
index 3c5c946..4a73112 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -350,9 +350,7 @@ void ADIOI_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype
/* First calculate what size of offset_list and len_list to allocate */
- /* filetype already flattened in ADIO_Open or ADIO_Fcntl */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
#ifdef RDCOLL_DEBUG
diff --git a/src/mpi/romio/adio/common/ad_read_str.c b/src/mpi/romio/adio/common/ad_read_str.c
index c4712ca..08c1389 100644
--- a/src/mpi/romio/adio/common/ad_read_str.c
+++ b/src/mpi/romio/adio/common/ad_read_str.c
@@ -155,9 +155,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count,
else { /* noncontiguous in file */
-/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
diff --git a/src/mpi/romio/adio/common/ad_read_str_naive.c b/src/mpi/romio/adio/common/ad_read_str_naive.c
index 366f35a..aad8c5e 100644
--- a/src/mpi/romio/adio/common/ad_read_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_read_str_naive.c
@@ -127,9 +127,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
*
*/
- /* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
diff --git a/src/mpi/romio/adio/common/ad_seek.c b/src/mpi/romio/adio/common/ad_seek.c
index ceaf6f2..78fa5c1 100644
--- a/src/mpi/romio/adio/common/ad_seek.c
+++ b/src/mpi/romio/adio/common/ad_seek.c
@@ -37,8 +37,7 @@ ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset,
if (filetype_is_contig) off = fd->disp + etype_size * offset;
else {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
MPI_Type_extent(fd->filetype, &filetype_extent);
MPI_Type_size_x(fd->filetype, &filetype_size);
diff --git a/src/mpi/romio/adio/common/ad_set_view.c b/src/mpi/romio/adio/common/ad_set_view.c
index 0befbb9..1e9e803 100644
--- a/src/mpi/romio/adio/common/ad_set_view.c
+++ b/src/mpi/romio/adio/common/ad_set_view.c
@@ -62,9 +62,7 @@ void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype,
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
if (filetype_is_contig) fd->fp_ind = disp;
else {
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype)
- flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
for (i=0; i<flat_file->count; i++) {
if (flat_file->blocklens[i]) {
fd->fp_ind = disp + flat_file->indices[i];
diff --git a/src/mpi/romio/adio/common/ad_write_nolock.c b/src/mpi/romio/adio/common/ad_write_nolock.c
index 535e4a8..e73e01a 100644
--- a/src/mpi/romio/adio/common/ad_write_nolock.c
+++ b/src/mpi/romio/adio/common/ad_write_nolock.c
@@ -204,10 +204,8 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
/* find starting location in the file */
-/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
- disp = fd->disp;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
+ disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
offset = fd->fp_ind; /* in bytes */
diff --git a/src/mpi/romio/adio/common/ad_write_str.c b/src/mpi/romio/adio/common/ad_write_str.c
index df213ca..878bc6e 100644
--- a/src/mpi/romio/adio/common/ad_write_str.c
+++ b/src/mpi/romio/adio/common/ad_write_str.c
@@ -220,9 +220,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
else { /* noncontiguous in file */
-/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
diff --git a/src/mpi/romio/adio/common/ad_write_str_naive.c b/src/mpi/romio/adio/common/ad_write_str_naive.c
index b236d35..74f8121 100644
--- a/src/mpi/romio/adio/common/ad_write_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_write_str_naive.c
@@ -127,9 +127,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
*
*/
- /* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
disp = fd->disp;
if (file_ptr_type == ADIO_INDIVIDUAL) {
diff --git a/src/mpi/romio/adio/common/byte_offset.c b/src/mpi/romio/adio/common/byte_offset.c
index df0a240..94bcee5 100644
--- a/src/mpi/romio/adio/common/byte_offset.c
+++ b/src/mpi/romio/adio/common/byte_offset.c
@@ -25,9 +25,7 @@ void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset, ADIO_Offset *disp)
if (filetype_is_contig) *disp = fd->disp + etype_size * offset;
else {
-/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
MPI_Type_size_x(fd->filetype, &filetype_size);
n_etypes_in_filetype = filetype_size/etype_size;
diff --git a/src/mpi/romio/adio/common/eof_offset.c b/src/mpi/romio/adio/common/eof_offset.c
index 0fb3539..a16bf6b 100644
--- a/src/mpi/romio/adio/common/eof_offset.c
+++ b/src/mpi/romio/adio/common/eof_offset.c
@@ -39,10 +39,7 @@ void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset)
*eof_offset = (fsize - fd->disp + etype_size - 1)/etype_size;
/* ceiling division in case fsize is not a multiple of etype_size;*/
else {
- /* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype)
- flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
MPI_Type_size_x(fd->filetype, &filetype_size);
MPI_Type_extent(fd->filetype, &filetype_extent);
diff --git a/src/mpi/romio/adio/common/get_fp_posn.c b/src/mpi/romio/adio/common/get_fp_posn.c
index 671dde3..68092fa 100644
--- a/src/mpi/romio/adio/common/get_fp_posn.c
+++ b/src/mpi/romio/adio/common/get_fp_posn.c
@@ -26,9 +26,7 @@ void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset)
if (filetype_is_contig) *offset = (fd->fp_ind - fd->disp)/etype_size;
else {
-/* filetype already flattened in ADIO_Open */
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype) flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
MPI_Type_size_x(fd->filetype, &filetype_size);
MPI_Type_extent(fd->filetype, &filetype_extent);
http://git.mpich.org/mpich.git/commitdiff/226fb3468fee4f15a634948b6359e2fbb…
commit 226fb3468fee4f15a634948b6359e2fbb1084426
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Sep 21 15:27:54 2015 -0500
store flattened rep as an attribute on datatype
Instead of appending datatypes to a global linked list, store the
flattened representation on the datatype itself. Storing flattened
representation as attribute will be less error prone, simplifies
ROMIO bookkeeping and memory management, and gets rid of a few global
variables.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
index c8db75d..755ae63 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -464,7 +464,6 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count,
GPFSMPIO_T_CIO_REPORT( 0, fd, myrank, nprocs)
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
/* free all memory allocated for collective I/O */
for (i=0; i<nprocs; i++) {
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
index d2c507c..19eff8e 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
@@ -471,7 +471,6 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count,
GPFSMPIO_T_CIO_REPORT( 1, fd, myrank, nprocs)
/* free all memory allocated for collective I/O */
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
for (i=0; i<nprocs; i++) {
if (others_req[i].count) {
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
index af5c40b..7250a21 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
@@ -233,9 +233,6 @@ void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count,
*error_code = old_error;
- if (!buftype_is_contig)
- ADIOI_Delete_flattened(datatype);
-
/* free all memory allocated for collective I/O */
/* free others_req */
for (i = 0; i < nprocs; i++) {
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
index 1e69575..338d479 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
@@ -522,6 +522,4 @@ void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, const void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig)
- ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c b/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
index a183c6d..e6a7141 100644
--- a/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
+++ b/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
@@ -545,5 +545,4 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count,
by ADIOI_BUFFERED_READ. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c b/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
index 2df8df6..896338f 100644
--- a/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
+++ b/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
@@ -667,7 +667,6 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
fn_exit:
if (writebuf != NULL) ADIOI_Free(writebuf);
diff --git a/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c b/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
index 252424a..0d635a7 100644
--- a/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
+++ b/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
@@ -336,5 +336,4 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
index 3495145..5bf5e5c 100644
--- a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
+++ b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
@@ -236,7 +236,6 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count,
keep tracke of how much data was actually read adn placed in buf
by ADIOI_BUFFERED_READ. */
#endif
- ADIOI_Delete_flattened(datatype);
return;
} /* if (!buftype_is_contig && filetype_is_contig) */
@@ -779,6 +778,5 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count,
by ADIOI_BUFFERED_READ. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
#endif /* HAVE_PVFS_LISTIO */
diff --git a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
index 5113ad3..b83c798 100644
--- a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
+++ b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
@@ -450,7 +450,6 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
#ifdef HAVE_PVFS_LISTIO
@@ -625,7 +624,6 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- ADIOI_Delete_flattened(datatype);
return;
} /* if (!buftype_is_contig && filetype_is_contig) */
@@ -1162,6 +1160,5 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
#endif /* HAVE_PVFS_LISTIO */
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c
index 39befcc..7394605 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c
@@ -325,18 +325,14 @@ error_state:
/* This is a temporary way of filling in status. The right way is to
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (buftype_is_contig == 0)
- ADIOI_Delete_flattened(datatype);
- else
+ if (buftype_is_contig != 0)
{
ADIOI_Free(flat_buf_p->blocklens);
ADIOI_Free(flat_buf_p->indices);
ADIOI_Free(flat_buf_p);
}
- if (filetype_is_contig == 0)
- ADIOI_Delete_flattened(fd->filetype);
- else
+ if (filetype_is_contig != 0)
{
ADIOI_Free(flat_file_p->blocklens);
ADIOI_Free(flat_file_p->indices);
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
index b85c3d2..ebb5f8f 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
@@ -187,7 +187,6 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count,
keep tracke of how much data was actually read adn placed in buf
by ADIOI_BUFFERED_READ. */
#endif
- ADIOI_Delete_flattened(datatype);
return;
} /* if (!buftype_is_contig && filetype_is_contig) */
@@ -646,7 +645,6 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count,
(new_buffer_read < flat_file->blocklens[0])) )
{
- ADIOI_Delete_flattened(datatype);
ADIOI_GEN_ReadStrided_naive(fd, buf, count, datatype,
file_ptr_type, initial_off, status, error_code);
return;
@@ -904,6 +902,5 @@ error_state:
by ADIOI_BUFFERED_READ. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
index 2f412e2..281064c 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
@@ -230,7 +230,6 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- ADIOI_Delete_flattened(datatype);
return;
} /* if (!buftype_is_contig && filetype_is_contig) */
@@ -692,7 +691,6 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count,
( (mem_list_count == MAX_ARRAY_SIZE) &&
(new_buffer_write < flat_file->blocklens[0])) )
{
- ADIOI_Delete_flattened(datatype);
ADIOI_GEN_WriteStrided_naive(fd, buf, count, datatype,
file_ptr_type, initial_off, status, error_code);
return;
@@ -959,5 +957,4 @@ error_state:
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
index 7422ecf..4178750 100644
--- a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
+++ b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
@@ -182,7 +182,6 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count,
keep tracke of how much data was actually read adn placed in buf
by ADIOI_BUFFERED_READ. */
#endif
- ADIOI_Delete_flattened(datatype);
return;
} /* if (!buftype_is_contig && filetype_is_contig) */
@@ -587,7 +586,6 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count,
(new_buffer_read < flat_file->blocklens[0])) )
{
- ADIOI_Delete_flattened(datatype);
ADIOI_GEN_ReadStrided_naive(fd, buf, count, datatype,
file_ptr_type, initial_off, status, error_code);
return;
@@ -821,6 +819,5 @@ error_state:
by ADIOI_BUFFERED_READ. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
index f078ed4..9d417de 100644
--- a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
+++ b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
@@ -210,7 +210,6 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- ADIOI_Delete_flattened(datatype);
return;
} /* if (!buftype_is_contig && filetype_is_contig) */
@@ -618,7 +617,6 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count,
( (mem_list_count == MAX_ARRAY_SIZE) &&
(new_buffer_write < flat_file->blocklens[0])) )
{
- ADIOI_Delete_flattened(datatype);
ADIOI_GEN_WriteStrided_naive(fd, buf, count, datatype,
file_ptr_type, initial_off, status, error_code);
return;
@@ -853,5 +851,4 @@ error_state:
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/common/ad_close.c b/src/mpi/romio/adio/common/ad_close.c
index 49bc8ad..c107b23 100644
--- a/src/mpi/romio/adio/common/ad_close.c
+++ b/src/mpi/romio/adio/common/ad_close.c
@@ -13,7 +13,7 @@
void ADIO_Close(ADIO_File fd, int *error_code)
{
- int i, j, k, combiner, myrank, err, is_contig;
+ int i, j, k, combiner, myrank, err;
static char myname[] = "ADIO_CLOSE";
if (fd->async_count) {
@@ -81,14 +81,10 @@ void ADIO_Close(ADIO_File fd, int *error_code)
if (fd->hints->cb_pfr == ADIOI_HINT_ENABLE) {
/* AAR, FSIZE, and User provided uniform File realms */
if (1) {
- ADIOI_Delete_flattened (fd->file_realm_types[0]);
MPI_Type_free (&fd->file_realm_types[0]);
}
else {
for (i=0; i<fd->hints->cb_nodes; i++) {
- ADIOI_Datatype_iscontig(fd->file_realm_types[i], &is_contig);
- if (!is_contig)
- ADIOI_Delete_flattened(fd->file_realm_types[i]);
MPI_Type_free (&fd->file_realm_types[i]);
}
}
@@ -105,9 +101,6 @@ void ADIO_Close(ADIO_File fd, int *error_code)
MPI_Type_get_envelope(fd->etype, &i, &j, &k, &combiner);
if (combiner != MPI_COMBINER_NAMED) MPI_Type_free(&(fd->etype));
- ADIOI_Datatype_iscontig(fd->filetype, &is_contig);
- if (!is_contig) ADIOI_Delete_flattened(fd->filetype);
-
MPI_Type_get_envelope(fd->filetype, &i, &j, &k, &combiner);
if (combiner != MPI_COMBINER_NAMED) MPI_Type_free(&(fd->filetype));
diff --git a/src/mpi/romio/adio/common/ad_coll_exch_new.c b/src/mpi/romio/adio/common/ad_coll_exch_new.c
index 9db2d98..8b14fcc 100644
--- a/src/mpi/romio/adio/common/ad_coll_exch_new.c
+++ b/src/mpi/romio/adio/common/ad_coll_exch_new.c
@@ -58,10 +58,13 @@ void ADIOI_Print_flatlist_node(ADIOI_Flatlist_node *flatlist_node_p)
fprintf(stderr, "\n");
}
+/* delete this function when the flatten code adds a flatteed representation to
+ * built-in datatypes */
/* Since ADIOI_Flatten_datatype won't add a contig datatype to the
* ADIOI_Flatlist, we can force it to do so with this function. */
ADIOI_Flatlist_node * ADIOI_Add_contig_flattened(MPI_Datatype contig_type)
{
+#if 0
MPI_Count contig_type_sz = -1;
ADIOI_Flatlist_node *flat_node_p = ADIOI_Flatlist;
@@ -97,7 +100,8 @@ ADIOI_Flatlist_node * ADIOI_Add_contig_flattened(MPI_Datatype contig_type)
flat_node_p->indices[0] = 0;
flat_node_p->count = 1;
flat_node_p->next = NULL;
- return flat_node_p;
+#endif
+ return NULL;
}
/* ADIOI_Exchange_file_views - Sends all the aggregators the file
diff --git a/src/mpi/romio/adio/common/ad_end.c b/src/mpi/romio/adio/common/ad_end.c
index ea4dfeb..88af934 100644
--- a/src/mpi/romio/adio/common/ad_end.c
+++ b/src/mpi/romio/adio/common/ad_end.c
@@ -9,7 +9,6 @@
void ADIO_End(int *error_code)
{
- ADIOI_Flatlist_node *curr, *next;
ADIOI_Datarep *datarep, *datarep_next;
/* FPRINTF(stderr, "reached end\n"); */
@@ -18,17 +17,6 @@ void ADIO_End(int *error_code)
* that our reference to that errhandler is released */
PMPI_File_set_errhandler(MPI_FILE_NULL, MPI_ERRORS_RETURN);
-/* delete the flattened datatype list */
- curr = ADIOI_Flatlist;
- while (curr) {
- if (curr->blocklens) ADIOI_Free(curr->blocklens);
- if (curr->indices) ADIOI_Free(curr->indices);
- next = curr->next;
- ADIOI_Free(curr);
- curr = next;
- }
- ADIOI_Flatlist = NULL;
-
/* free file and info tables used for Fortran interface */
if (ADIOI_Ftable) ADIOI_Free(ADIOI_Ftable);
#ifndef HAVE_MPI_INFO
@@ -54,7 +42,6 @@ void ADIO_End(int *error_code)
}
-
/* This is the delete callback function associated with
ADIO_Init_keyval when MPI_COMM_SELF is freed */
@@ -75,6 +62,9 @@ int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void
if (ADIOI_cb_config_list_keyval != MPI_KEYVAL_INVALID)
MPI_Keyval_free(&ADIOI_cb_config_list_keyval);
+ if (ADIOI_Flattened_type_keyval != MPI_KEYVAL_INVALID)
+ MPI_Type_free_keyval(&ADIOI_Flattened_type_keyval);
+
ADIO_End(&error_code);
return error_code;
}
diff --git a/src/mpi/romio/adio/common/ad_init.c b/src/mpi/romio/adio/common/ad_init.c
index 88e75a5..4fd56c8 100644
--- a/src/mpi/romio/adio/common/ad_init.c
+++ b/src/mpi/romio/adio/common/ad_init.c
@@ -7,7 +7,6 @@
#include "adio.h"
-ADIOI_Flatlist_node *ADIOI_Flatlist = NULL;
ADIOI_Datarep *ADIOI_Datarep_head = NULL;
/* list of datareps registered by the user */
@@ -60,13 +59,6 @@ void ADIO_Init(int *argc, char ***argv, int *error_code)
MPIR_Ext_init();
#endif
-/* initialize the linked list containing flattened datatypes */
- ADIOI_Flatlist = (ADIOI_Flatlist_node *) ADIOI_Malloc(sizeof(ADIOI_Flatlist_node));
- ADIOI_Flatlist->type = MPI_DATATYPE_NULL;
- ADIOI_Flatlist->next = NULL;
- ADIOI_Flatlist->blocklens = NULL;
- ADIOI_Flatlist->indices = NULL;
-
#if defined(ROMIO_XFS) || defined(ROMIO_LUSTRE)
c = getenv("MPIO_DIRECT_READ");
if (c && (!strcmp(c, "true") || !strcmp(c, "TRUE")))
diff --git a/src/mpi/romio/adio/common/ad_io_coll.c b/src/mpi/romio/adio/common/ad_io_coll.c
index c52bea0..0afb43d 100644
--- a/src/mpi/romio/adio/common/ad_io_coll.c
+++ b/src/mpi/romio/adio/common/ad_io_coll.c
@@ -631,14 +631,11 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr,
if (fd->hints->cb_pfr != ADIOI_HINT_ENABLE) {
/* AAR, FSIZE, and User provided uniform File realms */
if (1) {
- ADIOI_Delete_flattened (fd->file_realm_types[0]);
MPI_Type_free (&fd->file_realm_types[0]);
}
else {
for (i=0; i<fd->hints->cb_nodes; i++) {
ADIOI_Datatype_iscontig(fd->file_realm_types[i], &is_contig);
- if (!is_contig)
- ADIOI_Delete_flattened(fd->file_realm_types[i]);
MPI_Type_free (&fd->file_realm_types[i]);
}
}
@@ -646,11 +643,6 @@ void ADIOI_IOStridedColl (ADIO_File fd, void *buf, int count, int rdwr,
ADIOI_Free (fd->file_realm_st_offs);
}
- /* This memtype must be deleted from the ADIOI_Flatlist or else it
- * will match incorrectly with other datatypes which use this
- * pointer. */
- ADIOI_Delete_flattened(datatype);
- ADIOI_Delete_flattened(fd->filetype);
if (fd->is_agg) {
if (buffered_io_size > 0)
@@ -959,9 +951,6 @@ void ADIOI_IOFiletype(ADIO_File fd, void *buf, int count,
status, error_code);
}
- /* Delete flattened temporary filetype */
- if (!f_is_contig)
- ADIOI_Delete_flattened (custom_ftype);
/* restore the user specified file view to cover our tracks */
fd->filetype = user_filetype;
diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index e0f92c4..1fe1a68 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -515,12 +515,10 @@ static void ADIOI_GEN_IreadStridedColl_free(ADIOI_NBC_Request *nbc_req,
{
ADIOI_GEN_IreadStridedColl_vars *vars = nbc_req->data.rd.rsc_vars;
ADIO_File fd = vars->fd;
- MPI_Datatype datatype = vars->datatype;
ADIOI_Access *others_req = vars->others_req;
int nprocs = vars->nprocs;
int i;
- if (!vars->buftype_is_contig) ADIOI_Delete_flattened(datatype);
/* free all memory allocated for collective I/O */
for (i = 0; i < nprocs; i++) {
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index 9796d9a..9d50b2c 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -549,7 +549,6 @@ static void ADIOI_GEN_IwriteStridedColl_free(ADIOI_NBC_Request *nbc_req,
{
ADIOI_GEN_IwriteStridedColl_vars *vars = nbc_req->data.wr.wsc_vars;
ADIO_File fd = vars->fd;
- MPI_Datatype datatype = vars->datatype;
ADIOI_Access *others_req = vars->others_req;
int nprocs = vars->nprocs;
int old_error = vars->old_error;
@@ -566,8 +565,6 @@ static void ADIOI_GEN_IwriteStridedColl_free(ADIOI_NBC_Request *nbc_req,
*error_code = old_error;
- if (!vars->buftype_is_contig) ADIOI_Delete_flattened(datatype);
-
/* free all memory allocated for collective I/O */
for (i = 0; i < nprocs; i++) {
if (others_req[i].count) {
diff --git a/src/mpi/romio/adio/common/ad_read_coll.c b/src/mpi/romio/adio/common/ad_read_coll.c
index 6cd5d93..3c5c946 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -242,7 +242,6 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File fd, void *buf, int count,
len_list, contig_access_count, min_st_offset,
fd_size, fd_start, fd_end, buf_idx, error_code);
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
/* free all memory allocated for collective I/O */
for (i=0; i<nprocs; i++) {
diff --git a/src/mpi/romio/adio/common/ad_read_str.c b/src/mpi/romio/adio/common/ad_read_str.c
index 8cd6f53..c4712ca 100644
--- a/src/mpi/romio/adio/common/ad_read_str.c
+++ b/src/mpi/romio/adio/common/ad_read_str.c
@@ -399,5 +399,4 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count,
by ADIOI_BUFFERED_READ. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/common/ad_read_str_naive.c b/src/mpi/romio/adio/common/ad_read_str_naive.c
index b875804..366f35a 100644
--- a/src/mpi/romio/adio/common/ad_read_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_read_str_naive.c
@@ -376,5 +376,4 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
*/
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(buftype);
}
diff --git a/src/mpi/romio/adio/common/ad_set_view.c b/src/mpi/romio/adio/common/ad_set_view.c
index 31aa6c6..0befbb9 100644
--- a/src/mpi/romio/adio/common/ad_set_view.c
+++ b/src/mpi/romio/adio/common/ad_set_view.c
@@ -25,7 +25,6 @@ void ADIO_Set_view(ADIO_File fd, ADIO_Offset disp, MPI_Datatype etype,
if (combiner != MPI_COMBINER_NAMED) MPI_Type_free(&(fd->etype));
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
- if (!filetype_is_contig) ADIOI_Delete_flattened(fd->filetype);
MPI_Type_get_envelope(fd->filetype, &i, &j, &k, &combiner);
if (combiner != MPI_COMBINER_NAMED) MPI_Type_free(&(fd->filetype));
diff --git a/src/mpi/romio/adio/common/ad_write_coll.c b/src/mpi/romio/adio/common/ad_write_coll.c
index b294efe..18f70b9 100644
--- a/src/mpi/romio/adio/common/ad_write_coll.c
+++ b/src/mpi/romio/adio/common/ad_write_coll.c
@@ -248,8 +248,6 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, const void *buf, int count,
*error_code = old_error;
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
-
/* free all memory allocated for collective I/O */
for (i=0; i<nprocs; i++) {
diff --git a/src/mpi/romio/adio/common/ad_write_nolock.c b/src/mpi/romio/adio/common/ad_write_nolock.c
index 2e77a1f..535e4a8 100644
--- a/src/mpi/romio/adio/common/ad_write_nolock.c
+++ b/src/mpi/romio/adio/common/ad_write_nolock.c
@@ -402,5 +402,4 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
}
diff --git a/src/mpi/romio/adio/common/ad_write_str.c b/src/mpi/romio/adio/common/ad_write_str.c
index 21ca8e8..df213ca 100644
--- a/src/mpi/romio/adio/common/ad_write_str.c
+++ b/src/mpi/romio/adio/common/ad_write_str.c
@@ -479,7 +479,6 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
keep track of how much data was actually written by ADIOI_BUFFERED_WRITE. */
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(datatype);
fn_exit:
if (writebuf != NULL) ADIOI_Free(writebuf);
}
diff --git a/src/mpi/romio/adio/common/ad_write_str_naive.c b/src/mpi/romio/adio/common/ad_write_str_naive.c
index 06e96bd..b236d35 100644
--- a/src/mpi/romio/adio/common/ad_write_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_write_str_naive.c
@@ -375,5 +375,4 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
*/
#endif
- if (!buftype_is_contig) ADIOI_Delete_flattened(buftype);
}
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index c948f95..af8beae 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -13,14 +13,21 @@
void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type);
/* flatten datatype and add it to Flatlist */
-void ADIOI_Flatten_datatype(MPI_Datatype datatype)
+ADIOI_Flatlist_node *ADIOI_Flatten_datatype(MPI_Datatype datatype)
{
#ifdef HAVE_MPIR_TYPE_FLATTEN
MPI_Aint flatten_idx;
#endif
MPI_Count curr_index=0;
- int is_contig;
- ADIOI_Flatlist_node *flat, *prev=0;
+ int is_contig, flag;
+ ADIOI_Flatlist_node *flat;
+
+ if (ADIOI_Flattened_type_keyval == MPI_KEYVAL_INVALID) {
+ /* ADIOI_End_call will take care of cleanup */
+ MPI_Type_create_keyval(ADIOI_Flattened_type_copy,
+ ADIOI_Flattened_type_delete,
+ &ADIOI_Flattened_type_keyval, NULL);
+ }
/* check if necessary to flatten. */
@@ -29,33 +36,25 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype)
#ifdef FLATTEN_DEBUG
DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: is_contig %#X\n",is_contig);
#endif
- if (is_contig) return;
+ if (is_contig) return NULL;
/* has it already been flattened? */
- flat = ADIOI_Flatlist;
- while (flat) {
- if (flat->type == datatype) {
+ MPI_Type_get_attr(datatype, ADIOI_Flattened_type_keyval, &flat, &flag);
+ if (flag) {
#ifdef FLATTEN_DEBUG
DBG_FPRINTF(stderr,"ADIOI_Flatten_datatype:: found datatype %#X\n", datatype);
#endif
- return;
- }
- else {
- prev = flat;
- flat = flat->next;
- }
+ return flat;
}
/* flatten and add to the list */
- flat = prev;
- flat->next = (ADIOI_Flatlist_node *)ADIOI_Malloc(sizeof(ADIOI_Flatlist_node));
- flat = flat->next;
+ flat = ADIOI_Malloc(sizeof(ADIOI_Flatlist_node));
flat->type = datatype;
- flat->next = NULL;
flat->blocklens = NULL;
flat->indices = NULL;
flat->lb_idx = flat->ub_idx = -1;
+ flat->refct = 1;
flat->count = ADIOI_Count_contiguous_blocks(datatype, &curr_index);
#ifdef FLATTEN_DEBUG
@@ -95,6 +94,9 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype)
);
}
#endif
+ MPI_Type_set_attr(datatype, ADIOI_Flattened_type_keyval, flat);
+ return flat;
+
}
/* ADIOI_Flatten()
@@ -1167,28 +1169,49 @@ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type)
return;
}
-void ADIOI_Delete_flattened(MPI_Datatype datatype)
-{
- ADIOI_Flatlist_node *flat, *prev;
+int ADIOI_Flattened_type_keyval=MPI_KEYVAL_INVALID;
- prev = flat = ADIOI_Flatlist;
- while (flat && (flat->type != datatype)) {
- prev = flat;
- flat = flat->next;
- }
- if (flat) {
- prev->next = flat->next;
- if (flat->blocklens) ADIOI_Free(flat->blocklens);
- if (flat->indices) ADIOI_Free(flat->indices);
- ADIOI_Free(flat);
- }
+int ADIOI_Flattened_type_copy(MPI_Datatype oldtype,
+ int type_keyval, void *extra_state, void *attribute_val_in,
+ void *attribute_val_out, int *flag)
+{
+ ADIOI_Flatlist_node *node = (ADIOI_Flatlist_node *)attribute_val_in;
+ if (node != NULL) node->refct++;
+ *(ADIOI_Flatlist_node **)attribute_val_out= node;
+ *flag = 1; /* attribute copied to new communicator */
+ return MPI_SUCCESS;
}
+int ADIOI_Flattened_type_delete(MPI_Datatype datatype,
+ int type_keyval, void *attribute_val, void *extra_state)
+{
+ ADIOI_Flatlist_node *node = (ADIOI_Flatlist_node *)attribute_val;
+ ADIOI_Assert(node != NULL);
+ node->refct--;
+
+ if (node->refct <= 0) {
+ ADIOI_Free(node->blocklens);
+ ADIOI_Free(node->indices);
+ ADIOI_Free(node);
+ }
+ return MPI_SUCCESS;
+}
ADIOI_Flatlist_node * ADIOI_Flatten_and_find(MPI_Datatype datatype)
{
ADIOI_Flatlist_node *node;
- ADIOI_Flatten_datatype(datatype);
- node = ADIOI_Flatlist;
- while (node->type != datatype) node = node->next;
+ int flag=0;
+
+ if (ADIOI_Flattened_type_keyval == MPI_KEYVAL_INVALID) {
+ /* ADIOI_End_call will take care of cleanup */
+ MPI_Type_create_keyval(ADIOI_Flattened_type_copy,
+ ADIOI_Flattened_type_delete,
+ &ADIOI_Flattened_type_keyval, NULL);
+ }
+
+ MPI_Type_get_attr(datatype, ADIOI_Flattened_type_keyval, &node, &flag);
+ if (flag == 0) {
+ node = ADIOI_Flatten_datatype(datatype);
+ }
+
return node;
}
diff --git a/src/mpi/romio/adio/common/onesided_aggregation.c b/src/mpi/romio/adio/common/onesided_aggregation.c
index 35e0a82..c627570 100644
--- a/src/mpi/romio/adio/common/onesided_aggregation.c
+++ b/src/mpi/romio/adio/common/onesided_aggregation.c
@@ -1212,8 +1212,6 @@ printf("freeing datastructures\n");
ADIOI_Free(currentFDSourceBufferState);
- if (!bufTypeIsContig)
- ADIOI_Delete_flattened(datatype);
return;
}
@@ -2168,7 +2166,5 @@ printf("iAmUsedAgg - currentRoundFDStart initialized "
ADIOI_Free(currentFDSourceBufferState);
- if (!bufTypeIsContig)
- ADIOI_Delete_flattened(datatype);
return;
}
diff --git a/src/mpi/romio/adio/include/adio_extern.h b/src/mpi/romio/adio/include/adio_extern.h
index 9a7f2e5..e315f41 100644
--- a/src/mpi/romio/adio/include/adio_extern.h
+++ b/src/mpi/romio/adio/include/adio_extern.h
@@ -5,8 +5,6 @@
* See COPYRIGHT notice in top-level directory.
*/
-extern ADIOI_Flatlist_node *ADIOI_Flatlist;
-
extern ADIOI_Datarep *ADIOI_Datarep_head;
/* for f2c and c2f conversion */
@@ -29,3 +27,4 @@ extern MPI_Info ADIOI_syshints;
extern MPI_Op ADIO_same_amode;
extern int ADIOI_cb_config_list_keyval;
+extern int ADIOI_Flattened_type_keyval;
diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h
index bc00a87..91fb770 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -124,7 +124,9 @@ typedef struct ADIOI_Fl_node {
* (-1 indicates "not explicitly set") */
ADIO_Offset lb_idx;
ADIO_Offset ub_idx;
- struct ADIOI_Fl_node *next; /* pointer to next node */
+ int refct; /* when storing flattened representation on a
+ type, attribute copy and delete routines
+ will manage refct */
} ADIOI_Flatlist_node;
#ifdef ROMIO_PVFS2
@@ -345,10 +347,15 @@ typedef struct {
/* prototypes for ADIO internal functions */
void ADIOI_SetFunctions(ADIO_File fd);
-void ADIOI_Flatten_datatype(MPI_Datatype type);
+ADIOI_Flatlist_node * ADIOI_Flatten_datatype(MPI_Datatype type);
void ADIOI_Flatten(MPI_Datatype type, ADIOI_Flatlist_node *flat,
ADIO_Offset st_offset, MPI_Count *curr_index);
-void ADIOI_Delete_flattened(MPI_Datatype datatype);
+/* callbakcs for attribute-style flattened tracking */
+int ADIOI_Flattened_type_copy(MPI_Datatype oldtype,
+ int type_keyval, void *extra_state, void *attribute_val_in,
+ void *attribute_val_out, int *flag);
+int ADIOI_Flattened_type_delete(MPI_Datatype datatype,
+ int type_keyval, void *attribute_val, void *extra_state);
ADIOI_Flatlist_node * ADIOI_Flatten_and_find(MPI_Datatype);
MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype type, MPI_Count *curr_index);
void ADIOI_Complete_async(int *error_code);
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c | 1 -
src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c | 1 -
src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c | 2 +-
src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c | 3 -
src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c | 7 +-
src/mpi/romio/adio/ad_nfs/ad_nfs_read.c | 5 +-
src/mpi/romio/adio/ad_nfs/ad_nfs_write.c | 5 +-
src/mpi/romio/adio/ad_piofs/ad_piofs_write.c | 5 +-
src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c | 5 +-
src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c | 9 +-
src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_dtype.c | 8 +-
src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c | 8 +-
.../adio/ad_pvfs2/ad_pvfs2_read_list_classic.c | 9 +-
.../adio/ad_pvfs2/ad_pvfs2_write_list_classic.c | 9 +-
src/mpi/romio/adio/ad_testfs/ad_testfs_seek.c | 3 +-
src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c | 9 +-
.../romio/adio/ad_zoidfs/ad_zoidfs_write_list.c | 9 +-
src/mpi/romio/adio/common/ad_aggregate_new.c | 2 +-
src/mpi/romio/adio/common/ad_close.c | 9 +-
src/mpi/romio/adio/common/ad_coll_build_req_new.c | 5 +-
src/mpi/romio/adio/common/ad_coll_exch_new.c | 57 +-------
src/mpi/romio/adio/common/ad_end.c | 16 +--
src/mpi/romio/adio/common/ad_init.c | 8 -
src/mpi/romio/adio/common/ad_io_coll.c | 14 +--
src/mpi/romio/adio/common/ad_iread_coll.c | 2 -
src/mpi/romio/adio/common/ad_iwrite_coll.c | 3 -
src/mpi/romio/adio/common/ad_read_coll.c | 5 +-
src/mpi/romio/adio/common/ad_read_str.c | 5 +-
src/mpi/romio/adio/common/ad_read_str_naive.c | 5 +-
src/mpi/romio/adio/common/ad_seek.c | 3 +-
src/mpi/romio/adio/common/ad_set_view.c | 9 +-
src/mpi/romio/adio/common/ad_write_coll.c | 2 -
src/mpi/romio/adio/common/ad_write_nolock.c | 7 +-
src/mpi/romio/adio/common/ad_write_str.c | 5 +-
src/mpi/romio/adio/common/ad_write_str_naive.c | 5 +-
src/mpi/romio/adio/common/byte_offset.c | 4 +-
src/mpi/romio/adio/common/eof_offset.c | 5 +-
src/mpi/romio/adio/common/flatten.c | 157 ++++++++++++--------
src/mpi/romio/adio/common/get_fp_posn.c | 4 +-
src/mpi/romio/adio/common/onesided_aggregation.c | 4 -
src/mpi/romio/adio/include/adio_extern.h | 3 +-
src/mpi/romio/adio/include/adioi.h | 13 ++-
42 files changed, 156 insertions(+), 294 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-193-g7fee8d6
by noreply@mpich.org 18 Feb '16
by noreply@mpich.org 18 Feb '16
18 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 7fee8d6406c73130f6ca311294fa37570455bf87 (commit)
from 72957514942eb9ad4657306f4abc52b6a142273a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/7fee8d6406c73130f6ca311294fa37570…
commit 7fee8d6406c73130f6ca311294fa37570455bf87
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Feb 16 16:03:24 2016 -0600
test/mpi/mtestthread: header file cleanup
Removes a preprocessor define (USE_PTHREADS) that duplicates existing
logic and is used in only one place.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/test/mpi/include/mpithreadtest.h b/test/mpi/include/mpithreadtest.h
index 669f933..2bc6899 100644
--- a/test/mpi/include/mpithreadtest.h
+++ b/test/mpi/include/mpithreadtest.h
@@ -23,7 +23,6 @@
#define MTEST_THREAD_HANDLE HANDLE
#define MTEST_THREAD_LOCK_TYPE HANDLE
#elif defined(HAVE_PTHREAD_H)
-#define USE_PTHREADS 1
#include <pthread.h>
#define MTEST_THREAD_RETURN_TYPE void *
#define MTEST_THREAD_HANDLE pthread_t
diff --git a/test/mpi/threads/util/mtestthread.c b/test/mpi/threads/util/mtestthread.c
index e091e6a..3ad72f4 100644
--- a/test/mpi/threads/util/mtestthread.c
+++ b/test/mpi/threads/util/mtestthread.c
@@ -190,7 +190,7 @@ int MTest_thread_lock_free(MTEST_THREAD_LOCK_TYPE * lock)
}
#endif
-#if defined(HAVE_PTHREAD_BARRIER_INIT) && defined(USE_PTHREADS)
+#if defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_BARRIER_INIT)
static MTEST_THREAD_LOCK_TYPE barrierLock;
static pthread_barrier_t barrier;
static int bcount = -1;
-----------------------------------------------------------------------
Summary of changes:
test/mpi/include/mpithreadtest.h | 1 -
test/mpi/threads/util/mtestthread.c | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-192-g7295751
by noreply@mpich.org 17 Feb '16
by noreply@mpich.org 17 Feb '16
17 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 72957514942eb9ad4657306f4abc52b6a142273a (commit)
from 1946c8233aa77f4082c9754ef4a5f20b58898b2e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/72957514942eb9ad4657306f4abc52b6a…
commit 72957514942eb9ad4657306f4abc52b6a142273a
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Wed Feb 17 10:41:32 2016 -0600
ensure every return case has an explicit value
Coverity 123356
Coverity 123357
No Reviewer
diff --git a/src/mpi/romio/adio/common/ad_open.c b/src/mpi/romio/adio/common/ad_open.c
index 8fb3d2f..5cdb94c 100644
--- a/src/mpi/romio/adio/common/ad_open.c
+++ b/src/mpi/romio/adio/common/ad_open.c
@@ -38,6 +38,7 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
/* obtain MPI_File handle */
mpi_fh = MPIO_File_create(sizeof(struct ADIOI_FileD));
if (mpi_fh == MPI_FILE_NULL) {
+ fd = MPI_FILE_NULL;
*error_code = MPIO_Err_create_code(*error_code,
MPIR_ERR_RECOVERABLE,
myname,
diff --git a/src/mpi/romio/adio/common/hint_fns.c b/src/mpi/romio/adio/common/hint_fns.c
index 5e87e88..284e4a9 100644
--- a/src/mpi/romio/adio/common/hint_fns.c
+++ b/src/mpi/romio/adio/common/hint_fns.c
@@ -148,7 +148,7 @@ fn_exit:
int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *key,
char **local_cache, char *funcname, int *error_code)
{
- int flag, ret;
+ int flag, ret=0;
size_t len;
char *value;
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/ad_open.c | 1 +
src/mpi/romio/adio/common/hint_fns.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-191-g1946c82
by noreply@mpich.org 17 Feb '16
by noreply@mpich.org 17 Feb '16
17 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 1946c8233aa77f4082c9754ef4a5f20b58898b2e (commit)
via 8ccf8dcb538273d3092d6da141dd5a125c30eb89 (commit)
via 5f86c3355f7a5d72b0e6606a3c44810d28205031 (commit)
from 238a3f9a5228aa22388a0e1fd7458903e218bfc8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/1946c8233aa77f4082c9754ef4a5f20b5…
commit 1946c8233aa77f4082c9754ef4a5f20b58898b2e
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Feb 16 16:06:07 2016 -0600
check errors in more cases
Looks like c9254112ba missed one error case
Coverity 122834
Signed-off-by: Yanfei Guo <yguo(a)anl.gov>
diff --git a/src/pmi/simple/simple_pmi.c b/src/pmi/simple/simple_pmi.c
index 05859f4..70ccadf 100644
--- a/src/pmi/simple/simple_pmi.c
+++ b/src/pmi/simple/simple_pmi.c
@@ -683,7 +683,10 @@ int PMI_Spawn_multiple(int count,
if (rc != 0) {
return PMI_FAIL;
}
- PMIU_writeline( PMI_fd, buf );
+ rc = PMIU_writeline( PMI_fd, buf );
+ if (rc) {
+ return PMI_FAIL;
+ }
}
PMIU_readline( PMI_fd, buf, PMIU_MAXLINE );
http://git.mpich.org/mpich.git/commitdiff/8ccf8dcb538273d3092d6da141dd5a125…
commit 8ccf8dcb538273d3092d6da141dd5a125c30eb89
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Feb 16 10:01:02 2016 -0600
don't overrun the 'key' buffer
long ago this code used strncpy, so we needed room for the null. But
code will only alloate MAX_INFO_KEY bytes. good news:
MPL_strncpy will always null-terminate.
Coverity id: 105206
Signed-off-by: Yanfei Guo <yguo(a)anl.gov>
diff --git a/src/mpi/info/info_getnth.c b/src/mpi/info/info_getnth.c
index c7253f2..d72d689 100644
--- a/src/mpi/info/info_getnth.c
+++ b/src/mpi/info/info_getnth.c
@@ -45,7 +45,9 @@ int MPIR_Info_get_nthkey_impl(MPID_Info *info_ptr, int n, char *key)
/* verify that n is valid */
MPIR_ERR_CHKANDJUMP2((!curr_ptr), mpi_errno, MPI_ERR_ARG, "**infonkey", "**infonkey %d %d", n, nkeys);
- MPL_strncpy( key, curr_ptr->key, MPI_MAX_INFO_KEY+1 );
+ /* if key is MPI_MAX_INFO_KEY long, MPL_strncpy will null-terminate it for
+ * us */
+ MPL_strncpy( key, curr_ptr->key, MPI_MAX_INFO_KEY);
/* Eventually, we could remember the location of this key in
the head using the key/value locations (and a union datatype?) */
http://git.mpich.org/mpich.git/commitdiff/5f86c3355f7a5d72b0e6606a3c44810d2…
commit 5f86c3355f7a5d72b0e6606a3c44810d28205031
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Feb 15 16:48:21 2016 -0600
avoid possible buffer overrun
CID #105201
CID #105202
CID #105203
Signed-off-by: Yanfei Guo <yguo(a)anl.gov>
diff --git a/src/pm/hydra/ui/mpich/utils.c b/src/pm/hydra/ui/mpich/utils.c
index 2aa949f..9abe0b5 100644
--- a/src/pm/hydra/ui/mpich/utils.c
+++ b/src/pm/hydra/ui/mpich/utils.c
@@ -359,7 +359,7 @@ static void hostlist_help_fn(void)
static HYD_status hostlist_fn(char *arg, char ***argv)
{
- char *hostlist[HYD_NUM_TMP_STRINGS];
+ char *hostlist[HYD_NUM_TMP_STRINGS+1]; /* +1 for null termination of list */
int count = 0;
HYD_status status = HYD_SUCCESS;
diff --git a/src/pm/hydra/utils/sock/sock.c b/src/pm/hydra/utils/sock/sock.c
index 93c5e94..9234c97 100644
--- a/src/pm/hydra/utils/sock/sock.c
+++ b/src/pm/hydra/utils/sock/sock.c
@@ -457,7 +457,7 @@ HYD_status HYDU_sock_get_iface_ip(char *iface, char **ip)
#if defined(HAVE_GETIFADDRS)
struct ifaddrs *ifaddr, *ifa;
- char buf[INET_ADDRSTRLEN];
+ char buf[MAX_HOSTNAME_LEN];
struct sockaddr_in *sa;
/* Got the interface name; let's query for the IP address */
@@ -508,7 +508,7 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local)
char lhost[MAX_HOSTNAME_LEN];
struct sockaddr_in sa;
struct ifaddrs *ifaddr, *ifa;
- char buf[INET_ADDRSTRLEN];
+ char buf[MAX_HOSTNAME_LEN];
HYD_status status = HYD_SUCCESS;
*is_local = 0;
-----------------------------------------------------------------------
Summary of changes:
src/mpi/info/info_getnth.c | 4 +++-
src/pm/hydra/ui/mpich/utils.c | 2 +-
src/pm/hydra/utils/sock/sock.c | 4 ++--
src/pmi/simple/simple_pmi.c | 5 ++++-
4 files changed, 10 insertions(+), 5 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2-188-g238a3f9
by noreply@mpich.org 16 Feb '16
by noreply@mpich.org 16 Feb '16
16 Feb '16
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 238a3f9a5228aa22388a0e1fd7458903e218bfc8 (commit)
via 53e283ed7c7856e419c714b1b6466fb93fa5f356 (commit)
via 395cf9e052a69a7089b462ac08051a766e16d866 (commit)
via 382856b05557d0a2f5c2f9f88134e56d0206172d (commit)
from 60ca21cf73d3cd3d74d36ac4bae50f37d904dfc9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/238a3f9a5228aa22388a0e1fd7458903e…
commit 238a3f9a5228aa22388a0e1fd7458903e218bfc8
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Feb 15 15:13:44 2016 -0600
actually do something if we run out of memory
coverity id #105083
No Reviewer
diff --git a/src/mpi/romio/adio/common/ad_open.c b/src/mpi/romio/adio/common/ad_open.c
index e3f2d34..8fb3d2f 100644
--- a/src/mpi/romio/adio/common/ad_open.c
+++ b/src/mpi/romio/adio/common/ad_open.c
@@ -38,6 +38,14 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
/* obtain MPI_File handle */
mpi_fh = MPIO_File_create(sizeof(struct ADIOI_FileD));
if (mpi_fh == MPI_FILE_NULL) {
+ *error_code = MPIO_Err_create_code(*error_code,
+ MPIR_ERR_RECOVERABLE,
+ myname,
+ __LINE__,
+ MPI_ERR_OTHER,
+ "**nomem2",0);
+ goto fn_exit;
+
}
fd = MPIO_File_resolve(mpi_fh);
http://git.mpich.org/mpich.git/commitdiff/53e283ed7c7856e419c714b1b6466fb93…
commit 53e283ed7c7856e419c714b1b6466fb93fa5f356
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Feb 15 15:08:47 2016 -0600
checking for null before calling free unnecessary
Coverity 105082
Coverity 105083
Coverity 105360
diff --git a/src/mpi/romio/adio/common/ad_close.c b/src/mpi/romio/adio/common/ad_close.c
index 01cf1ba..49bc8ad 100644
--- a/src/mpi/romio/adio/common/ad_close.c
+++ b/src/mpi/romio/adio/common/ad_close.c
@@ -60,8 +60,8 @@ void ADIO_Close(ADIO_File fd, int *error_code)
ADIOI_Ftable[fd->fortran_handle] = MPI_FILE_NULL;
}
- if (fd->hints && fd->hints->ranklist) ADIOI_Free(fd->hints->ranklist);
- if (fd->hints && fd->hints->cb_config_list) ADIOI_Free(fd->hints->cb_config_list);
+ if (fd->hints) ADIOI_Free(fd->hints->ranklist);
+ if (fd->hints) ADIOI_Free(fd->hints->cb_config_list);
/* This BlueGene platform-specific free must be done in the common code
* because the malloc's for these hint data structures are done at the
@@ -71,9 +71,9 @@ void ADIO_Close(ADIO_File fd, int *error_code)
* ADIOI_GPFS_Close and re-open via ADIOI_GPFS_Open are done which results
* in a double-free - ADIOI_GPFS_Open does not redo the SetInfo... */
#ifdef BGQPLATFORM
- if (fd->hints && fd->hints->fs_hints.bg.bridgelist)
+ if (fd->hints)
ADIOI_Free(fd->hints->fs_hints.bg.bridgelist);
- if (fd->hints && fd->hints->fs_hints.bg.bridgelistnum)
+ if (fd->hints)
ADIOI_Free(fd->hints->fs_hints.bg.bridgelistnum);
#endif
@@ -95,7 +95,7 @@ void ADIO_Close(ADIO_File fd, int *error_code)
ADIOI_Free(fd->file_realm_st_offs);
ADIOI_Free(fd->file_realm_types);
}
- if (fd->hints) ADIOI_Free(fd->hints);
+ ADIOI_Free(fd->hints);
@@ -113,7 +113,7 @@ void ADIO_Close(ADIO_File fd, int *error_code)
MPI_Info_free(&(fd->info));
- if (fd->io_buf != NULL) ADIOI_Free(fd->io_buf);
+ ADIOI_Free(fd->io_buf);
ADIOI_OneSidedCleanup(fd);
/* memory for fd is freed in MPI_File_close */
diff --git a/src/mpi/romio/adio/common/ad_open.c b/src/mpi/romio/adio/common/ad_open.c
index 75f8e0a..e3f2d34 100644
--- a/src/mpi/romio/adio/common/ad_open.c
+++ b/src/mpi/romio/adio/common/ad_open.c
@@ -192,12 +192,12 @@ MPI_File ADIO_Open(MPI_Comm orig_comm,
(*(fd->fns->ADIOI_xxx_Close))(fd, error_code);
}
}
- if (fd->filename) ADIOI_Free(fd->filename);
- if (fd->hints->ranklist) ADIOI_Free(fd->hints->ranklist);
- if (fd->hints->cb_config_list) ADIOI_Free(fd->hints->cb_config_list);
- if (fd->hints) ADIOI_Free(fd->hints);
+ ADIOI_Free(fd->filename);
+ ADIOI_Free(fd->hints->ranklist);
+ ADIOI_Free(fd->hints->cb_config_list);
+ ADIOI_Free(fd->hints);
if (fd->info != MPI_INFO_NULL) MPI_Info_free(&(fd->info));
- if (fd->io_buf) ADIOI_Free(fd->io_buf);
+ ADIOI_Free(fd->io_buf);
ADIOI_Free(fd);
fd = ADIO_FILE_NULL;
if (*error_code == MPI_SUCCESS)
http://git.mpich.org/mpich.git/commitdiff/395cf9e052a69a7089b462ac08051a766…
commit 395cf9e052a69a7089b462ac08051a766e16d866
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Feb 15 13:32:30 2016 -0600
coverity: free memory in error cases
coverity id: #105295
Coverity id: #105348
Coverity id: #105251
Coverity id: #105284
Coverity id: #105285
coverity id: #105324
coverity id: #105325
coverity id: #105326
coverity id: #105327
diff --git a/src/mpi/romio/adio/common/ad_fstype.c b/src/mpi/romio/adio/common/ad_fstype.c
index c89b560..75fb24f 100644
--- a/src/mpi/romio/adio/common/ad_fstype.c
+++ b/src/mpi/romio/adio/common/ad_fstype.c
@@ -192,8 +192,8 @@ static void ADIO_FileSysType_parentdir(const char *filename, char **dirnamep)
/* successfully read the link */
linkbuf[namelen] = '\0'; /* readlink doesn't null terminate */
dir = ADIOI_Strdup(linkbuf);
- ADIOI_Free(linkbuf);
}
+ ADIOI_Free(linkbuf);
}
slash = strrchr(dir, '/');
diff --git a/src/mpi/romio/adio/common/ad_hints.c b/src/mpi/romio/adio/common/ad_hints.c
index 869db03..83f0533 100644
--- a/src/mpi/romio/adio/common/ad_hints.c
+++ b/src/mpi/romio/adio/common/ad_hints.c
@@ -259,6 +259,7 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
len = (strlen(ADIOI_CB_CONFIG_LIST_DFLT)+1) * sizeof(char);
fd->hints->cb_config_list = ADIOI_Malloc(len);
if (fd->hints->cb_config_list == NULL) {
+ ADIOI_Free(value);
*error_code = MPIO_Err_create_code(*error_code,
MPIR_ERR_RECOVERABLE,
myname,
diff --git a/src/mpi/romio/adio/common/ad_iwrite.c b/src/mpi/romio/adio/common/ad_iwrite.c
index 0a3d97e..e72af5f 100644
--- a/src/mpi/romio/adio/common/ad_iwrite.c
+++ b/src/mpi/romio/adio/common/ad_iwrite.c
@@ -162,6 +162,8 @@ int ADIOI_GEN_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,
if (aio_req != NULL) ADIOI_Free(aio_req);
return 0;
} else {
+ ADIOI_Free(aio_req);
+ ADIOI_Free(aiocbp);
return errno;
}
}
diff --git a/src/mpi/romio/adio/common/cb_config_list.c b/src/mpi/romio/adio/common/cb_config_list.c
index 6b4d82c..d7031ba 100644
--- a/src/mpi/romio/adio/common/cb_config_list.c
+++ b/src/mpi/romio/adio/common/cb_config_list.c
@@ -202,6 +202,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm,
procname[0] = ADIOI_Malloc(alloc_size);
if (procname[0] == NULL) {
+ ADIOI_Free(array);
return -1;
}
diff --git a/src/mpi/romio/adio/common/hint_fns.c b/src/mpi/romio/adio/common/hint_fns.c
index 34c898b..5e87e88 100644
--- a/src/mpi/romio/adio/common/hint_fns.c
+++ b/src/mpi/romio/adio/common/hint_fns.c
@@ -12,7 +12,7 @@
int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *key,
int *local_cache, char *funcname, int *error_code)
{
- int intval, tmp_val, flag;
+ int intval, tmp_val, flag, ret=0;
char *value;
value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
@@ -37,7 +37,8 @@ int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *ke
MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(funcname,
key,
error_code);
- return -1;
+ ret = -1;
+ goto fn_exit;
}
/* --END ERROR HANDLING-- */
@@ -45,14 +46,15 @@ int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *ke
/* some file systems do not cache hints in the fd struct */
if (local_cache != NULL) *local_cache = intval;
}
+fn_exit:
ADIOI_Free(value);
- return 0;
+ return ret;
}
int ADIOI_Info_check_and_install_enabled(ADIO_File fd, MPI_Info info, const char *key,
int *local_cache, char *funcname, int *error_code)
{
- int tmp_val, flag;
+ int tmp_val, flag, ret=0;
char *value;
value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
@@ -90,17 +92,19 @@ int ADIOI_Info_check_and_install_enabled(ADIO_File fd, MPI_Info info, const char
MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(funcname,
key,
error_code);
- return -1;
+ ret = -1;
+ goto fn_exit;
}
/* --END ERROR HANDLING-- */
}
+fn_exit:
ADIOI_Free(value);
- return 0;
+ return ret;
}
int ADIOI_Info_check_and_install_true(ADIO_File fd, MPI_Info info, const char *key,
int *local_cache, char *funcname, int *error_code)
{
- int flag, tmp_val;
+ int flag, tmp_val, ret=0;
char *value;
value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
@@ -132,18 +136,19 @@ int ADIOI_Info_check_and_install_true(ADIO_File fd, MPI_Info info, const char *k
MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(funcname,
key,
error_code);
- return -1;
+ ret = -1;
+ goto fn_exit;
}
/* --END ERROR HANDLING-- */
}
-
+fn_exit:
ADIOI_Free(value);
- return 0;
+ return ret;
}
int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *key,
char **local_cache, char *funcname, int *error_code)
{
- int flag;
+ int flag, ret;
size_t len;
char *value;
@@ -171,7 +176,8 @@ int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *ke
__LINE__,
MPI_ERR_OTHER,
"**nomem2",0);
- return -1;
+ ret = -1;
+ goto fn_exit;
}
ADIOI_Strncpy(*local_cache, value, len);
}
@@ -179,6 +185,7 @@ int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *ke
* otherwise we would get an error if someone used the same
* info value with a cb_config_list value in it in a couple
* of calls, which would be irritating. */
+fn_exit:
ADIOI_Free(value);
- return 0;
+ return ret;
}
http://git.mpich.org/mpich.git/commitdiff/382856b05557d0a2f5c2f9f88134e56d0…
commit 382856b05557d0a2f5c2f9f88134e56d0206172d
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Feb 15 13:47:32 2016 -0600
coverity found more strange pointer comparision
Coverity Id: #104918
Coverity Id: #104919
diff --git a/src/mpi/romio/mpi-io/fsync.c b/src/mpi/romio/mpi-io/fsync.c
index 7b2ef12..00c9499 100644
--- a/src/mpi/romio/mpi-io/fsync.c
+++ b/src/mpi/romio/mpi-io/fsync.c
@@ -49,7 +49,7 @@ int MPI_File_sync(MPI_File fh)
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
- if ((adio_fh <= (MPI_File) 0) || ((adio_fh)->cookie != ADIOI_FILE_COOKIE))
+ if ((adio_fh == NULL) || ((adio_fh)->cookie != ADIOI_FILE_COOKIE))
{
error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
myname, __LINE__, MPI_ERR_ARG,
diff --git a/src/mpi/romio/mpi-io/get_view.c b/src/mpi/romio/mpi-io/get_view.c
index e6d1d63..6919849 100644
--- a/src/mpi/romio/mpi-io/get_view.c
+++ b/src/mpi/romio/mpi-io/get_view.c
@@ -56,7 +56,7 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_FILE_HANDLE(adio_fh, myname, error_code);
- if (datarep <= (char *) 0)
+ if (datarep == NULL)
{
error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
myname, __LINE__, MPI_ERR_ARG,
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/ad_close.c | 12 +++++-----
src/mpi/romio/adio/common/ad_fstype.c | 2 +-
src/mpi/romio/adio/common/ad_hints.c | 1 +
src/mpi/romio/adio/common/ad_iwrite.c | 2 +
src/mpi/romio/adio/common/ad_open.c | 18 +++++++++++----
src/mpi/romio/adio/common/cb_config_list.c | 1 +
src/mpi/romio/adio/common/hint_fns.c | 33 +++++++++++++++++-----------
src/mpi/romio/mpi-io/fsync.c | 2 +-
src/mpi/romio/mpi-io/get_view.c | 2 +-
9 files changed, 46 insertions(+), 27 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0