Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92947782
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
Mon, Nov 25, 01:41
Size
421 B
Mime Type
text/x-c
Expires
Wed, Nov 27, 01:41 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22543733
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