[ADOL-C] Problem with installing ADOL-C with OpenMP and using it

Kshitij Kulshreshtha kshitij at math.upb.de
Tue Mar 15 06:53:30 EDT 2016


Hello,

please try again with the attached patch, or use the git master branch
from gitlab.com/adol-c/adol-c

Best wishes
Kshitij

On 03/05/16 12:19, Théo Galy-Fajou wrote:
> Hello,
> 
> First thanks a lot for your work on this fantastic library and the
> really good documentation. I have a few questions about the use of
> ADOL-C combined with OpenMP.
> 
> I am trying to use ADOL-C for a neural network for an auto-encoder,
> meaning there are quickly a lot of parameters to deal with. To shorten
> the computation time I wanted to parallelize the process as I am
> computing batch of datapoints independently. However I am not sure if it
> is possible since there is only one taping, can multiple thread access
> the same tape at the same time? If not what would you suggest.
> 
> Anyway I tried to install ADOL-C with the OpenMP with the -fopenmp flag,
> configuration was fine but when using make I got 
> 
> 
>         In file included from tape_handling.cpp:15:0:
> 
>         tape_handling.cpp: In constructor 'Keeper::Keeper()':
> 
>         taping_p.h:372:47: error: 'ADOLC_threadNumber' was not declared
>         in this scope
> 
>          #define ADOLC_GLOBAL_TAPE_VARS globalTapeVars[ADOLC_threadNumber]
> 
>                                                        ^
> 
>         tape_handling.cpp:1021:17: note: in expansion of macro
>         'ADOLC_GLOBAL_TAPE_VARS'
> 
>                      if (ADOLC_GLOBAL_TAPE_VARS.initialStoreSize > 
> 
>                          ^
> 
>         Makefile:618: recipe for target 'tape_handling.lo' failed
> 
> 
> I solved it by declaring     
>                       ADOLC_OPENMP_THREAD_NUMBER;
> right after the 
>                       inline Keeper()
> But I am not sure this is the right solution (anyway it compiles).
> 
> Finally, I copied the example and included
>                       #include <omp.h>
>                       #include <adolc/adolc_openmp.h>
> and added     #pragma omp parallel ADOLC_OPENMP
> It compiles but when running I get :
>                       Symbol lookup error : undefined symbol :
> ADOLC_OpenMP_Handler
> By the way I am using gcc for compiling and Code::Blocks for the IDE.
> 
> Thanks for your help!
> 
> Théo Galy-Fajou
> 
> 
> 
> 
> _______________________________________________
> ADOL-C mailing list
> ADOL-C at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/adol-c
> 

-- 
Dr. Kshitij Kulshreshtha

Institut für Mathematik,
Universität Paderborn,
Warburger Straße 100,
33098 Paderborn.

Büro: TP21.1.21
Besucheradresse:
Technologiepark 21
33098 Paderborn.

Privatanschrift:
Arnikaweg 62
33100 Paderborn.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-compilation-with-openMP.patch
Type: text/x-patch
Size: 3278 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20160315/de297a8e/attachment.bin>


More information about the ADOL-C mailing list