PIPS
mpi_generation.c File Reference
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "boolean.h"
#include <stdbool.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "c_syntax.h"
#include "effects.h"
#include "database.h"
#include "misc.h"
#include "text.h"
#include "text-util.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "accel-util.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "pipsdbm.h"
#include "resources.h"
#include "control.h"
#include "conversion.h"
#include "properties.h"
#include "transformations.h"
#include "effects-convex.h"
#include "syntax.h"
#include "bootstrap.h"
#include "complexity_ri.h"
#include "dg.h"
#include "graph.h"
#include "ricedg.h"
#include "chains.h"
#include "task_parallelization.h"
+ Include dependency graph for mpi_generation.c:

Go to the source code of this file.

Macros

#define FortranImplicitType(x)    ImplicitType(x)
 ImplicitType uses data structures of the Fortran parser. More...
 

Typedefs

typedef dg_arc_label arc_label
 Instantiation of the dependence graph: More...
 
typedef dg_vertex_label vertex_label
 

Functions

static bool com_statement_p (statement s)
 
static void gen_mpi_send_recv (statement stmt)
 
static void gen_if_rank (statement stmt, synchronization sync)
 
static int gen_mpi (statement stmt, int nesting_level)
 nesting_level is used to generate only a flat MPI (nesting_level = 1) hierarchical mpi is not implemented yet (nesting_level = 2) More...
 
static void gen_flat_mpi (statement stmt, int nesting_level)
 
static statement mpi_initialize (statement stmt, entity module)
 Generate int rank0; MPI_Status status0; MPI_Request *request0; ierr = MPI_Init( &argc, &argv ); ierr = MPI_Comm_rank( MPI_COMM_WORLD, &rank );. More...
 
static void mpi_finalize (statement stmt)
 
bool mpi_task_generation (char *module_name)
 mpi_generation.c More...
 

Variables

static statement init_stmt = statement_undefined
 
static entity rank
 
static entity mpi_status
 
static entity mpi_request
 

Macro Definition Documentation

◆ FortranImplicitType

#define FortranImplicitType (   x)     ImplicitType(x)

ImplicitType uses data structures of the Fortran parser.

It may fail because these data structures are not initialized, or return unexpected results if a Fortran IMPLICIT statement has been recently parsed.

Definition at line 57 of file mpi_generation.c.

Typedef Documentation

◆ arc_label

Instantiation of the dependence graph:

Definition at line 45 of file mpi_generation.c.

◆ vertex_label

Definition at line 46 of file mpi_generation.c.

Function Documentation

◆ com_statement_p()

static bool com_statement_p ( statement  s)
static

Definition at line 63 of file mpi_generation.c.

64 {
65  if(statement_loop_p(s)){
67  return com_statement_p(body);
68  }
69  else{
73  }
74 }
bool native_instruction_p(instruction i, string op_name)
Test if an instruction is a native instruction of the language.
Definition: instruction.c:144
loop statement_loop(statement)
Get the loop of a statement.
Definition: statement.c:1374
bool statement_loop_p(statement)
Definition: statement.c:349
static bool com_statement_p(statement s)
#define RECV_FUNCTION_NAME
#define SEND_FUNCTION_NAME
SPIRE API.
#define loop_body(x)
Definition: ri.h:1644
#define statement_instruction(x)
Definition: ri.h:2458

References loop_body, native_instruction_p(), RECV_FUNCTION_NAME, SEND_FUNCTION_NAME, statement_instruction, statement_loop(), and statement_loop_p().

Referenced by gen_flat_mpi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gen_flat_mpi()

static void gen_flat_mpi ( statement  stmt,
int  nesting_level 
)
static

Definition at line 171 of file mpi_generation.c.

172 {
174  switch(instruction_tag(inst))
175  {
177  {
178  int nesting_level_sequence = nesting_level;
179  MAPL(stmt_ptr,
180  {
181  statement st = STATEMENT(CAR( stmt_ptr));
182  if(nesting_level != 2){
183  nesting_level_sequence = gen_mpi(st, nesting_level) ;
184  }
185  gen_flat_mpi(st, nesting_level_sequence);
186  },
187  instruction_block(inst));
188  break;
189  }
190  case is_instruction_test :
191  {
192  test t = instruction_test(inst);
193  int nesting_level_t = gen_mpi(test_true(t), nesting_level);
194  int nesting_level_f = gen_mpi(test_false(t), nesting_level);
195  gen_flat_mpi(test_true(t), nesting_level_t);
196  gen_flat_mpi(test_false(t), nesting_level_f);
197  break;
198  }
199  case is_instruction_loop :
200  {
201  loop l = statement_loop(stmt);
202  statement body = loop_body(l);
203  if(!com_statement_p(body))
204  nesting_level =(nesting_level == 1)? 2:nesting_level;
205  gen_flat_mpi(body, nesting_level);
206  break;
207  }
208  case is_instruction_call:
209  if(com_statement_p(stmt)){
210  if(nesting_level == 2)
212  else
214  }
215  break;
216  default:
217  break;
218  }
219  return;
220 }
instruction make_continue_instruction()
Creates a CONTINUE instruction, that is the FORTRAN nop, the ";" in C or the "pass" in Python for exa...
Definition: instruction.c:79
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
Definition: newgen_list.h:203
statement update_statement_instruction(statement, instruction)
Replace the instruction in statement s by instruction i.
Definition: statement.c:3039
static int gen_mpi(statement stmt, int nesting_level)
nesting_level is used to generate only a flat MPI (nesting_level = 1) hierarchical mpi is not impleme...
static void gen_mpi_send_recv(statement stmt)
static void gen_flat_mpi(statement stmt, int nesting_level)
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
#define test_false(x)
Definition: ri.h:2837
@ is_instruction_test
Definition: ri.h:1470
@ is_instruction_call
Definition: ri.h:1474
@ is_instruction_loop
Definition: ri.h:1471
#define instruction_tag(x)
Definition: ri.h:1511
#define test_true(x)
Definition: ri.h:2835
#define instruction_test(x)
Definition: ri.h:1517
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413
Definition: statement.c:54

References CAR, com_statement_p(), gen_mpi(), gen_mpi_send_recv(), instruction_block, instruction_tag, instruction_test, is_instruction_block, is_instruction_call, is_instruction_loop, is_instruction_test, loop_body, make_continue_instruction(), MAPL, STATEMENT, statement_instruction, statement_loop(), test_false, test_true, and update_statement_instruction().

Referenced by mpi_task_generation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gen_if_rank()

static void gen_if_rank ( statement  stmt,
synchronization  sync 
)
static

Definition at line 130 of file mpi_generation.c.

130  {
141  test new_test = make_test( test_condition,
142  st,
145  statement_instruction(stmt) = inst;
149  return;
150 }
instruction copy_instruction(instruction p)
INSTRUCTION.
Definition: ri.c:1115
test make_test(expression a1, statement a2, statement a3)
Definition: ri.c:2607
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
Definition: ri.c:2222
instruction make_instruction(enum instruction_utype tag, void *val)
Definition: ri.c:1166
synchronization make_synchronization_none(void)
Definition: ri.c:2424
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
static entity rank
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
Definition: newgen-local.h:35
#define EQUAL_OPERATOR_NAME
#define STATEMENT_NUMBER_UNDEFINED
default values
#define empty_comments
Empty comments (i.e.
#define make_empty_statement
An alias for make_empty_block_statement.
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
Definition: expression.c:165
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
extensions empty_extensions(void)
extension.c
Definition: extension.c:43
#define synchronization_spawn(x)
Definition: ri.h:2657
#define statement_synchronization(x)
Definition: ri.h:2466
#define statement_label(x)
Definition: ri.h:2450
#define statement_extensions(x)
Definition: ri.h:2464
#define test_condition(x)
Definition: ri.h:2833
#define statement_comments(x)
Definition: ri.h:2456

References copy_instruction(), empty_comments, empty_extensions(), entity_intrinsic(), entity_to_expression(), EQUAL_OPERATOR_NAME, is_instruction_test, make_empty_statement, make_instruction(), make_statement(), make_synchronization_none(), make_test(), MakeBinaryCall(), NIL, rank, statement_comments, statement_extensions, statement_instruction, statement_label, STATEMENT_NUMBER_UNDEFINED, STATEMENT_ORDERING_UNDEFINED, statement_synchronization, synchronization_spawn, and test_condition.

Referenced by gen_mpi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gen_mpi()

static int gen_mpi ( statement  stmt,
int  nesting_level 
)
static

nesting_level is used to generate only a flat MPI (nesting_level = 1) hierarchical mpi is not implemented yet (nesting_level = 2)

Definition at line 154 of file mpi_generation.c.

154  {
156  switch(synchronization_tag(sync)){
158  nesting_level = (nesting_level == 0)? 1 : ((nesting_level == 1) ? 2 : nesting_level);
159  gen_if_rank(stmt, sync);
160  break;
162  //MPI_Isend, MPI_recv instructions are sufficient --> no need to
163  //generate MPI_barrier instructions
164  break;
165  default:
166  break;
167  }
168  return nesting_level;
169 }
static void gen_if_rank(statement stmt, synchronization sync)
@ is_synchronization_barrier
Definition: ri.h:2626
@ is_synchronization_spawn
Definition: ri.h:2625
#define synchronization_tag(x)
Definition: ri.h:2651

References gen_if_rank(), is_synchronization_barrier, is_synchronization_spawn, statement_synchronization, and synchronization_tag.

Referenced by gen_flat_mpi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gen_mpi_send_recv()

static void gen_mpi_send_recv ( statement  stmt)
static

Definition at line 76 of file mpi_generation.c.

77 {
78  list args = NIL, list_stmts = NIL;
80  expression dest = EXPRESSION(CAR(lexpr));
81  expression size = int_to_expression(1);
83  entity name;
85  name = make_constant_entity("MPI_Isend",is_basic_string, 100);
87  args = CONS(EXPRESSION, make_address_of_expression(exp_req), args);
88  tag = copy_expression(dest);
89  }
90  else{
91  name = make_constant_entity("MPI_Recv",is_basic_string, 100);
93  args = CONS(EXPRESSION, make_address_of_expression(exp_st), args);
95  }
96  args = CONS(EXPRESSION, make_entity_expression(make_constant_entity("MPI_COMM_WORLD", is_basic_string, 100), NIL), args);
97  args = CONS(EXPRESSION, tag, args);
98  args = CONS(EXPRESSION, dest, args);
99  expression expr = EXPRESSION(CAR(CDR(lexpr)));
101  switch(basic_tag(bas)){
102  case is_basic_int:
104  break;
105  case is_basic_float:
107  break;
108  default:
109  pips_user_warning("type not handled yet in MPI\n");
110  break;
111  }
112  args = CONS(EXPRESSION, size, args);
113  args = CONS(EXPRESSION, make_address_of_expression(expr), args);
120  com_call,
122  list_stmts = CONS(STATEMENT, st, list_stmts);
127  return;
128 }
call make_call(entity a1, list a2)
Definition: ri.c:269
expression copy_expression(expression p)
EXPRESSION.
Definition: ri.c:850
instruction make_instruction_sequence(sequence _field_)
Definition: ri.c:1169
sequence make_sequence(list a)
Definition: ri.c:2125
static statement com_call(bool neighbor, list args_com, int k)
entity make_constant_entity(string name, tag bt, size_t size)
For historical reason, call the Fortran version.
Definition: constant.c:301
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#define pips_user_warning
Definition: misc-local.h:146
static entity mpi_status
static entity mpi_request
int tag
TAG.
Definition: newgen_types.h:92
entity entity_empty_label(void)
Definition: entity.c:1105
expression make_entity_expression(entity e, cons *inds)
Definition: expression.c:176
expression make_address_of_expression(expression e)
generate a newly allocated expression for &(e)
Definition: expression.c:3956
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
Definition: expression.c:3140
@ is_basic_string
Definition: ri.h:576
@ is_basic_float
Definition: ri.h:572
@ is_basic_int
Definition: ri.h:571
#define basic_tag(x)
Definition: ri.h:613
#define type_variable(x)
Definition: ri.h:2949
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define instruction_call(x)
Definition: ri.h:1529
#define call_arguments(x)
Definition: ri.h:711
#define entity_type(x)
Definition: ri.h:2792
#define variable_basic(x)
Definition: ri.h:3120
The structure used to build lists in NewGen.
Definition: newgen_list.h:41

References basic_tag, call_arguments, CAR, CDR, com_call(), CONS, copy_expression(), empty_comments, empty_extensions(), entity_empty_label(), entity_type, EXPRESSION, expression_to_entity(), gen_nreverse(), instruction_call, int_to_expression(), is_basic_float, is_basic_int, is_basic_string, is_instruction_call, make_address_of_expression(), make_call(), make_constant_entity(), make_entity_expression(), make_instruction(), make_instruction_sequence(), make_sequence(), make_statement(), make_synchronization_none(), mpi_request, mpi_status, native_instruction_p(), NIL, pips_user_warning, SEND_FUNCTION_NAME, STATEMENT, statement_comments, statement_extensions, statement_instruction, STATEMENT_NUMBER_UNDEFINED, STATEMENT_ORDERING_UNDEFINED, statement_synchronization, type_variable, and variable_basic.

Referenced by gen_flat_mpi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpi_finalize()

static void mpi_finalize ( statement  stmt)
static

Definition at line 335 of file mpi_generation.c.

335  {
338  list list_stmts = CONS(STATEMENT, st, CONS(STATEMENT, copy_statement(stmt), NIL));
340  list_stmts = CONS(STATEMENT, return_st, list_stmts);
345  return;
346 }
statement return_st
Definition: HBDSC.c:53
statement copy_statement(statement p)
STATEMENT.
Definition: ri.c:2186
statement make_call_statement(string, list, entity, string)
This function is limited to intrinsics calls...
Definition: statement.c:1274
#define string_undefined
Definition: newgen_types.h:40
#define MPI_FINALIZE_FUNCTION_NAME
#define entity_undefined
Definition: ri.h:2761
#define statement_undefined_p(x)
Definition: ri.h:2420

References CONS, copy_statement(), empty_comments, entity_undefined, EXPRESSION, gen_nreverse(), is_basic_string, make_call_statement(), make_constant_entity(), make_entity_expression(), make_instruction_sequence(), make_sequence(), make_synchronization_none(), MPI_FINALIZE_FUNCTION_NAME, NIL, return_st, STATEMENT, statement_comments, statement_extensions, statement_instruction, statement_synchronization, statement_undefined_p, and string_undefined.

Referenced by mpi_task_generation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpi_initialize()

static statement mpi_initialize ( statement  stmt,
entity  module 
)
static

Generate int rank0; MPI_Status status0; MPI_Request *request0; ierr = MPI_Init( &argc, &argv ); ierr = MPI_Comm_rank( MPI_COMM_WORLD, &rank );.

Definition at line 230 of file mpi_generation.c.

230  {
231  list args = NIL, list_stmts = NIL;
233  statement st_body = statement_undefined, st_decls = statement_undefined;
237  {
240  }
242  if(type_undefined_p(entity_type(stat))) {
243  entity_type(stat) = FortranImplicitType(stat);
244  }
246  entity_type(mpi_status) = stat_t;
247 
250  {
253  }
255  if(type_undefined_p(entity_type(req))) {
256  entity_type(req) = FortranImplicitType(req);
257  }
259  entity_type(mpi_request) = req_t;
261 
263  list stmts = sequence_statements(statement_sequence(stmt)), body = NIL, decls = NIL;
264  FOREACH(STATEMENT, s, stmts){
266  decls = CONS(STATEMENT, s, decls);
267  print_statement(s);
268  }
269  else
270  if(!return_statement_p(s))
271  body = CONS(STATEMENT, s, body);
272  else
273  return_st = s;
274  }
275  if(gen_length(body)>0)
276  st_body = make_block_statement(gen_nreverse(body));
277  if(gen_length(decls)>0){
278  st_decls = make_block_statement(gen_nreverse(decls));
279  }
280  }
281  else
282  st_body = stmt;
283  entity name = make_constant_entity("MPI_Init",is_basic_string, 100);
286  st = make_statement(
293  list_stmts = CONS(STATEMENT, st, list_stmts);
294  name = make_constant_entity("MPI_Comm_rank",is_basic_string, 100);
295  args =NIL;
296  args = CONS(EXPRESSION, make_entity_expression(make_constant_entity("MPI_COMM_WORLD", is_basic_string, 100), NIL), args);
298  st = make_statement(
305  list_stmts = CONS(STATEMENT, st, list_stmts);
306  st = make_statement(
313  statement new_s = make_statement(
320  list_stmts = NIL;
321  if(!statement_undefined_p(st_decls))
322  list_stmts = CONS(STATEMENT, st_decls, list_stmts);
323  list_stmts = CONS(STATEMENT, new_s, CONS(STATEMENT, st, list_stmts));
324 
332  return st;
333 }
basic make_basic_typedef(entity _field_)
Definition: ri.c:185
storage make_storage_rom(void)
Definition: ri.c:2285
entity copy_entity(entity p)
ENTITY.
Definition: ri.c:2521
void put_new_typedef(const char *)
This function is used by libraries "step"* and "task_parallelization".
Definition: util.c:1078
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398
statement make_block_statement(list)
Make a block statement from a list of statement.
Definition: statement.c:616
size_t gen_length(const list l)
Definition: list.c:150
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
Definition: statement.c:1328
bool statement_sequence_p(statement)
Statement classes induced from instruction type.
Definition: statement.c:335
bool return_statement_p(statement)
Test if a statement is a C or Fortran "return".
Definition: statement.c:172
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
Definition: statement.c:224
#define FortranImplicitType(x)
ImplicitType uses data structures of the Fortran parser.
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
static char * module
Definition: pips.c:74
void print_statement(statement)
Print a statement on stderr.
Definition: statement.c:98
#define MPI_STATUS
PI types.
#define MPI_REQUEST
entity FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
Definition: entity.c:1586
basic MakeBasic(int)
END_EOLE.
Definition: type.c:128
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
Definition: variable.c:233
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
Definition: variable.c:592
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
Definition: type.c:116
#define entity_storage(x)
Definition: ri.h:2794
#define type_undefined_p(x)
Definition: ri.h:2884
#define sequence_statements(x)
Definition: ri.h:2360
#define storage_undefined_p(x)
Definition: ri.h:2477
#define statement_undefined
Definition: ri.h:2419
A gen_chunk is used to store every object.
Definition: genC.h:58

References AddLocalEntityToDeclarations(), CONS, copy_entity(), copy_instruction(), declaration_statement_p(), empty_comments, empty_extensions(), entity_storage, entity_to_expression(), entity_type, EXPRESSION, FindOrCreateEntity(), FOREACH, FortranImplicitType, gen_consistent_p(), gen_length(), gen_nreverse(), is_basic_int, is_basic_string, is_instruction_call, make_address_of_expression(), make_basic_typedef(), make_block_statement(), make_call(), make_constant_entity(), make_entity_expression(), make_instruction(), make_instruction_sequence(), make_new_scalar_variable_with_prefix(), make_sequence(), make_statement(), make_storage_rom(), make_synchronization_none(), MakeBasic(), MakeTypeVariable(), module, MPI_REQUEST, mpi_request, MPI_STATUS, mpi_status, NIL, print_statement(), put_new_typedef(), rank, return_st, return_statement_p(), sequence_statements, STATEMENT, statement_comments, statement_extensions, statement_instruction, statement_label, STATEMENT_NUMBER_UNDEFINED, STATEMENT_ORDERING_UNDEFINED, statement_sequence(), statement_sequence_p(), statement_synchronization, statement_undefined, statement_undefined_p, storage_undefined_p, TOP_LEVEL_MODULE_NAME, and type_undefined_p.

Referenced by mpi_task_generation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpi_task_generation()

bool mpi_task_generation ( char *  module_name)

mpi_generation.c

Parameters
module_nameodule_name

Definition at line 348 of file mpi_generation.c.

349 {
351  statement module_stat_i = (statement)db_get_memory_resource(DBR_DISTRIBUTED_SPIRE_CODE, module_name, true);
352  statement module_stat = copy_statement(module_stat_i);
353  set_ordering_to_statement(module_stat);
355  set_current_module_statement(module_stat);
356  init_stmt = mpi_initialize(module_stat, module);
357  gen_flat_mpi(module_stat, 0);
358  mpi_finalize(module_stat);
359  module_reorder(module_stat);
360  gen_consistent_p((gen_chunk*)module_stat);
361  DB_PUT_MEMORY_RESOURCE(DBR_PARALLELIZED_CODE, module_name, module_stat);
365  return true;
366 }
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
Definition: pipsdbm-local.h:66
static statement mpi_initialize(statement stmt, entity module)
Generate int rank0; MPI_Status status0; MPI_Request *request0; ierr = MPI_Init( &argc,...
static void mpi_finalize(statement stmt)
static statement init_stmt
hash_table set_ordering_to_statement(statement s)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
Definition: ordering.c:172
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
Definition: ordering.c:185
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479

References copy_statement(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, gen_consistent_p(), gen_flat_mpi(), init_stmt, local_name_to_top_level_entity(), module, module_name(), module_name_to_entity(), module_reorder(), mpi_finalize(), mpi_initialize(), reset_current_module_entity(), reset_current_module_statement(), reset_ordering_to_statement(), set_current_module_entity(), set_current_module_statement(), and set_ordering_to_statement().

+ Here is the call graph for this function:

Variable Documentation

◆ init_stmt

statement init_stmt = statement_undefined
static

◆ mpi_request

entity mpi_request
static

Definition at line 61 of file mpi_generation.c.

Referenced by gen_mpi_send_recv(), and mpi_initialize().

◆ mpi_status

entity mpi_status
static

Definition at line 61 of file mpi_generation.c.

Referenced by gen_mpi_send_recv(), and mpi_initialize().

◆ rank