ifort compiler
Version number
ifort -V</p>
Intel
Intel OneApi Fortran compiler
CLWG-78LP2BMP 13-fev-2021
https://www.intel.com/content/www/us/en/developer/tools/oneapi/fortran-compiler.html
ifort: error #10401: error running 'xcrun -find ld'
This error means that the Xcode present on the computer was not validated. Lauch Xcode ans validate it.
Compiler options
ifort: command line remark #10148: option '-vec-report0' not supported
https://software.intel.com/en-us/node/522935
Linux OS and OS X:
-qopt-report [ =n ]
Windows OS:
/Qopt-report [ : n ]
So, replace '-vec-report0' ---> '-Qopt-report=0'
Attention: '-Qopt-report:0' now gives an error message
Minimum OS version
Min macOS supported must be set within each of the binaries, i.e. LC_VERSION_MIN_MACOSX must be set
Ifort compiler
ifort link option: -mmacosx-version-min=10.10 (10.9 is the minimum)
Checking it:
otool -l <library or binary> | grep -B1 -A3 MIN_MACOS
otool -l <library or binary> | grep -B1 -A3 LC_VERSION_MIN_MACOSX
ld: warning
ld: warning: directory not found for option '-L/opt/intel//compilers_and_libraries_2017.0.102/mac/tbb/lib'
TBB is part of Intel C++ compiler and not included in Intel fortran compiler. The warning is caused by a known issue in the compiler environment setup script. It can be safely ignored. As a workaround you can install Intel C++ compiler on the system too if you have an valid license. Another way is not sourcing the "compilervars.sh" before using the compiler and just directly invoke the compiler through the links under "/usr/local/bin" folder created by the compiler installation program.
I suppressed the error message by creating empty directories "/tbb/lib"
Adding dialogs to a line command application
An osascript command can be used to display a dialog from a standard FORTRAN code.
Note that we do not call "display dialog" directly but ask "System events" to do so. This prevents the dialog window from being shown in the background.
Fortran 90 example
Subroutine myDialog(myString)
implicit none
character(len=*) :: myString
character(len=1024) :: cmmnd
integer :: SYSTEM
integer :: iRes
!
cmmnd="osascript -e 'tell app "//'"System Events" to display dialog '//'"My message!\n\n'//trim(myString)//'" buttons {"Okay"} default button 1 with icon 2'//"'"
write(*, fmt='(a)') trim(cmmnd)
iRes = SYSTEM(trim(cmmnd))
Return
End Subroutine myDialog