Compiling with Intel compiler

Asked by Pietro Maximoff on 2013-02-28

Has anyone managed to compile FEniCS with the latest Intel compiler. Everything builds fine for me until Parmetis when I get an error.

Pietro

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Chris Richardson
Solved:
2013-03-04
Last query:
2013-03-04
Last reply:
2013-03-01
Garth Wells (garth-wells) said : #1

On 28 February 2013 15:50, Pietro Maximoff
<email address hidden> wrote:
> New question #223081 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/223081
>
> Has anyone managed to compile FEniCS with the latest Intel compiler. Everything builds fine for me until Parmetis when I get an error.
>

Yes. I build DOLFIN often with the Intel compiler.

Garth

> Pietro
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Pietro Maximoff (segment-x) said : #2

Excellent. Garth, if you wouldn't mind, could you walk me through your process.

Thanks in advance.

Pietro

Chris Richardson (chris-bpi) said : #3

icpc works fine for me too, though you may have to set a few flags to keep it happy.
Maybe you can post the error you are getting when things go wrong for you?

Chris

Pietro Maximoff (segment-x) said : #4

Hi

I export the appropriate variables:

export CC = icc
export CXX = icpc
export FC = ifort
export F77 = ifort

Then I run dorsal.sh after which I get:

ld: error: ../libmetis/libmetis.a(memory.c.o): requires dynamic R_X86_64_PC32 reloc against 'malloc' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(memory.c.o): unsupported reloc 23 against local symbol
...
...
ld: error: ../libmetis/libmetis.a(error.c.o): unsupported reloc 23 against local symbol
ld: error: ../libmetis/libmetis.a(error.c.o): requires dynamic R_X86_64_PC32 reloc against 'longjmp' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(error.c.o): unsupported reloc 23 against local symbol
...
...
ld: error: ../libmetis/libmetis.a(error.c.o): unsupported reloc 23 against local symbol
ld: error: ../libmetis/libmetis.a(mcore.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(auxapi.c.o): requires dynamic R_X86_64_PC32 reloc against 'free' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(parmetis.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__SetupCtrl' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(options.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(compress.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(graph.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(wspace.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_mcoreCreate' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(timing.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(util.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__isrand' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(kmetis.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_malloc_init' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(ometis.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_malloc_init' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(gklib.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(srefine.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_CPUSeconds' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(pmetis.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_malloc_init' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(util.c.o): requires unsupported dynamic reloc 11; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(timers.c.o): requires dynamic R_X86_64_PC32 reloc against 'gettimeofday' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(random.c.o): requires dynamic R_X86_64_PC32 reloc against 'srand' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(kwayrefine.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_CPUSeconds' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(contig.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(coarsen.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_CPUSeconds' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(refine.c.o): requires dynamic R_X86_64_PC32 reloc against 'gk_CPUSeconds' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(sfm.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__wspacepush' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(initpart.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__wspacepush' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(kwayfm.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__Greedy_McKWayCutOptimize' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(bucketsort.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__wspacepush' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(minconn.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__wspacepush' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(debug.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__iargmax' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(fm.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__FM_Mc2WayCutRefine' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(separator.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__wspacepush' which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(mincover.c.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
ld: error: ../libmetis/libmetis.a(balance.c.o): requires dynamic R_X86_64_PC32 reloc against 'libmetis__ComputeLoadImbalanceDiff' which may overflow at runtime; recompile with -fPIC
make[3]: *** [libparmetis/libparmetis.so] Error 1
make[3]: Leaving directory `/home/pietro/FEniCS_Intel/FEniCS/src/parmetis-4.0.2/build/Linux-x86_64'
make[2]: *** [libparmetis/CMakeFiles/parmetis.dir/all] Error 2
make[2]: Leaving directory `/home/pietro/FEniCS_Intel/FEniCS/src/parmetis-4.0.2/build/Linux-x86_64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/pietro/FEniCS_Intel/FEniCS/src/parmetis-4.0.2/build/Linux-x86_64'
make: *** [all] Error 2
Failure with exit status: 2
Exit message: There was a problem building parmetis-4.0.2.

Pietro

Best Chris Richardson (chris-bpi) said : #5

Probably your question should go to:

https://answers.launchpad.net/dorsal

Looks like you need to add -fPIC to the CXXFLAGS and/or CFLAGS when compiling ParMETIS

Pietro Maximoff (segment-x) said : #6

Thanks Chris Richardson, that solved my question.