Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
Merge 7ae1b78 into 3e879ed
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyacheslav-Smirnov committed Jul 15, 2019
2 parents 3e879ed + 7ae1b78 commit d0d6bf6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
7 changes: 2 additions & 5 deletions hpat/_distributed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@ PyMODINIT_FUNC PyInit_hdist(void) {
PyLong_FromVoidPtr((void*)(&oneD_reshape_shuffle)));
PyObject_SetAttrString(m, "permutation_int",
PyLong_FromVoidPtr((void*)(&permutation_int)));
PyObject_SetAttrString(
m, "permutation_array_index",
PyLong_FromVoidPtr((void*)(&permutation_array_index)));
PyObject_SetAttrString(m, "fix_i_malloc",
PyLong_FromVoidPtr((void*)(&fix_i_malloc)));
PyObject_SetAttrString(m, "permutation_array_index",
PyLong_FromVoidPtr((void*)(&permutation_array_index)));

// add actual int value to module
PyObject_SetAttrString(m, "mpi_req_num_bytes",
Expand Down
16 changes: 0 additions & 16 deletions hpat/_distributed.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static void permutation_int(int64_t* output, int n) __UNUSED__;
static void permutation_array_index(unsigned char *lhs, int64_t len, int64_t elem_size,
unsigned char *rhs, int64_t *p, int64_t p_len) __UNUSED__;
static int hpat_finalize() __UNUSED__;
static void fix_i_malloc() __UNUSED__;
static int hpat_dummy_ptr[64] __UNUSED__;

/* *********************************************************************
Expand Down Expand Up @@ -826,19 +825,4 @@ static void oneD_reshape_shuffle(char* output,
delete[] recv_disp;
}

// fix for tensorflows MKL support that overwrites Intel mallocs,
// which causes Intel MPI to crash.
#ifdef I_MPI_VERSION
#include "i_malloc.h"
static void fix_i_malloc()
{
i_malloc = malloc;
i_calloc = calloc;
i_realloc = realloc;
i_free = free;
}
#else
static void fix_i_malloc() {}
#endif

#endif // _DISTRIBUTED_H_INCLUDED
7 changes: 0 additions & 7 deletions hpat/distributed_lower.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,6 @@ def dist_permutation_array_index(lhs, lhs_len, dtype_size, rhs, p, p_len):
permutation_array_index(lhs.ctypes, lhs_len, elem_size, c_rhs.ctypes,
p.ctypes, p_len)


ll.add_symbol('fix_i_malloc', hdist.fix_i_malloc)
_fix_i_malloc = types.ExternalFunction("fix_i_malloc", types.void())
@numba.njit
def fix_i_malloc():
_fix_i_malloc()

########### finalize MPI when exiting ####################

def hpat_finalize():
Expand Down

0 comments on commit d0d6bf6

Please sign in to comment.