Skip to content

Commit

Permalink
This might be the correct condition to check for.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaycedowell committed Dec 9, 2024
1 parent af9c5dc commit 2255344
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/thors_hammer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import argparse

import bifrost.ndarray as BFArray
from bifrost.ndarray import copy_array
from bifrost.packet_writer import HeaderInfo, DiskWriter

def data_size(string):
Expand Down Expand Up @@ -86,9 +85,8 @@ def main(args):
file_flags |= os.O_DIRECT | os.O_SYNC

## Make sure that the request write width matches what O_DIRECT expects
if args.npacket*args.packet_size % 512 != 0:
write_width = args.npacket*args.packet_size
raise RuntimeError(f"npacket x packet_size ({write_width}) % 512 != 0")
if args.packet_size % 512 != 0:
raise RuntimeError(f"packet_size % 512 != 0")

# Header descriptor (not populated in the case of 'generic'
desc = HeaderInfo()
Expand Down

0 comments on commit 2255344

Please sign in to comment.