raja-appuswamy / accel-align-release

A fast seed-embed-extend based sequence mapper and aligner
MIT License
22 stars 6 forks source link

Installation on Linux #9

Closed ksahlin closed 3 years ago

ksahlin commented 3 years ago

Hi,

I read the nice paper on AccelAlign and wanted to try it out but I'm having some problems running AccelAlign. I successfully installed TBB and WFA. Then I modified the makefile WFA path and changed -std=c++14 to -std=c++1y because of this.

Then I ran the modified makefile with make -j which produced accindex and accalign binaries.

However, when running them I get:

(base) [kris@rackham3 accel-align-release]$ ./accalign
./accalign: error while loading shared libraries: libwfa.so: cannot open shared object file: No such file or directory

(base) [kris@rackham3 accel-align-release]$ ./accindex
./accindex: error while loading shared libraries: libwfa.so: cannot open shared object file: No such file or directory

This was the output from the make -j command:

(base) [kris@rackham3 accel-align-release]$ make -j
g++ index.cpp embedding.cpp -o accindex -g -fopenmp -Wall -pthread -std=c++1y -O3 -mavx2 -lz -ltbb -std=c++1y -I/home/kris/source/WFA/ -L/home/kris/source/WFA//build -lwfa
g++ reference.cpp accalign.cpp embedding.cpp ksw2_extz2_sse.c -o accalign -g -fopenmp -Wall -pthread -std=c++1y -O3 -mavx2 -lz -ltbb -std=c++1y -I/home/kris/source/WFA/ -L/home/kris/source/WFA//build -lwfa
In file included from /home/kris/source/WFA/gap_affine/affine_wavefront.h:38:0,
                 from /home/kris/source/WFA/gap_affine/affine_wavefront_align.h:35,
                 from header.h:41,
                 from reference.cpp:1:
/home/kris/source/WFA/system/profiler_counter.h:130:20: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                    ^
/home/kris/source/WFA/system/profiler_counter.h:130:33: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                 ^
/home/kris/source/WFA/system/profiler_counter.h:130:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                            ^
/home/kris/source/WFA/system/profiler_counter.h:137:21: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                     ^
/home/kris/source/WFA/system/profiler_counter.h:137:34: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                  ^
/home/kris/source/WFA/system/profiler_counter.h:137:45: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                             ^
In file included from /home/kris/source/WFA/gap_affine/affine_wavefront.h:38:0,
                 from /home/kris/source/WFA/gap_affine/affine_wavefront_align.h:35,
                 from header.h:41,
                 from index.cpp:1:
/home/kris/source/WFA/system/profiler_counter.h:130:20: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                    ^
/home/kris/source/WFA/system/profiler_counter.h:130:33: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                 ^
/home/kris/source/WFA/system/profiler_counter.h:130:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                            ^
/home/kris/source/WFA/system/profiler_counter.h:137:21: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                     ^
/home/kris/source/WFA/system/profiler_counter.h:137:34: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                  ^
/home/kris/source/WFA/system/profiler_counter.h:137:45: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                             ^
In file included from /home/kris/source/WFA/gap_affine/affine_wavefront.h:38:0,
                 from /home/kris/source/WFA/gap_affine/affine_wavefront_align.h:35,
                 from header.h:41,
                 from embedding.cpp:1:
/home/kris/source/WFA/system/profiler_counter.h:130:20: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                    ^
/home/kris/source/WFA/system/profiler_counter.h:130:33: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                 ^
/home/kris/source/WFA/system/profiler_counter.h:130:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                            ^
/home/kris/source/WFA/system/profiler_counter.h:137:21: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                     ^
/home/kris/source/WFA/system/profiler_counter.h:137:34: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                  ^
/home/kris/source/WFA/system/profiler_counter.h:137:45: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                             ^
In file included from /home/kris/source/WFA/gap_affine/affine_wavefront.h:38:0,
                 from /home/kris/source/WFA/gap_affine/affine_wavefront_align.h:35,
                 from header.h:41,
                 from accalign.cpp:1:
/home/kris/source/WFA/system/profiler_counter.h:130:20: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                    ^
/home/kris/source/WFA/system/profiler_counter.h:130:33: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                 ^
/home/kris/source/WFA/system/profiler_counter.h:130:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                            ^
/home/kris/source/WFA/system/profiler_counter.h:137:21: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                     ^
/home/kris/source/WFA/system/profiler_counter.h:137:34: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                  ^
/home/kris/source/WFA/system/profiler_counter.h:137:45: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                             ^
accalign.cpp: In member function ‘void AccAlign::rectify_cigar(char*, int)’:
accalign.cpp:1480:5: warning: ‘op_before’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (op_before == 'M'){
     ^
In file included from /home/kris/source/WFA/gap_affine/affine_wavefront.h:38:0,
                 from /home/kris/source/WFA/gap_affine/affine_wavefront_align.h:35,
                 from header.h:41,
                 from embedding.cpp:1:
/home/kris/source/WFA/system/profiler_counter.h:130:20: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                    ^
/home/kris/source/WFA/system/profiler_counter.h:130:33: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                 ^
/home/kris/source/WFA/system/profiler_counter.h:130:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounter "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f})"
                                            ^
/home/kris/source/WFA/system/profiler_counter.h:137:21: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                     ^
/home/kris/source/WFA/system/profiler_counter.h:137:34: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                  ^
/home/kris/source/WFA/system/profiler_counter.h:137:45: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
 #define PRIcounterX "lu(#%"PRIu64",m%"PRIu64",M%"PRIu64",{%.2f,%.2f,%.2f})"
                                             ^
(base) [kris@rackham3 accel-align-release]$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(base) [kris@rackham3 accel-align-release]$  cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
raja-appuswamy commented 3 years ago

Hello, Glad you liked the paper and apologies for the issue. We have now directly linked WFA as a submodule and integrated it with the build process. All you need to do now is just recursively clone the repo and do a make at the top level (assuming TBB is installed). This should fix everything. If you want to just run accel align, we have also updated the container image. Let us know if this fixes the issues you saw.

Regards, Raja

ksahlin commented 3 years ago

Will try it out soon, thanks for the quick reply!

ksahlin commented 3 years ago

Hi again, I just tried it and it gives me the below errors upun make. It's probably something with C++11 vs C++14, or what do you think? Just my guess based on not seeing any -std=c++14 flags in the new makefile.

Thanks for your time!

(scisoseq-eval) [kris@rackham2 source]$ git clone --recursive https://github.com/raja-appuswamy/accel-align-release
Cloning into 'accel-align-release'...
remote: Enumerating objects: 108, done.
remote: Counting objects: 100% (108/108), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 108 (delta 52), reused 65 (delta 23), pack-reused 0
Receiving objects: 100% (108/108), 4.26 MiB | 3.23 MiB/s, done.
Resolving deltas: 100% (52/52), done.
Submodule 'WFA' (https://github.com/smarco/WFA) registered for path 'WFA'
Cloning into 'WFA'...
remote: Enumerating objects: 5831, done.
remote: Counting objects: 100% (193/193), done.
remote: Compressing objects: 100% (129/129), done.
remote: Total 5831 (delta 110), reused 107 (delta 64), pack-reused 5638
Receiving objects: 100% (5831/5831), 99.67 MiB | 3.31 MiB/s, done.
Resolving deltas: 100% (2052/2052), done.
Submodule path 'WFA': checked out '385cf1c261a3513cd39e6db1faccf13d947056ca'
(scisoseq-eval) [kris@rackham2 source]$ cd accel-align-release/
(scisoseq-eval) [kris@rackham2 accel-align-release]$ make
make -C WFA all
make[1]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA'
make --directory=benchmark all
make[2]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA/benchmark'
gcc -Wall -g -O3 -fPIC -I.. -c benchmark_edit.c -o ../build/benchmark_edit.o
gcc -Wall -g -O3 -fPIC -I.. -c benchmark_gap_affine.c -o ../build/benchmark_gap_affine.o
gcc -Wall -g -O3 -fPIC -I.. -c benchmark_gap_lineal.c -o ../build/benchmark_gap_lineal.o
gcc -Wall -g -O3 -fPIC -I.. -c benchmark_utils.c -o ../build/benchmark_utils.o
make[2]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA/benchmark'
make --directory=edit all
make[2]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA/edit'
gcc -Wall -g -O3 -fPIC -I.. -c edit_cigar.c -o ../build/edit_cigar.o
gcc -Wall -g -O3 -fPIC -I.. -c edit_dp.c -o ../build/edit_dp.o
gcc -Wall -g -O3 -fPIC -I.. -c edit_table.c -o ../build/edit_table.o
make[2]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA/edit'
make --directory=gap_affine all
make[2]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA/gap_affine'
gcc -Wall -g -O3 -fPIC -I.. -c affine_penalties.c -o ../build/affine_penalties.o
gcc -Wall -g -O3 -fPIC -march=native  -I.. -c affine_wavefront.c -o ../build/affine_wavefront.o
gcc -Wall -g -O3 -fPIC -I.. -c affine_table.c -o ../build/affine_table.o
gcc -Wall -g -O3 -fPIC -march=native  -I.. -c affine_wavefront_align.c -o ../build/affine_wavefront_align.o
affine_wavefront_align.c: In function ‘affine_wavefronts_compute_offsets_idm’:
affine_wavefront_align.c:162:0: warning: ignoring #pragma GCC ivdep [-Wunknown-pragmas]
   #pragma GCC ivdep
 ^
affine_wavefront_align.c: In function ‘affine_wavefronts_compute_offsets_im’:
affine_wavefront_align.c:212:0: warning: ignoring #pragma GCC ivdep [-Wunknown-pragmas]
   #pragma GCC ivdep
 ^
affine_wavefront_align.c: In function ‘affine_wavefronts_compute_offsets_dm’:
affine_wavefront_align.c:241:0: warning: ignoring #pragma GCC ivdep [-Wunknown-pragmas]
   #pragma GCC ivdep
 ^
affine_wavefront_align.c: In function ‘affine_wavefronts_compute_offsets_m’:
affine_wavefront_align.c:267:0: warning: ignoring #pragma GCC ivdep [-Wunknown-pragmas]
   #pragma GCC ivdep
 ^
gcc -Wall -g -O3 -fPIC -I.. -c affine_wavefront_backtrace.c -o ../build/affine_wavefront_backtrace.o
gcc -Wall -g -O3 -fPIC -I.. -c affine_wavefront_display.c -o ../build/affine_wavefront_display.o
gcc -Wall -g -O3 -fPIC -march=native  -I.. -c affine_wavefront_extend.c -o ../build/affine_wavefront_extend.o
gcc -Wall -g -O3 -fPIC -I.. -c affine_wavefront_penalties.c -o ../build/affine_wavefront_penalties.o
gcc -Wall -g -O3 -fPIC -I.. -c affine_wavefront_reduction.c -o ../build/affine_wavefront_reduction.o
gcc -Wall -g -O3 -fPIC -I.. -c affine_wavefront_utils.c -o ../build/affine_wavefront_utils.o
gcc -Wall -g -O3 -fPIC -I.. -c swg.c -o ../build/swg.o
gcc -Wall -g -O3 -fPIC -I.. -c wavefront_stats.c -o ../build/wavefront_stats.o
make[2]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA/gap_affine'
make --directory=gap_lineal all
make[2]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA/gap_lineal'
gcc -Wall -g -O3 -fPIC -I.. -c nw.c -o ../build/nw.o
make[2]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA/gap_lineal'
make --directory=system all
make[2]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA/system'
gcc -Wall -g -O3 -fPIC -I.. -c mm_allocator.c -o ../build/mm_allocator.o
gcc -Wall -g -O3 -fPIC -I.. -c profiler_counter.c -o ../build/profiler_counter.o
gcc -Wall -g -O3 -fPIC -I.. -c profiler_timer.c -o ../build/profiler_timer.o
make[2]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA/system'
make --directory=utils all
make[2]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA/utils'
gcc -Wall -g -O3 -fPIC -I.. -c commons.c -o ../build/commons.o
gcc -Wall -g -O3 -fPIC -I.. -c dna_text.c -o ../build/dna_text.o
gcc -Wall -g -O3 -fPIC -I.. -c string_padded.c -o ../build/string_padded.o
gcc -Wall -g -O3 -fPIC -I.. -c vector.c -o ../build/vector.o
make[2]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA/utils'
ar -rsc build/libwfa.a build/*.o 2> /dev/null
gcc -shared -L.  build/*.o -o build/libwfa.so 
make --directory=tools all
make[2]: Entering directory `/domus/h1/kris/source/accel-align-release/WFA/tools'
gcc -Wall -g -O3 -fPIC generate_dataset.c -o ../bin/generate_dataset -lm -lrt 
generate_dataset.c: In function ‘main’:
generate_dataset.c:245:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
gcc -Wall -g -O3 -fPIC -I.. align_benchmark.c ../build/*.o -o ../bin/align_benchmark -lm -lrt 
align_benchmark.c: In function ‘main’:
align_benchmark.c:479:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[2]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA/tools'
make[1]: Leaving directory `/domus/h1/kris/source/accel-align-release/WFA'
g++ -o accindex index.cpp embedding.cpp ./WFA/build/libwfa.a -lz -ltbb  -g -fopenmp -Wall -pthread -O3 -isystem./WFA -mavx2 -L./WFA/build  
In file included from /usr/include/c++/4.8.2/cstdint:35:0,
                 from header.h:3,
                 from index.cpp:1:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
In file included from header.h:35:0,
                 from index.cpp:1:
type.h:54:9: error: ‘tuple’ in namespace ‘std’ does not name a type
 typedef std::tuple<Read *, Read *, int> ReadCnt;
         ^
type.h:56:9: error: ‘tuple’ in namespace ‘std’ does not name a type
 typedef std::tuple<Read *, Read *> ReadPair;
         ^
In file included from header.h:38:0,
                 from index.cpp:1:
accalign.h:19:50: error: ‘ReadCnt’ was not declared in this scope
   void cpu_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *inputQ,
                                                  ^
accalign.h:19:57: error: template argument 1 is invalid
   void cpu_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *inputQ,
                                                         ^
accalign.h:19:57: error: template argument 2 is invalid
accalign.h:20:50: error: ‘ReadCnt’ was not declared in this scope
                    tbb::concurrent_bounded_queue<ReadCnt> *outputQ);
                                                  ^
accalign.h:20:57: error: template argument 1 is invalid
                    tbb::concurrent_bounded_queue<ReadCnt> *outputQ);
                                                         ^
accalign.h:20:57: error: template argument 2 is invalid
accalign.h:21:53: error: ‘ReadCnt’ was not declared in this scope
   void output_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *outputQ,
                                                     ^
accalign.h:21:60: error: template argument 1 is invalid
   void output_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *outputQ,
                                                            ^
accalign.h:21:60: error: template argument 2 is invalid
accalign.h:22:53: error: ‘ReadPair’ was not declared in this scope
                       tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                     ^
accalign.h:22:61: error: template argument 1 is invalid
                       tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                             ^
accalign.h:22:61: error: template argument 2 is invalid
accalign.h:25:52: error: ‘ReadPair’ was not declared in this scope
                      tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                    ^
accalign.h:25:60: error: template argument 1 is invalid
                      tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                            ^
accalign.h:25:60: error: template argument 2 is invalid
index.cpp: In member function ‘bool Index::make_index(const char*)’:
index.cpp:119:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto joff = std::lower_bound(data.begin(), data.end(), Data(-1, -1), Data());
   ^
index.cpp:119:8: error: ‘joff’ does not name a type
   auto joff = std::lower_bound(data.begin(), data.end(), Data(-1, -1), Data());
        ^
index.cpp:120:16: error: ‘joff’ was not declared in this scope
   size_t eof = joff - data.begin();
                ^
In file included from /usr/include/c++/4.8.2/cstdint:35:0,
                 from header.h:3,
                 from embedding.cpp:1:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
In file included from header.h:35:0,
                 from embedding.cpp:1:
type.h:54:9: error: ‘tuple’ in namespace ‘std’ does not name a type
 typedef std::tuple<Read *, Read *, int> ReadCnt;
         ^
type.h:56:9: error: ‘tuple’ in namespace ‘std’ does not name a type
 typedef std::tuple<Read *, Read *> ReadPair;
         ^
In file included from header.h:38:0,
                 from embedding.cpp:1:
accalign.h:19:50: error: ‘ReadCnt’ was not declared in this scope
   void cpu_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *inputQ,
                                                  ^
accalign.h:19:57: error: template argument 1 is invalid
   void cpu_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *inputQ,
                                                         ^
accalign.h:19:57: error: template argument 2 is invalid
accalign.h:20:50: error: ‘ReadCnt’ was not declared in this scope
                    tbb::concurrent_bounded_queue<ReadCnt> *outputQ);
                                                  ^
accalign.h:20:57: error: template argument 1 is invalid
                    tbb::concurrent_bounded_queue<ReadCnt> *outputQ);
                                                         ^
accalign.h:20:57: error: template argument 2 is invalid
accalign.h:21:53: error: ‘ReadCnt’ was not declared in this scope
   void output_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *outputQ,
                                                     ^
accalign.h:21:60: error: template argument 1 is invalid
   void output_root_fn(tbb::concurrent_bounded_queue<ReadCnt> *outputQ,
                                                            ^
accalign.h:21:60: error: template argument 2 is invalid
accalign.h:22:53: error: ‘ReadPair’ was not declared in this scope
                       tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                     ^
accalign.h:22:61: error: template argument 1 is invalid
                       tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                             ^
accalign.h:22:61: error: template argument 2 is invalid
accalign.h:25:52: error: ‘ReadPair’ was not declared in this scope
                      tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                    ^
accalign.h:25:60: error: template argument 1 is invalid
                      tbb::concurrent_bounded_queue<ReadPair> *dataQ);
                                                            ^
accalign.h:25:60: error: template argument 2 is invalid
embedding.cpp: In member function ‘void Embedding::embeddata_pair(std::vector<Region>&, char*, const char**, unsigned int, bool*, unsigned int, int)’:
embedding.cpp:176:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto start = std::chrono::system_clock::now();
   ^
embedding.cpp:176:8: error: ‘start’ does not name a type
   auto start = std::chrono::system_clock::now();
        ^
embedding.cpp:186:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto end = std::chrono::system_clock::now();
   ^
embedding.cpp:186:8: error: ‘end’ does not name a type
   auto end = std::chrono::system_clock::now();
        ^
embedding.cpp:187:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
   ^
embedding.cpp:187:8: error: ‘elapsed’ does not name a type
   auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
        ^
embedding.cpp:188:17: error: ‘elapsed’ was not declared in this scope
   embed_time += elapsed.count();
                 ^
embedding.cpp: In member function ‘void Embedding::embeddata_iterative_update(std::vector<Region>&, const char**, unsigned int, unsigned int, int&, int&, bool, unsigned int&, unsigned int&)’:
embedding.cpp:200:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto start = std::chrono::system_clock::now();
   ^
embedding.cpp:200:8: error: ‘start’ does not name a type
   auto start = std::chrono::system_clock::now();
        ^
embedding.cpp:263:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto end = std::chrono::system_clock::now();
   ^
embedding.cpp:263:8: error: ‘end’ does not name a type
   auto end = std::chrono::system_clock::now();
        ^
embedding.cpp:264:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
   ^
embedding.cpp:264:8: error: ‘elapsed’ does not name a type
   auto elapsed = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
        ^
embedding.cpp:265:17: error: ‘elapsed’ was not declared in this scope
   embed_time += elapsed.count();
                 ^
make: *** [accindex] Error 1
raja-appuswamy commented 3 years ago

Ah. Yes. Seems like we are using a much newer gcc version that doesnt require the flag explicitly, and hence the compilation works on our side. Could you please add back the C++14 flag to CFLAGS in makefile and let me know if that fixes the compilation problem? Also, could you please let us know which gcc version you are using?

Thanks, Raja

ksahlin commented 3 years ago

Hi,

I added -std=c++1y as a flag in the makefile, that solves it. Thanks!

ksahlin commented 3 years ago

I used this gcc:

(scisoseq-eval) [kris@rackham2 accel-align-release]$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.