ex3: task 8

This commit is contained in:
2025-09-22 19:46:32 +02:00
parent ad41c944b3
commit 7c00bf20bf

View File

@@ -50,6 +50,8 @@ real_t
// Save the present time step in a numbered file under 'data/'.
void domain_save(int_t step) {
// BEGIN: T8
if (comm_rank != ROOT)
return;
char filename[256];
sprintf(filename, "data/%.5ld.dat", step);
FILE *out = fopen(filename, "wb");