Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e1f510c
Added regression tests
r-barnes Jul 17, 2020
c1c96d2
Fix kernel length bug
r-barnes Jul 17, 2020
a55371e
Align kernels to show analogous structure
r-barnes Jul 10, 2020
ca60dd9
Fix driver spacing to reveal analogies between kernels
r-barnes Jul 10, 2020
37ed0ff
Make some stuff in driver arguments const
r-barnes Jul 10, 2020
99aed0a
Parallelize argument structure of drivers
r-barnes Jul 10, 2020
46157c0
Merge driver kernels
r-barnes Jul 10, 2020
e9e3232
Check input arguments to the test program
r-barnes Jul 8, 2020
275d5f4
Correct README.md file
r-barnes Jul 8, 2020
390fef8
Drop .DS_Store
r-barnes Jul 8, 2020
a5599f5
Improve file I/O
r-barnes Jul 10, 2020
d9a0e5f
Compile with Wall and -Wextra
r-barnes Jul 10, 2020
8220928
Rearrange project into a standard library form
r-barnes Jul 10, 2020
979e7a0
Fix up timers
r-barnes Jul 10, 2020
89b8112
Add beginnings of unit tests
r-barnes Jul 10, 2020
37edf61
Clean up and test getMaxLength()
r-barnes Jul 10, 2020
3f68a95
Use std::array in main.cpp
r-barnes Jul 10, 2020
fe1b0a8
Initialize pointers to nullptr
r-barnes Jul 10, 2020
2f735b5
Clean up some integer types warnings and use std::array for streams
r-barnes Jul 10, 2020
0cbe824
Switch to using type-safe and count-safe memory allocations
r-barnes Jul 10, 2020
584ec68
Simplify calculation for segments assigned to each GPU
r-barnes Jul 11, 2020
8ae3737
Add the PageLockedString class
r-barnes Jul 11, 2020
0e64e36
Check that kernels executed and compile for all GPU target types
r-barnes Jul 17, 2020
7bf6291
Templated reverse kernels
r-barnes Jul 17, 2020
7783396
Merge warpReduceMax_with_index and warpReduceMax_with_index_reverse
r-barnes Jul 17, 2020
36be82d
Merge blockShuffleReduce_with_index_reverse and blockShuffleReduce_wi…
r-barnes Jul 17, 2020
fdf2b78
Merge sequence_dna_kernel and sequence_aa_kernel
r-barnes Jul 17, 2020
8aa14b0
Make sequence_kernel and sequence_kernel_reverse more analogous
r-barnes Jul 17, 2020
187af22
Merge sequence_forward and sequence_reverse
r-barnes Jul 17, 2020
19a3f07
Make liberal use of const in kernels
r-barnes Jul 17, 2020
70c23d6
Unittests for findMaxFour
r-barnes Jul 21, 2020
318028c
Add unittests for warpReduceMax_with_index and fix a bug
r-barnes Jul 21, 2020
d29369c
Add unittests and simplify blockShuffleReduce_with_index
r-barnes Jul 21, 2020
1580bef
Simplifying sequence_process
r-barnes Jul 21, 2020
6ea187c
Pack variables into cells and simplify value rotation
r-barnes Jul 22, 2020
3d7cfd8
Remove another sync point
r-barnes Jul 22, 2020
d92bccc
Remove explicit int cast and fix some formatting
r-barnes Jul 22, 2020
e42f6e6
Simplify get_new_min_length
r-barnes Jul 24, 2020
f92bd38
Add reordering
r-barnes Jul 25, 2020
7efd3fe
Update to use alignment boilerplate library
r-barnes Aug 1, 2020
246a741
Switch to using albp's stream manager
r-barnes Aug 2, 2020
3f0cb92
Remove progress indicators and adjust chunk size
r-barnes Aug 3, 2020
d466312
Merge forward and backward kernel calls to reduce host synchronizatio…
r-barnes Aug 3, 2020
128f998
Drop extraneous headers
r-barnes Aug 3, 2020
2f0f98f
Eliminate stream/chunk globals
r-barnes Aug 3, 2020
cbfd95f
Drop GPU swap in favour of thrust
r-barnes Aug 3, 2020
ee0caa7
Don't proceed if sequences are too long
r-barnes Aug 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
.vscode/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "submodules/alignment_boilerplate"]
path = submodules/alignment_boilerplate
url = https://github.com/r-barnes/alignment_boilerplate.git
65 changes: 53 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,72 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

project(sw_GPU LANGUAGES C CXX CUDA)
project(sw_GPU LANGUAGES CXX CUDA)

set(CMAKE_CXX_STANDARD 14 CACHE STRING "")
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "")
set(CMAKE_CUDA_STANDARD 14 CACHE STRING "")
set(CMAKE_CUDA_EXTENSIONS OFF CACHE BOOL "")

#find_package(timemory REQUIRED COMPONENTS headers cuda cupti compile-options arch)
#find_package(cuda REQUIRED)
find_package(OpenMP REQUIRED)

add_subdirectory(submodules/alignment_boilerplate EXCLUDE_FROM_ALL)

file(GLOB sources ${PROJECT_SOURCE_DIR}/ utils.cpp alignments.cpp kernel.cpp driver.cpp main.cpp)
file(GLOB headers ${PROJECT_SOURCE_DIR}/utils.hpp alignments.hpp kernel.hpp driver.hpp)
set(sources
src/driver.cpp
)

set_source_files_properties(${sources} PROPERTIES
LANGUAGE CUDA
LINKER_LANGUAGE CUDA)
set(test_sources
unittest/test_blockShuffleReduce_with_index.cu
unittest/test_main.cpp
unittest/test_sequence_process.cu
unittest/test_warpReduceMax_with_index.cu
)

add_executable(program_gpu ${sources} ${headers})
target_compile_options(program_gpu PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-gencode arch=compute_70,code=sm_70>)

set_source_files_properties(${sources} ${test_sources} evaluation/main.cpp
PROPERTIES
LANGUAGE CUDA
LINKER_LANGUAGE CUDA
)

add_library(gpu_bsw ${sources})
target_include_directories(gpu_bsw PUBLIC include)
target_link_libraries(gpu_bsw PUBLIC albp OpenMP::OpenMP_CXX)
#target_link_libraries(program_gpu PUBLIC timemory OpenMP::OpenMP_CXX)
target_link_libraries(program_gpu PUBLIC OpenMP::OpenMP_CXX)
target_include_directories(program_gpu PUBLIC ${PROJECT_SOURCE_DIR})
target_compile_options(gpu_bsw PUBLIC
$<$<COMPILE_LANGUAGE:CUDA>:-gencode=arch=compute_50,code=sm_50>
$<$<COMPILE_LANGUAGE:CUDA>:-gencode=arch=compute_52,code=sm_52>
$<$<COMPILE_LANGUAGE:CUDA>:-gencode=arch=compute_60,code=sm_60>
$<$<COMPILE_LANGUAGE:CUDA>:-gencode=arch=compute_61,code=sm_61>
$<$<COMPILE_LANGUAGE:CUDA>:-gencode=arch=compute_70,code=sm_70>
$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-Wall,-Wextra>
# $<$<COMPILE_LANGUAGE:CUDA>:-G>
)

get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
if(CMAKE_CUDA_COMPILER AND "CUDA" IN_LIST LANGUAGES)
target_compile_options(program_gpu PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler -fopenmp>)
target_compile_options(gpu_bsw PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler -fopenmp>)
endif()

add_executable(program_gpu evaluation/main.cpp)
target_link_libraries(program_gpu PRIVATE gpu_bsw)

add_executable(unittest ${test_sources})
target_link_libraries(unittest PRIVATE gpu_bsw)

# add_executable(test unittest/test.cu)
# target_link_libraries(test PRIVATE gpu_bsw)


add_custom_target(
regression_tests ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/regression_test
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/regression_test/* ${CMAKE_BINARY_DIR}/regression_test
)

add_custom_target(
test-data ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/test-data
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/test-data/* ${CMAKE_BINARY_DIR}/test-data
)
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,23 @@ so.**



To Build:<br />
mkdir build <br />
cd build <br />
cmake CMAKE_BUILD_TYPE=Release .. <br />
make <br />
To Build:

<br />
To Execute DNA test run: <br />
mkdir build
cd build
cmake CMAKE_BUILD_TYPE=Release ..
make

./program_gpu dna ../test-data/dna-reference.fasta ../test-data/dna-query.fasta <br />
To Execute DNA test run:

To Execute Protein test run: <br />
./program_gpu dna ../test-data/dna-reference.fasta ../test-data/dna-query.fasta output

./program_gpu aa ../test-data/protein-reference.fasta ../test-data/protein-query.fasta <br />
To Execute Protein test run:

./program_gpu aa ../test-data/protein-reference.fasta ../test-data/protein-query.fasta output

<br />
Contact: mgawan@lbl.gov

<br />
If you use GPU-BSW in your project, please cite this repo as:

*Muaaz G. Awan, GPU accelerated Smith-Waterman for performing batch alignments (GPU-BSW), 2019, Github Repository: https://github.com/m-gul/GPU-BSW/*
20 changes: 0 additions & 20 deletions alignments.cpp

This file was deleted.

19 changes: 0 additions & 19 deletions alignments.hpp

This file was deleted.

Loading