### Install DIJITSO to a custom directory Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/installation.html Use the --prefix flag to specify a custom installation location. ```bash pip install --prefix= . ``` -------------------------------- ### Install DIJITSO via pip Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/installation.html Standard command to install the package from the source directory. ```bash pip install . ``` -------------------------------- ### dijitso.cmdline.cmd_config(args, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Show configuration. ```APIDOC ## dijitso.cmdline.cmd_config(args, params) ### Description Show configuration. ### Method Command-line subcommand ### Parameters - **args** (Namespace) - Required - Command-line arguments. - **params** (dict) - Required - Parameters for the command. ### Usage ``` dijitso-cache config ...args ``` ``` -------------------------------- ### dijitso.cmdline.cmd_show(args, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Show lists of files in cache. ```APIDOC ## dijitso.cmdline.cmd_show(args, params) ### Description Show lists of files in cache. ### Method Command-line subcommand ### Parameters - **args** (Namespace) - Required - Command-line arguments. - **params** (dict) - Required - Parameters for the command. ### Usage ``` dijitso-cache show ...args ``` ``` -------------------------------- ### dijitso.cmdline.cmd_checkout(args, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Copy files from cache to a directory. ```APIDOC ## dijitso.cmdline.cmd_checkout(args, params) ### Description Copy files from cache to a directory. ### Method Command-line subcommand ### Parameters - **args** (Namespace) - Required - Command-line arguments. - **params** (dict) - Required - Parameters for the command. ### Usage ``` dijitso-cache checkout ...args ``` ``` -------------------------------- ### dijitso.cmdline.cmd_version(args, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Print dijitso version. ```APIDOC ## dijitso.cmdline.cmd_version(args, params) ### Description Print dijitso version. ### Method Command-line subcommand ### Parameters - **args** (Namespace) - Required - Command-line arguments. - **params** (dict) - Required - Parameters for the command. ### Usage ``` dijitso-cache version ...args ``` ``` -------------------------------- ### dijitso.jit.jit(jitable, name, params, generate=None, send=None, receive=None, wait=None) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Just-in-time compile and import of a shared library with a cache mechanism. ```APIDOC ## dijitso.jit.jit(jitable, name, params, generate=None, send=None, receive=None, wait=None) ### Description Just-in-time compile and import of a shared library with a cache mechanism. A signature is computed from the name, params["generator"], and params["build"]. The name should be a unique identifier for the jitable, preferably produced by a good hash function. The signature is used to identify if the library has already been compiled and cached. A two-level memory and disk cache ensures good performance for repeated lookups within a single program as well as persistence across program runs. ### Parameters - **jitable** (object) - Required - The object to be compiled. - **name** (str) - Required - Unique identifier for the jitable. - **params** (dict) - Required - Parameters including "generator" and "build". - **generate** (callable) - Optional - Function to generate source code. Expected signature: generate(jitable, name, signature, params["generator"]) returning (header, source, dependencies). - **send** (callable) - Optional - Function to send compiled binary as a numpy array. - **receive** (callable) - Optional - Function to receive compiled binary as a numpy array. - **wait** (callable) - Optional - Function to wait before loading the compiled library. ### Returns - **lib** (ctypes.CDLL) - The loaded shared library. ### Usage ```python lib = dijitso.jit.jit(jitable, name, params) ``` ``` -------------------------------- ### dijitso.cmdline.cmd_grep(args, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Grep content of header and source file(s) in cache. ```APIDOC ## dijitso.cmdline.cmd_grep(args, params) ### Description Grep content of header and source file(s) in cache. ### Method Command-line subcommand ### Parameters - **args** (Namespace) - Required - Command-line arguments. - **params** (dict) - Required - Parameters for the command. ### Usage ``` dijitso-cache grep ...args ``` ``` -------------------------------- ### dijitso.mpi.receive_binary Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Receives a compiled library as a binary blob over MPI and stores it to cache. ```APIDOC ## dijitso.mpi.receive_binary ### Description Store shared library received as a binary blob to cache. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. ### Returns None ``` -------------------------------- ### dijitso.mpi.create_comms_and_role_root Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Creates communicators and role for the root-based build strategy. ```APIDOC ## dijitso.mpi.create_comms_and_role_root ### Description Approach: global root builds and sends binary to node roots, everyone waits on their node group. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **node_comm** - Required - The node communicator. - **node_root** - Required - The node root rank. ### Returns Returns (copy_comm, wait_comm, role). ``` -------------------------------- ### dijitso-cache subcommand help Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Displays the help text for a specific dijitso-cache subcommand. The help text is taken from the docstring of the corresponding cmd_ function. ```text dijitso-cache cmdname --help ``` -------------------------------- ### dijitso.jit.jit_signature(name, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Compute the signature that jit will use for given name and params. ```APIDOC ## dijitso.jit.jit_signature(name, params) ### Description Compute the signature that jit will use for given name and params. ### Parameters - **name** (str) - Required - Unique identifier for the jitable. - **params** (dict) - Required - Parameters including "generator" and "build". ### Returns - **signature** (str) - The computed signature. ### Usage ```python sig = dijitso.jit.jit_signature(name, params) ``` ``` -------------------------------- ### dijitso.mpi.create_comms_and_role_process Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Creates communicators and role for the process-based build strategy. ```APIDOC ## dijitso.mpi.create_comms_and_role_process ### Description Approach: each process builds its own module, no communication. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **node_comm** - Required - The node communicator. - **node_root** - Required - The node root rank. ### Returns Returns (copy_comm, wait_comm, role). ``` -------------------------------- ### dijitso.mpi.send_binary Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Sends a compiled library as a binary blob over MPI. ```APIDOC ## dijitso.mpi.send_binary ### Description Send compiled library as binary blob over MPI. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **lib_data** - Required - The compiled library data. ### Returns None ``` -------------------------------- ### dijitso.mpi.create_comms_and_role Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Determines the role of each process and creates the appropriate communicators for the build strategy. ```APIDOC ## dijitso.mpi.create_comms_and_role ### Description Determine which role each process should take, and create the right copy_comm and wait_comm for the build strategy. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **comm_dir** - Required - The directory for communication. - **buildon** (str) - Required - Must be one of "root", "node", or "process". ### Returns Returns (copy_comm, wait_comm, role). ``` -------------------------------- ### dijitso.cmdline.cmd_clean(args, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Remove files from cache. ```APIDOC ## dijitso.cmdline.cmd_clean(args, params) ### Description Remove files from cache. ### Method Command-line subcommand ### Parameters - **args** (Namespace) - Required - Command-line arguments. - **params** (dict) - Required - Parameters for the command. ### Usage ``` dijitso-cache clean ...args ``` ``` -------------------------------- ### dijitso.mpi.create_node_roots_comm Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Creates a communicator for the node roots. ```APIDOC ## dijitso.mpi.create_node_roots_comm ### Description Build comm for communicating among the node roots. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **node_root** - Required - The node root rank. ### Returns The node roots communicator. ``` -------------------------------- ### dijitso.jit.extract_factory_function(lib, name) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Extract function from loaded library. ```APIDOC ## dijitso.jit.extract_factory_function(lib, name) ### Description Extract function from loaded library. Assuming signature `(void *)()`, for anything else use look at ctypes documentation. Returns the factory function or raises error. ### Parameters - **lib** (ctypes.CDLL) - Required - The loaded shared library. - **name** (str) - Required - Name of the function to extract. ### Returns - **factory_function** (callable) - The factory function. ### Raises - **DijitsoError** - If the function cannot be extracted. ### Usage ```python func = dijitso.jit.extract_factory_function(lib, name) ``` ``` -------------------------------- ### dijitso.mpi.create_comms_and_role_node Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Creates communicators and role for the node-based build strategy. ```APIDOC ## dijitso.mpi.create_comms_and_role_node ### Description Approach: each node root builds, everyone waits on their node group. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **node_comm** - Required - The node communicator. - **node_root** - Required - The node root rank. ### Returns Returns (copy_comm, wait_comm, role). ``` -------------------------------- ### dijitso.cmdline.cmd_grepfunction(args, params) Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Search for function name in source files in cache. ```APIDOC ## dijitso.cmdline.cmd_grepfunction(args, params) ### Description Search for function name in source files in cache. ### Method Command-line subcommand ### Parameters - **args** (Namespace) - Required - Command-line arguments. - **params** (dict) - Required - Parameters for the command. ### Usage ``` dijitso-cache grepfunction ...args ``` ``` -------------------------------- ### dijitso.mpi.discover_path_access_ranks Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Discovers which ranks have access to the same directory by having each process touch a file with its rank. ```APIDOC ## dijitso.mpi.discover_path_access_ranks ### Description Discover which ranks share access to the same directory. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **path** - Required - The path to check. ### Returns The ranks that share access to the directory. ``` -------------------------------- ### dijitso.mpi.gather_global_partitions Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Gathers an ordered list of unique partition values across the communicator. ```APIDOC ## dijitso.mpi.gather_global_partitions ### Description Gather an ordered list of unique partition values within comm. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **partition** - Required - The partition value. ### Returns An ordered list of unique partition values. ``` -------------------------------- ### dijitso.mpi.create_node_comm Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Creates a communicator for processes within the same node. ```APIDOC ## dijitso.mpi.create_node_comm ### Description Create comms for communicating within a node. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **comm_dir** - Required - The directory for communication. ### Returns The node communicator. ``` -------------------------------- ### dijitso-cache subcommand invocation Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Invokes a subcommand of the dijitso-cache command-line tool. Replace 'cmdname' with the actual subcommand name and provide any required arguments. ```text dijitso-cache cmdname ...args ``` -------------------------------- ### dijitso.mpi.create_subcomm Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Creates a communicator for a subset of ranks. ```APIDOC ## dijitso.mpi.create_subcomm ### Description Create a communicator for a set of ranks. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. - **ranks** - Required - The set of ranks. ### Returns The sub-communicator. ``` -------------------------------- ### dijitso.log.get_logger Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Returns the logger instance used by dijitso. ```APIDOC ## dijitso.log.get_logger ### Description Retrieves the logger instance used by dijitso. ### Method Function call ### Returns The logger object. ``` -------------------------------- ### dijitso.log.get_log_handler Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Returns the current log handler. ```APIDOC ## dijitso.log.get_log_handler ### Description Retrieves the current log handler. ### Method Function call ### Returns The current log handler. ``` -------------------------------- ### dijitso.log.set_log_handler Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Sets the log handler. ```APIDOC ## dijitso.log.set_log_handler ### Description Sets the log handler. ### Method Function call ### Parameters - **handler** - Required - The log handler to set. ``` -------------------------------- ### dijitso.mpi.bcast_uuid Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Creates a unique id shared across all processes in the given communicator. ```APIDOC ## dijitso.mpi.bcast_uuid ### Description Create a unique id shared across all processes in comm. ### Method Function call ### Parameters - **comm** - Required - The MPI communicator. ### Returns The unique id. ``` -------------------------------- ### dijitso.log.set_log_level Source: https://fenics.readthedocs.io/projects/dijitso/en/latest/api-doc/dijitso.html Sets the verbosity level for logging. Accepts an integer or one of the predefined string levels. ```APIDOC ## dijitso.log.set_log_level ### Description Set verbosity of logging. Argument is int or one of "INFO", "WARNING", "ERROR", or "DEBUG". ### Method Function call ### Parameters - **level** (int or str) - Required - The verbosity level, either an integer or one of "INFO", "WARNING", "ERROR", or "DEBUG". ### Returns None ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.