Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
pi
Commits
50ed58e8
Commit
50ed58e8
authored
5 years ago
by
Neil Gershenfeld
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
08739f7e
No related branches found
No related tags found
No related merge requests found
Pipeline
#3945
passed
5 years ago
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MPI/mpipi.c
+2
-2
2 additions, 2 deletions
MPI/mpipi.c
MPI/mpipi2.c
+1
-1
1 addition, 1 deletion
MPI/mpipi2.c
with
3 additions
and
3 deletions
MPI/mpipi.c
+
2
−
2
View file @
50ed58e8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include
<mpi.h>
#include
<mpi.h>
#include
<sys/time.h>
#include
<sys/time.h>
#define NPTS 1000000000
#define NPTS 1000000000
0
void
main
(
int
argc
,
char
**
argv
)
{
void
main
(
int
argc
,
char
**
argv
)
{
int
rank
,
nproc
,
i
,
istart
,
iend
;
int
rank
,
nproc
,
i
,
istart
,
iend
;
...
@@ -31,7 +31,7 @@ void main(int argc, char** argv) {
...
@@ -31,7 +31,7 @@ void main(int argc, char** argv) {
start_time
=
start
.
tv_sec
*
1e6
+
start
.
tv_usec
;
start_time
=
start
.
tv_sec
*
1e6
+
start
.
tv_usec
;
end_time
=
end
.
tv_sec
*
1e6
+
end
.
tv_usec
;
end_time
=
end
.
tv_sec
*
1e6
+
end
.
tv_usec
;
mflops
=
NPTS
*
(
5
.
0
/
(
end_time
-
start_time
));
mflops
=
NPTS
*
(
5
.
0
/
(
end_time
-
start_time
));
printf
(
"processes = %d, NPTS = %d, pi = %f
\n
"
,
nproc
,
NPTS
,
pi
);
printf
(
"processes = %d, NPTS = %
l
d, pi = %f
\n
"
,
nproc
,
NPTS
,
pi
);
printf
(
"time = %f, estimated MFlops = %f
\n
"
,(
end_time
-
start_time
)
/
1.0e6
,
mflops
);
printf
(
"time = %f, estimated MFlops = %f
\n
"
,(
end_time
-
start_time
)
/
1.0e6
,
mflops
);
}
}
else
{
else
{
...
...
This diff is collapsed.
Click to expand it.
MPI/mpipi2.c
+
1
−
1
View file @
50ed58e8
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include
<sys/time.h>
#include
<sys/time.h>
#include
<stdint.h>
#include
<stdint.h>
#define NPTS 100000000
#define NPTS 100000000
00
#define NLOOP 10
#define NLOOP 10
void
main
(
int
argc
,
char
**
argv
)
{
void
main
(
int
argc
,
char
**
argv
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment