Loading CMakeLists.txt +22 −24 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ option(BUILD_STATIC "BUILD_STATIC" OFF) option(EXTRA "EXTRA" OFF) option(STATIC_LIBGCC "STATIC_LIBGCC" OFF) option(STATIC_LIBSTDC++ "STATIC_LIBSTDC++" OFF) option(SSSE3 "SSSE3" OFF) option(POPCNT "POPCNT" OFF) IF(STATIC_LIBSTDC++) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++") Loading @@ -29,19 +27,8 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") endif() if(SSSE3) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3") if(POPCNT) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt") endif() elseif(CMAKE_BUILD_MARCH) if(CMAKE_BUILD_MARCH) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${CMAKE_BUILD_MARCH}") else() include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCHNATIVE) if(COMPILER_SUPPORTS_MARCHNATIVE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif() endif() find_package(ZLIB REQUIRED) Loading @@ -52,7 +39,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif() if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_ITERATOR_DEBUG_LEVEL=0) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-uninitialized -Wno-ignored-attributes -Wno-unused-variable") endif() Loading @@ -61,7 +48,25 @@ include_directories( "${CMAKE_SOURCE_DIR}/src" "${ZLIB_INCLUDE_DIR}") add_executable(diamond src/run/main.cpp set(DISPATCH_OBJECTS "src/dp/swipe/banded_3frame_swipe.cpp" "src/dp/swipe/swipe.cpp" "src/dp/swipe/banded_swipe.cpp" "src/search/collision.cpp" "src/search/stage1.cpp" "src/search/stage2.cpp" "src/tools/benchmark.cpp" "src/dp/swipe/swipe_wrapper.cpp" ) add_library(arch_generic OBJECT ${DISPATCH_OBJECTS}) target_compile_options(arch_generic PUBLIC -DDISPATCH_ARCH=ARCH_GENERIC) add_library(arch_sse4_1 OBJECT ${DISPATCH_OBJECTS}) target_compile_options(arch_sse4_1 PUBLIC -DDISPATCH_ARCH=ARCH_SSE4_1 -mssse3 -mpopcnt -msse4.1) add_executable(diamond $<TARGET_OBJECTS:arch_generic> $<TARGET_OBJECTS:arch_sse4_1> src/run/main.cpp src/basic/config.cpp src/basic/score_matrix.cpp src/blast/blast_filter.cpp Loading @@ -78,7 +83,6 @@ add_executable(diamond src/run/main.cpp src/data/reference.cpp src/data/seed_histogram.cpp src/output/daa_record.cpp src/search/search.cpp src/util/command_line_parser.cpp src/util/seq_file_format.cpp src/util/util.cpp Loading @@ -88,7 +92,6 @@ add_executable(diamond src/run/main.cpp src/dp/ungapped_align.cpp src/run/tools.cpp src/dp/greedy_align.cpp src/search/stage2.cpp src/output/output_format.cpp src/output/join_blocks.cpp src/data/frequent_seeds.cpp Loading @@ -99,7 +102,6 @@ add_executable(diamond src/run/main.cpp src/output/blast_pairwise_format.cpp src/dp/comp_based_stats.cpp src/run/double_indexed.cpp src/search/collision.cpp src/output/sam_format.cpp src/align/align.cpp src/search/setup.cpp Loading @@ -107,9 +109,7 @@ add_executable(diamond src/run/main.cpp src/data/taxonomy.cpp src/lib/tantan/tantan.cc src/basic/masking.cpp src/dp/swipe/swipe.cpp src/dp/banded_sw.cpp src/data/sorted_list.cpp src/data/seed_set.cpp src/util/simd.cpp src/output/taxon_format.cpp Loading @@ -118,8 +118,6 @@ add_executable(diamond src/run/main.cpp src/output/target_culling.cpp src/align/greedy_pipeline.cpp src/align/swipe_pipeline.cpp src/dp/swipe/banded_3frame_swipe.cpp src/dp/swipe/banded_swipe.cpp src/align/banded_swipe_pipeline.cpp src/data/ref_dictionary.cpp src/util/io/compressed_stream.cpp Loading @@ -137,7 +135,6 @@ add_executable(diamond src/run/main.cpp src/data/taxonomy_nodes.cpp src/util/algo/MurmurHash3.cpp src/search/stage0.cpp src/util/memory/memory_pool.cpp src/data/seed_array.cpp src/output/paf_format.cpp src/util/system/system.cpp Loading @@ -150,6 +147,7 @@ add_executable(diamond src/run/main.cpp src/util/system/getRSS.cpp src/util/math/sparse_matrix.cpp src/lib/tantan/LambdaCalculator.cc src/data/taxonomy_filter.cpp ) if(EXTRA) Loading README.md +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ Keep posted about new developments by following me on [](https://travis-ci.org/bbuchfink/diamond) [](https://anaconda.org/bioconda/diamond)  [](https://anaconda.org/bioconda/diamond) Quick start guide Loading @@ -32,7 +31,7 @@ quick example for setting up and using the program on Linux. Installing the software on your system may be done by downloading it in binary format for immediate use: wget http://github.com/bbuchfink/diamond/releases/download/v0.9.26/diamond-linux64.tar.gz wget http://github.com/bbuchfink/diamond/releases/download/v0.9.28/diamond-linux64.tar.gz tar xzf diamond-linux64.tar.gz The extracted `diamond` binary file should be moved to a directory Loading build_simple.sh +1 −0 Original line number Diff line number Diff line Loading @@ -82,4 +82,5 @@ g++ -std=gnu++11 -DNDEBUG -O3 -Wno-deprecated-declarations $1 $2 $3 \ src/util/system/getRSS.cpp \ src/util/math/sparse_matrix.cpp \ src/lib/tantan/LambdaCalculator.cc \ src/data/taxonomy_filter.cpp \ -lz -lpthread -o diamond src/ChangeLog +11 −0 Original line number Diff line number Diff line [0.9.28] - Fixed a bug that could cause alignment score overflows for scores > 65535 in frameshift alignment mode. - Fixed a clang compiler error. [0.9.27] - Improved performance of the seed matching stage. - Seed frequency counts are computed based on hit seeds. - Added option `--taxon-exclude` to exclude list of taxon ids from search. - Compiling from source will no longer perform a native build. Instead, a portable binary that contains code paths for multiple architectures will be produced, with dispatch logic that is invoked at runtime. [0.9.26] - Fixed a bug that could cause undefined behaviour when using a database file of format version < 2. - Fixed a compiler error when compiled as generic C++. Loading src/align/align.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ void align_worker(size_t thread_id, const Parameters *params, const Metadata *me QueryMapper *mapper; if (config.ext == Config::swipe) mapper = new ExtensionPipeline::Swipe::Pipeline(*params, hits.query, hits.begin, hits.end); else if (config.frame_shift != 0) else if (config.frame_shift != 0 || config.ext == Config::banded_swipe) mapper = new ExtensionPipeline::BandedSwipe::Pipeline(*params, hits.query, hits.begin, hits.end, dp_stat, hits.target_parallel); else mapper = new ExtensionPipeline::Greedy::Pipeline(*params, hits.query, hits.begin, hits.end); Loading Loading @@ -142,7 +142,6 @@ void align_queries(Trace_pt_buffer &trace_pts, Consumer* output_file, const Para threads.emplace_back(heartbeat_worker, query_range.second); size_t n_threads = config.load_balancing == Config::query_parallel ? (config.threads_align == 0 ? config.threads_ : config.threads_align) : 1; for (size_t i = 0; i < n_threads; ++i) //threads.push_back(launch_thread(static_cast<void(*)(size_t)>(&align_worker), i)); threads.emplace_back(align_worker, i, ¶ms, &metadata); for (auto &t : threads) t.join(); Loading Loading
CMakeLists.txt +22 −24 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ option(BUILD_STATIC "BUILD_STATIC" OFF) option(EXTRA "EXTRA" OFF) option(STATIC_LIBGCC "STATIC_LIBGCC" OFF) option(STATIC_LIBSTDC++ "STATIC_LIBSTDC++" OFF) option(SSSE3 "SSSE3" OFF) option(POPCNT "POPCNT" OFF) IF(STATIC_LIBSTDC++) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++") Loading @@ -29,19 +27,8 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") endif() if(SSSE3) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3") if(POPCNT) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt") endif() elseif(CMAKE_BUILD_MARCH) if(CMAKE_BUILD_MARCH) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${CMAKE_BUILD_MARCH}") else() include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCHNATIVE) if(COMPILER_SUPPORTS_MARCHNATIVE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif() endif() find_package(ZLIB REQUIRED) Loading @@ -52,7 +39,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif() if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_ITERATOR_DEBUG_LEVEL=0) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-uninitialized -Wno-ignored-attributes -Wno-unused-variable") endif() Loading @@ -61,7 +48,25 @@ include_directories( "${CMAKE_SOURCE_DIR}/src" "${ZLIB_INCLUDE_DIR}") add_executable(diamond src/run/main.cpp set(DISPATCH_OBJECTS "src/dp/swipe/banded_3frame_swipe.cpp" "src/dp/swipe/swipe.cpp" "src/dp/swipe/banded_swipe.cpp" "src/search/collision.cpp" "src/search/stage1.cpp" "src/search/stage2.cpp" "src/tools/benchmark.cpp" "src/dp/swipe/swipe_wrapper.cpp" ) add_library(arch_generic OBJECT ${DISPATCH_OBJECTS}) target_compile_options(arch_generic PUBLIC -DDISPATCH_ARCH=ARCH_GENERIC) add_library(arch_sse4_1 OBJECT ${DISPATCH_OBJECTS}) target_compile_options(arch_sse4_1 PUBLIC -DDISPATCH_ARCH=ARCH_SSE4_1 -mssse3 -mpopcnt -msse4.1) add_executable(diamond $<TARGET_OBJECTS:arch_generic> $<TARGET_OBJECTS:arch_sse4_1> src/run/main.cpp src/basic/config.cpp src/basic/score_matrix.cpp src/blast/blast_filter.cpp Loading @@ -78,7 +83,6 @@ add_executable(diamond src/run/main.cpp src/data/reference.cpp src/data/seed_histogram.cpp src/output/daa_record.cpp src/search/search.cpp src/util/command_line_parser.cpp src/util/seq_file_format.cpp src/util/util.cpp Loading @@ -88,7 +92,6 @@ add_executable(diamond src/run/main.cpp src/dp/ungapped_align.cpp src/run/tools.cpp src/dp/greedy_align.cpp src/search/stage2.cpp src/output/output_format.cpp src/output/join_blocks.cpp src/data/frequent_seeds.cpp Loading @@ -99,7 +102,6 @@ add_executable(diamond src/run/main.cpp src/output/blast_pairwise_format.cpp src/dp/comp_based_stats.cpp src/run/double_indexed.cpp src/search/collision.cpp src/output/sam_format.cpp src/align/align.cpp src/search/setup.cpp Loading @@ -107,9 +109,7 @@ add_executable(diamond src/run/main.cpp src/data/taxonomy.cpp src/lib/tantan/tantan.cc src/basic/masking.cpp src/dp/swipe/swipe.cpp src/dp/banded_sw.cpp src/data/sorted_list.cpp src/data/seed_set.cpp src/util/simd.cpp src/output/taxon_format.cpp Loading @@ -118,8 +118,6 @@ add_executable(diamond src/run/main.cpp src/output/target_culling.cpp src/align/greedy_pipeline.cpp src/align/swipe_pipeline.cpp src/dp/swipe/banded_3frame_swipe.cpp src/dp/swipe/banded_swipe.cpp src/align/banded_swipe_pipeline.cpp src/data/ref_dictionary.cpp src/util/io/compressed_stream.cpp Loading @@ -137,7 +135,6 @@ add_executable(diamond src/run/main.cpp src/data/taxonomy_nodes.cpp src/util/algo/MurmurHash3.cpp src/search/stage0.cpp src/util/memory/memory_pool.cpp src/data/seed_array.cpp src/output/paf_format.cpp src/util/system/system.cpp Loading @@ -150,6 +147,7 @@ add_executable(diamond src/run/main.cpp src/util/system/getRSS.cpp src/util/math/sparse_matrix.cpp src/lib/tantan/LambdaCalculator.cc src/data/taxonomy_filter.cpp ) if(EXTRA) Loading
README.md +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ Keep posted about new developments by following me on [](https://travis-ci.org/bbuchfink/diamond) [](https://anaconda.org/bioconda/diamond)  [](https://anaconda.org/bioconda/diamond) Quick start guide Loading @@ -32,7 +31,7 @@ quick example for setting up and using the program on Linux. Installing the software on your system may be done by downloading it in binary format for immediate use: wget http://github.com/bbuchfink/diamond/releases/download/v0.9.26/diamond-linux64.tar.gz wget http://github.com/bbuchfink/diamond/releases/download/v0.9.28/diamond-linux64.tar.gz tar xzf diamond-linux64.tar.gz The extracted `diamond` binary file should be moved to a directory Loading
build_simple.sh +1 −0 Original line number Diff line number Diff line Loading @@ -82,4 +82,5 @@ g++ -std=gnu++11 -DNDEBUG -O3 -Wno-deprecated-declarations $1 $2 $3 \ src/util/system/getRSS.cpp \ src/util/math/sparse_matrix.cpp \ src/lib/tantan/LambdaCalculator.cc \ src/data/taxonomy_filter.cpp \ -lz -lpthread -o diamond
src/ChangeLog +11 −0 Original line number Diff line number Diff line [0.9.28] - Fixed a bug that could cause alignment score overflows for scores > 65535 in frameshift alignment mode. - Fixed a clang compiler error. [0.9.27] - Improved performance of the seed matching stage. - Seed frequency counts are computed based on hit seeds. - Added option `--taxon-exclude` to exclude list of taxon ids from search. - Compiling from source will no longer perform a native build. Instead, a portable binary that contains code paths for multiple architectures will be produced, with dispatch logic that is invoked at runtime. [0.9.26] - Fixed a bug that could cause undefined behaviour when using a database file of format version < 2. - Fixed a compiler error when compiled as generic C++. Loading
src/align/align.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ void align_worker(size_t thread_id, const Parameters *params, const Metadata *me QueryMapper *mapper; if (config.ext == Config::swipe) mapper = new ExtensionPipeline::Swipe::Pipeline(*params, hits.query, hits.begin, hits.end); else if (config.frame_shift != 0) else if (config.frame_shift != 0 || config.ext == Config::banded_swipe) mapper = new ExtensionPipeline::BandedSwipe::Pipeline(*params, hits.query, hits.begin, hits.end, dp_stat, hits.target_parallel); else mapper = new ExtensionPipeline::Greedy::Pipeline(*params, hits.query, hits.begin, hits.end); Loading Loading @@ -142,7 +142,6 @@ void align_queries(Trace_pt_buffer &trace_pts, Consumer* output_file, const Para threads.emplace_back(heartbeat_worker, query_range.second); size_t n_threads = config.load_balancing == Config::query_parallel ? (config.threads_align == 0 ? config.threads_ : config.threads_align) : 1; for (size_t i = 0; i < n_threads; ++i) //threads.push_back(launch_thread(static_cast<void(*)(size_t)>(&align_worker), i)); threads.emplace_back(align_worker, i, ¶ms, &metadata); for (auto &t : threads) t.join(); Loading