Skip to content

Commit 9a139c6

Browse files
committed
merge
2 parents 5bdc072 + 89268e8 commit 9a139c6

File tree

244 files changed

+7427
-9311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+7427
-9311
lines changed

.github/workflows/dependencies-linux.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -eu -o pipefail
44

55
sudo apt-get update
6-
sudo apt-get install libopenmpi-dev libhdf5-dev uuid-dev
6+
sudo apt-get install libopenmpi-dev libhdf5-dev uuid-dev cmake
77

88
# libfabric
99
wget https://github.com/ofiwg/libfabric/archive/refs/tags/v1.12.1.tar.gz
@@ -18,8 +18,8 @@ cd ..
1818
# Mercury
1919
git clone --recursive https://github.com/mercury-hpc/mercury.git
2020
cd mercury
21-
git checkout v2.1.0
21+
git checkout v2.2.0
2222
mkdir build && cd build
23-
cmake ../ -DCMAKE_C_COMPILER=gcc -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DNA_USE_OFI=ON -DNA_USE_SM=OFF -DMERCURY_USE_CHECKSUMS=OFF
23+
cmake ../ -DCMAKE_C_COMPILER=gcc -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DNA_USE_OFI=ON -DNA_USE_SM=OFF -DMERCURY_USE_CHECKSUMS=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5
2424
make -j2 && sudo make install
2525
ctest

.github/workflows/nersc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: NERSC
22

33
on:
4-
pull_request
4+
pull_request_target
55

66
env:
77
PR_NUMBER: ${{ github.event.number }}

.github/workflows/ubuntu-cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Build PDC
2424
run: |
2525
mkdir build && cd build
26-
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=ON -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc
26+
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=ON -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_POLICY_VERSION_MINIMUM=3.5
2727
make -j2
2828
2929
- name: Test PDC

.github/workflows/ubuntu-no-cache.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Build PDC
2424
run: |
2525
mkdir build && cd build
26-
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=OFF -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc
26+
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=OFF -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_POLICY_VERSION_MINIMUM=3.5
2727
make -j2
2828
2929
- name: Test PDC

docs/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
- Input:
6969
+ pdc_name is the reference for PDC class. Recommended use "pdc"
7070
- Output:
71-
+ PDC class ID used for future reference.
71+
+ PDC class ID used for future reference or 0 on failure.
7272
- All PDC client applications must call PDCinit before using it. This function will setup connections from clients to servers. A valid PDC server must be running.
7373
- For developers: currently implemented in pdc.c.
7474
+ perr_t PDCclose(pdcid_t pdcid)

docs/source/developer-notes.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22
Developer Notes
33
================================
44

5+
+++++++++++++++++++++++++++++++++++++++++++++
6+
PDC Logging
7+
+++++++++++++++++++++++++++++++++++++++++++++
8+
9+
The following macros are defined in the header file `src/commons/logging/include/pdc_logger.h` and should be used instead of `printf` for logging.
10+
11+
The available macros, which follow a similar usage to `printf`, are:
12+
13+
.. code-block:: C
14+
LOG_ERROR
15+
LOG_WARNING
16+
LOG_INFO
17+
LOG_DEBUG
18+
LOG_JUST_PRINT
19+
20+
Each of these macros automatically prepends a timestamp and log level prefix to the output:
21+
22+
.. code-block:: C
23+
[year-month-day hour:minute:second] [ERROR]
24+
[year-month-day hour:minute:second] [WARNING]
25+
[year-month-day hour:minute:second] [INFO]
26+
[year-month-day hour:minute:second] [DEBUG]
27+
28+
`LOG_JUST_PRINT` does not print a prefix and outputs the message as-is. This macro is useful when you need to print raw messages without log metadata.
529

630
+++++++++++++++++++++++++++++++++++++++++++++
731
PDC Server Metadata Management

examples/C_plus_plus_example/H5Timing.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ static int record_timer(std::vector<H5Timer> *timer, const char* filename) {
185185

186186
static int output_results() {
187187
#ifdef PDC_PATCH
188-
printf("total PDCwrite calls = %d, PDCread calls = %d\n", timer_class->PDCwrite_count, timer_class->PDCread_count);
188+
LOG_INFO("total PDCwrite calls = %d, PDCread calls = %d\n", timer_class->PDCwrite_count, timer_class->PDCread_count);
189189
#else
190-
printf("total H5Dwrite calls = %d, H5Dread calls = %d\n", timer_class->H5Dwrite_count, timer_class->H5Dread_count);
190+
LOG_INFO("total H5Dwrite calls = %d, H5Dread calls = %d\n", timer_class->H5Dwrite_count, timer_class->H5Dread_count);
191191
#endif
192192
if ( timer_class->dataset_timers->size() ) {
193193
record_timer(timer_class->dataset_timers, "dataset_write_record.csv");
@@ -211,10 +211,10 @@ int finalize_timers() {
211211
gettimeofday(&temp_time, NULL);
212212
timer_class->total_end_time = (temp_time.tv_usec + temp_time.tv_sec * 1000000) + .0;
213213
#ifdef PDC_PATCH
214-
printf("total program time is %lf, PDCstart time = %lf, PDCwait time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->PDCstart_time / 1000000.0, timer_class->PDCwait_time / 1000000.0);
214+
LOG_INFO("total program time is %lf, PDCstart time = %lf, PDCwait time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->PDCstart_time / 1000000.0, timer_class->PDCwait_time / 1000000.0);
215215
#else
216-
printf("total program time is %lf, H5Dwrite time = %lf, H5Dread time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->H5Dwrite_time / 1000000.0, timer_class->H5Dread_time / 1000000.0);
217-
printf("merge requests time = %lf, wrap requests time = %lf, H5Dclose = %lf\n", timer_class->merge_requests_time / 1000000.0, timer_class->wrap_requests_time / 1000000.0, timer_class->H5Dclose_time / 1000000.0);
216+
LOG_INFO("total program time is %lf, H5Dwrite time = %lf, H5Dread time = %lf\n", (timer_class->total_end_time - timer_class->total_start_time) / 1000000.0, timer_class->H5Dwrite_time / 1000000.0, timer_class->H5Dread_time / 1000000.0);
217+
LOG_INFO("merge requests time = %lf, wrap requests time = %lf, H5Dclose = %lf\n", timer_class->merge_requests_time / 1000000.0, timer_class->wrap_requests_time / 1000000.0, timer_class->H5Dclose_time / 1000000.0);
218218
#endif
219219
free(timer_class);
220220

examples/C_plus_plus_example/multidataset_plugin.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ int flush_multidatasets() {
276276
double start_time;
277277
#endif
278278
i = 0;
279-
//printf("Rank %d number of datasets to be written %d\n", rank, dataset_size);
279+
LOG_DEBUG("Rank %d number of datasets to be written %d\n", rank, dataset_size);
280280
#if ENABLE_MULTIDATASET==1
281281
#ifdef H5_TIMING_ENABLE
282282
increment_H5Dwrite();
@@ -319,7 +319,7 @@ int flush_multidatasets() {
319319

320320
free(multi_datasets_temp);
321321
#else
322-
//printf("rank %d has dataset_size %lld\n", rank, (long long int) dataset_size);
322+
LOG_DEBUG("rank %d has dataset_size %lld\n", rank, (long long int) dataset_size);
323323
#ifdef PDC_PATCH
324324

325325
if (cached_objs.size()) {
@@ -362,7 +362,7 @@ int flush_multidatasets() {
362362
offset_length = new_end[j] - new_start[j];
363363
pdcid_t reg = PDCregion_create(1, &offset, &offset_length);
364364
pdcid_t transfer_request_id = PDCregion_transfer_create(ptr, PDC_WRITE, it->second->did, reg, reg);
365-
//printf("did = %lu, starting request offset = %lu, size = %lu, j = %d\n", it->second->did, offset, offset_length, j);
365+
LOG_DEBUG("did = %lu, starting request offset = %lu, size = %lu, j = %d\n", it->second->did, offset, offset_length, j);
366366
PDCregion_transfer_start(transfer_request_id);
367367
PDCregion_transfer_wait(transfer_request_id);
368368

examples/C_plus_plus_example/region_transfer_1D_append.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ main(int argc, char **argv)
5858
}
5959
sprintf(data_name, "data0_%d", rank);
6060

61-
printf("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
61+
LOG_INFO("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
6262
for ( i = 0; i < ARRAY_SIZE; ++i ) {
6363
register_multidataset_request_append(data_name, 0, data, sizeof(int) * DATA_SIZE, H5T_NATIVE_CHAR);
6464
}
6565

6666
sprintf(data_name, "data1_%d", rank);
6767

68-
printf("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
68+
LOG_INFO("rank %d C++ example for writing %d lists of arrays with size %d\n", rank, ARRAY_SIZE, DATA_SIZE);
6969
for ( i = 0; i < ARRAY_SIZE; ++i ) {
7070
register_multidataset_request_append(data_name, 0, data, sizeof(int) * DATA_SIZE, H5T_NATIVE_CHAR);
7171
}

0 commit comments

Comments
 (0)