<commit_before>-- Messaging bandwidth and latency measurements demo.
--
-- Copyright (C) 2016 Braam Research, LLC.

import "regent"

local support
do
    terralib.linklibrary(os.getenv("SDP_SUPPORT_LIBRARY"))
    support = terralib.includec("bandwidth-latency-support.h",{"-I."})
end

task receive_change(is : ispace(int1d), r : region(is, int))
where writes(r)
do
    support.node_log("%ld: received", support.current_time_microseconds())
    for i in is do
        r[i] = 1
    end
    support.node_log("%ld: modified, sent back", support.current_time_microseconds())
end

task top_level()
    var size = 1024
    for i=10, 27 do
        var starttime = support.current_time_microseconds()
        var is = ispace(int1d, size)
        var r = region (is, int)
        fill (r,0)
        support.node_log("%ld: sending message size %d", support.current_time_microseconds(), size)
        receive_change(is, r)
        for j in is do
            if r[j] == 1 then<commit_msg>Message sizes up to 1GiB<commit_after>-- Messaging bandwidth and latency measurements demo.
--
-- Copyright (C) 2016 Braam Research, LLC.

import "regent"

local support
do
    terralib.linklibrary(os.getenv("SDP_SUPPORT_LIBRARY"))
    support = terralib.includec("bandwidth-latency-support.h",{"-I."})
end

task receive_change(is : ispace(int1d), r : region(is, int))
where writes(r)
do
    support.node_log("%ld: received", support.current_time_microseconds())
    for i in is do
        r[i] = 1
    end
    support.node_log("%ld: modified, sent back", support.current_time_microseconds())
end

task top_level()
    var size = 1024
    for i=10, 30 do
        var starttime = support.current_time_microseconds()
        var is = ispace(int1d, size)
        var r = region (is, int)
        fill (r,0)
        support.node_log("%ld: sending message size %d", support.current_time_microseconds(), size)
        receive_change(is, r)
        for j in is do
            if r[j] == 1 then
{'fraction_non_alphanumeric': 0.12034676185619582, 'fraction_numerical': 0.017848036715961243, 'mean_word_length': 3.1479915433403804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1791715', 'n_tokens_mistral': 681, 'n_tokens_neox': 640, 'n_words': 181}