sakurazuka
November 6th, 2009, 05:29 PM
Hello there!
I have this little app of mine that does some havy calculations and so I decided to split them into threads (because of long, triple loops which are easily parallelized). Anyway the result on my 2-core notebook pc running windows is normal - the work time of the app becomes 2 times shorter (2 threads). On the other hand the same app on this pc but running Linux (Ubuntu) crashes with segmentation fault. Another Unix (dunno exactly) machine with 8-opteron cores produces fastest results when only 1 thread is set and it becomes slower with the increase of thread number and I really have no idea why such a thing occurs? So I am asking for guidance in this matter :D.
Oh here are my compiler settings:
Unix:
g++ -fopenmp -c -Wall -O2 main.cpp custom.h
g++ -fopenmp -O2 qdots -o main.o -lgsl -lgslcblas
Under windows I add openMP support and /O2 optimization in project properties in MS VS. I supose the -fopenmp and -O2 directives are redundant under unix and It would be sufficient to state those options once - but I guess that can't harm anything, or can it?
Anyway - thanks!
Sakurazuka
I have this little app of mine that does some havy calculations and so I decided to split them into threads (because of long, triple loops which are easily parallelized). Anyway the result on my 2-core notebook pc running windows is normal - the work time of the app becomes 2 times shorter (2 threads). On the other hand the same app on this pc but running Linux (Ubuntu) crashes with segmentation fault. Another Unix (dunno exactly) machine with 8-opteron cores produces fastest results when only 1 thread is set and it becomes slower with the increase of thread number and I really have no idea why such a thing occurs? So I am asking for guidance in this matter :D.
Oh here are my compiler settings:
Unix:
g++ -fopenmp -c -Wall -O2 main.cpp custom.h
g++ -fopenmp -O2 qdots -o main.o -lgsl -lgslcblas
Under windows I add openMP support and /O2 optimization in project properties in MS VS. I supose the -fopenmp and -O2 directives are redundant under unix and It would be sufficient to state those options once - but I guess that can't harm anything, or can it?
Anyway - thanks!
Sakurazuka