Miner- Zogminer: Linux SILENTARMY

Thanks. I got error on running second instance of zcashd.
Error: Cannot obtain a lock on data directory /home/.zcash. Zcash is probably already running.

Hi, my preferred distro is Arch - I have a headless RX480 and would love to get it running. I have amdgpu-pro (16.30.3.315407-2) opencl-headers, and amdapp-sdk (3.0-21) installed. My user is in the video group, and I can run clinfo:

Number of platforms:				 2
  Platform Profile:				 FULL_PROFILE
  Platform Version:				 OpenCL 2.0 AMD-APP (1800.8)
  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 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:				 1
  Device Type:					 CL_DEVICE_TYPE_CPU
  Vendor ID:					 1002h
  Board name:

Although it segfaults at the end:

fish: Process 2100, 'clinfo' 'clinfo | more' terminated by signal SIGSEGV (Address boundary error)

Here’s what dmesg has to say (not much)

[ 1127.060804] clinfo[2100]: segfault at 0 ip           (null) sp 00007ffea0227d98 error 14 in clinfo[400000+80000]

Ignoring that, I can build zogminer w/o an issue.

I can list the devices

./zcash-miner -listdevices
Number of Platforms:1
[OPENCL]:
Listing OpenCL devices.
FORMAT: [deviceID] deviceName
[0] Ellesmere
        CL_DEVICE_TYPE: GPU
        CL_DEVICE_GLOBAL_MEM_SIZE: 4254109696
        CL_DEVICE_MAX_MEM_ALLOC_SIZE: 3019828224
        CL_DEVICE_MAX_WORK_GROUP_SIZE: 256

which seems hunky dory, but when I try to run it:

./zcash-miner -G
Running the test miner
ERROR: No suitable GPU found! No work will be performed!

Adding and -S=0 doesn’t help either.

I feel like I’m pretty close here… BTW, right now all this is without Xorg running at all. (and emtpy DISPLAY and COMPUTE variables). The documentation seems a bit hazy on whether I can OpenCL w/o a display. Anyway, if anyone has any feedback or things I might try, would be mighty appreciative, thanks.

Will this work on NVIDIA gf 820m?
Couldnt see info is this only for amd or nvidia also…thanks!

just updated from git, because of this:
omaralvarez: Perf and mem usage improvements silentarmy kernel

compiled and get this (R9 390, Ubuntu 16.04):

[OPENCL]:Found suitable OpenCL device [Hawaii] with 8495611904 bytes of GPU memory
[OPENCL]:Using platform: AMD Accelerated Parallel Processing
[OPENCL]:Using device: Hawaii(OpenCL 1.2 AMD-APP (2117.7))
[OPENCL]:Printing program log
[OPENCL]:
[OPENCL]:CL ERROR:CL_INVALID_ARG_INDEX
[OPENCL]:CL ERROR:CL_INVALID_ARG_INDEX

^C^C^Cterminate called after throwing an instance of ‘boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::system::system_error >’
what(): wait: Interrupted system call

SYSTEM DEAD. (remote, so a little problem :wink: tried with two systems, both dead now.

list devices work:
./zcash-miner -listdevices
Number of Platforms:1
[OPENCL]:
Listing OpenCL devices.
FORMAT: [deviceID] deviceName
[0] Hawaii
CL_DEVICE_TYPE: GPU
CL_DEVICE_GLOBAL_MEM_SIZE: 1357156352
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 856599552
CL_DEVICE_MAX_WORK_GROUP_SIZE: 256

I hate that attitude.

1 Like

NVidia and windows support?

nicehash many Segmentation fault (core dumped)

Hi
What OS are you using ?
Sounds like a bash is misbehaving

I made the script for Ubuntu 15.10 and it is running fine

( Sorry for the late answer : was asleep … )

Thank you for posting your script! Looks nice.

Script looks exceptional. Donation option is a nice touch.

I’ve got it running and it seems to be doing the job.

Dependencies were trickier than anticipated, couldn’t find an apt repository for typescript for example, and used npm instead.

I can see the rig showing up against my pool, which is great. One of my GPUs is reporting as sick rather a lot and doesn’t restart automatically ‘not enough data yet’. I think that GPU might be a bit poorly.

Glad you like it !

I will work on a CLI improved version

The " not enough data " is a failsafe to not reboot endlessly a thread , the script waits to see some hash reported into it’s typescript file.
If it always says " not enough data " it means the thread never starts , look into your config .

Feel free to come by gitter and message one of us. We have a private repo now to protect us from people selling our daily hash improvements and we could discuss giving you access and helping you build around some new things we are trying.

Just joined mining and dev rooms , see you there

EDIT : I see you guys wanna make a dedicated OS - I can surely help with that !

1 Like

16.04 ubuntu :slight_smile:
no prob thanks

Error line number ?
Would help to make the scrip easy to run on dif OS’s

let me check again, ill brb thanks

Hi, Maybe this could help you Ubuntu 16.04 Setup · nginnever/zogminer Wiki · GitHub

Hey GGG, that is useful documentation for sure, but the problem turned out to be a code issue with OpenCL platform enumeration. I submitted a pull request that might not be exactly right (it’s a bit confusing internally how it iterates/counts through stuff and the code has a bunch of repeated codepaths that probably should be refactored) but it did the trick for my 1CPU/1GPU test system: Added -P flag to specify which OpenCL Platform to look at by lhl · Pull Request #69 · nginnever/zogminer · GitHub

I would really love to get this working, if it works ill make a video of it, and recommend people to use it for AMD cards, and give you guys a shout out and tell ppl they should donate since it works so well.

i was using zog for a while, but restarting them manually was getting to be a pain in the butt, so i went to screw around with genoil v6 in windows since he just released that yesterday (or your earlier today) but that crashes no matter what switches and values I use also

cryptomined@crypto:~/zogminer$ sh autostart.sh
Threads have been built … waiting 60 sec to start monitoring
Starting monitoring
autostart.sh: 100: autostart.sh: Syntax error: redirection unexpected

is that what you mean?

i think i just put in my addy
#!/bin/bash

You need script , screen and moreutils - run this :

sudo apt-get update && sudo apt-get install typescript moreutils screen

WALLET=$( echo “t1RVpR7U9ZA5SU94tXzEu7sLBtZrBkq4Vrf”) ### YOUR WALLET

Input your pool

POOL=$(echo ‘“stratum+tcp://us1-zcash.flypool.org:3333”’) ### YOUR POOL - please use the double ‘" and "’ !!

GPU=6 ### How many GPU’s you have

Maxtime is the maximum lag time allowed before restarting the miner …

Be aware there is some lag from the time the miner executes hashes and the time the script writes it in the file.

I have a good result with 300 sec

MAXTIME=300
DONNATE=1 ### To enable donations
DONNWALLET=$(echo “t1MEUYR6yu9hmt-t-addddr-6pAXQSTy”)

If you want to give some love back - Only GPU 0 will mine in this wallet - given your pool needs only a wallet as username

This is where you want to donate :

### @omaralvarez
### ZEC: t1MEUYR6yu9hYQ31ECWmijVwx9R6pAXQSTy

### @nginnever
### ZEC: t1PGgRgVQ14utsD7mp2dzGdykTDFUCKzPQ5

### @AgeManning
### ZEC: t1MfAaj8YDwiwFb6RAnNtW4EtzvTvkFGBvV

############## Script ###################

ZZ=$(echo ‘"’)
RUNSLOOP=$GPU
until [ RUNSLOOP = 0 ]; do RUNSLOOP=(expr $RUNSLOOP - 1 )

if [ $DONNATE = 1 ] ; then
if [ $RUNSLOOP = 0 ] ; then WALLET=$DONNWALLET ; fi ; fi

1rst instance

echo " #!/bin/bash
WALLET=$WALLET
export GPU_SINGLE_ALLOC_PERCENT=100
export GPU_MAX_ALLOC_PERCENT=99
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1 " > Ist$RUNSLOOP.T1.sh
echo 'echo $$ > '“$RUNSLOOP.T1PID” >> Ist$RUNSLOOP.T1.sh
echo " script Ist$RUNSLOOP.T1 -c $ZZ./src/zcash-miner -G -stratum=$POOL -user=$WALLET.Rig -S=$RUNSLOOP | ts $ZZ
" >> Ist$RUNSLOOP.T1.sh
chmod +x Ist$RUNSLOOP.T1.sh
screen -dmS Zcash$RUNSLOOP.T1 ./Ist$RUNSLOOP.T1.sh
sleep 0.5

2nd instance

if [ $DONNATE = 1 ] ; then
if [ $RUNSLOOP = 0 ] ; then WALLET=$DONNWALLET ; fi ; fi
echo " #!/bin/bash
WALLET=$WALLET
export GPU_SINGLE_ALLOC_PERCENT=100
export GPU_MAX_ALLOC_PERCENT=99
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1 " > Ist$RUNSLOOP.T2.sh
echo 'echo $$ > '“$RUNSLOOP.T2PID” >> Ist$RUNSLOOP.T2.sh
echo "script Ist$RUNSLOOP.T2 -c $ZZ./src/zcash-miner -G -stratum=$POOL -user=$WALLET.Rig -S=$RUNSLOOP | ts $ZZ
" >> Ist$RUNSLOOP.T2.sh
chmod +x Ist$RUNSLOOP.T2.sh
screen -dmS Zcash$RUNSLOOP.T2 ./Ist$RUNSLOOP.T2.sh
sleep 0.5

done ### we have built 2 instances per GPU … moving on …

echo " Threads have been built … waiting 60 sec to start monitoring"
sleep 55
echo " Starting monitoring "
sleep 5

while :
do

Entering the script loop

echo " "
RUNSLOOP=$GPU
until [ RUNSLOOP = 0 ]; do ### Numbering loop RUNSLOOP=(expr $RUNSLOOP - 1 )

#####################################################################################################################

For instace one

NAME=$(echo "Ist$RUNSLOOP.T1")
### This is the time of hash vs current date calculator 
### Need variables 
date_a=$(date +"%H:%M:%S") ### This is current time 
CAL=$(cat $NAME | tail --lines=4 | grep 'Kernel' |  awk '{print $3}' | tail --lines=1)
    ### Prototype : Need to see the diff from the timestamp and the date 
old=$CAL
new=$(date +"%H:%M:%S")
#echo " $new - the time "  ### DEBUGG
#echo " $old - the timestamp " ### DEBUGG
### feeding variables by using read and splitting with IFS
IFS=: read old_hour old_min old_sec <<< "$old"
IFS=: read hour min sec <<< "$new"
### convert hours to minutes and seconds
### the 10# is there to avoid errors with leading zeros
### by telling bash that we use base 10
total_old_minutes=$((10#$old_hour*60 + 10#$old_min*60 + 10#$old_sec))
total_minutes=$((10#$hour*60 + 10#$min*60 + 10#$sec))
sleep 1
  DIFF=$(echo "$((total_minutes - total_old_minutes))")
  if [ $DIFF -gt $MAXTIME ] ### How many seconds to wait before restarting thread
      then 
    SICK=1
     echo " ============================= "
    echo " GPU $RUNSLOOP :" 
    echo " there is a $DIFF sec lag on hash check - GPU is sick ! " ###  Here we have declared the GPU sick 

    ### ACTION HERE - We have a lag on the miner thread
     LINES=$(cat /home/bash/$NAME | wc -l)
    
     if [ $LINES -gt 150 ] ; then  
        PID=$(cat $RUNSLOOP.T1PID)
        kill $PID
        screen -dmS Zcash$RUNSLOOP.T1 ./Ist$RUNSLOOP.T1.sh
        echo " Retarted Ist$RUNSLOOP.T1.sh | Reason : Lag found "
        sleep 2
        else 
        echo " Not restarting GPU $RUNSLOOP T1 | Reason - Not enough data yet"
        fi
      else 
      echo " ============================= "
    echo " GPU $RUNSLOOP is OK :" 
    echo " Thread 01  the difference is $((total_minutes - total_old_minutes)) sec " ### Normal condition : Hashes are running
  fi
### Sleep and time here 
sleep 0.5

############################################################################################################################

For instance 2 check

NAME=$(echo "Ist$RUNSLOOP.T2")
### This is the time of hash vs current date calculator 
### Need variables 
date_a=$(date +"%H:%M:%S") ### This is current time 
CAL=$(cat $NAME | tail --lines=4 | grep 'Kernel' |  awk '{print $3}' | tail --lines=1)
    ### Prototype : Need to see the diff from the timestamp and the date 
old=$CAL
new=$(date +"%H:%M:%S")
#echo " $new - the time "  ### DEBUGG
#echo " $old - the timestamp " ### DEBUGG
### feeding variables by using read and splitting with IFS
IFS=: read old_hour old_min old_sec <<< "$old"
IFS=: read hour min sec <<< "$new"
### convert hours to minutes and seconds
### the 10# is there to avoid errors with leading zeros
### by telling bash that we use base 10
total_old_minutes=$((10#$old_hour*60 + 10#$old_min*60 + 10#$old_sec))
total_minutes=$((10#$hour*60 + 10#$min*60 + 10#$sec))
sleep 1
DIFF=$(echo "$((total_minutes - total_old_minutes))")
if [ $DIFF -gt $MAXTIME ] ### How many seconds to wait before restarting thread
      then 
    SICK=1
    echo " there is a $DIFF sec lag on hash check - GPU is sick ! " ###  Here we have declared the GPU sick 

     ### ACTION HERE - We have a lag on the miner thread
     LINES=$(cat /home/bash/$NAME | wc -l)
    
     if [ $LINES -gt 150 ] ; then  
        PID=$(cat $RUNSLOOP.T2PID)
        kill $PID
        screen -dmS Zcash$RUNSLOOP.T2 ./Ist$RUNSLOOP.T2.sh
        echo " Retarted Ist$RUNSLOOP.T2.sh | Reason : Lag found "
        sleep 2
        else 
        echo " Not restarting GPU $RUNSLOOP T2 | Reason - Not enough data yet"
        fi
      else 
    echo " Thread 02 the difference is $((total_minutes - total_old_minutes)) sec" ### Normal condition : Hashes are running
fi
sleep 0.1

done ### Done

done ### The script loop

Silly me - line 100 , it saw it before , OK I’ll look into it … brb