Code Monkey home page Code Monkey logo

benchmark's People

Contributors

obriensystems avatar

Watchers

 avatar

benchmark's Issues

Java 17 periodic exception - 13900a

Computing...281474976710656
S: 68807943407 M: 82341648902022834004 P: 553 T: 114247
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000001cf87c2696c, pid=3296, tid=29556
#
# JRE version: Java(TM) SE Runtime Environment (17.0.7+8) (build 17.0.7+8-LTS-224)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.7+8-LTS-224, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# J 371% c2 org.obrienscience.collatz.model.Collatz.computeRange()V (263 bytes) @ 0x000001cf87c2696c [0x000001cf87c25ce0+0x0000000000000c8c]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\wse_github\obrienlabs\benchmark\org.obrienscience.concurrent.CollatzBeowulfSE\hs_err_pid3296.log
Compiled method (c2)  247678  371 %     4       org.obrienscience.collatz.model.Collatz::computeRange @ 86 (263 bytes)
 total in heap  [0x000001cf87c25910,0x000001cf87c2dc30] = 33568
 relocation     [0x000001cf87c25a68,0x000001cf87c25cd8] = 624
 main code      [0x000001cf87c25ce0,0x000001cf87c2aaa0] = 19904
 stub code      [0x000001cf87c2aaa0,0x000001cf87c2ab60] = 192
 oops           [0x000001cf87c2ab60,0x000001cf87c2abc0] = 96
 metadata       [0x000001cf87c2abc0,0x000001cf87c2ad58] = 408
 scopes data    [0x000001cf87c2ad58,0x000001cf87c2ce50] = 8440
 scopes pcs     [0x000001cf87c2ce50,0x000001cf87c2d870] = 2592
 dependencies   [0x000001cf87c2d870,0x000001cf87c2d8a8] = 56
 handler table  [0x000001cf87c2d8a8,0x000001cf87c2db30] = 648
 nul chk table  [0x000001cf87c2db30,0x000001cf87c2dc30] = 256
Compiled method (c2)  247685  371 %     4       org.obrienscience.collatz.model.Collatz::computeRange @ 86 (263 bytes)
 total in heap  [0x000001cf87c25910,0x000001cf87c2dc30] = 33568
 relocation     [0x000001cf87c25a68,0x000001cf87c25cd8] = 624
 main code      [0x000001cf87c25ce0,0x000001cf87c2aaa0] = 19904
 stub code      [0x000001cf87c2aaa0,0x000001cf87c2ab60] = 192
 oops           [0x000001cf87c2ab60,0x000001cf87c2abc0] = 96
 metadata       [0x000001cf87c2abc0,0x000001cf87c2ad58] = 408
 scopes data    [0x000001cf87c2ad58,0x000001cf87c2ce50] = 8440
 scopes pcs     [0x000001cf87c2ce50,0x000001cf87c2d870] = 2592
 dependencies   [0x000001cf87c2d870,0x000001cf87c2d8a8] = 56
 handler table  [0x000001cf87c2d8a8,0x000001cf87c2db30] = 648
 nul chk table  [0x000001cf87c2db30,0x000001cf87c2dc30] = 256
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
(base)
micha@13900a MINGW64 /c/wse_github/obrienlabs/benchmark/org.obrienscience.concurrent.CollatzBeowulfSE (master)
$ java -version
java version "17.0.7" 2023-04-18 LTS
Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing)

Collatz on Google Cloud Functions - Java 17

see:
https://console.cloud.google.com/functions/details/us-central1/eventstream-in?env=gen2&project=eventstream-dev

package gcfv2;

import java.io.BufferedWriter;
import java.math.BigInteger;

import com.google.cloud.functions.HttpFunction;
import com.google.cloud.functions.HttpRequest;
import com.google.cloud.functions.HttpResponse;

public class HelloHttpFunction implements HttpFunction {
  public static long counter = 0;
  public static final BigInteger COLLATZ_2651 = new  BigInteger("2367363789863971985761"); 
 
 	private BigInteger path = BigInteger.ZERO;
	private BigInteger height = BigInteger.ZERO;

 public void compute(BigInteger start) {

 }

	private void computeSingleThreaded(BufferedWriter writer, BigInteger start) throws Exception {
		BigInteger current = start;
		long startTime = System.currentTimeMillis();
		while (current.compareTo(BigInteger.ONE) > 0) {
			// odd integers follow
			if(current.testBit(0)) {
				current = current.shiftLeft(1).add(current).add(BigInteger.ONE);
			} else {
				current = current.shiftRight(1);
			}
			path = path.add(BigInteger.ONE);
			if(current.compareTo(height) > 0) {
				height = current;
			}
			//if(displayIterations) {
				//System.out.println(start + "," + current + "," + path + "," + height);
			//}
		}
		long time = System.currentTimeMillis() - startTime;
		//System.out.println("start,path,max,ms");
		writer.write(start + "," + path + "," + height + "," + time);
	}
 public void service(final HttpRequest request, final HttpResponse response) throws Exception {
   final BufferedWriter writer = response.getWriter();
   counter++;
   //writer.write("Count: " + counter);
   BigInteger start =  COLLATZ_2651;//BigInteger.valueOf(27);
   computeSingleThreaded(writer, start);

  
 }
}

Screen Shot 2022-11-05 at 22 47 18

Screen Shot 2022-11-05 at 22 46 49

Screen Shot 2022-11-05 at 22 52 33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.