OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
mumps_io_thread.h
Go to the documentation of this file.
1/*
2 *
3 * This file is part of MUMPS 5.5.1, released
4 * on Tue Jul 12 13:17:24 UTC 2022
5 *
6 *
7 * Copyright 1991-2022 CERFACS, CNRS, ENS Lyon, INP Toulouse, Inria,
8 * Mumps Technologies, University of Bordeaux.
9 *
10 * This version of MUMPS is provided to you free of charge. It is
11 * released under the CeCILL-C license
12 * (see doc/CeCILL-C_V1-en.txt, doc/CeCILL-C_V1-fr.txt, and
13 * https://cecill.info/licences/Licence_CeCILL-C_V1-en.html)
14 *
15 */
16#ifndef MUMPS_IO_THREAD_H
17#define MUMPS_IO_THREAD_H
18#include "mumps_compat.h"
19#include "mumps_c_types.h"
20#if ! defined (MUMPS_WIN32) && ! defined (WITHOUT_PTHREAD)
21# include <unistd.h>
22# include <pthread.h>
23# include <sys/types.h>
24# include <sys/time.h>
25# include <time.h>
26# define MAX_IO 20
27# define MAX_FINISH_REQ 40
28# define IO_FLAG_STOP 1
29# define IO_FLAG_RUN 0
30# define IO_READ 1
31# define IO_WRITE 0
34 MUMPS_INT req_num; /*request number*/
35 void* addr; /*memory address (either source or dest)*/
36 long long size; /* size of the requested io (unit=size of elementary mumps data)*/
37 long long vaddr; /* virtual address for file management */
38 MUMPS_INT io_type; /*read or write*/
39 MUMPS_INT file_type; /* cb or lu or ... */
40 pthread_cond_t local_cond;
42};
43/* Exported global variables */
45extern pthread_t io_thread,main_thread;
46extern pthread_mutex_t io_mutex;
48extern pthread_mutex_t io_mutex_cond;
50extern MUMPS_INT with_sem;
51extern struct request_io *io_queue;
57/* Exported functions */
65MUMPS_INT mumps_async_write_th(const MUMPS_INT * strat_IO,void * address_block,long long block_size,
66 MUMPS_INT * inode,MUMPS_INT * request_arg,MUMPS_INT * type,long long vaddr,MUMPS_INT * ierr);
67MUMPS_INT mumps_async_read_th(const MUMPS_INT * strat_IO,void * address_block,long long block_size,MUMPS_INT * inode,MUMPS_INT * request_arg,
68 MUMPS_INT * type,long long vaddr,MUMPS_INT * ierr);
70MUMPS_INT mumps_get_sem(void *arg,MUMPS_INT *value);
71MUMPS_INT mumps_wait_sem(void *arg,pthread_cond_t *cond);
72MUMPS_INT mumps_post_sem(void *arg,pthread_cond_t *cond);
74#endif /*_WIN32 && WITHOUT_PTHREAD*/
75#endif /* MUMPS_IO_THREAD_H */
#define MUMPS_INT
MUMPS_INT with_sem
MUMPS_INT int_sem_io
pthread_cond_t cond_nb_free_finished_requests
MUMPS_INT int_sem_nb_free_finished_requests
MUMPS_INT nb_active
MUMPS_INT nb_finished_requests
MUMPS_INT mumps_owns_mutex
pthread_t main_thread
pthread_cond_t cond_nb_free_active_requests
MUMPS_INT int_sem_nb_free_active_requests
MUMPS_INT first_active
MUMPS_INT test_request_called_from_mumps
pthread_t io_thread
struct request_io * io_queue
MUMPS_INT last_finished_requests
pthread_mutex_t io_mutex_cond
MUMPS_INT first_finished_requests
MUMPS_INT * finished_requests_id
pthread_cond_t cond_stop
MUMPS_INT * finished_requests_inode
pthread_cond_t cond_io
MUMPS_INT smallest_request_id
MUMPS_INT int_sem_stop
MUMPS_INT current_req_num
MUMPS_INT last_active
MUMPS_INT io_flag_stop
pthread_mutex_t io_mutex
MUMPS_INT mumps_async_write_th(const MUMPS_INT *strat_IO, void *address_block, long long block_size, MUMPS_INT *inode, MUMPS_INT *request_arg, MUMPS_INT *type, long long vaddr, MUMPS_INT *ierr)
MUMPS_INT mumps_clean_finished_queue_th()
MUMPS_INT mumps_async_read_th(const MUMPS_INT *strat_IO, void *address_block, long long block_size, MUMPS_INT *inode, MUMPS_INT *request_arg, MUMPS_INT *type, long long vaddr, MUMPS_INT *ierr)
MUMPS_INT mumps_post_sem(void *arg, pthread_cond_t *cond)
MUMPS_INT mumps_clean_io_data_c_th(MUMPS_INT *myid)
MUMPS_INT mumps_is_there_finished_request_th(MUMPS_INT *flag)
MUMPS_INT mumps_low_level_init_ooc_c_th(MUMPS_INT *async, MUMPS_INT *ierr)
MUMPS_INT mumps_test_request_th(MUMPS_INT *request_id, MUMPS_INT *flag)
MUMPS_INT mumps_wait_request_th(MUMPS_INT *request_id)
MUMPS_INT mumps_wait_req_sem_th(MUMPS_INT *request_id)
MUMPS_INT mumps_wait_sem(void *arg, pthread_cond_t *cond)
void * mumps_async_thread_function_with_sem(void *arg)
MUMPS_INT mumps_get_sem(void *arg, MUMPS_INT *value)
MUMPS_INT mumps_clean_request_th(MUMPS_INT *request_id)
*fortran !University of Stuttgart All rights reserved Inc All rights reserved ! $COPYRIGHT$ !Additional copyrights may follow ! $HEADER$ !WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING !Do ***not ***copy this file to the directory where your Fortran !fortran application is compiled unless it is absolutely necessary !Most !modern Fortran compilers now support the I command line flag
Definition mpif.h:26
pthread_cond_t local_cond
MUMPS_INT file_type
MUMPS_INT inode
long long size
MUMPS_INT io_type
MUMPS_INT int_local_cond
MUMPS_INT req_num
long long vaddr