- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Thanks for the feedback, Ron!
So there is no profiling option on macOS currently or for the foreseeable future?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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)
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Thanks for the hint. I haven't used Instruments before, I'll give it a try.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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!