Skip to content

Instantly share code, notes, and snippets.

Error1:
[100%] Built target build_cpp_meta_examples
/opt/shogun/src/shogun/lib/SGVector.h:536: Error: Syntax error in input(3).
make[2]: *** [src/interfaces/python_modular/modshogunPYTHON_wrap.cxx] Error 1
make[1]: *** [src/interfaces/python_modular/CMakeFiles/_python_modular.dir/all] Error 2
make: *** [all] Error 2
[COMMENT:SGVector.h:536 is `alignas(CACHE_SIZE_XXXX) T* vector;`]
Error2:
[ 28%] Building CXX object src/shogun/CMakeFiles/libshogun.dir/lib/SGMatrix.cpp.o
/Users/zora/Github/shogun/src/shogun/lib/SGMatrix.cpp:900:22: error: call to constructor of 'SGVector<float64_t>' is ambiguous
SGVector<float64_t> result(NULL, 0, true);
^ ~~~~~~~~~~~~~
/Users/zora/Github/shogun/src/shogun/lib/SGVector.h:70:3: note: candidate constructor
SGVector(T* v, index_t len, bool ref_counting=true);
^
/Users/zora/Github/shogun/src/shogun/lib/SGVector.h:83:3: note: candidate constructor
SGVector(GPUMemoryBase<T>* vector, index_t len, bool ref_counting=true);
^
[==========] Running 4 benchmarks.
[ RUN ] CPUVector.dot_explict_eigen3(const SGVector<T> &A = data.A, const SGVector<T> &B = data.B) (10 runs, 1000 iterations per run)
[ DONE ] CPUVector.dot_explict_eigen3(const SGVector<T> &A = data.A, const SGVector<T> &B = data.B) (0.000550 ms)
[ RUNS ] Average time: 0.055 us
Fastest: 0.000 us (-0.055 us / -100.000 %)
Slowest: 0.313 us (+0.258 us / +469.091 %)
Average performance: 18181818.18182 runs/s
Best performance: inf runs/s (+inf runs/s / +inf %)
Worst performance: 3194888.17891 runs/s (-14986930.00290 runs/s / -82.42812 %)
[ RUN ] MatrixSum.symmetric_viennacl_backend_no_diag
unknown file: Failure
C++ exception with description "ViennaCL: FATAL ERROR: You requested to create a ViennaCL type using double precision. However, double precision is not supported by your device.
If you think that this is a bug in ViennaCL, please report it at viennacl-support@lists.sourceforge.net and supply at least the following information:
* Operating System
* Which OpenCL implementation (AMD, NVIDIA, etc.)
* ViennaCL version
Many thanks in advance!" thrown in the test body.
[ FAILED ] MatrixSum.symmetric_viennacl_backend_no_diag (0 ms)
[ RUN ] MatrixSum.asymmetric_colwise_viennacl_backend_with_diag
template<class Archive>
void save(Archive & ar) const
{
ar(vlen);
for (index_t i = 0; i < vlen; ++i)
ar(vector[i]);
}
template<class Archive>
void load(Archive & ar)
g++ -c -std=c++11 -I. main.cpp -lshogun
@OXPHOS
OXPHOS / errors
Last active May 31, 2016 15:47
unique_ptr error
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2457:27: error:
implicit instantiation of undefined member 'GPU_Vector<int>::GPUArray'
static_assert(sizeof(_Tp) > 0, "default_delete can not delete incomplete type");
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2658:13: note:
in instantiation of member function 'std::__1::default_delete<GPU_Vector<int>::GPUArray>::operator()' requested
here
__ptr_.second()(__tmp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2626:46: note:
#include <shogun/lib/config.h>
#include <shogun/mathematics/linalg/linalgRefactor.h>
#include <shogun/lib/SGVector.h>
#include <shogun/mathematics/eigen3.h>
#include <iostream>
#include <memory>
template <class T> CPU_Vector<T>::CPU_Vector(const SGVector<T> &vector)
{
CPUptr = const_cast<SGVector<T>*>(&vector);
@OXPHOS
OXPHOS / qda.sg
Created May 27, 2016 14:38
with '0' error when making cookbook
CSVFile f_feats_train("../../data/classifier_4class_2d_linear_features_train.dat")
CSVFile f_feats_test("../../data/classifier_4class_2d_linear_features_test.dat")
CSVFile f_labels_train("../../data/classifier_4class_2d_linear_labels_train.dat")
CSVFile f_labels_test("../../data/classifier_4class_2d_linear_labels_test.dat")
#![create_features]
RealFeatures features_train(f_feats_train)
RealFeatures features_test(f_feats_test)
MulticlassLabels labels_train(f_labels_train)
MulticlassLabels labels_test(f_labels_test)
@OXPHOS
OXPHOS / qda.sg
Last active May 28, 2016 11:27
with ruby pda.get_cov() error
CSVFile f_feats_train("../../data/classifier_4class_2d_linear_features_train.dat")
CSVFile f_feats_test("../../data/classifier_4class_2d_linear_features_test.dat")
CSVFile f_labels_train("../../data/classifier_4class_2d_linear_labels_train.dat")
CSVFile f_labels_test("../../data/classifier_4class_2d_linear_labels_test.dat")
#![create_features]
RealFeatures features_train(f_feats_train)
RealFeatures features_test(f_feats_test)
MulticlassLabels labels_train(f_labels_train)
MulticlassLabels labels_test(f_labels_test)