Mercurial > fem-fenics-eugenio
comparison src/barrier.cc @ 255:072aee55bb75
Import UFL in a parallel-safe fashion
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Wed, 30 Jul 2014 18:09:13 +0200 |
parents | |
children | 61830a4f9ab9 |
comparison
equal
deleted
inserted
replaced
254:2b51546a28f7 | 255:072aee55bb75 |
---|---|
1 /* | |
2 Copyright (C) 2014 Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> | |
3 | |
4 This program is free software; you can redistribute it and/or modify it under | |
5 the terms of the GNU General Public License as published by the Free Software | |
6 Foundation; either version 3 of the License, or (at your option) any later | |
7 version. | |
8 | |
9 This program is distributed in the hope that it will be useful, but WITHOUT | |
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
12 details. | |
13 | |
14 You should have received a copy of the GNU General Public License along with | |
15 this program; if not, see <http://www.gnu.org/licenses/>. | |
16 */ | |
17 | |
18 #include <dolfin.h> | |
19 #include <octave/oct.h> | |
20 #include "dolfin_compat.h" | |
21 | |
22 DEFUN_DLD (barrier, args, nargout, | |
23 "-*- texinfo -*-\n\ | |
24 @deftypefn {Function File} {} \ | |
25 barrier ()\n\ | |
26 Set an MPI barrier.\n\ | |
27 @end deftypefn") | |
28 { | |
29 octave_value retval; | |
30 int nargin = args.length (); | |
31 | |
32 if (nargin > 0 || nargout > 0) | |
33 print_usage (); | |
34 else | |
35 { | |
36 dolfin::MPI::barrier ( | |
37 #ifdef LATEST_DOLFIN | |
38 MPI_COMM_WORLD | |
39 #endif | |
40 ); | |
41 } | |
42 | |
43 return retval; | |
44 } |