[Wien] asking for help
Nguyen Leanh
nguyen_leanh at yahoo.com
Sun Mar 27 09:09:26 CEST 2005
Hi every one.
I had downloaded Inter C compiler 8, and want to make a test programming in OpenMP with Microsoft Visual C6. Could any one help me to make a project, and send it to me. Take the example as below.
(I had found it in http://www.llnl.gov/computing/tutorials/openMP/)
Many many thanks, and waiting for reply.
Nguyen Leanh.
#include <omp.h>
main () {
int nthreads, tid;
/* Fork a team of threads giving them their own copies of variables */
#pragma omp parallel private(tid)
{
/* Obtain and print thread id */
tid = omp_get_thread_num();
printf("Hello World from thread = %d\n", tid);
/* Only master thread does this */
if (tid == 0)
{
nthreads = omp_get_num_threads();
printf("Number of threads = %d\n", nthreads);
}
} /* All threads join master thread and terminate */
}
Nguyen Leanh
---------------------------------
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20050327/a17a8473/attachment.html
More information about the Wien
mailing list