From a8a0837e11d2eb1f93387971a62d57debdc8a59f Mon Sep 17 00:00:00 2001 From: yly Date: Mon, 17 Nov 2025 20:39:49 +0800 Subject: [PATCH] fix --- lab1/Makefile | 4 ++-- lab1/serial_pi.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lab1/Makefile b/lab1/Makefile index 8558e2c..9c8f5f6 100644 --- a/lab1/Makefile +++ b/lab1/Makefile @@ -10,10 +10,10 @@ TARGET := $(basename $(SRC)) all: $(TARGET) mpi_%: mpi_%.c - $(MPICC) $(CFLAGS) -o $@ $< + $(MPICC) $(CFLAGS) -o $@ $< serial_%: serial_%.c - $(CC) $(CFLAGS) -o $@ $< + $(CC) $(CFLAGS) -o $@ $< run: $(TARGET) $(MPIRUN) -np 4 ./$@ diff --git a/lab1/serial_pi.c b/lab1/serial_pi.c index c86b2b0..2eccfe3 100644 --- a/lab1/serial_pi.c +++ b/lab1/serial_pi.c @@ -30,6 +30,5 @@ int main(int argc, char **argv) { total = total * 4; printf("Result: %.10lf\n", total); printf("Accuracy: %.10lf\n", PI - total); - printf("Time: - %.10lf\n", (double)(time2 - time1)/CLOCKS_PER_SEC); + printf("Time: %.10lf\n", (double)(time2 - time1)/CLOCKS_PER_SEC); }