Design Rush is a B2B Marketplace Connecting Businesses with Agencies facilitating amongst other things software poc
April 11, 2023
April 30, 2017
A Nonsense Kotlin app that uses all the language features
This is a Kotlin app that uses Kotlin language features, as
I discover them. This might be an extended post.
package com.example.regan.myapplication import android.os.Bundle import android.support.design.widget.FloatingActionButton import android.support.design.widget.Snackbar import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.view.View import android.view.Menu import android.view.MenuItem class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val toolbar = findViewById(R.id.toolbar) as Toolbar setSupportActionBar(toolbar) val fab = findViewById(R.id.fab) as FloatingActionButton fab.setOnClickListener { view -> Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show() } } override fun onCreateOptionsMenu(menu: Menu): Boolean { // Inflate the menu; this adds items to the action bar if it is present. menuInflater.inflate(R.menu.menu_main, menu) return true } override fun onOptionsItemSelected(item: MenuItem): Boolean { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. val id = item.itemId if (id == R.id.action_settings) { return true } return super.onOptionsItemSelected(item) } } class kotlinTest { // val is like let in swift or const in C++ // var is mutable // function without braces. fun sum(a: Int, b: Int) = a + b // Unit is like void return type. ${ } is like \( ) in swift. fun printSum(a: Int, b: Int): Unit { println("sum of $a and $b is ${a + b}") } fun temp() { // String templates var a = 1 // simple name in template: val s1 = "a is $a" a = 2 // arbitrary expression in template: val s2 = "${s1.replace("is", "was")}, but now is $a" } // Using if as an expression: soft of like ?; in Objective-C (?) fun maxOf(a: Int, b: Int) = if (a > b) a else b fun getStringLength(obj: Any): Int? { if (obj is String) { // `obj` is automatically cast to `String` in this branch return obj.length } // `obj` is still of type `Any` outside of the type-checked branch return null } // functions can return optionals. Like swift optionals. fun parseInt(str: String): Int? { // ... // For loop on each item.. val items = listOf("apple", "banana", "kiwi") for (item in items) { println(item) } // For loop on indexes for (index in items.indices) { println("item at $index is ${items[index]}") } // while loop like other langauges var index = 0 while (index < items.size) { println("item at $index is ${items[index]}") index++ } return null } fun describe(obj: Any): String = when (obj) { 1-> "One" "Hello" -> "Greeting" is Long -> "Long" !is String -> "Not a string" else -> "Unknown" }
fun xyz() { // iteration over a range for (x in 1..5) { print(x) } for (x in 9 downTo 0 step 3) { print(x) } // Lambda expressions over val fruits = listOf("apple", "banana", "kiwi") fruits .filter { it.startsWith("a") } .sortedBy { it } .map { it.toUpperCase() } .forEach { println(it) } // Filtering a list val list = listOf<Int>( 0, 1, 2, 3, 4 ,5 ) val positives = list.filter { x -> x > 0 } var hijk = null when (hijk) { is Int -> print( "int" ) is String -> print( "String" ) else -> { print("unknown") } } // map.. var map = mapOf("a" to 1, "b" to 2, "c" to 3) val value = 0 println(map["key"]) // map["key"] = value // val p: String by lazy { // // compute the string // // } // class File { } // val files = File("Test").listFiles() // println(files?.size ?: "empty") fun test() { val result = try { // count1() } catch (e: ArithmeticException) { throw IllegalStateException(e) } // Working with result } fun count1() { } // If expression, result gets whichever string.. fun foo(param: Int) { val result = if (param == 1) { "one" } else if (param == 2) { "two" } else { "three" } } } // Singletons object Resource { val name = "Name" }
}
January 16, 2017
Git Http(s): Proxy setting
Command to use:
git config –global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
change proxyuser to your proxy user
change proxypwd to your proxy password
change proxy.server.com to the URL of your proxy server
change 8080 to the proxy port configured on your proxy server
If you decide at any time to reset this proxy and work without proxy:
Command to use:
git config –global –unset http.proxy
Finally, to check the currently set proxy:
git config –global –get http.proxy
December 26, 2016
By-passing NUMAlink security
There was a time that certain types of equipment had extreme export controls. Defence categorized certain equipment as threat to national security if it was in the wrong hands. Some equipment such as what is required to run a small reactor was illegal to export and had hardware chip level security to prevent configurations appearing in parts of the world that was not desired.
In super computing systems the architecture that was all the rage for a few years in the 1990s was the hyper cube.
The top500.org web site lists almost everything these days as a variation of crossbar switch.
One variation of crossbar switch is cache coherent Nonuniform Universal Memory Access or “ccNUMA”.
The crossbar functionality a “r-brick” is very similar to that of a NUMALink module. However the export restrictions meant that configuring these type of systems had chip level security that made life difficult.
Using unsupported configurations required either a work around using a L2 controller or better yet hardware hacking and replacing chips.
You would get an error message like:
Actions getting around this
L1001231-001-L2>ver L2 version: 1.36.0 L1001231-001-L2>serial L2 system serial number: L1001231. L1001231-001-L2> L1001231-001-L2>1.25 l1 entering L1 mode 001r25, to escape to L2 001r25-L1>ver L1 1.40.4 (Image B), Built 09/29/2005 13:42:59 [Base 1MB image] 001r25-L1>serial all Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM L1001241 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM MHR829 Reference Brick Serial Number NVRAM MHR829 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ------------- -------------------- --- ------ POWER RPWR MHR829 030_1631_002 E 00 LOGIC ROUTER LGP402 030_1634_002 B 00 001r25-L1> L1001231-001-L2>reboot_l2 will reboot in 5 seconds... INIT: Switching to runlevel: 6 Sending processes the TERM signal Restartinÿ Validating L2 Controller Flash image....OK Booting... Ethernet address from Motorola VPD EEPROM is 08:00:69:11:B1:77 Linux/PPC load: Uncompressing Linux...done. Now booting the kernel Linux version 2.4.7-sgil2 (dsd@tstorm) (gcc version 2.95.2 19991030 (2.95.3 prerelease/franzo)) #1 Mon Feb 28 14:51:03 CST 2005 On node 0 totalpages: 4096 zone(0): 4096 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: root=/dev/ram panic=5 Decrementer Frequency = 187500000/60 Calibrating delay loop... 49.76 BogoMIPS Memory: 11904k available (952k kernel code, 512k data, 180k init, 0k highmem) Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes) Inode-cache hash table entries: 1024 (order: 1, 8192 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 4096 (order: 2, 16384 bytes) POSIX conformance testing by UNIFIX PCI: Probing PCI hardware I/O resource not set for host bridge 0 Memory resource not set for host bridge 0 PCI: Cannot allocate resource region 0 of PCI bridge 0 PCI: resource is 80000000..7fffffff (100), parent c011c314 PCI:00:04.0: Resource 0: c0000000-c0000fff (f=200) PCI:00:05.0: Resource 0: c0001000-c0001fff (f=200) Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Starting kswapd v1.8 i2c-core.o: i2c core module i2c-dev.o: i2c /dev entries driver module i2c-core.o: driver i2c-dev dummy driver registered. i2c-algo-8xx.o: i2c mpc8xx algorithm module i2c-rpx.o: i2c RPX Lite/MBX module i2c-dev.o: Registered 'rpx' as minor 0 i2c-core.o: adapter rpx registered as adapter 0. Console: switching to frame buffer device fb0: SGI L2 (SED137x LCD controller) frame buffer device fb0: Display panel [mono]: Hantronix HDM3224 (320x240, 4-bit Greyscale) CPM UART driver version 0.03 ttyS00 at 0x0000 is a SCC ttyS01 at 0x0100 is a SCC ttyS02 at 0x0200 is a SCC ttyS03 at 0x0300 is a SCC WDT_8xx: Software Watchdog Timer version 0.3, 30 second timeout block: queued sectors max/low 7810kB/2603kB, 64 slots per queue RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize eth0: FEC ENET Version 0.1, 08:fec: Phy @ 0x0, type 0x78100003 fec: link down 00:fec: 10 Mbps, Half-Duplex 69:11:b1:77 PowerPC realtime clock driver, version 0.1. usb.c: registered new driver usbdevfs usb.c: registered new driver hub PCI: Enabling device 00:04.0 (0000 -> 0002) usb-ohci.c: USB OHCI at membase 0xc2002000, IRQ 8 usb-ohci.c: usb-00:04.0, PCI device 11c1:5802 (Lucent Microelectronics) usb.c: new USB bus registered, assigned bus number 1 Product: USB OHCI Root Hub SerialNumber: c2002000 hub.c: USB hub found hub.c: 2 ports detected PCI: Enabling device 00:05.0 (0000 -> 0002) usb-ohci.c: USB OHCI at membase 0xc2004000, IRQ 10 usb-ohci.c: usb-00:05.0, PCI device 11c1:5802 (Lucent Microelectronics) usb.c: new USB bus registered, assigned bus number 2 Product: USB OHCI Root Hub SerialNumber: c2004000 hub.c: USB hub found hub.c: 2 ports detected usb-ohci.c: v5.2:USB OHCI Host Controller Driver usb.c: registered new driver sgil1 usb.c: registered new driver sgil1 usb.c: registered new driver sgil1 sgil1.c: SGI L1 controller support registered NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 1024 bind 1024) NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. RAMDISK: cramfs filesystem found at block 0 RAMDISK: overriding ramdisk block size to 4096 for cramfs filesystem RAMDISK: Loading 2012 blocks [1 disk] into ram disk... done. Freeing initrd memory: 2012k freed VFS: Mounted root (cramfs filesystem). Freeing unused kernel memory: 180k init INIT: version 2.77 booting cp: /rhosts.allow: No such file or directory Starting DHCP client daemon.... hub.c: USB new device connect on bus1/1, assigned device number 2 Manufacturer: Silicon Graphics, Inc. Product: SN1 L1 System Controller SerialNumber: 00000000 sgil1.c: SGI L1 connected, minor: 64 device: 1.2 hub.c: USB new device connect on bus1/2, assigned device number 3 hub.c: USB hub found hub.c: 7 ports detected hub.c: USB new device connect on bus1/2/1, assigned device number 4 Manufacturer: Silicon Graphics, Inc. Product: SN1 L1 System Controller SerialNumber: 00000000 sgil1.c: SGI L1 connected, minor: 65 device: 1.4 hub.c: USB new device connect on bus1/2/2, assigned device number 5 usb.c: USB device not accepting new address=5 (error=-110) hub.c: USB new device connect on bus1/2/2, assigned device number 6 usb.c: USB device not accepting new address=6 (error=-110) hub.c: USB new device connect on bus1/2/4, assigned device number 7 Manufacturer: Silicon Graphics, Inc. Product: SN1 L1 System Controller SerialNumber: 00000000 sgil1.c: SGI L1 connected, minor: 66 device: 1.7 hub.c: USB new device connect on bus1/2/5, assigned device number 8 Manufacturer: Silicon Graphics, Inc. Product: SN1 L1 System Controller SerialNumber: 00000000 sgil1.c: SGI L1 connected, minor: 67 device: 1.8 dhcpcd[28]: timed out waiting for a valid DHCP server response INFO: No DHCP server found, starting local DHCP server (to serve L3 clients). INFO: DHCP: new IP address is 10.17.177.119 INIT: Entering runlevel: 5 SGI L2 Controller Current L2 version: 1.36.0 (L2 emulator: 1.36.0) Flashed L2 version: 1.36.0 INFO: opened USB control /dev/sgil1_cs INFO: opened USB device at b1;p1;d2 (/dev/sgil1_0) INFO: opened USB device at b1;p2/1;d4 (/dev/sgil1_1) INFO: opened USB device at b1;p2/4;d7 (/dev/sgil1_2) INFO: opened USB device at b1;p2/5;d8 (/dev/sgil1_3) INFO: SMP listening on port: 8001 INFO: attempting connection to localhost:9002 INFO: auto power up appears enabled INFO: attempting connection to localhost:9002 INFO: auto power up in 30 seconds... L1001231-001-L2>INFO: Validating connection from 'localhost' (127.0.0.1) INFO: connection to localhost:9002 established. INFO: Validating connection from 'localhost' (127.0.0.1) INFO: connection to localhost:9002 established. INFO: Connection - sgi (sgi) @ localhost running 'l2flash'. INFO: Connection - sgi (sgi) @ localhost running 'l2gui'. INFO: attempting connection to localhost:9002 INFO: Validating connection from 'localhost' (127.0.0.1) INFO: connection to localhost:9002 established. INFO: Connection - sgi (sgi) @ localhost running 'l2part'. INFO: auto power up in 25 seconds... INFO: auto power up in 20 seconds... INFO: auto power up in 15 seconds... INFO: auto power up in 10 seconds... INFO: auto power up in 5 seconds... INFO: initiating auto power up. ERROR: auto power up error. 001r25ERROR: SerNum:System Serial Number mismatch. See log for details. 001c01ERROR: SerNum:System Serial Number mismatch. See log for details. 001c02ERROR: SerNum:System Serial Number mismatch. See log for details. 001c03ERROR: SerNum:System Serial Number mismatch. See log for details. 001c01ERROR: power appears off. 001c02ERROR: power appears off. 001c03ERROR: power appears off. 001r25ERROR: power appears off. L1001231-001-L2>serial all 001c01: Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM M2001411 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM KJD687 Reference Brick Serial Number NVRAM KJD687 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ------------- -------------------- --- ------ NODE IP45_4CPU KJD687 030_1797_001 B 00 IO8 IO8 MHL579 030_1673_003 E 00 EEPROM JEDEC-SPD Info Part Number Rev Speed SGI ---------- ------------------------ ------------------ ---- ------ -------- DIMM 0 CE0000000000000026051400 M3 46L2820BT1-CA0 0B 8.0 N/A DIMM 2 CE000000000000000C7D8000 M3 46L2820DT2-CA0 2D 10.0 N/A DIMM 1 7F7FFE000000000012000092 CM2201B 2 8.0 N/A DIMM 3 7F7FFE000000000012000151 CM2201B 2 8.0 N/A 001c02: Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM M2001411 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM MLJ194 Reference Brick Serial Number NVRAM MLJ194 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ---------- -------------------- --- ------ NODE IP45_4CPU MLJ194 030_1779_001 C 00 IO8 IO8 MLG164 030_1673_003 F 00 EEPROM JEDEC Info Part Number Rev Speed (ns) ---------- ------------------------ ------------------ --- ---------- DIMM 0 7F7FFE000000000012000145 CM2201B 2 08.0 DIMM 2 7F7FFE000000000012000141 CM2201B 2 08.0 DIMM 1 CE0000000000000026061400 M3 46L2820BT1-CA0 0B 08.0 DIMM 3 CE000000000000000C698000 M3 46L2820DT2-CA0 2D 10.0 001c03: Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM M2100226 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM MJN491 Reference Brick Serial Number NVRAM MJN491 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ---------- -------------------- --- ------ NODE IP45_4CPU MJN491 030_1728_002 D 00 IO8 IO8 MHR530 030_1673_003 F 00 EEPROM JEDEC Info Part Number Rev ---------- ------------------------ ------------------ --- DIMM 0 10000000000000002E015A00 444BH 2 DIMM 2 100000000000000034015A00 444BH 2 DIMM 1 10000000000000006E005A00 444BH 2 DIMM 3 10000000000000000A015A00 444BH 2 001r25: Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM L1001241 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM MHR829 Reference Brick Serial Number NVRAM MHR829 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ------------- -------------------- --- ------ POWER RPWR MHR829 030_1631_002 E 00 LOGIC ROUTER LGP402 030_1634_002 B 00 L1001231-001-L2> L1001231-001-L2> 1.1 l1 entering L1 mode 001c01, to escape to L2 001c01-L1>serial all Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM M2001411 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM KJD687 Reference Brick Serial Number NVRAM KJD687 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ------------- -------------------- --- ------ NODE IP45_4CPU KJD687 030_1797_001 B 00 IO8 IO8 MHL579 030_1673_003 E 00 EEPROM JEDEC-SPD Info Part Number Rev Speed SGI ---------- ------------------------ ------------------ ---- ------ -------- DIMM 0 CE0000000000000026051400 M3 46L2820BT1-CA0 0B 8.0 N/A DIMM 2 CE000000000000000C7D8000 M3 46L2820DT2-CA0 2D 10.0 N/A DIMM 1 7F7FFE000000000012000092 CM2201B 2 8.0 N/A DIMM 3 7F7FFE000000000012000151 CM2201B 2 8.0 N/A 001c01-L1>ver L1 1.30.14 (Image B), Built 08/05/2004 11:09:57 [Base 1MB image] 001c01-L1> L1001231-001-L2>1.2 l1 entering L1 mode 001c02, to escape to L2 001c02-L1>serial all Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM M2001411 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM MLJ194 Reference Brick Serial Number NVRAM MLJ194 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ---------- -------------------- --- ------ NODE IP45_4CPU MLJ194 030_1779_001 C 00 IO8 IO8 MLG164 030_1673_003 F 00 EEPROM JEDEC Info Part Number Rev Speed (ns) ---------- ------------------------ ------------------ --- ---------- DIMM 0 7F7FFE000000000012000145 CM2201B 2 08.0 DIMM 2 7F7FFE000000000012000141 CM2201B 2 08.0 DIMM 1 CE0000000000000026061400 M3 46L2820BT1-CA0 0B 08.0 DIMM 3 CE000000000000000C698000 M3 46L2820DT2-CA0 2D 10.0 001c02-L1>ver L1 1.12.6 (Image B), Built 04/22/2002 08:13:40 [1MB image] 001c02-L1> L1001231-001-L2>1.3 l1 entering L1 mode 001c03, to escape to L2 001c03-L1>serial all Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM M2100226 Reference System Serial Number Attached L2 L1001231 Local Brick Serial Number EEPROM MJN491 Reference Brick Serial Number NVRAM MJN491 EEPROM Product Name Serial Part Number Rev T/W ---------- -------------- ---------- -------------------- --- ------ NODE IP45_4CPU MJN491 030_1728_002 D 00 IO8 IO8 MHR530 030_1673_003 F 00 EEPROM JEDEC Info Part Number Rev ---------- ------------------------ ------------------ --- DIMM 0 10000000000000002E015A00 444BH 2 DIMM 2 100000000000000034015A00 444BH 2 DIMM 1 10000000000000006E005A00 444BH 2 DIMM 3 10000000000000000A015A00 444BH 2 001c03-L1>ver L1 1.8.4 (Image B), Built 10/30/2001 11:47:34 [P1 support] 001c03-L1>
Resolution
You can’t set a serial number with the prefix ‘L’ on an O300
L2 command processor engaged, for console mode. L1001231-001-L2>1.1 l1 entering L1 mode 001c01, to escape to L2 serial clear 001c01-L1>serial BSN: KJD687 SSN: L0000000 Time: 06/04/2009 08:14:15 CDT 001c01-L1> 001c01-L1> 001c01-L1>serial clear 001c01-L1> 001c01-L1> 001c01-L1>001c01 INFO: System serial number reassigned to Mxxxxxx from attached L2.
Advice received
You’ll want to get all of your L1s (and PROMs if they’re not) at the same version after you get
everything talking, it’ll save you some headaches in the longrun. I’m at 1.22.4 on everything except
the L2 (which is 1.32.4) and it’s been working flawlessly (and no, it didn’t enable security on my O300s
and I’m still able to do a “serial clear” from the L1 successfully). To be safe though, get them
connected together first.
Oh, btw…the easiest way to get the serials on your O300s in sync is to set the L2 to one they can set
(prefix ‘M’) then do a ‘serial clear’ on each O300…if everything is wired properly it should pick up
the serial from the L2 Controller automagically.
I used Mxxxxxx for L2 and cleared the Origin300s…
The router brick is a no go…
1.25 serial clear
001r25:
INFO: command not supported on bricks that enforce security.
Mxxxxxxx-001-L2>
A really crappy work around…
unplug the USB on the router brick..
Power up the router brick at the back.
push the button on the front
Reconnect the USB cable at the back..
connect to the l1 on the router brick.
flash default a reboot_l1 escape back to the l2 1.1 reset 1.2 reset 1.3 reset ....and... ***Warning: Board in module 001c01 is missing or disabled It previously contained a New Type board, barcode laser 0 ***Warning: Found a new IP35 board in module 001c03, serial MJN491 Please use the 'update' command from the PROM Monitor to update the inventory ***Warning: Found a new IBRICK board in module 001c03, serial MHR530 Please use the 'update' command from the PROM Monitor to update the inventory ***Warning: Found a new IBRICK board in module 001c03, serial MHR530 Please use the 'update' command from the PROM Monitor to update the inventory DONE **** System Configuration and Diagnostics Summary **** CONFIG: No. of NODEs enabled = 3 No. of NODEs disabled = 0 No. of CPUs enabled = 12 No. of CPUs disabled = 0 Mem enabled = 12288 MB Mem disabled = 0 MB No. of RTRs enabled = 1 No. of RTRs disabled = 0 DIAG RESULTS: ALL DIAGS PASSED. **** End System Configuration and Diagnostics Summary **** System Maintenance Menu 1) Start System 2) Install System Software 3) Run Diagnostics 4) Recover System 5) Enter Command Monitor Option?
Some Explanation
With mismatching serial numbers, the compute modules and the router brick will not fire up together.
Disconnected (from L2 & USB) the router brick will start. When disconnected it is not mis-matched with anything.
Having started the router brick it is then ok (with the older firmware) to reconnect it.
Because the L1s on the Origin 300 compute modules were started without the router present they don’t know of each others’ existence.
Resetting all the compute modules will cause them to “discover” the r-brick during initialisation and also each other and thus become a single system image.
Further advice:
This all started when I had some problems with my R brick on my O300…the l1 wouldn’t start (was getting the couldn’t contact L1 error on the display). I’d experienced this before when the Dallas chip had either fallen out of it’s socket (usually during shipping) or failed. I borrowed a Dallas chip from a spare fuel motherboard, since they both use the same type (DS1742W-120) and it fixed my issue, but also seemed to yield some additional unexpected fruit:
09/16/10 19:04:54 ** fixing invalid SSN value 09/16/10 19:04:54 ** fixing BSN mismatch 09/16/10 19:04:54 USB0: waiting on open 09/16/10 19:05:53 L1 booting 1.22.4 09/16/10 19:05:55 USB0: waiting on open 09/16/10 19:06:50 L1 booting 1.22.4 09/16/10 19:06:53 USB0: waiting on open 09/16/10 19:07:17 USB0: opened 09/16/10 19:07:17 USB0: registered as remote 09/16/10 19:07:17 USB0: registered for events 09/16/10 19:07:19 INFO: System serial number reassigned to M1000707 from attached L2.After seeing that, I set out to determine whether or not this could be reproduced, or if my serial number was simply corrupted when my R brick went haywire. I bought another R brick off of ebay and several of the previously mentioned Dallas DS1742W-120 chips from quest components (http://www.questcomp.com).
Here’s the procedure as I followed it: I started by powering up the R brick and making sure it already had a serial number set:
001r27-L1>serial all Data Location Value ------------------------------ ------------ -------- Local System Serial Number NVRAM L1000362 Reference System Serial Number Attached L2 M1000707 Local Brick Serial Number EEPROM LPR391 Reference Brick Serial Number NVRAM LPR391As you can see, the Local system serial number and the serial from my L2 controller don’t match.
After noting this, I proceeded to install one of the brand new chips in the router brick and reboot. The brick seemed to come up alright, but I wasn’t sure how to address it from the L2 controller as the rack and brick numbers were now reading as —r— on the display. It didn’t take me long to realize that the old fuel I had sitting in the corner would once again become useful. I pulled the chip out of the R brick, installed it in the fuel motherboard, attached to the fuels L1 serial port on the motherboard, and issued and did the following:
—a—L1>brick rackslot 1 27
brick rack set to 001 (takes effect on next L1 reboot/power cycle)
brick slot set to 27 (takes effect on next L1 reboot/power cycle)
—a—L1>
—a—L1>reboot_l1SGI SN1 L1 Controller
Firmware Image B: Rev. 1.22.6, Built 08/07/2003 12:56:31001a27-L1>
001a27-L1>
This set rack and slot numbers on the chip for me, so I then reinstalled it into the R brick and powered it up again with the following results:Eos-001-L2>1.27 l1 entering L1 mode 001r27, to escape to L2 001r27-L1>log 02/07/06 06:28:15 nvram checksum error - initializing core data. 02/07/06 06:28:15 nvram checksum error - initializing extended data. 02/07/06 06:28:15 nvram checksum error - log pointers invalid, log pointers reset 02/07/06 06:28:15 L1 booting 1.20.6 02/07/06 06:28:15 ** fixing invalid SSN value 02/07/06 06:28:15 ** fixing BSN mismatch 02/07/06 06:28:15 USB0: waiting on open 02/07/06 06:28:15 L1 booting 1.20.6 01/14/18 13:42:55 ^[ZZ____Z_[_^Z_^^ZZ____Z_[_^_Z_^^Z_____[Z_ZZZ_[ZZ[_^^_[^[_^Z^_[^ZZ_____^▒▒▒▒▒Z_Z[ZZZZ_ZZ_____▒▒▒Z_^Z__[[^_Z_^ZZ_____[ZZ_ZZZ[Z__^_ZZZ[^Z^[[^▒▒▒▒▒ZZ_____[▒▒▒▒_[[^▒_^Z_Z_^ZZ___▒Z__^▒▒▒^^ZZ_____[ZZZZ_[[^[^▒▒1 booting 1.20.6 02/07/06 06:28:15 USB0: waiting[ZZ__^[^02/07/06 06:28:15 L1 booting 1.22.6 02/07/06 06:28:15 PSC: 0x07 02/07/06 06:28:15 Error setting speed on device 3 02/07/06 06:28:15 NVRAM doesn't match EEPROM 02/07/06 06:28:15 USB0: waiting on open 02/07/06 06:28:15 SMP unregistering events 02/07/06 06:28:15 UNREG: 300083f0 0 4 02/07/06 06:28:15 SMP-R: UART:UART_FRAMING_ERROR 02/07/06 06:28:15 L1 booting 1.22.6 02/07/06 06:28:15 PSC: 0x07 02/07/06 06:28:15 Error setting speed on device 3 02/07/06 06:28:15 USB0: waiting on open 02/07/06 06:28:15 L1 booting 1.22.6 02/07/06 06:28:15 PSC: 0x07 02/07/06 06:28:15 Error setting speed on device 3 02/07/06 06:28:15 USB0: waiting on open 02/07/06 06:28:15 L1 booting 1.20.6 02/07/06 06:28:15 USB0: waiting on open 02/07/06 06:28:15 USB0: opened 02/07/06 06:28:15 USB0: registered as remote 02/07/06 06:28:15 USB0: registered for events 02/07/06 06:28:15 INFO: System serial number reassigned to M1000707 from attached L2. 02/07/06 06:28:15 L1 booting 1.20.6 02/07/06 06:28:15 USB0: waiting on open 02/07/06 06:28:15 USB0: opened 02/07/06 06:28:15 USB0: registered as remote 02/07/06 06:28:15 USB0: registered for events 001r27-L1>And there you have it…from start to finish. Now clearly one doesn’t have to use a fuel to set those parameters on the chip, if you look at the data sheet, it’s quite simple to read/write/and even clear it. The Fuel was just the quickest means to an end that I could think of. If I get bored maybe I’ll build a little device to program these things…or perhaps someone else wants to pick up the torch and run some more?
One further item, you’ll notice in the log that there’s some uninitialized data in there…it’s probably a good idea to load the defaults after you’ve performed this, just to make sure all of the settings start at something reasonable.
DS1742W-120 Chip level work around based on the above advice
Ok, so here’s a simpler way to do it and all you need is a blank/new chip.
Power down your router brick
replace the chip with a new one
power up the router brick and connect it to your l2 controller, making sure that all of your serial numbers are already set how you need them
log into the l2 controller and do a config verbose and find the unit with no rack and slot id assigned like so:
Eos-001-L2>config verbose L2 192.168.20.15: - 001 (IR 80a8140f, C 00000000) (LOCAL) L1 192.168.20.15:2:0 - 001c07 (b1;p2/1;d4 /dev/sgil1_2) L1 192.168.20.15:1:0 - 001c06 (b1;p1;d2 /dev/sgil1_1) L1 192.168.20.15:4:0 - 001c03 (b1;p2/4;d6 /dev/sgil1_4) L1 192.168.20.15:3:0 - 001c01 (b1;p2/2;d5 /dev/sgil1_3) L1 192.168.20.15:0:0 - ---r-- (no rack and slot ID set) (b2;p2/1;d3 /dev/sgil1_0) L2 Clients: 127.0.0.1: (IR 8aa8140f) sgi (sgi) @ localhost running 'l2part' 127.0.0.1: (IR 86a8140f) sgi (sgi) @ localhost running 'l2gui' 127.0.0.1: (IR 88a8140f) sgi (sgi) @ localhost running 'l2flash'
in the output to the right of the unit with no slot id you’ll notice sgil1_0, the number at the end is the port number, in this case 0
issue the command :portnumber:0 brick rackslot 1 27 (or whatever you want it set to) and then :portnumber:0 reboot_l1 like so:
Eos-001-L2>:0:0 brick rackslot 1 27
000r00:
brick rack set to 001 (takes effect on next L1 reboot/power cycle)
brick slot set to 27 (takes effect on next L1 reboot/power cycle)
Eos-001-L2>:0:0 reboot_l1
Eos-001-L2>INFO: closed connection to 000r00
INFO: opened USB device at b2;p2/1;d4 (/dev/sgil1_5)
Profit!!
Eos-001-L2>1.27 log
001r27:
02/07/06 06:28:15 checksum Error – common header initialized
02/07/06 06:28:15 nvram checksum error – initializing core data.
02/07/06 06:28:15 nvram checksum error – initializing extended data.
02/07/06 06:28:15 nvram checksum error – log pointers invalid, log pointers reset
02/07/06 06:28:15 L1 booting 1.20.6
02/07/06 06:28:15 ** fixing invalid SSN value
02/07/06 06:28:15 ** fixing BSN mismatch
02/07/06 06:28:15 USB0: waiting on open
02/07/06 06:28:15 USB0: opened
02/07/06 06:28:15 USB0: registered as remote
02/07/06 06:28:15 USB0: registered for events
02/07/06 06:28:15 INFO: System serial number reassigned to M1000707 from attached L2.
02/07/06 06:28:15 L1 booting 1.20.6
02/07/06 06:28:15 USB0: waiting on open
02/07/06 06:28:15 USB0: opened
02/07/06 06:28:15 USB0: registered as remote
02/07/06 06:28:15 USB0: registered for events
Confirmation on another system (similar result with unrelated errors and newer L1 firmware version)
02/07/06 06:28:15 checksum Error – common header initialized
02/07/06 06:28:15 nvram checksum error – initializing core data.
02/07/06 06:28:15 nvram checksum error – initializing extended data.
02/07/06 06:28:15 nvram checksum error – log pointers invalid, log pointers reset
02/07/06 06:28:15 L1 booting 1.26.5
02/07/06 06:28:15 ** fixing invalid SSN value
02/07/06 06:28:15 ** fixing BSN mismatch
02/07/06 06:28:15 USB0: waiting on open
02/07/06 06:28:15 USB0: opened
02/07/06 06:28:15 USB0: registered for events
02/07/06 06:28:15 INFO: System serial number reassigned to M1000707 from attached L2.
02/07/06 06:28:15 L1 booting 1.26.5
02/07/06 06:28:15 USB0: waiting on open
02/07/06 06:28:15 USB0: opened
02/07/06 06:28:15 USB0: registered for events
02/07/06 06:28:15 L1 booting 1.26.5
02/07/06 06:28:15 USB0: waiting on open
02/07/06 06:28:15 USB0: opened
02/07/06 06:28:15 USB0: registered for events
02/07/06 06:28:15 USB-R: USB:bus was reset
02/07/06 06:28:15 UNREG: 30004c7c 0 7
02/07/06 06:28:15 USB0: unregistered
02/07/06 06:28:15 USB0-R: IRouter:read failed – read error
02/07/06 06:28:15 USB0: waiting on open
02/07/06 06:28:15 USB0: opened
02/07/06 06:28:15 USB0: registered for events
02/07/06 06:28:15 power up hold (COMMAND)
02/07/06 06:28:15 reset (COMMAND)
02/07/06 06:28:15 power down (COMMAND)
Won a Xeon Phi card from CSU
Got a perfect (100%) score for this course
Out of about 1,000 students I was one of the ten that won a Xeon Phi 60 core (57 cores application usable) card.
Announcement of the result:
I am pleased to advise that you are one of the lucky winners for the Programming on Supercomputers Short course – congratulations!
Cloudcroft was impressed with your work; you can see their comments below:
Loved the aside, some of the best programming utilising the supercomputer and great documentation.
One of the top students. Congratulations on the Phi.
Final Grade: High Distinction
We are planning to make an announcement on the forums, as well as our upcoming newsletter. We would love to let everyone know what a great job you did, however if you would like to remain anonymous we will of course accommodate your preference.
The forum post looked like:
In June, IT Masters, SGI, Cloudcroft and Charles Sturt University worked together to provide the one-of-a-kind Programming on Supercomputers Masterclass. Students gained access to Cloudcroft’s Tulip Trading supercomputer, which is now #15 in the Top 500 Supercomputer list.
Courtesy of Cloudcroft, ten Xeon Phi cards were awarded as prizes to the top performing students in the course. We’re proud to announce the following winners:
Ying Chan
Alex Hindle
Richard Lane
Regan Russell
Jon Harsem
Bruce Wite
James Seagraves
Thomas Cordingley
Carina Ormeño
(The last winner has requested to remain anonymous.)This was a highly specialised short course that challenged all our students. We thank them for their support and congratulate all who participated as well as our winners.
The most of the course work was Fortran (F90) and C/C++. However the neural-network assignment was to be done in “R” (with R-Studio).
Some example Neural Network code in R:
install.packages('neuralnet') library("neuralnet") #Going to create a neural network to perform sqare rooting #Type ?neuralnet for more information on the neuralnet library #Generate 50 random numbers uniformly distributed between 0 and 100 #And store them as a dataframe traininginput <- as.data.frame(runif(50, min=0, max=100)) trainingoutput <- sqrt(traininginput) #Column bind the data into one variable trainingdata <- cbind(traininginput,trainingoutput) colnames(trainingdata) <- c("Input","Output") #Train the neural network #Going to have 10 hidden layers #Threshold is a numeric value specifying the threshold for the partial #derivatives of the error function as stopping criteria. net.sqrt <- neuralnet(Output~Input,trainingdata, hidden=100, threshold=0.01) print(net.sqrt) #Plot the neural network plot(net.sqrt) #Test the neural network on some training data testdata <- as.data.frame((1:50)^2) #Generate some squared numbers net.results <- compute(net.sqrt, testdata) #Run them through the neural network #Lets see what properties net.sqrt has ls(net.results) #Lets see the results print(net.results$net.result) #Lets display a better version of the results cleanoutput <- cbind(testdata,sqrt(testdata), as.data.frame(net.results$net.result)) colnames(cleanoutput) <- c("Input","Expected Output","Neural Net Output") print(cleanoutput)
Used OpenMP and MPI used OMP_NUM_THREADS to restrict number of threads, using pragmas like:
#pragma omp for reduction(+:sum) #pragma omp parallel for reduction(+:sum)
Getting OpenMPI environment information:
procs = omp_get_num_procs(); nthreads = omp_get_num_threads(); maxt = omp_get_max_threads(); inpar = omp_in_parallel(); dynamic = omp_get_dynamic(); nested = omp_get_nested();
Example OpenMP reduction code:
#include#include #include int main (int argc, char *argv[]) { int i, n; float a[100], b[100], sum; /* Some initializations */ n = 100; for (i=0; i < n; i++) a[i] = b[i] = i * 1.0; sum = 0.0; #pragma omp parallel for reduction(+:sum) for (i=0; i < n; i++) sum = sum + (a[i] * b[i]); printf(" Sum = %f\n",sum); }
Using the Intel Trace tools with MPI:
Set up networking on FreeDOS 1.2
Using Freedos 1.2 and Virtual box Version 5.1.10 r112026 (Qt5.6.2)
When I installed Freedos, I installed the standard CD image, I got a second disk path D:
I did this:
cd C:\fdos\bin
dir D:\net
C:
rem foreach package in the directory listing I did (each package) becomes each zip file.
fdinstall install d:\net\(each package).zip
fdinstall install d:\net\(each package).zip
fdinstall install d:\net\(each package).zip
….
fdinstall install d:\net\(each package).zip
reboot
To test this I did the following..
I did a wget mySAN\filepath
eg:
wget 192.168.0.171:/unix/algol.txt
… and it just worked.
I have the entire turbo gameworks, turbo pascal, turbo this-or-that toolbox on 5.25″ floppies somewhere.. 😉
December 23, 2016
An intriguing colleague
I worked somewhere, a company, a large stock exchange listed company.
Applying for and securing a job in this company was not difficult. I guess that should have raised a flag immediately. I was brought in to maintain a relatively small list of bugs.
I was interviewed by a developer and a CTO/CIO/IT Manager/whatever title you want.
Now it turns out that much later on I was able to put together the following picture:
The CIO knew nothing about technology but was a ‘people person’, okay not that strange. They lasted about a week.
The developer, engaged in very strange behavior and quit at the end of the contract and then came back as a ‘vendor’: Stood up one day and stated that they were a vendor and not just turning up and doing work like the rest of us. Okay, a little odd, but anyway. Turns out this developer had an ‘offshore team’ in south east Asia, they charged for their own time and the supposed cast of 20 developers. They charged a six figure sum for these offshore developers. Much later I go to a contractors Christmas party and a recruiter informs me that this developer was on $1,000 per day at another organisation at the same time as collecting a wage and charging for this useless offshore team. The project was worse than the original version it was meant to replace, crashed on start up, full of bugs, and was an non-maintainable disaster, the project manager came under fire for the project and this developer walked away with very large amounts of money.
In the meantime, I fixed a few bugs and begged people to test my changes and for someone to review my code.
Selling an EMC VNX 5300 SAN on ebay
*** No disks *** but I think it originally had 64Tb of disk in it.
http://www.ebay.com.au/itm/232175001630?ssPageName=STRK:MESELX:IT&_trksid=p3984.m1555.l2649
Essendon bada app that was never released
This was an app that I did in a week in Melbourne.