From owner-freebsd-stable@freebsd.org Wed Aug 31 01:17:51 2016 Return-Path: Delivered-To: freebsd-stable@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 835E5BBCE7F for ; Wed, 31 Aug 2016 01:17:51 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E24BD0A for ; Wed, 31 Aug 2016 01:17:51 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-it0-x22b.google.com with SMTP id n75so18708997ith.1 for ; Tue, 30 Aug 2016 18:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yICR6fSSY/77Qk614BAmr7gZQQqmFF5LwGM/p4m3NVQ=; b=QdZIbbjx+XWkLk8sR+gJzX/A0CjRTLKdafJAMSeM+N5RPLSUslPI2Bzj89QeTkOv7P L/2ItzQaX2o35HpKcoZydZB1sWls3WHh+RBIx1eaTv4p3AEtGHaSwokiSafW4veRWUUo 0oY06f81Qr4jujc349XUOHSPpNFEJgdaKcTLs4iF6clCyvUVWoxYCRVhi2u8eN6doPyO c/EPvg6WE467oHHpWt2E7nh1sfsKv6L7OLAW0TMgflFTQl/fxcE+13OwPay2+KLCzLGA sfg7pswlp6u5/PTSrciPMmq+WkcT0feaJN6m3RWBPhUaVbxUA9DsEz88E1m8e6EWVJwt 8ncg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yICR6fSSY/77Qk614BAmr7gZQQqmFF5LwGM/p4m3NVQ=; b=NNcoX5AlQZz2imXI4NNFdcND4txqUPllTtf6HsQGtjfmZz51iRy9ODpWWa3sbKr3LW 3LW3QV/KKi0zAaePrSg8L0r1aObh79O+4n8+d7W9yOlQ0L6RKxdcRMErRoV9FqVEdJoU Jmutil5b6PQpV9x6Nb5tyCnfPl1OtkNoeOXQn09lXio6qDAysnWlZO5QXaF46kMbXd+s KRBG2aLzlvvvB1sQQ8JOnm2xNAkihBUgf02ti3DO+VReuyx8CN6nhOfzAxiLLK3cTI6c MUvCQNZlfJw57vSwRtaE9Qv5gmxT7DMCHYX+CmzERvhHVMuwsTL93ebiquohaOCSA0tv e6HQ== X-Gm-Message-State: AE9vXwPTZ3r7M7GbmV/NCN5X/hFRp+F8rTX4itX5ecVKNoJ/0kZ2ex53fu72nTxidu2fXXMn21a+K3OwqWiyhg== X-Received: by 10.36.237.206 with SMTP id r197mr10073161ith.56.1472606270717; Tue, 30 Aug 2016 18:17:50 -0700 (PDT) MIME-Version: 1.0 Sender: kmacybsd@gmail.com Received: by 10.107.143.11 with HTTP; Tue, 30 Aug 2016 18:17:49 -0700 (PDT) In-Reply-To: References: From: "K. Macy" Date: Tue, 30 Aug 2016 18:17:49 -0700 X-Google-Sender-Auth: 5f3t5ChsMFbJW2qeezMS4x-mxCw Message-ID: Subject: Re: Benchmarks results for FreeBSD 11 To: "Eric A. Borisch" Cc: FreeBSD Stable Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 01:17:51 -0000 On Tue, Aug 30, 2016 at 10:39 AM, Eric A. Borisch wrote: > FWIW, in MacPorts, we patch clang such that it can find the (MacPorts > provided) libomp headers and library. This lets -fopenmp "just work," > and configure scripts can do their job. The libomp headers and lib in > dedicated sub-directories to minimize the impact of -fopenmp adding > them to the include and link paths. > > It is a fairly minor patch, and shouldn't (tm) have any impact on > clang executions without an openmp flag: > https://trac.macports.org/browser/trunk/dports/lang/llvm-3.8/files/openmp-locations.patch > > To get a simple OpenMP test script to compile on FreeBSD, I currently > need to pass (note I'm not the one using -lm): > > clang38 -fopenmp -o test test.c -L /usr/local/llvm38/lib -lm > > instead of (~ what configure will try) > > clang38 -fopenmp -o test test.c > > (11.0RC2 w/ llvm38 installed via pkg) > > I'd love to see base include llvm's OpenMP support, but failing that, > the one from ports should be made to work as configure scripts expect. > > And who knows, if it is there, maybe some items in base will start to > use it. We've got a chicken-and-egg problem right now. Thanks for the patch. Johannes Dieterich hacked the llvm38 port in my graphics branch and: mmacy@armageddon [~|18:13|81] clang++ omp.cpp -fopenmp mmacy@armageddon [~|18:13|81] cat omp.cpp #include #include using namespace std; int main(int argc, char** argv) { #pragma omp parallel for default(shared) for(int i = 0; i < 100; ++i){ #ifdef _OPENMP cout << "WITH OPENMP " << i << endl; #else cout << "WITHOUT OPENMP " << i << endl; #endif } return 0; } mmacy@armageddon [~|18:13|82] clang++38 omp.cpp -fopenmp mmacy@armageddon [~|18:13|83] ./a.out| head -5 WITH OPENMP WITH OPENMP 84WITH OPENMP 92WITH OPENMP 44 WITH OPENMP WITH OPENMP 9352WITH OPENMP 76WITH OPENMP WITH OPENMP 0 WITH OPENMP Fingers crossed that this can get propagated to master and the defaults for openblas, FFTW, and others can be made more sensible. -M