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

Identifiers not found in Eigen library #18

Open
Arsennnic opened this issue May 17, 2022 · 5 comments
Open

Identifiers not found in Eigen library #18

Arsennnic opened this issue May 17, 2022 · 5 comments

Comments

@Arsennnic
Copy link

Hi Optima developers,
I wonder which Eigen version you used on your machines?
I am trying to compile Optima with latest Eigen 3.4 (Windows x64, MSVC v14.3), but I encountered more than 2000 errors:

Error C2039: 'all' is not a member of 'Eigen' (compiling source file C:\Users\xxxx\Desktop\optima-0.2.5\Optima\Convergence.cpp)
Error C2039: 'zeros' is not a member of 'Eigen' (compiling source file C:\Users\xxxx\Desktop\optima-0.2.5\Optima\Convergence.cpp)
Error C2039: 'ones' is not a member of 'Eigen' (compiling source file C:\Users\xxxx\Desktop\optima-0.2.5\Optima\Convergence.cpp)
...
Error C2873: 'rowsmap' symbol cannot be used in a using-declaration (compiling source file C:\Users\xxxx\Desktop\optima-0.2.5\Optima\Convergence.cpp)
...

It seems that most errors happen in Optima/deps/eigenx/Eigen/Typedefs.
Would you help me solve the problem? Thank you.

@allanleal
Copy link
Contributor

These are auxiliary functions defined in Optima/deps/eigenx/Eigen/Functions. Are you properly using CMake to configure and build the project?

@Arsennnic
Copy link
Author

I have tried two ways to configure and build the project:

cmake -DBUILD_PATH=build -DPREFIX=installed -DPYTHON=OFF -P install

and

mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=installed -DOPTIMA_BUILD_PYTHON=OFF ..
cmake --build .

@allanleal
Copy link
Contributor

allanleal commented May 18, 2022 via email

@Arsennnic
Copy link
Author

I enable Python with pybind11_DIR but it did not work:

cmake -DBUILD_PATH=build -DPREFIX=installed -DPYTHON=ON -P install

Even more errors were raised.

@allanleal
Copy link
Contributor

allanleal commented May 18, 2022

I don't know what is going on there. Here it works fine (are you using conda and created a conda environment called optima containing the dependencies? See screenshot below:

image

Also, Eigen version has to be 3.3.90 -- not 3.4. In this Eigen transition, some strange runtime errors are happening. Optima relies heavily on indexed views from Eigen; and this seems to be a bit unstable in 3.4.

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

No branches or pull requests

2 participants