Bill Allombert on Mon, 29 May 2023 15:26:27 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: parsum and nbthreads
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Mon, 29 May 2023 15:21:47 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1685366497; c=relaxed/relaxed; bh=uy40kZfLrvx5b1tf7lJHqG/B6Ma/1okiSNbmPwienMg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; b=uMXeCNKtyIBGEFDxbMm1K716VEgBdj/yFFV+x688iI8kZCxvgDtw3/ZR8eEXAAgiopcRL7upuNyjbGfgsk/DC6UmIkwbIzGCt4CdFLCFMSdgZzRq+1koRjxKC1HzRQSJ8QPBn7Xm3CXlTrjKh9pzAOHjjWTY4QlHnP+U+/AoN8bKFKSV9xpboC0AW650gOXCMesCuLsa9QdjQnAAkn/uZ8E7IdXF/iVqQ9wR56jPPYSrna+0O1vHwqBBz2pXiQl88DLa7QQs2jIDlgwFavMiog25L39JWy2DI+tfX1kLMOxKwMHbym8mX10siLRSYlPqOaoB3RNNGcLbCtXVRDOgH359YGW8vcSgGZGdIaa5Q3ilaqoY7vdDmpMtccI0NQljIdvB3WZH9sM2L95wN3xCcv+0g26zW6SN2BZPDSfkWhU1HCkPs6wXRTTqGGH7n8SMKUTrnGLw8zYIVxQbY5nDeRryACM2mZ88dSH0i6IOh8WMxA9l84wMyaRjZSwQiMmtCxHLZnJlS2NyYTKLABEv6mPxCyd2T67041nOILryZhAwzg+NgBQO9MtZ27nmGixp7qeNKFXOXz8j8ANPV/L1n+D4CZTttfupKL6sPpOrvnMUrMiZHyJrxi/4cfan1l+6iF87oM7Q5L3z6toaCgZ/YwmJWgO68MEp/p/XMgyc9Hk=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1685366497; cv=none; b=hRAgM4hBHL+gn5Iz44E4d5bIh5L7WhzDbqU9Rnc9CRIgCUlgwd/HnpFQ1HI72i97tbRa+bf7gTGFI7JwAfpRGztYv8eRJ6VlPkVFm7tTLiHp8mq6RrLdkUm+lostfWCTQM+NWWgbgvFGRzituaHGhArpKgjqQXBuYFB+bEYf5b0wxWD2LI6oYXEK6norFMPZlOTw2/PZLhFNlIckoZeaCrFYvJ+KKlkDmWbqWS+m2dMzBI4caO6qT5A9FSMLV1l4BCit8Wl75i7xdTcxHQsOhIYnDE9gXjJqatsWkE+GzfRqq5z2mdPBef3Nas8qx6iNvlhbiEWKawx+tFrEcgWg+KhsVK7gEmQ31RfzDOBp7fDUdS6PhPEBBs5f0a74y9d4oqH5RTTtO7F81hkqG2Kn8DmXT2WKMqQ3jLR/KLGKnPJZik63LpTBhBGvvzQxIQmxGhr4Pw9hbH2dBtbkG298jszu2tw2b+go78nTMMnVwyYKLZjN/SpDjps4HquNRUOnhahWsZ+zrdRIj9CeawMXTs8uyp0AxLGrxJxj+qFj2PS3cnHbQ7JHaFB3f42VxzsT4Pz9WnWxYVL6wZSiQ2N4S046AqyssmWgPakrw/Q9ZGh0KMxHRSXYng1MewHXADKTLnvpQZGwo81S3VJec9W9564GJ8ywaclDf8SarjsLiCE=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Mon, 29 May 2023 15:26:27 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1685366497; bh=uy40kZfLrvx5b1tf7lJHqG/B6Ma/1okiSNbmPwienMg=; h=Date:From:To:Subject:References:In-Reply-To:From; b=NCVERDteB4liOCiDpslfpldL3Crqt8iFpHTmGJWV/fQwxJTOVhKhP1JwjKjrBDGqb cooum3aBOtw4Nh7VlHeUEFvqnh4StEe+z3IA+D+iN2p5oAiHdHXPQnCsBnZwuadV5U 4Et+1fAXhWnTtu3jZHWZHiuy5lv5Kd1z65JOxIxdGy6Qr2g5qNo+xZOmE/LT6F2JSc KtMxGqpY+KtdfnnOQlOXKuL4RkLHvBDzO8Wndjv9O5QD4yVg9C/BNwcp3YVnWwNRCH Dbkuaop6y9bFzbW5PVdF65x8iggUGVrN52pIcL3BoU+UC/6Ay7IVrNtD/W2w+V2bb5 ki6S6kAknh11+PTHwvTxxDi8sLBfgph+moFXaTgKsw1RmMGFGI0LcKCNHkyXxriZE1 pGArkVyLpd3uRGMkAm1A8Ur7eZJepn83JjkJv792uSHM4/mx7otx6TBezdnM64ngSS v3VA4YgSkswam2nHrfes769aMgwxmex1EJo74bSFlI8ge4nqlLv+TxhWK9fYazKRzG nAAJV5q3bCqovF0jviKbcP/qLGdLiclZf0Wf3oUANaG0mu+h00nQ1SRZgGRB1Lq9Pc yTcSIkKKwR8yDA2MEbLwwy2OMGRErSxVuvRYsE/+6tC6BjXSxbwG/84oTXJzW+Kqhc zQUTV6F1GwOEk240Rc9XZN10=
- In-reply-to: <CAMLkfFTZ3GaxOy4NgnKKprxN1TPbzgsYKHa33ygYK-6fozXhtQ@mail.gmail.com>
- Mail-followup-to: pari-dev@pari.math.u-bordeaux.fr
- References: <CAMLkfFTZ3GaxOy4NgnKKprxN1TPbzgsYKHa33ygYK-6fozXhtQ@mail.gmail.com>
On Wed, May 24, 2023 at 10:32:47AM +0200, Loïc Grenié wrote:
> Hi,
>
> I've recently used parsum(m2=1,20,<code>) on a 16-threaded
> machine. parsum parallelizes the sum only up to floor(sqrt(20))
> threads (hence 4 in my case, for a 16-threaded computer). While
> this is certainly a good limit if the number of things to sum is
> >= nbthreads^2, it is less good in the other case.
Use vecsum(parvector(20,m2,<code>))
parsum only makes sense for large sums when storing all the terms would
use too much memory.
vecsum(parvector) has the big advantage of always giving the same result.
Cheers,
Bill