Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Not finding openmp libraries

Charles_A_
Beginner
473 Views
Sorry if I have missed the answer to this previously, as I have seen similar postings. I am new to Fortran on a Mac.

I am trying to learn how to use openmp commands on a Mac. So far I am using Xcode as my IDE. To get started I decided to just try the openmp_sample.f90 code provided by Intel.

If I compile and link the code with the openmp option off it runs fine on one processor. If I switch the openmp on, I get the following:

dyld: Library not loaded: libguide.dylib
Referenced from: /Users/chuckago/Projects/Fortran/OpenMpAgain/MPTest/build/Release/MPTest
Reason: image not found
Trace/BPT trap

I have done all the obvious (to me):

I have run the scripts to set the paths and run an echo command to see that DYLD_LIBRARY_PATH is set correctly.

I have set DYLD_LIBRARY_PATH in the arguments pane of the Info window of my executable

I have put the path "/opt/intel/fc/10.1.012/lib" in the "library search paths" of my Target info pane (I am using with 32 bit right now)

What am I missing?

Thanks in advance for any advice.

-Chuck

0 Kudos
2 Replies
Kevin_D_Intel
Employee
473 Views

I reproduced this behavior. It appears DYLD_LIBRARY_PATH is either not set or not properly utilized when the executable is run under XCode.

There are a couple of work-arounds:

  • Open a terminal window, source the appropriate ifortvars.sh/ifortvars.csh from the chosen compiler (in your case /opt/intel/fc/10.1.012/bin), cd into the Xcode projects Debug or Release directory and run your executable under this terminal window.

  • Setup a symbolic link in the Xcode projects Debug and/or Release directories to libguide.dylib.

In your case, cd into either the Debug or Release directory, and execute:

ln s /opt/intel/fc/10.1.012/lib/libguide.dylib libguide.dylib

Then you can run your executable under Xcode.

Ill post again if we discover a cleaner solution.

0 Kudos
Charles_A_
Beginner
473 Views
Thanks!

It works now (I used the symbolic link). Interestingly, it works if I run it from xcode or if I run it from the command line, but not if I double click the executable in the finder. A strange mesh of operating systems.

Thanks again.
0 Kudos
Reply