Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fork_HPC_Vehicle_Classification
m4labhpc
Commits
18160e81
Commit
18160e81
authored
4 years ago
by
61sima1bif@hft-stuttgart.de
Browse files
Options
Download
Email Patches
Plain Diff
added helloworld.c
parent
42df4d3e
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
helloworld.c
+16
-0
helloworld.c
with
16 additions
and
0 deletions
+16
-0
helloworld.c
0 → 100644
+
16
-
0
View file @
18160e81
#include
<stdio.h>
#include
<mpi.h>
int
main
(
int
argc
,
char
*
argv
[])
{
int
rank
,
size
;
MPI_Init
(
&
argc
,
&
argv
);
/* starts MPI */
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
/* get current process id */
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
size
);
/* get processor count*/
if
(
rank
==
0
)
printf
(
"Hello world from process %d of %d
\n
"
,
rank
,
size
);
else
printf
(
"Hello world from process %d of %d
\n
"
,
rank
,
size
);
sleep
(
1
);
MPI_Finalize
();
return
0
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets