On Wed, 2 Feb 2011, Kishore Kumar Pusukuri wrote:

Hi, I have been compiling and running OpenMP parallel programs successfully so far on my OpenSolaris.2009.10 machine. However I am unable to run one program with more than one thread(lwp). Please see details of the program below. Please let me know if there is anything wrong with the compilation or running this particular program. I am using the following command line arguments to run the program and I am using g++-4.2.3 to compile the program with "-fopenmp" option and also linked libmtsk.so.1. There are no compilation warnings/errors.

You don't want to link against libmtsk.so.1. That is the library used by Sun's OpenMP implementation. You want to link against libgomp, which is the GCC OpenMP implementation. Mixing these two in the same program is probably a very bad idea since they define many similar symbols. When you use GCC to link a program with the "-fopenmp" option, it will automatically link against libgomp.

Bob


$env OMP_NUM_THREADS=8 <myprogram>

$ ldd <myprogram>
libmtsk.so.1 =>  /lib/libmtsk.so.1
libstdc++.so.6 =>        /usr/lib/libstdc++.so.6
libm.so.2 =>     /lib/libm.so.2
libgomp.so.1 =>  /usr/lib/libgomp.so.1
libgcc_s.so.1 =>         /usr/lib/libgcc_s.so.1
libpthread.so.1 =>       /lib/libpthread.so.1
libc.so.1 =>     /lib/libc.so.1
libthread.so.1 =>        /lib/libthread.so.1
libdl.so.1 =>    /lib/libdl.so.1


--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to