本文整理汇总了C++中HYDU_FUNC_ENTER函数的典型用法代码示例。如果您正苦于以下问题:C++ HYDU_FUNC_ENTER函数的具体用法?C++ HYDU_FUNC_ENTER怎么用?C++ HYDU_FUNC_ENTER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HYDU_FUNC_ENTER函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: HYDU_strsplit
HYD_status HYDU_strsplit(char *str, char **str1, char **str2, char sep)
{
int i;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
if (str == NULL)
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "");
*str1 = HYDU_strdup(str);
for (i = 0; (*str1)[i] && ((*str1)[i] != sep); i++);
if ((*str1)[i] == 0) /* End of the string */
*str2 = NULL;
else {
*str2 = HYDU_strdup(&((*str1)[i + 1]));
(*str1)[i] = 0;
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:addy004,项目名称:mpich2-yarn,代码行数:27,代码来源:string.c
示例2: HYDU_FUNC_ENTER
char *HYDU_size_t_to_str(size_t x)
{
int len = 1, i;
size_t max = 10;
char *str = NULL;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
while (x >= max) {
len++;
max *= 10;
}
len++;
HYDU_MALLOC(str, char *, len, status);
HYDU_ERR_POP(status, "unable to allocate memory\n");
for (i = 0; i < len; i++)
str[i] = '0';
HYDU_snprintf(str, len, "%llu", (unsigned long long) x);
fn_exit:
HYDU_FUNC_EXIT();
return str;
fn_fail:
goto fn_exit;
}
开发者ID:addy004,项目名称:mpich2-yarn,代码行数:30,代码来源:string.c
示例3: HYDU_str_alloc_and_join
HYD_status HYDU_str_alloc_and_join(char **strlist, char **strjoin)
{
int len = 0, i, count;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
for (i = 0; strlist[i] != NULL; i++) {
len += strlen(strlist[i]);
}
HYDU_MALLOC(*strjoin, char *, len + 1, status);
count = 0;
(*strjoin)[0] = 0;
for (i = 0; strlist[i] != NULL; i++) {
HYDU_snprintf(*strjoin + count, len - count + 1, "%s", strlist[i]);
count += strlen(strlist[i]);
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:addy004,项目名称:mpich2-yarn,代码行数:27,代码来源:string.c
示例4: HYDU_env_to_str
HYD_status HYDU_env_to_str(struct HYD_env *env, char **str)
{
int i;
char *tmp[HYD_NUM_TMP_STRINGS];
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
i = 0;
tmp[i++] = MPL_strdup("'");
tmp[i++] = MPL_strdup(env->env_name);
tmp[i++] = MPL_strdup("=");
tmp[i++] = env->env_value ? MPL_strdup(env->env_value) : MPL_strdup("");
tmp[i++] = MPL_strdup("'");
tmp[i++] = NULL;
status = HYDU_str_alloc_and_join(tmp, str);
HYDU_ERR_POP(status, "unable to join strings\n");
for (i = 0; tmp[i]; i++)
MPL_free(tmp[i]);
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:ParaStation,项目名称:psmpi2,代码行数:29,代码来源:env.c
示例5: fn_name_publish
static HYD_status fn_name_publish(int fd, int pid, int pgid, char *args[])
{
struct HYD_string_stash stash;
char *cmd, *thrid, *val, *name = NULL, *port = NULL;
int token_count, success;
struct HYD_pmcd_token *tokens = NULL;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
status = HYD_pmcd_pmi_args_to_tokens(args, &tokens, &token_count);
HYDU_ERR_POP(status, "unable to convert args to tokens\n");
thrid = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "thrid");
if ((val = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "name")) == NULL)
HYDU_ERR_POP(status, "cannot find token: name\n");
name = HYDU_strdup(val);
if ((val = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "port")) == NULL)
HYDU_ERR_POP(status, "cannot find token: port\n");
port = HYDU_strdup(val);
status = HYD_pmcd_pmi_publish(name, port, &success);
HYDU_ERR_POP(status, "error publishing service\n");
HYD_STRING_STASH_INIT(stash);
HYD_STRING_STASH(stash, HYDU_strdup("cmd=name-publish-response;"), status);
if (thrid) {
HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
}
if (!success) {
HYD_STRING_STASH(stash, HYDU_strdup("rc=1;errmsg=duplicate_service_"), status);
HYD_STRING_STASH(stash, HYDU_strdup(name), status);
HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
}
else
HYD_STRING_STASH(stash, HYDU_strdup("rc=0;"), status);
HYD_STRING_SPIT(stash, cmd, status);
status = cmd_response(fd, pid, cmd);
HYDU_ERR_POP(status, "send command failed\n");
HYDU_FREE(cmd);
fn_exit:
if (tokens)
HYD_pmcd_pmi_free_tokens(tokens, token_count);
if (name)
HYDU_FREE(name);
if (port)
HYDU_FREE(port);
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:Niharikareddy,项目名称:mpich,代码行数:60,代码来源:pmiserv_pmi_v2.c
示例6: HYDU_append_env_str_to_list
HYD_status HYDU_append_env_str_to_list(const char *str, struct HYD_env **env_list)
{
char *my_str = NULL;
char *env_name, *env_value;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
my_str = env_value = MPL_strdup(str);
/* don't use strtok, it will mangle env values that contain '=' */
env_name = MPL_strsep(&env_value, "=");
HYDU_ASSERT(env_name != NULL, status);
status = HYDU_append_env_to_list(env_name, env_value, env_list);
HYDU_ERR_POP(status, "unable to append env to list\n");
fn_exit:
if (my_str)
MPL_free(my_str);
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:ParaStation,项目名称:psmpi2,代码行数:25,代码来源:env.c
示例7: HYDU_putenv
HYD_status HYDU_putenv(struct HYD_env *env, HYD_env_overwrite_t overwrite)
{
char *tmp[HYD_NUM_TMP_STRINGS], *str;
int i;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
/* If the overwrite flag is false, just exit */
if (MPL_env2str(env->env_name, (const char **) &str) && overwrite == HYD_ENV_OVERWRITE_FALSE)
goto fn_exit;
i = 0;
tmp[i++] = MPL_strdup(env->env_name);
tmp[i++] = MPL_strdup("=");
tmp[i++] = env->env_value ? MPL_strdup(env->env_value) : MPL_strdup("");
tmp[i++] = NULL;
status = HYDU_str_alloc_and_join(tmp, &str);
HYDU_ERR_POP(status, "unable to join strings\n");
MPL_putenv(str);
for (i = 0; tmp[i]; i++)
MPL_free(tmp[i]);
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:ParaStation,项目名称:psmpi2,代码行数:32,代码来源:env.c
示例8: HYDU_send_strlist
HYD_status HYDU_send_strlist(int fd, char **strlist)
{
int i, list_len, len;
int sent, closed;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
/* Check how many arguments we have */
list_len = HYDU_strlist_lastidx(strlist);
status = HYDU_sock_write(fd, &list_len, sizeof(int), &sent, &closed, HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "unable to write data to proxy\n");
HYDU_ASSERT(!closed, status);
/* Convert the string list to parseable data and send */
for (i = 0; strlist[i]; i++) {
len = strlen(strlist[i]) + 1;
status = HYDU_sock_write(fd, &len, sizeof(int), &sent, &closed, HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "unable to write data to proxy\n");
HYDU_ASSERT(!closed, status);
status = HYDU_sock_write(fd, strlist[i], len, &sent, &closed, HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "unable to write data to proxy\n");
HYDU_ASSERT(!closed, status);
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:jeffhammond,项目名称:mpich,代码行数:34,代码来源:args.c
示例9: HYDU_FUNC_ENTER
char *HYDU_find_full_path(const char *execname)
{
char *tmp[HYD_NUM_TMP_STRINGS] = { NULL }, *path = NULL, *test_path = NULL;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
status = HYDU_find_in_path(execname, &test_path);
HYDU_ERR_POP(status, "error while searching for executable in user path\n");
if (test_path) {
tmp[0] = MPL_strdup(test_path);
tmp[1] = MPL_strdup(execname);
tmp[2] = NULL;
status = HYDU_str_alloc_and_join(tmp, &path);
HYDU_ERR_POP(status, "error joining strings\n");
}
fn_exit:
HYDU_free_strlist(tmp);
if (test_path)
MPL_free(test_path);
HYDU_FUNC_EXIT();
return path;
fn_fail:
goto fn_exit;
}
开发者ID:jeffhammond,项目名称:mpich,代码行数:29,代码来源:args.c
示例10: send_cmd_downstream
static HYD_status send_cmd_downstream(int fd, const char *cmd)
{
char cmdlen[7];
int sent, closed;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
MPL_snprintf(cmdlen, 7, "%6u", (unsigned) strlen(cmd));
status = HYDU_sock_write(fd, cmdlen, 6, &sent, &closed, HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "error writing PMI line\n");
/* FIXME: We cannot abort when we are not able to send data
* downstream. The upper layer needs to handle this based on
* whether we want to abort or not.*/
HYDU_ASSERT(!closed, status);
if (HYD_pmcd_pmip.user_global.debug) {
HYDU_dump(stdout, "PMI response: %s\n", cmd);
}
status = HYDU_sock_write(fd, cmd, strlen(cmd), &sent, &closed, HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "error writing PMI line\n");
HYDU_ASSERT(!closed, status);
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:ParaStation,项目名称:psmpi2,代码行数:31,代码来源:pmip_pmi_v2.c
示例11: create_env_file
static HYD_status create_env_file(const struct HYD_env *envlist, int num_ranks, int *ranks)
{
HYD_status status = HYD_SUCCESS;
char filename[256];
FILE *f;
const struct HYD_env *e;
int ret;
int r;
HYDU_FUNC_ENTER();
for (r = 0; r < num_ranks; ++r) {
MPL_snprintf(filename, sizeof(filename), "/tmp/hydra-env-file-%d:%d", (int) getpid(),
ranks[r]);
f = fopen(filename, "w");
HYDU_ERR_CHKANDJUMP(status, f == NULL, HYD_INTERNAL_ERROR, "fopen failed: %s\n",
strerror(errno));
for (e = envlist; e; e = e->next) {
fprintf(f, "%s=%s\n", e->env_name, e->env_value);
}
ret = fclose(f);
HYDU_ERR_CHKANDJUMP(status, ret, HYD_INTERNAL_ERROR, "fclose failed: %s\n",
strerror(errno));
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:adk9,项目名称:hydra,代码行数:35,代码来源:ckpoint_blcr.c
示例12: HYDT_bscd_pbs_launcher_finalize
HYD_status HYDT_bscd_pbs_launcher_finalize(void)
{
int err;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
#if defined(HAVE_TM_H)
err = tm_finalize();
HYDU_ERR_CHKANDJUMP(status, err != TM_SUCCESS, HYD_INTERNAL_ERROR,
"error calling tm_finalize\n");
#endif /* HAVE_TM_H */
if (HYDT_bscd_pbs_sys) {
if (HYDT_bscd_pbs_sys->task_id)
HYDU_FREE(HYDT_bscd_pbs_sys->task_id);
if (HYDT_bscd_pbs_sys->spawn_events)
HYDU_FREE(HYDT_bscd_pbs_sys->spawn_events);
HYDU_FREE(HYDT_bscd_pbs_sys);
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:abhinavvishnu,项目名称:matex,代码行数:28,代码来源:pbs_finalize.c
示例13: HYDTI_bscd_ll_query_node_count
HYD_status HYDTI_bscd_ll_query_node_count(int *count)
{
char *hostfile;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
if (MPL_env2str("LOADL_HOSTFILE", (const char **) &hostfile) == 0)
hostfile = NULL;
if (hostfile == NULL) {
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "No LL nodefile found\n");
}
else {
total_node_count = 0;
status = HYDU_parse_hostfile(hostfile, NULL, process_mfile_count);
HYDU_ERR_POP(status, "error parsing hostfile\n");
*count = total_node_count;
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:abhinavvishnu,项目名称:matex,代码行数:28,代码来源:ll_query_node_list.c
示例14: HYDU_free_exec_list
void HYDU_free_exec_list(struct HYD_exec *exec_list)
{
struct HYD_exec *exec, *run;
HYDU_FUNC_ENTER();
exec = exec_list;
while (exec) {
run = exec->next;
HYDU_free_strlist(exec->exec);
if (exec->wdir)
HYDU_FREE(exec->wdir);
if (exec->env_prop)
HYDU_FREE(exec->env_prop);
HYDU_env_free_list(exec->user_env);
exec->user_env = NULL;
HYDU_FREE(exec);
exec = run;
}
HYDU_FUNC_EXIT();
}
开发者ID:tjhei,项目名称:fgmpi,代码行数:26,代码来源:alloc.c
示例15: HYDU_correct_wdir
HYD_status HYDU_correct_wdir(char **wdir)
{
char *tmp[HYD_NUM_TMP_STRINGS];
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
if (*wdir == NULL) {
*wdir = HYDU_getcwd();
}
else if (*wdir[0] != '/') {
tmp[0] = HYDU_getcwd();
tmp[1] = HYDU_strdup("/");
tmp[2] = HYDU_strdup(*wdir);
tmp[3] = NULL;
HYDU_FREE(*wdir);
status = HYDU_str_alloc_and_join(tmp, wdir);
HYDU_ERR_POP(status, "unable to join strings\n");
HYDU_free_strlist(tmp);
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:tjhei,项目名称:fgmpi,代码行数:29,代码来源:alloc.c
示例16: HYDU_free_proxy_list
void HYDU_free_proxy_list(struct HYD_proxy *proxy_list)
{
struct HYD_proxy *proxy, *tproxy;
HYDU_FUNC_ENTER();
proxy = proxy_list;
while (proxy) {
tproxy = proxy->next;
proxy->node = NULL;
if (proxy->exec_launch_info) {
HYDU_free_strlist(proxy->exec_launch_info);
HYDU_FREE(proxy->exec_launch_info);
}
if (proxy->pid)
HYDU_FREE(proxy->pid);
if (proxy->exit_status)
HYDU_FREE(proxy->exit_status);
HYDU_free_exec_list(proxy->exec_list);
HYDU_FREE(proxy);
proxy = tproxy;
}
HYDU_FUNC_EXIT();
}
开发者ID:tjhei,项目名称:fgmpi,代码行数:31,代码来源:alloc.c
示例17: HYDU_alloc_exec
HYD_status HYDU_alloc_exec(struct HYD_exec **exec)
{
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
HYDU_MALLOC(*exec, struct HYD_exec *, sizeof(struct HYD_exec), status);
(*exec)->exec[0] = NULL;
(*exec)->wdir = NULL;
(*exec)->proc_count = -1;
#if defined(FINEGRAIN_MPI)
(*exec)->nfg = 1;
(*exec)->start_rank = -1;
#endif
(*exec)->env_prop = NULL;
(*exec)->user_env = NULL;
(*exec)->appnum = -1;
(*exec)->next = NULL;
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:tjhei,项目名称:fgmpi,代码行数:26,代码来源:alloc.c
示例18: fn_barrier_in
static HYD_status fn_barrier_in(int fd, int pid, int pgid, char *args[])
{
struct HYD_proxy *proxy, *tproxy;
const char *cmd;
int proxy_count;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
proxy = HYD_pmcd_pmi_find_proxy(fd);
HYDU_ASSERT(proxy, status);
proxy_count = 0;
for (tproxy = proxy->pg->proxy_list; tproxy; tproxy = tproxy->next)
proxy_count++;
proxy->pg->barrier_count++;
if (proxy->pg->barrier_count == proxy_count) {
proxy->pg->barrier_count = 0;
cmd = "cmd=barrier_out\n";
for (tproxy = proxy->pg->proxy_list; tproxy; tproxy = tproxy->next) {
status = cmd_response(tproxy->control_fd, pid, cmd);
HYDU_ERR_POP(status, "error writing PMI line\n");
}
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:OngOngoing,项目名称:219351_homework,代码行数:34,代码来源:pmiserv_pmi_v1.c
示例19: alloc_proxy
static HYD_status alloc_proxy(struct HYD_proxy **proxy, struct HYD_pg *pg, struct HYD_node *node)
{
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
HYDU_MALLOC(*proxy, struct HYD_proxy *, sizeof(struct HYD_proxy), status);
(*proxy)->node = node;
(*proxy)->pg = pg;
(*proxy)->proxy_id = -1;
(*proxy)->exec_launch_info = NULL;
(*proxy)->proxy_process_count = 0;
(*proxy)->filler_processes = 0;
(*proxy)->pid = NULL;
(*proxy)->exit_status = NULL;
(*proxy)->control_fd = HYD_FD_UNSET;
(*proxy)->exec_list = NULL;
(*proxy)->next = NULL;
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:tjhei,项目名称:fgmpi,代码行数:32,代码来源:alloc.c
示例20: HYDT_bscd_sge_query_node_list
HYD_status HYDT_bscd_sge_query_node_list(struct HYD_node **node_list)
{
char *hostfile;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
if (MPL_env2str("PE_HOSTFILE", (const char **) &hostfile) == 0)
hostfile = NULL;
if (hostfile == NULL) {
*node_list = NULL;
HYDU_ERR_SETANDJUMP(status, HYD_INTERNAL_ERROR, "No SGE nodefile found\n");
}
else {
status = HYDU_parse_hostfile(hostfile, node_list, process_mfile_token);
HYDU_ERR_POP(status, "error parsing hostfile\n");
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
fn_fail:
goto fn_exit;
}
开发者ID:abhinavvishnu,项目名称:matex,代码行数:26,代码来源:sge_query_node_list.c
注:本文中的HYDU_FUNC_ENTER函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论