help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: optimization flags for simulation software


From: Paul Floyd
Subject: Re: optimization flags for simulation software
Date: 06 May 2009 20:06:38 GMT
User-agent: slrn/0.9.8.1pl1 (SunOS)

On Wed, 6 May 2009 06:47:14 -0700 (PDT),
   yuvalif@gmail.com <yuvalif@gmail.com> wrote:
> I have a C++ program that does an economic simulation. The program
> have one function with many nested loops (3-5 levels of nesting), each
> run in order of 10-1000 times. All loop limits are constants.
> Inside the loops, simple calculations are done (exp is the heaviest),
> and some global matrices are accessed (both for reading and writing).
> The global matrices are very large ~10M.
>
> I'm using floats for most of my computations. Accuracy is not very
> important, and speed is the most
> important, because I need to later find a minimum for that function.
>
> currently I'm using the following compilation line:
>
> g++ -Wall -fmove-all-movables -fmerge-all-constants -funroll-loops -O3
> -o min_estimation min_estimation.cpp -lgsl
>
> with the following g++:
>
> gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)

Is that a 64bit install? If not consider either trying a 64bit system,
or using SSE.

There are lots of tuned libs for HPC matrix manipulation (BLAS, LAPACK
and so on). They might be worth looking at. Otherwise, profile your app.

A bientot
Paul
-- 
Paul Floyd                 http://paulf.free.fr


reply via email to

[Prev in Thread] Current Thread [Next in Thread]