Cntk: Undefined function or macro 'MaxUnpooling'

Created on 2 Jul 2016  Â·  4Comments  Â·  Source: microsoft/CNTK

Hi,
i'm trying CNTK MNIST example.
i followed steps in readme, in first i executed from additional files the python script to download and convert dataset, then i setted the cntk config file (02_Convolution.cntk) with:

deviceId = -1

when i try to execute cntk this is my output

<<<<<<<<<<<<<<<<<<<< PROCESSED CONFIG WITH ALL VARIABLES RESOLVED <<<<<<<<<<<<<<<<<<<<
Commands: train test
Precision = "float"
CNTKModelPath: ../Output/Models/02_Convolution
CNTKCommandTrainInfo: train : 15
CNTKCommandTrainInfo: CNTKNoMoreCommands_Total : 15

##############################################################################
#                                                                            #
# Action "train"                                                             #
#                                                                            #
##############################################################################

CNTKCommandTrainBegin: train


[CALL STACK]
[0x5e964d]          Microsoft::MSR::CNTK::NDLScript<float>::  ParseCall  (std::string const&) + 0x23d
[0x5eb675]          Microsoft::MSR::CNTK::NDLScript<float>::  ParseValue  (std::string const&,  unsigned long,  unsigned long) + 0x2e5
[0x5988e4]          Microsoft::MSR::CNTK::ConfigParser::  Parse  (std::string const&,  unsigned long) + 0x254
[0x5eb16f]          Microsoft::MSR::CNTK::NDLScript<float>::  NDLScript  (Microsoft::MSR::CNTK::ConfigValue const&,  std::string,  bool) + 0x4af
[0x5eb4b4]          Microsoft::MSR::CNTK::NDLScript<float>::  ParseValue  (std::string const&,  unsigned long,  unsigned long) + 0x124
[0x5988e4]          Microsoft::MSR::CNTK::ConfigParser::  Parse  (std::string const&,  unsigned long) + 0x254
[0x5cc858]          Microsoft::MSR::CNTK::NDLScript<float>::  FileParse  (std::string const&) + 0x2b8
[0x7fc15766c214]    Microsoft::MSR::CNTK::ConfigParser::  LoadConfigFileAndResolveVariables  (std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> const&,  Microsoft::MSR::CNTK::ConfigParameters const&) + 0x64
[0x5f0b49]          Microsoft::MSR::CNTK::NDLBuilder<float>::  Init  (Microsoft::MSR::CNTK::ConfigParameters const&) + 0x7e9
[0x5f147e]          Microsoft::MSR::CNTK::NDLBuilder<float>::  NDLBuilder  (Microsoft::MSR::CNTK::ConfigParameters const&) + 0x13e
[0x7d0be0]          bool  TryGetNetworkFactory  <Microsoft::MSR::CNTK::ConfigParameters,float>(Microsoft::MSR::CNTK::ConfigParameters const&,  std::function<std::shared_ptr<Microsoft::MSR::CNTK::ComputationNetwork> (int)>&) + 0x4f0
[0x7d140c]          std::function<std::shared_ptr<Microsoft::MSR::CNTK::ComputationNetwork> (int)>  GetNetworkFactory  <Microsoft::MSR::CNTK::ConfigParameters,float>(Microsoft::MSR::CNTK::ConfigParameters const&) + 0x1c
[0x7a0049]          void  DoTrain  <Microsoft::MSR::CNTK::ConfigParameters,float>(Microsoft::MSR::CNTK::ConfigParameters const&) + 0x69
[0x5ed270]          void  DoCommands  <float>(Microsoft::MSR::CNTK::ConfigParameters const&,  std::shared_ptr<Microsoft::MSR::CNTK::MPIWrapper> const&) + 0x960
[0x58dfc4]          wmainOldCNTKConfig  (int,  wchar_t**)              + 0xbf4
[0x58e657]          wmain1  (int,  wchar_t**)                          + 0x87
[0x5830b8]          main                                               + 0xd8
[0x7fc1562a9830]    __libc_start_main                                  + 0xf0
[0x586ae0]                                                            
EXCEPTION occurred: Undefined function or macro 'MaxUnpooling' in MaxUnpooling(inp, poolInp, {kW, kH, 1}, stride={hStride, vStride, 1}, autoPadding={false, false, false}, lowerPad=0, upperPad=0, imageLayout=cudnn)

MaxUnpooling seems to be a function in https://github.com/Microsoft/CNTK/blob/master/Source/ComputationNetworkLib/ConvolutionalNodes.h

what's wrong?

i'm running cntk binary version with only CPU support

Most helpful comment

thanks for your reply,
i'm trying to compile source code but i'm facing this problem:

if a try to compile using
make -j all
my ram is satured and give me this error
g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.

i tried increasing swap partition but the problem still remain.

In this page: https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Linux
is suggested to use only make or make -j 2 to avoid parallels compilation task or limit the number of parallels tasks but i have the following error:

make[1]: Entering directory '/home/nico/cntk_compile_v2/cntk' =-----------------------------------------------------------= creating /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/BlockHandlerSSE.o for Linux with build type release mpic++ -c Source/Math/BlockHandlerSSE.cpp -o /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/BlockHandlerSSE.o -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -std=c++11 -DCPUONLY -DUSE_MKL -DNDEBUG -DNO_SYNC -DCNTK_PARALLEL_TRAINING_SUPPORT -DUSE_ZIP -msse3 -mssse3 -std=c++0x -fopenmp -fpermissive -fPIC -Werror -fcheck-new -Wno-error=literal-suffix -g -O4 -ISource/Common/Include -ISource/CNTKv2LibraryDll -ISource/CNTKv2LibraryDll/API -ISource/Math -ISource/CNTK -ISource/ActionsLib -ISource/ComputationNetworkLib -ISource/SGDLib -ISource/SequenceTrainingLib -ISource/CNTK/BrainScript -ISource/Readers/ReaderLib -I/usr/local/CNTKCustomMKL/1/include -I/usr/local/lib/libzip/include -I/usr/local/opencv-3.0.0/include -ISource/1BitSGD -MD -MP -MF /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/BlockHandlerSSE.d =-----------------------------------------------------------= creating /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUMatrix.o for Linux with build type release mpic++ -c Source/Math/CPUMatrix.cpp -o /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUMatrix.o -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -std=c++11 -DCPUONLY -DUSE_MKL -DNDEBUG -DNO_SYNC -DCNTK_PARALLEL_TRAINING_SUPPORT -DUSE_ZIP -msse3 -mssse3 -std=c++0x -fopenmp -fpermissive -fPIC -Werror -fcheck-new -Wno-error=literal-suffix -g -O4 -ISource/Common/Include -ISource/CNTKv2LibraryDll -ISource/CNTKv2LibraryDll/API -ISource/Math -ISource/CNTK -ISource/ActionsLib -ISource/ComputationNetworkLib -ISource/SGDLib -ISource/SequenceTrainingLib -ISource/CNTK/BrainScript -ISource/Readers/ReaderLib -I/usr/local/CNTKCustomMKL/1/include -I/usr/local/lib/libzip/include -I/usr/local/opencv-3.0.0/include -ISource/1BitSGD -MD -MP -MF /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUMatrix.d =-----------------------------------------------------------= creating /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o for Linux with build type release mpic++ -c Source/Math/CPUSparseMatrix.cpp -o /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -std=c++11 -DCPUONLY -DUSE_MKL -DNDEBUG -DNO_SYNC -DCNTK_PARALLEL_TRAINING_SUPPORT -DUSE_ZIP -msse3 -mssse3 -std=c++0x -fopenmp -fpermissive -fPIC -Werror -fcheck-new -Wno-error=literal-suffix -g -O4 -ISource/Common/Include -ISource/CNTKv2LibraryDll -ISource/CNTKv2LibraryDll/API -ISource/Math -ISource/CNTK -ISource/ActionsLib -ISource/ComputationNetworkLib -ISource/SGDLib -ISource/SequenceTrainingLib -ISource/CNTK/BrainScript -ISource/Readers/ReaderLib -I/usr/local/CNTKCustomMKL/1/include -I/usr/local/lib/libzip/include -I/usr/local/opencv-3.0.0/include -ISource/1BitSGD -MD -MP -MF /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.d Source/Math/CPUSparseMatrix.cpp: In member function ‘Microsoft::MSR::CNTK::CPUSparseMatrix<ElemType>& Microsoft::MSR::CNTK::CPUSparseMatrix<ElemType>::DoGatherColumnsOf(ElemType, const Microsoft::MSR::CNTK::CPUMatrix<ElemType>&, const Microsoft::MSR::CNTK::CPUSparseMatrix<ElemType>&, ElemType)’: Source/Math/CPUSparseMatrix.cpp:352:13: error: ‘::isnan’ has not been declared if (::isnan(jInF) || (jInF < 0)) // negative index means gap ^ Source/Math/CPUSparseMatrix.cpp:352:13: note: suggested alternatives: In file included from /usr/include/c++/5/random:38:0, from /usr/include/c++/5/bits/stl_algo.h:66, from /usr/include/c++/5/algorithm:62, from Source/Math/stdafx.h:38, from Source/Math/CPUSparseMatrix.cpp:8: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ Source/Math/CPUSparseMatrix.cpp:369:13: error: ‘::isnan’ has not been declared if (::isnan(jInF) || (jInF < 0)) // negative index means gap ^ Source/Math/CPUSparseMatrix.cpp:369:13: note: suggested alternatives: In file included from /usr/include/c++/5/random:38:0, from /usr/include/c++/5/bits/stl_algo.h:66, from /usr/include/c++/5/algorithm:62, from Source/Math/stdafx.h:38, from Source/Math/CPUSparseMatrix.cpp:8: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ Makefile:825: recipe for target '/home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o' failed make[1]: *** [/home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o] Error 1 make[1]: Leaving directory '/home/nico/cntk_compile_v2/cntk' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2

what's wrong??

i'm tring to build cntk on a vritual machine (using vmware) Ubuntu 64bit with 16 gb ram,
my gcc:
dpkg --list | grep compiler ii g++ 4:5.3.1-1ubuntu1 amd64 GNU C++ compiler ii g++-5 5.3.1-14ubuntu2.1 amd64 GNU C++ compiler ii gcc 4:5.3.1-1ubuntu1 amd64 GNU C compiler ii gcc-5 5.3.1-14ubuntu2.1 amd64 GNU C compiler ii hardening-includes 2.7ubuntu2 all Makefile for enabling compiler flags for security hardening ii libllvm3.8:amd64 1:3.8-2ubuntu1 amd64 Modular compiler and toolchain technologies, runtime library ii libxkbcommon0:amd64 0.5.0-1ubuntu2 amd64 library interface to the XKB compiler - shared library nico@ubuntu:~/cntk_compile_v2/cntk/build/release$

MKL,
MPI,
OpenCV,

my configuration command is:
../../configure --with-mkl=/usr/local/CNTKCustomMKL --1bitsgd=yes

i need to execute this example
https://github.com/Microsoft/CNTK/blob/master/Examples/Image/MNIST/README.md

All 4 comments

Hi Colino,

I think it's because you are running the precompiled binaries for CNTK. The lastest version (1.5) doesn't support the MaxUnpooling operation, as you can see on the file your linked (with tag v1.5):

https://github.com/Microsoft/CNTK/blob/v1.5/Source/ComputationNetworkLib/ConvolutionalNodes.h

If you want to be able to use this kind of operation, you will need to compile your own CNTK from the master branch.

thanks for your reply,
i'm trying to compile source code but i'm facing this problem:

if a try to compile using
make -j all
my ram is satured and give me this error
g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.

i tried increasing swap partition but the problem still remain.

In this page: https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Linux
is suggested to use only make or make -j 2 to avoid parallels compilation task or limit the number of parallels tasks but i have the following error:

make[1]: Entering directory '/home/nico/cntk_compile_v2/cntk' =-----------------------------------------------------------= creating /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/BlockHandlerSSE.o for Linux with build type release mpic++ -c Source/Math/BlockHandlerSSE.cpp -o /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/BlockHandlerSSE.o -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -std=c++11 -DCPUONLY -DUSE_MKL -DNDEBUG -DNO_SYNC -DCNTK_PARALLEL_TRAINING_SUPPORT -DUSE_ZIP -msse3 -mssse3 -std=c++0x -fopenmp -fpermissive -fPIC -Werror -fcheck-new -Wno-error=literal-suffix -g -O4 -ISource/Common/Include -ISource/CNTKv2LibraryDll -ISource/CNTKv2LibraryDll/API -ISource/Math -ISource/CNTK -ISource/ActionsLib -ISource/ComputationNetworkLib -ISource/SGDLib -ISource/SequenceTrainingLib -ISource/CNTK/BrainScript -ISource/Readers/ReaderLib -I/usr/local/CNTKCustomMKL/1/include -I/usr/local/lib/libzip/include -I/usr/local/opencv-3.0.0/include -ISource/1BitSGD -MD -MP -MF /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/BlockHandlerSSE.d =-----------------------------------------------------------= creating /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUMatrix.o for Linux with build type release mpic++ -c Source/Math/CPUMatrix.cpp -o /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUMatrix.o -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -std=c++11 -DCPUONLY -DUSE_MKL -DNDEBUG -DNO_SYNC -DCNTK_PARALLEL_TRAINING_SUPPORT -DUSE_ZIP -msse3 -mssse3 -std=c++0x -fopenmp -fpermissive -fPIC -Werror -fcheck-new -Wno-error=literal-suffix -g -O4 -ISource/Common/Include -ISource/CNTKv2LibraryDll -ISource/CNTKv2LibraryDll/API -ISource/Math -ISource/CNTK -ISource/ActionsLib -ISource/ComputationNetworkLib -ISource/SGDLib -ISource/SequenceTrainingLib -ISource/CNTK/BrainScript -ISource/Readers/ReaderLib -I/usr/local/CNTKCustomMKL/1/include -I/usr/local/lib/libzip/include -I/usr/local/opencv-3.0.0/include -ISource/1BitSGD -MD -MP -MF /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUMatrix.d =-----------------------------------------------------------= creating /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o for Linux with build type release mpic++ -c Source/Math/CPUSparseMatrix.cpp -o /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -std=c++11 -DCPUONLY -DUSE_MKL -DNDEBUG -DNO_SYNC -DCNTK_PARALLEL_TRAINING_SUPPORT -DUSE_ZIP -msse3 -mssse3 -std=c++0x -fopenmp -fpermissive -fPIC -Werror -fcheck-new -Wno-error=literal-suffix -g -O4 -ISource/Common/Include -ISource/CNTKv2LibraryDll -ISource/CNTKv2LibraryDll/API -ISource/Math -ISource/CNTK -ISource/ActionsLib -ISource/ComputationNetworkLib -ISource/SGDLib -ISource/SequenceTrainingLib -ISource/CNTK/BrainScript -ISource/Readers/ReaderLib -I/usr/local/CNTKCustomMKL/1/include -I/usr/local/lib/libzip/include -I/usr/local/opencv-3.0.0/include -ISource/1BitSGD -MD -MP -MF /home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.d Source/Math/CPUSparseMatrix.cpp: In member function ‘Microsoft::MSR::CNTK::CPUSparseMatrix<ElemType>& Microsoft::MSR::CNTK::CPUSparseMatrix<ElemType>::DoGatherColumnsOf(ElemType, const Microsoft::MSR::CNTK::CPUMatrix<ElemType>&, const Microsoft::MSR::CNTK::CPUSparseMatrix<ElemType>&, ElemType)’: Source/Math/CPUSparseMatrix.cpp:352:13: error: ‘::isnan’ has not been declared if (::isnan(jInF) || (jInF < 0)) // negative index means gap ^ Source/Math/CPUSparseMatrix.cpp:352:13: note: suggested alternatives: In file included from /usr/include/c++/5/random:38:0, from /usr/include/c++/5/bits/stl_algo.h:66, from /usr/include/c++/5/algorithm:62, from Source/Math/stdafx.h:38, from Source/Math/CPUSparseMatrix.cpp:8: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ Source/Math/CPUSparseMatrix.cpp:369:13: error: ‘::isnan’ has not been declared if (::isnan(jInF) || (jInF < 0)) // negative index means gap ^ Source/Math/CPUSparseMatrix.cpp:369:13: note: suggested alternatives: In file included from /usr/include/c++/5/random:38:0, from /usr/include/c++/5/bits/stl_algo.h:66, from /usr/include/c++/5/algorithm:62, from Source/Math/stdafx.h:38, from Source/Math/CPUSparseMatrix.cpp:8: /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ /usr/include/c++/5/cmath:641:5: note: ‘std::isnan’ Makefile:825: recipe for target '/home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o' failed make[1]: *** [/home/nico/cntk_compile_v2/cntk/build/release/.build/Source/Math/CPUSparseMatrix.o] Error 1 make[1]: Leaving directory '/home/nico/cntk_compile_v2/cntk' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2

what's wrong??

i'm tring to build cntk on a vritual machine (using vmware) Ubuntu 64bit with 16 gb ram,
my gcc:
dpkg --list | grep compiler ii g++ 4:5.3.1-1ubuntu1 amd64 GNU C++ compiler ii g++-5 5.3.1-14ubuntu2.1 amd64 GNU C++ compiler ii gcc 4:5.3.1-1ubuntu1 amd64 GNU C compiler ii gcc-5 5.3.1-14ubuntu2.1 amd64 GNU C compiler ii hardening-includes 2.7ubuntu2 all Makefile for enabling compiler flags for security hardening ii libllvm3.8:amd64 1:3.8-2ubuntu1 amd64 Modular compiler and toolchain technologies, runtime library ii libxkbcommon0:amd64 0.5.0-1ubuntu2 amd64 library interface to the XKB compiler - shared library nico@ubuntu:~/cntk_compile_v2/cntk/build/release$

MKL,
MPI,
OpenCV,

my configuration command is:
../../configure --with-mkl=/usr/local/CNTKCustomMKL --1bitsgd=yes

i need to execute this example
https://github.com/Microsoft/CNTK/blob/master/Examples/Image/MNIST/README.md

Hello!

Two things.

1) Internally we use GNU C++ 4.8.4. See our configurations.
2) Try to use 'plain' make, i.e. not using -j at all

Hi, i have tested with 5.3.1 but with -j param it crashed with problem described in the previouse post.
with no params, using plain make it doesn't compile.
I solved the problem using exactly that version of compiler

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haixpham picture haixpham  Â·  5Comments

pallashadow picture pallashadow  Â·  5Comments

springkim picture springkim  Â·  4Comments

nietras picture nietras  Â·  5Comments

christopher5106 picture christopher5106  Â·  5Comments