coin-or / COIN-OR-OptimizationSuite

A harness for building the bundled suite of interoperable optimization tools available in the COIN-OR repository.
120 stars 41 forks source link

Bulding using Intel oneAPI in a container #17

Closed espenfl closed 3 years ago

espenfl commented 3 years ago

Thanks a lot for the work on providing the COIN-OR.

I have tried to build the COIN-OR OptimizationSuite in a container based on Ubuntu 18.04 that includes the Intel oneAPI, meaning basically access to the whole Intel infrastructure with respect to compilers, MKL etc.

As such I am executing the following: ./coinbrew build COIN-OR-OptimizationSuite CC=icc MPICC=mpicc CXX=icpc MPICXX=mpicxx F77=f77 MPIF77=mpif77 LDFLAGS="${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group -lpthread -lm -ldl" CPPFLAGS=-I"${MKLROOT}/include" --skip="ThirdParty/Blas ThirdParty/Lapack ThirdParty/Metis" --no-prompt --prefix=/usr

which halts here:

##################################################
### Building ThirdParty/ASL 1.4 
##################################################

gcc: error: unrecognized command line option ‘-ip’; did you mean ‘-p’?
gcc: error: unrecognized command line option ‘-mp1’
make[1]: *** [arith.h] Error 1
make: *** [libamplsolver.a] Error 2

I tried to configure this manually with the flags and that worked, so it seems it is not passed along. Am I doing something wrong with the flags that are supposed to be passed to configure? Please advice and thanks in advance.

espenfl commented 3 years ago

I figured this out and had forgotten that the newer compilers live nicely together with the GNU versions. For reference, if others experience the same, update compilers vars to:

CC=icc MPICC=mpiicc CXX=icpc MPICXX=mpiicpc F77=ifort MPIF77=mpiifort

which fixes this issues.

tkralphs commented 3 years ago

Thanks for altering me to oneAPI! I was not aware of this.