|
@@ -282,7 +282,11 @@ static void get_model_debug_path(struct starpu_perfmodel_t *model, const char *a
|
|
|
strncat(path, model->symbol, maxlen);
|
|
|
|
|
|
char hostname[32];
|
|
|
- gethostname(hostname, 32);
|
|
|
+ char *forced_hostname = getenv("STARPU_HOSTNAME");
|
|
|
+ if (forced_hostname && forced_hostname[0])
|
|
|
+ snprintf(hostname, sizeof(hostname), forced_hostname);
|
|
|
+ else
|
|
|
+ gethostname(hostname, sizeof(hostname));
|
|
|
strncat(path, ".", maxlen);
|
|
|
strncat(path, hostname, maxlen);
|
|
|
strncat(path, ".", maxlen);
|
|
@@ -326,7 +330,11 @@ static void get_model_path(struct starpu_perfmodel_t *model, char *path, size_t
|
|
|
strncat(path, model->symbol, maxlen);
|
|
|
|
|
|
char hostname[32];
|
|
|
- gethostname(hostname, 32);
|
|
|
+ char *forced_hostname = getenv("STARPU_HOSTNAME");
|
|
|
+ if (forced_hostname && forced_hostname[0])
|
|
|
+ snprintf(hostname, sizeof(hostname), forced_hostname);
|
|
|
+ else
|
|
|
+ gethostname(hostname, sizeof(hostname));
|
|
|
strncat(path, ".", maxlen);
|
|
|
strncat(path, hostname, maxlen);
|
|
|
}
|