Skip to content

Commit

Permalink
#25: better printout information about case being processed
Browse files Browse the repository at this point in the history
  • Loading branch information
ppebay committed Nov 15, 2024
1 parent a2f82d6 commit 4ff2f59
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/ccm_milp/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ def parse_json(self, data_files: list):

# Print data object
if verbose:
print("\n# Data object:")
print(f" rank_mems: {self.rank_mems}")
print(f" rank_working_bytes: {self.rank_working_bytes}")
print(f" task_loads: {self.task_loads}")
print(f" task_working_bytes: {self.task_working_bytes}")
print(f" task_footprint_bytes: {self.task_footprint_bytes}")
print(f" task_rank: {self.task_rank}")
print(f" task_id: {self.task_id}")
print(f" memory_blocks: {self.memory_blocks}")
print(f" memory_block_home: {self.memory_block_home}")
print(f" task_memory_block_mapping: {self.task_memory_block_mapping}")
print(f" task_communications: {self.task_communications}")
print("\n# Data object:")
print(f" rank_mems: {self.rank_mems}")
print(f" rank_working_bytes: {self.rank_working_bytes}")
print(f" task_loads: {self.task_loads}")
print(f" task_working_bytes: {self.task_working_bytes}")
print(f" task_footprint_bytes: {self.task_footprint_bytes}")
print(f" task_rank: {self.task_rank}")
print(f" task_id: {self.task_id}")
print(f" memory_blocks: {self.memory_blocks}")
print(f" memory_block_home: {self.memory_block_home}")
print(f" task_memory_block_mapping: {self.task_memory_block_mapping}")
print(f" task_communications: {self.task_communications}")
3 changes: 3 additions & 0 deletions src/ccm_milp/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ def sort_func(filepath):
data_files.sort(key=sort_func)

# Initialize and populate data object
print("\n# Data files:")
for df in data_files:
print(f" {df}")
data = Data(rank_mem_bnd, node_mem_bnd)
data.parse_json(data_files)
return data
Expand Down
4 changes: 2 additions & 2 deletions src/ccm_milp_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def run_batch(file_name: str):
sys.exit(1)

# Retrieve and return problem configuration
if not ccm_example and file_stem == "":
if not ccm_example and file_stem == '':
print ("*** No CCM example was defined or file_stem provided")
sys.exit(1)

Expand Down Expand Up @@ -172,7 +172,7 @@ def main():
ccm_example, fwmp, alpha, beta, gamma, delta, rank_mem_bnd, node_mem_bnd, pr_cl = run_interactive()
file_stem = ''

# Manage available example with json
# Manage available example with JSPN
data = None
if ccm_example is not None and len(ccm_example.json) > 0:
data = Generator.parse_json(ccm_example.json, rank_mem_bnd, node_mem_bnd)
Expand Down

0 comments on commit 4ff2f59

Please sign in to comment.