Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F66584487
hello.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jun 11, 14:41
Size
421 B
Mime Type
text/x-c
Expires
Thu, Jun 13, 14:41 (2 d)
Engine
blob
Format
Raw Data
Handle
18244018
Attached To
R11821 phys-743-lecture
hello.c
View Options
#include <stdio.h>
#if defined (_OPENMP)
#include <omp.h>
#endif
int
main
(
int
argc
,
char
*
argv
[])
{
int
myrank
=
0
;
int
mysize
=
1
;
#if defined (_OPENMP)
#pragma omp parallel default(shared) private(myrank, mysize)
{
mysize
=
omp_get_num_threads
();
myrank
=
omp_get_thread_num
();
#endif
printf
(
"Hello from thread %d out of %d
\n
"
,
myrank
,
mysize
);
#if defined (_OPENMP)
}
#endif
return
0
;
}
Event Timeline
Log In to Comment