Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADOL-C installation macbook #45

Open
roosmartens opened this issue Jun 15, 2022 · 1 comment · May be fixed by #58
Open

ADOL-C installation macbook #45

roosmartens opened this issue Jun 15, 2022 · 1 comment · May be fixed by #58

Comments

@roosmartens
Copy link

Hi,

I am trying to install adol-c to use with my CMake based project on my macbook. I am kind of a beginner with C++, and not sure how to use/install adol-c. Currently my CMakeLists.txt file is looking like this:

`cmake_minimum_required(VERSION 3.17)
project(Thesis)

set(CMAKE_CXX_STANDARD 17)

find_package(Eigen3 3.3 REQUIRED NO_MODULE)
find_package(autodiff REQUIRED)
find_package(adolc REQUIRED)

add_executable(Thesis main.cpp constants.h main.h utils.cpp utils.h integration.cpp integration.h optimization.cpp optimization.h STMs.cpp STMs.h)

find_package(OpenMP REQUIRED)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()

#add_subdirectory(autodiff)
target_link_libraries (Thesis adolc Eigen3::Eigen autodiff::autodiff OpenMP::OpenMP_CXX)`

However, I get the following error message;

CMake Error at CMakeLists.txt:8 (find_package):
By not providing "Findadolc.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "adolc", but
CMake did not find one.
Could not find a package configuration file provided by "adolc" with any of
the following names:
adolcConfig.cmake
adolc-config.cmake
Add the installation prefix of "adolc" to CMAKE_PREFIX_PATH or set
"adolc_DIR" to a directory containing one of the above files. If "adolc"
provides a separate development package or SDK, be sure it has been
installed.

I tried using 'configure / make / make install' in the ADOL-C directory, also with different prefixes to install adol-c in different places (Thesis project root, usr/local/, etc).
Any idea what I am doing wrong?
Also, should I add '--with-openmp-flag=FLAG' during configuring if I want to use OpenMP with Adol-C?

Hopefully somebody can help me with this. Thanks in advance!

@awalther1
Copy link
Contributor

So far, ADOL-C does not come with a cmake facility. The usual way is to use
the command line and the commands

configure
make
make install

on Linux systems. We do not have that many apply notebooks around to test the installation on a mac system.
We will do so as soon as possible.

Best regards

Andrea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants