[Barrelfish-users] Run application on multiple cores simultaneously

Simon Gerber simon.gerber at inf.ethz.ch
Mon Oct 27 10:32:17 CET 2014


Hi Vinay,

Looking at the implementation of xmpl-span, `xmpl-span n` will be 
translated into "span on n additional cores" (lines 56--62 in 
usr/examples/xmpl-span/span.c), thus resulting in the domain running on 
n+1 cores in total: the core it was originally spawned on + n cores 
which it was spanned to.

So, to reiterate, `xmpl-span 1` will result in the domain using two 
cores and `xmpl-span 2` will result in the domain using three cores.

I'm assuming you're experimenting in QEMU where by default you only have 
two cores which would explain the error you're seeing for xmpl-span 2 
(there is no third core to span to).

Hoping this clarifies things,

-- Simon

PS: your understanding that monitor is running on all available cores is 
correct. The MON_ERR_MONITOR_FOR_CORE error usually indicates that you 
tried an operation involving a core that is *not* available.

On 27.10.2014 08:25, Kumar, Vinay wrote:
> Hi Simon,
>
> Thanks for the info,
>
> I tried the Span method to run our app on multiple cores,
>
> Running xmpl-span 1 (with single core)  works fine
>
> However running xmpl-span 2 (with 2 cores) has issues, it gives the
> below error:
>
> Failure: (              monitor) No monitor loaded on this core ID
> [MON_ERR_NO_MONITOR_FOR_CORE}
>
> It appears the monitor module is not running for cores other than core 0,
>
> I had the understanding that the monitor module is common for all
> available cores,
>
> Please suggest on this
>
> Thanks
>
> Vinay
>
> ---------- Forwarded message ----------
> From: *Simon Gerber* <simon.gerber at inf.ethz.ch
> <mailto:simon.gerber at inf.ethz.ch>>
> Date: Tue, Oct 21, 2014 at 12:57 PM
> Subject: Re: [Barrelfish-users] Run application on multiple cores
> simultaneously
> To: Vinay Kumar <ms.vinay.k at gmail.com <mailto:ms.vinay.k at gmail.com>>,
> barrelfish-users at lists.inf.ethz.ch
> <mailto:barrelfish-users at lists.inf.ethz.ch>
>
>
> Hi Vinay,
>
> There's a few different ways of running an application on multiple cores:
>
> 1) Write your application in a server-client (or peer-to-peer) model and
> launch an instance of it on all the cores you want to use. In this case
> one instance of your application will still only run on a single core
> and you will have to set up communication channels using the provided
> functionality (e.g. create your own flounder interface).
>
> 2) "Span" your application (domain) across multiple cores. This is how
> you create a shared-memory program that runs on multiple cores. You can
> do this as is demonstrated in usr/examples/xmpl-span/xmpl-span.c: Use
> domain_new_dispatcher(target_core_id, callback function, callback fn
> argument) to create a dispatcher for your domain on the new core (the
> core with id target_core_id) and then use
> domain_thread_create_on(target_core_id, thread_start_func,
> thread_start_func_arg) to create a thread on the core with id
> target_core_id.
>
> Spanning domains currently has some implementation issues; in particular
> you need to be careful where and when you map new memory because not all
> the user-space metadata is synchronized between dispatchers of the same
> domain on different cores.
>
>
> Hope this helps,
> -- Simon
>
>
>
> On 21.10.2014 08:20, Vinay Kumar wrote:
>
>     Hi,
>
>     When we run an application on Barrelfish it runs on core 0 by default,
>     I would like to know how to run the same app using multiple cores.
>
>     The idea here is to run a Benchmark tool using all the available cores
>     in the system to get the actual performance of the system on Barrelfish.
>
>     Thanks
>     Vinay
>
>
>     _______________________________________________
>     Barrelfish-users mailing list
>     Barrelfish-users at lists.inf.ethz.ch
>     <mailto:Barrelfish-users at lists.inf.ethz.ch>
>     https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>



More information about the Barrelfish-users mailing list