Merge pull request #2760 from marksantcroos/topic/python_bindings
Expose opal_set_using_threads in python bindings
Этот коммит содержится в:
Коммит
cbb28f372a
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = "orte-cffi",
|
name = "orte-cffi",
|
||||||
version = "0.4.0",
|
version = "0.4.2",
|
||||||
author = "Mark Santcroos",
|
author = "Mark Santcroos",
|
||||||
author_email = "mark.santcroos@rutgers.edu",
|
author_email = "mark.santcroos@rutgers.edu",
|
||||||
description = "CFFI-based Python wrapper for Open RTE",
|
description = "CFFI-based Python wrapper for Open RTE",
|
||||||
|
@ -7,7 +7,6 @@ import os
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
# Get a path value from ompi_info based on key
|
# Get a path value from ompi_info based on key
|
||||||
#
|
#
|
||||||
@ -15,8 +14,12 @@ def ompi_info_path(key):
|
|||||||
|
|
||||||
cmd = ['ompi_info', '--path', key, '--parseable']
|
cmd = ['ompi_info', '--path', key, '--parseable']
|
||||||
|
|
||||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
try:
|
||||||
stdout, stderr= p.communicate()
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
except OSError:
|
||||||
|
raise Exception('ompi_info not found, check your path')
|
||||||
|
|
||||||
|
stdout, stderr = p.communicate()
|
||||||
|
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
raise Exception(stderr)
|
raise Exception(stderr)
|
||||||
@ -129,6 +132,7 @@ int orte_submit_job(char *cmd[], int *index,
|
|||||||
void orte_submit_finalize(void);
|
void orte_submit_finalize(void);
|
||||||
int orte_submit_cancel(int index);
|
int orte_submit_cancel(int index);
|
||||||
int orte_submit_halt(void);
|
int orte_submit_halt(void);
|
||||||
|
bool opal_set_using_threads(bool have);
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
extern "Python" void launch_cb(int, orte_job_t *, int, void *);
|
extern "Python" void launch_cb(int, orte_job_t *, int, void *);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user