- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to add the compiler to use it with XCode, I have version 8.3.2, but it seems to be missing from the list of available compilers there, any idea why this happens? I did set up all the environmental variables beforehand. I also can't run the compiler from the terminal window, I get the following error:
Undefined symbols for architecture x86_64:
"_gemm_", referenced from:
_MAIN__ in ifortkGcltQ.o
ld: symbol(s) not found for architecture x86_64
This is the code I was trying to compile:
program test
implicit none
real, dimension(2,2) :: testA, testB, testC
testA = 1
testB = 1
testC = 0 ! I don't think I need this line, but it shouldn't matter
call gemm(testA, testB, testC)
write(*,*) testC
end program test
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our official support for Xcode 8.3 is coming in the PSXE 2017 Update 4 release scheduled for later this month (May) so you might be experiencing Xcode specific issues related to that; however, even with that official support the use of the Fortran compiler under Xcode is limited and it is not recommended. You can search our forum for the history of associated failings with that, most notably is the lack of MODULE support under Xcode.
The error under the terminal window relates to not providing a routine GEMM at link time. If that’s provided by a library then you need to provide the path to and name of the library at link time.
If you wish to use the MKL ?gemm routines, there's additional documentation here, https://software.intel.com/en-us/node/468480. There is also an MKL specific forum, Intel® Math Kernel Library, where you can receive additional help/advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apart from the Xcode issues, which I know nothing about, there are two questions that need to be addressed.
1. Did you specify that your code should be linked with MKL? For example, by using the -mkl flag in the compiler invocation, or in a makefile, or some other way? It is of little use when you display an error message without stating the command line that produced it.
2. The call to GEMM that you have in the code suggests that you are trying to use a generic name for the routine. In that case, you should provide an interface, perhaps by adding a USE BLAS95 statement to your source code. You should also specify the mkl_blas95 library at link time. Alternatively, you can use the F77 interface and call the specific routine, SGEMM and use an expanded argument list that conforms to the SGEMM specification.
Note that questions regarding MKL are answered faster in the separate MKL forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Given, as Kevin said, that Xcode doesn't support Fortran MODULE, you would not be able to use the blas95 gemm generic via any USE. If you don't wish to try copying an interface block from the blas95 source, you would need the specific sgemm call with the full argument list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One can use modules when building from Xcode, but if your own source has files with modules, Xcode is incapable of building the sources in the correct order. This is an Apple limitation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
However, the option to build using Make is still available, is it not? Or has Apple put a wrench in that, too?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make is available as is building via the command-line. The limitation with modules and Xcode I was referring to is what Steve described.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This may be shot in the dark, but it seems to me that, since the only module relevant to this thread is one of the modules supplied with MKL, i.e., blas95.mod, Myroslav should be able to build with Xcode or the command line. All that he has to do is to add the USE statement to his source code (in the subprogram that calls GEMM) and add the corresponding library, mkl_blas95.lib, to the link-edit command options.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page