Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Problems during compilation #2

Open
arcarneiro opened this issue May 7, 2021 · 3 comments
Open

Problems during compilation #2

arcarneiro opened this issue May 7, 2021 · 3 comments

Comments

@arcarneiro
Copy link

Hi,

My name is André, and I'm trying to run some experiments with AVX512 and Deep Learning. I read your paper and found it's exciting. So I decided to test your optimized version of SLIDE, but I'm facing an error (below) during the compilation of the code.

[ 58%] Building CXX object CMakeFiles/SLIDE_LIB.dir/SLIDE/DataLayerOpt.cpp.o
/opt/intel/parallel_studio_xe_2020/compilers_and_libraries_2020.2.254/linux/bin/intel64/icpc  -DOPT_AVX512=1 -DOPT_AVX512_BF16=1 -DOPT_IA=1 -I${HOMEDIR}/SLIDE/SLIDE_opt_ia/bin/ep/include  -qopenmp   -std=c++14 -O2 -DNDEBUG -std=gnu++14 -o CMakeFiles/SLIDE_LIB.dir/SLIDE/DataLayerOpt.cpp.o -c ${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/DataLayerOpt.cpp
In file included from ${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/DataLayerOpt.cpp(5):
${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/DataLayerOpt.h(27): error: expected a ";"
    DataLayerOpt() numRecords_{0}, numFeatures_ {0}, numLabels_ {0} {};
                   ^

compilation aborted for ${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/DataLayerOpt.cpp (code 2)
make[2]: ** [CMakeFiles/SLIDE_LIB.dir/SLIDE/DataLayerOpt.cpp.o] Erro 2

The file DataLayerOpt.h is as following:

...
22   // labels
     23   std::vector<int> labelOffsets_;
     24   std::vector<int> labelLengths_;
     25   std::vector<int> labels_;
     26 
     27   DataLayerOpt() numRecords_{0}, numFeatures_ {0}, numLabels_ {0} {};
     28   void loadData(const std::string &srcFile);
     29 
     30   inline int lengthByRecordIndex(size_t n) {
     31     return lengths_[n];
     32   }
...

Any suggestion on how to solve this?

I used Intel PSXE 2020 and 2019, with both resulting in the same error. Below are the commands used to download and compile the code:

git clone https://github.com/RUSH-LAB/SLIDE.git
cd SLIDE
git submodule init
git submodule update

cd SLIDE_opt_ia

module load cmake/3.17.3 
module load intel_psxe/2020 

mkdir -p bin && cd bin 
# SKX/CLX (AVX512)
cmake .. -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc -DOPT_AVX512=1
# CPX (AVX512 + BF16)
cmake .. -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc -DOPT_AVX512=1 -DOPT_AVX512_BF16=1

VERBOSE=1 make

Thank you for your attention and best regards.

@its-sandy
Copy link

It has to be
DataLayerOpt() : numRecords_{0}, numFeatures_ {0}, numLabels_ {0} {};

@arcarneiro
Copy link
Author

It has to be
DataLayerOpt() : numRecords_{0}, numFeatures_ {0}, numLabels_ {0} {};

Hi. That did the trick. Thank you very much.

But now, I'm getting the following error:

[ 87%] Building CXX object CMakeFiles/SLIDE_LIB.dir/SLIDE/main.cpp.o
/opt/intel/parallel_studio_xe_2020/compilers_and_libraries_2020.2.254/linux/bin/intel64/icpc  -DOPT_AVX512=1 -DOPT_IA=1 -I${HOMEDIR}/SLIDE/SLIDE_opt_ia/bin/ep/include  -qopenmp   -std=c++14 -O2 -DNDEBUG -std=c++14 -o CMakeFiles/SLIDE_LIB.dir/SLIDE/main.cpp.o -c ${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/main.cpp
${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/main.cpp(189): error: identifier "MAX_BUFFER_SIZE" is undefined
              if (numLayer >= MAX_BUFFER_SIZE) {

As the error suggests, I didn't find the definition of "MAX_BUFFER_SIZE" anywhere in the code.

@lijing1989
Copy link

It has to be
DataLayerOpt() : numRecords_{0}, numFeatures_ {0}, numLabels_ {0} {};

Hi. That did the trick. Thank you very much.

But now, I'm getting the following error:

[ 87%] Building CXX object CMakeFiles/SLIDE_LIB.dir/SLIDE/main.cpp.o
/opt/intel/parallel_studio_xe_2020/compilers_and_libraries_2020.2.254/linux/bin/intel64/icpc  -DOPT_AVX512=1 -DOPT_IA=1 -I${HOMEDIR}/SLIDE/SLIDE_opt_ia/bin/ep/include  -qopenmp   -std=c++14 -O2 -DNDEBUG -std=c++14 -o CMakeFiles/SLIDE_LIB.dir/SLIDE/main.cpp.o -c ${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/main.cpp
${HOMEDIR}/SLIDE/SLIDE_opt_ia/SLIDE/main.cpp(189): error: identifier "MAX_BUFFER_SIZE" is undefined
              if (numLayer >= MAX_BUFFER_SIZE) {

As the error suggests, I didn't find the definition of "MAX_BUFFER_SIZE" anywhere in the code.

Yes, I also encountered this problem!
error: identifier "MAX_BUFFER_SIZE" is undefined

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants