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

Errors & Fix Attempt when building from source with MSVC on windows #317

Open
wissem01chiha opened this issue Jan 22, 2025 · 3 comments
Open

Comments

@wissem01chiha
Copy link

Hi guys, first of all is the project still still maintained or not by the community? , I noticed that there is a lot of issues,many of them are not resolved or/and not answered. however i build it successfully from source ( windows 11, cmake 3.29.0, MSVC 19.40 for x64, MSbuild 17.10.4) , after some changes.
First i used the source code in the v6.0.3, the master branch have an error explained by the issue #305 , i didn't try to solve it, i added the following lines into the main CMakeLists file to disable some warning and errors.

if(MSVC)
    add_compile_options(/EHsc /bigobj)
endif(MSVC)

before the add_subdirectory(opennn), and in the correlations the index var is being modified inside the openMP loop wich is not allowed , so i change it to being updated atomically and change the "i" var to be signed type (openMp is supported by default)

#pragma omp parallel for
    for (int i = 0U; i < v_sort.size(); ++i)
    {
        int repeated = 1U;
        for (int j = i + 1U; j < v_sort.size() && v_sort[j].first == v_sort[i].first; ++j, ++repeated);
        for (int k = 0; k < repeated; ++k)
        {
            x_rank_vector[v_sort[i + k].second] = rank + (repeated - 1) / 2.0;
        }
        //i += repeated - 1;
        //rank += repeated;
        #pragma omp critical
        {
            rank += repeated;
        }
    }

there is a similar issue i think in #287 with openMP
build with:

mkdir build & cd build 
cmake ..
msbuild opennn.sln

The project should be succesfful build, anyone tested the other next tags ? v6.0.4 and v6.0.8 ?

@serkor1
Copy link

serkor1 commented Jan 26, 2025

The last commit (as of 16/01/2025) was made two days ago on the dev-branch. So I guess its still active!

@distortedMango
Copy link

Yeah, no - I think its dead. There isn't a single productive commit from the main devs.

@wissem01chiha
Copy link
Author

@distortedMango Hi, yes, I noticed that too. However, I think I will create a fork to maintain it, since I am planning to do some experiments in ML with C++

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

3 participants