[med-svn] [Git][med-team/gatb-core][upstream] New upstream version 1.4.2+dfsg

Michael R. Crusoe gitlab at salsa.debian.org
Mon Apr 13 12:04:28 BST 2020



Michael R. Crusoe pushed to branch upstream at Debian Med / gatb-core


Commits:
3fcc375e by Michael R. Crusoe at 2020-04-13T12:39:58+02:00
New upstream version 1.4.2+dfsg
- - - - -


19 changed files:

- + .circleci/config.yml
- − .travis.yml
- README.md
- gatb-core/CMakeLists.txt
- gatb-core/src/gatb/bank/impl/BankComposite.hpp
- gatb-core/src/gatb/bank/impl/BankFasta.hpp
- gatb-core/src/gatb/bank/impl/BankRandom.hpp
- gatb-core/src/gatb/bank/impl/BankSplitter.hpp
- gatb-core/src/gatb/kmer/impl/CountProcessorHistogram.hpp
- gatb-core/src/gatb/kmer/impl/SortingCountAlgorithm.cpp
- gatb-core/src/gatb/tools/compression/HeaderCoder.cpp
- gatb-core/src/gatb/tools/compression/Leon.hpp
- gatb-core/src/gatb/tools/math/Integer.hpp
- gatb-core/src/gatb/tools/math/LargeInt.hpp
- gatb-core/src/gatb/tools/math/LargeInt1.pri
- gatb-core/src/gatb/tools/math/NativeInt64.hpp
- gatb-core/src/gatb/tools/math/NativeInt8.hpp
- gatb-core/src/gatb/tools/misc/impl/Pool.hpp
- gatb-core/thirdparty/BooPHF/BooPHF.h


Changes:

=====================================
.circleci/config.yml
=====================================
@@ -0,0 +1,37 @@
+version: 1
+jobs:
+  build:
+      docker:
+        - image: "debian:stretch"
+      steps:
+        - checkout
+        - run:
+            name: Installing SUDO
+            command: 'apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*'
+        - run:
+            name: Installing GCC
+            command: 'apt-get update && apt-get install -y build-essential wget zlib1g zlib1g-dev'
+        - run:
+            name: Install CMAKE
+            command: |
+              wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz
+              tar -xvzf cmake-3.10.2-Linux-x86_64.tar.gz
+              chmod +x ./cmake-3.10.2-Linux-x86_64/bin/ccmake
+              chmod +x ./cmake-3.10.2-Linux-x86_64/bin/cmake
+              chmod +x ./cmake-3.10.2-Linux-x86_64/bin/cpack
+              chmod +x ./cmake-3.10.2-Linux-x86_64/bin/ctest
+              DIR=$(pwd)
+              ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/ccmake /usr/bin/ccmake
+              ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/cmake /usr/bin/cmake
+              ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/cpack /usr/bin/cpack
+              ln -s $DIR/cmake-3.10.2-Linux-x86_64/bin/ctest /usr/bin/ctest
+        - run:
+            name: Install CPPUnit
+            command: 'apt-get update && sudo apt-get install -y libcppunit-dev'
+        - run:
+            name: Creating Build Files
+            command: 'cd gatb-core && mkdir build && cd build && cmake .. && make -j 4'
+        # looks like circleci charges credits so i better not run the cppunit tests..
+        #        - run:
+        #            name: CPPUnit test
+        #            command: 'export CPPUNIT_VERBOSE=TRUE && cd gatb-core/build && ./bin/gatb-core-cppunit'


=====================================
.travis.yml deleted
=====================================
@@ -1,31 +0,0 @@
-language: cpp
-os:
-- linux
-compiler:
-- clang
-- gcc
-addons:
-  apt:
-    sources:
-    - ubuntu-toolchain-r-test
-    - llvm-toolchain-precise-3.7
-    - george-edison55-precise-backports  # for cmake 3
-    packages:
-    - libcppunit-dev
-    - g++-4.8
-    - clang-3.7
-    - cmake
-    - cmake-data
-install:
-- if [ "`echo $CXX`" == "g++" ]     && [ "$TRAVIS_OS_NAME" == "linux" ]; then export CXX=g++-4.8; fi
-- if [ "`echo $CXX`" == "clang++" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export CXX=clang++-3.7; fi
-matrix:
-script:
-- cd gatb-core
-- mkdir build
-- cd build
-- cmake .. && make 
-- export CPPUNIT_VERBOSE=TRUE && ./bin/gatb-core-cppunit
-env:
-  global:
-    - MAKEFLAGS="-j 4"


=====================================
README.md
=====================================
@@ -77,7 +77,7 @@ generate the wanted artifacts:
 The following third parties have to be already installed to compile GATB-Core:
 
 * a **C++/11 capable compiler** (*e.g.* gcc 4.7+, clang 3.5+, Apple/clang 6.0+)
-* **CMake 3.1+**
+* **CMake 3.10+**
 
 In addition, you could install these optional tools:
 


=====================================
gatb-core/CMakeLists.txt
=====================================
@@ -9,7 +9,7 @@ cmake_minimum_required (VERSION 3.10.0)
 # The default version number is the latest official build
 SET (gatb-core_VERSION_MAJOR 1)
 SET (gatb-core_VERSION_MINOR 4)
-SET (gatb-core_VERSION_PATCH 1)
+SET (gatb-core_VERSION_PATCH 2)
 
 # But, it is possible to define another release number during a local build
 IF (DEFINED MAJOR)


=====================================
gatb-core/src/gatb/bank/impl/BankComposite.hpp
=====================================
@@ -153,7 +153,7 @@ public:
     size_t getCompositionNb() { return _banks.size(); }
 
     /** \return maximum number of files. */
-    static const size_t getMaxNbFiles ()  { return 30; }
+    static size_t getMaxNbFiles ()  { return 30; }
 
     /** Return the vector of IBank objects.
      * \return the IBank objects. */


=====================================
gatb-core/src/gatb/bank/impl/BankFasta.hpp
=====================================
@@ -209,7 +209,7 @@ public:
 protected:
 
     /** \return maximum number of files. */
-    static const size_t getMaxNbFiles ()  { return 1; }
+    static size_t getMaxNbFiles ()  { return 1; }
 
     friend class Iterator;
 


=====================================
gatb-core/src/gatb/bank/impl/BankRandom.hpp
=====================================
@@ -81,7 +81,7 @@ public:
     void estimate (u_int64_t& number, u_int64_t& totalSize, u_int64_t& maxSize);
 
     /** \return maximum number of files. */
-    static const size_t getMaxNbFiles ()  { return 0; }
+    static size_t getMaxNbFiles ()  { return 0; }
 
     /************************************************************/
 


=====================================
gatb-core/src/gatb/bank/impl/BankSplitter.hpp
=====================================
@@ -99,7 +99,7 @@ public:
     void estimate (u_int64_t& number, u_int64_t& totalSize, u_int64_t& maxSize);
 
     /** \return maximum number of files. */
-    static const size_t getMaxNbFiles ()  { return 0; }
+    static size_t getMaxNbFiles ()  { return 0; }
 
     /************************************************************/
 


=====================================
gatb-core/src/gatb/kmer/impl/CountProcessorHistogram.hpp
=====================================
@@ -119,7 +119,7 @@ public:
 				fprintf(histo2Dfile,"%5i:\t",ii);
 				for(int jj=0; jj<= _histogram->getLength2(); jj++)
 				{
-					fprintf(histo2Dfile,"\t%6lli", _histogram->get2D(ii,jj));
+					fprintf(histo2Dfile,"\t%6lli", (long long)_histogram->get2D(ii,jj));
 				}
 				fprintf(histo2Dfile,"\n");
 			}
@@ -134,7 +134,7 @@ public:
 			//output 1D histogram now
 			for(int ii=1; ii<= _histogram->getLength(); ii++)
 			{
-				fprintf(histo1Dfile,"%i\t%lli",ii,_histogram->get(ii));
+				fprintf(histo1Dfile,"%i\t%lli",ii,(long long)_histogram->get(ii));
 				fprintf(histo1Dfile,"\n");
 			}
 			


=====================================
gatb-core/src/gatb/kmer/impl/SortingCountAlgorithm.cpp
=====================================
@@ -81,7 +81,7 @@ namespace gatb  {  namespace core  {   namespace kmer  {   namespace impl {
 static const char* progressFormat0 = "DSK: counting kmers                    ";
 static const char* progressFormat1 = "DSK: Pass %d/%d, Step 1: partitioning    ";
 static const char* progressFormat2 = "DSK: Pass %d/%d, Step 2: counting kmers  ";
-static const char* progressFormat4 = "DSK: nb solid kmers found : %-9ld  ";
+static const char* progressFormat4 = "DSK: nb solid kmers: %-9ld  ";
 
 /*********************************************************************
 ** METHOD  :


=====================================
gatb-core/src/gatb/tools/compression/HeaderCoder.cpp
=====================================
@@ -25,6 +25,7 @@
 #define PRINT_DEBUG_ENCODER
 #define PRINT_DEBUG_DECODER
 */
+#include <string>
 		
 
 //====================================================================================
@@ -703,13 +704,10 @@ void HeaderDecoder::decodeNumeric(){
 	u_int64_t value = CompressionUtils::decodeNumeric(_rangeDecoder, _numericModels[_misIndex]);
 	//_currentHeader += CompressionUtils::numberToString(value);
 	
-	char temp[200];
-	snprintf(temp,200,"%llu",value);
-	_currentHeader += string(temp);
-	//_currentHeader += to_string(value); // C++11
+	_currentHeader += std::to_string(value);
 	
 	#ifdef PRINT_DEBUG_DECODER
-		cout << "\t\t\tAdding: " << string(temp) << endl;
+		cout << "\t\t\tAdding: " << std::to_string(value) << endl;
 	#endif
 }
 
@@ -723,13 +721,10 @@ void HeaderDecoder::decodeDelta(){
 
 	value = CompressionUtils::getValueFromDelta(1, _prevFieldValues[_fieldIndex], value);
 	
-	char temp[200];
-	snprintf(temp,200,"%llu",value);
-	_currentHeader += string(temp);
-	//_currentHeader += to_string(value);
+	_currentHeader += std::to_string(value);
 	
 	#ifdef PRINT_DEBUG_DECODER
-		cout << "\t\t\tAdding: " << string(temp) << endl;
+		cout << "\t\t\tAdding: " << std::to_string(value) << endl;
 	#endif
 }
 
@@ -742,13 +737,10 @@ void HeaderDecoder::decodeDelta2(){
 	u_int64_t value = CompressionUtils::decodeNumeric(_rangeDecoder, _numericModels[_misIndex]);
 
 	value = CompressionUtils::getValueFromDelta(2, _prevFieldValues[_fieldIndex], value);
-	char temp[200];
-	snprintf(temp,200,"%llu",value);
-	_currentHeader += string(temp);
-	//_currentHeader += to_string(value);
+	_currentHeader += std::to_string(value);
 	
 	#ifdef PRINT_DEBUG_DECODER
-		cout << "\t\t\tAdding: " << string(temp) << endl;
+		cout << "\t\t\tAdding: " << std::to_string(value) << endl;
 	#endif
 }
 


=====================================
gatb-core/src/gatb/tools/compression/Leon.hpp
=====================================
@@ -462,7 +462,7 @@ public:
 	void estimate (u_int64_t& number, u_int64_t& totalSize, u_int64_t& maxSize);
 	
 	/** \return maximum number of files. */
-	static const size_t getMaxNbFiles ()  { return 0; }
+	static size_t getMaxNbFiles ()  { return 0; }
 	
 	/************************************************************/
 	


=====================================
gatb-core/src/gatb/tools/math/Integer.hpp
=====================================
@@ -114,7 +114,7 @@ public:
     /** Get the size of an instance of the class used by the variant  (ie. one of the Ti template class parameters)
      * \return the size of an object (in bits).
      */
-    const size_t getSize ()         { return boost::apply_visitor (Integer_size(),  *(*this)); }
+    size_t getSize ()         { return boost::apply_visitor (Integer_size(),  *(*this)); }
 
     /** Get the HDF5 type for the the class used by the variant  (ie. one of the Ti template class parameters)
      * \param[in] isCompound : tells whether the type is composed or not
@@ -310,7 +310,7 @@ private:
         template<typename T>  const char* operator() (const T& a) const { return a.getName();  }};
 
     struct Integer_size : public boost::static_visitor<const size_t>    {
-        template<typename T>  const size_t operator() (const T& a) const  { return a.getSize();  }};
+        template<typename T>  size_t operator() (const T& a) const  { return a.getSize();  }};
 
     struct Integer_plus : public boost::static_visitor<IntegerTemplate>    {
         template<typename T>              IntegerTemplate operator() (const T& a, const T& b) const  { return IntegerTemplate(a + b);  }


=====================================
gatb-core/src/gatb/tools/math/LargeInt.hpp
=====================================
@@ -137,7 +137,7 @@ public:
     /** Get the size of an instance of the class
      * \return the size of an object (in bits).
      */
-    static const size_t getSize ()  { return 8*sizeof(u_int64_t)*precision; }
+    static size_t getSize ()  { return 8*sizeof(u_int64_t)*precision; }
 
     /********************************************************************************/
     /** Returns lower 64 bits */


=====================================
gatb-core/src/gatb/tools/math/LargeInt1.pri
=====================================
@@ -46,7 +46,7 @@ public:
 
     static const char* getName ()  { return "LargeInt<1>"; }
 
-    static const size_t getSize ()  { return 8*sizeof(u_int64_t); }
+    static size_t getSize ()  { return 8*sizeof(u_int64_t); }
 
     /** Returns lower 64 bits */
     u_int64_t toInt () const  {  return value;  }


=====================================
gatb-core/src/gatb/tools/math/NativeInt64.hpp
=====================================
@@ -59,7 +59,7 @@ public:
      void setVal (u_int64_t c)  { value = c; }
 
     
-    static const size_t getSize ()  { return 8*sizeof(u_int64_t); }
+    static size_t getSize ()  { return 8*sizeof(u_int64_t); }
 
     NativeInt64 operator+  (const NativeInt64& other)   const   {  return value + other.value;  }
     NativeInt64 operator-  (const NativeInt64& other)   const   {  return value - other.value;  }


=====================================
gatb-core/src/gatb/tools/math/NativeInt8.hpp
=====================================
@@ -51,7 +51,7 @@ public:
 
     static const char* getName ()  { return "NativeInt8"; }
 
-    static const size_t getSize ()  { return 8*sizeof(u_int8_t); }
+    static size_t getSize ()  { return 8*sizeof(u_int8_t); }
 
     operator char ()  const {  return (char) value[0];  }
 


=====================================
gatb-core/src/gatb/tools/misc/impl/Pool.hpp
=====================================
@@ -359,6 +359,12 @@ public:
         capacity   = size+extraMem;
         mainbuffer = (char*) CALLOC(capacity,1);
         used_space = 0;
+        
+        if (mainbuffer == NULL)
+        {
+            throw system::Exception ("Pool reserve() failed for %lld (+ %lld extra for %d cores) bytes",
+                                      size, extraMem, _nbCores);
+        }
     }
 
     //should be thread safe


=====================================
gatb-core/thirdparty/BooPHF/BooPHF.h
=====================================
@@ -4,6 +4,7 @@
 
 #pragma once
 #include <stdio.h>
+#include <cinttypes>
 #include <climits>
 #include <stdlib.h>
 #include <iostream>
@@ -532,11 +533,11 @@ we need this 2-functors scheme because HashFunctors won't work with unordered_ma
 		//for debug purposes
 		void print() const
 		{
-			printf("bit array of size %lli: \n",_size);
+			printf("bit array of size %lld: \n",(long long)_size);
 			for(uint64_t ii = 0; ii< _size; ii++)
 			{
 				if(ii%10==0)
-					printf(" (%llu) ",ii);
+					printf(" (%lld) ",(long long)ii);
 				int val = (_bitArray[ii >> 6] >> (ii & 63 ) ) & 1;
 				printf("%i",val);
 			}
@@ -545,7 +546,7 @@ we need this 2-functors scheme because HashFunctors won't work with unordered_ma
 			printf("rank array : size %lu \n",_ranks.size());
 			for (uint64_t ii = 0; ii< _ranks.size(); ii++)
 			{
-				printf("%llu :  %lli,  ",ii,_ranks[ii]);
+				printf("%lld :  %lld,  ",(long long)ii,(long long)_ranks[ii]);
 			}
 			printf("\n");
 		}
@@ -836,7 +837,7 @@ we need this 2-functors scheme because HashFunctors won't work with unordered_ma
 
 			uint64_t totalsize =  totalsizeBitset +  _final_hash.size()*42*8 ;  // unordered map takes approx 42B per elem [personal test] (42B with uint64_t key, would be larger for other type of elem)
 
-			printf("Bitarray    %12llu  bits (%.2f %%)   (array + ranks )\n",
+			printf("Bitarray    %12" PRIu64 "  bits (%.2f %%)   (array + ranks )\n",
 				   totalsizeBitset, 100*(float)totalsizeBitset/totalsize);
 			printf("final hash  %12lu  bits (%.2f %%) (nb in final hash %lu)\n",
 				   _final_hash.size()*42*8, 100*(float)(_final_hash.size()*42*8)/totalsize,



View it on GitLab: https://salsa.debian.org/med-team/gatb-core/-/commit/3fcc375e5c77b3703a0742bf74b1e8f3ccd8fe3f

-- 
View it on GitLab: https://salsa.debian.org/med-team/gatb-core/-/commit/3fcc375e5c77b3703a0742bf74b1e8f3ccd8fe3f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200413/a47e95a6/attachment-0001.html>


More information about the debian-med-commit mailing list