Aplc now running on Parallella hardware : Hello world

Moderator: Dr.BeauWebber

Aplc now running on Parallella hardware : Hello world

Postby Dr.BeauWebber » Sun Jun 02, 2013 11:46 pm

Well it has been a long weekend, but Aplc is sort of running on the cores of Parallella hardware.
The source code is simple enough !
aplc_helloworld.apl :
Code: Select all
'Hello World from Aplc'

The reasons it has taken so long are mainly the lack of a std-in and std-out - we will have to build a replacement soon.
Also the aplc run-time library is too large to fit into on core memory, and needs to be in external d-ram.
For the moment all the program is thus in dram, using the legacy.ldf setup, but we should be able to sort that soon.

For this initial run, the build.sh that was used for the hello_world.c example has been modified to be pointable at any program, and to call the aplc run-time library. And a device used in the hello_world.c example was modified to obtain output text :

The lack of a std-out is overcome with a fixed buffer, that is written into by the program on the core, and later read by the host.
Code: Select all
char outbuf[128] SECTION("shared_dram");

Thus the missing fprintf :
Code: Select all
fprintf(aplcout,"%c",trs1.value.cp[i3])

was replaced by :
Code: Select all
 sprintf((outbuf+i3),"%c",trs1.value.cp[i3]);


So running this on a random set of cores, we get :
Code: Select all
$ ./buildv4.sh
$ ./run.sh
  0: Message from eCore 0x8ca ( 3, 2): "Hello World from Aplc"
  1: Message from eCore 0x84b ( 1, 3): "Hello World from Aplc"
  2: Message from eCore 0x84b ( 1, 3): "Hello World from Aplc"
  3: Message from eCore 0x888 ( 2, 0): "Hello World from Aplc"
  4: Message from eCore 0x849 ( 1, 1): "Hello World from Aplc"
  5: Message from eCore 0x88b ( 2, 3): "Hello World from Aplc"
  6: Message from eCore 0x88b ( 2, 3): "Hello World from Aplc"
  7: Message from eCore 0x8ca ( 3, 2): "Hello World from Aplc"
  8: Message from eCore 0x80a ( 0, 2): "Hello World from Aplc"
  9: Message from eCore 0x808 ( 0, 0): "Hello World from Aplc"
 10: Message from eCore 0x8c8 ( 3, 0): "Hello World from Aplc"
 11: Message from eCore 0x8c9 ( 3, 1): "Hello World from Aplc"
 12: Message from eCore 0x88a ( 2, 2): "Hello World from Aplc"
 13: Message from eCore 0x88b ( 2, 3): "Hello World from Aplc"
 14: Message from eCore 0x8cb ( 3, 3): "Hello World from Aplc"
 15: Message from eCore 0x84a ( 1, 2): "Hello World from Aplc"
 16: Message from eCore 0x88a ( 2, 2): "Hello World from Aplc"
 17: Message from eCore 0x84b ( 1, 3): "Hello World from Aplc"
 18: Message from eCore 0x848 ( 1, 0): "Hello World from Aplc"
 19: Message from eCore 0x8ca ( 3, 2): "Hello World from Aplc"
:D
Last edited by Dr.BeauWebber on Mon Jun 03, 2013 5:24 am, edited 1 time in total.
Reason: small tidy for future consistency
User avatar
Dr.BeauWebber
 
Posts: 114
Joined: Mon Dec 17, 2012 4:01 am
Location: England

Re: Aplc now running on Parallella hardware : Hello world

Postby ysapir » Mon Jun 03, 2013 3:14 pm

Happy to see you resolved the build/run environment issues. 8-)
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Aplc now running on Parallella hardware : Hello world

Postby Dr.BeauWebber » Mon Jun 03, 2013 4:56 pm

Thanks ysapir,
I still have a query re having a split internal/external memory system - see my post in the SDK group.
I need to sort this before I do any timings.
I am currently trying to create a simple but more general output communication method.
cheers, Beau
User avatar
Dr.BeauWebber
 
Posts: 114
Joined: Mon Dec 17, 2012 4:01 am
Location: England

Re: Aplc now running on Parallella hardware : Hello world

Postby Doug_Bohrer » Sat Jan 23, 2016 5:48 pm

I first learned how to program in APL as a high school student in 1968. I used APL interpreters professionally from 1978 until about 2006. The main advantage was that it coded up very fast. The main disadvantage was that it was very inefficient on single core Turing machines. I used it for applications that were complex, but did not run very often. Usually that meant accounting, corporate planning or investment managed account systems. All during that time, the APL community thought that when the hardware went massively parallel, APL would become the natural choice for programming because it was inherently parallel. That's how I stumbled on to your posts. Are people using your APL for development work? Did you connect the interpreter for prototyping code which could then be compiled after it was debugged? I am really curious about the usage of APL because it looks like most of the world is struggling to adapt languages designed for Turing machines to work in the parallel environment. I think that's a fool's errand. Doug Bohrer
Doug Bohrer
Chicago, IL
User avatar
Doug_Bohrer
 
Posts: 1
Joined: Sat Jan 23, 2016 4:38 pm
Location: Chicago, IL, US

Re: Aplc now running on Parallella hardware : Hello world

Postby Dr.BeauWebber » Tue Jun 14, 2016 9:18 pm

Fitting Apl, even compiled Apl, into a single core on one of these Array processors is a tight squeeze.
What we also need is a pipes to join the processors together.
I hope to do more work on these systems soon, but am busy elsewhere at the moment.
cheers,
Beau
User avatar
Dr.BeauWebber
 
Posts: 114
Joined: Mon Dec 17, 2012 4:01 am
Location: England


Return to APL

Who is online

Users browsing this forum: No registered users and 1 guest