Giter Club home page Giter Club logo

colpack's People

Contributors

barak avatar besser82 avatar chrisdembia avatar cscsw avatar kkulshre avatar probshin avatar r-barnes avatar wangmu0701 avatar ycool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colpack's Issues

OpenMP is not correctly included in the CMake file and causes compile errors

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

Compilation without OMP support not working

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

Possible typo in BipartiteGraphInputOutput preventing build

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.

OpenMP cannot be disabled

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 

Windows build failed

MSVC couldn't build due to error:
'__sync_fetch_and_add': identifier not found

cmake install changes inlcude and library locations

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

Can it provide a coloring scheme?

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?

OpenMP Compilation Issue (G++ 4.9.2)

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

build structure

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

coin-or/ADOL-C#19

Best

Andrea

Bug in BuildBPGraphFromCSRFormat

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

Can not install even if disable openmp on M1 macos

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
Uploading Screenshot 2024-04-22 at 11.43.42.png…

Please tag a new release

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.

std::string can't be returned as NULL

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.