Giter Site home page Giter Site logo

memtestcl's Issues

Update/delete pre-built version to avoid confusion.

Hi

Can you either update pre-built version to one from latest commit, or just delete it? (So people won't be confused when it doesn't work).

Also I would mention this closed-source version shouldn't be used now (it doesn't work with newer cards, uploading to Stanford servers freezes the program.)

Memory Leak?

It seems that memtestCL leaks memory. I'm using the precompiled binary from simtk and everytime I run it, it completes successfully but the memory is never freed.

Running with these command line parameters: --gpu 0 3500 1

Specs:
4770k
2x8GB 2133
R9 380 4GB
17.12.2 Adrenalin

Log
Suspiciously low transfer speeds (14GB/s)?

Doesn't seem to happen with 2500MB and lower. I haven't tested specific sizes, but the lowest size I found that causes a memory leak is 3000MB.

Unable to build under Windows

Latest build tools from Visual Studio, MSVC v143 & Windows 11 SDK. Using CUDA 8.0 from the archive. Results in the following

PS G:\Projects\memtestCL> nmake -f Makefiles\Makefile.windows

Microsoft (R) Program Maintenance Utility Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -MT -Ox -EHsc -DWINDOWS -DCURL_STATICLIB -D_CRT_SECURE_NO_DEPRECATE -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0"\include memtestCL_core.obj memtestCL_cli.cpp -link "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0"\lib\x64\OpenCL.lib Ws2_32.lib -OUT:memtestCL.exe
Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30706 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

memtestCL_cli.cpp
Microsoft (R) Incremental Linker Version 14.30.30706.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:memtestCL_core.exe
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64\OpenCL.lib"
Ws2_32.lib
-OUT:memtestCL.exe
memtestCL_core.obj
memtestCL_cli.obj
memtestCL_core.obj : error LNK2019: unresolved external symbol _clGetDeviceInfo@20 referenced in function "public: __thiscall memtestState::memtestState(struct _cl_context *,struct _cl_device_id *)" (??0memtestState@@QAE@PAU_cl_context@@PAU_cl_device_id@@@Z)
memtestCL_cli.obj : error LNK2001: unresolved external symbol _clGetDeviceInfo@20
memtestCL_core.obj : error LNK2019: unresolved external symbol _clCreateContext@24 referenced in function __catch$?allocate@memtestMultiTester@@UAEII@Z$0
memtestCL_cli.obj : error LNK2001: unresolved external symbol _clCreateContext@24
memtestCL_core.obj : error LNK2019: unresolved external symbol _clRetainContext@4 referenced in function "public: __thiscall memtestFunctions::memtestFunctions(struct _cl_context *,struct _cl_device_id *,struct _cl_command_queue *)" (??0memtestFunctions@@QAE@PAU_cl_context@@PAU_cl_device_id@@PAU_cl_command_queue@@@Z)
memtestCL_cli.obj : error LNK2001: unresolved external symbol _clRetainContext@4
memtestCL_core.obj : error LNK2019: unresolved external symbol _clReleaseContext@4 referenced in function "public: __thiscall memtestFunctions::~memtestFunctions(void)" (??1memtestFunctions@@QAE@XZ)
memtestCL_cli.obj : error LNK2001: unresolved external symbol _clReleaseContext@4
memtestCL_core.obj : error LNK2019: unresolved external symbol _clCreateCommandQueue@20 referenced in function "public: __thiscall memtestState::memtestState(struct _cl_context *,struct _cl_device_id *)" (??0memtestState@@QAE@PAU_cl_context@@PAU_cl_device_id@@@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clRetainCommandQueue@4 referenced in function "public: __thiscall memtestFunctions::memtestFunctions(struct _cl_context *,struct _cl_device_id *,struct _cl_command_queue *)" (??0memtestFunctions@@QAE@PAU_cl_context@@PAU_cl_device_id@@PAU_cl_command_queue@@@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clReleaseCommandQueue@4 referenced in function "public: __thiscall memtestFunctions::~memtestFunctions(void)" (??1memtestFunctions@@QAE@XZ)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clCreateBuffer@24 referenced in function "public: unsigned int __thiscall memtestState::allocate(unsigned int)" (?allocate@memtestState@@QAEII@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clReleaseMemObject@4 referenced in function "public: __thiscall memtestState::~memtestState(void)" (??1memtestState@@QAE@XZ)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clCreateProgramWithSource@20 referenced in function "public: __thiscall memtestFunctions::memtestFunctions(struct _cl_context *,struct _cl_device_id *,struct _cl_command_queue *)" (??0memtestFunctions@@QAE@PAU_cl_context@@PAU_cl_device_id@@PAU_cl_command_queue@@@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clReleaseProgram@4 referenced in function "public: __thiscall memtestFunctions::~memtestFunctions(void)" (??1memtestFunctions@@QAE@XZ)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clBuildProgram@24 referenced in function "public: __thiscall memtestFunctions::memtestFunctions(struct _cl_context *,struct _cl_device_id *,struct _cl_command_queue *)" (??0memtestFunctions@@QAE@PAU_cl_context@@PAU_cl_device_id@@PAU_cl_command_queue@@@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clGetProgramInfo@20 referenced in function "public: __thiscall memtestFunctions::memtestFunctions(struct _cl_context *,struct _cl_device_id *,struct _cl_command_queue *)" (??0memtestFunctions@@QAE@PAU_cl_context@@PAU_cl_device_id@@PAU_cl_command_queue@@@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clGetProgramBuildInfo@24 referenced in function "public: __thiscall memtestFunctions::memtestFunctions(struct _cl_context *,struct _cl_device_id *,struct _cl_command_queue *)" (??0memtestFunctions@@QAE@PAU_cl_context@@PAU_cl_device_id@@PAU_cl_command_queue@@@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clCreateKernel@12 referenced in function "public: __thiscall memtestFunctions::memtestFunctions(struct _cl_context *,struct _cl_device_id *,struct _cl_command_queue *)" (??0memtestFunctions@@QAE@PAU_cl_context@@PAU_cl_device_id@@PAU_cl_command_queue@@@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clReleaseKernel@4 referenced in function "public: __thiscall memtestFunctions::~memtestFunctions(void)" (??1memtestFunctions@@QAE@XZ)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clSetKernelArg@16 referenced in function "protected: int __thiscall memtestFunctions::setKernelArgs(struct _cl_kernel * &,int,unsigned int const *,void const * *)const " (?setKernelArgs@memtestFunctions@@IBEHAAPAU_cl_kernel@@HPBIPAPBX@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clGetKernelInfo@20 referenced in function "protected: int __thiscall memtestFunctions::setKernelArgs(struct _cl_kernel * &,int,unsigned int const *,void const * *)const " (?setKernelArgs@memtestFunctions@@IBEHAAPAU_cl_kernel@@HPBIPAPBX@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clGetKernelWorkGroupInfo@24 referenced in function "public: unsigned int __thiscall memtestFunctions::max_workgroup_size(void)const " (?max_workgroup_size@memtestFunctions@@QBEIXZ)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clGetEventInfo@20 referenced in function "int __cdecl softwaitForEvents(unsigned int,struct _cl_event * const *,struct _cl_command_queue * const *,unsigned int,unsigned int)" (?softwaitForEvents@@YAHIPBQAU_cl_event@@PBQAU_cl_command_queue@@II@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clReleaseEvent@4 referenced in function "int __cdecl softwaitForEvents(unsigned int,struct _cl_event * const *,struct _cl_command_queue * const *,unsigned int,unsigned int)" (?softwaitForEvents@@YAHIPBQAU_cl_event@@PBQAU_cl_command_queue@@II@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clFlush@4 referenced in function "int __cdecl softwaitForEvents(unsigned int,struct _cl_event * const *,struct _cl_command_queue * const *,unsigned int,unsigned int)" (?softwaitForEvents@@YAHIPBQAU_cl_event@@PBQAU_cl_command_queue@@II@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clEnqueueReadBuffer@36 referenced in function "public: unsigned int __thiscall memtestFunctions::verifyConstant(unsigned int,unsigned int,struct _cl_mem *,unsigned int,unsigned int,struct _cl_mem *,unsigned int *,int &)const " (?verifyConstant@memtestFunctions@@QBEIIIPAU_cl_mem@@II0PAIAAH@Z)
memtestCL_core.obj : error LNK2019: unresolved external symbol _clEnqueueCopyBuffer@36 referenced in function __catch$?allocate@memtestState@@QAEII@Z$0
memtestCL_core.obj : error LNK2019: unresolved external symbol _clEnqueueNDRangeKernel@36 referenced in function "public: struct _cl_event * __thiscall memtestFunctions::writeConstant(unsigned int,unsigned int,struct _cl_mem *,unsigned int,unsigned int,int &)const " (?writeConstant@memtestFunctions@@QBEPAU_cl_event@@IIPAU_cl_mem@@IIAAH@Z)
memtestCL_cli.obj : error LNK2019: unresolved external symbol _clGetPlatformIDs@12 referenced in function "void __cdecl initialize_CL(struct _cl_platform_id * &,struct _cl_context * &,struct _cl_device_id * &,int &,int &)" (?initialize_CL@@YAXAAPAU_cl_platform_id@@AAPAU_cl_context@@AAPAU_cl_device_id@@AAH3@Z)
memtestCL_cli.obj : error LNK2019: unresolved external symbol _clGetPlatformInfo@20 referenced in function "void __cdecl initialize_CL(struct _cl_platform_id * &,struct _cl_context * &,struct _cl_device_id * &,int &,int &)" (?initialize_CL@@YAXAAPAU_cl_platform_id@@AAPAU_cl_context@@AAPAU_cl_device_id@@AAH3@Z)
memtestCL_cli.obj : error LNK2019: unresolved external symbol _clGetDeviceIDs@24 referenced in function "void __cdecl initialize_CL(struct _cl_platform_id * &,struct _cl_context * &,struct _cl_device_id * &,int &,int &)" (?initialize_CL@@YAXAAPAU_cl_platform_id@@AAPAU_cl_context@@AAPAU_cl_device_id@@AAH3@Z)
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64\OpenCL.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
memtestCL.exe : fatal error LNK1120: 28 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.

I'm unsure how I can resolve this myself, since it's midnight and I don't do a lot of C++, much less with CUDA and Windows SDKs.

memtestCL_core.h:45:13: fatal error: CL/opencl.h: No such file or directory

[email protected]:~/memtestCL$ make -f Makefiles/Makefile.linux64
g++ -c -O2 -Wall -DLINUX -I/include -L-L/lib/x86_64 -o memtestCL_core.o memtestCL_core.cpp
In file included from memtestCL_core.cpp:14:
memtestCL_core.h:45:13: fatal error: CL/opencl.h: No such file or directory
45 | #include <CL/opencl.h>
| ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefiles/Makefile.linux64:31: memtestCL_core.o] Error 1

I'm on ubuntu 20.04 with nvidia NVIDIA-SMI 455.23.04 cudu 11.1

how do i fix this?

[NOT_A_BUG] How fast should memtestCL run?

I've got a feeling this test is incompatible with NVIDIA Pascal GPUs.

I've got a GTX 1060 GPU, 6096MB of GDDR5 RAM and I get this:


./memtestCL 6006
     -------------------------------------------------------------
     |                       MemtestCL v1.00                     |
     |                                                           |
     | Usage: memtestCL [flags] [MB GPU RAM to test] [# iters]   |
     |                                                           |
     | Defaults: GPU 0, 128MB RAM, 50 test iterations            |
     | Amount of tested RAM will be rounded up to nearest 2MB    |
     -------------------------------------------------------------

      Available flags:
        --platform N ,-p N   : run test on the Nth (from 0) OpenCL platform
        --gpu N ,-g N        : run test on the Nth (from 0) OpenCL device
                               on selected platform
        --license ,-l        : show license terms for this build

Error: Bad argument for [MB GPU RAM to test] [# iters]Available OpenCL platforms:
     0: NVIDIA CUDA (SELECTED)
Available OpenCL devices on selected platform:
     0: GeForce GTX 1060 6GB (SELECTED)

Running 50 iterations of tests over 128 MB of memory on device 0: GeForce GTX 1060 6GB

Running memory bandwidth test over 20 iterations of 64 MB transfers...
    Estimated bandwidth 134736.84 MB/s

Test iteration 1 on 128 MiB of memory on device 0 (GeForce GTX 1060 6GB): 0 errors so far
    Moving Inversions (ones and zeros): 0 errors (3 ms)
    Moving Inversions (random): 0 errors (2 ms)
    Memtest86 Walking 8-bit: 0 errors (20 ms)
    True Walking zeros (8-bit): 0 errors (10 ms)
    True Walking ones (8-bit): 0 errors (10 ms)
    Memtest86 Walking zeros (32-bit): 0 errors (41 ms)
    Memtest86 Walking ones (32-bit): 0 errors (40 ms)
    Random blocks: 0 errors (2 ms)
    Memtest86 Modulo-20: 0 errors (51 ms)
    Logic (one iteration): 0 errors (2 ms)
    Logic (4 iterations): 0 errors (9 ms)
    Logic (local memory, one iteration): 0 errors (4 ms)
    Logic (local memory, 4 iterations): 0 errors (11 ms)

... skipped ...

Test summary:
-----------------------------------------
50 iterations over 128 MiB of memory on device GeForce GTX 1060 6GB
      Moving inversions (ones and zeros): 0 failed iterations
                                         (0 total incorrect bits)
                 Memtest86 walking 8-bit: 0 failed iterations
                                         (0 total incorrect bits)
              True walking zeros (8-bit): 0 failed iterations
                                         (0 total incorrect bits)
               True walking ones (8-bit): 0 failed iterations
                                         (0 total incorrect bits)
              Moving inversions (random): 0 failed iterations
                                         (0 total incorrect bits)
             True walking zeros (32-bit): 0 failed iterations
                                         (0 total incorrect bits)
              True walking ones (32-bit): 0 failed iterations
                                         (0 total incorrect bits)
                           Random blocks: 0 failed iterations
                                         (0 total incorrect bits)
                     Memtest86 Modulo-20: 0 failed iterations
                                         (0 total incorrect bits)
                           Integer logic: 0 failed iterations
                                         (0 total incorrect bits)
                 Integer logic (4 loops): 0 failed iterations
                                         (0 total incorrect bits)
            Integer logic (local memory): 0 failed iterations
                                         (0 total incorrect bits)
   Integer logic (4 loops, local memory): 0 failed iterations
                                         (0 total incorrect bits)
Final error count: 0 errors

Press <enter> to quit.

All taking roughly 10 seconds. If we take this GPU bandwidth (134736.84 MB/s) into consideration that means the test could have written and read roughly 134736.84 * 10 / 2 / 1024 = 657GB + 657GB of data. Now I'm a little bit concerned because a single run of memtest86+ on a PC with dual channel 16GB of RAM DDR3 1600MHz takes around 30 minutes. Of course, my CPU has only 20GB/s bandwidth but it's just 7 times less, which means openCL test should have run for at least four minutes instead of ten seconds.

Doesn't compile on Manjaro

I cannot get it to work with the following error message

make -f Makefiles/Makefile.linux64
g++ -c -O2 -Wall -DLINUX -I/include -L-L/lib/x86_64 -o memtestCL_core.o memtestCL_core.cpp
memtestCL_core.cpp: In constructor ‘memtestState::memtestState(cl_context, cl_device_id)’:
memtestCL_core.cpp:87:70: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)’ is deprecated [-Wdeprecated-declarations]
87 | ctx(context), dev(device), cq(clCreateCommandQueue(ctx,dev,0,NULL)),
| ^
In file included from /usr/include/CL/opencl.h:47,
from memtestCL_core.h:45,
from memtestCL_core.cpp:14:
/usr/include/CL/cl.h:1443:1: note: declared here
1443 | clCreateCommandQueue(cl_context /* context /,
| ^~~~~~~~~~~~~~~~~~~~
memtestCL_core.cpp: In constructor ‘memtestFunctions::memtestFunctions(cl_context, cl_device_id, cl_command_queue)’:
memtestCL_core.cpp:348:28: error: ‘memtestCL_kernels_len’ was not declared in this scope
348 | size_t kernel_length = memtestCL_kernels_len;
| ^~~~~~~~~~~~~~~~~~~~~
memtestCL_core.cpp:350:39: error: ‘memtestCL_kernels’ was not declared in this scope
350 | const char
kernelcode = (char*) &memtestCL_kernels[0];
| ^~~~~~~~~~~~~~~~~
make: *** [Makefiles/Makefile.linux64:31: memtestCL_core.o] Error 1

Makefile issues

Hi
I've been trying to compile the code with VS2013 and the latest AMD SDK and it hasn't been successful. Would it be possible for you to upload an updated Makefile or the compiled .exe?
I would love to do it myself but my programming knowledge is very limited

Thank you

Updated Makefile for Visual Studio 2013

Disclaimer1: This is not an issue.
Disclaimer2: I am not a Visual Studio expert, I'm sure this could be optimized in a number of ways.

This is the Makefile I used to compile successfully under Visual Studio 2013 (nmake Makefiles\Makefile.windows). Please note that there is a bug in the compiler of Visual Studio 2013 Update 2 that will return an error when compiling one of the files. You must install Visual Studio 2013 Update 3.

This ran successfully under Windows 8.1 and VS 2013 Professional.

This considers using Intel OpenCL SDK, but you can replace with your preferred SDK.

#define _USING_V110_SDK71_

LIBS="C:\Program Files (x86)\Intel\OpenCL SDK\4.4\lib\x86\OpenCL.lib" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\WS2_32.Lib" "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\libcpmt.lib" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Uuid.Lib" "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\libcmt.lib" "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\oldnames.lib" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Kernel32.Lib"

INCLUDES=-I"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include" -I"C:\Program Files (x86)\Windows Kits\8.1\Include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\Include\shared" -I"C:\Program Files (x86)\Intel\OpenCL SDK\4.4\include"

DEFINES=-DWINDOWS -DCURL_STATICLIB -D_CRT_SECURE_NO_DEPRECATE

CFLAGS=-MT -Ox -EHsc $(DEFINES) $(INCLUDES) $(LIBS) # -MTd -Zi for debug, -MT -Ox for prod
CXX="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe"
CPP="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe" /E

all: memtestCL.exe

clean:
    del *.obj
    del *.clh
    del *.exe

xxd.exe: xxd.cpp
    $(CXX) $(CFLAGS) "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\libcmt.lib" "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\oldnames.lib" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Kernel32.Lib" xxd.cpp

memtestCL_kernels.clh: memtestCL_kernels.cl xxd.exe
    $(CPP) memtestCL_kernels.cl > memtestCL_kernels
    xxd -i memtestCL_kernels > memtestCL_kernels.clh
    del memtestCL_kernels

memtestCL_core.obj: memtestCL_core.cpp memtestCL_core.h memtestCL_kernels.clh
    $(CXX) $(CFLAGS) -c memtestCL_core.cpp

memtestCL.exe: memtestCL_core.obj memtestCL_cli.cpp
    $(CXX) $(CFLAGS) memtestCL_core.obj memtestCL_cli.cpp -link $(LIBS) -OUT:memtestCL.exe

Bugs in Makefile.windows

It appears AMD SDK paths are wrong in the Makefile. First the base path is wrong then the 64bit path is missing _64 extension

Correct ones:

!if "$(OPENCL_VENDOR)" == "AMD"
OPENCL_DIR="\Program Files (x86)\AMD APP"
OPENCL_INC=$(OPENCL_DIR)\include
OPENCL_LIB=$(OPENCL_DIR)\lib\x86\OpenCL.lib
!endif
!if "$(OPENCL_VENDOR)" == "AMD64"
OPENCL_DIR="\Program Files (x86)\AMD APP"
OPENCL_INC=$(OPENCL_DIR)\include
OPENCL_LIB=$(OPENCL_DIR)\lib\x86_64\OpenCL.lib
!endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.