Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 2015 16:08:06 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Shane Ambler <FreeBSD@ShaneWare.Biz>
Cc:        Brooks Davis <brooks@freebsd.org>, ports@freebsd.org
Subject:   Re: Does OpenMP (iomp5) work for clang-devel?
Message-ID:  <20150805160806.GB30265@spindle.one-eyed-alien.net>
In-Reply-To: <55C206CE.2070904@ShaneWare.Biz>
References:  <1437439738.57135.5.camel@pki2.com> <20150721010727.GA64147@spindle.one-eyed-alien.net> <1437442196.57135.13.camel@pki2.com> <55AE0474.5050207@ShaneWare.Biz> <55C206CE.2070904@ShaneWare.Biz>

next in thread | previous in thread | raw e-mail | index | archive | help

--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 +0000, 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=3Dlibiomp5 ...
> >>>>
> >>>> And the compiler says:
> >>>>
> >>>>   clang: warning: argument unused during compilation:
> >>>> '-fopenmp=3Dlibiomp5'
> >
> > 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>????????.
>=20
> 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
>=20
> 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 variab=
le
to default to libomp has sufficient but apparently it isn't.  I'd like to g=
et
-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 -
>=20
> [leader:~] shane% qtcreator
> QProcess: Destroyed while process ("/usr/local/bin/lldb-mi-devel") is=20
> still running.
> QProcess: Destroyed while process ("/usr/local/bin/lldb-mi37") is still=
=20
> running.
> Broken pipe
> [leader:~] shane%
>=20
> 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 -
>=20
> I am running 10-stable -
> FreeBSD leader.local 10.2-PRERELEASE FreeBSD 10.2-PRERELEASE #16=20
> r285937: Tue Jul 28 20:58:13 ACST 2015=20
> root@leader.local:/usr/obj/usr/src/sys/GENERIC  amd64
>=20
> % pkg info -ox llvm37
> llvm37-3.7.0.r1                devel/llvm37
>=20
> Adding to make.conf -
> .if ${.CURDIR:M*/graphics/blender*}
> CC=3Dclang37
> CXX=3Dclang++37
> CPP=3Dclang-cpp37
> .endif
>=20
> The build ends with -
>=20
> [ 42%] Building C object=20
> source/blender/editors/datafiles/CMakeFiles/bf_editor_datafiles.dir/__/__=
/__/__/release/datafiles/matcaps/mc04.jpg.c.o
> Assertion failed: (!DMEntry && "Decl already exists in localdeclmap!"),=
=20
> function EmitAutoVarAlloca, file=20
> /wrkdirs/usr/ports/devel/llvm37/work/llvm-3.7.0rc1.src/tools/clang/lib/Co=
deGen/CGDecl.cpp,=20
> line 1016.
> [ 42%] Building C object=20
> 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=
=20
> 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=20
> http://llvm.org/bugs/ and include the crash backtrace, preprocessed=20
> source, and associated run script.
> clang-3.7: note: diagnostic msg:
> ********************
>=20
> 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:
>=20
> ********************
>=20
> Full build log and debug files are available at
> http://shaneware.biz/freebsddebugdata/clang37/
>=20
> 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

--0OAP2g/MAC+5xKAE
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVwjTlAAoJEKzQXbSebgfAHtYH/1b5hXIUNr9AkqtwNO+DJHIX
TAiocd1LuxSzDkWSWiVX3rc+E2IKVhqTNC4SUEPNJ+/6Oe7Kj8ONtAOOPgf5m2XS
tXvoAE51e4jxyyka2kiHT9lokNuf8SYgL90eAITOAUYkCUykruhbQ68j3QupVg2L
hwgn5JHQiu68lzjSRuRhiAVXEwtxFXSant0NlFvLxAv3UwPswc6fTu33l4Eg3Vnj
miiKmziUYm7rDYJ7r3+bw9O/jQqU6IOAttLlZE8c6cCTiB3C/x+usIU+o+yyI4l5
b0MQf4pvzO59Vppmz4rjnBnGqHY5rUacKGkf9n4s1mBSKbnOK4wT4eIgLIau41g=
=z31g
-----END PGP SIGNATURE-----

--0OAP2g/MAC+5xKAE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150805160806.GB30265>