Skip to content

Commit d08b4e1

Browse files
README: extend usage instructions with MPI and networking commands
1 parent 3a0ebb5 commit d08b4e1

File tree

1 file changed

+57
-3
lines changed

1 file changed

+57
-3
lines changed

README.md

+57-3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,23 @@ in the U-Boot interactive console to load and start FreeNOS:
330330
14757888 bytes read in 670 ms (21 MiB/s)
331331
=> bootm 0x400fffc0
332332

333+
You may also choose to download the FreeNOS kernel image via the network. To use a static IP address and server use:
334+
335+
=> setenv image kernel.ub
336+
=> setenv image_addr 0x400fffc0
337+
=> setenv bootm_boot_mode sec
338+
=> setenv ipaddr 172.16.10.120
339+
=> setenv serverip 172.16.10.1
340+
=> tftp $image_addr $serverip:$image
341+
=> bootm $image_addr
342+
343+
To retrieve an IP address using DHCP, use the 'dhcp' command prior to downloading and booting:
344+
345+
=> setenv bootm_boot_mode sec
346+
=> dhcp
347+
=> tftp 0x400fffc0 kernel.ub
348+
=> bootm 0x400fffc0
349+
333350
### U-Boot on SPI Flash ###
334351

335352
Alternatively, the Orange Pi Zero board contains a small SPI flash which can also be used to install U-Boot.
@@ -411,14 +428,31 @@ to view all the built-in shell commands:
411428

412429
(localhost) / # help
413430

431+
FreeNOS on Allwinner H2+/H3 boards support networking. You can see the current state
432+
of the network stack with:
433+
434+
(localhost) / # netctl
435+
436+
To assign a static IP address you can write the IPV4 address file in the corresponding device:
437+
438+
(localhost) / # write /network/sun8i/ipv4/address 172.16.10.90
439+
440+
To obtain an address via DHCP, you can start the DHCP client with:
441+
442+
(localhost) / # dhcpc sun8i
443+
444+
When the device has a valid IPV4 address you can send out an ICMP ping using:
445+
446+
(localhost) / # netping -i sun8i 172.16.10.1
447+
414448
Example application program for calculating prime numbers is the /bin/prime command.
415449
To let it compute all prime numbers up to 1024 and output the prime number results use:
416450

417451
(localhost) / # prime --stdout 1024
418452

419-
For Intel, the prime command also has a MPI variant called 'mpiprime' which can
420-
compute the prime numbers in parallel using multiple cores. To run it and let the
421-
shell measure the time taken use:
453+
The prime command also has a multicore capable variant variant called 'mpiprime' which uses
454+
the Message Passing Interface (MPI) library. The mpiprime program can compute the prime numbers
455+
in parallel using multiple cores. To run it via the console and let the shell measure the time taken use:
422456

423457
(localhost) / # time mpiprime 2000000
424458

@@ -427,6 +461,26 @@ where it computes the same number of primes:
427461

428462
(localhost) / # time prime 2000000
429463

464+
Additionally, it is possible on the Allwinner H2+/H3 (arm/sunxi-h3) target to start MPI programs
465+
via the network on multiple nodes running FreeNOS. You can do that by starting the corresponding
466+
MPI program which is compiled on your host OS and uses the MPI library host code to communicate with
467+
the remote nodes via ethernet. You need to provide a configuration file that specifies the list of
468+
IP addresses and core identifiers. For example, see the file config/host/mpihosts.txt which is configured
469+
to use the local Qemu program for testing. Start the QEMU instance with MPI enabled using:
470+
471+
$ scons qemu_mpi
472+
473+
In another terminate, start the MPI ping test program that communicates with the Qemu instance with:
474+
475+
$ ./build/host/bin/mpiping/mpiping ./config/host/mpihosts.txt
476+
477+
You can also start the MPI variant of the prime program via the network with:
478+
479+
$ ./build/host/bin/mpiprime/mpiprime ./config/host/mpihosts.txt 3000000
480+
481+
Provide your own configuration file with an arbitrary list of IP addresses to run
482+
MPI programs on your own compute cluster.
483+
430484
Jenkins Continuous Integration
431485
==============================
432486

0 commit comments

Comments
 (0)