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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Elsa Gonsiorowski
codes
Commits
47aed8d9
Commit
47aed8d9
authored
Jan 26, 2016
by
Misbah Mubarak
Browse files
Options
Browse Files
Download
Plain Diff
Merging branches with master, adding model-net sampling
parents
49d4681d
d5992009
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
268 additions
and
6 deletions
+268
-6
CONTRIBUTORS.md
CONTRIBUTORS.md
+1
-0
codes/codes-callback.h
codes/codes-callback.h
+8
-0
codes/codes-jobmap.h
codes/codes-jobmap.h
+8
-0
codes/codes-mapping-context.h
codes/codes-mapping-context.h
+8
-0
codes/codes-workload.h
codes/codes-workload.h
+8
-0
codes/codes.h
codes/codes.h
+8
-0
codes/codes_mapping.h
codes/codes_mapping.h
+14
-0
codes/configuration.h
codes/configuration.h
+8
-0
codes/jenkins-hash.h
codes/jenkins-hash.h
+8
-0
codes/local-storage-model.h
codes/local-storage-model.h
+8
-0
codes/lp-io.h
codes/lp-io.h
+8
-0
codes/lp-msg.h
codes/lp-msg.h
+8
-0
codes/lp-type-lookup.h
codes/lp-type-lookup.h
+8
-0
codes/model-net-inspect.h
codes/model-net-inspect.h
+8
-0
codes/model-net-lp.h
codes/model-net-lp.h
+8
-0
codes/model-net-method.h
codes/model-net-method.h
+8
-0
codes/model-net-sched.h
codes/model-net-sched.h
+8
-0
codes/model-net.h
codes/model-net.h
+9
-0
codes/net/dragonfly.h
codes/net/dragonfly.h
+8
-0
codes/net/loggp.h
codes/net/loggp.h
+8
-0
codes/net/simplenet-upd.h
codes/net/simplenet-upd.h
+8
-0
codes/net/simplep2p.h
codes/net/simplep2p.h
+8
-0
codes/net/torus.h
codes/net/torus.h
+8
-0
codes/quickhash.h
codes/quickhash.h
+8
-0
codes/quicklist.h
codes/quicklist.h
+8
-0
codes/rc-stack.h
codes/rc-stack.h
+8
-0
codes/resource-lp.h
codes/resource-lp.h
+8
-0
codes/resource.h
codes/resource.h
+7
-0
doc/BUILD_STEPS
doc/BUILD_STEPS
+10
-6
doc/GETTING_STARTED
doc/GETTING_STARTED
+32
-0
doc/codes-best-practices.tex
doc/codes-best-practices.tex
+3
-0
No files found.
CONTRIBUTORS.md
0 → 100644
View file @
47aed8d9
TODO: add contributors here
codes/codes-callback.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef CODES_CALLBACK_H
#define CODES_CALLBACK_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <assert.h>
#include "codes/lp-msg.h"
...
...
@@ -83,6 +87,10 @@ struct codes_cb_params {
assert(_esize >= (_cb_info_ptr)->cb_ret_offset + sizeof(_ret_type)); \
} while (0)
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: CODES_CALLBACK_H */
/*
...
...
codes/codes-jobmap.h
View file @
47aed8d9
...
...
@@ -20,6 +20,10 @@
#ifndef CODES_JOBMAP_H
#define CODES_JOBMAP_H
#ifdef __cplusplus
extern
"C"
{
#endif
/** type markers and parameter defs for jobmaps **/
enum
codes_jobmap_type
{
...
...
@@ -80,6 +84,10 @@ int codes_jobmap_get_num_jobs(struct codes_jobmap_ctx const * c);
int
codes_jobmap_get_num_ranks
(
int
job_id
,
struct
codes_jobmap_ctx
const
*
c
);
#ifdef __cplusplus
}
#endif
#endif
/*
...
...
codes/codes-mapping-context.h
View file @
47aed8d9
...
...
@@ -13,6 +13,10 @@
#ifndef CODES_MAPPING_CONTEXT_H
#define CODES_MAPPING_CONTEXT_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdbool.h>
#include <ross.h>
...
...
@@ -101,6 +105,10 @@ char const * codes_mctx_get_annotation(
char
const
*
dest_lp_name
,
tw_lpid
sender_id
);
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: CODES_MAPPING_CONTEXT_H */
/*
...
...
codes/codes-workload.h
View file @
47aed8d9
...
...
@@ -12,6 +12,10 @@
#ifndef CODES_WORKLOAD_H
#define CODES_WORKLOAD_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
#include "configuration.h"
...
...
@@ -326,6 +330,10 @@ void codes_workload_add_method(struct codes_workload_method const * method);
* will shut down automatically once they have issued their last event.
*/
#ifdef __cplusplus
}
#endif
#endif
/* CODES_WORKLOAD_H */
/*
...
...
codes/codes.h
View file @
47aed8d9
...
...
@@ -8,6 +8,10 @@
#ifndef CODES_H
#define CODES_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
#include <assert.h>
...
...
@@ -90,6 +94,10 @@ static inline void codes_local_latency_reverse(tw_lp *lp)
return
;
}
#ifdef __cplusplus
}
#endif
#endif
/* CODES_H */
/*
...
...
codes/codes_mapping.h
View file @
47aed8d9
...
...
@@ -7,6 +7,14 @@
/* SUMMARY:
* CODES custom mapping file for ROSS
*/
#ifndef CODES_MAPPING_H
#define CODES_MAPPING_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include "configuration.h"
#include "codes.h"
#include "lp-type-lookup.h"
...
...
@@ -220,6 +228,12 @@ int codes_mapping_get_anno_cid_by_name(char const * annotation);
int
codes_mapping_get_anno_cid_by_lpid
(
tw_lpid
id
);
char
const
*
codes_mapping_get_anno_name_by_cid
(
int
cid
);
#ifdef __cplusplus
}
#endif
#endif
/*
* Local variables:
* c-indent-level: 4
...
...
codes/configuration.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef __CONFIGURATION_H__
#define __CONFIGURATION_H__
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stddef.h>
#include <inttypes.h>
#include <mpi.h>
...
...
@@ -249,6 +253,10 @@ extern ConfigHandle config;
extern
config_lpgroups_t
lpconf
;
#ifdef __cplusplus
}
#endif
#endif
/*
...
...
codes/jenkins-hash.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef __JENKINS_HASH__
#define __JENKINS_HASH__
#ifdef __cplusplus
extern
"C"
{
#endif
#include <sys/types.h>
#include <stdint.h>
...
...
@@ -39,6 +43,10 @@ void bj_hashlittle2(
*/
#define bj_hashmask(n) (bj_hashsize(n)-1)
#ifdef __cplusplus
}
#endif
#endif
/*
...
...
codes/local-storage-model.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef __LS_MODEL__
#define __LS_MODEL__
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
#include "codes-callback.h"
...
...
@@ -110,6 +114,10 @@ void lsm_configure(void);
#define LSM_DEBUG 0
#ifdef __cplusplus
}
#endif
#endif
/*
...
...
codes/lp-io.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef LP_IO_H
#define LP_IO_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
typedef
char
*
lp_io_handle
;
...
...
@@ -33,6 +37,10 @@ static inline char* lp_io_handle_to_dir(lp_io_handle handle)
return
(
strdup
(
handle
));
}
#ifdef __cplusplus
}
#endif
#endif
/* LP_IO_H */
/*
...
...
codes/lp-msg.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef LP_MSG_H
#define LP_MSG_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include "ross.h"
/* It is good practice to always include the src LPID, a unique message
...
...
@@ -24,6 +28,10 @@ typedef struct msg_header_s {
/* data structure utilities */
void
msg_set_header
(
int
magic
,
int
event_type
,
tw_lpid
src
,
msg_header
*
h
);
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: LP_MSG_H */
/*
...
...
codes/lp-type-lookup.h
View file @
47aed8d9
...
...
@@ -8,6 +8,10 @@
#ifndef LP_TYPE_LOOKUP_H
#define LP_TYPE_LOOKUP_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include "ross.h"
/* look up the lp type registered through lp_type_register. Mostly used
...
...
@@ -17,6 +21,10 @@ const tw_lptype* lp_type_lookup(const char* name);
/* register an LP with CODES/ROSS */
void
lp_type_register
(
const
char
*
name
,
const
tw_lptype
*
type
);
#ifdef __cplusplus
}
#endif
#endif
/* LP_TYPE_LOOKUP_H */
/*
...
...
codes/model-net-inspect.h
View file @
47aed8d9
...
...
@@ -10,6 +10,10 @@
#ifndef MODEL_NET_INSPECT_H
#define MODEL_NET_INSPECT_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* ALL FUNCTIONS
* anno is the annotation specified in the configuration (NULL -> no
* annotation), while ignore_annotations is a flag controlling whether
...
...
@@ -37,6 +41,10 @@ int model_net_torus_get_flat_id(
const
int
*
dim_lens
,
const
int
*
dim_ids
);
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: MODEL_NET_INSPECT_H */
/*
...
...
codes/model-net-lp.h
View file @
47aed8d9
...
...
@@ -13,6 +13,10 @@
#ifndef MODEL_NET_LP_H
#define MODEL_NET_LP_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
#include "codes/lp-msg.h"
#include "model-net.h"
...
...
@@ -126,6 +130,10 @@ typedef struct model_net_wrap_msg {
}
msg
;
}
model_net_wrap_msg
;
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: MODEL_NET_LP_H */
/*
...
...
codes/model-net-method.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef MODELNET_METHOD_H
#define MODELNET_METHOD_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
// forward decl of model_net_method since we currently have a circular include
...
...
@@ -63,6 +67,10 @@ struct model_net_method
extern
struct
model_net_method
*
method_array
[];
#ifdef __cplusplus
}
#endif
#endif
/* MODELNET_METHOD_H */
/*
...
...
codes/model-net-sched.h
View file @
47aed8d9
...
...
@@ -9,6 +9,10 @@
#ifndef MODEL_NET_SCHED_H
#define MODEL_NET_SCHED_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
#include "model-net.h"
...
...
@@ -195,6 +199,10 @@ void model_net_sched_set_default_params(mn_sched_params *sched_params);
extern
char
*
sched_names
[];
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: MODEL_NET_SCHED_H */
/*
...
...
codes/model-net.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef MODELNET_H
#define MODELNET_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
#include <codes/lp-type-lookup.h>
#include <codes/configuration.h>
...
...
@@ -397,6 +401,11 @@ void model_net_print_stats(tw_lpid lpid, mn_stats mn_stats_array[]);
/* find model-net statistics */
mn_stats
*
model_net_find_stats
(
char
const
*
category
,
mn_stats
mn_stats_array
[]);
#ifdef __cplusplus
}
#endif
#endif
/* MODELNET_H */
/*
...
...
codes/net/dragonfly.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef DRAGONFLY_H
#define DRAGONFLY_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
typedef
struct
terminal_message
terminal_message
;
...
...
@@ -92,6 +96,10 @@ struct terminal_message
tw_lpid
next_stop
;
};
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: DRAGONFLY_H */
/*
...
...
codes/net/loggp.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef LOGGP_H
#define LOGGP_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include "../model-net-sched.h"
/* types of events that will constitute triton requests */
...
...
@@ -45,6 +49,10 @@ struct loggp_message
tw_stime
recv_time_saved
;
};
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: LOGGP_H */
/*
...
...
codes/net/simplenet-upd.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef SIMPLENET_UPD_H
#define SIMPLENET_UPD_H
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
struct
sn_message
sn_message
;
/* types of events that will constitute triton requests */
...
...
@@ -39,6 +43,10 @@ struct sn_message
tw_stime
recv_time_saved
;
};
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: SIMPLENET_UPD_H */
/*
* Local variables:
...
...
codes/net/simplep2p.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef SIMPLEP2P_H
#define SIMPLEP2P_H
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
struct
sp_message
sp_message
;
enum
sp_event_type
...
...
@@ -47,6 +51,10 @@ struct sp_message
tw_stime
recv_prev_idle_all_saved
;
};
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: SIMPLEP2P_H */
/*
...
...
codes/net/torus.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef TORUS_H
#define TORUS_H
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
enum
nodes_event_t
nodes_event_t
;
typedef
struct
nodes_message
nodes_message
;
...
...
@@ -90,6 +94,10 @@ struct nodes_message
int
remote_event_size_bytes
;
};
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: TORUS_H */
/*
...
...
codes/quickhash.h
View file @
47aed8d9
...
...
@@ -14,6 +14,10 @@
#ifndef SRC_COMMON_UTIL_QUICKHASH_H
#define SRC_COMMON_UTIL_QUICKHASH_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdlib.h>
#include <stdint.h>
#include "codes/quicklist.h"
...
...
@@ -336,6 +340,10 @@ static inline int quickhash_null32_hash(void *k, int table_size)
return
(
int
)(
*
tmp
&
(
table_size
-
1
));
}
#ifdef __cplusplus
}
#endif
#endif
/* SRC_COMMON_UTIL_QUICKHASH_H */
/*
...
...
codes/quicklist.h
View file @
47aed8d9
...
...
@@ -25,6 +25,10 @@
#ifndef QUICKLIST_H
#define QUICKLIST_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdlib.h>
struct
qlist_head
{
...
...
@@ -289,4 +293,8 @@ static inline struct qlist_head * qlist_find(
* vim: ts=8 sts=4 sw=4 expandtab
*/
#ifdef __cplusplus
}
#endif
#endif
/* QUICKLIST_H */
codes/rc-stack.h
View file @
47aed8d9
...
...
@@ -7,6 +7,10 @@
#ifndef RC_STACK_H
#define RC_STACK_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
/* A simple stack data structure that is GVT-aware for cleanup purposes. It's
...
...
@@ -49,6 +53,10 @@ int rc_stack_count(struct rc_stack const *s);
* a NULL lp causes a delete-all */
void
rc_stack_gc
(
tw_lp
const
*
lp
,
struct
rc_stack
*
s
);
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: RC-STACK_H */
/*
...
...
codes/resource-lp.h
View file @
47aed8d9
...
...
@@ -11,6 +11,10 @@
#ifndef RESOURCE_LP_H
#define RESOURCE_LP_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <ross.h>
#include <stdint.h>
...
...
@@ -89,6 +93,10 @@ void resource_lp_reserve_rc(tw_lp *sender);
void
resource_lp_get_reserved_rc
(
tw_lp
*
sender
);
void
resource_lp_free_reserved_rc
(
tw_lp
*
sender
);
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: RESOURCE_LP_H */
/*
...
...
codes/resource.h
View file @
47aed8d9
...
...
@@ -14,6 +14,10 @@
#ifndef RESOURCE_H
#define RESOURCE_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include <stdint.h>
...
...
@@ -69,6 +73,9 @@ struct resource_s {
unsigned
int
num_tokens
;
};
#ifdef __cplusplus
}
#endif
#endif
/* end of include guard: RESOURCE_H */
...
...
doc/BUILD_STEPS
View file @
47aed8d9
...
...
@@ -27,17 +27,21 @@ working from the CODES master branches, use the ROSS master branch.
If using ccmake to configure, don'
t
forget
to
set
CMAKE_C_COMPILER
and
CMAKE_CXX_COMPILER
to
mpicc
/
mpicxx
1 - If you are building
codes
directly from the repository, run
1
-
If
you
are
building
CODES
directly
from
the
repository
,
run
./
prepare
.
sh
2 - Configure codes. This can be done in the source directory or in a
2
-
CODES
requires
pkg
-
config
and
non
-
ancient
versions
of
flex
/
bison
(
i
.
e
.
there
have
been
problems
with
the
Mac
version
).
Use
your
favorite
package
manager
to
obtain
them
.
3
-
Configure
CODES
.
This
can
be
done
in
the
source
directory
or
in
a
dedicated
build
directory
if
you
prefer
out
-
of
-
tree
builds
.
The
CC
environment
variable
must
refer
to
an
MPI
compiler
.
mkdir
build
cd
build
../configure --prefix=/path/to/codes
-base
/install CC=mpicc PKG_CONFIG_PATH=/path/to/ross/install/lib/pkgconfig
../
configure
--
prefix
=/
path
/
to
/
codes
/
install
CC
=
mpicc
PKG_CONFIG_PATH
=/
path
/
to
/
ross
/
install
/
lib
/
pkgconfig
To
enable
network
tracing
with
dumpi
(
http
://
sst
.
sandia
.
gov
/
about_dumpi
.
html
),
use
the
option
...
...
@@ -57,15 +61,15 @@ working from the CODES master branches, use the ROSS master branch.
<
DARSHAN_PREFIX
>/
lib
/
pkgconfig
to
your
PKG_CONFIG_PATH
environment
variable
before
calling
configure
.
3 - Build and install codes-base
4
-
Build
and
install
CODES
make
&&
make
install
4
- (optional) run test programs
5
-
(
optional
)
run
test
programs
make
tests
&&
make
check
5 - codes-base
uses flex and bison (or lex and yacc) to generate several
6
-
codes
uses
flex
and
bison
(
or
lex
and
yacc
)
to
generate
several
parsers
.
These
tools
auto
-
generate
C
source
files
.
To
get
around
versioning
issues
,
we
've distributed the auto-generated sources directly. To remove
all of the autogenerated files for these parsers, execute
...
...
doc/GETTING_STARTED
View file @
47aed8d9
...
...
@@ -153,6 +153,38 @@ The following restrictions currently apply to the IO language:
Hence
,
getgroupid
should
be
completely
ignored
and
getgrouprank
and
getgroupsize
ignore
the
group
ID
parameter
passed
in
.
=====
Limitations
The
IO
language
is
frozen
and
no
future
development
will
be
happening
with
it
,
so
keep
the
following
limitations
in
mind
when
using
it
.
*
There
is
currently
no
way
to
specify
a
"create"
flag
to
open
.
*
Variables
are
expected
to
be
a
single
lowercase
character
.
====
"Mock"
IO
workload
The
mock
IO
workload
generator
creates
a
sequential
workload
of
N
requests
of
size
M
.
The
generated
file
ID
is
either
an
optional
input
or
0
-
there
's also
an option to add a (simulated) processes rank to the file IDs, giving in effect
a unique file per rank. Relevant configuration parameters are:
* mock_num_requests - the number of requests
* mock_request_size - the size of each request
* mock_request_type - the type of request ("read" or "write")
* mock_file_id (optional) - the file ID to use, default 0
* mock_use_unique_file_ids (optional) - if non-zero, add the workload
processor'
s
rank
to
the
file
ID
.
Default
is
0.
*
mock_rank_table_size
(
optional
)
-
the
hash
table
size
to
store
the
ranks
in
.
For
minimal
collisions
,
choose
a
value
larger
than
the
expected
workload
number
of
ranks
.
====
Recorder
IO
workload
TODO
...
====
Checkpoint
IO
workload
TODO
...
===
Network
Our
primary
network
workload
generator
is
via
the
DUMPI
tool
...
...
doc/codes-best-practices.tex
View file @
47aed8d9
...
...
@@ -345,6 +345,9 @@ implement -- steps 2--4 are a few lines of code each. Also, LP-IO can be
used upon encountering a suspend condition to give error specifics (the reverse
write would occur in the reverse handler in step 3).
Note that ROSS now has a self-suspend API -- the hand-implementation may still
be used, but it is preferable to use the ROSS version.
\subsection
{
Stash data needed for reverse computation within event structures
}
Writing discrete-event simulations will necessarily involve ``destructive''
...
...
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