Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
sudo sh -c 'echo "`ipconfig getifaddr en0` PDC" >> /etc/hosts'
sudo scutil --set HostName PDC
export HG_TRANSPORT="sockets"
ctest -L serial
ctest -L serial --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:

- name: Test PDC
working-directory: build
run: ctest -L serial
run: ctest -L serial --output-on-failure
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-no-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:

- name: Test PDC
working-directory: build
run: ctest -L serial
run: ctest -L serial --output-on-failure
14 changes: 10 additions & 4 deletions src/api/pdc_client_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "pdc_transforms_common.h"
#include "pdc_client_connect.h"
#include "pdc_logger.h"
#include "pdc_malloc.h"

#include "mercury.h"
#include "mercury_macros.h"
Expand Down Expand Up @@ -1354,7 +1355,7 @@ PDC_Client_mercury_init(hg_class_t **hg_class, hg_context_t **hg_context, int po
{
perr_t ret_value = SUCCEED;
char na_info_string[NA_STRING_INFO_LEN];
char hostname[HOSTNAME_LEN];
char * hostname;
int local_server_id;
/* Set the default mercury transport
* but enable overriding that to any of:
Expand All @@ -1378,14 +1379,19 @@ PDC_Client_mercury_init(hg_class_t **hg_class, hg_context_t **hg_context, int po
if ((hg_transport = getenv("HG_TRANSPORT")) == NULL) {
hg_transport = default_hg_transport;
}
memset(hostname, 0, sizeof(hostname));
gethostname(hostname, sizeof(hostname));
if ((hostname = getenv("HG_HOST")) == NULL) {
hostname = PDC_malloc(HOSTNAME_LEN);
memset(hostname, 0, HOSTNAME_LEN);
gethostname(hostname, HOSTNAME_LEN - 1);
}
sprintf(na_info_string, "%s://%s:%d", hg_transport, hostname, port);
if (pdc_client_mpi_rank_g == 0) {
LOG_INFO("==PDC_CLIENT: using %.7s\n", na_info_string);
LOG_INFO("==PDC_CLIENT: using %s\n", na_info_string);
fflush(stdout);
}

free(hostname);

// gni starts here
#ifdef PDC_HAS_CRAY_DRC
/* Acquire credential */
Expand Down
14 changes: 10 additions & 4 deletions src/server/pdc_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include "pdc_server_region_cache.h"
#include "pdc_server_region_transfer_metadata_query.h"
#include "pdc_logger.h"
#include "pdc_malloc.h"

#ifdef PDC_HAS_CRAY_DRC
#include <rdmacred.h>
Expand Down Expand Up @@ -783,7 +784,7 @@ PDC_Server_init(int port, hg_class_t **hg_class, hg_context_t **hg_context)
int i = 0;
char self_addr_string[ADDR_MAX];
char na_info_string[NA_STRING_INFO_LEN];
char hostname[HOSTNAME_LEN];
char * hostname;
struct hg_init_info init_info = {0};

/* Set the default mercury transport
Expand Down Expand Up @@ -817,11 +818,16 @@ PDC_Server_init(int port, hg_class_t **hg_class, hg_context_t **hg_context)
if ((hg_transport = getenv("HG_TRANSPORT")) == NULL) {
hg_transport = default_hg_transport;
}
memset(hostname, 0, HOSTNAME_LEN);
gethostname(hostname, HOSTNAME_LEN - 1);
if ((hostname = getenv("HG_HOST")) == NULL) {
hostname = PDC_malloc(HOSTNAME_LEN);
memset(hostname, 0, HOSTNAME_LEN);
gethostname(hostname, HOSTNAME_LEN - 1);
}
snprintf(na_info_string, NA_STRING_INFO_LEN, "%s://%s:%d", hg_transport, hostname, port);
if (pdc_server_rank_g == 0)
LOG_INFO("==PDC_SERVER[%d]: using %.7s\n", pdc_server_rank_g, na_info_string);
LOG_INFO("==PDC_SERVER[%d]: using %s\n", pdc_server_rank_g, na_info_string);

free(hostname);

// Clean up all the tmp files etc
HG_Cleanup();
Expand Down
Loading