<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://medjava.ro/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://medjava.ro/feed.php">
        <title>Med Java - c:mpi</title>
        <description></description>
        <link>https://medjava.ro/</link>
        <image rdf:resource="https://medjava.ro/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-07T11:17:33+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:broadcast&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:clion-ide-mpi-config&amp;rev=1708528835&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:comm-split&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:hello-world&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:makefile&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:pipeline-polynomial&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:pipeline-vector-sort&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:pipeline&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:rank-sort-parallel&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:reduce&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:ring-algorithm&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:scan&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:scatter-gather&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:scatter&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:send-receive&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:topology-validation-epidemic-algorithm&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:wave-algorithm-leader-election-spanning-tree&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=c:mpi:wave-algorithm&amp;rev=1735842138&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://medjava.ro/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>Med Java</title>
        <link>https://medjava.ro/</link>
        <url>https://medjava.ro/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:broadcast&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>broadcast</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:broadcast&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Broadcast

MPI program using MPI_Bcast for broadcasting a message from one process (typically the master process) to all other processes in the communicator. 
This example will demonstrate how a single value can be sent from one process to all others in a simple and efficient way using MPI&#039;s broadcast functionality.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:clion-ide-mpi-config&amp;rev=1708528835&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-21T15:20:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>clion-ide-mpi-config</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:clion-ide-mpi-config&amp;rev=1708528835&amp;do=diff</link>
        <description>Configure CLion to run an Open MPI project on Windows

Install OpenMPI on Ubuntu

After installing WSL2/Ubuntu, run:


sudo apt-get install openmpi-bin openmpi-common libopenmpi-dev


Configure CLion to use WSL2



Change build directory

Set build directory to the root project folder:</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:comm-split&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>comm-split</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:comm-split&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Comm Split

A number of processes N, divisible by 4, are divided into groups of 4. 
Within each group, processes will form a ring and send their rank to the next process in the ring. 
The program will use MPI_Comm_split to create these groups. 
Each process will then print its original rank and the size of the original group, as well as its new rank and the size of the new group.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:hello-world&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>hello-world</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:hello-world&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Hello World


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

int main(int argc, char** argv) {
    // Initialize the MPI environment
    MPI_Init(NULL, NULL);

    // Get the number of processes
    int world_size;
    MPI_Comm_size(MPI_COMM_WORLD, &amp;world_size);

    // Get the rank of the process
    int world_rank;
    MPI_Comm_rank(MPI_COMM_WORLD, &amp;world_rank);

    // Check if the current process is the master process
    if (world_rank == 0) {
        // Master process prints this message
       …</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:makefile&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>makefile</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:makefile&amp;rev=1735842138&amp;do=diff</link>
        <description>Makefile


build:
	mpicc -o helloapp helloapp.c -pthread -Wall
run:
        mpirun -np 8 --oversubscribe helloapp
clean:
	rm -f helloapp

--</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:pipeline-polynomial&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pipeline-polynomial</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:pipeline-polynomial&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Calculate Polynom Using Pipeline

An MPI program in English to calculate a polynomial using a pipeline approach. In this example, we&#039;ll compute a polynomial of the form f(x) = ax^2 + bx + c, where a, b and c are coefficients and x is the variable.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:pipeline-vector-sort&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pipeline-vector-sort</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:pipeline-vector-sort&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Pipeline Vector Sort

Let&#039;s implement a pipeline-based sorting algorithm using MPI.

In this scenario, we have n + 1 MPI processes: 1 master and n workers. 

Each worker will eventually hold one number from the original unsorted array, and the array will be sorted in ascending order across the ranks of the workers.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:pipeline&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pipeline</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:pipeline&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Pipeline

In a pipeline pattern, data is passed through a series of processes in stages, much like an assembly line in a factory. Each process in the pipeline performs some operation on the data and then passes it to the next process.

Let&#039;s create a simple pipeline where each process receives a number, adds its rank to this number, and passes it to the next process in the pipeline. The first process starts with a number (say, 0), and the last process prints the final result. This example wi…</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:rank-sort-parallel&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>rank-sort-parallel</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:rank-sort-parallel&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Rank Sort in Parallel

We will follow the specific steps of the rank-based sorting algorithm, parallelizing the calculation of ranks. Each process will compute the rank for a subset of the vector and contribute to determining the final position of elements in the sorted array.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:reduce&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reduce</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:reduce&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Reduce

The MPI_Reduce function is used to perform a reduction operation (like sum, max, min, etc.) on values held by each process, gathering them into a single result at a designated root process.

In this example, each process will generate a random number, and we&#039;ll use</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:ring-algorithm&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ring-algorithm</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:ring-algorithm&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Ring Algorithm

In this algorithm, processes form a logical ring. Each process sends a message to the next process in the ring (the last process sends the message back to the first process). This is a typical example used to demonstrate MPI communication patterns.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:scan&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>scan</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:scan&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Scan

MPI_Scan is similar to MPI_Reduce, but instead of gathering the reduced result at a single root process, it performs a parallel prefix reduction, providing each process with a partial result of the reduction operation up to that point in the sequence of processes.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:scatter-gather&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>scatter-gather</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:scatter-gather&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Scatter and Gather

MPI program that combines both MPI_Scatter and MPI_Gather. 
In this example, the master process (rank 0) will scatter an array to all processes. Each process will perform some operation on its received portion, and then MPI_Gather</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:scatter&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>scatter</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:scatter&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Scatter

Using MPI_Scatter to distribute parts of an array from the master process to all processes in an MPI communicator. 
MPI_Scatter is used to divide an array into equal segments and distribute each segment to a different process.


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

int main(int argc, char** argv) {
    // Initialize the MPI environment
    MPI_Init(&amp;argc, &amp;argv);

    // Get the rank of the process
    int world_rank;
    MPI_Comm_rank(MPI_COMM_WORLD, &amp;world_rank);

    // Get the t…</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:send-receive&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>send-receive</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:send-receive&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Send and Receive

MPI program using MPI_Send and MPI_Recv for communication between processes. 
This program will involve two processes: the master process (rank 0) will send a message to a worker process (rank 1), which will then receive the message and print it.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:topology-validation-epidemic-algorithm&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>topology-validation-epidemic-algorithm</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:topology-validation-epidemic-algorithm&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Topology Validation Using Epidemic Algorithm

Creating a full program implementation that includes all stages—leader election, topology validation through an epidemic algorithm, and constructing a topology matrix using a tree algorithm.

Assumptions</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:wave-algorithm-leader-election-spanning-tree&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>wave-algorithm-leader-election-spanning-tree</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:wave-algorithm-leader-election-spanning-tree&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Wave algorithm with leader election and spanning tree construction

Implementing a wave algorithm with leader election and spanning tree construction in MPI is a complex task that involves multiple phases: leader election using a heartbeat algorithm, constructing a</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=c:mpi:wave-algorithm&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>wave-algorithm</title>
        <link>https://medjava.ro/doku.php?id=c:mpi:wave-algorithm&amp;rev=1735842138&amp;do=diff</link>
        <description>MPI Wave Algorithm

Implementing a wave algorithm in MPI involves creating a pattern where each process communicates with its neighbors in a specific sequence. 

This can be used to model wave-like propagation of information across the processes. 

In this example, let&#039;s consider a simple scenario where each process sends a message to its next neighbor, waits to receive a message from its previous neighbor, and then sends a confirmation back.</description>
    </item>
</rdf:RDF>
