You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using gcc/7.4.0 and cuda/10.2.89, I obtained the following valgrind output when running the example in examples/cpp/01_add_vectors:
==21923== Memcheck, a memory error detector
==21923== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==21923== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==21923== Command: ./main -d {mode:\ 'CUDA',\ device_id\ :\ 0} -v
==21923==
==21923== Invalid read of size 4
==21923== at 0x440C9B4: occa::primitive::load(char const*&, bool) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43F9A2F: occa::json::loadNumber(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x44045AB: occa::json::load(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x4402EA3: occa::json::loadObjectField(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x44035C3: occa::json::loadObject(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x440454B: occa::json::load(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x440490F: occa::json::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x44049DF: occa::json::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x41B039B: occa::device::setup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x100023BB: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923== Address 0x5be92fb is 27 bytes inside a block of size 30 alloc'd
==21923== at 0x4084AF4: operator new(unsigned long) (vg_replace_malloc.c:334)
==21923== by 0x575C447: allocate (new_allocator.h:111)
==21923== by 0x575C447: allocate (alloc_traits.h:436)
==21923== by 0x575C447: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long) (basic_string.tcc:153)
==21923== by 0x43F8BF3: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.79] (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43FA05B: occa::json::toString[abi:cxx11]() const (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x100023AB: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923==
==21923== Invalid read of size 4
==21923== at 0x440CAB4: occa::primitive::load(char const*&, bool) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43F9A2F: occa::json::loadNumber(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x44045AB: occa::json::load(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x4402EA3: occa::json::loadObjectField(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x44035C3: occa::json::loadObject(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x440454B: occa::json::load(char const*&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x440490F: occa::json::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x44049DF: occa::json::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x41B039B: occa::device::setup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x100023BB: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923== Address 0x5be92fb is 27 bytes inside a block of size 30 alloc'd
==21923== at 0x4084AF4: operator new(unsigned long) (vg_replace_malloc.c:334)
==21923== by 0x575C447: allocate (new_allocator.h:111)
==21923== by 0x575C447: allocate (alloc_traits.h:436)
==21923== by 0x575C447: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long) (basic_string.tcc:153)
==21923== by 0x43F8BF3: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.79] (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43FA05B: occa::json::toString[abi:cxx11]() const (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x100023AB: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923==
==21923== Warning: noted but unhandled ioctl 0x30000001 with no size/direction hints.
==21923== This could cause spurious value errors to appear.
==21923== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==21923== Conditional jump or move depends on uninitialised value(s)
==21923== at 0x481F438: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x499C41B: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x47D735F: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x49A2893: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x47D9827: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x477BFDB: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x477CD87: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x4652643: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x483845B: cuInit (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x43636A7: occa::cuda::init() (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x4360CF7: occa::cuda::cudaMode::init() (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x4348297: occa::initializeModes() (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923==
==21923== Use of uninitialised value of size 8
==21923== at 0x481F448: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x499C41B: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x47D735F: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x49A2893: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x47D9827: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x477BFDB: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x477CD87: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x4652643: ??? (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x483845B: cuInit (in /autofs/nccs-svm1_sw/summit/cuda/10.2.89/targets/ppc64le-linux/lib/libcuda.so.440.33.01)
==21923== by 0x43636A7: occa::cuda::init() (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x4360CF7: occa::cuda::cudaMode::init() (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x4348297: occa::initializeModes() (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923==
==21923== Warning: set address range perms: large range [0x200000000, 0x400200000) (noaccess)
==21923== Warning: set address range perms: large range [0x10830000, 0x30820000) (noaccess)
==21923== Warning: set address range perms: large range [0x59d10000, 0x99d00000) (noaccess)
==21923== Warning: set address range perms: large range [0x80000000, 0x99d00000) (noaccess)
==21923== Conditional jump or move depends on uninitialised value(s)
==21923== at 0x440C9CC: occa::primitive::load(char const*&, bool) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422A96F: occa::launchedModeDevice_t::getLaunchedKernelsMetadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43566BF: occa::cuda::device::buildOKLKernelFromBinary(occa::hash_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&, occa::lang::sourceMetadata_t&, occa::json const&, occa::io::lock_t) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422C29B: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, bool, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422EB27: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x41B133B: occa::device::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::json const&) const (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x1000251B: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923==
==21923== Conditional jump or move depends on uninitialised value(s)
==21923== at 0x440C9F4: occa::primitive::load(char const*&, bool) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422A96F: occa::launchedModeDevice_t::getLaunchedKernelsMetadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43566BF: occa::cuda::device::buildOKLKernelFromBinary(occa::hash_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&, occa::lang::sourceMetadata_t&, occa::json const&, occa::io::lock_t) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422C29B: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, bool, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422EB27: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x41B133B: occa::device::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::json const&) const (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x1000251B: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923==
==21923== Conditional jump or move depends on uninitialised value(s)
==21923== at 0x440CACC: occa::primitive::load(char const*&, bool) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422A96F: occa::launchedModeDevice_t::getLaunchedKernelsMetadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43566BF: occa::cuda::device::buildOKLKernelFromBinary(occa::hash_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&, occa::lang::sourceMetadata_t&, occa::json const&, occa::io::lock_t) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422C29B: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, bool, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422EB27: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x41B133B: occa::device::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::json const&) const (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x1000251B: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923==
==21923== Conditional jump or move depends on uninitialised value(s)
==21923== at 0x440CAF8: occa::primitive::load(char const*&, bool) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422A96F: occa::launchedModeDevice_t::getLaunchedKernelsMetadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x43566BF: occa::cuda::device::buildOKLKernelFromBinary(occa::hash_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::lang::sourceMetadata_t&, occa::lang::sourceMetadata_t&, occa::json const&, occa::io::lock_t) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422C29B: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, bool, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x422EB27: occa::launchedModeDevice_t::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::hash_t, occa::json const&) (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x41B133B: occa::device::buildKernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, occa::json const&) const (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/lib/libocca.so)
==21923== by 0x1000251B: main (in /autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/main)
==21923==
==21923== Warning: set address range perms: large range [0x60000000, 0x80000000) (noaccess)
Loading cached [addVectors] from [/autofs/nccs-svm1_home1/malachi/develop/testing-occa/most-recent/occa/examples/cpp/01_add_vectors/addVectors.okl] in [055038fb61a29174/binary]
Loading cached [addVectors] from [055038fb61a29174/launcher_source.cpp] in [055038fb61a29174/launcher_binary]
0: 1
1: 1
2: 1
3: 1
4: 1
==21923==
==21923== HEAP SUMMARY:
==21923== in use at exit: 418,145 bytes in 128 blocks
==21923== total heap usage: 16,618 allocs, 16,490 frees, 63,661,094 bytes allocated
==21923==
==21923== LEAK SUMMARY:
==21923== definitely lost: 576 bytes in 1 blocks
==21923== indirectly lost: 2,304 bytes in 10 blocks
==21923== possibly lost: 3,400 bytes in 23 blocks
==21923== still reachable: 411,865 bytes in 94 blocks
==21923== suppressed: 0 bytes in 0 blocks
==21923== Rerun with --leak-check=full to see details of leaked memory
==21923==
==21923== For counts of detected and suppressed errors, rerun with: -v
==21923== Use --track-origins=yes to see where uninitialised values come from
==21923== ERROR SUMMARY: 59 errors from 8 contexts (suppressed: 0 from 0)
I suspect this may be related to an issue in nekRS where a bad_alloc is thrown somewhere in occa::primitive (looks like the copy ctor?), see: Nek5000/nekRS#305, but I'm not entirely sure.
Let me know if you'd like for me to take a closer look -- I'd be happy to help.
Thanks!
The text was updated successfully, but these errors were encountered:
Using gcc/7.4.0 and cuda/10.2.89, I obtained the following valgrind output when running the example in
examples/cpp/01_add_vectors
:The command used:
I suspect this may be related to an issue in nekRS where a bad_alloc is thrown somewhere in occa::primitive (looks like the copy ctor?), see: Nek5000/nekRS#305, but I'm not entirely sure.
Let me know if you'd like for me to take a closer look -- I'd be happy to help.
Thanks!
The text was updated successfully, but these errors were encountered: