- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiling a file with `ifort -p test.f90` and running `./a.out` does not create profiling output gmon.out on macOS 10.15. I've provided an example code below, but it is the case for any file I've tried. Am I missing something?
I've tested it with ifort 2021.4.0 and 2021.1.1on macOS 10.15.
program test_profiling
implicit none
real :: x,y
x = 0.34
y = func(x)
print *,'hello world'
print *,'x,y = ',x,y
contains
real function func(x)
implicit none
real,intent(in) :: x
func = x*2
end function func
end program test_profiling
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, looks like we forgot to take that -p option out. A long time ago macOS came with gcc and binutils. So years ago gprof was available on macOS. It no longer is. even if you install gcc and binutils with Homebrew or something, our compiler would not know where to find the libs needed for the profiling.
SO ... I'll ask my Intel colleauges to:
1) remove -p as an option to the driver.
2) remove -help information on -p
3) remove -p from the Developer Guide and Reference for macOS
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, looks like we forgot to take that -p option out. A long time ago macOS came with gcc and binutils. So years ago gprof was available on macOS. It no longer is. even if you install gcc and binutils with Homebrew or something, our compiler would not know where to find the libs needed for the profiling.
SO ... I'll ask my Intel colleauges to:
1) remove -p as an option to the driver.
2) remove -help information on -p
3) remove -p from the Developer Guide and Reference for macOS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the feedback, Ron!
So there is no profiling option on macOS currently or for the foreseeable future?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
compile with -g and use the 'Instruments' tool that comes with Xcode tools. It is GUI based so if you only have command line there's hopefully some way to run it in CLI mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
as an alternative, you can compile with -g and use Instruments to profile
https://coderedirect.com/questions/315993/profiling-c-on-mac-os-x
this is for C++ but it should work for Fortran too ( I think. haven't tried it)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the hint. I haven't used Instruments before, I'll give it a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The ifort compiler on macOS no longer accepts the "-p" compiler option and the documentation is fixed, too. These fixes are part of oneAPI HPC Toolkit 2023.0.
Thanks for reporting the issue!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page