Skip to content

Commit 5bdc072

Browse files
committed
checkpoint
1 parent 4b335f3 commit 5bdc072

19 files changed

+1121
-0
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
From d94f2bd7e8a57435731524bd27f6ce74ef57ab60 Mon Sep 17 00:00:00 2001
2+
From: TheAssembler1 <[email protected]>
3+
Date: Sun, 23 Feb 2025 08:52:50 -0800
4+
Subject: [PATCH] Manually set hostname, this commit should be removed
5+
6+
---
7+
examples/read_write_col_perf.c | 1 +
8+
examples/read_write_perf.c | 1 +
9+
src/api/pdc_client_connect.c | 1 +
10+
src/commons/utils/pdc_timing.c | 3 +++
11+
src/server/pdc_server.c | 1 +
12+
src/tests/read_write_col_perf.c | 1 +
13+
src/tests/read_write_perf.c | 1 +
14+
7 files changed, 9 insertions(+)
15+
16+
diff --git a/examples/read_write_col_perf.c b/examples/read_write_col_perf.c
17+
index 551e72eb..480aa377 100644
18+
--- a/examples/read_write_col_perf.c
19+
+++ b/examples/read_write_col_perf.c
20+
@@ -117,6 +117,7 @@ main(int argc, char **argv)
21+
22+
char hostname[256];
23+
gethostname(hostname, 256);
24+
+ strcpy(hostname, "eno1");
25+
if (rank == 0) {
26+
printf("number of dimensions in this test is %d\n", ndim);
27+
printf("data size = %llu\n", (long long unsigned)data_size);
28+
diff --git a/examples/read_write_perf.c b/examples/read_write_perf.c
29+
index 76c09a47..ee31f66c 100644
30+
--- a/examples/read_write_perf.c
31+
+++ b/examples/read_write_perf.c
32+
@@ -111,6 +111,7 @@ main(int argc, char **argv)
33+
#endif
34+
char hostname[256];
35+
gethostname(hostname, 256);
36+
+ strcpy(hostname, "eno1");
37+
if (rank == 0) {
38+
printf("number of dimensions in this test is %d\n", ndim);
39+
printf("data size = %llu\n", (long long unsigned)data_size);
40+
diff --git a/src/api/pdc_client_connect.c b/src/api/pdc_client_connect.c
41+
index cb402724..4fc7c1d6 100644
42+
--- a/src/api/pdc_client_connect.c
43+
+++ b/src/api/pdc_client_connect.c
44+
@@ -1403,6 +1403,7 @@ PDC_Client_mercury_init(hg_class_t **hg_class, hg_context_t **hg_context, int po
45+
}
46+
memset(hostname, 0, sizeof(hostname));
47+
gethostname(hostname, sizeof(hostname));
48+
+ strcpy(hostname, "eno1");
49+
sprintf(na_info_string, "%s://%s:%d", hg_transport, hostname, port);
50+
if (pdc_client_mpi_rank_g == 0) {
51+
printf("==PDC_CLIENT: using %.7s\n", na_info_string);
52+
diff --git a/src/commons/utils/pdc_timing.c b/src/commons/utils/pdc_timing.c
53+
index 75080dd0..df82cf14 100644
54+
--- a/src/commons/utils/pdc_timing.c
55+
+++ b/src/commons/utils/pdc_timing.c
56+
@@ -41,6 +41,7 @@ PDC_timing_init()
57+
58+
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
59+
gethostname(hostname, HOST_NAME_MAX);
60+
+ strcpy(hostname, "eno1");
61+
if (!(rank % 31)) {
62+
printf("client process rank %d, hostname = %s\n", rank, hostname);
63+
}
64+
@@ -126,6 +127,7 @@ PDC_timing_report(const char *prefix)
65+
time(&now);
66+
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
67+
gethostname(hostname, HOST_NAME_MAX);
68+
+ strcpy(hostname, "eno1");
69+
if (!(rank % 32)) {
70+
printf("client process rank %d, hostname = %s\n", rank, hostname);
71+
}
72+
@@ -261,6 +263,7 @@ PDC_server_timing_init()
73+
74+
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
75+
gethostname(hostname, HOST_NAME_MAX);
76+
+ strcpy(hostname, "eno1");
77+
78+
printf("server process rank %d, hostname = %s\n", rank, hostname);
79+
/*
80+
diff --git a/src/server/pdc_server.c b/src/server/pdc_server.c
81+
index e39f4f79..ac09b792 100644
82+
--- a/src/server/pdc_server.c
83+
+++ b/src/server/pdc_server.c
84+
@@ -817,6 +817,7 @@ PDC_Server_init(int port, hg_class_t **hg_class, hg_context_t **hg_context)
85+
}
86+
memset(hostname, 0, HOSTNAME_LEN);
87+
gethostname(hostname, HOSTNAME_LEN - 1);
88+
+ strcpy(hostname, "eno1");
89+
snprintf(na_info_string, NA_STRING_INFO_LEN, "%s://%s:%d", hg_transport, hostname, port);
90+
if (pdc_server_rank_g == 0)
91+
printf("==PDC_SERVER[%d]: using %.7s\n", pdc_server_rank_g, na_info_string);
92+
diff --git a/src/tests/read_write_col_perf.c b/src/tests/read_write_col_perf.c
93+
index 1686ed4e..6e987c29 100644
94+
--- a/src/tests/read_write_col_perf.c
95+
+++ b/src/tests/read_write_col_perf.c
96+
@@ -119,6 +119,7 @@ main(int argc, char **argv)
97+
98+
char hostname[256];
99+
gethostname(hostname, 256);
100+
+ strcpy(hostname, "eno1");
101+
102+
if (rank == 0) {
103+
printf("number of dimensions in this test is %d\n", ndim);
104+
diff --git a/src/tests/read_write_perf.c b/src/tests/read_write_perf.c
105+
index 27e254d7..95160189 100644
106+
--- a/src/tests/read_write_perf.c
107+
+++ b/src/tests/read_write_perf.c
108+
@@ -113,6 +113,7 @@ main(int argc, char **argv)
109+
#endif
110+
char hostname[256];
111+
gethostname(hostname, 256);
112+
+ strcpy(hostname, "eno1");
113+
if (rank == 0) {
114+
printf("number of dimensions in this test is %d\n", ndim);
115+
printf("data size = %llu\n", (long long unsigned)data_size);
116+
--
117+
2.34.1
118+

checkpoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
git add .
2+
git commit -m "checkpoint"

close_server.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
pushd ./build/bin
4+
./close_server
5+
popd

compile_commands.json

Lines changed: 772 additions & 0 deletions
Large diffs are not rendered by default.

complete_rebuild.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
rm -rf ./build/*
4+
5+
pushd build
6+
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=$PDC_DIR -DPDC_ENABLE_MPI=ON -DMERCURY_DIR=$MERCURY_DIR -DCMAKE_C_COMPILER=mpicc -DMPI_RUN_CMD=mpiexec ..
7+
make -j$(nproc)
8+
cp compile_commands.json ..
9+
popd

examples/read_write_col_perf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ main(int argc, char **argv)
117117

118118
char hostname[256];
119119
gethostname(hostname, 256);
120+
strcpy(hostname, "eno1");
120121
if (rank == 0) {
121122
printf("number of dimensions in this test is %d\n", ndim);
122123
printf("data size = %llu\n", (long long unsigned)data_size);

examples/read_write_perf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ main(int argc, char **argv)
111111
#endif
112112
char hostname[256];
113113
gethostname(hostname, 256);
114+
strcpy(hostname, "eno1");
114115
if (rank == 0) {
115116
printf("number of dimensions in this test is %d\n", ndim);
116117
printf("data size = %llu\n", (long long unsigned)data_size);

mpi_run_client.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
./rebuild.sh # Rebuild project
4+
5+
pushd ./build/bin || exit 1 # Exit if cd fails
6+
mpirun -np $1 "./transform_write_data_in_1D"
7+
popd
8+

rebuild.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
pushd build
4+
make -j$(nproc)
5+
popd

run_client.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
./rebuild.sh # Rebuild project
4+
5+
pushd ./build/bin || exit 1 # Exit if cd fails
6+
"./sandbox"
7+
popd
8+

0 commit comments

Comments
 (0)