Issue 73, 17 July 2008

In this issue:


Using NAG Library Callback Functions in R

In the last issue of NAGNews we described how to call NAG Library routines from Python. We continue this theme in today's issue by looking at calling the NAG Library using R, a free statistical package available from www.r-project.org. The paper gives instruction on how NAG callback functions can be implemented using R version 2.7.0 under Microsoft Windows, although the approach adopted here should be applicable to other platforms. Extensive use has been made of the document “Writing R Extensions” which is available from the R web site and contains additional information on many of the techniques used in these examples.

In order to demonstrate the techniques we consider the specific example of calling the routine E04AB from the ‘Minimizing or Maximizing a Function’ (or Optimization) chapter in the NAG Library. E04AB searches for the minimum, in a given finite interval, of a continuous function of a single variable, using function values only. This routine is available in both the NAG C Library, as e04abc, and the NAG Fortran Library as E04ABF. Initially we concentrate on calling e04abc from the C Library, as this is slightly simpler. We later go on to explain the necessary changes to the code in order to call the corresponding Fortran routine. To read the entire article visit http://www.nag.co.uk/numeric/R_UsingCallBackFunctions.asp


NAG helps speed performance of turbulent fluid model on HECToR

One of the most important aspects of NAG providing Computational Science and Engineering Support to the UK's largest supercomputer, HECToR, is to ensure that users of the supercomputer get the most out of its powerful capabilities. NAG's HECToR Team achieve this by advising on porting, debugging and optimizing codes to be used on the system either on one to one basis or through dedicated training courses.

One such recent effort involved helping a group from the Department of Mechanical Engineering at the University of Sheffield http://www.shef.ac.uk/mecheng/staff/qin.html maximize the performance of a turbulent fluid model (DG-DES) they had developed.

On the advice given by Chris Armstrong, HPC Software Developer and member of the HECToR Team at NAG, it was found that DG-DES performed 30% faster using the Pathscale Compiler and the appropriate optimisation options (compared to compiling with PGI and no options: how the user had been compiling the code). The overall improvement in speed was 70% when you add the 40% increase mentioned below.

Other small coding optimisations, such as declaring as parameters variables that do not change (thereby enabling the compiler to eliminate redundant operations) and fixing selection of the turbulence model to the one used for the experiments in mind, provided a further 40% performance improvement, as shown in the graph at http://www.nag.co.uk/images/overall.jpg.

Chris also offered valuable scaling advice: performance of the code on the small test mesh provided by the group did not scale well beyond 64 processes, but it was verified that the code and optimisations did scale up to the 256 processes to be used for production runs of the code on larger meshes.


NAG Member honoured with inaugural IEEE Medal of Excellence

Jack Dongarra http://www.netlib.org/utk/people/JackDongarra/ was recently selected as the recipient of the first IEEE Medal of Excellence in Scalable Computing http://www.engr.utk.edu/news/atcoe/atcoe_04_17_08.html. Jack has also been one of the driving forces behind BLAS, LAPACK and ScaLAPACK and has collaborated with NAG experts. He is also a keen member of NAG.

Congratulations to Jack from all at NAG!


NAG Event Calendar
Bachelier Finance Society Fifth World Congress
15-19 July ' London

NAG is delighted to be present at the prestigious Bachelier congress later this month. Global experts from both the commercial finance industry and finance academics will be presenting a highly varied schedule of talks.

To find out more about the congress visit the organiser's website http://www.bfs2008.com/


Managing your subscription

Please feel free to forward this newsletter to colleagues or to post it to your company's Intranet sites.

To subscribe, unsubscribe or learn more about managing your subscription, please see: http://www.nag.co.uk/NAGNews/index.asp.

Website Feedback

If you would like a response from NAG please provide your e-mail address below.

(If you're a human, don't change the following field)
Your first name.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.