Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 colpack (1.0.10-5) unstable; urgency=medium
 .
   * Bump debhelper from old 11 to 13.
   * Set debhelper-compat version in Build-Depends.
   * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
     Repository-Browse.
   * Bump policy.
   * Update some URLs.
Author: Barak A. Pearlmutter <bap@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2020-05-29

--- colpack-1.0.10.orig/.travis.yml
+++ colpack-1.0.10/.travis.yml
@@ -9,4 +9,12 @@ before_script:
   - autoreconf -fi
 
 script:
-  - ./configure && make && make check
+  - ./configure --disable-openmp && make && make check
+
+  - # Now try building with CMake.
+  - mkdir build
+  - cd build
+  - cmake .. -DCMAKE_INSTALL_PREFIX=~/ColPack
+  - make
+  - ctest
+  - make install
--- colpack-1.0.10.orig/BipartiteGraphBicoloring/BipartiteGraphBicoloring.cpp
+++ colpack-1.0.10/BipartiteGraphBicoloring/BipartiteGraphBicoloring.cpp
@@ -1284,7 +1284,7 @@ namespace ColPack
 
 		int i_EdgeID, i_NeighboringEdgeID;
 
-		int i_EdgeCount;
+		//int i_EdgeCount; //unused variable
 
 		int i_LeftVertexCount, i_RightVertexCount;
 
@@ -1301,7 +1301,7 @@ namespace ColPack
 		i_LeftVertexCount  = STEP_DOWN((signed) m_vi_LeftVertices.size());
 		i_RightVertexCount = STEP_DOWN((signed) m_vi_RightVertices.size());
 
-		i_EdgeCount = (signed) m_vi_Edges.size()/2;
+		//i_EdgeCount = (signed) m_vi_Edges.size()/2; //unused variable
 
 		m_mimi2_VertexEdgeMap.clear();
 
@@ -5322,7 +5322,7 @@ namespace ColPack
 
 		output = m_vi_RightVertexColors;
 
-		for (int i=0; i < output.size(); i++) {
+		for (size_t i=0; i < output.size(); i++) {
 			output[i] -= rowCount;
 			if (output[i] == columnCount + 1) output[i] = 0; //color 0, the rows with this color should be ignored.
 		}
--- colpack-1.0.10.orig/BipartiteGraphBicoloring/BipartiteGraphInputOutput.cpp
+++ colpack-1.0.10/BipartiteGraphBicoloring/BipartiteGraphInputOutput.cpp
@@ -136,7 +136,7 @@ namespace ColPack
 
 		istringstream in2;
 		int entry_counter = 0, num_of_entries = 0, nz_counter=0;
-		bool value_not_specified = false;
+		//bool value_not_specified = false;
 		int i_LineCount = _TRUE;
 
 		int i, j;
@@ -259,12 +259,12 @@ namespace ColPack
 				in2.clear();
 				in2.str(s_InputLine);
 				d_Value =-999999999.;
-				value_not_specified=false;
+				//value_not_specified=false;
 				in2>>i_LeftVertex>>i_RightVertex>>d_Value;
 				entry_counter++;
 				if(d_Value == -999999999. && in2.eof()) {
 				  // "d_Value" entry is not specified
-				  value_not_specified = true;
+				  //value_not_specified = true;
 				}
 				else if (d_Value == 0) {
 				  continue;
@@ -501,7 +501,8 @@ namespace ColPack
 			cout<<"Found File "<<m_s_InputFile<<endl;
 		}
 
-		int i_Dummy, i, j;
+		//int i_Dummy; //unused variable
+                int i, j;
 		int num;
 		int nnz;
 		string line, num_string;
@@ -595,7 +596,7 @@ namespace ColPack
 		//populate the m_vi_LeftVertices and their edges at the same time
 		m_vi_LeftVertices[0]=0;
 		for(i=0; i<NROW; i++) {
-		  for(j=0; j<vvi_LeftVertexAdjacency[i].size();j++) {
+		  for(j=0; j<(int)vvi_LeftVertexAdjacency[i].size();j++) {
 		    m_vi_Edges[m_vi_LeftVertices[i]+j] = vvi_LeftVertexAdjacency[i][j];
 		  }
 
@@ -605,7 +606,7 @@ namespace ColPack
 		//populate the m_vi_RightVertices and their edges at the same time
 		m_vi_RightVertices[0]=m_vi_LeftVertices[NROW];
 		for(i=0; i<NCOL; i++) {
-		  for(j=0; j<vvi_RightVertexAdjacency[i].size();j++) {
+		  for(j=0; j<(int)vvi_RightVertexAdjacency[i].size();j++) {
 		    m_vi_Edges[m_vi_RightVertices[i]+j] = vvi_RightVertexAdjacency[i][j];
 		  }
 
@@ -937,7 +938,7 @@ namespace ColPack
 	  //PrintBipartiteGraph ();
 	  //Pause();
 	  for(i=0; i < i_RowCount; i++) {
-	    for(j=ip_RowIndex[i]; j<ip_RowIndex[i+1]; j++) {
+	    for(j=ip_RowIndex[i]; j<(size_t)ip_RowIndex[i+1]; j++) {
 	      m_vi_Edges.push_back(ip_ColumnIndex[j]);
 	      colList[ ip_ColumnIndex[j] ].push_back(i);
 	    }
@@ -971,8 +972,8 @@ namespace ColPack
 	}
 
 	int BipartiteGraphInputOutput::BuildBPGraphFromADICFormat(std::list<std::set<int> > *  lsi_SparsityPattern, int i_ColumnCount) {
-	  int i;
-	  unsigned int j;
+	  //int i;  //unused variable
+	  //unsigned int j; //unused variable
 	  map< int,vector<int> > colList;
 	  int i_RowCount = (*lsi_SparsityPattern).size();
 
@@ -1098,23 +1099,23 @@ namespace ColPack
 			File file(s_InputFile);
 			string fileExtension = file.GetFileExtension();
 			if (isHarwellBoeingFormat(fileExtension)) {
-				cout<<"ReadHarwellBoeingBipartiteGraph"<<endl;
+				//cout<<"ReadHarwellBoeingBipartiteGraph"<<endl;
 				ReadHarwellBoeingBipartiteGraph(s_InputFile);
 			}
 			else if (isMeTiSFormat(fileExtension)) {
-				cout<<"ReadMeTiSBipartiteGraph"<<endl;
+				//cout<<"ReadMeTiSBipartiteGraph"<<endl;
 				ReadMeTiSBipartiteGraph(s_InputFile);
 			}
 			else if (fileExtension == "gen") {
-				cout<<"ReadGenericMatrixBipartiteGraph"<<endl;
+				//cout<<"ReadGenericMatrixBipartiteGraph"<<endl;
 				ReadGenericMatrixBipartiteGraph(s_InputFile);
 			}
 			else if (fileExtension == "gens") {
-				cout<<"ReadGenericSquareMatrixBipartiteGraph"<<endl;
+				//cout<<"ReadGenericSquareMatrixBipartiteGraph"<<endl;
 				ReadGenericSquareMatrixBipartiteGraph(s_InputFile);
 			}
 			else if (isMatrixMarketFormat(fileExtension)) {
-				cout<<"ReadMatrixMarketBipartiteGraph"<<endl;
+				//cout<<"ReadMatrixMarketBipartiteGraph"<<endl;
 				ReadMatrixMarketBipartiteGraph(s_InputFile);
 			}
 			else { //other extensions
@@ -1123,23 +1124,23 @@ namespace ColPack
 			}
 		}
 		else if (s_fileFormat == "MM") {
-			cout<<"ReadMatrixMarketBipartiteGraph"<<endl;
+			//cout<<"ReadMatrixMarketBipartiteGraph"<<endl;
 			ReadMatrixMarketBipartiteGraph(s_InputFile);
 		}
 		else if (s_fileFormat == "HB") {
-			cout<<"ReadHarwellBoeingBipartiteGraph"<<endl;
+			//cout<<"ReadHarwellBoeingBipartiteGraph"<<endl;
 			ReadHarwellBoeingBipartiteGraph(s_InputFile);
 		}
 		else if (s_fileFormat == "MeTiS") {
-			cout<<"ReadMeTiSBipartiteGraph"<<endl;
+			//cout<<"ReadMeTiSBipartiteGraph"<<endl;
 			ReadMeTiSBipartiteGraph(s_InputFile);
 		}
 		else if (s_fileFormat == "GEN") {
-			cout<<"ReadGenericMatrixBipartiteGraph"<<endl;
+			//cout<<"ReadGenericMatrixBipartiteGraph"<<endl;
 			ReadGenericMatrixBipartiteGraph(s_InputFile);
 		}
 		else if (s_fileFormat == "GENS") {
-			cout<<"ReadGenericSquareMatrixBipartiteGraph"<<endl;
+			//cout<<"ReadGenericSquareMatrixBipartiteGraph"<<endl;
 			ReadGenericSquareMatrixBipartiteGraph(s_InputFile);
 		}
 		else {
--- colpack-1.0.10.orig/BipartiteGraphBicoloring/BipartiteGraphOrdering.cpp
+++ colpack-1.0.10/BipartiteGraphBicoloring/BipartiteGraphOrdering.cpp
@@ -123,7 +123,7 @@ namespace ColPack
 
 		m_s_VertexOrderingVariant = "RANDOM";
 
-		int i;
+		//int i;  //unused variable
 
 		int i_LeftVertexCount, i_RightVertexCount;
 
@@ -135,7 +135,7 @@ namespace ColPack
 		//Order left vertices
 		m_vi_OrderedVertices.resize((unsigned) i_LeftVertexCount);
 
-		for(unsigned int i = 0; i<i_LeftVertexCount; i++) {
+		for(unsigned int i = 0; i<(unsigned)i_LeftVertexCount; i++) {
 			m_vi_OrderedVertices[i] = i;
 		}
 
@@ -146,7 +146,7 @@ namespace ColPack
 
 		tempOrdering.resize((unsigned) i_RightVertexCount);
 
-		for(unsigned int i = 0; i<i_RightVertexCount; i++) {
+		for(unsigned int i = 0; i<(unsigned)i_RightVertexCount; i++) {
 			tempOrdering[i] = i + i_LeftVertexCount;
 		}
 
@@ -155,7 +155,7 @@ namespace ColPack
 		m_vi_OrderedVertices.reserve(i_LeftVertexCount + i_RightVertexCount);
 
 		//Now, populate vector m_vi_OrderedVertices with the right vertices
-		for(unsigned int i = 0; i<i_RightVertexCount; i++) {
+		for(unsigned int i = 0; i<(unsigned)i_RightVertexCount; i++) {
 			m_vi_OrderedVertices.push_back(tempOrdering[i]);
 		}
 
@@ -257,7 +257,8 @@ namespace ColPack
 			return(_TRUE);
 		}
 
-		int i, u, l, v;
+		int i, u, l;
+                //int v; //unused variable
 
 		int _FOUND;
 
@@ -386,7 +387,7 @@ namespace ColPack
 					}
 					*/
 					if(vi_LeftSidedVertexinBucket[i] > 0)
-					for(int j  = 0; j < vvi_GroupedInducedVertexDegree[i].size(); j++)
+					for(unsigned int j  = 0; j < vvi_GroupedInducedVertexDegree[i].size(); j++)
 					{
 						u = vvi_GroupedInducedVertexDegree[i][j];
 						if(u < i_LeftVertexCount)
@@ -416,7 +417,7 @@ namespace ColPack
 					_FOUND = _FALSE;
 
 					if((i_InducedVertexDegreeCount - vi_LeftSidedVertexinBucket[i]) > 0)
-					for(int j = 0; j < vvi_GroupedInducedVertexDegree[i].size(); j++)
+					for(unsigned int j = 0; j < vvi_GroupedInducedVertexDegree[i].size(); j++)
 					{
 						u = vvi_GroupedInducedVertexDegree[i][j];
 
@@ -580,7 +581,8 @@ namespace ColPack
 
 		int i_VertexDegree;
 
-		int i_IncidenceVertexDegree, i_IncidenceVertexDegreeCount;
+		int i_IncidenceVertexDegree;
+                //int i_IncidenceVertexDegreeCount; //unused variable
 
 		int i_SelectedVertex, i_SelectedVertexCount;
 
--- colpack-1.0.10.orig/BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp
+++ colpack-1.0.10/BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.cpp
@@ -290,11 +290,14 @@ namespace ColPack
 			return(_TRUE);
 		}
 
-		int i_LeftVertexCount, i_RightVertexCount, i_CurrentVertex;
+		int i_LeftVertexCount;
+                //int i_CurrentVertex;    //unused variable
+                //int i_RightVertexCount  //unused variable
+
 		bool cont=false;
 		vector<int> vi_forbiddenColors, vi_VerticesToBeColored, vi_verticesNeedNewColor;
 		i_LeftVertexCount = (int) m_vi_LeftVertices.size() - 1;
-		i_RightVertexCount = (int)m_vi_RightVertices.size () - 1;
+		//i_RightVertexCount = (int)m_vi_RightVertices.size () - 1;
 		m_i_LeftVertexColorCount = m_i_RightVertexColorCount = m_i_VertexColorCount = 0;
 
 		// !!! do sections for this part ? forbiddenColors may need to be private for each thread
@@ -321,8 +324,10 @@ namespace ColPack
 // 		  cout<<"i_NumOfVerticesToBeColored = "<<i_NumOfVerticesToBeColored<<endl;
 			//Phase 1: tentative coloring
 			//Algo 4 - Line 4: for each right vertex v in U (in parallel) do
+#ifdef _OPENMP
 #pragma omp parallel for default(none) schedule(dynamic) shared(cout, i_NumOfVerticesToBeColored, vi_VerticesToBeColored) firstprivate(vi_forbiddenColors)
-			for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
+#endif
+                    for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
 				int v = vi_VerticesToBeColored[i];
 // 				CoutLock::set(); cout<<"t"<< omp_get_thread_num() <<": i="<<i<<", left vertex v="<<v<<endl;CoutLock::unset();
 				//Algo 4 - Line 5: for each left vertex w in adj (v) do
@@ -369,8 +374,10 @@ namespace ColPack
 
 			//Phase 2: conflict detection. For each vertex v in U, check and see if v need to be recolored
 			//Algo 4 - Line 11: for each vertex v in U (in parallel) do
+#ifdef _OPENMP
 #pragma omp parallel for default(none) schedule(dynamic) shared(i_NumOfVerticesToBeColored, vi_VerticesToBeColored,vi_verticesNeedNewColor, cout) private(cont)
-			for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
+#endif
+                        for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
 				//Algo 4 - Line 12: cont  <- true ; cont is used to break from the outer loop below
 				cont = true;
 				int v = vi_VerticesToBeColored[i];
@@ -387,8 +394,10 @@ namespace ColPack
 						//Algo 4 - Line 17: if color [v] = color [x] and f (v) > f (x) then
 					  if ( m_vi_LeftVertexColors [m_vi_Edges [x]] == m_vi_LeftVertexColors[v] && f(v) > f(m_vi_Edges [x]) ) {
 							//Algo 4 - Line 18: add [v] to R ; cont <- false; break
+#ifdef _OPENMP
 #pragma omp critical
-							{
+#endif
+                                              {
 								vi_verticesNeedNewColor.push_back(v);
 							}
 							cont = false;
@@ -403,7 +412,7 @@ namespace ColPack
 			i_NumOfVerticesToBeColored = vi_verticesNeedNewColor.size();
 
 			vi_VerticesToBeColored.reserve(vi_verticesNeedNewColor.size());
-			for(int i=0; i<vi_verticesNeedNewColor.size(); i++) {
+			for(size_t i=0; i<vi_verticesNeedNewColor.size(); i++) {
 			  vi_VerticesToBeColored.push_back(vi_verticesNeedNewColor[i]);
 			}
 
@@ -496,7 +505,8 @@ namespace ColPack
 		  return(_TRUE);
 		}
 
-		int i_LeftVertexCount, i_RightVertexCount, i_CurrentVertex;
+		int i_LeftVertexCount, i_RightVertexCount;
+                //int i_CurrentVertex;  //unused variable
 		bool cont=false;
 		vector<int> vi_forbiddenColors, vi_VerticesToBeColored, vi_verticesNeedNewColor;
 		i_LeftVertexCount = (int) m_vi_LeftVertices.size() - 1;
@@ -524,8 +534,10 @@ namespace ColPack
 		  //cout<<"i_NumOfVerticesToBeColored = "<<i_NumOfVerticesToBeColored<<endl;
 			//Phase 1: tentative coloring
 			//Algo 4 - Line 4: for each right vertex v in U (in parallel) do
+#ifdef _OPENMP
 #pragma omp parallel for default(none) schedule(dynamic) shared(i_NumOfVerticesToBeColored, vi_VerticesToBeColored) firstprivate(vi_forbiddenColors)
-			for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
+#endif
+                    for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
 				int v = vi_VerticesToBeColored[i];
 				//Algo 4 - Line 5: for each left vertex w in adj (v) do
 				for (int w=m_vi_RightVertices [v]; w<m_vi_RightVertices [v+1]; w++ ) {
@@ -557,8 +569,10 @@ namespace ColPack
 
 			//Phase 2: conflict detection. For each vertex v in U, check and see if v need to be recolored
 			//Algo 4 - Line 11: for each vertex v in U (in parallel) do
+#ifdef _OPENMP
 #pragma omp parallel for default(none) schedule(dynamic) shared(i_NumOfVerticesToBeColored, vi_VerticesToBeColored,vi_verticesNeedNewColor, cout) private(cont)
-			for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
+#endif
+                        for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
 				//Algo 4 - Line 12: cont  <- true ; cont is used to break from the outer loop below
 				cont = true;
 				int v = vi_VerticesToBeColored[i];
@@ -575,8 +589,10 @@ namespace ColPack
 						//Algo 4 - Line 17: if color [v] = color [x] and f (v) > f (x) then
 					  if ( m_vi_RightVertexColors [m_vi_Edges [x]] == m_vi_RightVertexColors[v] && f(v) > f(m_vi_Edges [x]) ) {
 							//Algo 4 - Line 18: add [v] to R ; cont <- false; break
+#ifdef _OPENMP
 #pragma omp critical
-							{
+#endif
+                                              {
 								vi_verticesNeedNewColor.push_back(v);
 							}
 							cont = false;
@@ -591,7 +607,7 @@ namespace ColPack
 			i_NumOfVerticesToBeColored = vi_verticesNeedNewColor.size();
 
 			vi_VerticesToBeColored.reserve(vi_verticesNeedNewColor.size());
-			for(int i=0; i<vi_verticesNeedNewColor.size(); i++) {
+			for(size_t i=0; i<vi_verticesNeedNewColor.size(); i++) {
 			  vi_VerticesToBeColored.push_back(vi_verticesNeedNewColor[i]);
 			}
 
@@ -601,7 +617,7 @@ namespace ColPack
 			for(int i=0; i<i_NumOfVerticesToBeColored; i++) {
 				vi_VerticesToBeColored[i]=vi_verticesNeedNewColor[i];
 			}
-			//*/
+			// */
 
 		}
 
@@ -738,7 +754,7 @@ namespace ColPack
 	int BipartiteGraphPartialColoring::GetLeftVertexColorCount()
 	{
 	  if(m_i_LeftVertexColorCount<0 && GetVertexColoringVariant() == "Row Partial Distance Two" ) {
-	    for(int i=0; i<m_vi_LeftVertexColors.size();i++) {
+	    for(size_t i=0; i<m_vi_LeftVertexColors.size();i++) {
 	      if(m_i_LeftVertexColorCount<m_vi_LeftVertexColors[i]) m_i_LeftVertexColorCount = m_vi_LeftVertexColors[i];
 	    }
 	  }
@@ -749,7 +765,7 @@ namespace ColPack
 	int BipartiteGraphPartialColoring::GetRightVertexColorCount()
 	{
 	  if(m_i_RightVertexColorCount<0 && GetVertexColoringVariant() == "Column Partial Distance Two" ) {
-	    for(int i=0; i<m_vi_RightVertexColors.size();i++) {
+	    for(size_t i=0; i<m_vi_RightVertexColors.size();i++) {
 	      if(m_i_RightVertexColorCount<m_vi_RightVertexColors[i]) m_i_RightVertexColorCount = m_vi_RightVertexColors[i];
 	    }
 	  }
--- colpack-1.0.10.orig/BipartiteGraphPartialColoring/BipartiteGraphPartialOrdering.cpp
+++ colpack-1.0.10/BipartiteGraphPartialColoring/BipartiteGraphPartialOrdering.cpp
@@ -140,7 +140,7 @@ namespace ColPack
 		m_vi_OrderedVertices.clear();
 		m_vi_OrderedVertices.resize((unsigned) i_LeftVertexCount);
 
-		for(unsigned int i = 0; i<i_LeftVertexCount; i++) {
+		for(int i = 0; i<i_LeftVertexCount; i++) {
 			m_vi_OrderedVertices[i] = i;
 		}
 
@@ -163,7 +163,7 @@ namespace ColPack
 		m_vi_OrderedVertices.clear();
 		m_vi_OrderedVertices.resize((unsigned) i_RightVertexCount);
 
-		for(unsigned int i = 0; i<i_RightVertexCount; i++) {
+		for(int i = 0; i<i_RightVertexCount; i++) {
 			m_vi_OrderedVertices[i] = i + i_LeftVertexCount;
 		}
 
@@ -351,9 +351,9 @@ namespace ColPack
 
 // 		PrintBipartiteGraph();
 
-		int j, k, l, u;
+		//int j, k, l, u; //unused variable
 		int i_LeftVertexCount = (signed) m_vi_LeftVertices.size() - 1;
-		int i_RightVertexCount = (signed) m_vi_RightVertices.size() - 1;
+		//int i_RightVertexCount = (signed) m_vi_RightVertices.size() - 1;
 		vector<int> vi_Visited;
 		vi_Visited.clear();
 		vi_Visited.resize ( i_LeftVertexCount, _UNKNOWN );
@@ -462,7 +462,7 @@ namespace ColPack
 #endif
 		for(int k=0; k< i_MaxNumThreads; k++) {
 			//reset vi_Visited
-			for(int i=0; i< vi_Visited.size();i++) vi_Visited[i] = _UNKNOWN;
+			for(size_t i=0; i< vi_Visited.size();i++) vi_Visited[i] = _UNKNOWN;
 
 			//Line 7: while i_NumOfVerticesToBeColored >= 0 do // !!! ??? why not i_NumOfVerticesToBeColored > 0
 			while(i_NumOfVerticesToBeColored > 0) {
@@ -482,7 +482,7 @@ namespace ColPack
 // 				cout<<"delta[i_thread_num] 2="<< delta[i_thread_num] <<endl;
 
 				//Line 9: Let v be a vertex drawn from B_k [delta]
-				int v;
+				int v=0;
 
 				for(int i=delta[i_thread_num] ; i<i_MaxDegree_Private[i_thread_num]; i++) {
 					if(B[ i_thread_num ][ i ].size()!=0) {
@@ -520,7 +520,7 @@ namespace ColPack
 // 							cout<<"*** i_w_location<0"<<endl<<flush;
 // 						}
 // 						cout<<"i_w_location after="<<i_w_location<<endl;
-						if(i_w_location != (B[ i_thread_num ][ d[w] ].size() - 1) ) B[ i_thread_num ] [ d[w] ][i_w_location] = B[ i_thread_num ] [ d[w] ][ B[ i_thread_num ][ d[w] ].size() - 1 ];
+						if(i_w_location != (((int)B[ i_thread_num ][ d[w] ].size()) - 1) ) B[ i_thread_num ] [ d[w] ][i_w_location] = B[ i_thread_num ] [ d[w] ][ B[ i_thread_num ][ d[w] ].size() - 1 ];
 						B[ i_thread_num ] [ d[w] ].pop_back();
 
 						//Line 14: d (w) <- d (w) - 1
@@ -751,7 +751,7 @@ namespace ColPack
 
 // 		PrintBipartiteGraph();
 
-		int j, k, l, u;
+		//int j, k, l, u; //unused variable
 		int i_LeftVertexCount = (signed) m_vi_LeftVertices.size() - 1;
 		int i_RightVertexCount = (signed) m_vi_RightVertices.size() - 1;
 		vector<int> vi_Visited;
@@ -862,7 +862,7 @@ namespace ColPack
 #endif
 		for(int k=0; k< i_MaxNumThreads; k++) {
 			//reset vi_Visited
-			for(int i=0; i< vi_Visited.size();i++) vi_Visited[i] = _UNKNOWN;
+			for(size_t i=0; i< vi_Visited.size();i++) vi_Visited[i] = _UNKNOWN;
 
 			//Line 7: while i_NumOfVerticesToBeColored >= 0 do // !!! ??? why not i_NumOfVerticesToBeColored > 0
 			while(i_NumOfVerticesToBeColored > 0) {
@@ -882,7 +882,7 @@ namespace ColPack
 // 				cout<<"delta[i_thread_num] 2="<< delta[i_thread_num] <<endl;
 
 				//Line 9: Let v be a vertex drawn from B_k [delta]
-				int v;
+				int v=0;
 
 				for(int i=delta[i_thread_num] ; i<i_MaxDegree_Private[i_thread_num]; i++) {
 					if(B[ i_thread_num ][ i ].size()!=0) {
@@ -920,7 +920,7 @@ namespace ColPack
 // 							cout<<"*** i_w_location<0"<<endl<<flush;
 // 						}
 // 						cout<<"i_w_location after="<<i_w_location<<endl;
-						if(i_w_location != (B[ i_thread_num ][ d[w] ].size() - 1) ) B[ i_thread_num ] [ d[w] ][i_w_location] = B[ i_thread_num ] [ d[w] ][ B[ i_thread_num ][ d[w] ].size() - 1 ];
+						if(i_w_location != (((signed)B[ i_thread_num ][ d[w] ].size()) - 1) ) B[ i_thread_num ] [ d[w] ][i_w_location] = B[ i_thread_num ] [ d[w] ][ B[ i_thread_num ][ d[w] ].size() - 1 ];
 						B[ i_thread_num ] [ d[w] ].pop_back();
 
 						//Line 14: d (w) <- d (w) - 1
@@ -1504,7 +1504,8 @@ namespace ColPack
 
 		int i, j, k, l, u;
 		int i_Current;
-		int i_HighestDegreeVertex, m_i_MaximumVertexDegree;
+		//int i_HighestDegreeVertex; //unused variable
+                int m_i_MaximumVertexDegree;
 		int i_VertexCount, i_VertexDegree, i_IncidenceVertexDegree;
 		int i_SelectedVertex, i_SelectedVertexCount;
 		vector<int> vi_IncidenceVertexDegree;
@@ -1517,7 +1518,7 @@ namespace ColPack
 		i_VertexCount = (int)m_vi_LeftVertices.size () - 1;
 		vvi_GroupedIncidenceVertexDegree.clear();
 		vvi_GroupedIncidenceVertexDegree.resize ( i_VertexCount );
-		i_HighestDegreeVertex = _UNKNOWN;
+		//i_HighestDegreeVertex = _UNKNOWN;//unused variable
 		m_i_MaximumVertexDegree = _UNKNOWN;
 		i_IncidenceVertexDegree = 0;
 		vi_Visited.resize ( i_VertexCount, _UNKNOWN );
@@ -1558,7 +1559,7 @@ namespace ColPack
 			if ( m_i_MaximumVertexDegree < i_VertexDegree )
 			{
 				m_i_MaximumVertexDegree = i_VertexDegree;
-				i_HighestDegreeVertex = i;
+				//i_HighestDegreeVertex = i; //unused variable
 			}
 		}
 
@@ -1666,7 +1667,8 @@ namespace ColPack
 
 		int i, j, k, l, u;
 		int i_Current;
-		int i_HighestDegreeVertex, m_i_MaximumVertexDegree;
+		//int i_HighestDegreeVertex; //unused variable
+                int m_i_MaximumVertexDegree;
 		int i_VertexCount, i_VertexDegree, i_IncidenceVertexDegree;
 		int i_SelectedVertex, i_SelectedVertexCount;
 		vector<int> vi_IncidenceVertexDegree;
@@ -1678,7 +1680,7 @@ namespace ColPack
 		i_SelectedVertex = _UNKNOWN;
 		i_VertexCount = (int)m_vi_RightVertices.size () - 1;
 		vvi_GroupedIncidenceVertexDegree.resize ( i_VertexCount );
-		i_HighestDegreeVertex = _UNKNOWN;
+		//i_HighestDegreeVertex = _UNKNOWN;//unused variable
 		m_i_MaximumVertexDegree = _UNKNOWN;
 		i_IncidenceVertexDegree = 0;
 		vi_Visited.resize ( i_VertexCount, _UNKNOWN );
@@ -1717,7 +1719,7 @@ namespace ColPack
 			if ( m_i_MaximumVertexDegree < i_VertexDegree )
 			{
 				m_i_MaximumVertexDegree = i_VertexDegree;
-				i_HighestDegreeVertex = i;
+				//i_HighestDegreeVertex = i;//unused variable
 			}
 		}
 
--- /dev/null
+++ colpack-1.0.10/CMakeLists.txt
@@ -0,0 +1,246 @@
+cmake_minimum_required(VERSION 3.1.3)
+project(ColPack)
+
+# Set the version number to the *next* release (not to the prevoius release).
+set(COLPACK_VERSION 1.0.11)
+
+# CMake support was added by chrisdembia in 2017 to support building ColPack on
+# Windows with Visual Studio and to supplement autotools. Various parts of the
+# code base, such as the comments in the SampleDrivers files, still expect use
+# of autotools.
+# The layout of the installation generated by CMake is fairly similar to that
+# created by autotools, except that
+#    - we do not install a libtool library (libColPack.la),
+#    - we install CMake config files (ColPackConfig.cmake) to support use of
+#      ColPack by downstream projects, and
+#    - the logic for determining the name of the lib directory is based on
+#      CMake's GNUInstallDirs module.
+# The Basic examples are always built and installed, and are used as tests
+# via CTest. The non-Basic tests are built and installed if ENABLE_EXAMPLES is
+# ON. The only example that we do not compile is SMB.
+#
+# When using Visual Studio, we cannot use OpenMP or build the ColPack executable,
+# and we can only make use of the shared library if using CMake 3.4 or greater.
+# Also, the examples are linked to the static library rather than to the shared
+# library.
+
+# User options.
+# -------------
+option(ENABLE_EXAMPLES "Build the examples in SampleDrivers." OFF)
+option(ENABLE_OPENMP "Enable OpenMP." OFF)
+set (CMAKE_CXX_STANDARD 11)
+# Configuring variables, etc.
+# ---------------------------
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+    # MSVC and Xcode are mult-config generators that use
+    # CMAKE_CONFIGURATION_TYPES; other generators (Makefiles) use
+    # CMAKE_BUILD_TYPE.
+    # By default, compile with optimizations and without debug symbols.
+    set(CMAKE_BUILD_TYPE Release CACHE STRING
+        "Choose the type of build, e.g., optimizaiton level, debug symbols."
+        FORCE)
+    # Show a list of options in the CMake-GUI or ccmake (curses interface).
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
+        "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+endif()
+set(ColPack_lib_to_use ColPack_shared)
+if(WIN32)
+    # Since we do not use __declspec(dllexport) etc, the shared library
+    # does not export symbols and cannot be used in general. Use the the static
+    # library for the examples.
+    set(ColPack_lib_to_use ColPack_static)
+    if(${CMAKE_VERSION} VERSION_LESS 3.4)
+        message(STATUS "Cannot use ColPack's shared library on Windows if using CMake older than 3.4 (because no symbols are exported).")
+    else()
+        # CMake can export symbols for us, allowing use of the shared library.
+        set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+    endif()
+endif()
+
+if(ENABLE_OPENMP)
+    find_package(OpenMP REQUIRED)
+    if(MSVC)
+        message(WARNING "ColPack requires a version of OpenMP greater than what Visual Studio provides.")
+    endif()
+endif()
+
+# Define variables to use for organizing the installation.
+include(GNUInstallDirs)
+if(WIN32)
+    set(COLPACK_INSTALL_CMAKEDIR cmake)
+else()
+    set(COLPACK_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/ColPack)
+    # To follow the UNIX Filsystem Hierarchy Standard, we should install
+    # examples somewhere else:
+    #set(COLPACK_INSTALL_EXAMPLESBINDIR
+    #    ${CMAKE_INSTALL_LIBDIR}/ColPack/examples)
+endif()
+set(COLPACK_INSTALL_EXAMPLESBINDIR examples)
+
+# Lists of the source files.
+# -------------------------
+file(GLOB HEADERS
+    Utilities/*.h
+    BipartiteGraphBicoloring/*.h
+    BipartiteGraphPartialColoring/*.h
+    GraphColoring/*.h
+    Recovery/*.h
+    Main/ColPackHeaders.h
+    Main/Definitions.h)
+file(GLOB SOURCES
+    Utilities/*.cpp
+    BipartiteGraphBicoloring/*.cpp
+    BipartiteGraphPartialColoring/*.cpp
+    GraphColoring/*.cpp
+    Recovery/*.cpp)
+
+# Static library.
+# ---------------
+add_library(ColPack_static STATIC ${HEADERS} ${SOURCES})
+if(NOT WIN32)
+    # On Windows, the static and shared libraries can't have the same
+    # name (because both have .lib files that will conflict).
+    set_target_properties(ColPack_static PROPERTIES OUTPUT_NAME ColPack)
+endif()
+
+# Use these include directories when building the ColPack library.
+set(COLPACK_SOURCE_INCLUDE_DIRS
+    "${CMAKE_SOURCE_DIR}/Main"
+    "${CMAKE_SOURCE_DIR}/Utilities"
+    "${CMAKE_SOURCE_DIR}/BipartiteGraphPartialColoring"
+    "${CMAKE_SOURCE_DIR}/BipartiteGraphBicoloring"
+    "${CMAKE_SOURCE_DIR}/GraphColoring"
+    "${CMAKE_SOURCE_DIR}/Recovery")
+target_include_directories(ColPack_static PRIVATE
+    ${COLPACK_SOURCE_INCLUDE_DIRS})
+# For clients of the ColPack target within this project (e.g. examples).
+# (Must use quotes because the variable is a list of paths.)
+target_include_directories(ColPack_static INTERFACE
+    "$<BUILD_INTERFACE:${COLPACK_SOURCE_INCLUDE_DIRS}>")
+# For clients of an installation of ColPack.
+target_include_directories(ColPack_static INTERFACE
+    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+
+if(ENABLE_OPENMP)
+    set_target_properties(ColPack_static PROPERTIES COMPILE_FLAGS
+        ${OpenMP_CXX_FLAGS})
+endif()
+
+# "EXPORT" helps with creating a ColPackConfig.cmake file to place in the
+# installation, to help downstream projects use ColPack.
+install(TARGETS ColPack_static EXPORT ColPackTargets
+        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+# Shared library.
+# ---------------
+add_library(ColPack_shared SHARED ${HEADERS} ${SOURCES})
+set_target_properties(ColPack_shared PROPERTIES
+    OUTPUT_NAME ColPack
+    SOVERSION 0)
+
+# Use these include directories when building the ColPack library.
+target_include_directories(ColPack_shared PRIVATE
+    ${COLPACK_SOURCE_INCLUDE_DIRS})
+# For clients of the ColPack target within this project (e.g. examples).
+target_include_directories(ColPack_shared INTERFACE
+    "$<BUILD_INTERFACE:${COLPACK_SOURCE_INCLUDE_DIRS}>")
+# For clients of an installation of ColPack.
+target_include_directories(ColPack_shared INTERFACE
+    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+
+if(ENABLE_OPENMP)
+    set_target_properties(ColPack_shared PROPERTIES COMPILE_FLAGS
+        ${OpenMP_CXX_FLAGS})
+    target_link_libraries(ColPack_shared PRIVATE ${OpenMP_CXX_FLAGS})
+endif()
+
+install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ColPack)
+
+install(TARGETS ColPack_shared EXPORT ColPackTargets
+        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+# ColPack executable.
+# -------------------
+# The ColPack executable depends on getopt.h, which is POSIX
+# and not readily available when using Visual Studio.
+find_path(HAS_GETOPT getopt.h)
+if(HAS_GETOPT)
+    add_executable(ColPack Main/Main.cpp)
+    target_link_libraries(ColPack ${ColPack_lib_to_use})
+    # TODO install this executable?
+else()
+    message(STATUS "Cannot find getopt.h; not building the ColPack executable.")
+endif()
+# To facilitate running the ColPack executable from the build directory.
+file(COPY Graphs DESTINATION "${CMAKE_BINARY_DIR}")
+
+# Examples.
+# ---------
+enable_testing()
+# The behavior here is different from autotools, because ENABLE_EXAMPLES
+# also affects the Basic examples.
+# First, gather up all the example files.
+if(ENABLE_EXAMPLES)
+    file(GLOB SAMPLE_DRIVERS_BASIC RELATIVE "${CMAKE_SOURCE_DIR}/SampleDrivers"
+        SampleDrivers/Basic/*.cpp)
+    set(EXAMPLES ${SAMPLE_DRIVERS_BASIC})
+    file(GLOB SAMPLE_DRIVERS_MATRIX_COMPRESSION_AND_RECOVERY
+        RELATIVE "${CMAKE_SOURCE_DIR}/SampleDrivers"
+        SampleDrivers/Matrix_Compression_and_Recovery/ADIC/*.cpp
+        SampleDrivers/Matrix_Compression_and_Recovery/ADOL-C/*.cpp
+        SampleDrivers/Matrix_Compression_and_Recovery/CSR_input/*.cpp
+        # Leaving out SMB because that depends on ADOL-C.
+        )
+    list(APPEND EXAMPLES ${SAMPLE_DRIVERS_MATRIX_COMPRESSION_AND_RECOVERY})
+endif()
+
+# Now create targets for each example.
+foreach(example_cpp ${EXAMPLES})
+    # Get the file name without extension ("_WE"), and store it in `example`.
+    get_filename_component(example ${example_cpp} NAME_WE)
+    # Get a directory relative to the SampleDrivers directory.
+    get_filename_component(example_rel_dir ${example_cpp} DIRECTORY
+        BASE_DIR SampleDrivers)
+    add_executable(${example} SampleDrivers/${example_cpp})
+    target_link_libraries(${example} ${ColPack_lib_to_use})
+    # Autotools installs the examples in CSR_input into a dir. named CSR.
+    string(REPLACE "CSR_input" "CSR" example_rel_dir ${example_rel_dir})
+    install(TARGETS ${example} DESTINATION
+        ${COLPACK_INSTALL_EXAMPLESBINDIR}/${example_rel_dir})
+    # Allow running the basic examples as tests.
+    if(${example_rel_dir} STREQUAL Basic)
+        add_test(${example} ${example})
+    endif()
+endforeach()
+
+# Install and support for downstream projects.
+# --------------------------------------------
+# Consider installing Graphs:
+# install(DIRECTORY Graphs DESTINATION ${CMAKE_INSTALL_SHAREDIR})
+
+# Create files that define the ColPack targets to import into other projects.
+# https://cmake.org/cmake/help/v3.1/manual/cmake-packages.7.html
+install(EXPORT ColPackTargets DESTINATION ${COLPACK_INSTALL_CMAKEDIR})
+
+# CMake Config file., and version file, which CMake will look for when
+# downstream projects use find_package(ColPack).
+include(CMakePackageConfigHelpers)
+# The ConfigVersion file determines if an installed copy of ColPack is
+# compatible with a user's requested version for ColPack.
+write_basic_package_version_file(
+    "${CMAKE_BINARY_DIR}/ColPackConfigVersion.cmake"
+    VERSION ${COLPACK_VERSION}
+    COMPATIBILITY AnyNewerVersion)
+configure_package_config_file(ColPackConfig.cmake.in
+    "${CMAKE_BINARY_DIR}/ColPackConfigToInstall.cmake"
+    INSTALL_DESTINATION ${COLPACK_INSTALL_CMAKEDIR}
+    PATH_VARS CMAKE_INSTALL_PREFIX)
+install(FILES "${CMAKE_BINARY_DIR}/ColPackConfigToInstall.cmake"
+    DESTINATION ${COLPACK_INSTALL_CMAKEDIR}
+    RENAME ColPackConfig.cmake)
+install(FILES "${CMAKE_BINARY_DIR}/ColPackConfigVersion.cmake"
+    DESTINATION ${COLPACK_INSTALL_CMAKEDIR})
--- /dev/null
+++ colpack-1.0.10/ColPackConfig.cmake.in
@@ -0,0 +1,13 @@
+# This file is configured by CMake and installed into ColPack's installation.
+# It is used by downstream (client) projects when they use
+# find_package(ColPack) in their CMakeLists.txt. We define variables that
+# may be useful to users and include the file that defines ColPack's targets.
+# CMake will replace all variables surrounded with "at" symbols by their value.
+#
+# For downstream users: the available targets are:
+#  - ColPack_shared (for a shared library)
+#  - ColPack_static (for a static library)
+@PACKAGE_INIT@
+set(ColPack_VERSION @COLPACK_VERSION@)
+set_and_check(ColPack_ROOT_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@")
+include("${CMAKE_CURRENT_LIST_DIR}/ColPackTargets.cmake")
--- /dev/null
+++ colpack-1.0.10/Example_Try/Main.cpp
@@ -0,0 +1,107 @@
+#include "ColPackHeaders.h"
+#include <cstring>
+#include <unordered_set>
+using namespace ColPack;
+void usage();
+
+int main(int argc, char* argv[]) {
+    string fname;
+    string order("LARGEST_FIRST");
+    string methd("DISTANCE_ONE");
+    bool   bVerbose(false);
+    unordered_set<string> ParaD1Color={"DISTANCE_ONE_OMP"};
+    unordered_set<string> BiColor={ 
+        "IMPLICIT_COVERING__STAR_BICOLORING",
+        "EXPLICIT_COVERING__STAR_BICOLORING",
+        "EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING",
+        "IMPLICIT_COVERING__GREEDY_STAR_BICOLORING"
+    };
+    unordered_set<string> PartialColor={ 
+        "COLUMN_PARTIAL_DISTANCE_TWO",
+        "ROW_PARTIAL_DISTANCE_TWO"
+    };
+   
+
+    for(int i=1; i<argc; i++){
+        if(argv[i][0]!='-') continue;
+        if(     !strcmp(argv[i], "-f")) fname = argv[++i];
+        else if(!strcmp(argv[i], "-o")) order = argv[++i];
+        else if(!strcmp(argv[i], "-m")) methd = argv[++i];
+        else if(!strcmp(argv[i], "-v")) bVerbose = true;
+        else printf("Warning: unknown input argument\"%s\"",argv[i]);
+    }   
+
+    if(fname.empty()) {usage(); exit(0); }
+    
+    if(BiColor.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nBiColoring\n",fname.c_str(), order.c_str(), methd.c_str());
+        BipartiteGraphBicoloringInterface *p = new BipartiteGraphBicoloringInterface(0, fname.c_str(), "AUTO_DETECTED");
+        p->Bicoloring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d\n", p->GetVertexColorCount());
+        delete p; p=nullptr;
+    }
+    else if(PartialColor.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nPartial Distantce Two Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        BipartiteGraphPartialColoringInterface *p = new BipartiteGraphPartialColoringInterface(0, fname.c_str(), "AUTO_DETECTED");
+        p->PartialDistanceTwoColoring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d\n", p->GetVertexColorCount());
+        delete p; p=nullptr;   
+    }
+    else if(ParaD1Color.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nShared Memory General Graph Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        GraphColoringInterface *g = new GraphColoringInterface(SRC_FILE, fname.c_str(), "AUTO_DETECTED");
+        g->Coloring(order.c_str(), methd.c_str());
+        delete g; g=nullptr;  
+    }
+    else{
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nGeneral Graph Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        GraphColoringInterface *g = new GraphColoringInterface(SRC_FILE, fname.c_str(), "AUTO_DETECTED");
+        g->Coloring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d\n",g->GetVertexColorCount());
+        delete g; g=nullptr;
+    }
+    if(bVerbose) fprintf(stdout,"\n"); 
+    return 0;
+}
+
+void usage(){
+    fprintf(stderr, "\nusage: ./ColPack -f <gname> -o <ordering> -m <methods> [-v]\n"
+            "-f <gname>  :  Input file name\n"
+            "-o <order>  :  LARGEST_FIRST\n"
+            "               SMALLEST_LAST,\n"
+            "               DYNAMIC_LARGEST_FIRST,\n"
+            "               INCIDENCE_DEGREE,\n"
+            "               NATURAL,\n"
+            "               RANDOM\n"
+            "-m <methods>:  DISTANCE_ONE\n"
+            "               ACYCLIC\n"
+            "               ACYCLIC_FOR_INDIRECT_RECOVERY\n"
+            "               STAR\n"
+            "               RESTRICTED_STAR\n"
+            "               DISTANCE_TWO\n"
+            "               --------------------\n"
+            "               DISTANCE_ONE_OMP    (automatic display: nThreads,num_colors,timall,conflicts,loops)\n "
+            "               --------------------\n"
+            "               IMPLICIT_COVERING__STAR_BICOLORING\n"
+            "               EXPLICIT_COVERING__STAR_BICOLORING\n"
+            "               EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING\n"
+            "               IMPLICIT_COVERING__GREEDY_STAR_BICOLORING\n"
+            "               --------------------\n"
+            "               COLUMN_PARTIAL_DISTANCE_TWO\n"
+            "               ROW_PARTIAL_DISTANCE_TWO\n"
+            "\n"
+            "-v          :  verbose infomation\n"
+            "\n"
+            "\n"
+            "Examples:\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o LARGEST_FIRST -m DISTANCE_ONE -v\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o SMALLEST_LAST -m ACYCLIC -v\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o DYNAMIC_LARGEST_FIRST -m DISTANCE_ONE_OMP -v\n"
+            "\n"
+           ); 
+}
+
+
--- /dev/null
+++ colpack-1.0.10/Example_Try/Makefile
@@ -0,0 +1,49 @@
+# makefile for non-installed user
+# author: xin cheng
+# usage: change the following variable COLPACK_ROOT accordingly
+#        delete OMP_FLAG=-fopenmp in MAC OS system
+COLPACK_ROOT = ..
+COLPACK_SRC = $(wildcard ${COLPACK_ROOT}/GraphColoring/*.cpp)
+COLPACK_SRC+= $(wildcard ${COLPACK_ROOT}/Utilities/*.cpp)
+COLPACK_SRC+= $(wildcard ${COLPACK_ROOT}/BipartiteGraphBicoloring/*.cpp)
+COLPACK_SRC+= $(wildcard ${COLPACK_ROOT}/BipartiteGraphPartialColoring/*.cpp)
+
+COLPACK_OBJ = $(COLPACK_SRC:%.cpp=%.o)
+SRC = $(wildcard *.cpp)
+OBJ = $(SRC:%.cpp=%.o) $(COLPACK_OBJ)
+EXE = ColPack
+
+
+# compiler
+COMPILER = g++      # gnu
+OMP_FLAG = -fopenmp 
+
+#COMPILER = icc      # intel(R)
+#OMP_FLAG = -openmp
+
+# compile flags
+CCFLAGS = -Wall -std=c++11 $(OMP_FLAG)  -Ofast #-O3 
+# link flags
+LDFLAGS = -Wall -std=c++11 $(OMP_FLAG)  -Ofast #-O3
+
+
+INCLUDES = -I./
+INCLUDES = -I${COLPACK_ROOT}/Main
+INCLUDES+= -I${COLPACK_ROOT}/GraphColoring
+INCLUDES+= -I${COLPACK_ROOT}/BipartiteGraphBicoloring
+INCLUDES+= -I${COLPACK_ROOT}/BipartiteGraphPartialColoring
+INCLUDES+= -I${COLPACK_ROOT}/Utilities
+INCLUDES+= -I${COLPACK_ROOT}/Recovery
+
+
+all: $(EXE)
+
+%.o : %.cpp
+	$(COMPILER) $(INCLUDES) $(CCFLAGS) -c $< -o $@
+
+$(EXE): $(OBJ)
+	$(COMPILER) $^ $(INCLUDES) $(LDFLAGS)  -o $@
+
+clean:
+	rm -f $(OBJ) $(EXE)
+
--- /dev/null
+++ colpack-1.0.10/Example_Use_Library/Makefile
@@ -0,0 +1,38 @@
+# make file for using installed library
+# author xin cheng
+# usage: chage the following two variable accordingly
+COLPACK_INSTALL_PATH = ../libs/libColPack.so
+COLPACK_ROOT = ..
+
+SRC = $(wildcard *.cpp)
+OBJ = $(SRC:%.cpp=%.o)
+EXE = ColPack
+
+# compiler
+COMPILE = g++      # gnu
+
+# compile flags
+CCFLAGS = -Wall -fopenmp -O3 -std=c++11
+
+# link flags
+LDFLAGS = -Wall -fopenmp -O3 -std=c++11 -ldl ${COLPACK_INSTALL_PATH}
+
+INCLUDES = -I./
+INCLUDES+= -I${COLPACK_ROOT}/Include
+INCLUDES+= -I${COLPACK_ROOT}/Source/GeneralGraphColoring
+INCLUDES+= -I${COLPACK_ROOT}/Source/BipartiteGraphBicoloring
+INCLUDES+= -I${COLPACK_ROOT}/Source/BipartiteGraphPartialColoring
+INCLUDES+= -I${COLPACK_ROOT}/Source/Utilities
+
+
+all: $(EXE)
+
+%.o : %.cpp
+	$(COMPILE) $(INCLUDES) $(CCFLAGS) -c $< -o $@
+
+$(EXE): $(OBJ)
+	$(COMPILE) $^ $(INCLUDES) $(LDFLAGS)  -o $@
+
+clean:
+	rm -f $(OBJ) $(EXE)
+
--- /dev/null
+++ colpack-1.0.10/Example_Use_Library/template.cpp
@@ -0,0 +1,107 @@
+#include "ColPackHeaders.h"
+#include <cstring>
+#include <unordered_set>
+using namespace ColPack;
+void usage();
+
+int main(int argc, char* argv[]) {
+    string fname;
+    string order("LARGEST_FIRST");
+    string methd("DISTANCE_ONE");
+    bool   bVerbose(false);
+    unordered_set<string> ParaD1Color={"DISTANCE_ONE_OMP"};
+    unordered_set<string> BiColor={ 
+        "IMPLICIT_COVERING__STAR_BICOLORING",
+        "EXPLICIT_COVERING__STAR_BICOLORING",
+        "EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING",
+        "IMPLICIT_COVERING__GREEDY_STAR_BICOLORING"
+    };
+    unordered_set<string> PartialColor={ 
+        "COLUMN_PARTIAL_DISTANCE_TWO",
+        "ROW_PARTIAL_DISTANCE_TWO"
+    };
+   
+
+    for(int i=1; i<argc; i++){
+        if(argv[i][0]!='-') continue;
+        if(     !strcmp(argv[i], "-f")) fname = argv[++i];
+        else if(!strcmp(argv[i], "-o")) order = argv[++i];
+        else if(!strcmp(argv[i], "-m")) methd = argv[++i];
+        else if(!strcmp(argv[i], "-v")) bVerbose = true;
+        else printf("Warning: unknown input argument\"%s\"",argv[i]);
+    }   
+
+    if(fname.empty()) {usage(); exit(0); }
+    
+    if(BiColor.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nBiColoring\n",fname.c_str(), order.c_str(), methd.c_str());
+        BipartiteGraphBicoloringInterface *p = new BipartiteGraphBicoloringInterface(0, fname.c_str(), "AUTO_DETECTED");
+        p->Bicoloring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d\n", p->GetVertexColorCount());
+        delete p; p=nullptr;
+    }
+    else if(PartialColor.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nPartial Distantce Two Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        BipartiteGraphPartialColoringInterface *p = new BipartiteGraphPartialColoringInterface(0, fname.c_str(), "AUTO_DETECTED");
+        p->PartialDistanceTwoColoring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d\n", p->GetVertexColorCount());
+        delete p; p=nullptr;   
+    }
+    else if(ParaD1Color.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nShared Memory General Graph Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        GraphColoringInterface *g = new GraphColoringInterface(SRC_FILE, fname.c_str(), "AUTO_DETECTED");
+        g->Coloring(order.c_str(), methd.c_str());
+        delete g; g=nullptr;  
+    }
+    else{
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nGeneral Graph Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        GraphColoringInterface *g = new GraphColoringInterface(SRC_FILE, fname.c_str(), "AUTO_DETECTED");
+        g->Coloring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d\n",g->GetVertexColorCount());
+        delete g; g=nullptr;
+    }
+    if(bVerbose) fprintf(stdout,"\n"); 
+    return 0;
+}
+
+void usage(){
+    fprintf(stderr, "\nusage: ./ColPack -f <gname> -o <ordering> -m <methods> [-v]\n"
+            "-f <gname>  :  Input file name\n"
+            "-o <order>  :  LARGEST_FIRST\n"
+            "               SMALLEST_LAST,\n"
+            "               DYNAMIC_LARGEST_FIRST,\n"
+            "               INCIDENCE_DEGREE,\n"
+            "               NATURAL,\n"
+            "               RANDOM\n"
+            "-m <methods>:  DISTANCE_ONE\n"
+            "               ACYCLIC\n"
+            "               ACYCLIC_FOR_INDIRECT_RECOVERY\n"
+            "               STAR\n"
+            "               RESTRICTED_STAR\n"
+            "               DISTANCE_TWO\n"
+            "               --------------------\n"
+            "               DISTANCE_ONE_OMP    (automatic display: nThreads,num_colors,timall,conflicts,loops)\n "
+            "               --------------------\n"
+            "               IMPLICIT_COVERING__STAR_BICOLORING\n"
+            "               EXPLICIT_COVERING__STAR_BICOLORING\n"
+            "               EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING\n"
+            "               IMPLICIT_COVERING__GREEDY_STAR_BICOLORING\n"
+            "               --------------------\n"
+            "               COLUMN_PARTIAL_DISTANCE_TWO\n"
+            "               ROW_PARTIAL_DISTANCE_TWO\n"
+            "\n"
+            "-v          :  verbose infomation\n"
+            "\n"
+            "\n"
+            "Examples:\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o LARGEST_FIRST -m DISTANCE_ONE -v\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o SMALLEST_LAST -m ACYCLIC -v\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o DYNAMIC_LARGEST_FIRST -m DISTANCE_ONE_OMP -v\n"
+            "\n"
+           ); 
+}
+
+
--- colpack-1.0.10.orig/GraphColoring/GraphColoring.cpp
+++ colpack-1.0.10/GraphColoring/GraphColoring.cpp
@@ -19,7 +19,6 @@
 ************************************************************************************/
 
 #include "ColPackHeaders.h"
-
 using namespace std;
 
 namespace ColPack
@@ -97,13 +96,13 @@ namespace ColPack
 	{
 		int i;
 
-		int i_VertexCount;
+		//int i_VertexCount;
 
 		int i_ViolationCount;
 
 		i_ViolationCount = _FALSE;
 
-		i_VertexCount = STEP_DOWN((signed) m_vi_Vertices.size());
+		//i_VertexCount = STEP_DOWN((signed) m_vi_Vertices.size());
 
 		for(i=m_vi_Vertices[i_Vertex]; i<m_vi_Vertices[STEP_UP(i_Vertex)]; i++)
 		{
@@ -718,7 +717,7 @@ namespace ColPack
 				vector< pair<int, int> >* vpii_EdgesPtr = &(mpii_iter->second.value);
 				pair<int, int> pii_Edge;
 				// now start counting the appearance of vertices and detect conflict
-				for(int j=0; j< vpii_EdgesPtr->size(); j++  ) {
+				for(int j=0; j<(int) vpii_EdgesPtr->size(); j++  ) {
 					pii_Edge = (*vpii_EdgesPtr)[j];
 #ifdef COLPACK_DEBUG
 					cout<<"\t Looking at "<<pii_Edge.first<<"-"<<pii_Edge.second;
@@ -946,7 +945,9 @@ namespace ColPack
 			#pragma omp parallel default(none) firstprivate(i) shared(pii_ConflictColorCombination, i_ConflictVertex, cout, i_VertexCount, Colors2Edge_Private, PotentialHub_Private, i_MaxNumThreads, b_Stop, i_Mode)
 #endif
 			for(map< pair<int, int>, Colors2Edge_Value, lt_pii >::iterator iter = Colors2Edge_Private[i].begin(); iter != Colors2Edge_Private[i].end() ; iter++) {
-				#pragma omp single nowait
+#ifdef _OPENMP	
+                                #pragma omp single nowait
+#endif
 				{
 					if(iter->second.visited == false && !b_Stop) {
 						iter->second.visited=true;
@@ -971,7 +972,9 @@ namespace ColPack
 						i_ConflictVertex[i_thread_num] = BuildStarFromColorCombination_forChecking(i_Mode, i_MaxNumThreads, i_thread_num, iter->first, Colors2Edge_Private, PotentialHub_Private);
 
 						if(i_ConflictVertex[i_thread_num]  != -1) {
-							#pragma omp critial
+#ifdef _OPENMP
+#pragma omp critical
+#endif
 							{
 								if(pii_ConflictColorCombination!=NULL) {
 									(*pii_ConflictColorCombination).first = iter->first.first;
@@ -991,7 +994,7 @@ namespace ColPack
 							cout<<"\n\n\n\n\n\n\n"<<flush;
 						}
 #endif
-//*/
+// */
 					}
 				}
 			}
@@ -1017,7 +1020,7 @@ namespace ColPack
 	// !!! later on, remove the codes that check for conflicts (because we assume no conflict) => make this function run faster)
 	int GraphColoring::BuildStarFromColorCombination(int i_MaxNumThreads, int i_thread_num, pair<int, int> pii_ColorCombination, map< pair<int, int>, Colors2Edge_Value , lt_pii>* Colors2Edge_Private,
 							 map< int, vector< pair<int, int> > > *Vertex2ColorCombination_Private, map< int, int> * PotentialHub_Private) {
-		int i_VertexCount = m_vi_Vertices.size() - 1;
+		//int i_VertexCount = m_vi_Vertices.size() - 1;
 		map< pair<int, int>, Colors2Edge_Value, lt_pii >::iterator mpii_iter;
 		map< int, int>::iterator mii_iter;
 		int i_PotentialHub=0;
@@ -1036,7 +1039,7 @@ namespace ColPack
 				vector< pair<int, int> >* vpii_EdgesPtr = &(mpii_iter->second.value);
 				pair<int, int> pii_Edge;
 				// now start counting the appearance of vertices and detect conflict
-				for(int j=0; j< vpii_EdgesPtr->size(); j++  ) {
+				for(int j=0; j<(int) vpii_EdgesPtr->size(); j++  ) {
 					pii_Edge = (*vpii_EdgesPtr)[j];
 #ifdef COLPACK_DEBUG
 					cout<<"\t Looking at "<<pii_Edge.first<<"-"<<pii_Edge.second;
@@ -1140,7 +1143,7 @@ namespace ColPack
 	 */
 	int GraphColoring::DetectConflictInColorCombination(int i_MaxNumThreads, int i_thread_num, pair<int, int> pii_ColorCombination, map< pair<int, int>, Colors2Edge_Value , lt_pii>* Colors2Edge_Private,
 					     map< int, vector< pair<int, int> > > *Vertex2ColorCombination_Private, map< int, int> * PotentialHub_Private, vector< pair<int, int> >* ConflictedEdges_Private, vector<int>* ConflictCount_Private) {
-		int i_VertexCount = m_vi_Vertices.size() - 1;
+		//int i_VertexCount = m_vi_Vertices.size() - 1;
 		map< pair<int, int>, Colors2Edge_Value, lt_pii >::iterator mpii_iter;
 		map< int, int>::iterator mii_iter;
 		int i_PotentialHub=0;
@@ -1167,7 +1170,7 @@ namespace ColPack
 
 				pair<int, int> pii_Edge;
 				// now start counting the appearance of vertices and detect conflict
-				for(int j=0; j< vpii_EdgesPtr->size(); j++  ) {
+				for(int j=0; j<(int) vpii_EdgesPtr->size(); j++  ) {
 					pii_Edge = (*vpii_EdgesPtr)[j];
 					//#pragma omp critical
 					//{i_ProcessedEdgeCount++;}
@@ -1316,7 +1319,7 @@ namespace ColPack
 			if(itr != Colors2Edge_Private[i].end()) {
 				cout<<"(thread "<<i<<") ";
 				vector< pair<int, int> > *Edges = &(itr->second.value);
-				for(int ii=0; ii< (*Edges).size(); ii++) {
+				for(int ii=0; ii<(int) (*Edges).size(); ii++) {
 					cout<<(*Edges)[ii].first<<"-"<<(*Edges)[ii].second<<"; ";
 					i_ElementCount++;
 					if( i_ElementCount >= i_MaxElementsOfCombination) {
@@ -1347,7 +1350,7 @@ namespace ColPack
 						if(itr2 != Colors2Edge_Private[ii].end()) {
 							cout<<"(thread "<<ii<<") ";
 							vector< pair<int, int> > *Edges = &(itr2->second.value);
-							for(int iii=0; iii< (*Edges).size(); iii++) {
+							for(int iii=0; iii<(int) (*Edges).size(); iii++) {
 								cout<<(*Edges)[iii].first<<"-"<<(*Edges)[iii].second<<"; ";
 								i_ElementCount++;
 								if( i_ElementCount >= i_MaxElementsOfCombination) break;
@@ -1357,9 +1360,9 @@ namespace ColPack
 					}
 					cout<<endl;
 				}
-				if(mpiib_VisitedColorCombination.size() >= i_MaxNumOfCombination) break;
+				if( (int) mpiib_VisitedColorCombination.size() >= i_MaxNumOfCombination) break;
 			}
-			if(mpiib_VisitedColorCombination.size() >= i_MaxNumOfCombination) break;
+			if((int) mpiib_VisitedColorCombination.size() >= i_MaxNumOfCombination) break;
 		}
 		cout<<endl;
 
@@ -1385,7 +1388,7 @@ namespace ColPack
 				itr = Vertex2ColorCombination_Private[ii].find(i) ;
 				if(itr !=Vertex2ColorCombination_Private[ii].end()) {
 					cout<<"\t   Thread "<<ii<<" size()="<<itr->second.size()<<endl;
-					for(int iii=0; iii<itr->second.size();iii++) {
+					for(int iii=0; iii<(int) itr->second.size();iii++) {
 						cout<<"\t\t( Color "<<(itr->second)[iii].first<< ";";
 						if( (itr->second)[iii].second > -1) {
 							cout<<" NO hub, connect to "<<(itr->second)[iii].second;
@@ -1410,7 +1413,7 @@ namespace ColPack
 	int GraphColoring::PrintConflictEdges(vector< pair<int, int> > *ConflictedEdges_Private, int i_MaxNumThreads) {
 		cout<<"PrintConflictEdges"<<endl;
 		for(int i=0; i<i_MaxNumThreads;i++) {
-			for(int ii=0; ii<ConflictedEdges_Private[i].size();ii++) {
+			for(int ii=0; ii<(int)ConflictedEdges_Private[i].size();ii++) {
 				cout<<ConflictedEdges_Private[i][ii].first<<"-"<< ConflictedEdges_Private[i][ii].second <<endl;
 			}
 		}
@@ -1421,7 +1424,7 @@ namespace ColPack
 
 	int GraphColoring::PrintConflictCount(vector<int> &ConflictCount) {
 		cout<<"PrintConflictCount"<<endl;
-		for(int i=0; i<ConflictCount.size(); i++) {
+		for(int i=0; i<(int)ConflictCount.size(); i++) {
 			cout<<"Vertex "<<i<<": "<<ConflictCount[i]<<endl;
 		}
 		cout<<endl;
@@ -1437,7 +1440,7 @@ namespace ColPack
 		#pragma omp parallel for schedule(static,1) default(none) shared(cout, ConflictedEdges_Private, ConflictCount, i_MaxNumThreads)
 #endif
 		for(int i=0; i<i_MaxNumThreads; i++) {
-			for(int j=0; j< ConflictedEdges_Private[i].size(); j++) {
+			for(int j=0; j< (int)ConflictedEdges_Private[i].size(); j++) {
 				pair<int, int> pii_Edge = ConflictedEdges_Private[i][j];
 				//before decide which end, remember to check if one end's color is already removed. If this is the case, just skip to the next conflicted edge.
 				if(m_vi_VertexColors[pii_Edge.first] == _UNKNOWN || m_vi_VertexColors[pii_Edge.second] == _UNKNOWN ) continue;
@@ -1536,18 +1539,18 @@ namespace ColPack
 		#pragma omp parallel for default(none) shared(i_VertexCount, Vertex2ColorCombination_Private, Vertex2ColorCombination, i_MaxNumThreads)
 #endif
 		for(int i=0; i<i_VertexCount;i++) {
-			int i_thread_num;
+			//int i_thread_num;
 #ifdef _OPENMP
-			i_thread_num = omp_get_thread_num();
+			//i_thread_num = omp_get_thread_num();
 #else
-			i_thread_num = 0;
+			//i_thread_num = 0;
 #endif
 			map< int, vector< pair<int, int> > >::iterator iter;
 			for(int ii=0; ii<i_MaxNumThreads;ii++) {
 				iter = Vertex2ColorCombination_Private[ii].find(i);
 				if(iter != Vertex2ColorCombination_Private[ii].end()) {
 					vector< pair<int, int> >* vpii_Ptr = & (iter->second);
-					for(int iii=0; iii< vpii_Ptr->size(); iii++) {
+					for(int iii=0; iii< (int) vpii_Ptr->size(); iii++) {
 						(*Vertex2ColorCombination)[i][(*vpii_Ptr)[iii].first] = (*vpii_Ptr)[iii].second;
 					}
 
@@ -1686,7 +1689,7 @@ namespace ColPack
 			return _FALSE;
 		}
 		// Step *: now build a subgraph with my own structure
-		for(int i=0; i<m_vi_Vertices.size()-1;i++) {
+		for(int i=0; i<(int)m_vi_Vertices.size()-1;i++) {
 			if((*mib_Colors).find(m_vi_VertexColors[i]) == (*mib_Colors).end()) continue;
 
 			for(int ii=m_vi_Vertices[i]; ii<m_vi_Vertices[i+1];ii++) {
@@ -1749,7 +1752,7 @@ namespace ColPack
 
 		// Step *: now build a subgraph with my own structure
 		map<int,bool> mib_tmp;
-		for(int i=0; i<m_vi_Vertices.size()-1;i++) {
+		for(int i=0; i<(int)m_vi_Vertices.size()-1;i++) {
 			if(mib_IncludedVertices.find(i) == mib_IncludedVertices.end()) continue;
 			(*graph)[i] = mib_tmp; // just to make sure that my graphs will have all vertices (even when the vertex has no edge)
 			if(  mib_FilterByColors==NULL //NOT filter by colors
@@ -1827,7 +1830,7 @@ namespace ColPack
 
 		// Step *: now build a subgraph with my own structure
 		map<int,bool> mib_tmp;
-		for(int i=0; i<m_vi_Vertices.size()-1;i++) {
+		for(int i=0; i+1<(int)m_vi_Vertices.size();i++) {
 			if(mib_IncludedVertices.find(i) == mib_IncludedVertices.end()) continue;
 			(*graph)[i] = mib_tmp; // just to make sure that my graphs will have all vertices (even when the vertex has no edge)
 			for(int ii=m_vi_Vertices[i]; ii<m_vi_Vertices[i+1];ii++) {
@@ -1852,7 +1855,7 @@ namespace ColPack
 	int GraphColoring::PrintVertexAndColorAdded(int i_MaxNumThreads, vector< pair<int, int> > *vi_VertexAndColorAdded, int i_LastNEntries) {
 		int i_MaxSize = vi_VertexAndColorAdded[0].size();
 		for(int i=1; i<i_MaxNumThreads;i++) {
-			if(vi_VertexAndColorAdded[i].size()>i_MaxSize) i_MaxSize=vi_VertexAndColorAdded[i].size();
+			if(vi_VertexAndColorAdded[i].size()>(size_t)i_MaxSize) i_MaxSize=vi_VertexAndColorAdded[i].size();
 		}
 
 		if(i_LastNEntries>i_MaxSize) i_LastNEntries=i_MaxSize;
@@ -1991,7 +1994,7 @@ namespace ColPack
 		}
 		vi_VerticesToBeColored.resize(i_StartingIndex[i_MaxNumThreads-1]+vip_VerticesToBeRecolored_Private[i_MaxNumThreads-1].size(),_UNKNOWN);
 		for(int i=0 ; i< i_MaxNumThreads; i++) {
-			for(int j=0; j<vip_VerticesToBeRecolored_Private[i].size();j++) {
+			for(size_t j=0; j<vip_VerticesToBeRecolored_Private[i].size();j++) {
 				vi_VerticesToBeColored[i_StartingIndex[i]+j] = vip_VerticesToBeRecolored_Private[i][j];
 			}
 		}
@@ -2241,7 +2244,7 @@ namespace ColPack
 			cout<<"vi_VerticesToBeColored.size()="<<vi_VerticesToBeColored.size()<<endl;
 #endif
 			for(int i=0 ; i< i_MaxNumThreads; i++) {
-				for(int j=0; j<vip_VerticesToBeRecolored_Private[i].size();j++) {
+				for(int j=0; j<(int)vip_VerticesToBeRecolored_Private[i].size();j++) {
 					vi_VerticesToBeColored[i_StartingIndex[i]+j] = vip_VerticesToBeRecolored_Private[i][j];
 				}
 			}
@@ -2268,7 +2271,7 @@ namespace ColPack
 
 	int GraphColoring::PrintVertex2ColorCombination (vector<  map <int, int > > *Vertex2ColorCombination) {
 		cout<<"PrintVertex2ColorCombination()"<<endl;
-		for(int i=0; i< (*Vertex2ColorCombination).size(); i++) {
+		for(int i=0; i<(int) (*Vertex2ColorCombination).size(); i++) {
 			cout<<"v "<<i<<" c "<<m_vi_VertexColors[i]<<endl;
 			map<int, int>::iterator mii_iter = (*Vertex2ColorCombination)[i].begin();
 			for(; mii_iter != (*Vertex2ColorCombination)[i].end(); mii_iter++) {
@@ -2288,7 +2291,7 @@ namespace ColPack
 
 	int GraphColoring::PrintVertex2ColorCombination_raw (vector<  map <int, int > > *Vertex2ColorCombination) {
 		cout<<"PrintVertex2ColorCombination_raw()"<<endl;
-		for(int i=0; i< (*Vertex2ColorCombination).size(); i++) {
+		for(int i=0; i<(int) (*Vertex2ColorCombination).size(); i++) {
 			cout<<"v "<<i<<" c "<<m_vi_VertexColors[i]<<endl;
 			map<int, int>::iterator mii_iter = (*Vertex2ColorCombination)[i].begin();
 			for(; mii_iter != (*Vertex2ColorCombination)[i].end(); mii_iter++) {
@@ -2355,7 +2358,7 @@ namespace ColPack
 		//		in paper: A. Gebremedhin, A. Tarafdar, F. Manne and A. Pothen, New Acyclic and Star Coloring Algorithms with Applications to Hessian Computation, SIAM Journal on Scientific Computing, Vol 29, No 3, pp 1042--1072, 2007.
 		//  updating the collection of two-colored stars incident on the colored vertex v
 		// i.e. update vi_EdgeStarMap[][] and vi_StarHubMap[]
-		for(i=0; i<m_vi_Vertices.size()-1;i++) {
+		for(i=0; i<((int)m_vi_Vertices.size())-1;i++) {
 			if(m_vi_VertexColors[i] == _UNKNOWN) {
 				vi_VerticesToBeRecolored.push_back(i);
 				continue;
@@ -3207,7 +3210,7 @@ namespace ColPack
 	{
 		int i, j, k, l;
 
-		int i_VertexCount, i_EdgeCount;
+		int i_VertexCount /*, i_EdgeCount*/;
 
 		int i_FirstColor, i_SecondColor, i_ThirdColor, i_FourthColor;
 
@@ -3215,7 +3218,7 @@ namespace ColPack
 
 		i_VertexCount = STEP_DOWN((signed) m_vi_Vertices.size());
 
-		i_EdgeCount = (signed) m_vi_Edges.size();
+		/*i_EdgeCount = (signed) m_vi_Edges.size();*/
 
 		i_ViolationCount = _FALSE;
 
@@ -3312,7 +3315,7 @@ namespace ColPack
 		cout<<"Note: 1-based indexing is used"<<endl;
 		int i, j, k, l;
 
-		int i_VertexCount, i_EdgeCount;
+		int i_VertexCount /*, i_EdgeCount */;
 
 		int i_FirstColor, i_SecondColor, i_ThirdColor, i_FourthColor;
 
@@ -3320,7 +3323,7 @@ namespace ColPack
 
 		i_VertexCount = STEP_DOWN((signed) m_vi_Vertices.size());
 
-		i_EdgeCount = (signed) m_vi_Edges.size();
+		//i_EdgeCount = (signed) m_vi_Edges.size();
 
 		i_ViolationCount = _FALSE;
 
@@ -6056,4 +6059,212 @@ namespace ColPack
 	{
 		m_i_VertexColorCount = i_VertexColorCount;
 	}
-}
+
+#ifndef _OPENMP
+//Public Function 
+int GraphColoring::D1_Coloring_OMP(){ printf("OpenMP is disabled. Recompile the code with correct flag\n"); return _TRUE;}
+#endif
+
+#ifdef _OPENMP
+//Public Function 
+int GraphColoring::D1_Coloring_OMP(){
+    int nT=1;
+#pragma omp parallel
+    { nT = omp_get_num_threads(); }
+    double time1=0, time2=0, totalTime=0;
+    long NVer     = m_vi_Vertices.size()-1;  //number of nodes
+    //long NEdge    = m_vi_Edges.size()/2;     //number of edges 
+    int *verPtr   = &m_vi_Vertices[0];       //pointer to first vertex
+    int *verInd   = &m_vi_Edges[0];          //pointer to first edge
+    int MaxDegree = m_i_MaximumVertexDegree; //maxDegree
+    vector<int> vtxColor(NVer, -1);          //uncolored color is -1
+
+    // Build a vector of random numbers
+    double *randValues = (double*) malloc (NVer * sizeof(double));
+    if( randValues==nullptr) {printf("Not enough memory for array of %ld doubles\n",NVer); exit(1); }
+    int seed = 12345;
+    srand(seed);
+    for(int i=0; i<NVer; i++) randValues[i]= double(rand())/(RAND_MAX+1.0);
+
+    long *Q    = (long *) malloc (NVer * sizeof(long)); //assert(Q != 0);
+    long *Qtmp = (long *) malloc (NVer * sizeof(long)); //assert(Qtmp != 0);
+    long *Qswap;    
+    if( (Q == nullptr) || (Qtmp == nullptr) ) {
+        printf("Not enough memory to allocate for the two queues \n");
+        exit(1);
+    }
+    long QTail=0;    //Tail of the queue 
+    long QtmpTail=0; //Tail of the queue (implicitly will represent the size)
+
+#pragma omp parallel for
+    for (long i=0; i<NVer; i++) {
+        Q[i] = m_vi_OrderedVertices[i];
+        // Q[i]= i;     //Natural order
+        Qtmp[i]= -1; //Empty queue
+    }
+    QTail = NVer;	//Queue all vertices
+    /////////////////////////////////////////////////////////////////////////////////////////
+    //////////////////////////// START THE WHILE LOOP ///////////////////////////////////////
+    /////////////////////////////////////////////////////////////////////////////////////////
+    long nConflicts = 0; //Number of conflicts 
+    int nLoops = 0;     //Number of rounds of conflict resolution
+
+    do {
+        ///////////////////////////////////////// PART 1 ////////////////////////////////////////
+        //Color the vertices in parallel - do not worry about conflicts
+        time1 -= omp_get_wtime();
+#pragma omp parallel for
+        for (long Qi=0; Qi<QTail; Qi++) {
+            long v = Q[Qi]; //Q.pop_front();
+
+            //long adj1 =(long) verPtr[v];
+            //long adj2 =(long) verPtr[v+1];
+            int adj1 = verPtr[v];
+            int adj2 = verPtr[v+1];
+            bool *Mark = (bool *) malloc ( MaxDegree * sizeof(bool) );
+            //assert(Mark != 0);
+            for (int i=0; i<MaxDegree; i++)
+                Mark[i]= false;      
+
+            int maxColor = -1;
+            int adjColor = -1;
+            //Browse the adjacency set of vertex v
+            for(int k = adj1; k < adj2; k++ ) {
+                if ( v == verInd[k]) //Self-loops
+                    continue;
+                adjColor =  vtxColor[verInd[k]];
+                if ( adjColor >= 0 ) {
+                    //assert(adjColor < MaxDegree);
+                    Mark[adjColor] = true;
+                    //Find the largest color in the neighborhood
+                    if ( adjColor > maxColor )
+                        maxColor = adjColor;
+                }
+            } //End of for loop to traverse adjacency of v
+            int myColor;
+            for (myColor=0; myColor<=maxColor; myColor++) {
+                if ( Mark[myColor] == false )
+                    break;
+            }
+            if (myColor == maxColor)
+                myColor++; /* no available color with # less than cmax */      
+            vtxColor[v] = myColor; //Color the vertex
+
+            free(Mark);
+        } //End of outer for loop: for each vertex
+        time1  += omp_get_wtime();
+
+        //totalTime += time1;
+#ifdef PRINT_DETAILED_STATS_
+        printf("Time taken for Coloring:  %lf sec.\n", time1);
+#endif
+        ///////////////////////////////////////// PART 2 ////////////////////////////////////////
+        //Detect Conflicts:
+        //printf("Phase 2: Detect Conflicts, add to queue\n");    
+        //Add the conflicting vertices into a Q:
+        //Conflicts are resolved by changing the color of only one of the 
+        //two conflicting vertices, based on their random values 
+        time2 -= omp_get_wtime();
+#pragma omp parallel for
+        for (long Qi=0; Qi<QTail; Qi++) {
+            long v = Q[Qi]; //Q.pop_front();
+            long adj1 =(long) verPtr[v];
+            long adj2 =(long) verPtr[v+1];      
+            //Browse the adjacency set of vertex v
+            for(long k = adj1; k < adj2; k++ ) {
+                if ( v == verInd[k]) //Self-loops
+                    continue;
+                if ( vtxColor[v] == vtxColor[verInd[k]] ) {
+                    if ( (randValues[v] < randValues[verInd[k]]) || 
+                            ((randValues[v] == randValues[verInd[k]])&&(v < verInd[k])) ) {
+                        long whereInQ = __sync_fetch_and_add(&QtmpTail, 1);
+                        Qtmp[whereInQ] = v;//Add to the queue
+                        vtxColor[v] = -1;  //Will prevent v from being in conflict in another pairing
+                        break;
+                    }
+                } //End of if( vtxColor[v] == vtxColor[verInd[k]] )
+            } //End of inner for loop: w in adj(v)
+        } //End of outer for loop: for each vertex
+        time2  += omp_get_wtime();
+        //totalTime += time2;    
+        nConflicts += QtmpTail;
+        nLoops++;
+#ifdef PRINT_DETAILED_STATS_
+        printf("Num conflicts      : %ld \n", QtmpTail);
+        printf("Time for detection : %lf sec\n", time2);
+#endif
+        //Swap the two queues:
+        Qswap = Q;
+        Q = Qtmp; //Q now points to the second vector
+        Qtmp = Qswap;
+        QTail = QtmpTail; //Number of elements
+        QtmpTail = 0; //Symbolic emptying of the second queue    
+    } while (QTail > 0);
+
+    totalTime = time1+time2;
+    
+    //Check the number of colors used
+    int nColors = -1;
+    for (long v=0; v < NVer; v++ ) 
+        if (vtxColor[v] > nColors) nColors = vtxColor[v];
+
+
+#ifdef PRINT_DETAILED_STATS_
+    printf("***********************************************\n");
+    printf("Total number of threads    : %d \n", nT);    
+    printf("Total number of colors used: %d \n", nColors);    
+    printf("Number of conflicts overall: %ld \n", nConflicts);  
+    printf("Number of rounds           : %d \n", nLoops);      
+    printf("Total Time                 : %lf sec\n", totalTime);
+    printf("Time1                      : %lf sec\n", time1);
+    printf("Time2                      : %lf sec\n", time2);
+    printf("***********************************************\n");
+#endif  
+    // *totTime = totalTime;
+    //////////////////////////// /////////////////////////////////////////////////////////////
+    ///////////////////////////////// VERIFY THE COLORS /////////////////////////////////////
+    /////////////////////////////////////////////////////////////////////////////////////////
+    //Verify Results and Cleanup
+    int myConflicts = 0;
+#pragma omp parallel for
+    for (long v=0; v < NVer; v++ ) {
+        long adj1 = verPtr[v];
+        long adj2 = verPtr[v+1];
+        //Browse the adjacency set of vertex v
+        for(long k = adj1; k < adj2; k++ ) {
+            if ( v == verInd[k] ) //Self-loops
+                continue;
+            if ( vtxColor[v] == vtxColor[verInd[k]] ) {
+                __sync_fetch_and_add(&myConflicts, 1); //increment the counter
+            }
+        }//End of inner for loop: w in adj(v)
+    }//End of outer for loop: for each vertex
+    myConflicts = myConflicts / 2; //Have counted each conflict twice
+    
+    printf("nproc\t%d\t", nT);    
+    if (myConflicts > 0)
+        printf("Fail\t"); //printf("Check - WARNING: Number of conflicts detected after resolution: %d \n\n", myConflicts);
+    else
+        printf("Succ\t");//Check - SUCCESS: No conflicts exist\n\n");
+
+    printf("Color\t%d\t", nColors+1);    
+    printf("Time\t%lf\t", totalTime);
+    //printf("%lf\t", time1);
+    //printf("%lf\t", time2);
+    printf("Cnflct\t%ld\t", nConflicts);  
+    printf("Loops\t%d\n", nLoops);      
+    //Clean Up:
+    free(Q);
+    free(Qtmp);
+    free(randValues);
+
+    m_i_VertexColorCount=(unsigned int)(nColors);  //number of colors C <- nColors+1 //color 0 is an valid color 
+    //return nColors; //Return the number of colors used
+    return(_TRUE);
+}//end of function DistanceOneColoring_omp_cx
+#endif
+
+
+
+}//end of class GraphColoring
+//end of file GraphColoring
--- colpack-1.0.10.orig/GraphColoring/GraphColoring.h
+++ colpack-1.0.10/GraphColoring/GraphColoring.h
@@ -386,6 +386,8 @@ namespace ColPack
 
 		//Public Function 1478
 		void PrintVertexColorClasses();
+
+                int D1_Coloring_OMP();
 	};
 }
 #endif
--- colpack-1.0.10.orig/GraphColoring/GraphColoringInterface.cpp
+++ colpack-1.0.10/GraphColoring/GraphColoringInterface.cpp
@@ -160,6 +160,37 @@ namespace ColPack
 		return;
 	}
 
+        //Public Function ????
+	int GraphColoringInterface::DistanceOneColoring_OMP(string s_OrderingVariant)
+	{
+		m_T_Timer.Start();
+
+		int i_OrderingStatus = OrderVertices(s_OrderingVariant);
+
+		m_T_Timer.Stop();
+
+		m_d_OrderingTime = m_T_Timer.GetWallTime();
+
+		if(i_OrderingStatus != _TRUE)
+		{
+			cerr<<endl;
+			cerr<<s_OrderingVariant<<" Ordering Failed";
+			cerr<<endl;
+
+			return(1);
+		}
+
+		m_T_Timer.Start();
+
+		int i_ColoringStatus = GraphColoring::D1_Coloring_OMP();
+
+		m_T_Timer.Stop();
+
+		m_d_ColoringTime = m_T_Timer.GetWallTime();
+
+		return(i_ColoringStatus);
+	}
+
 	//Public Function 1604
 	int GraphColoringInterface::DistanceOneColoring(string s_OrderingVariant)
 	{
@@ -545,6 +576,8 @@ namespace ColPack
 			return RestrictedStarColoring(s_OrderingVariant);
 		} else if (s_ColoringVariant == "DISTANCE_TWO") {
 			return DistanceTwoColoring(s_OrderingVariant);
+		} else if (s_ColoringVariant == "DISTANCE_ONE_OMP") {
+			return DistanceOneColoring_OMP(s_OrderingVariant);
 		} else {
 			cout<<" Unknown Coloring Method "<<s_ColoringVariant<<". Please use a legal Coloring Method."<<endl;
 			return (_FALSE);
--- colpack-1.0.10.orig/GraphColoring/GraphColoringInterface.h
+++ colpack-1.0.10/GraphColoring/GraphColoringInterface.h
@@ -147,6 +147,7 @@ namespace ColPack
 
 		//Public Function 1604
 		int DistanceOneColoring(string s_OrderingVariant);
+		int DistanceOneColoring_OMP(string s_OrderingVariant);
 
 		//Public Function 1605
 		int DistanceTwoColoring(string s_OrderingVariant);
--- colpack-1.0.10.orig/GraphColoring/GraphInputOutput.cpp
+++ colpack-1.0.10/GraphColoring/GraphInputOutput.cpp
@@ -182,7 +182,7 @@ namespace ColPack
 		//initialize local data
 		int col=0, row=0, rowIndex=0, colIndex=0;
 		int entry_counter = 0, num_of_entries = 0;
-		bool value_not_specified = false;
+		//bool value_not_specified = false; //unused variable
 		//int num=0, numCount=0;
 		double value;
 		bool b_getValue = !b_getStructureOnly, b_symmetric;
@@ -198,7 +198,7 @@ namespace ColPack
 		  cout<<m_s_InputFile<<" not Found!"<<endl;
 		  exit(1);
 		}
-		else cout<<"Found file "<<m_s_InputFile<<endl;
+		//else cout<<"Found file "<<m_s_InputFile<<endl;
 
 		if (mm_read_banner(f, &matcode) != 0)
 		{
@@ -216,10 +216,10 @@ namespace ColPack
 		else b_symmetric = false;
 		//Check and make sure that the input file is supported
 		char * result = mm_typecode_to_str(matcode);
-		printf("Graph of Market Market type: [%s]\n", result);
+		//printf("Graph of Market Market type: [%s]\n", result);
 		free(result);
-		if (b_getValue) printf("\t Graph structure and VALUES will be read\n");
-		else printf("\t Read graph struture only. Values will NOT be read\n");
+		//if (b_getValue) printf("\t Graph structure and VALUES will be read\n");
+		//else printf("\t Read graph struture only. Values will NOT be read\n");
 		if( !( mm_is_coordinate(matcode) && (mm_is_symmetric(matcode) || mm_is_general(matcode) ) && ( mm_is_real(matcode) || mm_is_pattern(matcode) || mm_is_integer(matcode) ) ) ) {
 		  printf("Sorry, this application does not support this type.");
 		  exit(-1);
@@ -377,7 +377,8 @@ namespace ColPack
 		{
 			cout<<"Found File "<<m_s_InputFile<<endl;
 		}
-		int i_Dummy, i, j;
+		//int i_Dummy; //unused variable
+                int i, j;
 		int num, counter;
 		double d;
 		int nnz;
@@ -524,7 +525,7 @@ namespace ColPack
 		//populate the m_vi_Vertices, their Edges and Values at the same time
 		m_vi_Vertices[0]=0;
 		for(i=0; i<NROW; i++) {
-		  for(j=0; j<vvi_VertexAdjacency[i].size();j++) {
+		  for(j=0;(size_t)j<vvi_VertexAdjacency[i].size();j++) {
 		    m_vi_Edges[m_vi_Vertices[i]+j] = vvi_VertexAdjacency[i][j];
 		    if(VALCRD !=0) m_vd_Values[m_vi_Vertices[i]+j] = vvd_Values[i][j];
 		  }
@@ -793,7 +794,7 @@ namespace ColPack
 
 		int i_VertexCount, i_VertexDegree;
 
-		int i_EdgeCount;
+		//int i_EdgeCount; //unused variable
 
 		int i_VertexWeights, i_EdgeWeights;
 
@@ -857,7 +858,7 @@ namespace ColPack
 				}
 
 				i_VertexCount = atoi(vs_InputTokens[0].c_str());
-				i_EdgeCount = atoi(vs_InputTokens[1].c_str());
+				//i_EdgeCount = atoi(vs_InputTokens[1].c_str()); //unused variable
 
 				i_VertexWeights = _FALSE;
 				i_EdgeWeights = _FALSE;
@@ -1146,7 +1147,8 @@ namespace ColPack
 	{
 		int i;
 
-		int i_VertexCount, i_EdgeCount;
+		int i_VertexCount;
+                //int i_EdgeCount; //unused variable
 
 		i_VertexCount = (signed) m_vi_Vertices.size();
 
@@ -1366,15 +1368,15 @@ namespace ColPack
 			File file(s_InputFile);
 			string fileExtension = file.GetFileExtension();
 			if (isHarwellBoeingFormat(fileExtension)) {
-				cout<<"ReadHarwellBoeingAdjacencyGraph"<<endl;
+				//cout<<"ReadHarwellBoeingAdjacencyGraph"<<endl;
 				return ReadHarwellBoeingAdjacencyGraph(s_InputFile);
 			}
 			else if (isMeTiSFormat(fileExtension)) {
-				cout<<"ReadMeTiSAdjacencyGraph"<<endl;
+				//cout<<"ReadMeTiSAdjacencyGraph"<<endl;
 				return ReadMeTiSAdjacencyGraph(s_InputFile);
 			}
 			else if (isMatrixMarketFormat(fileExtension)) {
-				cout<<"ReadMatrixMarketAdjacencyGraph"<<endl;
+				//cout<<"ReadMatrixMarketAdjacencyGraph"<<endl;
 				return ReadMatrixMarketAdjacencyGraph(s_InputFile);
 			}
 			else { //other extensions
@@ -1383,15 +1385,15 @@ namespace ColPack
 			}
 		}
 		else if (s_fileFormat == "MM") {
-			cout<<"ReadMatrixMarketAdjacencyGraph"<<endl;
+			//cout<<"ReadMatrixMarketAdjacencyGraph"<<endl;
 			return ReadMatrixMarketAdjacencyGraph(s_InputFile);
 		}
 		else if (s_fileFormat == "HB") {
-			cout<<"ReadHarwellBoeingAdjacencyGraph"<<endl;
+			//cout<<"ReadHarwellBoeingAdjacencyGraph"<<endl;
 			return ReadHarwellBoeingAdjacencyGraph(s_InputFile);
 		}
 		else if (s_fileFormat == "MeTiS") {
-			cout<<"ReadMeTiSAdjacencyGraph"<<endl;
+			//cout<<"ReadMeTiSAdjacencyGraph"<<endl;
 			return ReadMeTiSAdjacencyGraph(s_InputFile);
 		}
 		else {
--- colpack-1.0.10.orig/GraphColoring/GraphOrdering.cpp
+++ colpack-1.0.10/GraphColoring/GraphOrdering.cpp
@@ -182,8 +182,6 @@ namespace ColPack
 
 		m_s_VertexOrderingVariant = "RANDOM";
 
-		int i;
-
 		int i_VertexCount;
 
 		i_VertexCount = STEP_DOWN((signed) m_vi_Vertices.size());
@@ -193,7 +191,7 @@ namespace ColPack
 		m_vi_OrderedVertices.resize((unsigned) i_VertexCount);
 
 		//initialize m_vi_OrderedVertices
-		for(unsigned int i = 0; i<i_VertexCount; i++) {
+		for(int i = 0; i<i_VertexCount; i++) {
 			m_vi_OrderedVertices[i] = i;
 		}
 
@@ -247,7 +245,7 @@ namespace ColPack
 		int i_HighestColor = _FALSE;
 
 		//Populate ColorGroups
-		for(int i=0; i < vi_VertexColors.size(); i++)
+		for(int i=0; i <(int)vi_VertexColors.size(); i++)
 		{
 			vvi_ColorGroups[vi_VertexColors[i]].push_back(i);
 
@@ -341,14 +339,14 @@ namespace ColPack
 		string tempS;
 		cout<<"vvpii_VertexEdgeMap.size() = "<<vvpii_VertexEdgeMap.size()<<endl;
 
-		for(int i=0; i<vvpii_VertexEdgeMap.size(); i++) {
+		for(int i=0; i<(int)vvpii_VertexEdgeMap.size(); i++) {
 			cout<<'['<<setw(4)<<i<<']';
-			for(int j=0; j< vvpii_VertexEdgeMap[i].size(); j++) {
+			for(int j=0; j<(int)vvpii_VertexEdgeMap[i].size(); j++) {
 				oout.str("");
 				oout << '(' << vvpii_VertexEdgeMap[i][j].first << ", " << vvpii_VertexEdgeMap[i][j].second << ')';
 				tempS = oout.str();
 				cout<<setw(10)<<tempS;
-				if(j%5 == 4 && j != vvpii_VertexEdgeMap[i].size() - 1) cout<<endl<<setw(6)<<' ';
+				if(j%5 == 4 && j !=((int)vvpii_VertexEdgeMap[i].size()) - 1) cout<<endl<<setw(6)<<' ';
 			}
 			cout<<endl;
 		}
@@ -1630,7 +1628,7 @@ namespace ColPack
 			currentOrderingID = vectorID2orderingID[i];
 			i_CurrentVertexBackDegre = 0;
 			//for through all the D1 neighbor of that vertex
-			for( unsigned int j = m_vi_Vertices[i]; j < m_vi_Vertices[i + 1]; j++) {
+			for( unsigned int j = m_vi_Vertices[i]; j <(unsigned int) m_vi_Vertices[i + 1]; j++) {
 				if(vectorID2orderingID[m_vi_Edges[j]] < currentOrderingID) i_CurrentVertexBackDegre++;
 			}
 			if( i_MaxBackDegree < i_CurrentVertexBackDegre) i_MaxBackDegree = i_CurrentVertexBackDegre;
--- colpack-1.0.10.orig/Main/Main.cpp
+++ colpack-1.0.10/Main/Main.cpp
@@ -1,39 +1,107 @@
-/* Notes:
- * - This code will crash if the matrix only has patterns (no value)
-//*/
-
 #include "ColPackHeaders.h"
-
+#include <cstring>
+#include <unordered_set>
 using namespace ColPack;
-using namespace std;
-
-
-
-#include "extra.h" //This .h file contains functions that are used in the below examples:
-					//ReadMM(), MatrixMultiplication...(), Times2Plus1point5(), displayMatrix() and displayCompressedRowMatrix()
-#include "stat.h"
+void usage();
 
-int main(int argc, const char* argv[]) {
-	vector<string> Orderings;
-	Orderings.push_back("NATURAL");
-	Orderings.push_back("LARGEST_FIRST");
-	Orderings.push_back("DYNAMIC_LARGEST_FIRST");
-	Orderings.push_back("SMALLEST_LAST");
-	Orderings.push_back("INCIDENCE_DEGREE");
-	Orderings.push_back("RANDOM");
-
-	vector<string> Colorings;
-	Colorings.push_back("EXPLICIT_COVERING__STAR_BICOLORING");
-	Colorings.push_back("EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING");
-	Colorings.push_back("IMPLICIT_COVERING__STAR_BICOLORING");
-	Colorings.push_back("IMPLICIT_COVERING__GREEDY_STAR_BICOLORING");
+int main(int argc, char* argv[]) {
+    string fname;
+    string order("LARGEST_FIRST");
+    string methd("DISTANCE_ONE");
+    bool   bVerbose(false);
+    unordered_set<string> ParaD1Color={"DISTANCE_ONE_OMP"};
+    unordered_set<string> BiColor={ 
+        "IMPLICIT_COVERING__STAR_BICOLORING",
+        "EXPLICIT_COVERING__STAR_BICOLORING",
+        "EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING",
+        "IMPLICIT_COVERING__GREEDY_STAR_BICOLORING"
+    };
+    unordered_set<string> PartialColor={ 
+        "COLUMN_PARTIAL_DISTANCE_TWO",
+        "ROW_PARTIAL_DISTANCE_TWO"
+    };
+   
+
+    for(int i=1; i<argc; i++){
+        if(argv[i][0]!='-') continue;
+        if(     !strcmp(argv[i], "-f")) fname = argv[++i];
+        else if(!strcmp(argv[i], "-o")) order = argv[++i];
+        else if(!strcmp(argv[i], "-m")) methd = argv[++i];
+        else if(!strcmp(argv[i], "-v")) bVerbose = true;
+        else printf("Warning: unknown input argument\"%s\"",argv[i]);
+    }   
+
+    if(fname.empty()) {usage(); exit(0); }
+    
+    if(BiColor.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nBiColoring\n",fname.c_str(), order.c_str(), methd.c_str());
+        BipartiteGraphBicoloringInterface *p = new BipartiteGraphBicoloringInterface(0, fname.c_str(), "AUTO_DETECTED");
+        p->Bicoloring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d", p->GetVertexColorCount());
+        delete p; p=nullptr;
+    }
+    else if(PartialColor.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nPartial Distantce Two Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        BipartiteGraphPartialColoringInterface *p = new BipartiteGraphPartialColoringInterface(0, fname.c_str(), "AUTO_DETECTED");
+        p->PartialDistanceTwoColoring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d", p->GetVertexColorCount());
+        delete p; p=nullptr;   
+    }
+    else if(ParaD1Color.count(methd)){
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nShared Memory General Graph Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        GraphColoringInterface *g = new GraphColoringInterface(SRC_FILE, fname.c_str(), "AUTO_DETECTED");
+        g->Coloring(order.c_str(), methd.c_str());
+        delete g; g=nullptr;  
+    }
+    else{
+        if(bVerbose) fprintf(stdout,"\ngraph: %s\norder: %s\nmethd: %s\nGeneral Graph Coloring\n",fname.c_str(), order.c_str(), methd.c_str());
+        GraphColoringInterface *g = new GraphColoringInterface(SRC_FILE, fname.c_str(), "AUTO_DETECTED");
+        g->Coloring(order.c_str(), methd.c_str());
+        if(bVerbose) fprintf(stdout, "number of colors: ");
+        fprintf(stdout,"%d",g->GetVertexColorCount());
+        delete g; g=nullptr;
+    }
+    if(bVerbose)fprintf(stdout,"\n\n"); 
+    return 0;
+}
 
-	map<string, bool> stat_flags;
-	stat_flags["output_append"]=true;
-	stat_flags["NumberOfColors"]=true;
-	stat_flags["Time"]=true;
+void usage(){
+    fprintf(stderr, "\nusage: ./ColPack -f <gname> -o <ordering> -m <methods> [-v]\n"
+            "-f <gname>  :  Input file name\n"
+            "-o <order>  :  LARGEST_FIRST\n"
+            "               SMALLEST_LAST,\n"
+            "               DYNAMIC_LARGEST_FIRST,\n"
+            "               INCIDENCE_DEGREE,\n"
+            "               NATURAL,\n"
+            "               RANDOM\n"
+            "-m <methods>:  DISTANCE_ONE\n"
+            "               ACYCLIC\n"
+            "               ACYCLIC_FOR_INDIRECT_RECOVERY\n"
+            "               STAR\n"
+            "               RESTRICTED_STAR\n"
+            "               DISTANCE_TWO\n"
+            "               --------------------\n"
+            "               DISTANCE_ONE_OMP    (automatic display: nThreads,num_colors,timall,conflicts,loops)\n "
+            "               --------------------\n"
+            "               IMPLICIT_COVERING__STAR_BICOLORING\n"
+            "               EXPLICIT_COVERING__STAR_BICOLORING\n"
+            "               EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING\n"
+            "               IMPLICIT_COVERING__GREEDY_STAR_BICOLORING\n"
+            "               --------------------\n"
+            "               COLUMN_PARTIAL_DISTANCE_TWO\n"
+            "               ROW_PARTIAL_DISTANCE_TWO\n"
+            "\n"
+            "-v          :  verbose for debug infomation\n"
+            "\n"
+            "\n"
+            "Examples:\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o LARGEST_FIRST -m DISTANCE_ONE -v\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o SMALLEST_LAST -m ACYCLIC -v\n"
+            "./ColPack -f ../Graphs/bcsstk01.mtx -o DYNAMIC_LARGEST_FIRST -m DISTANCE_ONE_OMP -v\n"
+            "\n"
+           ); 
+}
 
-	toFileBiC("/home/nguyend/Desktop/Duck/Research/Prog/graph/MM_collection/", "test1", Orderings,  Colorings,  stat_flags );
 
-	return 0;
-}
--- colpack-1.0.10.orig/Makefile.am
+++ colpack-1.0.10/Makefile.am
@@ -10,8 +10,9 @@ AM_CPPFLAGS =  $(COLPACK_COMMON_FLAGS) \
 		-I$(top_srcdir)/Recovery
 AM_LDFLAGS = $(COLPACK_COMMON_FLAGS)
 
+AM_CXXFLAGS = -std=c++11
 if ENABLE_OPENMP
-AM_CXXFLAGS = -fopenmp
+AM_CXXFLAGS += -fopenmp 
 endif
 
 LDADD = libColPack.la
--- colpack-1.0.10.orig/README.md
+++ colpack-1.0.10/README.md
@@ -6,11 +6,283 @@ http://cscapes.cs.purdue.edu/coloringpag
 ColPack's project home page:
 http://cscapes.cs.purdue.edu/coloringpage/
 
+# Table of Contents
+1. [ColPack](#colpack)
+2. [Installation Guilds](#build-and-compile-colpack-instructions)  
+	2.1 [Compile ColPack Without Install](#try-colpack-by-compile-and-run-without-installation)  
+	2.2 [Ubuntu Install](#ubuntu-build-instructions)  
+	2.3 [Windows Install](#windows-build-instructions)  
+	2.4 [MacOS Install](#mac-os-build-instructions)  
+	2.5 [Utilize the Installed Library](#after-the-build-use-colpack-as-installed-library)
+3. [Usages](#usage) 
+4. [HowToCite](#the-best-source-for-citing-this-work)
+  
+  
+ 
+# ColPack 
+
+ColPack is a package comprising of implementations of algorithms for the specialized vertex coloring problems discussed in the previous section as well as algorithms for a variety of related supporting tasks in derivative computation.
+
+### Coloring capabilities
+
+the table below gives a quick summary of all the coloring problems (on general and bipartite graphs) supported by ColPack.
+
+| General Graph Coloring | Bipartite Graph one-sided coloring | Bipartite Graph Bicoloring |  
+| ---- | ----------------- | -------------------|  
+| Distance 1 coloring  | Partial distance-2 coloring  | Star bicoloring |  
+| Distance 2 coloring | Partial distance-2 coloring  |   |  
+| Star coloring |      |   |  
+| Acyclic coloring   | |
+|  Restricted star coloring| |
+|  Triangular coloring| |
+
+All of the coloring problems listed in the above table are NP-hard. Their corresponding algorithms in ColPack are *greedy* heuristics in the sense that the algorithms progressively extend a partial coloring by processing one vertex at a time, in some order, in each step assigning a vertex the smallest allowable color. Listed beneath each coloring problem in the table is the complexity of the corresponding algorithm in ColPack. In the cases where ColPack has multiple algorithms for a problem (these are designated by the superscript †), the complexity expression corresponds to that of the fastest algorithm. In the complexity expressions,
+
+*the complexity of the corresponding algorithm can be found here [ColPack's project](http://cscapes.cs.purdue.edu/coloringpage/software.htm)*
+	
+
+
+### Ordering techniques
+
+The order in which vertices are processed in a greedy coloring algorithm determines the number of colors used by the algorithm. ColPack has implementations of various effective ordering techniques for each of the supported coloring problems. These are summarized in the table below.
+
+| General Graph Coloring | Bipartite Graph one-sided coloring | Bipartite Graph Bicoloring | 
+|---|---|---|
+| Natural          | Column Natural                     | Natural                    |
+| Largest First    | Column Largest First               | Largest First              |
+| Smallest Last    | Column Smallest Last               | Smallest Last              |
+| Incidence Degree | Column Incidence Degree            | Incidence Degree           |
+| Dynamic Largest First           | Row Natural         | Dynamic Largest First      |
+| Distance-2 Largest First        | Row Largest First   | Selective Largest First    |
+| Distance-2 Smallest Last        | Row Smallest Last   | Selective Smallest Last    |
+| Distance-2 Incidence Degree     | Row Incidence Degree| Selective Incidence Degree |
+| Distance-2 Dynamic Largest First|                     |  
+
+
+### Recovery routines
+
+Besides coloring and ordering capabilities, ColPack also has routines for recovering the numerical values of the entries of a derivative matrix from a compressed representation. In particular the following reconstruction routines are currently available:
+
+* Recovery routines for direct (via star coloring ) and substitution-based (via acyclic coloring) Hessian computation
+* Recovery routines for unidirectional, direct Jacobian computation (via column-wise or row-wise distance-2 coloring)
+* Recovery routines for bidirectional, direct Jacobian computation via star bicoloring
+
+
+### Graph construction routines
+
+Finally, as a supporting functionality, ColPack has routines for constructing bipartite graphs (for Jacobians) and adjacency graphs (for Hessians) from files specifying matrix sparsity structures in various formats, including Matrix Market, Harwell-Boeing and MeTis.
+
+### ColPack : organization
+ColPack is written in an object-oriented fashion in C++ heavily using the Standard Template Library (STL).  It is designed to be simple, modular, extensible and efficient. Figure 1 below gives an overview of the structure of the major classes of ColPack. 
+
+![ColPack Organization](http://cscapes.cs.purdue.edu/coloringpage/software_files/ColPack_structure_2.png)  
+
+
+Build and Compile ColPack Instructions
+======================================
+There are two ways to use ColPack, _Try without Installiation_ and _Build and Install_. The former is fast and easy to use, but is vulnerable for various OS enviroments settings, thus it requires the user know how to modify the makefile if met some compiling issue.  The later one is more robust and it will also collect the ColPack into a shared library which makes ColPack easy to cooperate with other applications. But it requires to pre-install automake(or CMake) software. 
+
+Try ColPack by Compile and Run without Installation
+---------------------------------------------------
+You can just try ColPack by download, compile and run it. This is the fastest and simplest way to use ColPack. Do the following instructions in terminals.
+
+    cd              
+    git clone https://github.com/CSCsw/ColPack.git   #Download ColPack
+    cd ColPack      # go to ColPack Root Directory
+    cd Example_Try  # go to Try ColPack folder
+    make            # compile the code
+
+After all source codes been compiled, we will generate a executable file `ColPack` under current folder.  
+The above instruction are tested under Ubuntu system. You may need to modify the Makefile to fit the different OS environments and compilers.(delete `-fopenmp` for mac os. Replace `-fopenmp` to `-Qopenmp` )for intel compiler.) 
+
 Ubuntu Build Instructions
-=========================
-In the `ColPack` directory run the following:
+-------------------------
+Install ColPack makes ColPack easy to use and it can also decreases the size of the execuable file. To install ColPack using **autotools** (requires that have installed **automake** on your machine.), follows the instructions below.:
+
+    cd   
+    git clone https://github.com/CSCsw/ColPack.git  #Download ColPack
+    cd ColPack             # ColPack Root Directory
+    autoreconf -vif                                
+    fullpath=$(pwd)        # modify fullpath to your destination folder if need
+    ./configure --prefix=${fullpath}  
+    make -j 4              # Where "4" is the number of cores on your machine
+    make install           # install lib and include/ColPack to destination  
+
+Append `--disable-openmp` to `./configure` above if you need to disable OpenMP.(MAC user and some Windows user)  
 
-    autoreconf -vif
-    ./configure --prefix=/path/to/install/
+ColPack also has experimental support for building with CMake, which you can do
+via the following:
+
+    mkdir build
+    cd build
+    cmake ..
     make -j 4   #Where "4" is the number of cores on your machine
+    ctest       #Run the examples in SampleDrivers/Basic folder
     make install
+
+Use `cmake -LH .` or `ccmake .` in the build directory to see a list of
+options, such as `ENABLE_EXAMPLES` and `ENABLE_OPENMP`, which you can set by
+running the following from the build directory:
+
+    cmake .. -DENABLE_OPENMP=ON
+    
+Windows Build Instructions
+--------------------------
+You can build ColPack's static library on Windows using Visual Studio 
+(tested with Visual Studio 2015) and CMake. Note, however, that you are not
+able to use OpenMP (Visual Studio supports only OpenMP 2.0), and cannot
+compile the ColPack executable (it depends on the POSIX getopt.h).
+
+If you are using CMake 3.4 or greater, you can build and use ColPack's
+shared library. If you have an older CMake, we still build the shared
+library, but you will not be able to use it because none of the symbols will
+be exported (Visual Studio will not generate a .lib file).
+
+On Windows, the examples link to the static library instead of the shared
+library.
+
+Unlike on UNIX, the static library is named ColPack_static (ColPack_static.lib)
+to avoid a name conflict with the shared library's ColPack.lib.
+
+Finally, some of the examples do not compile, seemingly because their
+filenames are too long.
+
+
+MAC OS Build Instructions
+-------------------------
+To install ColPack on Mac, you first need to install _Apple Xcode_ and _automake_. Since (it is well known that) Mac's default compiler clang doesn't support OpenMP well, you need either install _OpenMP_ and _gcc_ compiler or disable _OpenMP_ by `--disable-openmp` .(It's a well known problem, MAC's default compiler clang doesn't support OpenMP well.) 
+
+    cd   
+    git clone https://github.com/CSCsw/ColPack.git  #Download ColPack
+    cd ColPack             # ColPack Root Directory
+    autoreconf -vif                                
+    fullpath=$(pwd)        # modify fullpath to your destination folder if need
+    ./configure --prefix=${fullpath} --disable-openmp
+    make -j 4              # Where "4" is the number of cores on your machine
+    make install           # install lib and include/ColPack to destination  
+
+
+Another recommend altinative way is to install an Ubuntu system on your MAC with *VirtualBox* (or any other virtual machine software), then install ColPack on your virtual machines.
+    
+    
+After the Build, Use ColPack as Installed Library
+-------------------------------------------------
+After the build, we have already generate an executable file 'ColPack' under the colpack root directory. And you can use it.
+However if you want to write your own code and use ColPack as an shared library. Then follow the following ways:
+* export library's path to `LD_LIBRARY_PATH`
+* create your own code. 
+* include the relative ColPack header files within your code.
+* added `-ldl path/to/installed/library` and `-I /path/to/installed/include` to the compiler
+* compile the code
+
+We provide a template codes in `Example_Use_Library`
+
+
+USAGE
+=====
+
+After building (or try), you can run the following commands (from ColPack root directory  if
+using autotools, or from the build directory if using CMake):
+
+	$./ColPack -f <graph_file_name> -o <ordering> -m <methods> [-v]
+
+### DISPLAY HELP 
+	$./ColPack
+
+### OPTIONs 
+		
+	<gfile_name>:  Input file name
+	<ordering>  :  LARGEST_FIRST
+	               SMALLEST_LAST,
+	               DYNAMIC_LARGEST_FIRST,
+	               INCIDENCE_DEGREE,
+	               NATURAL,
+	               RANDOM
+	<methods>   :  DISTANCE_ONE
+	               ACYCLIC
+	               ACYCLIC_FOR_INDIRECT_RECOVERY
+	               STAR
+	               RESTRICTED_STAR
+	               DISTANCE_TWO
+	               --------------------
+	               DISTANCE_ONE_OMP    (automatic display: nThreads,num_colors,timall,conflicts,loops)
+	               --------------------
+	               IMPLICIT_COVERING__STAR_BICOLORING
+	               EXPLICIT_COVERING__STAR_BICOLORING
+	               EXPLICIT_COVERING__MODIFIED_STAR_BICOLORING
+	               IMPLICIT_COVERING__GREEDY_STAR_BICOLORING
+	               --------------------
+	               COLUMN_PARTIAL_DISTANCE_TWO
+	               ROW_PARTIAL_DISTANCE_TWO
+	
+	-v          :  verbose for debug infomation
+
+### EXAMPLES:
+	
+	./ColPack -f Graphs/bcsstk01.mtx -o LARGEST_FIRST -m DISTANCE_ONE -v
+	./ColPack -f Graphs/bcsstk01.mtx -o SMALLEST_LAST -m ACYCLIC -v
+	./ColPack -f Graphs/bcsstk01.mtx -o DYNAMIC_LARGEST_FIRST -m DISTANCE_ONE_OMP -v
+	
+### EXAMPLE OUTPUT
+
+	ReadMatrixMarketAdjacencyGraph
+	Found file Graphs/bcsstk01.mtx
+	Graph of Market Market type: [matrix coordinate real symmetric]
+			Graph structure and VALUES will be read
+
+	#DISTANCE_ONE Result: 
+	6  : (NATURAL)
+	6  : (LARGEST_FIRST)
+	6  : (DYNAMIC_LARGEST_FIRST)
+	6  : (SMALLEST_LAST)
+	6  : (INCIDENCE_DEGREE)
+	6  : (RANDOM)
+
+	#ACYCLIC Result: 
+	8  : (NATURAL)
+	8  : (LARGEST_FIRST)
+	8  : (DYNAMIC_LARGEST_FIRST)
+	8  : (SMALLEST_LAST)
+	8  : (INCIDENCE_DEGREE)
+	8  : (RANDOM)
+
+	#ACYCLIC_FOR_INDIRECT_RECOVERY Result: 
+	8  : (NATURAL)
+	8  : (LARGEST_FIRST)
+	8  : (DYNAMIC_LARGEST_FIRST)
+	8  : (SMALLEST_LAST)
+	8  : (INCIDENCE_DEGREE)
+	8  : (RANDOM)
+
+	#STAR Result: 
+	12  : (NATURAL)
+	12  : (LARGEST_FIRST)
+	12  : (DYNAMIC_LARGEST_FIRST)
+	12  : (SMALLEST_LAST)
+	12  : (INCIDENCE_DEGREE)
+	12  : (RANDOM)
+
+	#RESTRICTED_STAR Result: 
+	15  : (NATURAL)
+	15  : (LARGEST_FIRST)
+	15  : (DYNAMIC_LARGEST_FIRST)
+	15  : (SMALLEST_LAST)
+	15  : (INCIDENCE_DEGREE)
+	15  : (RANDOM)
+
+	#DISTANCE_TWO Result: 
+	15  : (NATURAL)
+	15  : (LARGEST_FIRST)
+	15  : (DYNAMIC_LARGEST_FIRST)
+	15  : (SMALLEST_LAST)
+	15  : (INCIDENCE_DEGREE)
+	15  : (RANDOM)
+
+
+
+
+
+The best source for citing this work
+====================================
+Assefaw H. Gebremedhin, Duc Nguyen, Mostofa Ali Patwary, and Alex Pothen, _[ColPack: Graph coloring software for derivative computation and beyond](http://dl.acm.org/citation.cfm?id=2513110&CFID=492318621&CFTOKEN=12698034)_, ACM Transactions on Mathematical Software, 40 (1), 30 pp., 2013.
+
--- colpack-1.0.10.orig/Recovery/HessianRecovery.cpp
+++ colpack-1.0.10/Recovery/HessianRecovery.cpp
@@ -427,7 +427,7 @@ namespace ColPack
 		unsigned int numOfNonZeros = RowIndex.size();
 
 //		#pragma omp parallel for default(none) schedule(static) shared(numOfNonZeros, ip2_RowIndex, ip2_ColumnIndex, dp2_HessianValue, RowIndex, ColumnIndex, HessianValue)
-		for(int i=0; i < numOfNonZeros; i++) {
+		for(size_t i=0; i < numOfNonZeros; i++) {
 			(*ip2_RowIndex)[i] = RowIndex[i];
 			(*ip2_ColumnIndex)[i] = ColumnIndex[i];
 			(*dp2_HessianValue)[i] = HessianValue[i];
@@ -516,7 +516,7 @@ namespace ColPack
 		(*ip2_ColumnIndex) = (unsigned int*) malloc(numOfNonZeros * sizeof(unsigned int));
 		(*dp2_HessianValue) = (double*) malloc(numOfNonZeros * sizeof(double)); //allocate memory for *dp2_HessianValue.
 
-		for(int i=0; i < numOfNonZeros; i++) {
+		for(size_t i=0; i < numOfNonZeros; i++) {
 			(*ip2_RowIndex)[i] = RowIndex[i];
 			(*ip2_ColumnIndex)[i] = ColumnIndex[i];
 			(*dp2_HessianValue)[i] = HessianValue[i];
@@ -1254,7 +1254,7 @@ namespace ColPack
 			int offset = 0;
 			i_VertexDegree = (signed) v2i_VertexAdjacency[i].size();
 			for(j=1; j<=NumOfNonzeros; j++) {
-				if( i > uip2_HessianSparsityPattern[i][j] ) {
+				if( (unsigned)i > uip2_HessianSparsityPattern[i][j] ) {
 				  offset++;
 				  continue;
 				}
@@ -1356,7 +1356,7 @@ cout<<"*WriteMatrixMarket_ADOLCInput("<<
 		(*uip2_ColumnIndex) = (unsigned int*) malloc(numOfNonZeros * sizeof(unsigned int));
 		(*dp2_HessianValue) = (double*) malloc(numOfNonZeros * sizeof(double)); //allocate memory for *dp2_HessianValue.
 
-		for(int i=0; i < numOfNonZeros; i++) {
+		for(size_t i=0; i < numOfNonZeros; i++) {
 			(*uip2_RowIndex)[i] = RowIndex[i];
 			(*uip2_ColumnIndex)[i] = ColumnIndex[i];
 			(*dp2_HessianValue)[i] = HessianValue[i];
@@ -1713,7 +1713,7 @@ cout<<"*WriteMatrixMarket_ADOLCInput("<<
 
 		unsigned int numOfNonZeros = returnValue;
 
-		for(int i=0; i < numOfNonZeros; i++) {
+		for(size_t i=0; i < numOfNonZeros; i++) {
 			(*ip2_RowIndex)[i] = RowIndex[i];
 			(*ip2_ColumnIndex)[i] = ColumnIndex[i];
 			(*dp2_HessianValue)[i] = HessianValue[i];
--- colpack-1.0.10.orig/Recovery/JacobianRecovery1D.cpp
+++ colpack-1.0.10/Recovery/JacobianRecovery1D.cpp
@@ -40,7 +40,7 @@ namespace ColPack
 			numOfNonZeros = uip2_JacobianSparsityPattern[i][0];
 			(*dp3_JacobianValue)[i] = (double*) malloc( (numOfNonZeros+1) * sizeof(double) );
 			(*dp3_JacobianValue)[i][0] = numOfNonZeros; //initialize value of the 1st entry
-			for(int j=1; j <= numOfNonZeros; j++) (*dp3_JacobianValue)[i][j] = 0.; //initialize value of other entries
+			for(size_t j=1; j <=  numOfNonZeros; j++) (*dp3_JacobianValue)[i][j] = 0.; //initialize value of other entries
 		}
 
 		return RecoverD2Row_RowCompressedFormat_usermem(g, dp2_CompressedMatrix, uip2_JacobianSparsityPattern, dp3_JacobianValue);
@@ -69,7 +69,7 @@ namespace ColPack
 		//Recover value of the Jacobian
 		for(unsigned int i=0; i < (unsigned int)rowCount; i++) {
 			numOfNonZeros = uip2_JacobianSparsityPattern[i][0];
-			for(int j=1; j <= numOfNonZeros; j++) {
+			for(size_t j=1; j <= numOfNonZeros; j++) {
 				(*dp3_JacobianValue)[i][j] = dp2_CompressedMatrix[vi_LeftVertexColors[i]][uip2_JacobianSparsityPattern[i][j]];
 			}
 
@@ -117,7 +117,7 @@ namespace ColPack
 		unsigned int numOfNonZerosInEachRow = 0;
 		for(unsigned int i=0; i < (unsigned int)rowCount; i++) {
 			numOfNonZerosInEachRow = uip2_JacobianSparsityPattern[i][0];
-			for(int j=1; j <= numOfNonZerosInEachRow; j++) {
+			for(size_t j=1; j <= numOfNonZerosInEachRow; j++) {
 				(*dp2_JacobianValue)[(*ip2_RowIndex)[i]+j-1] = dp2_CompressedMatrix[vi_LeftVertexColors[i]][uip2_JacobianSparsityPattern[i][j]];
 			}
 
@@ -186,7 +186,7 @@ namespace ColPack
 		g->GetLeftVertexColors(vi_LeftVertexColors);
 
 		int numOfNonZeros;
-		vector<int>* LeftVerticesPtr = g->GetLeftVerticesPtr();
+		//vector<int>* LeftVerticesPtr = g->GetLeftVerticesPtr();
 
 		//Recover value of the Jacobian
 
@@ -229,7 +229,7 @@ namespace ColPack
 		}
 		else cout<<"**Good!!!"<<endl;
 		Pause();
-		//*/
+		// */
 		return numOfNonZeros_count;
 
 	}
@@ -542,7 +542,7 @@ namespace ColPack
 		return (*LeftVerticesPtr)[rowCount];
 */
 		unsigned int numOfNonZeros_count = 0;
-		unsigned int ll=0;
+		//unsigned int ll=0;
 		for(unsigned int i=0; i < (unsigned int)rowCount; i++) {
 			numOfNonZeros = uip2_JacobianSparsityPattern[i][0];
 			for(unsigned int j=1; j <= numOfNonZeros; j++) {
@@ -688,12 +688,12 @@ namespace ColPack
 	int JacobianRecovery1D::CompareMatrix_CoordinateFormat_vs_RowCompressedFormat(int i_rowCount, unsigned int** ip2_RowIndex, unsigned int** ip2_ColumnIndex, double** dp2_JacobianValue,  int rowCount2, unsigned int *** uip3_SparsityPattern, double*** dp3_Value) {
 		bool fail_flag=false;
 		for(int i=0;i<i_rowCount;i++) {
-		  if((*ip2_RowIndex)[i] >= rowCount2) {
+		  if((*ip2_RowIndex)[i] >= (unsigned)rowCount2) {
 		    fail_flag = true;
 		    break;
 		  }
 
-		  int j =0;
+		  size_t j =0;
 		  for(;j<= (*uip3_SparsityPattern)[ (*ip2_RowIndex)[i] ][0];j++) {
 		    if((*uip3_SparsityPattern)[ (*ip2_RowIndex)[i] ][j] == (*ip2_ColumnIndex)[i]) break;
 		  }
--- colpack-1.0.10.orig/Utilities/extra.cpp
+++ colpack-1.0.10/Utilities/extra.cpp
@@ -65,7 +65,7 @@ int WriteMatrixMarket_ADOLCInput(string
 
     out_Matrix<<setprecision(10)<<scientific<<showpoint;
     for(int i = 0; i<i_Matrix_Row;i++) {
-      for(int j = 1; j<=uip2_SparsityPattern[i][0];j++) {
+      for(unsigned int j = 1; j<=uip2_SparsityPattern[i][0];j++) {
 	out_Matrix<<i+1<<" "<<uip2_SparsityPattern[i][j]+1;
 	out_Matrix<<endl;
       }
@@ -100,7 +100,7 @@ int WriteMatrixMarket_ADOLCInput(string
 
     out_Matrix<<setprecision(10)<<scientific<<showpoint;
     for(int i = 0; i<i_Matrix_Row;i++) {
-      for(int j = 1; j<=uip2_SparsityPattern[i][0];j++) {
+      for(unsigned int j = 1; j<=uip2_SparsityPattern[i][0];j++) {
 	out_Matrix<<i+1<<" "<<uip2_SparsityPattern[i][j]+1;
 	out_Matrix<<endl;
       }
@@ -156,7 +156,7 @@ int WriteMatrixMarket_ADOLCInput(string
 
     out_Matrix<<setprecision(10)<<scientific<<showpoint;
     for(int i = 0; i<i_Matrix_Row;i++) {
-      for(int j = 1; j<=uip2_SparsityPattern[i][0];j++) {
+      for(unsigned int j = 1; j<=uip2_SparsityPattern[i][0];j++) {
 	out_Matrix<<i+1<<" "<<uip2_SparsityPattern[i][j]+1<<" "<<dp2_Values[i][j];
 	out_Matrix<<endl;
       }
@@ -651,8 +651,8 @@ int buildDotWithColor(ColPack::GraphColo
   vector<bool> m_vi_ConflictEdges;
   m_vi_ConflictEdges.resize(m_vi_Edges.size(),false);
   if(ListOfConflicts.size()>0) {
-    for(int i=0; i<ListOfConflicts.size();i++) {
-      for(int j=0; j<ListOfConflicts[i].size()-1;j++) {
+    for(size_t i=0; i<ListOfConflicts.size();i++) {
+      for(int j=0; j< ((int)ListOfConflicts[i].size())-1;j++) {
 	int Vertex1 = ListOfConflicts[i][j];
 	int Vertex2 = ListOfConflicts[i][j+1];
 	if(Vertex1 > Vertex2) { //swap order
@@ -717,9 +717,9 @@ bool isValidOrdering(vector<int> & order
   int orderingNum = 0;
   isExist.resize(ordering.size(), false);
   index.resize(ordering.size(), false);
-  for(int i=0; i<ordering.size(); i++) {
+  for(int i=0; i<(int)ordering.size(); i++) {
     orderingNum = ordering[i] - offset;
-    if(orderingNum<0 || orderingNum>= ordering.size()) {
+    if(orderingNum<0 || (unsigned int)orderingNum>= ordering.size()) {
       cerr<<" This vertex # is not in the valid range [0, ordering.size()]. ordering[i]: "<<ordering[i]<<endl;
       return false;
     }
@@ -858,7 +858,7 @@ int ConvertCoordinateFormat2RowCompresse
   //Populate values of (*dp3_Pattern) and (*dp3_Values)
   count=0;
   for(int i=0; i<i_RowCount; i++) {
-    for(int j=1; j<= (*dp3_Pattern)[i][0]; j++) {
+    for(unsigned int j=1; j<= (*dp3_Pattern)[i][0]; j++) {
       (*dp3_Pattern)[i][j] = uip1_ColumnIndex[count];
       (*dp3_Values)[i][j] = dp1_HessianValue[count];
       count++;
@@ -1001,7 +1001,7 @@ int ConvertRowCompressedFormat2ADIC(unsi
     std::set<int> valset;
     std::vector<double> valuevector;
     valuevector.reserve(uip2_SparsityPattern_RowCompressedFormat[i][0]);
-    for(int j= 1; j <= uip2_SparsityPattern_RowCompressedFormat[i][0]; j++) {
+    for(unsigned int j= 1; j <= uip2_SparsityPattern_RowCompressedFormat[i][0]; j++) {
       valset.insert(uip2_SparsityPattern_RowCompressedFormat[i][j]);
       valuevector.push_back(dp2_Value[i][j]);
     }
@@ -1028,7 +1028,7 @@ int ConvertRowCompressedFormat2CSR(unsig
   (*ip_ColumnIndex) = new int[nnz];
   int nz_count=0;
   for(int i=0; i < i_rowCount; i++) {
-    for(int j=1; j<= uip2_SparsityPattern_RowCompressedFormat[i][0];j++) {
+    for(unsigned int j=1; j<= uip2_SparsityPattern_RowCompressedFormat[i][0];j++) {
       (*ip_ColumnIndex)[nz_count] = uip2_SparsityPattern_RowCompressedFormat[i][j];
       nz_count++;
     }
@@ -1047,7 +1047,9 @@ int ConvertMatrixMarketFormat2RowCompres
 	string m_s_InputFile=s_InputFile;
 
 	//initialize local data
-	int rowCounter=0, nonzeros=0, rowIndex=0, colIndex=0, nz_counter=0, entries=0;
+	int rowCounter=0, rowIndex=0, colIndex=0, nz_counter=0, entries=0;
+        //int nonzeros=0; //unused variable
+
 	//int num=0, numCount=0;
 	float value;
 	bool b_getValue, b_symmetric;
@@ -1429,7 +1431,7 @@ bool CompressedRowMatricesAreEqual(doubl
 }
 
 int DisplayADICFormat_Sparsity(std::list<std::set<int> > &lsi_valsetlist) {
-	int size = (lsi_valsetlist).size();
+	//int size = (lsi_valsetlist).size(); //unused variable
 	int rowIndex=-1, colIndex=-1;
 	std::list<std::set<int> >::iterator valsetlistiter = (lsi_valsetlist).begin();
 
@@ -1455,7 +1457,7 @@ int DisplayADICFormat_Sparsity(std::list
 }
 
 int DisplayADICFormat_Value(std::list<std::vector<double> > &lvd_Value) {
-	int size = (lvd_Value).size();
+	//int size = (lvd_Value).size(); //unused variable
 	int rowIndex=-1;
 	double value=0.;
 	std::list<std::vector<double> >::iterator valsetlistiter = (lvd_Value).begin();
--- colpack-1.0.10.orig/Utilities/mmio.cpp
+++ colpack-1.0.10/Utilities/mmio.cpp
@@ -461,13 +461,13 @@ char  *mm_typecode_to_str(MM_typecode ma
     char buffer[MM_MAX_LINE_LENGTH];
     const char *types[4];
 	char *mm_strdup(const char *);
-    int error =0;
+    //int error =0; //unused variable
 
     /* check for MTX type */
     if (mm_is_matrix(matcode))
         types[0] = MM_MTX_STR;
-    else
-        error=1;
+    //else             //unused variable
+    //    error=1;     //unused variable
 
     /* check for CRD or ARR matrix */
     if (mm_is_sparse(matcode))
--- colpack-1.0.10.orig/Utilities/stat.cpp
+++ colpack-1.0.10/Utilities/stat.cpp
@@ -248,7 +248,7 @@ void toFileC(string baseDir, string stat
 	// Create titles
 	if(stat_flags["NumberOfColors"]) {
 	  out_NumberOfColors<<"Style, Name";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_NumberOfColors<<", "<<Orderings[i];
 	  }
 	  out_NumberOfColors<<endl;
@@ -257,14 +257,14 @@ void toFileC(string baseDir, string stat
 	if(stat_flags["Time"]) {
 	  // line 1
 	  out_Time<<"Style,Name";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_Time<<", "<<Orderings[i]<<", , ";
 	  }
 	  out_Time<<endl;
 
 	  // line 2
 	  out_Time<<",";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_Time<<", OT, CT, TT";
 	  }
 	  out_Time<<endl;
@@ -272,7 +272,7 @@ void toFileC(string baseDir, string stat
 
 	if(stat_flags["MaxBackDegree"]) {
 	  out_MaxBackDegree<<"Name";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_MaxBackDegree<<", "<<Orderings[i];
 	  }
 	  out_MaxBackDegree<<endl;
@@ -285,7 +285,7 @@ void toFileC(string baseDir, string stat
 	for(unsigned int i=0;i < listOfGraphs.size(); i++){
 		printListOfGraphs(listOfGraphs,i);
 
-		for(int j=0;j < Colorings.size();j++) {
+		for(size_t j=0;j < Colorings.size();j++) {
 			cout<<Colorings[j]<<" Coloring"<<endl<<flush;
 			if(stat_flags["NumberOfColors"]) out_NumberOfColors<<Colorings[j]<<", ";
 			if(stat_flags["Time"]) out_Time<<Colorings[j]<<", ";
@@ -296,7 +296,7 @@ void toFileC(string baseDir, string stat
 			if(stat_flags["Time"]) out_Time<<stat_file_parsor.GetName();
 			if(stat_flags["MaxBackDegree"] && j == 0) out_MaxBackDegree<<stat_file_parsor.GetName();
 
-			for(int k=0;k < Orderings.size();k++) {
+			for(size_t k=0;k < Orderings.size();k++) {
 				current_time();
 
 				cout<<Orderings[k]<<" Ordering"<<endl<<flush;
@@ -477,7 +477,7 @@ void toFileStatisticForBipartiteGraph(st
 }
 
 void printListOfGraphs(vector <string>& listOfGraphs, int selected) {
-	for(int i=0; i<listOfGraphs.size();i++) {
+	for(int i=0; i<(int)listOfGraphs.size();i++) {
 		if(i!=selected) cout<<"  Graph: "<<listOfGraphs[i]<<endl;
 		else cout<<"=>Graph: "<<listOfGraphs[i]<<endl;
 	}
@@ -519,14 +519,14 @@ void toFileBiC(string baseDir, string st
 	// Create titles
 	if(stat_flags["NumberOfColors"]) {
 	  out_NumberOfColors<<"Style, Name";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_NumberOfColors<<", "<<Orderings[i]<<", , ";
 	  }
 	  out_NumberOfColors<<endl;
 
 	  // line 2
 	  out_NumberOfColors<<",";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_NumberOfColors<<", LEFT, RIGHT, TOTAL";
 	  }
 	  out_NumberOfColors<<endl;
@@ -535,14 +535,14 @@ void toFileBiC(string baseDir, string st
 	if(stat_flags["Time"]) {
 	  // line 1
 	  out_Time<<"Style,Name";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_Time<<", "<<Orderings[i]<<", , ";
 	  }
 	  out_Time<<endl;
 
 	  // line 2
 	  out_Time<<",";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(size_t i=0; i< Orderings.size(); i++) {
 	    out_Time<<", OT, CT, TT";
 	  }
 	  out_Time<<endl;
@@ -551,7 +551,7 @@ void toFileBiC(string baseDir, string st
     for(unsigned int i=0;i < listOfGraphs.size(); i++){
 		printListOfGraphs(listOfGraphs,i);
 
-		for(int j=0;j<Colorings.size();j++)
+		for(size_t j=0;j<Colorings.size();j++)
 		{
 			cout<<Colorings[j]<<" Coloring"<<endl<<flush;
 			if(stat_flags["NumberOfColors"]) out_NumberOfColors<<Colorings[j]<<", ";
@@ -562,7 +562,7 @@ void toFileBiC(string baseDir, string st
 			if(stat_flags["NumberOfColors"]) out_NumberOfColors<<stat_file_parsor.GetName();
 			if(stat_flags["Time"]) out_Time<<stat_file_parsor.GetName();
 
-			for (int k=0; k<Orderings.size(); k++)
+			for (size_t k=0; k<Orderings.size(); k++)
 			{
 				current_time();
 
@@ -633,7 +633,7 @@ void toFileBiPC(string baseDir, string s
 	// Create titles
 	if(stat_flags["NumberOfColors"]) {
 	  out_NumberOfColors<<"Style, Name";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(unsigned int i=0; i< Orderings.size(); i++) {
 	    out_NumberOfColors<<", "<<Orderings[i];
 	  }
 	  out_NumberOfColors<<endl;
@@ -642,14 +642,14 @@ void toFileBiPC(string baseDir, string s
 	if(stat_flags["Time"]) {
 	  // line 1
 	  out_Time<<"Style,Name";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(unsigned int i=0; i< Orderings.size(); i++) {
 	    out_Time<<", "<<Orderings[i]<<", , ";
 	  }
 	  out_Time<<endl;
 
 	  // line 2
 	  out_Time<<",";
-	  for(int i=0; i< Orderings.size(); i++) {
+	  for(unsigned int i=0; i< Orderings.size(); i++) {
 	    out_Time<<", OT, CT, TT";
 	  }
 	  out_Time<<endl;
@@ -658,7 +658,7 @@ void toFileBiPC(string baseDir, string s
     for(unsigned int i=0;i < listOfGraphs.size(); i++){
 		printListOfGraphs(listOfGraphs,i);
 
-		for(int j=0;j<Colorings.size();j++)
+		for(unsigned int j=0;j<Colorings.size();j++)
 		{
 			cout<<Colorings[j]<<" Coloring"<<endl<<flush;
 			if(stat_flags["NumberOfColors"]) out_NumberOfColors<<Colorings[j]<<", ";
@@ -669,7 +669,7 @@ void toFileBiPC(string baseDir, string s
 			if(stat_flags["NumberOfColors"]) out_NumberOfColors<<stat_file_parsor.GetName();
 			if(stat_flags["Time"]) out_Time<<stat_file_parsor.GetName();
 
-			for (int k=0; k<Orderings.size(); k++)	{
+			for (unsigned int k=0; k<Orderings.size(); k++)	{
 				current_time();
 
 				cout<<Orderings[k]<<" Ordering"<<endl<<flush;
--- colpack-1.0.10.orig/configure.ac
+++ colpack-1.0.10/configure.ac
@@ -36,43 +36,42 @@ AC_CONFIG_FILES(Makefile)
 AM_PROG_AR
 LT_INIT
 
-AC_MSG_CHECKING(Build examples)
+AC_MSG_CHECKING([Build examples])
 AC_ARG_ENABLE([examples],
      [AS_HELP_STRING([--enable-examples],[Build examples])],
-     [case "${enableval}" in
-       yes) examples=true ;;
-       no)  examples=false ;;
-       *) AC_MSG_ERROR([bad value ${enableval} for --enable-examples]) ;;
-     esac],[examples=false])
-     AM_CONDITIONAL([EXAMPLES], [test x$examples = xtrue])
+     [AS_CASE([${enableval}],
+       [yes],[examples=true],
+       [no],[examples=false],
+       [AC_MSG_ERROR([bad value ${enableval} for --enable-examples])])],
+     [examples=false])
+AM_CONDITIONAL([EXAMPLES], [test x$examples = xtrue])
+AC_MSG_RESULT([$examples])
 
-AC_MSG_CHECKING(OpenMP)
+AC_MSG_CHECKING([OpenMP])
 AC_ARG_ENABLE([openmp],
-     [AS_HELP_STRING([--enable-openmp],[Enable OpenMP])],
-     [case "${enableval}" in
-       yes) openmp=true ;;
-       no)  openmp=false ;;
-       *) AC_MSG_ERROR([bad value ${enableval} for --enable-openmp]) ;;
-     esac],[openmp=false])
-     AM_CONDITIONAL([ENABLE_OPENMP], [test x$openmp = xtrue])
+     [AS_HELP_STRING([--disable-openmp],[Disable OpenMP])],
+     [AS_CASE([${enableval}],
+       [yes],[openmp=true],
+       [no],[openmp=false],
+       [AC_MSG_ERROR([bad value ${enableval} for --disable-openmp])])],
+     [openmp=true])
+AM_CONDITIONAL([ENABLE_OPENMP], [test x$openmp = xtrue])
+AC_MSG_RESULT([$openmp])
 
 AC_OUTPUT
 
 # echo configuration
-echo \
-"
------------------------------------------------------------------------------
-Configuration:
-
-  C compiler:                       ${CC}
-  C++ compiler:                     ${CXX}
-  Linker:                           ${LD}
-  Source code location:             `pwd`
-  Install path:                     ${prefix}
-
-  CFLAGS:                           ${CFLAGS}
-  CXXFLAGS:                         ${CXXFLAGS}
-
-  Use OpenMP:                       ${openmp}
-  Build examples:                   ${examples}
-"
+AS_ECHO(["-----------------------------------------------------------------------------"])
+AS_ECHO(["Configuration:"])
+AS_ECHO([""])
+AS_ECHO(["  C compiler:                       ${CC}"])
+AS_ECHO(["  C++ compiler:                     ${CXX}"])
+AS_ECHO(["  Linker:                           ${LD}"])
+AS_ECHO(["  Source code location:             `pwd`"])
+AS_ECHO(["  Install path:                     ${prefix}"])
+AS_ECHO([""])
+AS_ECHO(["  CFLAGS:                           ${CFLAGS}"])
+AS_ECHO(["  CXXFLAGS:                         ${CXXFLAGS}"])
+AS_ECHO([""])
+AS_ECHO(["  Use OpenMP:                       ${openmp}"])
+AS_ECHO(["  Build examples:                   ${examples}"])
