Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
a5c689f1
Commit
a5c689f1
authored
Nov 19, 2013
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding README file for the CODES mapping API (replicated on the codes webpage)
parent
b758f3bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
0 deletions
+78
-0
src/util/README.codes-mapping.txt
src/util/README.codes-mapping.txt
+78
-0
No files found.
src/util/README.codes-mapping.txt
0 → 100644
View file @
a5c689f1
- The codes-mapping.h header file contains the function definitions for the codes LP mapping.
Step 1: Specifying the LP types in the config file:
- Here is an example of a config file that specifies the codes LP mapping
-------------------------------example-test.conf-----------------------------
LPGROUPS
{
MODELNET_GRP
{
repetitions="16";
server="1";
example_net="1";
}
}
------------------------------------------------------------------------------
In this config file, there are multiple LP types defined in a single LP group (As we will see in a later
example, there can be multiple LP groups in a config file too). There is 1 server LP and 1 example_net
LP type in a group and this combination is repeated 16 time (repetitions="16"). ROSS will assign the
LPs to the PEs (PEs is an abstraction for MPI rank in ROSS) by placing 1 server LP then 1 example_net
LP a total of 16 times. This configuration is useful if there is some form of communication involved
between the server and example_net LP types, in which case ROSS will place them on the same PE and
communication between server and example_net LPs will not involve remote messages.
The number of server and example_net LPs can be more than 1. Lets assume if we have two example_net
LPs for each server then the config file will have the following format:
-------------------------------example-test2.conf-----------------------------
LPGROUPS
{
MODELNET_GRP
{
repetitions="16";
server="1";
example_net="2";
}
}
------------------------------------------------------------------------------
Step 2: Loading the config file in the model:
After the initialization function calls of ROSS (tw_init), the configuration file can be loaded in the
example program using:
configuration_load(example-test.conf, MPI_COMM_WORLD, &config);
Step 3: Each LP type must register itself with the lp_type_register before setting up the codes-mapping.
Following is an example function that registers 'server' lp type.
static void svr_add_lp_type()
{
lp_type_register("server", svr_get_lp_type());
}
Step 4: Call to codes_mapping_setup that sets up the LPs of each registered LP type as specified in the config
file.
codes_mapping_setup();
Step 5: Querying number of LPs in a repetition
int codes_mapping_get_lp_count(group_name, lp_type_name);
For example, to query the number of server LPs in example-test2.conf file, calling
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", "server");
will return 2.
Step 6: Querying number of repetitions in a particular group, use
int codes_mapping_get_group_reps(group_name);
For example, to query the number of repetitions in example-test2.conf file, calling
num_repetitions = codes_mapping_get_group_reps("MODELNET_GRP");
will return 16.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment