Bitcoin Forum
August 28, 2024, 05:44:50 PM *
News: All versions of Windows are affected by a critical security bug; make sure you update.
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Mining (Altcoins) / Re: Wolf's XMR GPU Miner on: October 31, 2016, 02:44:05 AM
(Updated with code tags that I didn't do originally - apologies for that as I'm new to this forum and Wolf's XMR GPU miner)

As originally stated I'm new to GPU mining and have been following this thread for Wolf's XMR GPU Miner where I have done the following below:

1. Fresh minimal install of Ubuntu 16.04 Server with OpenSSH Server along with latest updates for headless remote SSH access
2. Installed AMDGPU-PRO Driver version 16.30.3-315407 with sudo privileges
3. Installed AMD APP SDK 3.0 with sudo privileges in the /opt/AMDAPPSDK-3.0 directory location
4. Cloned the GitHub repository at https://github.com/wolf9466/wolf-xmr-miner
5. Updated the Makefile with the following changes for new AMDAPPSDK-3.0 installation

Code:
CC		= gcc
LD = gcc
OPT = -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib
CFLAGS = -D_POSIX_SOURCE -D_GNU_SOURCE $(OPT) -c -std=c11
LDFLAGS = -DPTW32_STATIC_LIB $(OPT)
LIBS = -ljansson -lOpenCL -lpthread -ldl

6. Execute make without any errors and only warnings

Code:
$ make

gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/aesb.c -o crypto/aesb.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/aesb-x86-impl.c -o crypto/aesb-x86-impl.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_blake256.c -o crypto/c_blake256.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_groestl.c -o crypto/c_groestl.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_keccak.c -o crypto/c_keccak.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_jh.c -o crypto/c_jh.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_skein.c -o crypto/c_skein.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/oaes_lib.c -o crypto/oaes_lib.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 -maes cryptonight.c -o cryptonight.o
cryptonight.c: In function ‘cryptonight_hash_aesni’:
cryptonight.c:383:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  uint64_t *dst = &ctx->long_state[c[0] & 0x1FFFF0];
                  ^
cryptonight.c:426:10: warning: passing argument 1 of ‘keccakf’ from incompatible pointer type [-Wincompatible-pointer-types]
  keccakf(&ctx->state.hs, 24);
          ^
In file included from cryptonight.c:13:0:
crypto/c_keccak.h:22:6: note: expected ‘uint64_t * {aka long unsigned int *}’ but argument is of type ‘union hash_state *’
 void keccakf(uint64_t st[25], int norounds);
      ^
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 log.c -o log.o
log.c: In function ‘Log’:
log.c:25:10: warning: format not a string literal and no format arguments [-Wformat-security]
   printf(timebuf);
          ^
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 net.c -o net.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 minerutils.c -o minerutils.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 gpu.c -o gpu.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 main.c -o main.o
main.c: In function ‘SetupXMRTest’:
main.c:709:24: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
  snprintf(Options, 31, "-I. -DWORKSIZE=%d", LocalThreads);
                        ^
main.c:709:24: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
main.c: In function ‘MinerThreadProc’:
main.c:1340:8: warning: assignment discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  MyJob = CurrentJob;
        ^
main.c:1348:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
   sprintf(ThrID, "Thread %d, GPU ID %d, GPU Type: %s",
                  ^
main.c:1369:10: warning: assignment discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    MyJob = CurrentJob;
          ^
main.c: In function ‘SigHandler’:
main.c:1474:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  write(ExitPipe[1], &c, 1);
  ^
main.c: In function ‘main’:
main.c:1788:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
  pipe(ExitPipe);
  ^
main.c:2054:2: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  read(ExitPipe[0], &c, 1);
  ^
gcc -DPTW32_STATIC_LIB -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  crypto/aesb.o crypto/aesb-x86-impl.o crypto/c_blake256.o crypto/c_groestl.o crypto/c_keccak.o crypto/c_jh.o crypto/c_skein.o crypto/oaes_lib.o cryptonight.o log.o net.o minerutils.o gpu.o main.o -ljansson -lOpenCL -lpthread -ldl -o miner

$

7. Configure the xmr.conf as needed

Code:
{
"Algorithms":
[
{
"name": "CryptoNight",
"devices":
[
{
"index": 0,
"threads": 1,
"rawintensity": 640,
"worksize": 8
},
{
"index": -1,
"threads": 1,
"rawintensity": 8,
"worksize": 8
}
],
"pools":
[
{
"url": "stratum+tcp://<valid_pool>:<valid_port>",
"user": "<valid_user>",
"pass": "x"
}
]
}
]
}

8. Execute the miner and get this error a few seconds later

Code:
$ ./miner xmr.conf

[17:32:27] Setting up GPU(s).
[17:32:27] Successfully connected to pool's stratum.
*** buffer overflow detected ***: ./miner terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f5d856a0725]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f5d8574189c]
/lib/x86_64-linux-gnu/libc.so.6(+0x1168a0)[0x7f5d8573f8a0]
/lib/x86_64-linux-gnu/libc.so.6(+0x115bf2)[0x7f5d8573ebf2]
./miner[0x410c35]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76fa)[0x7f5d859f96fa]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f5d8572fb5d]
======= Memory map: ========
00400000-00419000 r-xp 00000000 fc:00 2623891                            /miner
00619000-0061a000 r--p 00019000 fc:00 2623891                            /miner
0061a000-0061b000 rw-p 0001a000 fc:00 2623891                            /miner
01418000-01439000 rw-p 00000000 00:00 0                                  [heap]
7f5d7fdea000-7f5d7fe00000 r-xp 00000000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d7fe00000-7f5d7ffff000 ---p 00016000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d7ffff000-7f5d80000000 rw-p 00015000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d80000000-7f5d80021000 rw-p 00000000 00:00 0
7f5d80021000-7f5d84000000 ---p 00000000 00:00 0
7f5d840df000-7f5d840e0000 ---p 00000000 00:00 0
7f5d840e0000-7f5d848e0000 rw-p 00000000 00:00 0
7f5d848e0000-7f5d848f7000 r-xp 00000000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d848f7000-7f5d84af7000 ---p 00017000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af7000-7f5d84af8000 r--p 00017000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af8000-7f5d84af9000 rw-p 00018000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af9000-7f5d84afb000 rw-p 00000000 00:00 0
7f5d84afb000-7f5d84b00000 r-xp 00000000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84b00000-7f5d84d00000 ---p 00005000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d00000-7f5d84d01000 r--p 00005000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d01000-7f5d84d02000 rw-p 00006000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d02000-7f5d84d0d000 r-xp 00000000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84d0d000-7f5d84f0c000 ---p 0000b000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0c000-7f5d84f0d000 r--p 0000a000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0d000-7f5d84f0e000 rw-p 0000b000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0e000-7f5d84f14000 rw-p 00000000 00:00 0
7f5d84f14000-7f5d84f17000 r-xp 00000000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d84f17000-7f5d85116000 ---p 00003000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85116000-7f5d85117000 r--p 00002000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85117000-7f5d85118000 rw-p 00003000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85118000-7f5d85220000 r-xp 00000000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85220000-7f5d8541f000 ---p 00108000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d8541f000-7f5d85420000 r--p 00107000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85420000-7f5d85421000 rw-p 00108000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85421000-7f5d85428000 r-xp 00000000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85428000-7f5d85627000 ---p 00007000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85627000-7f5d85628000 r--p 00006000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85628000-7f5d85629000 rw-p 00007000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85629000-7f5d857e9000 r-xp 00000000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d857e9000-7f5d859e8000 ---p 001c0000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859e8000-7f5d859ec000 r--p 001bf000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859ec000-7f5d859ee000 rw-p 001c3000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859ee000-7f5d859f2000 rw-p 00000000 00:00 0
7f5d859f2000-7f5d85a0a000 r-xp 00000000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85a0a000-7f5d85c09000 ---p 00018000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c09000-7f5d85c0a000 r--p 00017000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c0a000-7f5d85c0b000 rw-p 00018000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c0b000-7f5d85c0f000 rw-p 00000000 00:00 0
7f5d85c0f000-7f5d85c15000 r-xp 00000000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85c15000-7f5d85e15000 ---p 00006000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85e15000-7f5d85e16000 rw-p 00006000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85e16000-7f5d85e22000 r-xp 00000000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d85e22000-7f5d86021000 ---p 0000c000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86021000-7f5d86022000 r--p 0000b000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86022000-7f5d86023000 rw-p 0000c000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86023000-7f5d86049000 r-xp 00000000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d86238000-7f5d8623d000 rw-p 00000000 00:00 0
7f5d86245000-7f5d86248000 rw-p 00000000 00:00 0
7f5d86248000-7f5d86249000 r--p 00025000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d86249000-7f5d8624a000 rw-p 00026000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d8624a000-7f5d8624b000 rw-p 00000000 00:00 0
7ffcc1f08000-7ffcc1f29000 rw-p 00000000 00:00 0                          [stack]
7ffcc1fae000-7ffcc1fb0000 r--p 00000000 00:00 0                          [vvar]
7ffcc1fb0000-7ffcc1fb2000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

$

9. The AMD drivers are installed and loaded correctly

Code:
$ sudo lshw -class display | grep "driver"

       configuration: driver=amdgpu latency=0
       configuration: driver=amdgpu latency=0
       configuration: driver=i915 latency=0

$

10. I have two AMD GPUs installed on this Ubuntu 16.04 headless server

R9 390X - Hawaii
R9 380 - Tonga

11. The clinfo command shows all the information on the GPUs

Code:
$ clinfo

Number of platforms: 1
  Platform Profile: FULL_PROFILE
  Platform Version: OpenCL 2.0 AMD-APP (2117.7)
  Platform Name: AMD Accelerated Parallel Processing
  Platform Vendor: Advanced Micro Devices, Inc.
  Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices


  Platform Name: AMD Accelerated Parallel Processing
Number of devices: 3
  Device Type: CL_DEVICE_TYPE_GPU
  Vendor ID: 1002h
  Board name:
  Device Topology: PCI[ B#1, D#0, F#0 ]
  Max compute units: 14
  Max work items dimensions: 3
    Max work items[0]: 256
    Max work items[1]: 256
    Max work items[2]: 256
  Max work group size: 256
  Preferred vector width char: 4
  Preferred vector width short: 2
  Preferred vector width int: 1
  Preferred vector width long: 1
  Preferred vector width float: 1
  Preferred vector width double: 1
  Native vector width char: 4
  Native vector width short: 2
  Native vector width int: 1
  Native vector width long: 1
  Native vector width float: 1
  Native vector width double: 1
  Max clock frequency: 555Mhz
  Address bits: 64
  Max memory allocation: 4244635648
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 8
  Max image 2D width: 16384
  Max image 2D height: 16384
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 1024
  Alignment (bits) of base address: 2048
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: No
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 16384
  Global memory size: 8541122560
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Scratchpad
  Local memory size: 32768
  Max pipe arguments: 0
  Max pipe active reservations: 0
  Max pipe packet size: 0
  Max global variable size: 0
  Max global variable preferred total size: 0
  Max read/write image args: 0
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 64
  Error correction support: 0
  Unified memory for Host and Device: 0
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: No
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Hawaii
  Vendor: Advanced Micro Devices, Inc.
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (VM)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event


  Device Type: CL_DEVICE_TYPE_GPU
  Vendor ID: 1002h
  Board name:
  Device Topology: PCI[ B#2, D#0, F#0 ]
  Max compute units: 14
  Max work items dimensions: 3
    Max work items[0]: 256
    Max work items[1]: 256
    Max work items[2]: 256
  Max work group size: 256
  Preferred vector width char: 4
  Preferred vector width short: 2
  Preferred vector width int: 1
  Preferred vector width long: 1
  Preferred vector width float: 1
  Preferred vector width double: 1
  Native vector width char: 4
  Native vector width short: 2
  Native vector width int: 1
  Native vector width long: 1
  Native vector width float: 1
  Native vector width double: 1
  Max clock frequency: 555Mhz
  Address bits: 64
  Max memory allocation: 1409215488
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 8
  Max image 2D width: 16384
  Max image 2D height: 16384
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 1024
  Alignment (bits) of base address: 2048
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: No
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 16384
  Global memory size: 2127253504
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Scratchpad
  Local memory size: 32768
  Max pipe arguments: 0
  Max pipe active reservations: 0
  Max pipe packet size: 0
  Max global variable size: 0
  Max global variable preferred total size: 0
  Max read/write image args: 0
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 64
  Error correction support: 0
  Unified memory for Host and Device: 0
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: No
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Tonga
  Vendor: Advanced Micro Devices, Inc.
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (VM)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event


  Device Type: CL_DEVICE_TYPE_CPU
  Vendor ID: 1002h
  Board name:
  Max compute units: 4
  Max work items dimensions: 3
    Max work items[0]: 1024
    Max work items[1]: 1024
    Max work items[2]: 1024
  Max work group size: 1024
  Preferred vector width char: 16
  Preferred vector width short: 8
  Preferred vector width int: 4
  Preferred vector width long: 2
  Preferred vector width float: 8
  Preferred vector width double: 4
  Native vector width char: 16
  Native vector width short: 8
  Native vector width int: 4
  Native vector width long: 2
  Native vector width float: 8
  Native vector width double: 4
  Max clock frequency: 871Mhz
  Address bits: 64
  Max memory allocation: 2147483648
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 64
  Max image 2D width: 8192
  Max image 2D height: 8192
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 4096
  Alignment (bits) of base address: 1024
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: Yes
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 32768
  Global memory size: 8240955392
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Global
  Local memory size: 32768
  Max pipe arguments: 16
  Max pipe active reservations: 16
  Max pipe packet size: 2147483648
  Max global variable size: 1879048192
  Max global variable preferred total size: 1879048192
  Max read/write image args: 64
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 1
  Error correction support: 0
  Unified memory for Host and Device: 1
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: Yes
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
  Vendor: GenuineIntel
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (sse2,avx)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_spir cl_khr_gl_event


$

Any help with getting further along would be greatly appreciated as my next step is trying one AMD GPU card installed at a time to see what happens




1. I resolved the issue I was having before by modifying the compiler options further with the -D_FORTIFY_SOURCE=0 option shown below

Code:
OPT 	= -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib 
CFLAGS = -D_POSIX_SOURCE -D_GNU_SOURCE $(OPT) -c -std=c11 -D_FORTIFY_SOURCE=0 
CC = gcc
LD = gcc
LDFLAGS = -DPTW32_STATIC_LIB $(OPT)
LIBS = -ljansson -lOpenCL -lpthread -ldl

2. I can successfully CPU and GPU mine XMR with the following xmr.conf file

Code:
{
"Algorithms":
[
{
"name": "CryptoNight",
"devices":
[
                                {
                                        "index": 0,
                                        "threads": 2,
                                        "rawintensity": 1024,
                                        "worksize": 8
                                },
                                {
                                        "index": 1,
                                        "threads": 1,
                                        "rawintensity": 640,
                                        "worksize": 8
                                },
{
"index": -1,
"threads": 3,
"rawintensity": 12,
"worksize": 12
}
],
"pools":
[
{
"url": "stratum+tcp://<valid_pool>:<valid_port>",
"user": "<valid_user>",
"pass": "x"
}
]
}
]
}

3. Current output example from my wolf-xmr-miner build and configuration listed above

Code:
[16:27:38] New job at diff 13419
[16:27:38] Thread 5, (CPU): 66.80H/s
[16:27:38] Thread 4, (CPU): 67.25H/s
[16:27:38] Thread 3, (CPU): 66.24H/s
[16:27:39] Thread 2, GPU ID 1, GPU Type: Tonga: 485.17H/s
[16:27:40] Thread 0, GPU ID 0, GPU Type: Hawaii: 381.56H/s
[16:27:40] Thread 1, GPU ID 0, GPU Type: Hawaii: 381.56H/s
[16:27:41] Thread 2, GPU ID 1, GPU Type: Tonga: 485.26H/s
[16:27:42] Thread 0, GPU ID 0, GPU Type: Hawaii: 380.56H/s
[16:27:42] Thread 1, GPU ID 0, GPU Type: Hawaii: 380.56H/s
[16:27:44] Thread 2, GPU ID 1, GPU Type: Tonga: 484.93H/s
[16:27:45] Thread 0, GPU ID 0, GPU Type: Hawaii: 380.30H/s
[16:27:45] Thread 1, GPU ID 0, GPU Type: Hawaii: 380.30H/s
[16:27:47] Thread 2, GPU ID 1, GPU Type: Tonga: 484.79H/s
[16:27:48] Thread 0, GPU ID 0, GPU Type: Hawaii: 381.18H/s
[16:27:48] Thread 1, GPU ID 0, GPU Type: Hawaii: 381.19H/s
[16:27:48] Share accepted: 706/759 (93.02%)
[16:27:48] Total Hashrate: 1447.45H/s

4. I will continue to play around with the best settings for xmr.conf and find the best performance and stability. 

5. I haven't done any overclock/undervolt efforts on the stock AMD GPUs and will see what options might help performance along with stability as time permits. 

At this point I'm just happy to have it working now using stock settings and hope this information helps others attempting to use the wolf-xmr-miner on Ubuntu 16.04 LTS in the future.  Thanks to Wolf again for sharing with others and making this wonderful GPU miner.


I am getting the following on these cards below

806 H/s on my R9 390X - Hawaii with threads=1, rawintensity=1390 and worksize=8
590 H/s on my R9 380 - Tonga with threads=1, rawintensity=896 and worksize=8
567 H/s on my RX 470 - Ellesmere with threads=1, rawintensity=1022 and worksize=8

I will be testing an RX 480 next as time permits and share the results afterwards
2  Alternate cryptocurrencies / Mining (Altcoins) / Re: Wolf's XMR GPU Miner on: October 31, 2016, 02:32:17 AM
Is it possible to know what kind of hashrates to expect from the following cards:

- RX 480 8GB
- R9 390 8GB

?

thank you all

I am getting the following on these cards below

806 H/s on my R9 390X - Hawaii
590 H/s on my R9 380 - Tonga
567 H/s on my RX 470 - Ellesmere

3  Alternate cryptocurrencies / Mining (Altcoins) / Re: Wolf's XMR GPU Miner on: October 13, 2016, 08:40:13 PM
(Updated with code tags that I didn't do originally - apologies for that as I'm new to this forum and Wolf's XMR GPU miner)

As originally stated I'm new to GPU mining and have been following this thread for Wolf's XMR GPU Miner where I have done the following below:

1. Fresh minimal install of Ubuntu 16.04 Server with OpenSSH Server along with latest updates for headless remote SSH access
2. Installed AMDGPU-PRO Driver version 16.30.3-315407 with sudo privileges
3. Installed AMD APP SDK 3.0 with sudo privileges in the /opt/AMDAPPSDK-3.0 directory location
4. Cloned the GitHub repository at https://github.com/wolf9466/wolf-xmr-miner
5. Updated the Makefile with the following changes for new AMDAPPSDK-3.0 installation

Code:
CC		= gcc
LD = gcc
OPT = -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib
CFLAGS = -D_POSIX_SOURCE -D_GNU_SOURCE $(OPT) -c -std=c11
LDFLAGS = -DPTW32_STATIC_LIB $(OPT)
LIBS = -ljansson -lOpenCL -lpthread -ldl

6. Execute make without any errors and only warnings

Code:
$ make

gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/aesb.c -o crypto/aesb.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/aesb-x86-impl.c -o crypto/aesb-x86-impl.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_blake256.c -o crypto/c_blake256.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_groestl.c -o crypto/c_groestl.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_keccak.c -o crypto/c_keccak.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_jh.c -o crypto/c_jh.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_skein.c -o crypto/c_skein.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/oaes_lib.c -o crypto/oaes_lib.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 -maes cryptonight.c -o cryptonight.o
cryptonight.c: In function ‘cryptonight_hash_aesni’:
cryptonight.c:383:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  uint64_t *dst = &ctx->long_state[c[0] & 0x1FFFF0];
                  ^
cryptonight.c:426:10: warning: passing argument 1 of ‘keccakf’ from incompatible pointer type [-Wincompatible-pointer-types]
  keccakf(&ctx->state.hs, 24);
          ^
In file included from cryptonight.c:13:0:
crypto/c_keccak.h:22:6: note: expected ‘uint64_t * {aka long unsigned int *}’ but argument is of type ‘union hash_state *’
 void keccakf(uint64_t st[25], int norounds);
      ^
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 log.c -o log.o
log.c: In function ‘Log’:
log.c:25:10: warning: format not a string literal and no format arguments [-Wformat-security]
   printf(timebuf);
          ^
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 net.c -o net.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 minerutils.c -o minerutils.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 gpu.c -o gpu.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 main.c -o main.o
main.c: In function ‘SetupXMRTest’:
main.c:709:24: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
  snprintf(Options, 31, "-I. -DWORKSIZE=%d", LocalThreads);
                        ^
main.c:709:24: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
main.c: In function ‘MinerThreadProc’:
main.c:1340:8: warning: assignment discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  MyJob = CurrentJob;
        ^
main.c:1348:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
   sprintf(ThrID, "Thread %d, GPU ID %d, GPU Type: %s",
                  ^
main.c:1369:10: warning: assignment discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    MyJob = CurrentJob;
          ^
main.c: In function ‘SigHandler’:
main.c:1474:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  write(ExitPipe[1], &c, 1);
  ^
main.c: In function ‘main’:
main.c:1788:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
  pipe(ExitPipe);
  ^
main.c:2054:2: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  read(ExitPipe[0], &c, 1);
  ^
gcc -DPTW32_STATIC_LIB -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  crypto/aesb.o crypto/aesb-x86-impl.o crypto/c_blake256.o crypto/c_groestl.o crypto/c_keccak.o crypto/c_jh.o crypto/c_skein.o crypto/oaes_lib.o cryptonight.o log.o net.o minerutils.o gpu.o main.o -ljansson -lOpenCL -lpthread -ldl -o miner

$

7. Configure the xmr.conf as needed

Code:
{
"Algorithms":
[
{
"name": "CryptoNight",
"devices":
[
{
"index": 0,
"threads": 1,
"rawintensity": 640,
"worksize": 8
},
{
"index": -1,
"threads": 1,
"rawintensity": 8,
"worksize": 8
}
],
"pools":
[
{
"url": "stratum+tcp://<valid_pool>:<valid_port>",
"user": "<valid_user>",
"pass": "x"
}
]
}
]
}

8. Execute the miner and get this error a few seconds later

Code:
$ ./miner xmr.conf

[17:32:27] Setting up GPU(s).
[17:32:27] Successfully connected to pool's stratum.
*** buffer overflow detected ***: ./miner terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f5d856a0725]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f5d8574189c]
/lib/x86_64-linux-gnu/libc.so.6(+0x1168a0)[0x7f5d8573f8a0]
/lib/x86_64-linux-gnu/libc.so.6(+0x115bf2)[0x7f5d8573ebf2]
./miner[0x410c35]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76fa)[0x7f5d859f96fa]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f5d8572fb5d]
======= Memory map: ========
00400000-00419000 r-xp 00000000 fc:00 2623891                            /miner
00619000-0061a000 r--p 00019000 fc:00 2623891                            /miner
0061a000-0061b000 rw-p 0001a000 fc:00 2623891                            /miner
01418000-01439000 rw-p 00000000 00:00 0                                  [heap]
7f5d7fdea000-7f5d7fe00000 r-xp 00000000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d7fe00000-7f5d7ffff000 ---p 00016000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d7ffff000-7f5d80000000 rw-p 00015000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d80000000-7f5d80021000 rw-p 00000000 00:00 0
7f5d80021000-7f5d84000000 ---p 00000000 00:00 0
7f5d840df000-7f5d840e0000 ---p 00000000 00:00 0
7f5d840e0000-7f5d848e0000 rw-p 00000000 00:00 0
7f5d848e0000-7f5d848f7000 r-xp 00000000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d848f7000-7f5d84af7000 ---p 00017000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af7000-7f5d84af8000 r--p 00017000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af8000-7f5d84af9000 rw-p 00018000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af9000-7f5d84afb000 rw-p 00000000 00:00 0
7f5d84afb000-7f5d84b00000 r-xp 00000000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84b00000-7f5d84d00000 ---p 00005000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d00000-7f5d84d01000 r--p 00005000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d01000-7f5d84d02000 rw-p 00006000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d02000-7f5d84d0d000 r-xp 00000000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84d0d000-7f5d84f0c000 ---p 0000b000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0c000-7f5d84f0d000 r--p 0000a000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0d000-7f5d84f0e000 rw-p 0000b000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0e000-7f5d84f14000 rw-p 00000000 00:00 0
7f5d84f14000-7f5d84f17000 r-xp 00000000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d84f17000-7f5d85116000 ---p 00003000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85116000-7f5d85117000 r--p 00002000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85117000-7f5d85118000 rw-p 00003000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85118000-7f5d85220000 r-xp 00000000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85220000-7f5d8541f000 ---p 00108000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d8541f000-7f5d85420000 r--p 00107000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85420000-7f5d85421000 rw-p 00108000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85421000-7f5d85428000 r-xp 00000000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85428000-7f5d85627000 ---p 00007000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85627000-7f5d85628000 r--p 00006000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85628000-7f5d85629000 rw-p 00007000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85629000-7f5d857e9000 r-xp 00000000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d857e9000-7f5d859e8000 ---p 001c0000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859e8000-7f5d859ec000 r--p 001bf000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859ec000-7f5d859ee000 rw-p 001c3000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859ee000-7f5d859f2000 rw-p 00000000 00:00 0
7f5d859f2000-7f5d85a0a000 r-xp 00000000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85a0a000-7f5d85c09000 ---p 00018000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c09000-7f5d85c0a000 r--p 00017000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c0a000-7f5d85c0b000 rw-p 00018000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c0b000-7f5d85c0f000 rw-p 00000000 00:00 0
7f5d85c0f000-7f5d85c15000 r-xp 00000000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85c15000-7f5d85e15000 ---p 00006000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85e15000-7f5d85e16000 rw-p 00006000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85e16000-7f5d85e22000 r-xp 00000000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d85e22000-7f5d86021000 ---p 0000c000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86021000-7f5d86022000 r--p 0000b000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86022000-7f5d86023000 rw-p 0000c000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86023000-7f5d86049000 r-xp 00000000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d86238000-7f5d8623d000 rw-p 00000000 00:00 0
7f5d86245000-7f5d86248000 rw-p 00000000 00:00 0
7f5d86248000-7f5d86249000 r--p 00025000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d86249000-7f5d8624a000 rw-p 00026000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d8624a000-7f5d8624b000 rw-p 00000000 00:00 0
7ffcc1f08000-7ffcc1f29000 rw-p 00000000 00:00 0                          [stack]
7ffcc1fae000-7ffcc1fb0000 r--p 00000000 00:00 0                          [vvar]
7ffcc1fb0000-7ffcc1fb2000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

$

9. The AMD drivers are installed and loaded correctly

Code:
$ sudo lshw -class display | grep "driver"

       configuration: driver=amdgpu latency=0
       configuration: driver=amdgpu latency=0
       configuration: driver=i915 latency=0

$

10. I have two AMD GPUs installed on this Ubuntu 16.04 headless server

R9 390X - Hawaii
R9 380 - Tonga

11. The clinfo command shows all the information on the GPUs

Code:
$ clinfo

Number of platforms: 1
  Platform Profile: FULL_PROFILE
  Platform Version: OpenCL 2.0 AMD-APP (2117.7)
  Platform Name: AMD Accelerated Parallel Processing
  Platform Vendor: Advanced Micro Devices, Inc.
  Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices


  Platform Name: AMD Accelerated Parallel Processing
Number of devices: 3
  Device Type: CL_DEVICE_TYPE_GPU
  Vendor ID: 1002h
  Board name:
  Device Topology: PCI[ B#1, D#0, F#0 ]
  Max compute units: 14
  Max work items dimensions: 3
    Max work items[0]: 256
    Max work items[1]: 256
    Max work items[2]: 256
  Max work group size: 256
  Preferred vector width char: 4
  Preferred vector width short: 2
  Preferred vector width int: 1
  Preferred vector width long: 1
  Preferred vector width float: 1
  Preferred vector width double: 1
  Native vector width char: 4
  Native vector width short: 2
  Native vector width int: 1
  Native vector width long: 1
  Native vector width float: 1
  Native vector width double: 1
  Max clock frequency: 555Mhz
  Address bits: 64
  Max memory allocation: 4244635648
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 8
  Max image 2D width: 16384
  Max image 2D height: 16384
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 1024
  Alignment (bits) of base address: 2048
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: No
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 16384
  Global memory size: 8541122560
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Scratchpad
  Local memory size: 32768
  Max pipe arguments: 0
  Max pipe active reservations: 0
  Max pipe packet size: 0
  Max global variable size: 0
  Max global variable preferred total size: 0
  Max read/write image args: 0
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 64
  Error correction support: 0
  Unified memory for Host and Device: 0
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: No
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Hawaii
  Vendor: Advanced Micro Devices, Inc.
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (VM)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event


  Device Type: CL_DEVICE_TYPE_GPU
  Vendor ID: 1002h
  Board name:
  Device Topology: PCI[ B#2, D#0, F#0 ]
  Max compute units: 14
  Max work items dimensions: 3
    Max work items[0]: 256
    Max work items[1]: 256
    Max work items[2]: 256
  Max work group size: 256
  Preferred vector width char: 4
  Preferred vector width short: 2
  Preferred vector width int: 1
  Preferred vector width long: 1
  Preferred vector width float: 1
  Preferred vector width double: 1
  Native vector width char: 4
  Native vector width short: 2
  Native vector width int: 1
  Native vector width long: 1
  Native vector width float: 1
  Native vector width double: 1
  Max clock frequency: 555Mhz
  Address bits: 64
  Max memory allocation: 1409215488
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 8
  Max image 2D width: 16384
  Max image 2D height: 16384
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 1024
  Alignment (bits) of base address: 2048
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: No
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 16384
  Global memory size: 2127253504
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Scratchpad
  Local memory size: 32768
  Max pipe arguments: 0
  Max pipe active reservations: 0
  Max pipe packet size: 0
  Max global variable size: 0
  Max global variable preferred total size: 0
  Max read/write image args: 0
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 64
  Error correction support: 0
  Unified memory for Host and Device: 0
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: No
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Tonga
  Vendor: Advanced Micro Devices, Inc.
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (VM)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event


  Device Type: CL_DEVICE_TYPE_CPU
  Vendor ID: 1002h
  Board name:
  Max compute units: 4
  Max work items dimensions: 3
    Max work items[0]: 1024
    Max work items[1]: 1024
    Max work items[2]: 1024
  Max work group size: 1024
  Preferred vector width char: 16
  Preferred vector width short: 8
  Preferred vector width int: 4
  Preferred vector width long: 2
  Preferred vector width float: 8
  Preferred vector width double: 4
  Native vector width char: 16
  Native vector width short: 8
  Native vector width int: 4
  Native vector width long: 2
  Native vector width float: 8
  Native vector width double: 4
  Max clock frequency: 871Mhz
  Address bits: 64
  Max memory allocation: 2147483648
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 64
  Max image 2D width: 8192
  Max image 2D height: 8192
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 4096
  Alignment (bits) of base address: 1024
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: Yes
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 32768
  Global memory size: 8240955392
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Global
  Local memory size: 32768
  Max pipe arguments: 16
  Max pipe active reservations: 16
  Max pipe packet size: 2147483648
  Max global variable size: 1879048192
  Max global variable preferred total size: 1879048192
  Max read/write image args: 64
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 1
  Error correction support: 0
  Unified memory for Host and Device: 1
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: Yes
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
  Vendor: GenuineIntel
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (sse2,avx)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_spir cl_khr_gl_event


$

Any help with getting further along would be greatly appreciated as my next step is trying one AMD GPU card installed at a time to see what happens




1. I resolved the issue I was having before by modifying the compiler options further with the -D_FORTIFY_SOURCE=0 option shown below

Code:
OPT 	= -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib 
CFLAGS = -D_POSIX_SOURCE -D_GNU_SOURCE $(OPT) -c -std=c11 -D_FORTIFY_SOURCE=0 
CC = gcc
LD = gcc
LDFLAGS = -DPTW32_STATIC_LIB $(OPT)
LIBS = -ljansson -lOpenCL -lpthread -ldl

2. I can successfully CPU and GPU mine XMR with the following xmr.conf file

Code:
{
"Algorithms":
[
{
"name": "CryptoNight",
"devices":
[
                                {
                                        "index": 0,
                                        "threads": 2,
                                        "rawintensity": 1024,
                                        "worksize": 8
                                },
                                {
                                        "index": 1,
                                        "threads": 1,
                                        "rawintensity": 640,
                                        "worksize": 8
                                },
{
"index": -1,
"threads": 3,
"rawintensity": 12,
"worksize": 12
}
],
"pools":
[
{
"url": "stratum+tcp://<valid_pool>:<valid_port>",
"user": "<valid_user>",
"pass": "x"
}
]
}
]
}

3. Current output example from my wolf-xmr-miner build and configuration listed above

Code:
[16:27:38] New job at diff 13419
[16:27:38] Thread 5, (CPU): 66.80H/s
[16:27:38] Thread 4, (CPU): 67.25H/s
[16:27:38] Thread 3, (CPU): 66.24H/s
[16:27:39] Thread 2, GPU ID 1, GPU Type: Tonga: 485.17H/s
[16:27:40] Thread 0, GPU ID 0, GPU Type: Hawaii: 381.56H/s
[16:27:40] Thread 1, GPU ID 0, GPU Type: Hawaii: 381.56H/s
[16:27:41] Thread 2, GPU ID 1, GPU Type: Tonga: 485.26H/s
[16:27:42] Thread 0, GPU ID 0, GPU Type: Hawaii: 380.56H/s
[16:27:42] Thread 1, GPU ID 0, GPU Type: Hawaii: 380.56H/s
[16:27:44] Thread 2, GPU ID 1, GPU Type: Tonga: 484.93H/s
[16:27:45] Thread 0, GPU ID 0, GPU Type: Hawaii: 380.30H/s
[16:27:45] Thread 1, GPU ID 0, GPU Type: Hawaii: 380.30H/s
[16:27:47] Thread 2, GPU ID 1, GPU Type: Tonga: 484.79H/s
[16:27:48] Thread 0, GPU ID 0, GPU Type: Hawaii: 381.18H/s
[16:27:48] Thread 1, GPU ID 0, GPU Type: Hawaii: 381.19H/s
[16:27:48] Share accepted: 706/759 (93.02%)
[16:27:48] Total Hashrate: 1447.45H/s

4. I will continue to play around with the best settings for xmr.conf and find the best performance and stability. 

5. I haven't done any overclock/undervolt efforts on the stock AMD GPUs and will see what options might help performance along with stability as time permits. 

At this point I'm just happy to have it working now using stock settings and hope this information helps others attempting to use the wolf-xmr-miner on Ubuntu 16.04 LTS in the future.  Thanks to Wolf again for sharing with others and making this wonderful GPU miner.




4  Alternate cryptocurrencies / Mining (Altcoins) / Re: Wolf's XMR GPU Miner on: October 13, 2016, 01:36:39 AM
(Updated with code tags that I didn't do originally - apologies for that as I'm new to this forum and Wolf's XMR GPU miner)

As originally stated I'm new to GPU mining and have been following this thread for Wolf's XMR GPU Miner where I have done the following below:

1. Fresh minimal install of Ubuntu 16.04 Server with OpenSSH Server along with latest updates for headless remote SSH access
2. Installed AMDGPU-PRO Driver version 16.30.3-315407 with sudo privileges
3. Installed AMD APP SDK 3.0 with sudo privileges in the /opt/AMDAPPSDK-3.0 directory location
4. Cloned the GitHub repository at https://github.com/wolf9466/wolf-xmr-miner
5. Updated the Makefile with the following changes for new AMDAPPSDK-3.0 installation

Code:
CC		= gcc
LD = gcc
OPT = -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib
CFLAGS = -D_POSIX_SOURCE -D_GNU_SOURCE $(OPT) -c -std=c11
LDFLAGS = -DPTW32_STATIC_LIB $(OPT)
LIBS = -ljansson -lOpenCL -lpthread -ldl

6. Execute make without any errors and only warnings

Code:
$ make

gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/aesb.c -o crypto/aesb.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/aesb-x86-impl.c -o crypto/aesb-x86-impl.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_blake256.c -o crypto/c_blake256.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_groestl.c -o crypto/c_groestl.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_keccak.c -o crypto/c_keccak.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_jh.c -o crypto/c_jh.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/c_skein.c -o crypto/c_skein.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 crypto/oaes_lib.c -o crypto/oaes_lib.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 -maes cryptonight.c -o cryptonight.o
cryptonight.c: In function ‘cryptonight_hash_aesni’:
cryptonight.c:383:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  uint64_t *dst = &ctx->long_state[c[0] & 0x1FFFF0];
                  ^
cryptonight.c:426:10: warning: passing argument 1 of ‘keccakf’ from incompatible pointer type [-Wincompatible-pointer-types]
  keccakf(&ctx->state.hs, 24);
          ^
In file included from cryptonight.c:13:0:
crypto/c_keccak.h:22:6: note: expected ‘uint64_t * {aka long unsigned int *}’ but argument is of type ‘union hash_state *’
 void keccakf(uint64_t st[25], int norounds);
      ^
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 log.c -o log.o
log.c: In function ‘Log’:
log.c:25:10: warning: format not a string literal and no format arguments [-Wformat-security]
   printf(timebuf);
          ^
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 net.c -o net.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 minerutils.c -o minerutils.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 gpu.c -o gpu.o
gcc -D_POSIX_SOURCE -D_GNU_SOURCE -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  -c -std=c11 main.c -o main.o
main.c: In function ‘SetupXMRTest’:
main.c:709:24: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
  snprintf(Options, 31, "-I. -DWORKSIZE=%d", LocalThreads);
                        ^
main.c:709:24: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
main.c: In function ‘MinerThreadProc’:
main.c:1340:8: warning: assignment discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  MyJob = CurrentJob;
        ^
main.c:1348:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
   sprintf(ThrID, "Thread %d, GPU ID %d, GPU Type: %s",
                  ^
main.c:1369:10: warning: assignment discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    MyJob = CurrentJob;
          ^
main.c: In function ‘SigHandler’:
main.c:1474:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  write(ExitPipe[1], &c, 1);
  ^
main.c: In function ‘main’:
main.c:1788:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
  pipe(ExitPipe);
  ^
main.c:2054:2: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  read(ExitPipe[0], &c, 1);
  ^
gcc -DPTW32_STATIC_LIB -O2 -s -I/opt/AMDAPPSDK-3.0/include -L/opt/AMDAPPSDK-3.0/lib  crypto/aesb.o crypto/aesb-x86-impl.o crypto/c_blake256.o crypto/c_groestl.o crypto/c_keccak.o crypto/c_jh.o crypto/c_skein.o crypto/oaes_lib.o cryptonight.o log.o net.o minerutils.o gpu.o main.o -ljansson -lOpenCL -lpthread -ldl -o miner

$

7. Configure the xmr.conf as needed

Code:
{
"Algorithms":
[
{
"name": "CryptoNight",
"devices":
[
{
"index": 0,
"threads": 1,
"rawintensity": 640,
"worksize": 8
},
{
"index": -1,
"threads": 1,
"rawintensity": 8,
"worksize": 8
}
],
"pools":
[
{
"url": "stratum+tcp://<valid_pool>:<valid_port>",
"user": "<valid_user>",
"pass": "x"
}
]
}
]
}

8. Execute the miner and get this error a few seconds later

Code:
$ ./miner xmr.conf

[17:32:27] Setting up GPU(s).
[17:32:27] Successfully connected to pool's stratum.
*** buffer overflow detected ***: ./miner terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f5d856a0725]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f5d8574189c]
/lib/x86_64-linux-gnu/libc.so.6(+0x1168a0)[0x7f5d8573f8a0]
/lib/x86_64-linux-gnu/libc.so.6(+0x115bf2)[0x7f5d8573ebf2]
./miner[0x410c35]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76fa)[0x7f5d859f96fa]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f5d8572fb5d]
======= Memory map: ========
00400000-00419000 r-xp 00000000 fc:00 2623891                            /miner
00619000-0061a000 r--p 00019000 fc:00 2623891                            /miner
0061a000-0061b000 rw-p 0001a000 fc:00 2623891                            /miner
01418000-01439000 rw-p 00000000 00:00 0                                  [heap]
7f5d7fdea000-7f5d7fe00000 r-xp 00000000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d7fe00000-7f5d7ffff000 ---p 00016000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d7ffff000-7f5d80000000 rw-p 00015000 fc:00 3932690                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f5d80000000-7f5d80021000 rw-p 00000000 00:00 0
7f5d80021000-7f5d84000000 ---p 00000000 00:00 0
7f5d840df000-7f5d840e0000 ---p 00000000 00:00 0
7f5d840e0000-7f5d848e0000 rw-p 00000000 00:00 0
7f5d848e0000-7f5d848f7000 r-xp 00000000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d848f7000-7f5d84af7000 ---p 00017000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af7000-7f5d84af8000 r--p 00017000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af8000-7f5d84af9000 rw-p 00018000 fc:00 3932755                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f5d84af9000-7f5d84afb000 rw-p 00000000 00:00 0
7f5d84afb000-7f5d84b00000 r-xp 00000000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84b00000-7f5d84d00000 ---p 00005000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d00000-7f5d84d01000 r--p 00005000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d01000-7f5d84d02000 rw-p 00006000 fc:00 3932726                    /lib/x86_64-linux-gnu/libnss_dns-2.23.so
7f5d84d02000-7f5d84d0d000 r-xp 00000000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84d0d000-7f5d84f0c000 ---p 0000b000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0c000-7f5d84f0d000 r--p 0000a000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0d000-7f5d84f0e000 rw-p 0000b000 fc:00 3932728                    /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f5d84f0e000-7f5d84f14000 rw-p 00000000 00:00 0
7f5d84f14000-7f5d84f17000 r-xp 00000000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d84f17000-7f5d85116000 ---p 00003000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85116000-7f5d85117000 r--p 00002000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85117000-7f5d85118000 rw-p 00003000 fc:00 3932678                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f5d85118000-7f5d85220000 r-xp 00000000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85220000-7f5d8541f000 ---p 00108000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d8541f000-7f5d85420000 r--p 00107000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85420000-7f5d85421000 rw-p 00108000 fc:00 3932705                    /lib/x86_64-linux-gnu/libm-2.23.so
7f5d85421000-7f5d85428000 r-xp 00000000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85428000-7f5d85627000 ---p 00007000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85627000-7f5d85628000 r--p 00006000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85628000-7f5d85629000 rw-p 00007000 fc:00 3932757                    /lib/x86_64-linux-gnu/librt-2.23.so
7f5d85629000-7f5d857e9000 r-xp 00000000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d857e9000-7f5d859e8000 ---p 001c0000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859e8000-7f5d859ec000 r--p 001bf000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859ec000-7f5d859ee000 rw-p 001c3000 fc:00 3932664                    /lib/x86_64-linux-gnu/libc-2.23.so
7f5d859ee000-7f5d859f2000 rw-p 00000000 00:00 0
7f5d859f2000-7f5d85a0a000 r-xp 00000000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85a0a000-7f5d85c09000 ---p 00018000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c09000-7f5d85c0a000 r--p 00017000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c0a000-7f5d85c0b000 rw-p 00018000 fc:00 3932751                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f5d85c0b000-7f5d85c0f000 rw-p 00000000 00:00 0
7f5d85c0f000-7f5d85c15000 r-xp 00000000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85c15000-7f5d85e15000 ---p 00006000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85e15000-7f5d85e16000 rw-p 00006000 fc:00 3677498                    /usr/lib/x86_64-linux-gnu/amdgpu-pro/libOpenCL.so.1
7f5d85e16000-7f5d85e22000 r-xp 00000000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d85e22000-7f5d86021000 ---p 0000c000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86021000-7f5d86022000 r--p 0000b000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86022000-7f5d86023000 rw-p 0000c000 fc:00 3678033                    /usr/lib/x86_64-linux-gnu/libjansson.so.4.7.0
7f5d86023000-7f5d86049000 r-xp 00000000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d86238000-7f5d8623d000 rw-p 00000000 00:00 0
7f5d86245000-7f5d86248000 rw-p 00000000 00:00 0
7f5d86248000-7f5d86249000 r--p 00025000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d86249000-7f5d8624a000 rw-p 00026000 fc:00 3932640                    /lib/x86_64-linux-gnu/ld-2.23.so
7f5d8624a000-7f5d8624b000 rw-p 00000000 00:00 0
7ffcc1f08000-7ffcc1f29000 rw-p 00000000 00:00 0                          [stack]
7ffcc1fae000-7ffcc1fb0000 r--p 00000000 00:00 0                          [vvar]
7ffcc1fb0000-7ffcc1fb2000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

$

9. The AMD drivers are installed and loaded correctly

Code:
$ sudo lshw -class display | grep "driver"

       configuration: driver=amdgpu latency=0
       configuration: driver=amdgpu latency=0
       configuration: driver=i915 latency=0

$

10. I have two AMD GPUs installed on this Ubuntu 16.04 headless server

R9 390X - Hawaii
R9 380 - Tonga

11. The clinfo command shows all the information on the GPUs

Code:
$ clinfo

Number of platforms: 1
  Platform Profile: FULL_PROFILE
  Platform Version: OpenCL 2.0 AMD-APP (2117.7)
  Platform Name: AMD Accelerated Parallel Processing
  Platform Vendor: Advanced Micro Devices, Inc.
  Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices


  Platform Name: AMD Accelerated Parallel Processing
Number of devices: 3
  Device Type: CL_DEVICE_TYPE_GPU
  Vendor ID: 1002h
  Board name:
  Device Topology: PCI[ B#1, D#0, F#0 ]
  Max compute units: 14
  Max work items dimensions: 3
    Max work items[0]: 256
    Max work items[1]: 256
    Max work items[2]: 256
  Max work group size: 256
  Preferred vector width char: 4
  Preferred vector width short: 2
  Preferred vector width int: 1
  Preferred vector width long: 1
  Preferred vector width float: 1
  Preferred vector width double: 1
  Native vector width char: 4
  Native vector width short: 2
  Native vector width int: 1
  Native vector width long: 1
  Native vector width float: 1
  Native vector width double: 1
  Max clock frequency: 555Mhz
  Address bits: 64
  Max memory allocation: 4244635648
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 8
  Max image 2D width: 16384
  Max image 2D height: 16384
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 1024
  Alignment (bits) of base address: 2048
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: No
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 16384
  Global memory size: 8541122560
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Scratchpad
  Local memory size: 32768
  Max pipe arguments: 0
  Max pipe active reservations: 0
  Max pipe packet size: 0
  Max global variable size: 0
  Max global variable preferred total size: 0
  Max read/write image args: 0
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 64
  Error correction support: 0
  Unified memory for Host and Device: 0
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: No
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Hawaii
  Vendor: Advanced Micro Devices, Inc.
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (VM)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event


  Device Type: CL_DEVICE_TYPE_GPU
  Vendor ID: 1002h
  Board name:
  Device Topology: PCI[ B#2, D#0, F#0 ]
  Max compute units: 14
  Max work items dimensions: 3
    Max work items[0]: 256
    Max work items[1]: 256
    Max work items[2]: 256
  Max work group size: 256
  Preferred vector width char: 4
  Preferred vector width short: 2
  Preferred vector width int: 1
  Preferred vector width long: 1
  Preferred vector width float: 1
  Preferred vector width double: 1
  Native vector width char: 4
  Native vector width short: 2
  Native vector width int: 1
  Native vector width long: 1
  Native vector width float: 1
  Native vector width double: 1
  Max clock frequency: 555Mhz
  Address bits: 64
  Max memory allocation: 1409215488
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 8
  Max image 2D width: 16384
  Max image 2D height: 16384
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 1024
  Alignment (bits) of base address: 2048
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: No
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 16384
  Global memory size: 2127253504
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Scratchpad
  Local memory size: 32768
  Max pipe arguments: 0
  Max pipe active reservations: 0
  Max pipe packet size: 0
  Max global variable size: 0
  Max global variable preferred total size: 0
  Max read/write image args: 0
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 64
  Error correction support: 0
  Unified memory for Host and Device: 0
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: No
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Tonga
  Vendor: Advanced Micro Devices, Inc.
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (VM)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer cl_khr_spir cl_khr_gl_event


  Device Type: CL_DEVICE_TYPE_CPU
  Vendor ID: 1002h
  Board name:
  Max compute units: 4
  Max work items dimensions: 3
    Max work items[0]: 1024
    Max work items[1]: 1024
    Max work items[2]: 1024
  Max work group size: 1024
  Preferred vector width char: 16
  Preferred vector width short: 8
  Preferred vector width int: 4
  Preferred vector width long: 2
  Preferred vector width float: 8
  Preferred vector width double: 4
  Native vector width char: 16
  Native vector width short: 8
  Native vector width int: 4
  Native vector width long: 2
  Native vector width float: 8
  Native vector width double: 4
  Max clock frequency: 871Mhz
  Address bits: 64
  Max memory allocation: 2147483648
  Image support: Yes
  Max number of images read arguments: 128
  Max number of images write arguments: 64
  Max image 2D width: 8192
  Max image 2D height: 8192
  Max image 3D width: 2048
  Max image 3D height: 2048
  Max image 3D depth: 2048
  Max samplers within kernel: 16
  Max size of kernel argument: 4096
  Alignment (bits) of base address: 1024
  Minimum alignment (bytes) for any datatype: 128
  Single precision floating point capability
    Denorms: Yes
    Quiet NaNs: Yes
    Round to nearest even: Yes
    Round to zero: Yes
    Round to +ve and infinity: Yes
    IEEE754-2008 fused multiply-add: Yes
  Cache type: Read/Write
  Cache line size: 64
  Cache size: 32768
  Global memory size: 8240955392
  Constant buffer size: 65536
  Max number of constant args: 8
  Local memory type: Global
  Local memory size: 32768
  Max pipe arguments: 16
  Max pipe active reservations: 16
  Max pipe packet size: 2147483648
  Max global variable size: 1879048192
  Max global variable preferred total size: 1879048192
  Max read/write image args: 64
  Max on device events: 0
  Queue on device max size: 0
  Max on device queues: 0
  Queue on device preferred size: 0
  SVM capabilities:
    Coarse grain buffer: No
    Fine grain buffer: No
    Fine grain system: No
    Atomics: No
  Preferred platform atomic alignment: 0
  Preferred global atomic alignment: 0
  Preferred local atomic alignment: 0
  Kernel Preferred work group size multiple: 1
  Error correction support: 0
  Unified memory for Host and Device: 1
  Profiling timer resolution: 1
  Device endianess: Little
  Available: Yes
  Compiler available: Yes
  Execution capabilities:
    Execute OpenCL kernels: Yes
    Execute native function: Yes
  Queue on Host properties:
    Out-of-Order: No
    Profiling : Yes
  Queue on Device properties:
    Out-of-Order: No
    Profiling : No
  Platform ID: 0x7fae083c38f8
  Name: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
  Vendor: GenuineIntel
  Device OpenCL C version: OpenCL C 1.2
  Driver version: 2117.7 (sse2,avx)
  Profile: FULL_PROFILE
  Version: OpenCL 1.2 AMD-APP (2117.7)
  Extensions: cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_spir cl_khr_gl_event


$

Any help with getting further along would be greatly appreciated as my next step is trying one AMD GPU card installed at a time to see what happens

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!