libxmp/libxmpf in Omni Compiler
1.3.4
|
#include <string.h>
#include "xmpco_internal.h"
#include "_xmpco_alloc.h"
◆ _XMPCO_clean_imageDirNodes()
void _XMPCO_clean_imageDirNodes |
( |
| ) |
|
274 _imageDirNodes = NULL;
◆ _XMPCO_consume_comm_current()
MPI_Comm _XMPCO_consume_comm_current |
( |
| ) |
|
318 if (imageNodes != NULL)
319 return *(MPI_Comm*)(imageNodes->
comm);
324 return MPI_COMM_WORLD;
◆ _XMPCO_consume_imageDirNodes()
295 _imageDirNodes = NULL;
◆ _XMPCO_get_comm_current()
MPI_Comm _XMPCO_get_comm_current |
( |
| ) |
|
306 if (_imageDirNodes != NULL)
307 return *(MPI_Comm*)(_imageDirNodes->
comm);
312 return MPI_COMM_WORLD;
◆ _XMPCO_get_comm_of_nodes()
87 return *(MPI_Comm*)(nodes->
comm);
◆ _XMPCO_get_currentComm()
MPI_Comm _XMPCO_get_currentComm |
( |
| ) |
|
171 commp = (MPI_Comm*)nodes->
comm;
◆ _XMPCO_get_currentNumImages()
int _XMPCO_get_currentNumImages |
( |
| ) |
|
◆ _XMPCO_get_currentThisImage()
int _XMPCO_get_currentThisImage |
( |
| ) |
|
◆ _XMPCO_get_imageDirNodes()
288 return _imageDirNodes;
◆ _XMPCO_get_initial_image_withDescPtr()
int _XMPCO_get_initial_image_withDescPtr |
( |
int |
image, |
|
|
CoarrayInfo_t * |
descPtr |
|
) |
| |
253 if (nodesComm == MPI_COMM_NULL)
261 _XMPCO_debugPrint(
"*** got the initial image (%d) from the image mapping to nodes (%d)\n",
◆ _XMPCO_get_initialNumImages()
int _XMPCO_get_initialNumImages |
( |
| ) |
|
135 return _initialNumImages;
◆ _XMPCO_get_initialThisImage()
int _XMPCO_get_initialThisImage |
( |
| ) |
|
130 return _initialThisImage;
◆ _XMPCO_is_subset_exec()
BOOL _XMPCO_is_subset_exec |
( |
| ) |
|
◆ _XMPCO_num_images_onNodes()
◆ _XMPCO_set_imageDirNodes()
279 if (_imageDirNodes != NULL)
280 _XMP_fatal(
"INTERNAL: _imageDirNodes was not consumed but is defined.");
281 _imageDirNodes = nodes;
◆ _XMPCO_set_initialNumImages()
void _XMPCO_set_initialNumImages |
( |
| ) |
|
122 if (MPI_Comm_size(MPI_COMM_WORLD, &size) != 0)
124 "MPI_Comm_size(MPI_COMM_WORLD, ) failed");
125 _initialNumImages = size;
◆ _XMPCO_set_initialThisImage()
void _XMPCO_set_initialThisImage |
( |
| ) |
|
111 if (MPI_Comm_rank(MPI_COMM_WORLD, &rank) != 0)
113 "MPI_Comm_rank(MPI_COMM_WORLD, ) failed");
115 _initialThisImage = rank + 1;
◆ _XMPCO_this_image_onNodes()
◆ _XMPCO_transImage_current2initial()
int _XMPCO_transImage_current2initial |
( |
int |
image | ) |
|
226 if (image <= 0 || num < image)
227 _XMPCO_fatal(
"ERROR: image index (%d) not specified within the range (1 to %d)\n",
236 _XMPCO_debugPrint(
"*** got the initial image (%d) from the current image (%d)\n",
◆ _XMPCO_transImage_withComm()
int _XMPCO_transImage_withComm |
( |
MPI_Comm |
comm1, |
|
|
int |
image1, |
|
|
MPI_Comm |
comm2 |
|
) |
| |
192 int image2, rank1, rank2;
193 MPI_Group group1, group2;
194 int stat1, stat2, stat3;
197 stat1 = MPI_Comm_group(comm1, &group1);
198 stat2 = MPI_Comm_group(comm2, &group2);
203 stat3 = MPI_Group_translate_ranks(group1, 1, &rank1, group2, &rank2);
205 if (rank2 == MPI_UNDEFINED)
210 if (stat1 != 0 || stat2 != 0 || stat3 != 0)
211 _XMPCO_fatal(
"INTERNAL: _transimage_withComm failed with "
212 "stat1=%d, stat2=%d, stat3=%d",
213 stat1, stat2, stat3);
◆ XMPCO_this_image_coarray()
void XMPCO_this_image_coarray |
( |
CoarrayInfo_t * |
cinfo, |
|
|
int |
corank, |
|
|
int |
image[] |
|
) |
| |
19 int size, index, image_coarray, magic;
29 if (image_coarray == 0) {
30 for (
int i = 0; i < corank; i++)
35 magic = image_coarray - 1;
36 for (
int i = 0; i < corank; i++) {
39 image[i] = index + cinfo->
lcobound[i];
◆ XMPCO_this_image_coarray_dim()
int XMPCO_this_image_coarray_dim |
( |
CoarrayInfo_t * |
cinfo, |
|
|
int |
corank, |
|
|
int |
dim |
|
) |
| |
47 int size, index, image_coarray, magic;
53 if (dim <= 0 || corank < dim)
54 _XMPCO_fatal(
"Too large or non-positive argument 'dim' of this_image:"
64 if (image_coarray == 0)
67 magic = image_coarray - 1;
69 for (
int i = 0; i < k; i++) {
int comm_size
Definition: xmp_data_struct.h:48
int is_member
Definition: xmp_data_struct.h:46
int _XMPCO_transImage_withComm(MPI_Comm comm1, int image1, MPI_Comm comm2)
Definition: xmpco_lib.c:190
_XMP_nodes_t * _XMPCO_consume_imageDirNodes()
Definition: xmpco_lib.c:292
int _XMPCO_get_currentThisImage()
Definition: xmpco_lib.c:153
#define FALSE
Definition: xmpco_internal.h:16
void _XMPCO_debugPrint(char *format,...)
Definition: xmpco_msg.c:20
int comm_rank
Definition: xmp_data_struct.h:52
_XMP_nodes_t * _XMPCO_get_imageDirNodes()
Definition: xmpco_lib.c:286
int _XMPCO_transImage_current2initial(int image)
Definition: xmpco_lib.c:222
int * cosize
Definition: _xmpco_alloc.h:102
int _XMPCO_this_image_onNodes(_XMP_nodes_t *nodes)
Definition: xmpco_lib.c:95
_XMP_nodes_t * nodes
Definition: _xmpco_alloc.h:103
void _XMPCO_fatal(char *format,...)
Definition: xmpco_msg.c:4
#define TRUE
Definition: xmpco_internal.h:15
MPI_Comm _XMPCO_get_currentComm()
Definition: xmpco_lib.c:163
_XMP_comm_t * comm
Definition: xmp_data_struct.h:53
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
int _XMPCO_get_currentNumImages()
Definition: xmpco_lib.c:143
Definition: xmp_data_struct.h:40
BOOL _XMPCO_is_subset_exec()
Definition: xmpco_lib.c:176
int * lcobound
Definition: _xmpco_alloc.h:100
void * _XMP_get_execution_nodes(void)
Definition: xmp_nodes_stack.c:46
MPI_Comm _XMPCO_get_comm_fromCoarrayInfo(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:527