<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://www.multicorebsp.com/forum/extern.php?action=feed&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[The MulticoreBSP Forums]]></title>
		<link>http://www.multicorebsp.com/forum/index.php</link>
		<description><![CDATA[The most recent topics at The MulticoreBSP Forums.]]></description>
		<lastBuildDate>Mon, 24 Jan 2022 15:36:36 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Leaderboard update]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=99839&amp;action=new</link>
			<description><![CDATA[<p>Dear Archimedis,</p><p>you are welcome and encouraged to submit-- we will update the leaderboard roughly on a weekly basis. It&#039;s not frozen:)</p><p>All the bests and looking forward to your updated entry!!<br />Albert-Jan</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Mon, 24 Jan 2022 15:36:36 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=99839&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[leaderboard visibility]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=99838&amp;action=new</link>
			<description><![CDATA[<p>Hi,</p><p>a nice observation I got from the mistake we did in maximazing instead of minimizing is that, given the quality score definition, because in maximizing the aim is mainly to diversify as much as possible the colors of the vertices of a hyperedge, the strategy we&#160; found is on average worst than your random partitioner that means we were able to diversify even more than the random partitioner achieving so our &quot;wrong&quot; objective <img src="http://www.multicorebsp.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /> ... now let&#039;s try to address the real challenge otpimization goal <img src="http://www.multicorebsp.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Archimedes)]]></author>
			<pubDate>Sun, 23 Jan 2022 10:35:19 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=99838&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[MulticoreBSP on Windows using Code::Blocks]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=27&amp;action=new</link>
			<description><![CDATA[<p>A few years later, there are many more MinGW compiler versions out there that can cause incompatibilities. If the above guide nets you missing symbol errors of the forms mcbsp_perf_*, __impl_*PThread*, or __MinGW_*, you&#039;re likely in such a situation. The cleanest solution is to build a MulticoreBSP library from source under your current Windows installation, but this is not supported and thus requires some manual tinkering.</p><p>I&#039;ve hence made sure at least one combination using a ready-to-go Code::Blocks version works as intended:<br />* MinGW + CodeBlocks version 17.12 [1,2]<br />* PThreads-win32 v2.1.9 [3]<br />* MulticoreBSP for C v2.0.4 pre-built 32-bit static library and header file [4,5]</p><p>You should use the x86 GC2 versions of the PThreads pre-built binaries, and you need both the DLL and the .a. To use MulticoreBSP for C in your Windows Code::Blocks project, simply add the bsp.h header [5] to your project and start coding. Before building, make sure to add the libmcbsp2.0.4.a [4] and libpthreadGC2.a (the x86 version!) [3] to your linker configuration as shown in [6]:</p><p><span class="postimg"><img src="http://www.multicorebsp.com/images/mcbsp-win32-1.png" alt="mcbsp-win32-1.png" /></span><br /><strong>The order of the static libraries matter</strong>-- the MulticoreBSP for C library should be linked first, because it has dependencies on the PThreads library.</p><p>Before running, make sure to put the pthreadGC2.dll (the x86 version!) [3] *in the same folder as your executable* (e.g., /path/to/project/bin/Release/ or /path/to/project/bin/Debug). Alternatively, the DLL could be added to your system&#039;s path. The final result should be as in [7]:</p><p><span class="postimg"><img src="http://www.multicorebsp.com/images/mcbsp-win32-2.png" alt="mcbsp-win32-2.png" /></span></p><p>The pre-built Win32 library [4] should work with all current and future MinGW v5.x.x and PThreads-win32 v2.9.x versions. The win64 pre-built binary (at <a href="http://www.multicorebsp.com/downloads/c/2.0.4/win64)" rel="nofollow">http://www.multicorebsp.com/downloads/c/2.0.4/win64)</a> is only compatible with the older MinGW v4.x.x.</p><p>[1] <a href="http://www.codeblocks.org/downloads/binaries#windows" rel="nofollow">http://www.codeblocks.org/downloads/binaries#windows</a><br />[2] <a href="http://sourceforge.net/projects/codeblocks/files/Binaries/17.12/Windows/codeblocks-17.12mingw-setup.exe" rel="nofollow">http://sourceforge.net/projects/codeblo … -setup.exe</a><br />[3] <a href="ftp://sourceware.org/pub/pthreads-win32/prebuilt-dll-2-9-1-release/" rel="nofollow">ftp://sourceware.org/pub/pthreads-win32 … 1-release/</a><br />[4] <a href="http://www.multicorebsp.com/downloads/c/2.0.4/win32/libmcbsp2.0.4.a" rel="nofollow">http://www.multicorebsp.com/downloads/c … bsp2.0.4.a</a><br />[5] <a href="http://www.multicorebsp.com/downloads/c/2.0.4/bsp.h" rel="nofollow">http://www.multicorebsp.com/downloads/c/2.0.4/bsp.h</a><br />[6] <a href="http://www.multicorebsp.com/images/mcbsp-win32-1.png" rel="nofollow">http://www.multicorebsp.com/images/mcbsp-win32-1.png</a><br />[7] <a href="http://www.multicorebsp.com/images/mcbsp-win32-2.png" rel="nofollow">http://www.multicorebsp.com/images/mcbsp-win32-2.png</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Fri, 13 Sep 2019 20:22:12 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=27&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Version 2.0.4 released]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=99837&amp;action=new</link>
			<description><![CDATA[<p>This new version contains many bugfixes over 2.0.3; many thanks to Frédéric Dabrowski, Arvid Jokabsson, and Rob Bisseling for reporting some of these. Initial support for Android was added, while the build tools bspcc and bspcxx were improved. The profile mode now also prints the BSP signature, the ratio of useful work versus total run-time.</p><p>Get your copy: <a href="http://multicorebsp.com/downloads/c/2.0.4/MulticoreBSP-for-C.tar.xz" rel="nofollow">http://multicorebsp.com/downloads/c/2.0 … r-C.tar.xz</a></p><p>The quick-start guide has had an overhaul to correspond to the new v2 series of MulticoreBSP. Check it out: <a href="http://multicorebsp.com/documentation/quickC/" rel="nofollow">http://multicorebsp.com/documentation/quickC/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Sun, 31 Mar 2019 15:05:24 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=99837&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[MulticoreBSP 2.0.3 released!]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=53&amp;action=new</link>
			<description><![CDATA[<p>Time to update this project has become quite sparse. Nevertheless, I&#039;m happy to recently have been to bring version 2.0.3 in the open!</p><p>New features:</p><ul><li><p>checkpointing support,</p></li><li><p>initial support for accelerators,</p></li><li><p>improved pinning support for hyperthreaded machines,</p></li><li><p>speed improvements,</p></li><li><p>machine benchmarking suite and more example codes,</p></li><li><p>flexible APIs (no more need to recompile for compatibility mode),</p></li><li><p>new compilation modes: debug and profiling.</p></li></ul><p>Objects compiled in various modes can be mixed freely-- that is, if you suspect a bug in one part of a large project, only the suspect part can be compiled in debug mode. That way full error checking (and corresponding overheads) are only incurred on the suspect code. The same is true for profiling or compatibility codes, altough the former has minor caveats (see the changelog).</p><p>No distributed-memory support was added. Multi-BSP programming is available separately. See <a href="http://multicorebsp.com/download/c/" rel="nofollow">http://multicorebsp.com/download/c/</a> for full details.</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Sun, 20 May 2018 15:23:46 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=53&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Version 1.2, and a roadmap for future releases]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=42&amp;action=new</link>
			<description><![CDATA[<h5>MulticoreBSP for C version 1.2</h5><p>It is my pleasure to announce the third update to the MulticoreBSP for C library. Version 1.2 brings improved pinning support for nested BSP runs, which benefits code explicitly following the <a href="http://dl.acm.org/citation.cfm?id=1889509" rel="nofollow">Multi-BSP model</a> (as opposed to flat BSP). C++ support has been extended by the addition of <a href="http://multicorebsp.com/doxygen/d4/d6c/mcbsp-templates_8hpp.html" rel="nofollow">templated BSPlib primitives</a>, which provides escape from having to deal explicitly with byte sizes and byte offsets.<br />Smaller improvements consider documentation, internal data structures, and compilation support; the latter now include release-testing using the clang LLVM compiler, next to GCC and the Intel C++ Compiler. Several bugs from version 1.1.0 have been resolved as well; I like to thank Jing Fan and Joshua Moerman for reporting some of these. As always, the <a href="http://multicorebsp.com/downloads/c/changelog.txt" rel="nofollow">changelog</a> contains more details.</p><p>Version 1.2.0 can be downloaded from the following URL: <a href="http://multicorebsp.com/download/c/" rel="nofollow">http://multicorebsp.com/download/c/</a></p><h5>Roadmap</h5><p><strong>Version 1.3</strong>:<br />Explicitly writing parallel programs using the Multi-BSP model can be done using nested SPMD sections in MulticoreBSP for C. This is not a straightforward effort, and can easily lead to codes written for specific architectures. This hurts portability, reduces productivity, and negatively affects the ease of use BSP libraries are otherwise commonly known for. It is also at odds with the intention of (Multi-)BSP as an abstract bridging model.<br />To enable the implementation of Multi-BSP codes such that the produced codes are (1) valid for all Multi-BSP computers, (2) clearly and transparently structured, and (3) compatible with existing BSPlib code fragments, <strong>version 1.3</strong> will support C++ extensions allowing for explicit Multi-BSP programming.</p><p><strong>Version 2.0</strong>:<br />Many have requested that MulticoreBSP for C be deployable over distributed-memory architectures. The original plan was to handle this problem simultaneously with the addition of automatic global barrier avoidance, pipelined communication, and fault-tolerance. It remains, however, unclear in what time-frame I will be able to address these important issues. From <strong>version 2.0</strong> on, I will hence first make MulticoreBSP for C a fully hybrid systems, such that any BSP program automatically uses MPI for inter-node process coordination, while using PThreads for intra-node threading. These extensions will remain adhering to the <a href="http://dx.doi.org/10.1007/s10766-013-0262-9" rel="nofollow">updated BSPlib standard</a> as published with the introduction of MulticoreBSP for C; in particular, nested BSP runs will remain possible, which in turn allows the Multi-BSP C++ extensions that will be introduced in Version 1.3 to be deployable over any MPI-supporting cluster or supercomputer.<br />A secondary target is to not interfere with existing threading and parallel programming interfaces; advanced users of version 2.0 of MulticoreBSP for C will be able to mix their (Multi-)BSP codes with any existing MPI, OpenMP, or Cilk Plus codes that they may already have.</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Wed, 14 May 2014 13:19:43 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=42&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Bug Trying To Implement MulticoreBSP with JNI on W7 64 bits]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=41&amp;action=new</link>
			<description><![CDATA[<p>As a note: this question is about calling MulticoreBSP <strong>for C</strong> from Java. Note that there&#039;s also a native Java version available.</p><p>As for the question, with part one, you&#039;re using a 64-bit compiler but linking against a 32-bit library; hence the BSP functions are not recoginised. For part two, the BSP functions are recognised by the linker, but the MulticoreBSP for C library depends on POSIX Threads, which is not found by the linker. Windows does not have native PThreads support. To add PThreads, you can link against libraries from the following project:</p><p><a href="http://www.sourceware.org/pthreads-win32/" rel="nofollow">http://www.sourceware.org/pthreads-win32/</a></p><p>For a walkthrough on how to get it working in Code::Blocks, please consult this thread:</p><p><a href="http://multicorebsp.com/forum/viewtopic.php?id=27" rel="nofollow">http://multicorebsp.com/forum/viewtopic.php?id=27</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Sat, 18 Jan 2014 18:13:34 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=41&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Multi-BSP: nested SPMD regions for hierarchical MulticoreBSP use]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=28&amp;action=new</link>
			<description><![CDATA[<p>BSPlib and MulticoreBSP are first and foremost designed for the original flat BSP model as proposed by Leslie Valiant in 1990. In 2008, Leslie proposed a model where a BSP computer does not consist out of <em>p</em> processors, but out of <em>p</em> other BSP computers <strong>or</strong> <em>p</em> processors. This model is called Multi-BSP. MulticoreBSP for C supports this style of programming by supporting nested BSP runs.</p><p><strong>Basics</strong></p><p>What this means is best illustrated by an example. Consider the HP DL980 architecture; this machine consists out of two separate chipsets connected by a custom HP interconnect. Each chipset connects four sockets (and four memory controllers). Let us assume each socket contains an 8-core Intel Xeon processor. We observe three important layers in the hierarchy: first, the custom interconnect that basically binds together two mainboards so to create a single shared-memory computer; second, the four sockets connected by Intel Quick-Path Interconnect; and third, a single processor consisting out of 8 cores. This Multi-BSP description can be exploited in MulticoreBSP by using nested SPMD runs as follows:</p><div class="codebox"><pre class="vscroll"><code>#include &quot;mcbsp.h&quot;

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

void spmd1() {
    bsp_begin( 2 ); //HP custom interconnect
    bsp_init( &amp;spmd2, 0, NULL );
    spmd2();
    bsp_sync();
    if( bsp_pid() == 0 )
        printf( &quot;level-1 master thread closes nested BSP run...\n&quot; );
    bsp_end();
}

void spmd2() {
    bsp_begin( 4 ); //four sockets per Intel QPI
    bsp_init( &amp;spmd3, 0, NULL );
    spmd3();
    bsp_sync();
    if( bsp_pid() == 0 )
        printf( &quot;level-2 master thread closes nested BSP run...\n&quot; );
    bsp_end();
}

void spmd3() {
    bsp_begin( 8 ); //eight cores per processor
    //do useful work here
    bsp_end();
}

int main() {
    printf( &quot;Sequential part 1\n&quot; );

    bsp_init( &amp;spmd1, 0, NULL );
    spmd1();

    printf( &quot;Sequential part 2\n&quot; );
    return EXIT_SUCCESS;    
}</code></pre></div><p>To illustrate MulticoreBSP for C indeed handles this correctly, we compile the library with the MCBSP_SHOW_PINNING flag enabled, and run it on the HP DL980 machine (located at the Flanders ExaScience Labs) described above:</p><div class="codebox"><pre><code>Sequential part 1
Info: pinning used is 0 32
Info: pinning used is 0 8 16 24
Info: pinning used is 0 1 2 3 4 5 6 7
Info: pinning used is 32 40 48 56
Info: pinning used is 8 9 10 11 12 13 14 15
Info: pinning used is 24 25 26 27 28 29 30 31
Info: pinning used is 16 17 18 19 20 21 22 23
Info: pinning used is 32 33 34 35 36 37 38 39
Info: pinning used is 40 41 42 43 44 45 46 47
Info: pinning used is 56 57 58 59 60 61 62 63
Info: pinning used is 48 49 50 51 52 53 54 55
level-2 master thread closes nested BSP run...
level-2 master thread closes nested BSP run...
level-1 master thread closes nested BSP run...
Sequential part 2</code></pre></div><p>Two runs need not be identical, of course, as per the usual behaviour of concurrent threads. A second test run, for example, gives us:</p><div class="codebox"><pre><code>Sequential part 1
Info: pinning used is 0 32
Info: pinning used is 0 8 16 24
Info: pinning used is 0 1 2 3 4 5 6 7
Info: pinning used is 32 40 48 56
Info: pinning used is 16 17 18 19 20 21 22 23
Info: pinning used is 24 25 26 27 28 29 30 31
Info: pinning used is 8 9 10 11 12 13 14 15
Info: pinning used is 32 33 34 35 36 37 38 39
Info: pinning used is 40 41 42 43 44 45 46 47
Info: pinning used is 56 57 58 59 60 61 62 63
Info: pinning used is 48 49 50 51 52 53 54 55
level-2 master thread closes nested BSP run...
level-2 master thread closes nested BSP run...
level-1 master thread closes nested BSP run...
Sequential part 2</code></pre></div><p>This post describes but a toy example; in the ./examples/ directory in the MulticoreBSP for C distribution, the hierarchical.c example provides a Multi-BSP program that actually does a distributed computation in a hierarchical fashion. Please refer there for further illustration on how to practically use this facility.</p><p><strong>Thread pinning</strong></p><p>We proceed to describe how the pinning is computed in the hierarchical setting. If we have a machine consisting of 64 threads, and the thread numbering is consecutive with no reserved cores, then requesting <em>p</em> threads actually partitions the entire machine (1,2,...,64) into <em>p</em> parts (submachines), each consisting of consecutive threads. For example, if <em>p</em>=8, then submachine 1 is (1,2,...,8), submachine two is (9,10,...,16), ..., and submachine <em>p</em> is (57,58,...,64). Each of the <em>p</em> threads spawned will pin to the first thread number available in its assigned submachine. Starting a nested BSP run will apply the same logic, but only on the assigned submachine of the current thread; e.g., writing <em>bsp_begin(2)</em> threads within submachine two in the previous example will result in two threads which are assigned the submachines (9,10,11,12) and (13,14,15,16), respectively, and which are pinned to thread 9 and 13, respectively.</p><p>For different thread numberings (i.e., a wrapped numbering, as for instance commonly used on hyperthreading machines), the MulticoreBSP runtime will compute the necessary transformations to automatically yield the pinnings as described above. The same is true when reserved cores do occur. If evenly distributed submachines are not possible or not intended, the user can manually adapt the submachine settings using the interface exposed in <a href="http://multicorebsp.com/doxygen/d0/dd3/mcbsp-affinity_8h.html" rel="nofollow">mcbsp_afffinity.h</a> at runtime, while already in an SPMD section.</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Mon, 22 Jul 2013 22:58:07 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=28&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[multicoreBSP Java version]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=24&amp;action=new</link>
			<description><![CDATA[<p>Hi sikanderhayat,</p><p>I think the confusion here is there cannot be just two vectors in a (BSP) SPMD run; each single program has its own two local vectors. With p processors, there will thus be 2p separate vectors.</p><p>Suppose x and y are the *global* vectors, and x_s and y_s the *local* vectors at process s. Note again that x and y do not exist anywhere. Then x should be distributed so that the union of the p subvectors x_s should yield x; and similarly for y_s and y. In other words, we need a <strong>partitioning</strong> of the global vectors x and y. Again, this still happens on the design table, not on the implementation-level. We now first design the algorithm.</p><p>To compute an inner product we can first compute the local inner product, then communicate the partial results, and then combine those partial results. Following the BSP paradigm, we want no communication during the computation of the local inner product; hence, the distributions (the way of partitioning) of x and y must be equal. The communication step is an all-to-all communication of a single element, and the last computation step is indeed also completely local as it just accumulates all received elements into one.<br />The cost of the first computation step is given by the local lengths of x_s and y_s (which are equal, since the distribution is equal). For load-balance, setting this length to n/p for all local vectors, with n the size of the global x and y, is optimal. Note that the actual partitioning scheme thus actually does not matter; as long as x is distributed as y is, and as long as all local vectors are of equal size. This concludes the design. We now can go on with implementation. </p><p>Each SPMD section must <strong>initialise</strong> local vectors of size n/p. This means allocating room for x_s and y_s, and initialising the values of the elements therein according to the global distribution that was chosen. Again, there are no global vectors x and y; we only initialise local vectors, from scratch. We then implement the algorithm as described above, and we are done. (It is quite natural for BSP implementations to just be literal translations of a BSP design.)</p><p>If you had the global vectors x and y available, then some part of the code is not in SPMD style. You can still force MulticoreBSP to run with a block-distribution of those vectors, but then you have to override the SPMD paradigm by using (or abusing) the available shared-memory. In terms of performance you will then become suboptimal in terms of data-locality, which will lead to big issues on architectures where memory access is non-uniform (NUMA architectures).</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Sat, 04 May 2013 17:01:37 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=24&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[MulticoreBSP for C, version 1.1 released]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=25&amp;action=new</link>
			<description><![CDATA[<p>We are happy to announce an update to the MulticoreBSP for C software. Highlights are:</p><ul><li><p>A new BSP primitive: the <a href="http://www.multicorebsp.com/doxygen/d4/df8/mcbsp_8h.html#a13ef87e8b0304f484efb1d8cf6e670b2" rel="nofollow">bsp_hpsend</a>,</p></li><li><p>Improved communication speed,</p></li><li><p>Improved synchronisation speed (on machines with a large number of cores),</p></li><li><p>New possibilities for advanced control of thread affinities as required on NUMA architectures,</p></li><li><p>Compilation support for Windows;</p></li><li><p>... and see the <a href="http://www.multicorebsp.com/downloads/c/changelog.txt" rel="nofollow">changelog</a> for other new additions and bugfixes!</p></li></ul><p>This release accompanies a new introductory paper to MulticoreBSP for C, which describes the BSP model, defines the updated BSPlib interface, and presents two BSP applications with performance evaluations on machines with highly non-uniform memory access (NUMA):</p><p>A. N. Yzelman, R. H. Bisseling, D. Roose, and K. Meerbergen, <a href="http://www.cs.kuleuven.be/publicaties/rapporten/tw/TW624.abs.html" rel="nofollow">MulticoreBSP for C: a high-performance library for shared-memory parallel programming</a>, technical report TW624, KU Leuven, 2013 (submitted for publication).</p><p>Version 1.1 of MulticoreBSP for C is <a href="http://www.multicorebsp.com/?page=download&amp;section=c" rel="nofollow">ready for download</a>, and the corresponding <a href="http://www.multicorebsp.com/doxygen/" rel="nofollow">documentation</a> has been updated. As always, we welcome your <a href="http://www.multicorebsp.com/?page=contact" rel="nofollow">feedback</a>, and wish you many pleasant BSP programming sessions!</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Tue, 05 Mar 2013 17:42:49 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=25&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[bsp_sync()'s between bsp_push_reg()'s?]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=23&amp;action=new</link>
			<description><![CDATA[<p>I checked the logs a while back: the issue I referred to above occurred when a process registers a new variable which incidentally had the same address as a previously registered variable, but not on all processors. This became evident in an application where mallocs, push_regs, pop_regs and frees were woven into subroutines in an incorrect fashion. It did lead to a detection of a bug related to multiple push_regs on the same pointer, which was fixed before version 1.0.0 already; not 1.0.1.</p><p>In any case, synching once should be all right, and the only thing I can think of is that some of the push_regs try to register the same address on some of your threads, like the above. In that case the last register will prevail (as per the standard). Note that in code like</p><div class="codebox"><pre><code>x=malloc(30*sizeof(double));
free(x);
y=malloc(2*sizeof(char));
assert( x != y);</code></pre></div><p>the assertion may fail, but doesn&#039;t have to, and in multithreading some threads may fail while others would not; this was the root cause in the bug I had.</p><p>Hope this helps.</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Wed, 28 Nov 2012 14:46:59 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=23&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[MulticoreBSP Configration]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=20&amp;action=new</link>
			<description><![CDATA[<p>Thanks for the reply, I configure MulticoreBSP library in eclipse and through terminal as per your post, thanks again</p>]]></description>
			<author><![CDATA[dummy@example.com (sikanderhayat)]]></author>
			<pubDate>Mon, 19 Nov 2012 12:29:29 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=20&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[MulticoreBSP in C++: basic usage]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=22&amp;action=new</link>
			<description><![CDATA[<p>Since MulticoreBSP is now available in C, you can use it from within C++ programs by simply including the mcbsp.h header file in <a href="http://www.parashift.com/c++-faq/include-c-hdrs-nonsystem.html" rel="nofollow">the usual way</a>.</p><p>This requires you to call C-style functions from object-oriented code, and this isn&#039;t always elegant In particular, having to start an SPMD section by pointing to a global function completely breaks the object-oriented style. To cope with this, MulticoreBSP for C (from version 1.0.1 on) includes a C++-wrapper that objectifies SPMD programs. This class is defined in the <em>mcbsp.hpp</em> header file; including this file also defines <a href="http://www.multicorebsp.com/doxygen/d4/df8/mcbsp_8h.html" rel="nofollow">all regular BSP primitives</a> (that is, there is no need to include the C-header mcbsp.h).</p><p>The C++ header <em>mcbsp.hpp</em> defines the <em>mcbsp</em> namespace which contains the abstract <em>BSP_program</em> class. An SPMD section making use of the MulticoreBSP library may simply extend this class, and then must implement <em>BSP_program</em>&#039;s purely virtual methods:</p><ul><li><p>virtual void spmd() = 0;</p></li><li><p>virtual BSP_program* newInstance() = 0;</p></li></ul><p>The first method is the entry point of the SPMD code. Each thread involved in execution of this SPMD code has its own instance of the final <em>BSP_program</em>. The second method ensures that the C++-wrapper can create new instances of the user-defined class when it wants to supply a new thread with its own instance of that class. Finally, <em>BSP_program</em> defines only one other public function:</p><ul><li><p>void begin( unsigned int P = bsp_nprocs() );</p></li></ul><p>Calling this function will start parallel execution of the SPMD code over a user-supplied number of <em>P</em> processors. If <em>P</em> is not supplied, the maximum available number of processors is used (see the description of <a href="http://multicorebsp.com/doxygen/d4/df8/mcbsp_8h.html#a0ab6568273b5988ca7fe1478a48d94ef" rel="nofollow">bsp_nprocs()</a>). The use of this class deprecates the use of bsp_end(), and bsp_init( ... ); these are implied and handled by the C++-wrapper. The use of bsp_begin( unsigned int P ) is replaced by the use of <em>BSP_program</em>::begin( unsigned int P ).</p><p>An object-oriented parallel `Hello world&#039;-example now looks as follows:</p><div class="codebox"><pre class="vscroll"><code>#include &quot;mcbsp.hpp&quot;

#include &lt;cstdlib&gt;
#include &lt;iostream&gt;

using namespace mcbsp;

class Hello_World: public BSP_program {

        protected:

                virtual void spmd() {
                        std::cout &lt;&lt; &quot;Hello world from thread &quot; &lt;&lt; bsp_pid() &lt;&lt; std::endl;
                }

                virtual BSP_program * newInstance() {
                        return new Hello_World();
                }

        public:

                Hello_World() {}
};

int main() {
        BSP_program *p = new Hello_World();
        p-&gt;begin( 2 );
        p-&gt;begin();
        delete p;
        return EXIT_SUCCESS;
}</code></pre></div><p>The example demonstrates calling <em>BSP_program</em>::begin( ... ) with and without parameters. Running on a quad-core computer, example output is:</p><div class="codebox"><pre><code>Hello world from thread Hello world from thread 01

Hello world from thread 3
Hello world from thread 2
Hello world from thread 0
Hello world from thread 1</code></pre></div><p>The order of the Hello-world printouts might change between runs, and `fusion&#039; of output streams (like with the first run on 2 threads) may or may not occur in repeated runs.</p><p>Any communication between threads still follows the usual C-style functions on contiguous in-memory bytes; the C++-wrapper does not supply object-oriented communication constructs (at present).</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Sat, 17 Nov 2012 19:48:31 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=22&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[Bug? Global memory corrupted after bsp_sync() [not-a-bug]]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=21&amp;action=new</link>
			<description><![CDATA[<p>If it&#039;s searching for a position only (no changes to the tree), then passing the global variables as const parameters should already stop the compiler from pushing them onto the stack after each recursive call <img src="http://www.multicorebsp.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>It generally also helps performance to store tree-like structures in flat arrays, and transform recursive algorithms into loop-based ones (to help data locality and prevent pushing return addresses at each recursion, respectively); if your application allows such changes of course..</p><p>In any case, I hope the changes are not hard to incorporate,<br />and don&#039;t hesitate to post again if BSP issues seem to pop up! <img src="http://www.multicorebsp.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Sun, 11 Nov 2012 11:36:30 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=21&amp;action=new</guid>
		</item>
		<item>
			<title><![CDATA[MulticoreBSP for C update released: version 1.0.1 now available.]]></title>
			<link>http://www.multicorebsp.com/forum/viewtopic.php?id=19&amp;action=new</link>
			<description><![CDATA[<p>This release brings MulticoreBSP for C to Mac OS X users, and provides a wrapper for all those programming in C++, thus enabling full BSP programming on Mac computers and for C++ programmers!</p><p>See the <a href="http://www.multicorebsp.com/downloads/c/changelog.txt" rel="nofollow">changelog </a> for more details (and on other changes), and pick up the new version <a href="http://www.multicorebsp.com/?page=download&amp;section=c" rel="nofollow">here</a>.</p>]]></description>
			<author><![CDATA[dummy@example.com (Albert-Jan Yzelman)]]></author>
			<pubDate>Wed, 17 Oct 2012 15:12:39 +0000</pubDate>
			<guid>http://www.multicorebsp.com/forum/viewtopic.php?id=19&amp;action=new</guid>
		</item>
	</channel>
</rss>
