TABLE OF CONTENTS


::pwtk::bin_query

SYNOPSIS

proc ::pwtk::bin_query {{query {}}} {

USAGE

    ::pwtk::bin_query true|false

PURPOSE

Should PWTK use its "machinery" (via ::pwtk::findExecutable) to locate the QE binaries and query whether they are executable or not (default is to query, i.e. "bin_query true").

If bin_query is set to false, then QE executables (pw.x, pp.x, ph.x ...) are used verbatim without any checking if they exist or are executable.

Usually it is good to query. An example when querying should be disabled is when using executables from a software container, yet the PWTK is run outside the container.

SOURCE

    variable state

    if { $query != {} } {
        # e.g., .true. --> true
        set query [string trim $query .] 
        
        if { ! [string is boolean $query] } {
            ::pwtk::error "expecting a boolean, but got \"$query\",\nwhile executing \"bin_query $query\"" 1
        }
        set state(bin_query) [::pwtk::is_true $query]

        if { $state(bin_query) } {
            ::pwtk::print "Querying of executables is ON\n"
        } else {
            ::pwtk::print "Querying of executables is OFF\n"
        }

    }
    return $state(bin_query)
}