ee3517427e
Add a framework to support different types of threading models including user space thread packages such as Qthreads and argobot: https://github.com/pmodels/argobots https://github.com/Qthreads/qthreads The default threading model is pthreads. Alternate thread models are specificed at configure time using the --with-threads=X option. The framework is static. The theading model to use is selected at Open MPI configure/build time. mca/threads: implement Argobots threading layer config: fix thread configury - Add double quotations - Change Argobot to Argobots config: implement Argobots check If the poll time is too long, MPI hangs. This quick fix just sets it to 0, but it is not good for the Pthreads version. Need to find a good way to abstract it. Note that even 1 (= 1 millisecond) causes disastrous performance degradation. rework threads MCA framework configury It now works more like the ompi/mca/rte configury, modulo some edge items that are special for threading package linking, etc. qthreads module some argobots cleanup Signed-off-by: Noah Evans <noah.evans@gmail.com> Signed-off-by: Shintaro Iwasaki <siwasaki@anl.gov> Signed-off-by: Howard Pritchard <howardp@lanl.gov>
85 строки
2.8 KiB
C
85 строки
2.8 KiB
C
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
/*
|
|
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
|
* University Research and Technology
|
|
* Corporation. All rights reserved.
|
|
* Copyright (c) 2004-2007 The University of Tennessee and The University
|
|
* of Tennessee Research Foundation. All rights
|
|
* reserved.
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
* University of Stuttgart. All rights reserved.
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
* All rights reserved.
|
|
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
|
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
|
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
|
|
* reserved.
|
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#ifndef OMPI_INFOSUBSCRIBE_H
|
|
#define OMPI_INFOSUBSCRIBE_H
|
|
|
|
#include <string.h>
|
|
|
|
#include "opal/class/opal_list.h"
|
|
#include "opal/class/opal_pointer_array.h"
|
|
#include "opal/class/opal_hash_table.h"
|
|
#include "opal/mca/threads/mutex.h"
|
|
#include "opal/util/info.h"
|
|
|
|
#include "opal/mca/base/mca_base_var_enum.h"
|
|
|
|
|
|
#define INFO_SUBSCRIBER_SIZE 5
|
|
|
|
struct opal_infosubscriber_t {
|
|
opal_object_t s_base;
|
|
opal_hash_table_t s_subscriber_table;
|
|
opal_info_t *s_info;
|
|
};
|
|
typedef struct opal_infosubscriber_t opal_infosubscriber_t;
|
|
|
|
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_infosubscriber_t);
|
|
|
|
typedef char*(opal_key_interest_callback_t)(opal_infosubscriber_t*, char*, char*);
|
|
|
|
/**
|
|
* opal_infosubscribe_change_info - Make changes to a Comm/Win/File Info
|
|
*
|
|
* @param type Comm/Win/File
|
|
* @param object corresponding Com/Win/File object
|
|
* @param old_info previous info setting
|
|
* @param new_info new info setting
|
|
*
|
|
* @retval OPAL status
|
|
*
|
|
* Notifies subscribers of info's that have gone away and new info settings
|
|
*/
|
|
int opal_infosubscribe_change_info(opal_infosubscriber_t*, opal_info_t *);
|
|
|
|
|
|
/**
|
|
* opal_infosubscribe_subscribe - Request to be updated about info changes to a Comm/Win/File Info
|
|
*
|
|
* @param type Comm/Win/File of obj
|
|
* @param obj either a comm, win or file
|
|
* @param key info key being set
|
|
* @param initial_value default value (or NULL if none)
|
|
* @param callback callback to be called when key changes
|
|
*
|
|
* @retval OPAL status
|
|
*
|
|
* Notifies subscribers of info's that have gone away and new info settings
|
|
* Does not try to optimize settings that are the same between old and new
|
|
* info's.
|
|
*/
|
|
int opal_infosubscribe_subscribe(opal_infosubscriber_t*, char *, char *, opal_key_interest_callback_t);
|
|
|
|
#endif /* OMPI_INFO_H */
|