2

I'm trying to test geth on Nvidia TX1 board which has ARM64 CPU.

The first trouble was to get go language installed on it as there's no ARM64 bit version available. So, I compiled arm64 version of go in a ubuntu vm and copied the files to TX1 ubuntu OS.

Using these go files, I compile geth with make gets. When tried geth gpuinfo command I get this output:

ubuntu@tegra-ubuntu:~/go-ethereum/build/bin$ ./geth gpuinfo
OpenCL disabled. Set GO_OPENCL and re-build to enable.

I tried to look around it's solution and came across these two links:

http://forum.ethereum.org/discussion/3981/gpu-mining-disabled-set-go-opencl-and-re-build-to-enable

https://github.com/ethereum/go-ethereum/issues/1979#issuecomment-156155883

I installed godeps dependency and then tried command godep go install -tags OpenCL under go-ethereum, $HOME/go, $HOME/go/src etc. and everywhere I get the same result:

ubuntu@tegra-ubuntu:~/go$ godep go install -tags opencl
godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]:   Current Directory: /home/ubuntu/go
godep: [WARNING]:   $GOPATH: /home/ubuntu/go
godep: No Godeps found (or in any parent directory)


ubuntu@tegra-ubuntu:~/go-ethereum$ godep go install -tags opencl
godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]:   Current Directory: /home/ubuntu/go-ethereum
godep: [WARNING]:   $GOPATH: /home/ubuntu/go
godep: WARNING: Godep workspaces (./Godeps/_workspace) are deprecated and support for them will be removed when go1.8 is released.
godep: WARNING: Go version (go1.6) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
can't load package: package .: no buildable Go source files in /home/ubuntu/go-ethereum
godep: go exit status 1

I have copied same go files in two different directories ($HOME/go and $HOME/goroot) and set them in environment variables.

These are the contents of that compiled go directory:

ubuntu@tegra-ubuntu:~/go$ ls -lh
total 132K
drwxr-xr-x  2 ubuntu ubuntu 4.0K Jul  3 08:40 api
-rw-r--r--  1 ubuntu ubuntu  25K Jul  3 08:40 AUTHORS
drwxrwxr-x  2 ubuntu ubuntu 4.0K Jul  3 09:48 bin
-rw-r--r--  1 ubuntu ubuntu 1.2K Jul  3 08:40 CONTRIBUTING.md
-rw-r--r--  1 ubuntu ubuntu  34K Jul  3 08:40 CONTRIBUTORS
drwxr-xr-x  8 ubuntu ubuntu 4.0K Jul  3 08:40 doc
-rw-r--r--  1 ubuntu ubuntu 1.2K Jul  3 08:40 favicon.ico
drwxr-xr-x  3 ubuntu ubuntu 4.0K Jul  3 08:40 lib
-rw-r--r--  1 ubuntu ubuntu 1.5K Jul  3 08:40 LICENSE
drwxr-xr-x 13 ubuntu ubuntu 4.0K Jul  3 08:40 misc
-rw-r--r--  1 ubuntu ubuntu 1.3K Jul  3 08:40 PATENTS
drwxrwxr-x  5 ubuntu ubuntu 4.0K Jul  3 08:42 pkg
-rw-r--r--  1 ubuntu ubuntu 1.6K Jul  3 08:40 README.md
-rw-r--r--  1 ubuntu ubuntu   26 Jul  3 08:40 robots.txt
drwxr-xr-x 45 ubuntu ubuntu 4.0K Jul  3 09:47 src
drwxr-xr-x 16 ubuntu ubuntu  12K Jul  3 08:40 test
-rw-r--r--  1 ubuntu ubuntu    7 Jul  3 08:40 VERSION
ubuntu@tegra-ubuntu:~/go$ file bin/go
go     godep  gofmt  
ubuntu@tegra-ubuntu:~/go$ file bin/go*
bin/go:    ELF 64-bit LSB  executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
bin/godep: ELF 64-bit LSB  executable, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.7.0, BuildID[sha1]=453b97400cb931bfc2a4131e6de0c894d335d26e, not stripped
bin/gofmt: ELF 64-bit LSB  executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped

This is .profile

ubuntu@tegra-ubuntu:~$ cat .profile 
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

export GOPATH=$HOME/go
export GOROOT=$HOME/goroot
export PATH=$PATH:$HOME/go/bin

This is go-ethereum directory's env.sh file

ubuntu@tegra-ubuntu:~/go-ethereum/build$ cat env.sh 
#!/bin/sh

export GOPATH=$HOME/go
export GOROOT=$HOME/goroot
export PATH=$PATH:$HOME/go/bin
export GO_OPENCL=true
export GPU_MAX_ALLOC_PERCENT=95


set -e

if [ ! -f "build/env.sh" ]; then
    echo "$0 must be run from the root of the repository."
    exit 2
fi

# Create fake Go workspace if it doesn't exist yet.
workspace="$PWD/build/_workspace"
root="$PWD"
ethdir="$workspace/src/github.com/ethereum"
if [ ! -L "$ethdir/go-ethereum" ]; then
    mkdir -p "$ethdir"
    cd "$ethdir"
    ln -s ../../../../../. go-ethereum
    cd "$root"
fi

# Set up the environment to use the workspace.
# Also add Godeps workspace so we build using canned dependencies.
GOPATH="$ethdir/go-ethereum/Godeps/_workspace:$workspace"
GOBIN="$PWD/build/bin"
export GOPATH GOBIN

# Run the command inside the workspace.
cd "$ethdir/go-ethereum"
PWD="$ethdir/go-ethereum"

# Launch the arguments with the configured environment.
exec "$@"

Please help me fixing this issue and able to test geth GPU benchmarks on ARM64 platform.

EDIT1: Seems I found a solution to this problem. Just after a minute posting this question. That's quick. :)

This is what I did:

ubuntu@tegra-ubuntu:~/go-ethereum$ export GO_OPENCL=true   
ubuntu@tegra-ubuntu:~/go-ethereum$ export GPU_MAX_ALLOC_PERCENT=100   
ubuntu@tegra-ubuntu:~/go-ethereum$ export GPU_SINGLE_ALLOC_PERCENT=100
ubuntu@tegra-ubuntu:~/go-ethereum$ make geth
build/env.sh go build -i -v -ldflags '-X main.gitCommit=b7e3dfc5a2bc7e2f4d653fbe0ec9774277a10643' -tags opencl -o build/bin/geth ./cmd/geth
github.com/Gustav-Simonsson/go-opencl/cl
github.com/ethereum/ethash
github.com/ethereum/go-ethereum/miner
github.com/ethereum/go-ethereum/eth
github.com/ethereum/go-ethereum/release
github.com/ethereum/go-ethereum/cmd/utils
github.com/ethereum/go-ethereum/cmd/geth
Done building.
Run "build/bin/geth" to launch geth.
ubuntu@tegra-ubuntu:~/go-ethereum$ cd build/bin/
ubuntu@tegra-ubuntu:~/go-ethereum/build/bin$ ./geth gpuinfo
=============================================
============ OpenCL Device Info =============
=============================================
Plaform error (check your OpenCL installation): cl: error -1001

Now, I need to find what's the problem with this error:

Plaform error (check your OpenCL installation): cl: error -1001

Please help!

Thanks

  • Without reading the full question, what about sticking to the binary geth without OpenCL support and trying to compile ethminer from the C++ project to test the mining? I have to admit I never used geth for CPU mining. – Waqar Lim Jul 3 '16 at 11:37
  • Are you sure ethminer support CUDA? Because in case if ethminer also needs OpenCL, the problem still remains. – satinder Jul 4 '16 at 4:38
  • I see the last comment here is a few months old, but as I am very interested in this test. Did you get any further ? BTW here is a link to the miner I have compiled and used (but not on jetson), this supports both amd GPU trough opencl and Nvidia GPU trough cuda. github.com/Genoil/cpp-ethereum – Marco Sep 8 '16 at 6:20
  • I tried genoil miner to compile on arm64, but that made me stuck with other multiple missing dependencies to compile. It was headache to get all of them small or big softwares to compile manually as those where not available from the repo. so, it looks possible, but kinda endless effort to compile. Unless it's compiled cross-platform for arm64, which I did not try. – satinder Sep 11 '16 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.