From d7bd2590eb43b4d5bddf407b88d44499b452d82b Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Fri, 10 Nov 2023 16:56:00 -0800 Subject: [PATCH 01/13] Create devcontainer.json --- .devcontainer/devcontainer.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c588b7b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,5 @@ +{ + "build": { + "dockerfile": "../Dockerfile" + } +} From 624491bd17839b25abc7debf796dddb904585a45 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 10:36:50 -0800 Subject: [PATCH 02/13] Update Dockerfile --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a23c44..6d87028 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Docker image for tn93 -FROM ubuntu:20.04 +FROM oraclelinux:8-slim -# Set up environment and install dependencies -RUN apt-get update && apt-get -y upgrade && \ - DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y cmake g++ git make +# Set up environment and install dependencies (NEED TO CHANGE TO ORACLE) +#RUN apt-get update && apt-get -y upgrade && \ +# DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y cmake g++ git make From 77830c3073fd99c44fca843418a8118ee9f08406 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 10:43:50 -0800 Subject: [PATCH 03/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6d87028..04fed13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Docker image for tn93 -FROM oraclelinux:8-slim +FROM oraclelinux:8 # Set up environment and install dependencies (NEED TO CHANGE TO ORACLE) #RUN apt-get update && apt-get -y upgrade && \ From b827f76597d9ad1d9713f75878c2575c947fd8b8 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 10:51:09 -0800 Subject: [PATCH 04/13] Update Dockerfile --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 04fed13..aa12ae0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -# Docker image for tn93 +# Docker image for a tn93 development environment FROM oraclelinux:8 -# Set up environment and install dependencies (NEED TO CHANGE TO ORACLE) -#RUN apt-get update && apt-get -y upgrade && \ -# DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y cmake g++ git make +# Set up environment and install dependencies +RUN yum -y check-update && yum -y update && \ + yum install -y cmake gcc-c++ git make From 9493454e57e3ce801a15db5db1963cabb8f5e061 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 11:06:23 -0800 Subject: [PATCH 05/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa12ae0..6fea2ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,5 +2,5 @@ FROM oraclelinux:8 # Set up environment and install dependencies -RUN yum -y check-update && yum -y update && \ +RUN yum -y check-update ; yum -y update && \ yum install -y cmake gcc-c++ git make From a00a7c830f71c31b35043d53cddc3e9e0ccf9878 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 11:27:36 -0800 Subject: [PATCH 06/13] Fix OpenMP issue with GCC 8.5 --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6fea2ab..1b05e8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,6 @@ FROM oraclelinux:8 # Set up environment and install dependencies RUN yum -y check-update ; yum -y update && \ - yum install -y cmake gcc-c++ git make + yum install -y cmake gcc-c++ git make && \ + sed -i 's/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap)/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)/g' src/read_reducer.cpp && \ + sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp && \ From f90f3c880bb94168b968f11c91cd2ebdf201b5f1 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 11:28:57 -0800 Subject: [PATCH 07/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b05e8f..970179b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ FROM oraclelinux:8 RUN yum -y check-update ; yum -y update && \ yum install -y cmake gcc-c++ git make && \ sed -i 's/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap)/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)/g' src/read_reducer.cpp && \ - sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp && \ + sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp From b068fbfd667fc956a6e4bf18b39172096193afd4 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 11:34:45 -0800 Subject: [PATCH 08/13] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 970179b..23b121c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM oraclelinux:8 # Set up environment and install dependencies -RUN yum -y check-update ; yum -y update && \ +RUN yum -y update && \ yum install -y cmake gcc-c++ git make && \ sed -i 's/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap)/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)/g' src/read_reducer.cpp && \ sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp From 411b54daf51b1026bc0679fc59cee4374e2dab57 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 11:38:25 -0800 Subject: [PATCH 09/13] Update Dockerfile --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 23b121c..59eac68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,9 @@ FROM oraclelinux:8 # Set up environment and install dependencies RUN yum -y update && \ - yum install -y cmake gcc-c++ git make && \ - sed -i 's/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap)/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)/g' src/read_reducer.cpp && \ - sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp + yum install -y cmake gcc-c++ git make + + # The current tn93 OpenMP syntax is incompatible with GCC 8.5.0, which is what gets installed by the above commands. + # To compile tn93, make the following two edits to the tn93 source code: + #sed -i 's/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap)/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)/g' src/read_reducer.cpp && \ + #sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp From 7a552381ac2ba0d522c380d47fefd25c867a84d2 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 19:40:30 +0000 Subject: [PATCH 10/13] Update OpenMP usage --- src/ShortestPathTN93.cpp | 2 +- src/read_reducer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShortestPathTN93.cpp b/src/ShortestPathTN93.cpp index 67cddb1..93118c7 100644 --- a/src/ShortestPathTN93.cpp +++ b/src/ShortestPathTN93.cpp @@ -89,7 +89,7 @@ void relaxDistanceEstimates (const unsigned long theSequence, const long firstSe #if _OPENMP >= 200805 - #pragma omp parallel for default(none) shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do) + #pragma omp parallel for default(none) shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates) #else #pragma omp parallel for default(none) shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates) #endif diff --git a/src/read_reducer.cpp b/src/read_reducer.cpp index 96475fc..aa0a122 100644 --- a/src/read_reducer.cpp +++ b/src/read_reducer.cpp @@ -125,7 +125,7 @@ void handle_a_sequence (StringBuffer& current_sequence, StringBuffer& current_cl #ifdef _OPENMP #if _OPENMP >= 200805 - #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap) + #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters) #else #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster) #endif From 0bd6d7ba42416d922a20a6bb15568f17a6bad68d Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 11:46:13 -0800 Subject: [PATCH 11/13] Update Dockerfile --- Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59eac68..af3f0da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,3 @@ FROM oraclelinux:8 # Set up environment and install dependencies RUN yum -y update && \ yum install -y cmake gcc-c++ git make - - # The current tn93 OpenMP syntax is incompatible with GCC 8.5.0, which is what gets installed by the above commands. - # To compile tn93, make the following two edits to the tn93 source code: - #sed -i 's/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap)/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)/g' src/read_reducer.cpp && \ - #sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp From 45c86d26b9f260d35d8e60505da6299eb27fb290 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Mon, 13 Nov 2023 11:56:16 -0800 Subject: [PATCH 12/13] Update Dockerfile --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index af3f0da..094bf7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,3 +4,7 @@ FROM oraclelinux:8 # Set up environment and install dependencies RUN yum -y update && \ yum install -y cmake gcc-c++ git make + +# To compile tn93 within the development environment: +# cmake . +# make From 3d8be03276aedc4851a88db13e9ce411368d1255 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Fri, 17 Nov 2023 14:18:23 -0800 Subject: [PATCH 13/13] Revert OpenMP edits (will try to incorporate Sergei's fix) --- src/ShortestPathTN93.cpp | 2 +- src/read_reducer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShortestPathTN93.cpp b/src/ShortestPathTN93.cpp index 93118c7..67cddb1 100644 --- a/src/ShortestPathTN93.cpp +++ b/src/ShortestPathTN93.cpp @@ -89,7 +89,7 @@ void relaxDistanceEstimates (const unsigned long theSequence, const long firstSe #if _OPENMP >= 200805 - #pragma omp parallel for default(none) shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates) + #pragma omp parallel for default(none) shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do) #else #pragma omp parallel for default(none) shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates) #endif diff --git a/src/read_reducer.cpp b/src/read_reducer.cpp index aa0a122..96475fc 100644 --- a/src/read_reducer.cpp +++ b/src/read_reducer.cpp @@ -125,7 +125,7 @@ void handle_a_sequence (StringBuffer& current_sequence, StringBuffer& current_cl #ifdef _OPENMP #if _OPENMP >= 200805 - #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters) + #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap) #else #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster) #endif