Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nieklinnenbank committed Oct 19, 2015
2 parents f8cd873 + 70112f2 commit 6ccb245
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions bin/mpiprime/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,13 @@ int main(int argc, char **argv)
// Free resources
MPI_Finalize();
free(map);
gettimeofday(&t2, &tz);
printf("Finalize: ");
printtimediff(&t1, &t2);
printf("\n");

if (rank == 0)
{
gettimeofday(&t2, &tz);
printf("Finalize: ");
printtimediff(&t1, &t2);
printf("\n");
}
return EXIT_SUCCESS;
}
1 change: 1 addition & 0 deletions bin/prime/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <String.h>
#include <unistd.h>
#include <math.h>
#include <errno.h>

void search_sequential(int k, int n, unsigned *map, int argc, char **argv)
{
Expand Down
3 changes: 2 additions & 1 deletion lib/libposix/sys/time/printtimediff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <FreeNOS/API.h>
#include <sys/types.h>
#include <sys/time.h>
#include <errno.h>
#include <stdio.h>
#include <Types.h>

int printtimediff(struct timeval *t1, struct timeval *t2)
{
Expand Down

0 comments on commit 6ccb245

Please sign in to comment.