Skip to content

Instantly share code, notes, and snippets.

@crockpotveggies
Created April 26, 2016 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crockpotveggies/3eaeb85d1a1c2118dcb9ec107acad3e6 to your computer and use it in GitHub Desktop.
Save crockpotveggies/3eaeb85d1a1c2118dcb9ec107acad3e6 to your computer and use it in GitHub Desktop.
./buildnativeoperations.sh blas cpu
eval cmake
RUNNING OSX CLANG
Running blas
RUNNING COMMAND cmake
-- The C compiler identification is AppleClang 7.3.0.7030029
-- The CXX compiler identification is Clang 3.5.0
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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/local/Cellar/clang-omp/2015-04-01/bin/clang-omp++
-- Check for working CXX compiler: /usr/local/Cellar/clang-omp/2015-04-01/bin/clang-omp++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
ADDING BLAS
Using apple
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Could NOT find OpenMP (missing: OpenMP_C_FLAGS)
CPU BLAS
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/justin/Projects/libnd4j/blasbuild/cpu
/usr/local/Cellar/cmake/3.4.1/bin/cmake -H/Users/justin/Projects/libnd4j -B/Users/justin/Projects/libnd4j/blasbuild/cpu --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.4.1/bin/cmake -E cmake_progress_start /Users/justin/Projects/libnd4j/blasbuild/cpu/CMakeFiles /Users/justin/Projects/libnd4j/blasbuild/cpu/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f blas/CMakeFiles/nd4j.dir/build.make blas/CMakeFiles/nd4j.dir/depend
cd /Users/justin/Projects/libnd4j/blasbuild/cpu && /usr/local/Cellar/cmake/3.4.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/justin/Projects/libnd4j /Users/justin/Projects/libnd4j/blas /Users/justin/Projects/libnd4j/blasbuild/cpu /Users/justin/Projects/libnd4j/blasbuild/cpu/blas /Users/justin/Projects/libnd4j/blasbuild/cpu/blas/CMakeFiles/nd4j.dir/DependInfo.cmake --color=
Scanning dependencies of target nd4j
make -f blas/CMakeFiles/nd4j.dir/build.make blas/CMakeFiles/nd4j.dir/build
[ 33%] Building CXX object blas/CMakeFiles/nd4j.dir/cpu/NativeBlas.cpp.o
cd /Users/justin/Projects/libnd4j/blasbuild/cpu/blas && clang-omp++ -D__CPUBLAS__=true -Dnd4j_EXPORTS -I/Users/justin/Projects/libnd4j/include -march=native -Wall -g -Wall -fopenmp -std=c++11 -fassociative-math -funsafe-math-optimizations -fPIC -o CMakeFiles/nd4j.dir/cpu/NativeBlas.cpp.o -c /Users/justin/Projects/libnd4j/blas/cpu/NativeBlas.cpp
[ 66%] Building CXX object blas/CMakeFiles/nd4j.dir/cpu/NativeOps.cpp.o
cd /Users/justin/Projects/libnd4j/blasbuild/cpu/blas && clang-omp++ -D__CPUBLAS__=true -Dnd4j_EXPORTS -I/Users/justin/Projects/libnd4j/include -march=native -Wall -g -Wall -fopenmp -std=c++11 -fassociative-math -funsafe-math-optimizations -fPIC -o CMakeFiles/nd4j.dir/cpu/NativeOps.cpp.o -c /Users/justin/Projects/libnd4j/blas/cpu/NativeOps.cpp
In file included from /Users/justin/Projects/libnd4j/blas/cpu/NativeOps.cpp:6:
In file included from /Users/justin/Projects/libnd4j/blas/cpu/../NativeOpExcutioner.h:8:
In file included from /Users/justin/Projects/libnd4j/include/broadcasting.h:12:
/Users/justin/Projects/libnd4j/include/shape.h:1405:18: warning: unused variable 'nonOneEncountered' [-Wunused-variable]
bool nonOneEncountered = false;
^
/Users/justin/Projects/libnd4j/include/shape.h:1406:17: warning: unused variable 'trailingDimensionDecrement' [-Wunused-variable]
int trailingDimensionDecrement = 0;
^
/Users/justin/Projects/libnd4j/include/shape.h:1407:17: warning: unused variable 'firstNonOneIndex' [-Wunused-variable]
int firstNonOneIndex = -1;
^
/Users/justin/Projects/libnd4j/include/shape.h:1668:32: warning: '&&' within '||' [-Wlogical-op-parentheses]
if(numOnes < 1 && !shape::isMatrix(shapeInfo) || this->rank == 2) {
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
/Users/justin/Projects/libnd4j/include/shape.h:1668:32: note: place parentheses around the '&&' expression to silence this warning
if(numOnes < 1 && !shape::isMatrix(shapeInfo) || this->rank == 2) {
^
( )
/Users/justin/Projects/libnd4j/include/shape.h:1669:26: warning: unused variable 'permuteShape' [-Wunused-variable]
int *permuteShape = shape::shapeOf(toPermute);
^
/Users/justin/Projects/libnd4j/include/shape.h:1670:26: warning: unused variable 'permuteStride' [-Wunused-variable]
int *permuteStride = shape::stride(toPermute);
^
/Users/justin/Projects/libnd4j/include/shape.h:1661:17: warning: unused variable 'shapeInfoLen' [-Wunused-variable]
int shapeInfoLen = shape::shapeInfoLength(shape::rank(shapeInfo));
^
/Users/justin/Projects/libnd4j/include/shape.h:2393:14: warning: unused variable 'theShape' [-Wunused-variable]
int *theShape = shape::shapeOf(shapeInfo);
^
/Users/justin/Projects/libnd4j/include/shape.h:2394:14: warning: unused variable 'theStride' [-Wunused-variable]
int *theStride = shape::stride(shapeInfo);
^
In file included from /Users/justin/Projects/libnd4j/blas/cpu/NativeOps.cpp:6:
In file included from /Users/justin/Projects/libnd4j/blas/cpu/../NativeOpExcutioner.h:8:
In file included from /Users/justin/Projects/libnd4j/include/broadcasting.h:16:
/Users/justin/Projects/libnd4j/include/pairwise_util.h:193:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
/Users/justin/Projects/libnd4j/include/pairwise_util.h:396:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
In file included from /Users/justin/Projects/libnd4j/blas/cpu/NativeOps.cpp:6:
In file included from /Users/justin/Projects/libnd4j/blas/cpu/../NativeOpExcutioner.h:14:
/Users/justin/Projects/libnd4j/include/transform.h:5071:29: warning: unused variable 'numOnes' [-Wunused-variable]
int numOnes = 0;
^
/Users/justin/Projects/libnd4j/include/transform.h:5072:30: warning: unused variable 'shape' [-Wunused-variable]
int *shape = shape::shapeOf(xShapeBuffer);
^
/Users/justin/Projects/libnd4j/include/transform.h:5073:29: warning: unused variable 'wholeRank' [-Wunused-variable]
int wholeRank = shape::rank(xShapeBuffer);
^
In file included from /Users/justin/Projects/libnd4j/blas/cpu/NativeOps.cpp:6:
In file included from /Users/justin/Projects/libnd4j/blas/cpu/../NativeOpExcutioner.h:10:
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:999:33: warning: using integer absolute value function 'abs' when argument is of
floating point type [-Wabsolute-value]
T absDiff = abs(diff);
^
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:1952:28: note: in instantiation of member function
'functions::pairwise_transforms::ops::Epsilon<double>::op' requested here
return new pairwise_transforms::ops::Epsilon<T>();
^
/Users/justin/Projects/libnd4j/blas/cpu/../NativeOpExcutioner.h:134:96: note: in instantiation of member function
'functions::pairwise_transforms::PairWiseTransformOpFactory<double>::getOp' requested here
functions::pairwise_transforms::PairWiseTransform<T> *op = pairWiseTransformOpFactory->getOp(opNum);
^
/Users/justin/Projects/libnd4j/blas/cpu/NativeOps.cpp:152:47: note: in instantiation of member function
'NativeOpExcutioner<double>::execPairwiseTransform' requested here
DoubleNativeOpExecutioner::getInstance()->execPairwiseTransform(opNum,xPointer,xStride,yPointer,yStride,resultPointer,resultStrid...
^
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:999:33: note: use function 'std::abs' instead
T absDiff = abs(diff);
^~~
std::abs
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:999:33: note: include the header <cmath> or explicitly provide a declaration for
'std::abs'
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:999:33: warning: using integer absolute value function 'abs' when argument is of
floating point type [-Wabsolute-value]
T absDiff = abs(diff);
^
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:1952:28: note: in instantiation of member function
'functions::pairwise_transforms::ops::Epsilon<float>::op' requested here
return new pairwise_transforms::ops::Epsilon<T>();
^
/Users/justin/Projects/libnd4j/blas/cpu/../NativeOpExcutioner.h:134:96: note: in instantiation of member function
'functions::pairwise_transforms::PairWiseTransformOpFactory<float>::getOp' requested here
functions::pairwise_transforms::PairWiseTransform<T> *op = pairWiseTransformOpFactory->getOp(opNum);
^
/Users/justin/Projects/libnd4j/blas/cpu/NativeOps.cpp:806:46: note: in instantiation of member function
'NativeOpExcutioner<float>::execPairwiseTransform' requested here
FloatNativeOpExecutioner::getInstance()->execPairwiseTransform(
^
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:999:33: note: use function 'std::abs' instead
T absDiff = abs(diff);
^~~
std::abs
/Users/justin/Projects/libnd4j/include/pairwise_transform.h:999:33: note: include the header <cmath> or explicitly provide a declaration for
'std::abs'
16 warnings generated.
[100%] Linking CXX shared library libnd4j.dylib
cd /Users/justin/Projects/libnd4j/blasbuild/cpu/blas && /usr/local/Cellar/cmake/3.4.1/bin/cmake -E cmake_link_script CMakeFiles/nd4j.dir/link.txt --verbose=1
clang-omp++ -march=native -Wall -g -Wall -fopenmp -std=c++11 -fassociative-math -funsafe-math-optimizations -dynamiclib -Wl,-headerpad_max_install_names -o libnd4j.dylib -install_name @rpath/libnd4j.dylib CMakeFiles/nd4j.dir/cpu/NativeBlas.cpp.o CMakeFiles/nd4j.dir/cpu/NativeOps.cpp.o -framework Accelerate -framework Accelerate
Undefined symbols for architecture x86_64:
"__ZNSt12length_errorD1Ev", referenced from:
__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv in NativeOps.cpp.o
"__ZSt9terminatev", referenced from:
___clang_call_terminate in NativeOps.cpp.o
"__ZTISt12length_error", referenced from:
__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv in NativeOps.cpp.o
"__ZTVSt12length_error", referenced from:
__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv in NativeOps.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [blas/libnd4j.dylib] Error 1
make[1]: *** [blas/CMakeFiles/nd4j.dir/all] Error 2
make: *** [all] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment