openmp

Which parallel programming APIs do you use?

Trying to get a grip on how people are actually writing parallel code currently, considering the immense importance of multicore and multiprocessing hardware these days. To me, it looks like the dominant paradigm is pthreads (POSIX threads), which is native on Linux and available on Windows. HPC people tend to use OpenMP or MPI, but th...

segmentation fault using OMP

Hi, all! Typing from Italy This little piece of code works if the matrix size is less then 800 and fails with a segmentation fault for higher sizes.... I have tried it with gcc 4.3.2 compiler in linux and macosx and VisualStudio compiler in windows. Seemsthe problem is in the stack size..... how can I increase it ? How can I solve the pr...

Is there anything like OpenMP on Java?

Is there anything like OpenMP on Java? ...

OpenCL: does it play well with OpenMP, can I connect other languages to it, etc.

The 1.0 spec for OpenCL just came out a few days ago (Spec is here) and I've just started to read through it. I want to know if it plays well with other high performance multiprocessing APIs like OpenMP (spec) and I want to know what I should learn. So, here are my basic questions: If I am already using OpenMP, will that break OpenCL...

OpenMP: What is the difference between foo() and bar()

void foo(void) { #pragma omp parallel { #pragma omp single {fprintf(stderr, "first part\n"); } #pragma omp barrier #pragma omp single { fprintf(stderr, "second part\n"); } } } void bar (void) { #pragma omp parallel { #pragma omp sections { ...

C++ Parallelization Libraries: OpenMP vs. Thread Building Blocks

Hi, I'm going to retrofit my custom graphics engine so that it takes advantage of multicore CPUs. More exactly, I am looking for a library to parallelize loops. It seems to me that both OpenMP and Intel's Thread Building Blocks are very well suited for the job. Also, both are supported by Visual Studio's C++ compiler and most other po...

Missing OpenMP feature: Thread Priority

Anyone think about it. OpenMP features to adjust cpu muscles to handle dumbbel. In my research for openmp we cannot set thread priority to execute block code with powerfull muscle. Only one way(_beginthreadex or CreateThread function with 5. parameters) to create threads with highest priority. Here some code for this issue: This is m...

OpenMp Coding: warning: ignoring #pragma omp parallel

Hi, Iam getting this warning : warning: ignoring #pragma omp parallel during compilation of a C code with openmp directives on linux Gcc version is 4.4. Is this only a warning or the execution is in actual not in parallel.Need solution with a bit of some explanation. I have provide -fopenmp with make command , but gcc doesn't accept ...

'mpirun' is not recognized as an internal ort external commands,...

Hi all, I need to make a small openMP project. I took the example from the www.openmp.org. I can compile it with /openmp option within VC++ 2005. But, When I try to run the program, I am facing the "'mpirun' is not recognized as an internal ort external commands, operable program or batch file" error. When I search the net. I found this...

OpenMP parallelization on a recursive function

I'm trying to use parallelization to improve the refresh rate for drawing a 3D scene with heirarchically ordered objects. The scene drawing algorithm first recursively traverses the tree of objects, and from that, builds an ordered array of essential data that is needed to draw the scene. Then it traverses that array multiple times to dr...

OpenMP in Visual Studio 2005 Standard

I have used OpenMP with gcc for writing parallel code. I am now using Visual C++ 2005 and am trying to figure out how to use OpenMP. There is a compiler option in the Properties->C/C++/Language menu but then it complains the library is missing. Is there a 3rd party implementation for OpenMP or am i just configuring Visual C++ incorrectly...

OpenMP - terrible performance - a simple issue of overhead, or is there a program flaw? (C)

I have here what I understand to be a relatively simple OpenMP construct. The issue is that the program runs about 100-300x faster with 1 thread when compared to 2 threads. 87% of the program is spent in gomp_send_wait() and another 9.5% in gomp_send_post. The program gives correct results, but I wonder if there is a flaw in the cod...

Blocking functions using OpenMP

I have a GUI application, which listens to a network port from a second thread. I was looking at OpenMP and I was wondering if there are easy ways to create threads like this. I was searching for documentation, but the OpenMP site is not very convenient to navigate. Could someone help? ...

Parallelization: pthreads or OpenMP?

Most people in scientific computing use OpenMP as a quasi-standard when it comes to shared memory parallelization. Is there any reason (other than readability) to use OpenMP over pthreads? The latter seems more basic and I suspect it could be faster and easier to optimize. ...

Converting a parallel program to a cluster program. From OpenMP to ?

I want to write a code converter that takes an OpenMP based parallel program and runs it on a cluster. How do I go about this problem? What libraries do I use? How do I set up a small cluster for this? I'm finding it extremely hard to find good material about cluster computing on the internet. EDIT: If it's impossible then how does In...

OpenMp C++ algorithms for min, max, median, average

I was searching Google for a page offering some simple OpenMp algorithms. Probably there is an example to calculate min, max, median, average from a huge data array but I am not capable to find it. At least I would normally try to divide the array into one chunk for each core and do some boundary calculation afterwards to get the result...

Efficient way to save data to disk while running a computationally intensive task

Hi, I'm working on a piece of scientific software that is very cpu-intensive (its proc bound), but it needs to write data to disk fairly often (i/o bound). I'm adding parallelization to this (OpenMP) and I'm wondering what the best way to address the write-to-disk needs. There's no reason the simulation should wait on the HDD (which is...

Morphing multiple executables into a single application

I have three legacy applications that share a lot of source code and data. Multiple instances of each of these applications be executed by a user at any time, e.g. a dozen mixed application executions can be active at a time. These applications currently communicate through shared memory and messaging techniques so that they can maintain...

Ignore OpenMP on Machine that doesn't have it

Hi, I have a C++ program using OpenMP, which will run on several machines that may have or not have OpenMP installed. How could I make my program know if a machine has no OpenMP and ignore those "#include ", OpenMP directives (like "#pragma omp parallel ...") and/or library functions (like "tid = omp_get_thread_num();") ? Thanks and r...

How to tell if OpenMP works in my C++ program

Hi, I am using OpenMP to do multithreading with my nested loops. Since new to this stuff, I am not sure if I am using OpenMP in the correct way so that it can actually do the parallel programming. So I like to know if I can measure the performance of my C++ program that uses OpenMP so I can tell it actually works and I am on the right tr...