cscsw / colpack Goto Github PK
View Code? Open in Web Editor NEWA Graph Coloring Algorithm Package
License: BSD 3-Clause "New" or "Revised" License
A Graph Coloring Algorithm Package
License: BSD 3-Clause "New" or "Revised" License
Dear developer team,
I am using Apple Clang to compile ColPack. The compiler throws errors because of missing omp headers. This is because the CMakeLists.txt does not include OpenMP in a correct way. Here is an instruction manual on how to include OpenMP to your projects:
target_link_libraries(ColPack_static PUBLIC OpenMP::OpenMP_CXX)
...
target_link_libraries(ColPack_shared PUBLIC OpenMP::OpenMP_CXX)
It is not enough to add a compiler flag indicating that OMP is being used. It consists of headers, binaries etc., so you have to link ColPack against the whole target OpenMP::OpenMP_CXX. CMake does the rest for you, including adding the needed compiler flags. I think you can savely delete the lines where you set with the set_target_properties() call.
Regards
Schulz0r
Hi
The latest ColPack git version does not compile on clang without OMP support.
$> cmake . -DENABLE_OPENMP=OFF
$> make
....
In file included from /opt/sources/ColPack/src/SMPGC/SMPGCColoring.cpp:7:
In file included from /opt/sources/ColPack/build/cmake/../../src/SMPGC/SMPGCColoring.h:11:
In file included from /opt/sources/ColPack/build/cmake/../../src/SMPGC/SMPGCOrdering.h:12:
/opt/sources/ColPack/build/cmake/../../src/SMPGC/SMPGCGraph.h:12:10: fatal error: 'omp.h' file not found
#include <omp.h>
^~~~~~~
1 error generated.
Looks like many headers have # include <omp.h>
that are not ifdef'ed to protect against non-omp builds.
--
Kumar
I am currently trying to use ColPack under Windows VS2019. The build failed due to an unknown symbol and
in ColPack/BipartiteGraphBicoloring/BipartiteGraphInputOutput.cpp, L.1355.
Should that be a &&
or are you defining and
as an operator somewhere?
I replaced it with &&
and it seems to work so far, but I haven't gotten very far yet.
None of the suggested ways to disable openmp works. There is always a compile-time error about missing file omp.h
.../build/cmake/../../src/SMPGC/SMPGCColoring.h:9:10: fatal error:
'omp.h' file not found
#include <omp.h>
^~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/ColPack_shared.dir/.../src/SMPGC/SMPGCColoring.cpp.o] Error 1
MSVC couldn't build due to error:
'__sync_fetch_and_add': identifier not found
The current version of the cmake install script
https://github.com/CSCsw/ColPack/blob/master/build/cmake/CMakeLists.txt
Places the include files in
${CMAKE_INSTALL_INCLUDEDIR}/ColPack_headers
Version v1.0.10 places them in
${CMAKE_INSTALL_INCLUDEDIR}/ColPack
which seems like a more standard location.
In addition, the library locations have also changed.
I think the standard location for the ColPack Library files should be
${CMAKE_INSTALL_LIBDIR}
not
${CMAKE_INSTALL_LIBDIR}/shared_library
The software is excellent, but when I ran the provided examples, it only displayed the chromatic number without showing the corresponding coloring schemes. I'm not sure where the option to display coloring schemes is.
./ColPack -f ../../Graphs/bcsstk01.mtx -m IMPLICIT_COVERING__STAR_BICOLORING -o LARGEST_FIRST RANDOM -v
Output:
graph: ../../Graphs/bcsstk01.mtx
order: LARGEST_FIRST
methd: IMPLICIT_COVERING__STAR_BICOLORING
BiColoring Bipartite Graph Coloring
order+color time = 0.000000 = 0.000000+0.000000
number of colors: 21
By the way, it seems that this software is using greedy coloring. Is there an option to compute the exact chromatic number?
error when installing ColPack using autotools, it seems this line
ColPack/build/automake/Makefile.am
Line 16 in 3252044
is commented by mistake
When I try to compile ColPack with g++ (Ubuntu 4.9.2-10ubuntu13) 4.9.2, the following error occurs:
BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp: In member function 'int ColPack::BipartiteGraphPartialColoring::PartialDistanceTwoRowColoring_OMP()':
BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp:392:17: error: expected 'declare' before 'critical'
#pragma omp end critical
^
BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp: In member function 'int ColPack::BipartiteGraphPartialColoring::PartialDistanceTwoColumnColoring_OMP()':
BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp:579:17: error: expected 'declare' before 'critical'
#pragma omp end critical
I am very confused with installing colpack in win11. could you give me some instructions? or command line? thx
You have an error in your cmake build right here:
https://github.com/CSCsw/ColPack/blob/master/build/cmake/CMakeLists.txt#L101
You are looking for headers and not sources to compile.
As a result, many necessary files are not compiled.
To fix the error, please replace the *.h
by *.cpp
.
The Debian autobuilders are complaining about information sneaking into the binary that doesn't really belong there, due to things being saved by the autotools build scripts. See
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/colpack.html
Hello,
I'm the maintainer of the ColPack package in Fedora. ColPack currently fails to build with gcc6. For more details, e.g. build logs see the bug report in Fedora.
Can you help me fix this?
Hi,
I just tried to link the current version of ColPack with ADOL-C.
However, somehow the directory structure was changed from the
last official release to the current master branch.
Hence it is currently not possible to use the current version of
ColPack within ADOL-C
How could we get this up and running again?
Furthermore, there might be a memory problem within one of the ColPack drivers,
please see
Best
Andrea
I think there is a bug in the BuildBPGraphFromCSRFormat function.
I am getting RightVertices size one higher than what it should be. The
bug seems to be in this loop over columns.
949 //put together the right vertices
950 map< int,vector<int> >::iterator curr;
951 m_vi_RightVertices.push_back(m_vi_Edges.size());
952 for(int i=0; i <= i_ColumnCount; i++) {
953 curr = colList.find(i);
954 if(curr !=colList.end()) {
955 m_vi_Edges.insert(m_vi_Edges.end(),curr->second.begin(),curr->second.end());
956 }//else We have an empty column
957 m_vi_RightVertices.push_back(m_vi_Edges.size());
958 }
line 952 should look like
951 m_vi_RightVertices.push_back(m_vi_Edges.size());
952 for(int i=0; i < i_ColumnCount; i++) {
953 curr = colList.find(i);
The loop should be between 0, i_ColumnCount - 1
and not 0, i_ColumnCount
Hello, Now I am using Ipopt solver to smooth the trajectory, since I use adolc to automative calc gradient and hessian matrix, so I have to link adolc to ColPack. When I try to install ColPack on my mac according to the documention , even if I use --disable-openmp in the command line, thers is still errors occured like : fatal error: 'omp.h' file not found. So I inststall libomp through Homwbrew, and write a simple file to test whether libomp works. I use gcc to compile the file "gcc-13 -fopenmp hello.c -o hello" it actually works well. But when I try to compile ColPack no matter using automake with command ./configure or using cmake with command it failes again with the same error: fatal error: 'omp.h' file not found even if disable openmp. So any methods I can use to compile ColPack on my computer?
THX
Reference:
https://en.cppreference.com/w/cpp/language/static
There are static member variables in
https://github.com/CSCsw/ColPack/blob/master/src/SMPGC/SMPGC.h
That do not have a declaration outside the class.
This leads to undefined externals; e.g.,
libColPack.so.0: undefined reference to `SMPGC::RAND_SEED'
This particular error can be fixed by adding
const int SMPGC::RAND_SEED;
at the end of
https://github.com/CSCsw/ColPack/blob/master/src/SMPGC/SMPGC.cpp
Hello,
Could you create a tag for the current state of the repo and an associate release ? This would help package developpers.
Thanks in advance
S.
In StringTokenizer::GetNextToken()
in Utilities/StringTokenizer.cpp
the line return(NULL);
is not correct as the function returns a std::string
which can't be set to NULL.
.
In fact, GCC 12 will give the following error:
Utilities/StringTokenizer.cpp:238:28: error: use of deleted function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::nullptr_t = std::nullptr_t]'
Changing the line return(NULL);
to return("");
fixes this.
P.S.: I know GCC 12 isn't released yet, but the current stage 3 prerelease already works quite well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.