academylasas.blogg.se

Simply fortran graphs
Simply fortran graphs






simply fortran graphs
  1. Simply fortran graphs mac os#
  2. Simply fortran graphs driver#
  3. Simply fortran graphs code#

The Flat Profile conveys how much time your program has spent executing each function. The outputs are separated into the Flat Profile and the Call Graph. There is sufficient documentation for understanding gprof numbers on their website, but I’ll hit some critical points. Now we can view the results of gprof in tav.output, in any competent text editor.

simply fortran graphs

The tav.output was my re-naming of the gprof output.

simply fortran graphs

Now, run gprof to interpret the gmon.out file. Now that you have your executable, you can simply run it, as I did:Īnd you’ll notice that it has generated a “gmon.out” file that can be interpreted by gprof to show you your statistics! Writing gmon.out will overwrite any previous versions that you had in the folder, so use caution. $ ifort -p ave_value.f90 my_function.f90 test_ave_value.f90 -o test_ave_valueĪs a reminder, the -p flag allows me to specify our gprof option, and the -o flag allows me to rename the executable. I wrote these functions based on the example given in Chapman, and then I compiled them with the following command:

Simply fortran graphs driver#

“ave_value” is called by “my_function,” which is declared as external in the test driver program “test_ave_value.” It’s a very simple program with three. The example I consider has a function called “ave_value” which calculates the average value of a function between two points first_value and last_value. I’m going to focus on a much simpler test case (that I’m taking from Chapman’s Fortran 90/95 book, Example 6-10, pg.

Simply fortran graphs code#

That’s interesting, sure! So with that bit of knowledge, I want to apply it to a large code that might make debugging a pain.

Simply fortran graphs mac os#

Linux and Mac OS X: -pg (only available on systems using IA-32 architecture or Intel® 64 architecture), -qp (this is a deprecated option) It will give me an understanding of how quickly my code runs, and which tasks in the workflow are taking up the most resources. Here is what the ifort man pages say about the gprof compiler flag (note that I have a 32-bit processor for this test!):Ĭompiles and links for function profiling with gprof(1).Īrchitectures: IA-32, Intel® 64 architecturesįiles are compiled and linked without profiling.ĭescription: This option compiles and links for function profiling with gprof(1). Therefore, I looked into gprof, which is the GNU profiling tool. My next step is to work through Chapman’s (no relation?) Using OpenMP, but there are some performance considerations I must first address. I finished working through Chapman’s Introducton to Fortran 90/95, and it was a very interesting (helpful) read.








Simply fortran graphs