From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1642 invoked by alias); 12 Dec 2012 16:35:42 -0000 Received: (qmail 1284 invoked by uid 22791); 12 Dec 2012 16:35:36 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f179.google.com (HELO mail-wi0-f179.google.com) (209.85.212.179) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Dec 2012 16:35:30 +0000 Received: by mail-wi0-f179.google.com with SMTP id o1so735709wic.12 for ; Wed, 12 Dec 2012 08:35:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.81.41 with SMTP id w9mr14011752wix.18.1355330129337; Wed, 12 Dec 2012 08:35:29 -0800 (PST) Received: by 10.217.57.196 with HTTP; Wed, 12 Dec 2012 08:35:29 -0800 (PST) In-Reply-To: <50C791BB.4060303@calculquebec.ca> References: <50C791BB.4060303@calculquebec.ca> Date: Wed, 12 Dec 2012 16:35:00 -0000 Message-ID: Subject: Re: Adding OpenMP support for some of the GSL functions From: Frank Reininghaus To: gsl-discuss@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2012-q4/txt/msg00001.txt.bz2 Hi, 2012/12/11 Maxime Boissonneault: > Hi, > I am using GSL from another library of my own to perform numerical > integration of vectorial differential equations. After optimizing and > parallelizing most of my library, I ended up with the conclusion that GSL is > a major bottle neck in my computation, simply because it is not parallelized > to exploit multi-core achitectures. > > I would like to submit patches to add support for OpenMP within GSL, > allowing easy parallelization on shared-memory architectures. How should I > proceed to do so ? I think the most straightforward approach would be to use OpenMP inside the function that calculates the r.h.s. of your differential equation. This does not require any modifications to GSL at all. Reorganising the ODE solver code in GSL such that it can make use of many cores might not be easily possible because often the parameters passed to the r.h.s. function depend on the results of earlier calls. Best regards, Frank