SIONlib  1.7.0
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-2016 **
5 ** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 ** **
7 ** See the file COPYRIGHT in the package base directory for details **
8 ****************************************************************************/
9 
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <assert.h>
20 
21 #include <sion_debug.h>
22 #include <sion_fd.h>
23 
24 
25 #ifdef SION_OMP
26 #define SION_OMPLOCK
27 #else
28 #ifdef SION_OMPI
29 #define SION_OMPLOCK
30 #endif
31 #endif
32 
33 
34 #ifdef SION_OMPLOCK
35 #include "omp.h"
36 
37 static int _sion_opmi_first_lock = 1;
38 
39 void _sion_par_init_debug(){
40  #pragma omp critical
41  {
42 
43  if(_sion_opmi_first_lock){
44  _sion_opmi_first_lock = 0;
46  }
47 
48  }
49 }
50 
51 
52 #else
53 
54 void _sion_par_init_lock(){
55 
56 }
57 
58 #endif
59 
60 
61 
int _sion_debug_init(void)
initialize the debug environment
Definition: sion_debug.c:369