Compiling problems in OSX 10.6.8 with Intel compilers

Forums

Hi,

I'm trying to install the latest version of frealign (8.10_120517) on a Mac running Snow Leopard server (10.6.8). I have used the latest intel compilers (composer_xe_2011_sp1.10.328, ifort v. 12.1.4).
I tried to compile frealign using the Makefile_OSX_86-64_intel file, but this results in these errors:

Undefined symbols:
  "_omp_get_num_procs_", referenced from:
      _MAIN__ in frealign_v8.o
  "_omp_set_num_threads_", referenced from:
      _MAIN__ in frealign_v8.o
ld: symbol(s) not found

(a whole capture of the stdin/stderr of make is attached)

I tried to use the compiler options -openmp and -parallel (combined or not) to no avail (I get a bunch of new errors)

I note that with this combination of OS and compilers I can compile and run without major problems a previous version of frealign (8.09 not sure what revision number)

Has anyone encountered this problem and found a solution?

Cheers,

-- Miguel

Hi Miguel,

I don't have an OSX environment to try any of this myself, but I do use ifort on linux.

Normally, if you get undefined symbols for things like omp_set_num_threads, it means that the linker didn't know about the OpenMP library. I would have thought adding -openmp to the linking line would help. I would try changing the following line the make file, from:

LF - m64 -shared-intel -Wl,-t

to:
LF - m64 -shared-intel -openmp -Wl,-t

Is this what you tried already? Can you post the output from that?

If these don't work, I would try adding a line "USE OMP_LIB" right after "PROGRAM FREALIGN" in frealign_v8.f. This in turn may require commenting out line 24 ("INTEGER OMP_GET_NUM_PROCS") of that file. I don't have time to test this now, but it may be worth a shot.

I think the issue is caused by changes between v8.09 and v8.10 to how the OpenMP threading is set up. In 8.10, the code calls OpenMP functions (e.g. OMP_GET_NUM_PROCS on line 103) which I believe weren't used in previous versions.

In reply to by Alexis

Hi Alexis,

Silly me, I added the -openmp option to the compiler flags, not the linker.
Using:

LF - m64 -shared-intel -openmp -Wl,-t

the program did compile and seems to run.

Thank you!