Skip to content

Commit

Permalink
rolling back to old pufferfish b/c of the optimizations that made the…
Browse files Browse the repository at this point in the history
… previous unusable for longer k-mers
  • Loading branch information
hiraksarkar committed May 9, 2020
1 parent bf8f656 commit 54fea1f
Show file tree
Hide file tree
Showing 17 changed files with 670 additions and 4,377 deletions.
21 changes: 14 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,16 @@ set(GAT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
###

## Try and find TBB first
find_package(TBB 2018.0 COMPONENTS tbb tbbmalloc tbbmalloc_proxy)
find_package(TBB 2019.0 COMPONENTS tbb tbbmalloc tbbmalloc_proxy)

## NOTE: we actually require at least 2019 U4 or greater
## since we are using tbb::global_control. However, they
## seem not to have tagged minor version numbers in their
## source. Check before release if we can bump to the 2020
## version (requires having tbb 2020 for OSX).

if (${TBB_FOUND})
if (${TBB_VERSION} VERSION_GREATER_EQUAL 2018.0)
if (${TBB_VERSION} VERSION_GREATER_EQUAL 2019.0)
message("FOUND SUITABLE TBB VERSION : ${TBB_VERSION}")
set(TBB_TARGET_EXISTED TRUE)
else()
Expand Down Expand Up @@ -112,7 +118,8 @@ endif()
message("Build system will fetch and build Intel Threading Building Blocks")
message("==================================================================")
# These are useful for the custom install step we'll do later
set(TBB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/oneTBB-2019_U8)
set(TBB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/oneTBB-2020.2)
#set(TBB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/oneTBB-2019_U8)
#set(TBB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/tbb-2019_U8)
set(TBB_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/install)

Expand All @@ -126,10 +133,10 @@ set(TBB_CXXFLAGS "${TBB_CXXFLAGS} ${CXXSTDFLAG}")

externalproject_add(libtbb
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external
DOWNLOAD_COMMAND curl -k -L https://github.com/intel/tbb/archive/2019_U8.tar.gz -o tbb-2019_U8.tgz &&
${SHASUM} 6b540118cbc79f9cbc06a35033c18156c21b84ab7b6cf56d773b168ad2b68566 tbb-2019_U8.tgz &&
tar -xzvf tbb-2019_U8.tgz
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/oneTBB-2019_U8
DOWNLOAD_COMMAND curl -k -L https://github.com/oneapi-src/oneTBB/archive/v2020.2.tar.gz -o tbb-2020_U2.tgz &&
${SHASUM} 4804320e1e6cbe3a5421997b52199e3c1a3829b2ecb6489641da4b8e32faf500 tbb-2020_U2.tgz &&
tar -xzvf tbb-2020_U2.tgz
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/oneTBB-2020.2
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/install
PATCH_COMMAND "${TBB_PATCH_STEP}"
CONFIGURE_COMMAND ""
Expand Down
8 changes: 0 additions & 8 deletions external/twopaco/common/junctionapi/junctionapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ namespace TwoPaCo
}
}

void RestoreReader() {
/*if (!in_) {
throw std::runtime_error("No input file exists");
}*/
in_.clear();
in_.seekg(0, in_.beg);
nowChr_=0;
}
void RestoreVector(std::vector<bool> & mark, size_t chr)
{
JunctionPosition pos;
Expand Down
4 changes: 0 additions & 4 deletions external/twopaco/common/streamfastaparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ namespace TwoPaCo
}
}

void reset() {
parser_.reset(new TwoPaCo::StreamFastaParser(fileName_[0]));
}

bool NextChr(std::string & buf)
{
buf.clear();
Expand Down
3 changes: 3 additions & 0 deletions external/twopaco/graphconstructor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ project(twopaco CXX)
cmake_minimum_required(VERSION 3.9)

set(CMAKE_PROJECT_NAME twopaco)
#if(CMAKE_COMPILER_IS_GNUCXX)
# list(APPEND "CMAKE_CXX_FLAGS" "-std=c++0x")
#endif()

include_directories(${twopaco_SOURCE_DIR} ${TBB_INCLUDE_DIRS} "../common")
link_directories(${TBB_LIB_DIR})
Expand Down
5 changes: 2 additions & 3 deletions external/twopaco/graphconstructor/bifurcationstorage.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef _BIFURCATION_STORAGE_H_
#define _BIFURCATION_STORAGE_H_

#include <algorithm>
#include "common.h"
#include "compressedstring.h"

Expand Down Expand Up @@ -35,7 +34,7 @@ namespace TwoPaCo
}

size_t hashFunctionNumber = 3;
bitsPower = std::max(static_cast<size_t>(bitsPower), size_t(24));
bitsPower = max(bitsPower, size_t(24));
bifurcationFilter_.assign(uint64_t(1) << bitsPower, false);
hashFunction_.resize(hashFunctionNumber);
for (HashFunctionPtr & ptr : hashFunction_)
Expand Down Expand Up @@ -162,4 +161,4 @@ namespace TwoPaCo
};
}

#endif
#endif
4 changes: 2 additions & 2 deletions external/twopaco/graphconstructor/constructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class OddConstraint : public TCLAP::Constraint <unsigned int>
}
};

int buildGraphMain(std::vector<std::string>& args) //}int argc, char * argv[])
int buildGraphMain(std::vector<std::string>& args)//main(int argc, char * argv[])
{
OddConstraint constraint;
try
Expand Down Expand Up @@ -124,7 +124,7 @@ int buildGraphMain(std::vector<std::string>& args) //}int argc, char * argv[])
"file name",
cmd);

cmd.parse(args);//argc, argv);
cmd.parse(args);//(argc, argv);
using TwoPaCo::Range;
if (runTests.getValue())
{
Expand Down
4 changes: 3 additions & 1 deletion external/twopaco/graphdump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ project(graphdump CXX)
cmake_minimum_required(VERSION 3.9)

set(CMAKE_PROJECT_NAME graphdump)
#if(CMAKE_COMPILER_IS_GNUCXX)
# list(APPEND "CMAKE_CXX_FLAGS" "-std=c++0x")
#endif()

include_directories(${twopaco_SOURCE_DIR} ${TBB_INCLUDE_DIRS} "../common" "./" )
link_directories(${TBB_LIB_DIR})
Expand All @@ -14,7 +17,6 @@ install(TARGETS graphdump DESTINATION lib EXPORT graphdump-targets)
install(EXPORT graphdump-targets DESTINATION lib/graphdump)



set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "9")
set(CPACK_PACKAGE_VERSION_PATCH "3")
133 changes: 0 additions & 133 deletions external/twopaco/graphdump/binaryWriter.h

This file was deleted.

Loading

0 comments on commit 54fea1f

Please sign in to comment.