elective-stereophonic
elective-stereophonic
NxtMint Java minter
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.11.15 | Latest Experimental Nxt Client: Nxt 1.12.0e

Pages: 1 ... 7 8 [9] 10 11 ... 20  All

Author Topic: NxtMint Java minter  (Read 51549 times)

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #160 on: January 23, 2015, 02:21:53 am »

Test version at https://drive.google.com/open?id=0B1312_6UqRHPWUVoZjUxR1ZvazA&authuser=0

gpuDevice now has three parameters: device number, work group size, work group count.

If you specify just the device number (ie, gpuDevice=0), the work group size will be 256 and the work group count will be determined by gpuIntensity.

For my GT 720, I got the best Scrypt results with gpuDevice=0,16,64.  Larger work group sizes reduced the hash rate and larger work group counts didn't increase the hash rate.

Code: [Select]
09:19:12 INFO Main.main: Java Nxt Mint Version 1.2.0
09:19:12 INFO Main.main: Application data path: C:\Users\Ronald\Appdata\Roaming\NxtMint
09:19:12 INFO Main.main: Using Nxt node at scripterron.dyndns.biz:7876
09:19:12 INFO Main.main: Minting 5.000000 units of ELEMS for account NXT-XM86-4ZNA-65L5-CDWUE: 1 CPU threads, 30 GPU intensity
09:19:12 INFO Nxt.init: API node=scripterron.dyndns.biz, API port=7876
09:19:13 INFO Main.lambda$null$2: GPU device 0: NVIDIA CUDA
  1024MB global memory, 47KB local memory, 2 compute units, Max work group size 1024
09:19:14 INFO MintWorker.run: CPU worker 0 starting
09:19:14 FINE GpuScrypt.<init>: GPU local size 16, global size 1024
09:19:14 INFO MintWorker.run: GPU worker 1 starting on GPU 0
09:19:14 FINE MintWorker.run: Worker 1 starting on counter 33
09:19:14 FINE MintWorker.run: Worker 0 starting on counter 33
09:20:14 FINE MintWorker.run: Worker 0: 0.20 MHash, 0.0033 MHash/s
09:20:16 FINE MintWorker.run: Worker 1: 0.68 MHash, 0.0111 MHash/s
09:21:14 FINE MintWorker.run: Worker 0: 0.40 MHash, 0.0033 MHash/s
09:21:17 FINE MintWorker.run: Worker 1: 1.35 MHash, 0.0110 MHash/s
Logged

794259332

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: NxtMint Java minter
« Reply #161 on: January 23, 2015, 05:58:55 am »

Logged

cbw

  • Newbie
  • *
  • Karma: +2/-0
  • Offline Offline
  • Posts: 12
    • View Profile
Re: NxtMint Java minter
« Reply #162 on: January 23, 2015, 06:37:44 am »

Java needs heap space for itself as well.   Try 1920+192=-2122MB or greater.  But that is still a lot of storage to allocate and might be causing PCI-E bus problems.  The fact that you get a JVM crash for a small allocation size indicates there is still a problem.
I'm set 2500MB (can't set 3000MB, free mem around 2,7GB) - no changes. And I never see, that process use over 1GB of mem.
Logged

cbw

  • Newbie
  • *
  • Karma: +2/-0
  • Offline Offline
  • Posts: 12
    • View Profile
Re: NxtMint Java minter
« Reply #163 on: January 23, 2015, 06:46:47 am »

Test version at drive.google.com/open?id=0B1312_6UqRHPWUVoZjUxR1ZvazA&authuser=0
Tried gpuDevice=0,16,64, gpuDevice=0,8,32, gpuDevice=0,4,16, gpuDevice=0,2,8... And tried starts with one or two or three video cards. Results: 1) video driver crashes, 2) see fatal error in console.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #164 on: January 23, 2015, 12:37:46 pm »


Try the test version on Google Drive.  It changes gpuDevice to specify device number, work group size and work group count.  See my append right before yours.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #165 on: January 23, 2015, 12:42:15 pm »

Tried gpuDevice=0,16,64, gpuDevice=0,8,32, gpuDevice=0,4,16, gpuDevice=0,2,8... And tried starts with one or two or three video cards. Results: 1) video driver crashes, 2) see fatal error in console.
I don't know what else to try.  The failures are in the runtime libraries or the device driver and I'm not able to debug them.

I'm looking into writing native C routines to do CPU hashing.  That might result in improve CPU hash performance.  The GPU Scrypt support isn't much faster than the current CPU support, so that might be the way to go.

Another possibility is a native OpenCL Scrypt implementation based on something like CGMiner.  But I don't think that is something I want to do (at least not now).  If somebody wants to tackle it, I'm willing to include it (JOCL will let me invoke the OpenCL program from Java).  The catch is the digest generated by the native program must be identical to the digest generated by the NRS server code.  Otherwise, the mint transaction will fail when it is submitted to the server.
« Last Edit: January 23, 2015, 12:50:03 pm by ScripterRon »
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #166 on: January 23, 2015, 09:42:58 pm »

I did some testing using native C versus Java for the Keccak25 hash algorithm.
Code: [Select]
Ronald@Hoffman-Desktop /c/temp
$ java JniTest
Running on 64-bit JVM
Performing 16,777,216 hashes
Native hash: Elapsed time 6.75 sec, Rate 2,485.51 KH/sec
Java hash: Elapsed time 9.83 sec, Rate 1,706.74 KH/sec
Hash digests are equal
This is a 45% improvement.  So I'm going to modify NxtMint to use native routines for CPU hashing.  Since I'm on Windows 8.1, I can provide native routines for Windows (32-bit and 64-bit).  If this is desired for other platforms, somebody else will need to build and test the code on those platforms since I don't have Mac or Linux systems.
Logged

crimi

  • Hero Member
  • *****
  • Karma: +122/-11
  • Offline Offline
  • Posts: 863
    • View Profile
Re: NxtMint Java minter
« Reply #167 on: January 24, 2015, 12:05:47 pm »

This is a 45% improvement.

Waiting for this  :D
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #168 on: January 24, 2015, 01:36:22 pm »

Waiting for this  :D
I've finished the Keccak25 support.  I was getting 1.3MH/s using the Java hash routine, so this is a 45% improvement.  This is on Windows 8.1 64-bit.  The 32-bit library should work but I don't have a 32-bit system to test it on.  Note that the Java library path now specifies both the Aparapi and NxtMint runtime libraries (both directories will be packaged in the NxtMint installation archive).

I'll work on Scrypt next.  Sha-256 and Sha-3 don't need a native hash method since they are implemented in the Java runtine where native routines are used already.

Code: [Select]
C:\Work>java -Xmx256m -Djava.library.path="\GitHub\NxtMint\target\aparapi;\GitHub\NxtMint\target\jni" -jar "\GitHub\NxtMint\target\NxtMint-1.2.0.jar"
08:25:10 INFO Main.main: Java Nxt Mint Version 1.2.0
08:25:10 INFO Main.main: Application data path: C:\Users\Ronald\Appdata\Roaming\NxtMint
08:25:10 INFO Main.main: Using Nxt node at scripterron.dyndns.biz:7876
08:25:10 INFO Main.main: Minting 5.000000 units of EGOLD for account NXT-XM86-4ZNA-65L5-CDWUE: 4 CPU threads, 0 GPU intensity
08:25:10 INFO Nxt.init: API node=scripterron.dyndns.biz, API port=7876
08:25:11 INFO HashFunction.<init>: JNI library NxtMint_x86_64 loaded - using native hash routines
08:25:11 INFO MintWorker.run: CPU worker 2 starting
08:25:11 INFO MintWorker.run: CPU worker 1 starting
08:25:11 INFO MintWorker.run: CPU worker 3 starting
08:25:11 INFO MintWorker.run: CPU worker 0 starting
08:25:11 FINE MintWorker.run: Worker 2 starting on counter 222
08:25:11 FINE MintWorker.run: Worker 1 starting on counter 222
08:25:11 FINE MintWorker.run: Worker 0 starting on counter 222
08:25:11 FINE MintWorker.run: Worker 3 starting on counter 222
08:26:11 FINE MintWorker.run: Worker 1: 114.82 MHash, 1.9137 MHash/s
08:26:11 FINE MintWorker.run: Worker 3: 113.25 MHash, 1.8874 MHash/s
08:26:11 FINE MintWorker.run: Worker 2: 113.77 MHash, 1.8962 MHash/s
08:26:11 FINE MintWorker.run: Worker 0: 117.44 MHash, 1.9573 MHash/s
08:27:11 FINE MintWorker.run: Worker 0: 231.21 MHash, 1.9268 MHash/s
08:27:11 FINE MintWorker.run: Worker 1: 229.64 MHash, 1.9137 MHash/s
08:27:11 FINE MintWorker.run: Worker 3: 226.49 MHash, 1.8874 MHash/s
08:27:12 FINE MintWorker.run: Worker 2: 229.11 MHash, 1.9093 MHash/s
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #169 on: January 25, 2015, 02:25:47 am »

A test version of NxtMint is available at https://drive.google.com/open?id=0B1312_6UqRHPX2p3RWZDM0VpaGs&authuser=0.  It has Windows support for native Keccak25 and Scrypt hashing.  The package contains the Aparapi runtime and the NxtMint native library.  You can use the sample .bat or .sh to launch NxtMint.  If you have your own start script, you need to add
    -Djava.library.path="aparapi;jni"
before the -jar option to use the native support.  If you don't want to use the native support on Windows, remove the 'jni' directory from the library path.
Logged

crimi

  • Hero Member
  • *****
  • Karma: +122/-11
  • Offline Offline
  • Posts: 863
    • View Profile
Re: NxtMint Java minter
« Reply #170 on: January 25, 2015, 01:05:44 pm »

A test version of NxtMint is available at https://drive.google.com/open?id=0B1312_6UqRHPX2p3RWZDM0VpaGs&authuser=0.  It has Windows support for native Keccak25 and Scrypt hashing.  The package contains the Aparapi runtime and the NxtMint native library.  You can use the sample .bat or .sh to launch NxtMint.  If you have your own start script, you need to add
    -Djava.library.path="aparapi;jni"
before the -jar option to use the native support.  If you don't want to use the native support on Windows, remove the 'jni' directory from the library path.
Nice.



Both cards have a increase(EGOLD) 1 x 40MH/s & 1 x 10MH/s dont know if that settings are optimal.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #171 on: January 25, 2015, 03:02:27 pm »

Nice.



Both cards have a increase(EGOLD) 1 x 40MH/s & 1 x 10MH/s dont know if that settings are optimal.
The native routines are for CPU hashing (that is, the hash algorithm is implemented in C instead of Java).  If somebody has 32-bit Windows, I'd like to hear if it works for them since I'm compiling on Windows 64-bit and using 32-bit link libraries.  But there could be execution-time problems since I have the 64-bit JDK.

GPU hashing is implemented in OpenCL and the program runs on the graphics card.  There isn't much more that I can do there if I continue to use Aparapi.  Aparapi translates Java code to OpenCL code, which means you don't have access to OpenCL mechanisms that aren't embodied in Java (such as register shuffle, vectorization, etc).  I'm going to look at writing a native OpenCL program and passing it directly to the adapter for execution (Aparapi would no longer be used).
Logged

Hachoir

  • Full Member
  • ***
  • Karma: +12/-13
  • Offline Offline
  • Posts: 113
    • View Profile
Re: NxtMint Java minter
« Reply #172 on: January 25, 2015, 03:51:29 pm »

Tried GPU minting again with version 1.2.0, I get this message now :

Quote
04:46:33 INFO Nxt.init: API node=localhost, API port=7876
04:46:33 SEVERE Main.main: Exception during program initialization
java.lang.IllegalArgumentException: GPU device 0 is not available
        at org.ScripterRon.NxtMint.Main.main(Main.java:282)
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #173 on: January 25, 2015, 07:29:04 pm »

Tried GPU minting again with version 1.2.0, I get this message now :

Quote
04:46:33 INFO Nxt.init: API node=localhost, API port=7876
04:46:33 SEVERE Main.main: Exception during program initialization
java.lang.IllegalArgumentException: GPU device 0 is not available
        at org.ScripterRon.NxtMint.Main.main(Main.java:282)
NxtMint didn't find any GPU devices and gpuIntensity is not 0.  Aparapi detects GPU devices based on the information returned by OpenCL.  It lists the available GPU devices during initialization and they would appear after the Nxt.init message.

Did something change in your system setup?  Or did you have gpuIntensity=0 before?
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #174 on: January 25, 2015, 07:38:43 pm »

I used VirtualBox to set up 64-bit Debian Linux on my Windows 8 system.  So I'll look into generating native libaries for Linux as well as Windows.

Code: [Select]
rwh@debian:~/NxtMint$ Starting NxtMint
02:20:34 INFO Main.main: Java Nxt Mint Version 1.2.0
02:20:34 INFO Main.main: Application data path: /home/rwh/.NxtMint
02:20:34 INFO Main.main: Using Nxt node at scripterron.dyndns.biz:7876
02:20:34 INFO Main.main: Minting 5.000000 units of EGOLD for account NXT-XM86-4ZNA-65L5-CDWUE: 2 CPU threads, 0 GPU intensity
02:20:34 INFO Nxt.init: API node=scripterron.dyndns.biz, API port=7876
02:20:38 INFO MintWorker.run: CPU worker 0 starting
02:20:38 INFO MintWorker.run: CPU worker 1 starting
02:20:38 FINE MintWorker.run: Worker 0 starting on counter 229
02:20:38 FINE MintWorker.run: Worker 1 starting on counter 229
02:21:38 FINE MintWorker.run: Worker 0: 94.37 MHash, 1.5729 MHash/s
02:21:39 FINE MintWorker.run: Worker 1: 94.37 MHash, 1.5729 MHash/s
02:22:38 FINE MintWorker.run: Worker 0: 188.74 MHash, 1.5729 MHash/s
02:22:39 FINE MintWorker.run: Worker 1: 188.74 MHash, 1.5599 MHash/s
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #175 on: January 25, 2015, 09:29:19 pm »

NxtMint native support is working on Debian 64-bit.  The Keccak25 hash rate improved from 1.5MH/s to 2.2MH/s (46%).  This is similar to the improvement under Windows.

Code: [Select]
rwh@debian:~/NxtMint$ Starting NxtMint
04:25:10 INFO Main.main: Java Nxt Mint Version 1.2.0
04:25:10 INFO Main.main: Application data path: /home/rwh/.NxtMint
04:25:10 INFO Main.main: Using Nxt node at scripterron.dyndns.biz:7876
04:25:10 INFO Main.main: Minting 5.000000 units of EGOLD for account NXT-XM86-4ZNA-65L5-CDWUE: 2 CPU threads, 0 GPU intensity
04:25:10 INFO Nxt.init: API node=scripterron.dyndns.biz, API port=7876
04:25:12 INFO HashFunction.<init>: JNI library NxtMint_x86_64 loaded - using native hash routines
04:25:12 INFO MintWorker.run: CPU worker 0 starting
04:25:12 INFO MintWorker.run: CPU worker 1 starting
04:25:12 FINE MintWorker.run: Worker 0 starting on counter 229
04:25:12 FINE MintWorker.run: Worker 1 starting on counter 229
04:26:12 FINE MintWorker.run: Worker 0: 132.12 MHash, 2.2020 MHash/s
04:26:12 FINE MintWorker.run: Worker 1: 132.12 MHash, 2.2020 MHash/s
Logged

qwep4ik

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: NxtMint Java minter
« Reply #176 on: January 26, 2015, 07:28:33 am »

but you can run around the line for miner GPU
Logged

Ziploc

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 11
    • View Profile
Re: NxtMint Java minter
« Reply #177 on: January 26, 2015, 12:09:15 pm »

Hi,

any suggestions for settings and intensity for r9 290 ?

Thx
Logged

Tempest

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 20
    • View Profile
Re: NxtMint Java minter
« Reply #178 on: January 26, 2015, 03:31:13 pm »

Hi,

CPU minting with this Java minter is fine, however,  I have an issue when I enable GPU minting.

I am constantly presented with this Java error, can anybody help?


Thanks :)
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #179 on: January 26, 2015, 04:25:31 pm »

Hi,

CPU minting with this Java minter is fine, however,  I have an issue when I enable GPU minting.

I am constantly presented with this Java error, can anybody help?


Thanks :)
That's a bug.  For now, specify gpuDevice with at least 2 parameters.  For example, gpuDevice=0,256
Logged
Pages: 1 ... 7 8 [9] 10 11 ... 20  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly