From nobody Fri Mar 29 08:44:17 2024 X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 31510DC00D2 for ; Sun, 3 Aug 2014 00:25:57 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id et14so7877155pad.37 for ; Sat, 02 Aug 2014 17:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=6zzVXkv7lszjb2XzpbMQy2uF1yu0F4MNNfcfK/190No=; b=htgTLZs+ytUZYo/lVAFLuVxWQYOZB6DRs71xXWUt9ScaMuCcOjkmIr2If9GvKBywlP csMen3KGkidS7JUy46uFsgDJhxXueT3Ra6+9ndaW5KptDgAbeATmA9WZg5YsOt05lSry MGbuVxp8hN3P5BN/mv6WnHbkx3Q8gOpcIe1zUjOV2P/ZFQSzl9fqT5h2t0bDxD4CnEz3 MCyYe6O6940m0tE27TERRnkUEjrbcB2MdL8Yp+jGD/qetN/LX1XpUiqiHfwwR8c+jIqt so+P3jIY+JOCZh5sFMED7cqYmuM24K/XZ6/Nn/oubb8JK6+loTNiLVkqwzIIFDDa0Dt7 B1iQ== X-Received: by 10.70.88.75 with SMTP id be11mr15588157pdb.69.1407025556182; Sat, 02 Aug 2014 17:25:56 -0700 (PDT) Received: from newbook ([50.0.227.98]) by mx.google.com with ESMTPSA id k9sm19699505pdo.28.2014.08.02.17.25.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Aug 2014 17:25:55 -0700 (PDT) Date: Sat, 2 Aug 2014 17:25:51 -0700 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] could python be built with Tcl support? Message-ID: <20140803002548.GA2919@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Hello, I've got a little project I started some time back, that uses Python 2.x, numpy, scipy.interpolate, matplotlib, and the Tk modules (Tkinter and tkFileDialog). I was thinking about working on it some, so...would it be possible to build python with tcl-dev? Thanks, Isaac Dunham --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org --- From nobody Fri Mar 29 08:44:17 2024 X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 98394DC003D for ; Mon, 4 Aug 2014 05:19:40 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id p10so8963718pdj.22 for ; Sun, 03 Aug 2014 22:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rP4rkrn8fZtrOiDqr/MRRghrvmMqzRB2jT/fSp/vbw0=; b=WLKYe+xOyK9+4GAOgul+hSZ2RMkzmakIZ7AuGJvmvizQ7wPHzqqnmUAu9rU0f3wark 7zSe2/H3BYRI7aH0TX1eA7D/SwPj4SNjeayWxdmamf+jA1alDA/G/93no7cWSH3Hp6ov 88HhrS0wvO+xqEKf9EZsMSYEu/YVB/YTGdxTF72Du5wyMdgxwQ6zpCYYxoWBjKiZuYY+ gOJrar/y8u5Wei3dIM7aPAANqmDoh1ms0k7KjPZjjzr6czdV0VU7B3kt4J4lYk76OvaI 1teL5v/qFvCiMN+xZIjw0BoFbWYCPYqIiRcHipnEVgaN+BqtN0gPjVz8gYDq3rB+LeQw YBbg== X-Received: by 10.70.140.102 with SMTP id rf6mr21793250pdb.4.1407129578804; Sun, 03 Aug 2014 22:19:38 -0700 (PDT) Received: from newbook ([50.0.227.98]) by mx.google.com with ESMTPSA id n8sm24779016pdm.22.2014.08.03.22.19.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Aug 2014 22:19:37 -0700 (PDT) Date: Sun, 3 Aug 2014 22:19:33 -0700 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] Re: could python be built with Tcl support? Message-ID: <20140804051931.GA26972@newbook> References: <20140803002548.GA2919@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140803002548.GA2919@newbook> User-Agent: Mutt/1.5.23 (2014-03-12) On Sat, Aug 02, 2014 at 05:25:50PM -0700, Isaac Dunham wrote: > Hello, > I've got a little project I started some time back, that uses Python 2.x, > numpy, scipy.interpolate, matplotlib, and the Tk modules (Tkinter and > tkFileDialog). > I was thinking about working on it some, so...would it be possible to build > python with tcl-dev? I've packaged matplotlib, but it may need to be built againt a suitable python to work for me (ie: I'll send it when Tkinter is built). I haven't built scipy yet, but I've built the prerequisite that isn't packaged yet: a BLAS/LAPACK library. For this, I built OpenBLAS with the following flags: USE_OPENMP=1 NO_LAPACK=0 NUM_THREADS=2 MAJOR_VERSION=3 NO_AFFINITY=1 TARGET=ATOM Justification: USE_OPENMP=1: I'm not sure this is sensible for me. NO_LAPACK=0: Needed to get LAPACK NUM_THREADS=2: I have a hyperthreading Atom N270. The recommended value is actually 1 thread per hardware core/FPU (hyperthreaded cores or Bulldozer cores divided by 2). NO_AFFINITY=1: Needed for some software to work right; this may be needed to build with some versions of musl as well. TARGET=ATOM: This is what I have. As NUM_THREADS increases, so does the size of internal structures. For packaging, I suppose it would be sensible to use something like this: USE_OPENMP=1 NO_LAPACK=0 NUM_THREADS=16 NO_AFFINITY=1 TARGET=??? NUM_THREADS=16 is half the 32 cores that our kernel supports, because most systems that have that many cores are Bulldozer or Intel (hyperthreading), and setting it high will bloat the library. I'm not sure what to say for TARGET; sensible values might be P2, SSE_GENERIC, or possibly using DYNAMIC_CORE instead. This package required a trivial patch, which I've sent them: it used get_nprocs(), which is the same as sysconf(_SC_NPROCESSORS_ONLN). Thanks, Isaac Dunham --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org --- From nobody Fri Mar 29 08:44:17 2024 X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 70E16DC003D for ; Mon, 4 Aug 2014 19:59:16 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id w10so10147810pde.37 for ; Mon, 04 Aug 2014 12:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=2iT3ZzwHFlmEXco3zCbeylsir3wahkwnSDBpi7nQyrE=; b=C8KYA47FbqCovN1aN/TyXouomjUmTzxHi7MDiFXTPa9NZlKWKHGQNY7LE0bb0TeGvp 5LtNlzY4Ci43Fm9XwuLbBSj17kQr21gQIkMyjyJa+PCtlYvx6ANHObnRmsCCbWXfW4jH zwX73NzoXL6DxdoZSoG153Ac8LxQVV+Rt9E5izqUZt1s16raDzzMh003TiFoz/UudXQD lATOi4FbBspgr9ydQEmM0jBUwRJAMXhRDQdKcTCoKUNPdklgr9k8b21vG2oGuHOFUHWw t/89jVrav/BwDDLaFVzIs8tmLuPPg03Vw0xEXILYe+bQdxESF8U7j5q9aDqjFg2pNfnD bTug== X-Received: by 10.70.140.13 with SMTP id rc13mr4743889pdb.127.1407182353140; Mon, 04 Aug 2014 12:59:13 -0700 (PDT) Received: from newbook ([50.0.227.98]) by mx.google.com with ESMTPSA id wc6sm4459083pab.26.2014.08.04.12.59.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Aug 2014 12:59:12 -0700 (PDT) Date: Mon, 4 Aug 2014 12:59:07 -0700 From: Isaac Dunham To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] numpy, scipy, openmp, and openblas Message-ID: <20140804195906.GB1760@newbook> References: <20140803002548.GA2919@newbook> <20140804051931.GA26972@newbook> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140804051931.GA26972@newbook> User-Agent: Mutt/1.5.23 (2014-03-12) On Sun, Aug 03, 2014 at 10:19:31PM -0700, Isaac Dunham wrote: > I haven't built scipy yet, but I've built the prerequisite that isn't > packaged yet: a BLAS/LAPACK library. > > For this, I built OpenBLAS with the following flags: > USE_OPENMP=1 NO_LAPACK=0 NUM_THREADS=2 MAJOR_VERSION=3 NO_AFFINITY=1 TARGET=ATOM > Justification: > USE_OPENMP=1: I'm not sure this is sensible for me. > NO_LAPACK=0: Needed to get LAPACK Having read up more, I've found that: -To build scipy, numpy must be built with BLAS/LAPACK; OpenBLAS will work for both (or so say the numpy docs...) -GNU OpenMP (GOMP) has an issue that makes it impossible to use safely in libraries that may be used in forking processes; this means that anything based on current GNU OpenMP should not be used with Python < 3.4. There's a patch from the OpenBLAS developers for this, but I'm not sure what its status is; the first two versions got rejected and the bugs closed as invalid. -The Intel OpenMP runtime should work. It's ABI compatible with GOMP. -NUM_THREADS is an alternative to OpenMP for threading. It works with forking processes. > NUM_THREADS=2: I have a hyperthreading Atom N270. > The recommended value is actually 1 thread per hardware core/FPU > (hyperthreaded cores or Bulldozer cores divided by 2). > NO_AFFINITY=1: Needed for some software to work right; this may be needed > to build with some versions of musl as well. > TARGET=ATOM: This is what I have. > > As NUM_THREADS increases, so does the size of internal structures. > > For packaging, I suppose it would be sensible to use something like this: > USE_OPENMP=1 NO_LAPACK=0 NUM_THREADS=16 NO_AFFINITY=1 TARGET=??? > NUM_THREADS=16 is half the 32 cores that our kernel supports, because most > systems that have that many cores are Bulldozer or Intel (hyperthreading), > and setting it high will bloat the library. > I'm not sure what to say for TARGET; sensible values might be P2, > SSE_GENERIC, or possibly using DYNAMIC_CORE instead. > > This package required a trivial patch, which I've sent them: > it used get_nprocs(), which is the same as sysconf(_SC_NPROCESSORS_ONLN). Was accepted upstream the same afternoon. Thanks, Isaac Dunham --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---