|
18 | 18 | * Copyright (c) 2013-2017 Intel, Inc. All rights reserved. |
19 | 19 | * Copyright (c) 2014-2017 Research Organization for Information Science |
20 | 20 | * and Technology (RIST). All rights reserved. |
| 21 | + * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved. |
21 | 22 | * $COPYRIGHT$ |
22 | 23 | * |
23 | 24 | * Additional copyrights may follow |
|
41 | 42 | #include "opal/util/opal_getcwd.h" |
42 | 43 | #include "opal/util/proc.h" |
43 | 44 | #include "opal/util/show_help.h" |
| 45 | +#include "opal/util/printf.h" |
44 | 46 | #include "opal/dss/dss.h" |
45 | 47 | #include "opal/mca/hwloc/base/base.h" |
46 | 48 | #include "opal/mca/pmix/pmix.h" |
@@ -153,7 +155,7 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root, |
153 | 155 | return OMPI_ERR_NOT_SUPPORTED; |
154 | 156 | } |
155 | 157 | opal_argv_append_nosize(&members, nstring); |
156 | | - (void)asprintf(&nstring, "%d", size); |
| 158 | + (void)opal_asprintf(&nstring, "%d", size); |
157 | 159 | opal_argv_append_nosize(&members, nstring); |
158 | 160 | free(nstring); |
159 | 161 | } else { |
@@ -208,11 +210,11 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root, |
208 | 210 | OBJ_CONSTRUCT(&info, opal_value_t); |
209 | 211 | OBJ_CONSTRUCT(&pdat, opal_pmix_pdata_t); |
210 | 212 | if (send_first) { |
211 | | - (void)asprintf(&info.key, "%s:connect", port_string); |
212 | | - (void)asprintf(&pdat.value.key, "%s:accept", port_string); |
| 213 | + (void)opal_asprintf(&info.key, "%s:connect", port_string); |
| 214 | + (void)opal_asprintf(&pdat.value.key, "%s:accept", port_string); |
213 | 215 | } else { |
214 | | - (void)asprintf(&info.key, "%s:accept", port_string); |
215 | | - (void)asprintf(&pdat.value.key, "%s:connect", port_string); |
| 216 | + (void)opal_asprintf(&info.key, "%s:accept", port_string); |
| 217 | + (void)opal_asprintf(&pdat.value.key, "%s:connect", port_string); |
216 | 218 | } |
217 | 219 | info.type = OPAL_STRING; |
218 | 220 | info.data.string = opal_argv_join(members, ':'); |
@@ -812,7 +814,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[], |
812 | 814 | info = OBJ_NEW(opal_value_t); |
813 | 815 | info->key = strdup(OPAL_PMIX_PPR); |
814 | 816 | info->type = OPAL_STRING; |
815 | | - (void)asprintf(&(info->data.string), "%s:n", slot_list); |
| 817 | + (void)opal_asprintf(&(info->data.string), "%s:n", slot_list); |
816 | 818 | opal_list_append(&job_info, &info->super); |
817 | 819 | } |
818 | 820 | ompi_info_get (array_of_info[i], "pernode", sizeof(slot_list) - 1, slot_list, &flag); |
|
0 commit comments