Re: Does OpenMP (iomp5) work for clang-devel?
On 21/07/2015 18:06, Shane Ambler wrote: On 21/07/2015 10:59, Dennis Glatting wrote: On Tue, 2015-07-21 at 01:07 +, Brooks Davis wrote: On Mon, Jul 20, 2015 at 05:48:58PM -0700, Dennis Glatting wrote: I can't seem to get this working and it appears not to emit code. I have libiomp5 installed and I compile specifying: clang++-devel -fopenmp=libiomp5 ... And the compiler says: clang: warning: argument unused during compilation: '-fopenmp=libiomp5' That should be just -fopenmp From http://blog.llvm.org/2015/05/openmp-support_22.html To enable OpenMP, just add ‘-fopenmp’ to the command line and provide paths to OpenMP headers and library with ‘-I path to omp.h -L LLVM OpenMP library path’. Having just installed devel/llvm37 and done a few tests, this doesn't appear to happen, for a single file test I also need to add -lomp clang37 -fopenmp -I/usr/local/llvm37/include -L/usr/local/llvm37/lib -lomp omp.c -o omp-test One issue is that lldb breaks qtcreator. Sounds odd but I get - [leader:~] shane% qtcreator QProcess: Destroyed while process (/usr/local/bin/lldb-mi-devel) is still running. QProcess: Destroyed while process (/usr/local/bin/lldb-mi37) is still running. Broken pipe [leader:~] shane% If I rename the two binaries reported qtcreator runs fine. qtcreator-3.4.0 - rebuilt while llvm37 was installed without change. My main interest in openmp is for compiling graphics/blender. This breaks llvm37 - I am running 10-stable - FreeBSD leader.local 10.2-PRERELEASE FreeBSD 10.2-PRERELEASE #16 r285937: Tue Jul 28 20:58:13 ACST 2015 root@leader.local:/usr/obj/usr/src/sys/GENERIC amd64 % pkg info -ox llvm37 llvm37-3.7.0.r1devel/llvm37 Adding to make.conf - .if ${.CURDIR:M*/graphics/blender*} CC=clang37 CXX=clang++37 CPP=clang-cpp37 .endif The build ends with - [ 42%] Building C object source/blender/editors/datafiles/CMakeFiles/bf_editor_datafiles.dir/__/__/__/__/release/datafiles/matcaps/mc04.jpg.c.o Assertion failed: (!DMEntry Decl already exists in localdeclmap!), function EmitAutoVarAlloca, file /wrkdirs/usr/ports/devel/llvm37/work/llvm-3.7.0rc1.src/tools/clang/lib/CodeGen/CGDecl.cpp, line 1016. [ 42%] Building C object source/blender/bmesh/CMakeFiles/bf_bmesh.dir/operators/bmo_create.c.o clang-3.7: error: unable to execute command: Abort trap clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.7.0 (tags/RELEASE_370/rc1) Target: x86_64-unknown-freebsd10.2 Thread model: posix clang-3.7: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-3.7: note: diagnostic msg: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-3.7: note: diagnostic msg: /tmp/BLI_kdopbvh-8090d7.c clang-3.7: note: diagnostic msg: /tmp/BLI_kdopbvh-8090d7.sh clang-3.7: note: diagnostic msg: Full build log and debug files are available at http://shaneware.biz/freebsddebugdata/clang37/ Brooks, I haven't submitted this upstream but can if you want. -- FreeBSD - the place to B...Software Developing Shane Ambler ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Does OpenMP (iomp5) work for clang-devel?
On Wed, Aug 05, 2015 at 10:21:26PM +0930, Shane Ambler wrote: On 21/07/2015 18:06, Shane Ambler wrote: On 21/07/2015 10:59, Dennis Glatting wrote: On Tue, 2015-07-21 at 01:07 +, Brooks Davis wrote: On Mon, Jul 20, 2015 at 05:48:58PM -0700, Dennis Glatting wrote: I can't seem to get this working and it appears not to emit code. I have libiomp5 installed and I compile specifying: clang++-devel -fopenmp=libiomp5 ... And the compiler says: clang: warning: argument unused during compilation: '-fopenmp=libiomp5' That should be just -fopenmp From http://blog.llvm.org/2015/05/openmp-support_22.html To enable OpenMP, just add ???-fopenmp to the command line and provide paths to OpenMP headers and library with ???-I path to omp.h -L LLVM OpenMP library path. Having just installed devel/llvm37 and done a few tests, this doesn't appear to happen, for a single file test I also need to add -lomp clang37 -fopenmp -I/usr/local/llvm37/include -L/usr/local/llvm37/lib -lomp omp.c -o omp-test Hmm, I hadn't tested openmp yet. I had hoped that setting the cmake variable to default to libomp has sufficient but apparently it isn't. I'd like to get -fopenmp working on it's own, but probably won't have a whole lot of time to push this forward. One issue is that lldb breaks qtcreator. Sounds odd but I get - [leader:~] shane% qtcreator QProcess: Destroyed while process (/usr/local/bin/lldb-mi-devel) is still running. QProcess: Destroyed while process (/usr/local/bin/lldb-mi37) is still running. Broken pipe [leader:~] shane% If I rename the two binaries reported qtcreator runs fine. qtcreator-3.4.0 - rebuilt while llvm37 was installed without change. This looks like qtcreator is being too smart for it's own good and is using two versions of lldb at the same time. That seems likely to not work. My main interest in openmp is for compiling graphics/blender. This breaks llvm37 - I am running 10-stable - FreeBSD leader.local 10.2-PRERELEASE FreeBSD 10.2-PRERELEASE #16 r285937: Tue Jul 28 20:58:13 ACST 2015 root@leader.local:/usr/obj/usr/src/sys/GENERIC amd64 % pkg info -ox llvm37 llvm37-3.7.0.r1devel/llvm37 Adding to make.conf - .if ${.CURDIR:M*/graphics/blender*} CC=clang37 CXX=clang++37 CPP=clang-cpp37 .endif The build ends with - [ 42%] Building C object source/blender/editors/datafiles/CMakeFiles/bf_editor_datafiles.dir/__/__/__/__/release/datafiles/matcaps/mc04.jpg.c.o Assertion failed: (!DMEntry Decl already exists in localdeclmap!), function EmitAutoVarAlloca, file /wrkdirs/usr/ports/devel/llvm37/work/llvm-3.7.0rc1.src/tools/clang/lib/CodeGen/CGDecl.cpp, line 1016. [ 42%] Building C object source/blender/bmesh/CMakeFiles/bf_bmesh.dir/operators/bmo_create.c.o clang-3.7: error: unable to execute command: Abort trap clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.7.0 (tags/RELEASE_370/rc1) Target: x86_64-unknown-freebsd10.2 Thread model: posix clang-3.7: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-3.7: note: diagnostic msg: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-3.7: note: diagnostic msg: /tmp/BLI_kdopbvh-8090d7.c clang-3.7: note: diagnostic msg: /tmp/BLI_kdopbvh-8090d7.sh clang-3.7: note: diagnostic msg: Full build log and debug files are available at http://shaneware.biz/freebsddebugdata/clang37/ Brooks, I haven't submitted this upstream but can if you want. You might test with clang-devel first, but submitting this upstream is a good idea. I don't develop llvm myself so can't do anything particularly useful with crash reports. -- Brooks pgpsVPYbrf3Wl.pgp Description: PGP signature
Re: Does OpenMP (iomp5) work for clang-devel?
On 21/07/2015 10:59, Dennis Glatting wrote: On Tue, 2015-07-21 at 01:07 +, Brooks Davis wrote: On Mon, Jul 20, 2015 at 05:48:58PM -0700, Dennis Glatting wrote: I can't seem to get this working and it appears not to emit code. I have libiomp5 installed and I compile specifying: clang++-devel -fopenmp=libiomp5 ... And the compiler says: clang: warning: argument unused during compilation: '-fopenmp=libiomp5' That should be just -fopenmp From http://blog.llvm.org/2015/05/openmp-support_22.html To enable OpenMP, just add ‘-fopenmp’ to the command line and provide paths to OpenMP headers and library with ‘-I path to omp.h -L LLVM OpenMP library path’. The most recent clang-devel port doesn't include the bits to make iomp support automatic (it came not long after the update). I'm working on a update, but the ability to build clang and llvm separately appears to have been broken quite badly so it's taking a while and the only port to install will be devel/llvm-devel. That will be great, been waiting for this. -- FreeBSD - the place to B...Software Developing Shane Ambler ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Does OpenMP (iomp5) work for clang-devel?
On Tue, 2015-07-21 at 01:07 +, Brooks Davis wrote: On Mon, Jul 20, 2015 at 05:48:58PM -0700, Dennis Glatting wrote: I can't seem to get this working and it appears not to emit code. I have libiomp5 installed and I compile specifying: clang++-devel -fopenmp=libiomp5 ... And the compiler says: clang: warning: argument unused during compilation: '-fopenmp=libiomp5' The most recent clang-devel port doesn't include the bits to make iomp support automatic (it came not long after the update). I'm working on a update, but the ability to build clang and llvm separately appears to have been broken quite badly so it's taking a while and the only port to install will be devel/llvm-devel. Simple programs to work if you link with -liomp5 manually. They link but aren't OpenMP: root@Tasha# cat foo.cc #include omp.h #include stdio.h int main( void ) { printf( max=%d\n, omp_get_max_threads()); #pragma omp parallel for for( int i = 0; i 5; ++i ) { printf( tid=%d\n, omp_get_thread_num()); } return 0; } root@Tasha# clang++-devel -fopenmp -liomp5 foo.cc -L /usr/local/llvm-devel/lib/ root@Tasha# ./a.out max=8 tid=0 tid=0 tid=0 tid=0 tid=0 I have a couple of blocks under GNURadio (3.7.7.1) that need OpenMP, and run under Ubuntu. I'd like to get them running on the minnowboard (FreeBSD10) and they already run on the Cubieboard4 (some version of Ubuntu gunk). Unfortunately not all of GNURadio's dependencies compile with using GCC49/5 under FreeBSD. Is there a compile-time test involved somewhere, perhaps in llvm build? Assuming I manage to include the openmp runtime in the next update, I think it will work and I plan to configure the Kewlness. Thanks. Should /usr/local/llvm-devel/lib/ be in /etc/ld.so.conf? (That doesn't seem to help). ldconfig should be handled correctly by the ports infrastructure. -- Brooks ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Does OpenMP (iomp5) work for clang-devel?
I can't seem to get this working and it appears not to emit code. I have libiomp5 installed and I compile specifying: clang++-devel -fopenmp=libiomp5 ... And the compiler says: clang: warning: argument unused during compilation: '-fopenmp=libiomp5' Is there a compile-time test involved somewhere, perhaps in llvm build? Should /usr/local/llvm-devel/lib/ be in /etc/ld.so.conf? (That doesn't seem to help). ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Does OpenMP (iomp5) work for clang-devel?
On Mon, Jul 20, 2015 at 05:48:58PM -0700, Dennis Glatting wrote: I can't seem to get this working and it appears not to emit code. I have libiomp5 installed and I compile specifying: clang++-devel -fopenmp=libiomp5 ... And the compiler says: clang: warning: argument unused during compilation: '-fopenmp=libiomp5' The most recent clang-devel port doesn't include the bits to make iomp support automatic (it came not long after the update). I'm working on a update, but the ability to build clang and llvm separately appears to have been broken quite badly so it's taking a while and the only port to install will be devel/llvm-devel. Simple programs to work if you link with -liomp5 manually. Is there a compile-time test involved somewhere, perhaps in llvm build? Assuming I manage to include the openmp runtime in the next update, I think it will work and I plan to configure the Should /usr/local/llvm-devel/lib/ be in /etc/ld.so.conf? (That doesn't seem to help). ldconfig should be handled correctly by the ports infrastructure. -- Brooks pgpmrEZx_NKOU.pgp Description: PGP signature