Skip to content
Snippets Groups Projects
Commit de85cfe8 authored by Ft-N's avatar Ft-N
Browse files

Makefile

parent d17aa3b0
No related merge requests found
CC=mpicc
mpi : src/mpi.c
$(CC) -o prog src/mpi.c
clean :
rm prog
\ No newline at end of file
output.txt 0 → 100644
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -146,7 +146,7 @@ int main(int argc, char *argv[]) {
total_time = end_time - start_time;
if (rank == 0) {
printf("%f\n", total_time);
printf("%f µs\n", total_time*100000);
// Write to file
FILE *f = fopen("output.txt", "w");
for (int i = 0; i < N; i++) {
......
......@@ -106,9 +106,9 @@ int main(int argc, char *argv[]) {
}
time = clock() - time;
double time_taken = ((double)time)/CLOCKS_PER_SEC; // in seconds
double time_taken = ((double)time); // in seconds
printf("took %f seconds to execute \n", time_taken);
printf("%f µs\n", time_taken);
FILE *f = fopen("output.txt", "w");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment