coin-or / ADOL-C

A Package for Automatic Differentiation of Algorithms Written in C/C++
Other
145 stars 27 forks source link

Failed to compile #27

Closed nanikos closed 4 years ago

nanikos commented 4 years ago

After configuring with the following ./configure --enable-sparse --with-openmp-flag=-qopenmp --enable-docexa --enable-addexa --enable-parexa --with-colpack=/opt/ColPack

After invoking make I get the following error make[5]: Entering directory '/home/panos/Applications/ADOL-C/ADOL-C/src/drivers' CC drivers.lo CC driversf.lo CC odedrivers.lo CC odedriversf.lo CC psdrivers.lo psdrivers.c(177): error: expected a "}"

compilation aborted for psdrivers.c (code 2) make[5]: *** [Makefile:440: psdrivers.lo] Error 1 I tried with both icc and gcc. Same error.

awalther1 commented 4 years ago

Hi,

I tried the trunk version and the 2.7.2 version just with --with-openmp-flag=-fopenmp instead of --with-openmp-flag=-qopenmp and could not reproduce the error you report using gcc on two different plattforms.

With --with-openmp-flag=-qopenmp I got error messages already during the configure process.

For both cases I use gcc.

Could you provide a more detailed description of your plattform and problem?

Best regards

Andrea Walther

nanikos commented 4 years ago

Thank you for spending time on this Andrea. It turns out the culprit was the intel C compiler (the intel C++ compiler works fine). So a combination of gcc as the c compiler and icc as the C++ compiler works, but icpc as the C compiler breaks the build.

My end configuration is as follows in case anyone runs into this issue again Configuration:

C compiler: gcc C++ compiler: icc Linker: /usr/bin/ld -m elf_x86_64 Source code location: /home/panos/Applications/ADOL-C Install path: /home/panos/adolc_base

CFLAGS: -O2 -fopenmp CXXFLAGS: -O2 -fopenmp

Use Boost pool allocator: yes Use ADOL-C debug mode: no Use ADOL-C hard debug mode: no Zero value in adouble default ctor: yes Access thread number via errno: no Use ADOL-C activity tracking: no Use ADOL-C late init mode: no

Build sparse drivers: yes Build with adjoinable MPI support: no Build with MediPack support: no Build with ColPack: yes Build with python swig module: yes

Build documented examples: yes Build additional examples: yes tape_doc routine computes values: yes