Skip to content

angel-devicente/thread_io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. MPI I/O with threads
    1. Compilation of test code
    2. Usage
    3. To do

MPI I/O with threads

Test code to implement I/O in MPI via a dedicated thread in process 0.

The idea here is that process 0 creates a thread that is continuously in a loop waiting for messages from all processes (including process 0 itself, in the original thread), that might arrive at any time and not necessarily the same number of them from every process.

Compilation of test code

$ mpicc  -o test_t thread_io.c test.c

Usage

mpirun -np 16 ./test_t

or if run in a cluster, see file submit.sh

This will generate n_messages from each process into stdout, stderr and also in the file test.log. The messages will not be sorted by rank, but no messages will be lost. The number of messages don't have to be the same from each process (and process 0, thread 0, has no information about the number of messages to expect), but for simplicity they are at the moment (see To do).

To do

Parameterize number of messages printed from every process and add an option to perform random "sleeps" in processes to study the behaviour of possible race conditions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published