Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Missing include for time.h in reduce_stddev.c #115

Copy link
Copy link
@melroy-tellis

Description

@melroy-tellis
Issue body actions

The reduce_stddev.c example is missing an include directive for the header <time.h>.

Running make results in the following error:

reduce_stddev.c: In function ‘main’:
reduce_stddev.c:43:9: error: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
   43 |   srand(time(NULL)*world_rank); // Seed the random number generator of processes uniquely
      |         ^~~~
reduce_stddev.c:15:1: note: ‘time’ is defined in header ‘<time.h>’; this is probably fixable by adding ‘#include <time.h>’
   14 | #include <assert.h>
  +++ |+#include <time.h>
   15 | 
make: *** [makefile:10: reduce_stddev] Error 1```
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.