veg / tn93

TN93 fast distance calculator
MIT License
15 stars 7 forks source link

Error compiling on Fedora 30 #17

Closed ArtPoon closed 4 years ago

ArtPoon commented 4 years ago
[apoon42@mimm4750g tn93-1.0.6]$ cmake .
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/apoon42/src/tn93-1.0.6
[apoon42@mimm4750g tn93-1.0.6]$ make
Scanning dependencies of target nucfreqsfasta
[  2%] Building CXX object CMakeFiles/nucfreqsfasta.dir/src/nuc_freqs_from_fasta.cpp.o
[  5%] Building CXX object CMakeFiles/nucfreqsfasta.dir/src/stringBuffer.cc.o
[  8%] Building CXX object CMakeFiles/nucfreqsfasta.dir/src/tn93_shared.cc.o
[ 10%] Linking CXX executable nucfreqsfasta
[ 10%] Built target nucfreqsfasta
Scanning dependencies of target readreduce
[ 13%] Building CXX object CMakeFiles/readreduce.dir/src/read_reducer.cpp.o
/home/apoon42/src/tn93-1.0.6/src/read_reducer.cpp: In function ‘void handle_a_sequence(StringBuffer&, StringBuffer&, Vector&, Vector&, long int, long int, Vector*)’:
/home/apoon42/src/tn93-1.0.6/src/read_reducer.cpp:137:35: error: ‘firstSequenceLength’ not specified in enclosing ‘parallel’
  137 |                 if (perfect_match (current_sequence.getString(), stringText(current_clusters, sequence_lengths, cluster_index), firstSequenceLength) >= min_overlap) {
      |                     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/apoon42/src/tn93-1.0.6/src/read_reducer.cpp:129:21: error: enclosing ‘parallel’
  129 |             #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)
      |                     ^~~
/home/apoon42/src/tn93-1.0.6/src/read_reducer.cpp:137:153: error: ‘min_overlap’ not specified in enclosing ‘parallel’
  137 | sters, sequence_lengths, cluster_index), firstSequenceLength) >= min_overlap) {
      |                                                                  ^~~~~~~~~~~

/home/apoon42/src/tn93-1.0.6/src/read_reducer.cpp:129:21: error: enclosing ‘parallel’
  129 |             #pragma omp parallel for default(none) shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)
      |                     ^~~
make[2]: *** [CMakeFiles/readreduce.dir/build.make:63: CMakeFiles/readreduce.dir/src/read_reducer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/readreduce.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

System info:

[apoon42@mimm4750g tn93-1.0.6]$ gcc --version
gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)
Copyright (C) 2019 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.

[apoon42@mimm4750g tn93-1.0.6]$ cmake --version
cmake version 3.14.5
spond commented 4 years ago

Dear @ArtPoon,

Thanks for this detailed report; I have a suspicious that it has to do with the way OpenMP specification changed with regards to implicit typing of parallel loop variables. I'll check to see what version OpenMP gcc-9.2 supports and if I can fix the error.

Best, Sergei

ArtPoon commented 4 years ago

Thanks @spond - in the meantime I'm going to try an older release.

spond commented 4 years ago

Dear @ArtPoon,

Sigh -- of course on OS X gcc-9.2 does not generate the same error.

Best, Sergei

ArtPoon commented 4 years ago

Haha, no repro on master branch. I was originally trying to compile release 1.0.6. Closing, sorry for wasting your time!