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.12.2

Pages: 1 ... 14 15 [16] 17 18 ... 20  All

Author Topic: NxtMint Java minter  (Read 63416 times)

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #300 on: February 04, 2015, 06:32:40 pm »

But can you pinpoint a codechange in the post where i quote a the user also using the 6990? He experienced 1/2 drop in hashrate somewhere in the 1.1.0 releases.

i searched the git, but i could not find a full version history.
You can see the changes by looking at the commits prior to a release.

What we really need to do is profile your card to see where the time is being spent.  But I can't do that since I don't have the card.  It could be something like no hardware support for 64-bit integers resulting in software emulation.  Or maybe a problem with shifting 64-bit integers.  Or perhaps the rotate() built-in function performs poorly on your card.

I read a post in one of the AMD forums which recommended setting the global size to a multiple of the number of stream processors  times 4.  So if you have 1408 stream processors, setting global size to a multiple of 5632 might help.  I'd try gpuDevice=0,64,88 and gpuIntensity=50 and see what you get.  That would give you a global size of 64*88=5632.  You could then try increasing the work group size (64, 128, 256) and the work group count (88, 176, 352, etc).  In order to fully utilize the processors, you want the hash count to be at least as large as the global size.  The hash count for each round is gpuIntensity*1024 and is adjusted by NxtMint so that it is evenly divided by the global size.  For example, for gpuIntensity=10, the hash count is 10240.  If the global size is 5632, the adjusted hash count will be (10240+5631)/5632*5632=11264.  If the hash count is less than the global size, the global size will be reduced to match the hash count and then adjusted to be a multiple of the work group size.  When the hash count is greater than the global size, NxtMint will enqueue the kernel multiple times (the pass count).  So the goal is to keep increasing the global size until the hash rate stabilizes, keeping the hash count high enough to fully utilitize the global size.  The best work group size depends on the individual card.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #301 on: February 04, 2015, 06:59:40 pm »

But can you pinpoint a codechange in the post where i quote a the user also using the 6990? He experienced 1/2 drop in hashrate somewhere in the 1.1.0 releases.

i searched the git, but i could not find a full version history.
I found a research paper showing performance problems on some AMD cards when an atomic operation is included in the program, even if the operation is never performed.  I updated the test version on Google Drive to remove the atomic operation (it opens a race condition but is probably not a problem unless two threads simultaneously solve the target).
Logged

Wolf0

  • Jr. Member
  • **
  • Karma: +7/-0
  • Offline Offline
  • Posts: 97
    • View Profile
Re: NxtMint Java minter
« Reply #302 on: February 04, 2015, 07:01:14 pm »

But can you pinpoint a codechange in the post where i quote a the user also using the 6990? He experienced 1/2 drop in hashrate somewhere in the 1.1.0 releases.

i searched the git, but i could not find a full version history.
I found a research paper showing performance problems on some AMD cards when an atomic operation is included in the program, even if the operation is never performed.  I updated the test version on Google Drive to remove the atomic operation (it opens a race condition but is probably not a problem unless two threads simultaneously solve the target).

Oh, thanks. That reminds me, I removed the done thing and set the solution to zero (also seperated read-only stuff from the output) - the solution should probably be set atomically.
Logged

mnporter2001

  • Full Member
  • ***
  • Karma: +29/-28
  • Offline Offline
  • Posts: 237
    • View Profile
    • BTC Faucet
Re: NxtMint Java minter
« Reply #303 on: February 05, 2015, 10:10:24 am »

Im having some issues

When i click on mint.bat the black window opens for about 2 seconds and then shuts ?

Can some one confirm I have the right files in the right place, and some advice on perhaps where i have gone wrong

Thanks
Mark



dubmannnn

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 16
    • View Profile
Re: NxtMint Java minter
« Reply #304 on: February 05, 2015, 02:31:33 pm »

I was able to pinpoint the codechange and it shows a 1/2 hash droprate at version 55a99116f9db4d64c9ef92393c640140b9587519, this is where SHA256 GPU Support is added.
The previous version runs at ~100MH;S (88c131b16068e752a043e954bf3b14af0af451f6)

Code: [Select]
03:50:00 INFO Main.main: Java Nxt Mint Version 1.0.0_55a99116f9db4d64c9ef92393c640140b9587519
03:50:00 INFO Main.main: Application data path: /home/user/.NxtMint
03:50:00 INFO Main.main: Using Nxt node at localhost:7876
03:50:00 INFO Main.main: Minting 40.000000 units of EGOLD for account NXT-Z4RD-3PZW-RA7Y-4JNUR: 0 CPU threads, 1024 GPU intensity
03:50:00 INFO Nxt.init: API node=localhost, API port=7876
03:50:00 FINE MintWorker.run: Worker 0 starting on counter 40
03:51:00 FINE MintWorker.run: Worker 0: 2,537.55 MHash, 42.2926 MHash/s
03:52:00 FINE MintWorker.run: Worker 0: 5,109.71 MHash, 42.5809 MHash/s

Code: [Select]
Starting NxtMint
03:46:04 INFO Main.main: Java Nxt Mint Version 1.0.0_88
03:46:04 INFO Main.main: Application data path: /home/user/.NxtMint
03:46:04 INFO Main.main: Using Nxt node at localhost:7876
03:46:04 INFO Main.main: Minting 40.000000 units of EGOLD for account NXT-Z4RD-3PZW-RA7Y-4JNUR: 0 CPU threads, 1024 GPU intensity
03:46:04 INFO Nxt.init: API node=localhost, API port=7876
03:46:04 FINE MintWorker.run: Worker 0 starting on counter 40
03:47:04 FINE MintWorker.run: Worker 0: 5,779.75 MHash, 96.33 MHash/s
03:48:04 FINE MintWorker.run: Worker 0: 11,639.19 MHash, 96.99 MHash/s
« Last Edit: February 05, 2015, 02:53:24 pm by dubmannnn »
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #305 on: February 05, 2015, 03:22:35 pm »

I was able to pinpoint the codechange and it shows a 1/2 hash droprate at version 55a99116f9db4d64c9ef92393c640140b9587519, this is where SHA256 GPU Support is added.
The previous version runs at ~100MH;S (88c131b16068e752a043e954bf3b14af0af451f6)

I don't see anything that would change the hash rate.  The only change to GpuKnv25 was in the intensity calculation.  It used to have a hard-coded multiplier of 1024.  This was changed to call the getScale() method, which returns a multiplier of 1024 for GpuKnv25.

If that were the problem, it would affect NVIDIA as well as AMD cards since it is not dependent on the card.  There must be something else, but I'm not seeing it.
Logged

ScripterRon

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

Im having some issues

When i click on mint.bat the black window opens for about 2 seconds and then shuts ?

Can some one confirm I have the right files in the right place, and some advice on perhaps where i have gone wrong

Thanks
Mark

If you didn't change logging.properties, there should be a NxtMint.log file in your temporary directory (%LOCALAPPDATA%\temp)

If you can't find NxtMint.log, open a command window and run mint.bat from there so you can see the console error messages.  Or modify mint.bat and add a line after the java line:
    pause
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #307 on: February 05, 2015, 04:21:47 pm »

I was able to pinpoint the codechange and it shows a 1/2 hash droprate at version 55a99116f9db4d64c9ef92393c640140b9587519, this is where SHA256 GPU Support is added.
The previous version runs at ~100MH;S (88c131b16068e752a043e954bf3b14af0af451f6)

I don't see anything that would change the hash rate.  The only change to GpuKnv25 was in the intensity calculation.  It used to have a hard-coded multiplier of 1024.  This was changed to call the getScale() method, which returns a multiplier of 1024 for GpuKnv25.

If that were the problem, it would affect NVIDIA as well as AMD cards since it is not dependent on the card.  There must be something else, but I'm not seeing it.
The problem might be branch divergence.  This doesn't seem to bother NVIDIA but it is a problem for AMD.  Try the test version of Nxt-1.4.0 on Google Drive and see how it goes. 

https://drive.google.com/open?id=0B1312_6UqRHPS3JZQUFDQUNTSEU&authuser=0
Logged

mnporter2001

  • Full Member
  • ***
  • Karma: +29/-28
  • Offline Offline
  • Posts: 237
    • View Profile
    • BTC Faucet
Re: NxtMint Java minter
« Reply #308 on: February 05, 2015, 04:52:23 pm »

Im having some issues

When i click on mint.bat the black window opens for about 2 seconds and then shuts ?

Can some one confirm I have the right files in the right place, and some advice on perhaps where i have gone wrong

Thanks
Mark

If you didn't change logging.properties, there should be a NxtMint.log file in your temporary directory (%LOCALAPPDATA%\temp)

If you can't find NxtMint.log, open a command window and run mint.bat from there so you can see the console error messages.  Or modify mint.bat and add a line after the java line:
    pause

This is what it says


04:45:14 SEVERE Main.main: Exception during program initialization
java.lang.IllegalArgumentException: Secret phrase not specified
   at org.ScripterRon.NxtMint.Main.main(Main.java:205)


Its odd as the secret phrase is there in the NxtMint.conf inside the appdata/roaming/nxtmint folder ?

Your help is appreciated and i would really like to get this working

Thanks
Mark

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #309 on: February 05, 2015, 05:04:50 pm »

This is what it says


04:45:14 SEVERE Main.main: Exception during program initialization
java.lang.IllegalArgumentException: Secret phrase not specified
   at org.ScripterRon.NxtMint.Main.main(Main.java:205)


Its odd as the secret phrase is there in the NxtMint.conf inside the appdata/roaming/nxtmint folder ?

Your help is appreciated and i would really like to get this working

Thanks
Mark
I don't know.  Either the secretphrase keyword is mispelled or NxtMint isn't seeing the file.  NxtMint should have displayed the application data path when it started - make sure it is correct.

Make sure that secretPhrase is not specified multiple times and that it is all on one line:
    secretPhrase=My Very Secret Phrase

Try forcing an exception by specifying 'cpuThreads=1X'.  This will cause a number format exception while reading NxtMint.conf.  If you get the exception, then NxtMint.conf is seeing the file.

Are there special characters in your secret phrase?  NxtMint reads the configuration file using the local character set, so that shouldn't be a problem unless the Windows character set doesn't match your editor character set.

It could also be a Unix vs Windows problem.  I use Notepad++ which handles NL<->CR/LF automatically.  I took a look at sample.NxtMint.conf using Notepad and it is in Unix format (NL instead of CR/LF).  Was everything on a single line when your edited the file?  I'll add a step to the package script to ensure that Windows text files have CR/LF in the future.
« Last Edit: February 05, 2015, 05:20:57 pm by ScripterRon »
Logged

mnporter2001

  • Full Member
  • ***
  • Karma: +29/-28
  • Offline Offline
  • Posts: 237
    • View Profile
    • BTC Faucet
Re: NxtMint Java minter
« Reply #310 on: February 05, 2015, 05:22:44 pm »

Ive just double checked everything and it all looks as it should according to the read me file.

And my secret phrase is the 12 word nxt compiled one

My mint.bat file is this :
Code: [Select]
@REM Start NxtMint

@REM ###################################################
@REM # Rename to mint.bat and make any desired changes #
@REM ###################################################

@echo Starting NxtMint
java -Xmx256m -Djava.library.path="jni" -jar NxtMint-1.4.0.jar


Does that look correct, I'm at a loss as the secret phrase is defo there and I dont understand why its telling me it isn't

Cheers
Mark

dubmannnn

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 16
    • View Profile
Re: NxtMint Java minter
« Reply #311 on: February 05, 2015, 05:59:55 pm »

HI,

This improved the hashrate of 1.4.0 a bit :

Code: [Select]
Starting NxtMint
06:56:44 INFO Main.main: Java Nxt Mint Version 1.4.0
06:56:44 INFO Main.main: Application data path: /home/user/.NxtMint
06:56:44 INFO Main.main: Using Nxt node at localhost:7876
06:56:44 INFO Main.main: Minting 40.000000 units of EGOLD for account NXT-Z4RD-3PZW-RA7Y-4JNUR: 0 CPU threads, 70 GPU intensity
06:56:44 INFO Nxt.init: API node=localhost, API port=7876
06:56:45 INFO Main.buildGpuList: GPU device 0: Cayman, Driver 1573.4 (VM)
  1904MB global memory, 32KB local memory, 24 compute units, Max work group size 256
06:56:45 INFO Main.buildGpuList: GPU device 1: Cayman, Driver 1573.4 (VM)
  1953MB global memory, 32KB local memory, 24 compute units, Max work group size 256
06:56:45 INFO HashFunction.<init>: JNI library NxtMint_x86 loaded - using native CPU hash routines
06:56:45 FINE GpuKnv25.<init>: GPU 0: Local size 128, Global size 71680, Passes 1
06:56:45 INFO MintWorker.run: GPU worker 0 starting on GPU 0
06:56:45 FINE GpuKnv25.<init>: GPU 1: Local size 128, Global size 71680, Passes 1
06:56:45 INFO MintWorker.run: GPU worker 1 starting on GPU 1
06:56:45 FINE MintWorker.run: Worker 1 starting on counter 40
06:56:45 FINE MintWorker.run: Worker 0 starting on counter 40
06:57:45 FINE MintWorker.run: Worker 0: 420.47 MHash, 7.0079 MHash/s
06:57:45 FINE MintWorker.run: Worker 1: 424.92 MHash, 7.0820 MHash/s

It maxes out with these settings:
Code: [Select]
#######################################
# NxtMint configuration               #
#                                     #
# Copy to the NxtMint data directory, #
# rename to NxtMint.conf and edit for #
# your configuration                  #
#######################################

# Set the Nxt node host as a DNS name or an IP address
connect=localhost

# Set the API port (the default is 7876)
apiPort=7876

# Set the secret phrase for the minting account (required field)
secretPhrase=

# Set the 3-5 character currency code (required field)
currency=EGOLD

# Set the number of units to generate for each hash round (the default is 1).
units=40

# Set the CPU thread count (the default is 1).  CPU minting will not be done
# if cpuThreads=0.
cpuThreads=0

# Set the GPU intensity (the default is 0).  GPU minting will not be done
# if gpuIntensity=0.
gpuIntensity=70

# Set the GPU device number (0, 1, 2, ...), the work group size and the work group count.
# The first GPU device will be used if this parameter is omitted.  This parameter can
# be repeated to use multiple GPU devices.  The GPU devices that are available are
# listed when NxtMint is started with a non-zero value for gpuIntensity.
gpuDevice=0,128,960
gpuDevice=1,128,960
# Enable/Disable the GUI (the default is true)
enableGUI=false
Logged

mnporter2001

  • Full Member
  • ***
  • Karma: +29/-28
  • Offline Offline
  • Posts: 237
    • View Profile
    • BTC Faucet
Re: NxtMint Java minter
« Reply #312 on: February 05, 2015, 06:27:00 pm »

My bad and I feel like a right dick lol

I had my config file saved as NxtMint.conf.conf

Thanks for the help though :)

Cheers
Mark

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #313 on: February 05, 2015, 06:47:19 pm »

HI,

This improved the hashrate of 1.4.0 a bit :

So it went from 2.5 MH/s to 7.0 MH/s? 

That just leaves register assignments.  From what I have read, AMD has a register file (usually 16KB per compute unit) which is divided into 16-byte blocks (128 bits) for a total of 1024 register blocks.  All of the processors in a compute unit share this register file, so the more work items in a work group, the fewer registers available to a given work item.  So, if the work group size is 64, there are 1024/64=16 register blocks per work item.  Keccak25 uses 25 state variables and 14 work variables.  Each variable is 64 bits, so there are 2 variables per register block for a total of 32 registers per work item.  As you can see, this is not enough for Keccak25 and the extra variables are stored in memory (which reduces throughput drastically).  It gets even worse if you increase the work group size to 128 since there are now just 8 register blocks per work item.

This is all subject to scheduling on the card, so the actual number of reigster blocks available can be more.

I also wonder if using a built-in function on AMD causes problems.  I was able to more than double the hash rate on my NVIDIA card by using the rotate() built-in function.  This allows the compiler to take advantage of the hardware rotate instruction if it is available.  But this might cause AMD problems if there is no hardware rotate instruction (I don't know what code is generated by the compiler for the emulation).  I put together a version with the rotate() and see what it does for you.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #314 on: February 05, 2015, 06:48:48 pm »

My bad and I feel like a right dick lol

I had my config file saved as NxtMint.conf.conf

Thanks for the help though :)

Cheers
Mark
One of the first things I do on a new system is tell Windows to stop hiding file extensions :)
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #315 on: February 05, 2015, 06:57:21 pm »

OK - a test version of NxtMint is on Google Drive with the rotate() built-in replaced with shifts.  If that improves performance, I can check the platform name for AMD or NVIDIA and then compile the OpenCL program with the appropriate -D option.  Not using rotate() definitely hurts on NVIDIA (hash rate dropped from 35 to 17).  Or maybe just make it a configuration option since some AMD cards might benefit from using rotate() instead of explicit shifts.
Logged

dubmannnn

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 16
    • View Profile
Re: NxtMint Java minter
« Reply #316 on: February 06, 2015, 09:17:50 am »

This looks promising, first test @ 60MH/S.
I will see how I can tweak the settings.

EDIT:

Runs at a healty 70MH/S per GPU

Code: [Select]
# if gpuIntensity=0.
gpuIntensity=45

# Set the GPU device number (0, 1, 2, ...), the work group size and the work group count.
# The first GPU device will be used if this parameter is omitted.  This parameter can
# be repeated to use multiple GPU devices.  The GPU devices that are available are
# listed when NxtMint is started with a non-zero value for gpuIntensity.
gpuDevice=0,64,960
gpuDevice=1,64,960
« Last Edit: February 06, 2015, 10:43:48 am by dubmannnn »
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #317 on: February 06, 2015, 02:51:12 pm »

This looks promising, first test @ 60MH/S.
I will see how I can tweak the settings.

EDIT:

Runs at a healty 70MH/S per GPU
70 MH/s per GPU sounds like an improvement over the best rate you were previously getting (I think it was 43 MH/s).  So NxtMint 1.5.0 should be an improvement for everybody now.

I'll check for NVIDIA in the platform name.  If found, I'll use the built-in rotate() function.  Otherwise, I'll use shift operations to perform the rotate.
Logged

ptah

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 3
    • View Profile
Re: NxtMint Java minter
« Reply #318 on: February 06, 2015, 03:05:39 pm »

Great improvement for me :
5970 - 2 x 87MH/s
6970 - 92MH/s
THX
« Last Edit: February 06, 2015, 03:15:37 pm by ptah »
Logged

dubmannnn

  • Jr. Member
  • **
  • Karma: +0/-0
  • Offline Offline
  • Posts: 16
    • View Profile
Re: NxtMint Java minter
« Reply #319 on: February 06, 2015, 03:17:47 pm »

Which settings are you running?

Great improvement for me :
5970 - 2 x 87MH/s
6970 - 92MH/s
THX
Logged
Pages: 1 ... 14 15 [16] 17 18 ... 20  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly