Skip to content

Compiling with OpenMP #95

Closed
Closed
@Nijaid

Description

@Nijaid

I am attempting to install ADOL-C in an Ubuntu container. Following the instructions for CMake successfully, I only realized later when building my own program that imports ADOL-C that the CMake instructions do not have an option for setting the OpenMP flag, which the AutoTools installation does, and worked for the code I am using a couple of years ago. However, the AutoTools installation now seems buggy (it complains about not understanding the locale of the container) and fails when during the make step as it cannot find the source files (we can address this in another place). CMake then seems like the easier option -- we just need to have the ability to add the OpenMP flag in a manner similar to how AutoTools does. Has this been explored by the developers of ADOL-C?

For clarification, my project fails to link with the CMake ADOL-C with:

# make -j4
[skipping successful Make lines]
[ 82%] Linking CXX executable ../bin/waveform_tool
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `beginParallel()'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `ADOLC_parallel_doCopy'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `endParallel()'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/CMakeFiles/waveform_tool.dir/build.make:113: bin/waveform_tool] Error 1
make[1]: *** [CMakeFiles/Makefile2:279: apps/CMakeFiles/waveform_tool.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 84%] Linking CXX executable ../bin/create_gw_init_file
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `beginParallel()'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `ADOLC_parallel_doCopy'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `endParallel()'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/CMakeFiles/create_gw_init_file.dir/build.make:113: bin/create_gw_init_file] Error 1
make[1]: *** [CMakeFiles/Makefile2:305: apps/CMakeFiles/create_gw_init_file.dir/all] Error 2
[ 86%] Linking CXX executable ../bin/mcmc_gw_tool_v2
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `beginParallel()'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `ADOLC_parallel_doCopy'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `endParallel()'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/CMakeFiles/mcmc_gw_tool_v2.dir/build.make:113: bin/mcmc_gw_tool_v2] Error 1
make[1]: *** [CMakeFiles/Makefile2:357: apps/CMakeFiles/mcmc_gw_tool_v2.dir/all] Error 2
[ 88%] Linking CXX executable ../bin/mcmc_gw_tool
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `beginParallel()'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `ADOLC_parallel_doCopy'
/usr/bin/ld: ../lib/libgwat.so: undefined reference to `endParallel()'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/CMakeFiles/mcmc_gw_tool.dir/build.make:113: bin/mcmc_gw_tool] Error 1
make[1]: *** [CMakeFiles/Makefile2:331: apps/CMakeFiles/mcmc_gw_tool.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

A similar issue was raised in blackrim/treePL#7, which is what leads me to suspect that not including OpenMP during ADOL-C's compilation is leading to this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions