From owner-freebsd-ports@freebsd.org Tue Jul 21 01:30:10 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3A789A70D6 for ; Tue, 21 Jul 2015 01:30:10 +0000 (UTC) (envelope-from freebsd@pki2.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7FDBE101 for ; Tue, 21 Jul 2015 01:30:10 +0000 (UTC) (envelope-from freebsd@pki2.com) Received: by mailman.ysv.freebsd.org (Postfix) id 7ECB39A70D5; Tue, 21 Jul 2015 01:30:10 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6462C9A70D4 for ; Tue, 21 Jul 2015 01:30:10 +0000 (UTC) (envelope-from freebsd@pki2.com) Received: from btw.pki2.com (btw.pki2.com [IPv6:2001:470:a:6fd::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 316E8100; Tue, 21 Jul 2015 01:30:10 +0000 (UTC) (envelope-from freebsd@pki2.com) Received: from localhost (localhost [IPv6:::1]) by btw.pki2.com (8.14.9/8.14.9) with ESMTP id t6L1TuZj059204; Mon, 20 Jul 2015 18:29:56 -0700 (PDT) (envelope-from freebsd@pki2.com) DMARC-Filter: OpenDMARC Filter v1.3.1 btw.pki2.com t6L1TuZj059204 Authentication-Results: btw.pki2.com; dmarc=none header.from=pki2.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pki2.com; s=pki2; t=1437442196; bh=SHvyshi19Vk5YMF5tMMEBBiS8oe+NTzZDfB5BMRmPsg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; z=Subject:=20Re:=20Does=20OpenMP=20(iomp5)=20work=20for=20clang-dev el?|From:=20Dennis=20Glatting=20|To:=20Brooks=20 Davis=20|Cc:=20ports@freebsd.org|Date:=20Mon,= 2020=20Jul=202015=2018:29:56=20-0700|In-Reply-To:=20<2015072101072 7.GA64147@spindle.one-eyed-alien.net>|References:=20<1437439738.57 135.5.camel@pki2.com>=0D=0A=09=20<20150721010727.GA64147@spindle.o ne-eyed-alien.net>; b=CPaDAYM/X+IYRyjSg6lY7Ex6MF56zb3JfDmsDxC0KYOzUzRm5YS5bpSz1vxbh15qr tB8C7yrPt24GH2X3ogsT9lSNrlwYtf5LBuvPmAeuQoDRgUcdss9AjQ6fpb+o5GACdL CHUqLYkDp7eTE4KgRu16LqG3z2fpZSaNFxwWYWIwUyhuIodptNjg4PSi0edZwFUM7j Kd+21N4wU3qwtJODtyjsj2753/BbLABxfP8SCE6iWqIGm2xzekVSH8QnMzdfzCkqDv ixxq8iob8iQ3krPMOjZjGJUBwDWGVOzpv/OefQ748NAKacHV5kFDKxX0hLmbY5mvHh caW2N/FlWS7WQ== Message-ID: <1437442196.57135.13.camel@pki2.com> Subject: Re: Does OpenMP (iomp5) work for clang-devel? From: Dennis Glatting To: Brooks Davis Cc: ports@freebsd.org Date: Mon, 20 Jul 2015 18:29:56 -0700 In-Reply-To: <20150721010727.GA64147@spindle.one-eyed-alien.net> References: <1437439738.57135.5.camel@pki2.com> <20150721010727.GA64147@spindle.one-eyed-alien.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SoftwareMunitions-MailScanner-Information: Dennis Glatting X-SoftwareMunitions-MailScanner-ID: t6L1TuZj059204 X-SoftwareMunitions-MailScanner: Found to be clean X-MailScanner-From: freebsd@pki2.com X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2015 01:30:10 -0000 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=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 #include 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