Compilation with icc and MAGMAmic fails: sourcfile "complex"

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Compilation with icc and MAGMAmic fails: sourcfile "complex"

Postby Dimitar Slavchev » Fri Sep 15, 2017 11:56 am

Hello,

I am trying to compile code that uses the magma_dgesv_mic routine.

1. The compilation however fails with:
icc -mkl -O3 -qopenmp -DADD_ -Wall -DHAVE_MIC -I/opt/intel/mic/coi/include -I/usr/include/intel-coi -I/home/dslavchev/install/magmamic-1.4.0/include -I/home/dslavchev/install/magmamic-1.4.0/contol -c -o direct.o direct.c
In file included from /home/dslavchev/install/magmamic-1.4.0/include/magma_types.h(134),
from /home/dslavchev/install/magmamic-1.4.0/include/magmablas_z.h(17),
from /home/dslavchev/install/magmamic-1.4.0/include/magmablas.h(12),
from /home/dslavchev/install/magmamic-1.4.0/include/magma.h(17),
from direct.c(21):
/opt/intel/compilers_and_libraries_2017.2.174/linux/compiler/include/complex(30): catastrophic error: cannot open source file "complex"
#include_next <complex>
^

compilation aborted for direct.c (code 4)
make: *** [direct.o] Error 4


2. The includes at the beginning of the file are:

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <omp.h>

// MAGMA headers
#include "magma.h"
#include "magma_lapack.h"
#include "magma_types.h"

3. The system is a Red Hat cluster with Intel Xeon Phi coprocessors.

4. MAGMAmic installed correctly and I am able to run testing_dgesv_mic test and see results. I have put the same icc options as I see when I make esting_dgesv_mic.

Any idea what might cause this?
Dimitar Slavchev
 
Posts: 5
Joined: Fri Sep 15, 2017 11:23 am

Re: Compilation with icc and MAGMAmic fails: sourcfile "comp

Postby mgates3 » Mon Sep 18, 2017 10:35 am

Use icpc. It uses the C++ <complex> header.
-mark
mgates3
 
Posts: 738
Joined: Fri Jan 06, 2012 2:13 pm

Re: Compilation with icc and MAGMAmic fails: sourcfile "comp

Postby Dimitar Slavchev » Tue Sep 19, 2017 5:06 am

Yes that did got me through the includes.
However the magma compilation uses icc, why I cannot use it too?
Dimitar Slavchev
 
Posts: 5
Joined: Fri Sep 15, 2017 11:23 am

Re: Compilation with icc and MAGMAmic fails: sourcfile "comp

Postby mgates3 » Tue Sep 19, 2017 10:02 am

MAGMA files are named ".cpp", so icc automatically switches to C++.
-mark
mgates3
 
Posts: 738
Joined: Fri Jan 06, 2012 2:13 pm

Re: Compilation with icc and MAGMAmic fails: sourcfile "comp

Postby Dimitar Slavchev » Tue Sep 19, 2017 12:57 pm

So MAGMAmic cannot be used from C code, but C++ is OK.

Thanks a lot, mark.
Dimitar Slavchev
 
Posts: 5
Joined: Fri Sep 15, 2017 11:23 am


Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest