SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
sion_lock.c
Go to the documentation of this file.
1 /****************************************************************************
2 ** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 *****************************************************************************
4 ** Copyright (c) 2008-2019 **
5 ** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 ** **
7 ** See the file COPYRIGHT in the package base directory for details **
8 ****************************************************************************/
9 
17 #define _XOPEN_SOURCE 700
18 
19 #include <stdlib.h>
20 #include <stdio.h>
21 #include <assert.h>
22 
23 #include <sion_debug.h>
24 #include <sion_fd.h>
25 
26 
27 #ifdef SION_OMP
28 #define SION_OMPLOCK
29 #else
30 #ifdef SION_OMPI
31 #define SION_OMPLOCK
32 #endif
33 #endif
34 
35 
36 #ifdef SION_OMPLOCK
37 #include "omp.h"
38 
39 static int _sion_opmi_first_lock = 1;
40 
41 void _sion_par_init_debug(void){
42  #pragma omp critical
43  {
44 
45  if(_sion_opmi_first_lock){
46  _sion_opmi_first_lock = 0;
48  }
49 
50  }
51 }
52 
53 
54 #else
55 
56 void _sion_par_init_lock(void){
57 
58 }
59 
60 #endif
61 
62 
63 
int _sion_debug_init(void)
initialize the debug environment
Definition: sion_debug.c:371