Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
127 Views

Compiling issues for OPENMPI on OSX High Sierra

Using the following command:

CC=icc CFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' CXX=icpc CXXFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' CPP='icc -E' CXXCPP='icpc -E' F77=ifort FFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' LDFLAGS="-L/opt/intel/compilers_and_libraries_2018.2.164/mac/compiler/lib -Wl,-rpath,/opt/intel/compilers_and_libraries_2018.2.164/mac/compiler/lib" ../configure -prefix=/Users/jessequinn/Packages/openmpi-3.0.1 --enable-shared --enable-static --with-slurm && make -j 4 all && make -j 4 install

I receive the following error:

  FCLD     libmpi_usempif08.la

ifort: command line warning #10006: ignoring unknown option '-force_load,mod/.libs/libforce_usempif08_internal_modules_to_be_built.a'

ifort: command line warning #10006: ignoring unknown option '-rpath'

ld: can't map file, errno=22 file '/opt/intel/compilers_and_libraries_2018.2.164/mac/compiler/lib' for architecture x86_64

make[2]: *** [libmpi_usempif08.la] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all-recursive] Error 

 

Any advice would be appreciated

I have included the config.log for the compilation (open mpi version 3.0.1 using intel 2018)

 

0 Kudos
5 Replies
Highlighted
Beginner
127 Views

if I exclude the LDFLAGS I get an issue immediately in the configuration step.

checking whether we are cross compiling... configure: error: in `/Users/jessequinn/Packages/tmp/openmpi-3.0.1/build':

configure: error: cannot run C compiled programs.

If you meant to cross compile, use `--host'.

See `config.log' for more details

0 Kudos
Highlighted
Valued Contributor I
127 Views

It would be good to have the actual command that the make script tries to execute for the linking. This is hidden in your 

line but  could be brought  forward by using something like `make V=1`. The error message looks like as either the files

in /opt/intel/compilers_and_libraries_2018.2.164/mac/compiler/lib are not there, or you do not have read permission on them, or they

do not correspond to files of the correct architecture (x86_64 vs. i386). 

 

0 Kudos
Highlighted
Beginner
127 Views

Actually, I can easily use the following command on another computer that has both 2017 and 2018 installed.

CC=icc CFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' CXX=icpc CXXFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' CPP='icc -E' CXXCPP='icpc -E' F77=ifort FFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' FC=ifort FCFLAGS='-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel' ../configure -prefix=/Users/jessequinn/Packages/openmpi-3.0.1 --enable-shared --enable-static --with-slurm && make -j 4 all && make -j 4 install

Essentially it is missing the LDFLAGS. I believe the issue has to do with the following:

source /opt/intel/mkl/bin/mklvars.sh intel64
source /opt/intel/bin/compilervars.sh intel64

is there anyway to check that they are actually being initiated correctly?

The error:

checking for suffix of executables... 

checking whether we are cross compiling... configure: error: in `/Users/jessequinn/Packages/tmp/openmpi-3.0.1/build':

configure: error: cannot run C compiled programs.

If you meant to cross compile, use `--host'.

See `config.log' for more details

 

0 Kudos
Highlighted
Valued Contributor I
127 Views

Could you check whether the SIP (Security Integrity Protocol) is activated? In case it is, this forbids passing environment variables to spawned sub-shells which might be a problem for building (or executing) some applications on MAC OS X. 

0 Kudos
Highlighted
Beginner
127 Views

yah you hit it on the head! thanks. seems to be working now.

0 Kudos