Changes between Version 2 and Version 3 of HowToMakeCodeFaster
- Timestamp:
- Jan 26, 2012, 10:57:37 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowToMakeCodeFaster
v2 v3 3 3 1. First you should try to get an idea which routines are consuming most of your CPU time: 4 4 5 * Use the "-p" option together with your usual compiler flags. 6 * Recompile the whole code. 5 * Rebuild the whole code with "make MODE=prof" (works with ifort and gfortran). 7 6 * Run the code with a sample job card. This will generate an additional file called "gmon.out". 8 7 * After the succesful run, just execute [[BR]] 9 8 {{{ 10 gprof main.x gmon.out9 gprof GiBUU.x gmon.out 11 10 }}} 12 which gives you the amount of consumed CPU time per subroutine s.11 which gives you the amount of consumed CPU time per subroutine. 13 12 14 13 15 16 2. Now the hard part starts : Reducing the run time of the main consumers... 17 18 14 2. Now comes the hard part: Reducing the run time of the main consumers ...