Use opal_getpagesize to get the proper page size
Refs trac:4826 This commit was SVN r32426. The following Trac tickets were found above: Ticket 4826 --> https://svn.open-mpi.org/trac/ompi/ticket/4826
Этот коммит содержится в:
родитель
3c2e75c6b7
Коммит
f7ede30c46
@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
|
#include "opal/util/sys_limits.h"
|
||||||
|
|
||||||
#include "btl_scif.h"
|
#include "btl_scif.h"
|
||||||
#include "btl_scif_frag.h"
|
#include "btl_scif_frag.h"
|
||||||
@ -227,7 +228,7 @@ mca_btl_scif_setup_mpools (mca_btl_scif_module_t *scif_module)
|
|||||||
rc = ompi_free_list_init_new (&scif_module->dma_frags,
|
rc = ompi_free_list_init_new (&scif_module->dma_frags,
|
||||||
sizeof (mca_btl_scif_dma_frag_t), 64,
|
sizeof (mca_btl_scif_dma_frag_t), 64,
|
||||||
OBJ_CLASS(mca_btl_scif_dma_frag_t),
|
OBJ_CLASS(mca_btl_scif_dma_frag_t),
|
||||||
128, getpagesize (),
|
128, opal_getpagesize (),
|
||||||
mca_btl_scif_component.scif_free_list_num,
|
mca_btl_scif_component.scif_free_list_num,
|
||||||
mca_btl_scif_component.scif_free_list_max,
|
mca_btl_scif_component.scif_free_list_max,
|
||||||
mca_btl_scif_component.scif_free_list_inc,
|
mca_btl_scif_component.scif_free_list_inc,
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "btl_scif_endpoint.h"
|
#include "btl_scif_endpoint.h"
|
||||||
#include "opal/mca/memchecker/base/base.h"
|
#include "opal/mca/memchecker/base/base.h"
|
||||||
|
#include "opal/util/sys_limits.h"
|
||||||
|
|
||||||
static void mca_btl_scif_ep_construct (mca_btl_base_endpoint_t *ep) {
|
static void mca_btl_scif_ep_construct (mca_btl_base_endpoint_t *ep) {
|
||||||
memset ((char *) ep + sizeof(ep->super), 0, sizeof (*ep) - sizeof (ep->super));
|
memset ((char *) ep + sizeof(ep->super), 0, sizeof (*ep) - sizeof (ep->super));
|
||||||
@ -55,7 +56,7 @@ static void mca_btl_scif_ep_free_buffer (mca_btl_base_endpoint_t *ep) {
|
|||||||
static inline int mca_btl_scif_ep_get_buffer (mca_btl_base_endpoint_t *ep) {
|
static inline int mca_btl_scif_ep_get_buffer (mca_btl_base_endpoint_t *ep) {
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = posix_memalign ((void **) &ep->recv_buffer.buffer, getpagesize(), mca_btl_scif_component.segment_size);
|
rc = posix_memalign ((void **) &ep->recv_buffer.buffer, opal_getpagesize(), mca_btl_scif_component.segment_size);
|
||||||
if (0 > rc) {
|
if (0 > rc) {
|
||||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2014 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -32,6 +34,7 @@
|
|||||||
#include "opal/mca/mpool/base/base.h"
|
#include "opal/mca/mpool/base/base.h"
|
||||||
#include "mpool_base_mem_cb.h"
|
#include "mpool_base_mem_cb.h"
|
||||||
#include "opal/constants.h"
|
#include "opal/constants.h"
|
||||||
|
#include "opal/util/sys_limits.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following file was created by configure. It contains extern
|
* The following file was created by configure. It contains extern
|
||||||
@ -72,7 +75,7 @@ static int mca_mpool_base_open(mca_base_open_flag_t flags)
|
|||||||
OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t);
|
OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t);
|
||||||
|
|
||||||
/* get the page size for this architecture*/
|
/* get the page size for this architecture*/
|
||||||
mca_mpool_base_page_size = sysconf(_SC_PAGESIZE);
|
mca_mpool_base_page_size = opal_getpagesize();
|
||||||
mca_mpool_base_page_size_log = my_log2(mca_mpool_base_page_size);
|
mca_mpool_base_page_size_log = my_log2(mca_mpool_base_page_size);
|
||||||
|
|
||||||
/* setup tree for tracking MPI_Alloc_mem */
|
/* setup tree for tracking MPI_Alloc_mem */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user