codes-org / codes

The Co-Design of Exascale Storage Architectures (CODES) simulation framework builds upon the ROSS parallel discrete event simulation engine to provide high-performance simulation utilities and models for building scalable distributed systems simulations
Other
40 stars 16 forks source link

Need safety check for event struct size with -DROSS_MEMORY (Imported #99) #99

Closed nmcglo closed 5 years ago

nmcglo commented 8 years ago

Original Issue Author: Jonathan Jenkins Original Issue ID: 99 Original Issue URL: https://xgitlab.cels.anl.gov/codes/codes/issues/99


-DROSS_MEMORY uses a fixed message size and truncates if the event is too large. There should be a safety check (even if just an assertion) to make sure this doesn't happen.

nmcglo commented 8 years ago

Jonathan Jenkins:

Patch has been committed to ROSS trunk.

nmcglo commented 8 years ago

Jonathan Jenkins:

Patch to ROSS to safety check the message size is attached. If the event message is too large then the following error will be produced when the simulation first starts:

node: 0: error: /home/pcarns/working/rossnet/trunk/ross/tw-eventq.h:168: g_tw_msg_sz of 1024 is too large.
The ROSS_MEMORY maximum buffer size (including space reserved for alignment and header) is 500.
Please reduce the message size specified by the model using tw_define_lps().
nmcglo commented 8 years ago

Jonathan Jenkins:

Test program is in CODES repo as src/models/storage/triton/memory-test.c. Instructions for how to run it can be found in src/models/storage/triton/README.memory-test.txt.

nmcglo commented 8 years ago

Jonathan Jenkins:

Will create a test program in the CODES repo to both a) exercise the memory interface and b) test corner cases with the message size. We can use this to validate potential patches to ROSS.

nmcglo commented 8 years ago

Jonathan Jenkins:

ROSS patch to check event message size

nmcglo commented 8 years ago

Jonathan Jenkins:

Status changed to closed