From b289946595bef8e7abacddbf36239d7796032101 Mon Sep 17 00:00:00 2001 From: adilger Date: Thu, 14 Aug 2003 17:41:21 +0000 Subject: [PATCH] Update header to give compilation and running instructions. --- lustre/tests/write_append_truncate.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lustre/tests/write_append_truncate.c b/lustre/tests/write_append_truncate.c index b0557bb..fd187da 100644 --- a/lustre/tests/write_append_truncate.c +++ b/lustre/tests/write_append_truncate.c @@ -10,6 +10,11 @@ * If the append happened first, we should have truncated the file down. * * We pick the CHUNK_SIZE_MAX and APPEND_SIZE_MAX so that we cross a stripe. + * + * compile: mpicc -g -Wall -o write_append_truncate write_append_truncate.c + * run: mpirun -np 2 -machlist write_append_truncate + * or: pdsh -w write_append_truncate + * or: prun -n 2 [-N 2] write_append_truncate */ #include #include @@ -130,8 +135,8 @@ int main(int argc, char *argv[]) trunc_offset = chunk_size + rand()%append_size; if (rank == 0) { if (n % 1000 == 0) - printf("loop %5d: chunk %6d/%#06x, " - "append %6d/%#06x, trunc @ %6d/%#06x\n", + printf("loop %5d: chunk %6d/%#07x, " + "append %6d/%#07x, trunc @ %6d/%#07x\n", n, chunk_size, chunk_size, append_size, append_size, trunc_offset, trunc_offset); @@ -251,8 +256,8 @@ int main(int argc, char *argv[]) if (rank == 0) { char command[4096]; - printf("loop %5d: chunk %6d/%#06x, " - "append %6d/%#06x, trunc @ %6d/%#06x\n", + printf("loop %5d: chunk %6d/%#07x, " + "append %6d/%#07x, trunc @ %6d/%#07x\n", n, chunk_size, chunk_size, append_size, append_size, trunc_offset, trunc_offset); @@ -264,7 +269,7 @@ int main(int argc, char *argv[]) } } - printf("Finished after %d loops\n", n); + printf("rank %d, loop %d: finished\n", rank, n); MPI_Finalize(); return 0; -- 1.8.3.1