Multiple Images executing simultaneously

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple Images executing simultaneously

Andrew Coward-2
I am using the all-in-one image to carry out neural network simulations with different parameters using a MacBook Pro 2 GHx Intel Core i7 with OSX 10.11.6. Each simulation can take up to 36 hours to complete.

I have found it is possible to have 7 or more different images all executing at the same time. Each image runs at the same speed as when only one image is running. Obviously a huge benefit.

This works in either Smalltalk 4.4 or 5.0.

Each image has a different name, and one oddity is that sometimes when opening an image I get the message “cannot find application”. However, changing the name of the image, for example by inserting spaces at the end, eventually gets to an image that will open (so far 1 to 4 spaces have always been sufficient).

Does anyone know if this ability to run multiple images is a “happy accident”  or an intended feature of Smalltalk that will be preserved in future releases of Smalltalk and OS ?
Reply | Threaded
Open this post in threaded view
|

Re: Multiple Images executing simultaneously

Herbert König
Hi Andrew,

I'm using exactly your setup to run genetic algorithms. I have three
running on a Raspberry Pi (linux) and three on my windows 7 laptop.

All images live in the same folder with different names and each image
has a changes file of the same name. Never encountered the problems you
describe. In 2007 I did the same with training neural networks in Squeak
3.8. I see no reasons why this shouldn't work.

Not knowing Mac it sounds like you start the VM by double clicking the
image. I start the VM which then prompts me for the image. That's the
only difference I can see.

Cheers,


Herbert

Am 19.09.2016 um 20:31 schrieb Andrew Coward:
> I am using the all-in-one image to carry out neural network simulations with different parameters using a MacBook Pro 2 GHx Intel Core i7 with OSX 10.11.6. Each simulation can take up to 36 hours to complete.
>
> I have found it is possible to have 7 or more different images all executing at the same time. Each image runs at the same speed as when only one image is running. Obviously a huge benefit.
>
> This works in either Smalltalk 4.4 or 5.0.
>
> Each image has a different name, and one oddity is that sometimes when opening an image I get the message “cannot find application”. However, changing the name of the image, for example by inserting spaces at the end, eventually gets to an image that will open (so far 1 to 4 spaces have always been sufficient).
>
> Does anyone know if this ability to run multiple images is a “happy accident”  or an intended feature of Smalltalk that will be preserved in future releases of Smalltalk and OS ?


Reply | Threaded
Open this post in threaded view
|

Re: Multiple Images executing simultaneously

Tom Rushworth-2
Hi All,

The Mac has a habit of starting only one instance of an application for
multiple open documents.  That works fine for a word processor, not so
well for squeak.  Try starting the VM from the command line, and use the
activity manager (or the 'ps' command) to make sure there are multiple
instances running.

On 19/09/2016 11:54, Herbert König wrote:

> Hi Andrew,
>
> I'm using exactly your setup to run genetic algorithms. I have three
> running on a Raspberry Pi (linux) and three on my windows 7 laptop.
>
> All images live in the same folder with different names and each image
> has a changes file of the same name. Never encountered the problems you
> describe. In 2007 I did the same with training neural networks in Squeak
> 3.8. I see no reasons why this shouldn't work.
>
> Not knowing Mac it sounds like you start the VM by double clicking the
> image. I start the VM which then prompts me for the image. That's the
> only difference I can see.
>
> Cheers,
>
>
> Herbert
>
> Am 19.09.2016 um 20:31 schrieb Andrew Coward:
>> I am using the all-in-one image to carry out neural network
>> simulations with different parameters using a MacBook Pro 2 GHx Intel
>> Core i7 with OSX 10.11.6. Each simulation can take up to 36 hours to
>> complete.
>>
>> I have found it is possible to have 7 or more different images all
>> executing at the same time. Each image runs at the same speed as when
>> only one image is running. Obviously a huge benefit.
>>
>> This works in either Smalltalk 4.4 or 5.0.
>>
>> Each image has a different name, and one oddity is that sometimes when
>> opening an image I get the message “cannot find application”. However,
>> changing the name of the image, for example by inserting spaces at the
>> end, eventually gets to an image that will open (so far 1 to 4 spaces
>> have always been sufficient).
>>
>> Does anyone know if this ability to run multiple images is a “happy
>> accident”  or an intended feature of Smalltalk that will be preserved
>> in future releases of Smalltalk and OS ?
>
>
>


--
Tom Rushworth

Reply | Threaded
Open this post in threaded view
|

Re: Multiple Images executing simultaneously

Peter Crowther-2
In reply to this post by Andrew Coward-2
Squeak is single-threaded, and I don't expect that to change as too much in the image relies on it.  Therefore, assuming your simulation is CPU-bound (pretty much a given for most neural network work), you should be able to run about as many Squeak images as you have threads on your processor.  There are a few nuances to that - Intel hyperthreading causing contention for parts of cores, CPU cache size and hence bandwidth to/from RAM, that kind of thing - but it mostly works.

Incidentally, this behaviour isn't specific to Squeak or to a particular version of MacOS, and it's not a happy accident.  Processor designers and operating system developers have spent many years making sure this happens.  The same thing would probably be true for any other single-threaded CPU-limited code you wrote and ran, on any "modern" (last 20 years) OS.  So it's pretty safe to rely on it.

Cheers,

- Peter

On 19 September 2016 at 19:31, Andrew Coward <[hidden email]> wrote:
I am using the all-in-one image to carry out neural network simulations with different parameters using a MacBook Pro 2 GHx Intel Core i7 with OSX 10.11.6. Each simulation can take up to 36 hours to complete.

I have found it is possible to have 7 or more different images all executing at the same time. Each image runs at the same speed as when only one image is running. Obviously a huge benefit.

This works in either Smalltalk 4.4 or 5.0.

Each image has a different name, and one oddity is that sometimes when opening an image I get the message “cannot find application”. However, changing the name of the image, for example by inserting spaces at the end, eventually gets to an image that will open (so far 1 to 4 spaces have always been sufficient).

Does anyone know if this ability to run multiple images is a “happy accident”  or an intended feature of Smalltalk that will be preserved in future releases of Smalltalk and OS ?