Skip to content

Commit

Permalink
Ported QUO to hwloc-2.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelkgutierrez committed Oct 17, 2019
1 parent 42eb6e9 commit 3e150fa
Show file tree
Hide file tree
Showing 287 changed files with 66,724 additions and 48,992 deletions.
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
libquo TODO

o With hwloc2: is the topo available via shared-memory?
o add "is the process distribution on my node sane?" example.
o add EXTRA_* flags in configury.
o add C++ API
Expand Down
2 changes: 1 addition & 1 deletion config/quo-pkg-libtool-version.m4
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# 2:0:0. This release has a new, but backwards incompatible interface.

AC_DEFUN([AX_QUO_LIBTOOL_VERSION], [dnl
QUO_VERSION_CURRENT=6
QUO_VERSION_CURRENT=7
QUO_VERSION_REVISION=0
QUO_VERSION_AGE=0
Expand Down
34 changes: 27 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,44 @@ AM_CONDITIONAL([QUO_HAVE_OPENMP_SUPPORT],
################################################################################
# hwloc stuff
################################################################################
# set some hwloc configure options
enable_embedded_mode=yes
# Set some hwloc configure options
hwloc_mode=embedded

# Use hwloc's internal XML support.
enable_libxml2=no
enable_xml=yes
# TODO - allow for this someday (busted on the Crays -- no static libs)

# Disable hwloc's plugin system.
enable_plugins=no

# These are for hwloc2 only, so save now to restore later.
save_enable_static=$enable_static
save_enable_shared=$enable_shared
enable_static=yes
enable_shared=no

# Disable more things we don't need.
enable_cairo=no
enable_gl=no
enable_opencl=no
enable_cuda=no
enable_nvml=no
enable_pci=no
enable_libpci=no
enable_libudev=no
#enable_libnuma=no

HWLOC_SET_SYMBOL_PREFIX(quo_internal_)

HWLOC_SETUP_CORE([src/hwloc],
[],
[AC_MSG_ERROR([*** hwloc configure failure. ***])],
[1])

HWLOC_DO_AM_CONDITIONALS

CPPFLAGS="$HWLOC_EMBEDDED_CPPFLAGS $CPPFLAGS"
LIBS="$HWLOC_EMBEDDED_LIBS $LIBS"
HWLOC_DO_AM_CONDITIONALS

enable_static=$save_enable_static
enable_shared=$save_enable_shared

################################################################################
# For docs target support
Expand Down
3 changes: 3 additions & 0 deletions demos/basic-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <sys/types.h>
#include <unistd.h>
Expand All @@ -25,6 +26,8 @@ typedef struct inf_t {
static int
init(inf_t *inf)
{
(void)memset(inf, 0, sizeof(*inf));

if (MPI_SUCCESS != MPI_Init(NULL, NULL)) {
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions demos/callee-driven-ex-p0.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ init(p0_context_t **c)
{
p0_context_t *newc = NULL;
/* alloc our context */
if (NULL == (newc = calloc(1, sizeof(*newc)))) return 1;
if (NULL == (newc = calloc(1, sizeof(*newc)))) goto err;
/* libquo requires that MPI be initialized before its init is called */
if (MPI_SUCCESS != MPI_Init(NULL, NULL)) return 1;
if (MPI_SUCCESS != MPI_Init(NULL, NULL)) goto err;
/* gather some basic job info from our mpi lib */
if (MPI_SUCCESS != MPI_Comm_size(MPI_COMM_WORLD, &(newc->nranks))) goto err;
/* ...and more */
Expand Down
8 changes: 6 additions & 2 deletions demos/callee-driven-ex-p1.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,15 @@ p1_init(p1_context_t **p1_ctx,
//
int n_workers = 0;
int *worker_comm_ids = NULL;
if (get_worker_pes(newc, &n_workers, &worker_comm_ids)) return 1;
if (gen_libcomm(newc, n_workers, worker_comm_ids)) return 1;
if (get_worker_pes(newc, &n_workers, &worker_comm_ids)) goto err;
if (gen_libcomm(newc, n_workers, worker_comm_ids)) goto err;
//
*p1_ctx = newc;
if (worker_comm_ids) free(worker_comm_ids);
return 0;
err:
if (worker_comm_ids) free(worker_comm_ids);
return 1;
}

int
Expand Down
11 changes: 7 additions & 4 deletions demos/caller-driven-ex-p0.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ static int
fini(context_t *c)
{
if (!c) return 1;
if (QUO_SUCCESS != QUO_free(c->quo)) return 1;

int nerrs = 0;
if (QUO_SUCCESS != QUO_free(c->quo)) nerrs++;
/* finalize mpi AFTER QUO_free - we may mpi in our free */
if (c->mpi_inited) {
MPI_Finalize();
}
if (c->cbindstr) free(c->cbindstr);
free(c);
return 0;

return (nerrs ? 1 : 0);
}

/**
Expand All @@ -54,9 +57,9 @@ init(context_t **c)
{
context_t *newc = NULL;
/* alloc our context */
if (NULL == (newc = calloc(1, sizeof(*newc)))) return 1;
if (NULL == (newc = calloc(1, sizeof(*newc)))) goto err;
/* libquo requires that MPI be initialized before its init is called */
if (MPI_SUCCESS != MPI_Init(NULL, NULL)) return 1;
if (MPI_SUCCESS != MPI_Init(NULL, NULL)) goto err;
/* gather some basic job info from our mpi lib */
if (MPI_SUCCESS != MPI_Comm_size(MPI_COMM_WORLD, &(newc->nranks))) goto err;
/* ...and more */
Expand Down
11 changes: 7 additions & 4 deletions demos/mpi-omp.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,15 @@ static int
fini(context_t *c)
{
if (!c) return 1;
if (QUO_SUCCESS != QUO_free(c->quo)) return 1;

int nerrs = 0;
if (QUO_SUCCESS != QUO_free(c->quo)) nerrs++;
/* finalize mpi AFTER QUO_destruct - we may mpi in our destruct */
if (c->mpi_inited) MPI_Finalize();
if (c->cbindstr) free(c->cbindstr);
free(c);
return 0;

return (nerrs ? 1 : 0);
}

/**
Expand All @@ -88,9 +91,9 @@ init(context_t **c)
{
context_t *newc = NULL;
/* alloc our context */
if (NULL == (newc = calloc(1, sizeof(*newc)))) return 1;
if (NULL == (newc = calloc(1, sizeof(*newc)))) goto err;
/* libquo requires that MPI be initialized before its init is called */
if (MPI_SUCCESS != MPI_Init(NULL, NULL)) return 1;
if (MPI_SUCCESS != MPI_Init(NULL, NULL)) goto err;
/* gather some basic job info from our mpi lib */
if (MPI_SUCCESS != MPI_Comm_size(MPI_COMM_WORLD, &(newc->nranks))) goto err;
/* ...and more */
Expand Down
17 changes: 0 additions & 17 deletions demos/openmp/Makefile.am

This file was deleted.

103 changes: 0 additions & 103 deletions demos/openmp/quofort.f90

This file was deleted.

87 changes: 0 additions & 87 deletions demos/openmp/sample.c

This file was deleted.

0 comments on commit 3e150fa

Please sign in to comment.