Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
7234 Discussions

Undefined Blacs symbols when compiling Fortran program

Jakes_John
Beginner
946 Views

I installed Fortran Intel Parallel Studio XE 2018. I am trying to compile a fortran program on my macbook using and but I am getting undefined symbols for blacs package. I read that blacs are already installed as part of the Intel Math Kernel library. Can someone help me with some pointers?

source /opt/intel/bin/compilervars.sh -arch intel64 -platform mac

user@system:~/Downloads/test$ ifort test.f 
Undefined symbols for architecture x86_64:
  "_blacs_barrier_", referenced from:
      _solve_ in ifortB6fnER.o
  "_blacs_exit_", referenced from:
      _MAIN__ in ifortB6fnER.o
  "_blacs_get_", referenced from:
      _MAIN__ in ifortB6fnER.o
  "_blacs_gridexit_", referenced from:
      _MAIN__ in ifortB6fnER.o
      _solve_ in ifortB6fnER.o
      _factr_ in ifortB6fnER.o
      _factrs_ in ifortB6fnER.o
      _facgf_ in ifortB6fnER.o
  "_blacs_gridinfo_", referenced from:
      _MAIN__ in ifortB6fnER.o
      _solve_ in ifortB6fnER.o
      _detarray_ in ifortB6fnER.o
  "_blacs_gridinit_", referenced from:
      _MAIN__ in ifortB6fnER.o
  "_blacs_pinfo_", referenced from:
      _MAIN__ in ifortB6fnER.o
  "_descinit_", referenced from:
      _solve_ in ifortB6fnER.o
      _factr_ in ifortB6fnER.o
      _factrs_ in ifortB6fnER.o
      _facgf_ in ifortB6fnER.o
  "_numroc_", referenced from:
      _MAIN__ in ifortB6fnER.o
      _netwk_ in ifortB6fnER.o
      _solve_ in ifortB6fnER.o
      _factrs_ in ifortB6fnER.o
  "_pzgetrf_", referenced from:
      _factr_ in ifortB6fnER.o
      _factrs_ in ifortB6fnER.o
      _facgf_ in ifortB6fnER.o
  "_pzgetrs_", referenced from:
      _solve_ in ifortB6fnER.o
  "_zgebr2d_", referenced from:
      _solve_ in ifortB6fnER.o
      _detarray_ in ifortB6fnER.o
  "_zgebs2d_", referenced from:
      _solve_ in ifortB6fnER.o
      _detarray_ in ifortB6fnER.o
ld: symbol(s) not found for architecture x86_64

0 Kudos
1 Reply
Zhen_Z_Intel
Employee
946 Views

Hi Jakes,

If you get "Undefined symbol error message" that probably caused by your link line, you have to specify link with MKL libraries. Please use MKL link advisor help you to generate compiling & linking line. Thanks.

Best regards,
Fiona

0 Kudos
Reply