<commit_before>
# Flex Turbine+ADLB with quick put/get
# Nice to have for quick manual experiments

# usage: mpiexec -l -n 3 bin/turbine test/adlb-putget.tcl

package require turbine 0.1

enum WORK_TYPE { T }

adlb::init [ array size WORK_TYPE ]
turbine::init

set amserver [ adlb::amserver ]

if { $amserver == 0 } {

    set rank [ adlb::rank ]
    if { $rank == 0 } {
        adlb::put $adlb::ANY $WORK_TYPE(T) "hello"
    } else {
        set msg [ adlb::get $WORK_TYPE(T) answer_rank ]
        puts "answer_rank: $answer_rank"
        puts "msg: $msg"
    }
} else {
    puts "ADLB server exited!"
}

turbine::finalize
adlb::finalize
puts OK<commit_msg>Bug fix to test case<commit_after>
# Flex Turbine+ADLB with quick put/get
# Nice to have for quick manual experiments

# usage: mpiexec -l -n 3 bin/turbine test/adlb-putget.tcl

package require turbine 0.1

enum WORK_TYPE { T }

set servers $env(ADLB_SERVERS)
if { string length $servers == 0 } { set servers 1 }
adlb::init $env( [ array size WORK_TYPE ]
turbine::init

set amserver [ adlb::amserver ]

if { $amserver == 0 } {

    set rank [ adlb::rank ]
    if { $rank == 0 } {
        adlb::put $adlb::ANY $WORK_TYPE(T) "hello"
    } else {
        set msg [ adlb::get $WORK_TYPE(T) answer_rank ]
        puts "answer_rank: $answer_rank"
        puts "msg: $msg"
    }
} else {
    puts "ADLB server exited!"
}

turbine::finalize
adlb::finalize
puts OK
{'fraction_non_alphanumeric': 0.12455767869780608, 'fraction_numerical': 0.008492569002123142, 'mean_word_length': 3.0632183908045976, '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': '6927076', 'n_tokens_mistral': 549, 'n_tokens_neox': 527, 'n_words': 153}