CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Taking advantage of GCCbs profilearcs optimization

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2007, 19:34
Default I was wondering if anybody has
  #1
connclark
Guest
 
Posts: n/a
I was wondering if anybody has played around with using GCC's profile arcs optimization. I figured I would mention it since making OpenFOAM just a little faster would have big payoffs for serious computations.

how you use it.

1) compile your app as normal but add the flag -fprofile-generate

2) run your app on a _good_ sample case. when the app exits it will put a <source>.gcda file in the directory where the source is located for your app.

3) recompile your app. This time remove the -fprofile-generate flag and add the -fprofile-use flag. Gcc will now use the profile data in the gcda file to optimize your code.

4) Use your app as you normally would and enjoy the fact it runs faster now


I haven't tried it on OpenFoam yet, but on other apps I have found a speed increase of 2 to 13%.
  Reply With Quote

Old   June 28, 2007, 19:44
Default It would be interesting to com
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
It would be interesting to compare the optimized version to the one compiled with Intel C++ Compiler.

Regards,
A.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   June 29, 2007, 15:11
Default You might see how GCC stacks u
  #3
connclark
Guest
 
Posts: n/a
You might see how GCC stacks up against IntelC++ compiling with -ftree-vectorize flag. It tends to help when dealing with programs that use alot of math while chewing through chunks of memory. It also helps the performance of Mesa on non graphics card accelerated functions.

Since you're on an x86, you may also want to try the -mfpmath=sse,387 flag. It tells GCC to try and use both math units. It is a bit of a toss up on whether it will help or hurt performance
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Taking Course / Training Huygen Main CFD Forum 1 November 15, 2008 08:51
taking screen shots c-dot Siemens 8 December 1, 2007 20:03
What happened to Advantage CFD? gocarts Main CFD Forum 0 February 6, 2007 14:01
taking more information about a macro???? Asghari FLUENT 0 July 24, 2006 14:14
Taking average in CFX Post TING CFX 0 August 24, 2004 11:00


All times are GMT -4. The time now is 06:55.