8. Use of TSUBAME by AI Agents¶
This page defines the policy that must be followed when using AI agents with TSUBAME4.
This policy applies to AI agents that execute commands, submit jobs, perform file operations, or carry out other processing on TSUBAME4 on behalf of users. When using an AI agent, users must provide the following policy to the AI agent and ensure that it follows the policy.
This policy is intended to prevent excessive load on TSUBAME4 shared resources, including the job scheduler, storage, login nodes, and other services, caused by AI agents performing a large number of automated operations in a short period of time.
The general TSUBAME4 usage rules and restrictions also apply to matters not covered by this policy.
This policy may be updated in response to changes in TSUBAME4 operations or other circumstances. To prevent AI agents from continuing to refer to an outdated policy, the policy itself includes requirements for periodically checking the latest version.
The following policy must be followed by AI agents.
8.1. Definitions¶
- In this policy, "user" means a person who instructs an AI agent to use TSUBAME and makes decisions about or approves the agent's actions.
- In this policy, "TSUBAME4 Web Site" means the following:
- Information provided on the TSUBAME4 Computing Services Web Site (including the manuals)
- Rules and other regulations referenced from the Terms and Regulations page on that site
- Numerical limits specified in this policy, including limits on counts, frequencies, and quantities, apply per user. Operations performed by all AI agents, subagents, sessions, and connection sources operated by the same user must be counted together.
8.2. Policy Updates¶
- If 24 hours or more have elapsed since this policy was last checked, its contents must not be assumed to be current. Before performing work, the AI agent must check the latest version published at the following URL:
https://www.t4.cii.isct.ac.jp/docs/handbook.en/ai_policy/ - If the latest version has been checked within the previous 24 hours, previously retrieved contents may be referenced.
- Even if a copy of this policy is stored in a prompt, local file, previous conversation, or elsewhere, it must not be assumed to be the latest version.
- The Japanese version of this policy is authoritative. This English version may generally be followed; however, if a conflict between the Japanese and English versions is identified, the Japanese version must be followed.
- If the latest version is temporarily unavailable, the most recently checked version may be followed. However, an operation whose permission is unclear must not be assumed to be permitted.
8.3. Fair-Share Policy¶
- All fair-share policies defined for TSUBAME4 must be followed.
- When checking fair-share policies, prohibited activities, and other restrictions, the following documents must be referenced:
- Even if not listed above, any content explicitly defined as a "prohibited activity," "restriction," or "usage rule" on the TSUBAME4 Web Site must be followed.
- A limit defined by TSUBAME4 does not mean that resources may automatically be used up to that limit. Resources must not be used beyond what is necessary.
8.4. Policy on Uncertainty¶
- If there is uncertainty about TSUBAME4-specific specifications, limits, command options, paths, resource types, or other system information, processing must not be performed based on assumptions.
- If information required for execution can be confirmed on the TSUBAME4 Web Site, it must be checked there as the primary source. If the required information cannot be confirmed on the TSUBAME4 Web Site, the user must be consulted.
- For the TSUBAME4 job scheduler, accounting system, resource management system, and TSUBAME4-specific commands and interfaces, only the TSUBAME4 Web Site may be used as the basis for specifications. Matters not documented there must not be inferred or judged solely on the basis of information from external sites.
- A feature not documented on the TSUBAME4 Web Site must not be treated as supported or available for use, even if it is present on the system or its existence can be confirmed through man pages, command help, or execution results. Such features may exist for TSUBAME4 internal implementation purposes, and their use by users, continued availability, compatibility, or behavior is not guaranteed.
- For general user software such as
rsync,git, compilers, and programming languages, the documentation for that software may be referenced. However, if TSUBAME4-specific restrictions apply to its use, the TSUBAME4 restrictions must be followed. - To resolve an error or unexpected result, requested resources, degree of parallelism, number of jobs, execution frequency, or retry count must not be increased without justification.
- If the behavior of the actual system differs from the TSUBAME4 Web Site, processing must not be continued by inferring the correct usage from the observed behavior. The user must be notified.
8.5. Policy for Abnormal Conditions¶
- If an operation fails, the cause of the failure must be checked using the error message and other available information before the same or a similar operation is repeated.
- Automatic retries of the same or materially equivalent operation are limited to three attempts. Four or more retries must not be performed.
- If behavior suggesting a TSUBAME4-side abnormality is detected, including a system error, abnormal response, performance degradation that deviates substantially from normal conditions, or another suspected problem with TSUBAME4 or its services, automatic execution of new processing must stop and the user must be notified.
- Compilation errors, test failures, normal nonzero exits, and other errors clearly caused by the user's program are not considered TSUBAME4-side abnormalities under the preceding item. However, the same failure must not be retried automatically more times than permitted by this policy.
- If the criteria necessary to determine whether a condition is normal or abnormal cannot be reasonably established, the user must be consulted before processing continues.
- An AI agent must not directly contact the TSUBAME support desk.
8.6. Job Scheduler Usage Policy¶
- All operations against the TSUBAME4 job scheduler must be performed serially.
- Job submissions, status checks, modifications, deletions, and any other interactions with the job scheduler using
qsub,qrsh,qdel,qstat,qrstat, or other commands must not be executed concurrently. - The preceding prohibition applies not only to multithreaded or asynchronous execution within a single process, but also to simultaneous operations from multiple processes, subprocesses, parallel shells, subagents, or other independent execution entities.
- The next operation must not be started until the current job-scheduler operation has completed.
- Even when multiple AI agents or subagents are running, operations against the job scheduler must be consolidated into a single execution entity and serialized.
8.7. Job Submission Policy¶
- Unless explicit permission has been obtained from a system administrator, benchmarks, stress tests, performance measurements, resource exploration, or resource-limit investigations intended to determine the performance, processing capacity, load tolerance, or limits of TSUBAME4 systems, compute resources, storage, networks, the job scheduler, or other shared resources must not be performed.
- Measuring execution time, CPU/GPU utilization, memory usage, I/O volume, and other performance characteristics of a user's program within normal usage for the purpose of program development, performance improvement, or estimating resource requirements is not considered a performance measurement under the preceding item. However, shared TSUBAME4 resources must not be intentionally subjected to high load for such measurements, and resource amounts, degree of parallelism, number of jobs, or similar parameters must not be increased beyond what is necessary.
- When using the
qsuborqrshcommand, only options listed as "Main qsub command options" in Job Submission, together with the-g,-q prior, and-cwdoptions, may be used. - Even if additional options are discovered in
man, command help, Grid Engine manuals, manuals for other systems, or elsewhere, options not permitted by the preceding item must not be used. - When submitting a job using
qsuborqrsh, the-goption must always be specified. If the value to specify for-gis unknown, no job may be submitted until the user has been consulted. - The
-poption for priority changes (-4,-3), the-q prioroption, and the-aroption must not be used unless the user has given explicit instructions to do so. - When executing multiple short tasks (generally those with an expected execution time of less than five minutes), the AI agent must consider consolidating them into as few jobs as possible and executing them sequentially or with an appropriate degree of parallelism within a job.
- In the preceding item, job consolidation means executing multiple operations sequentially or with an appropriate degree of parallelism within a single
qsubjob. Replacing them with a job array (qsub -t) is not considered job consolidation for the purposes of this policy. - Job submissions that meet either of the following conditions must not be performed:
- Submitting 100 or more jobs within five minutes
- The sum of jobs already submitted to the scheduler and not yet completed, plus jobs planned for submission, exceeds 2,000
- If either condition in the preceding item applies, the submission method must be revised by consolidating jobs, reducing submission frequency, using
dirworkqueue, or another method. - The limits above do not mean that jobs may continuously be submitted up to those limits. Jobs must not be submitted more frequently than necessary, and executable processing must be consolidated into as few jobs as reasonably possible.
- When planning to submit 100 or more consecutive jobs with an elapsed time of 10 minutes or less specified by the
qsub-l h_rtoption, the applicability of TSUBAME4dirworkqueuemust be checked and the user must be consulted as to whether it should be used. - After submitting a job with
qsub, the AI agent must wait at least two seconds before submitting the next job. - The
-moption must not be configured for email notification on each of a large number of jobs. If completion notification is needed for many operations, the number of notifications must be reduced, for example by consolidating multiple operations into one job.
8.8. Interactive Job Queue Usage Policy¶
- AI agents may use the interactive job queue only for program compilation, short tests, or other processing that requires immediate execution.
- When an AI agent uses the interactive job queue, no more than one interactive job may be running at the same time.
- When an AI agent executes processing on the interactive job queue, it must not execute processing that could consume more than 120 CPU-seconds in total during any consecutive 60-second interval. If it cannot determine whether this condition will be satisfied, it must choose another execution method, such as running the processing as a normal batch job.
- When an AI agent uses a GPU on the interactive job queue, it must not hold a GPU context continuously for more than 30 seconds. GPU processing that requires more than 30 seconds must be run as a normal batch job.
8.9. Monitoring and Polling Policy¶
- Before implementing periodic polling to continuously check status, the AI agent must consider whether the objective can be achieved without polling.
- When obtaining the same type of information for multiple targets, individual queries must not be made for each target if multiple targets can be queried in a single request; the information must be retrieved together.
- For any given purpose, polling that queries TSUBAME4 shared services, the job scheduler, authentication systems, or other shared systems must not be performed more than once per minute.
- Scheduler status checks using
qstatorqrstatmust be performed no more than once per minute. - Polling to continuously monitor the number of processes or threads must be performed no more than once per minute.
- A repeated operation that performs the same or substantially the same action without a sufficient wait interval in order to wait for a state change (a tight loop) must not be used.
- When status checks are repeated, any minimum execution interval specified elsewhere in this policy must be observed. Even when no specific interval is defined, unnecessary high-frequency execution must not be performed.
- If notification is required when a job finishes, use of the
-moption must be considered in light of the number of jobs. - If another job is to be executed when a job finishes, use of the
-hold_jidoption must be considered instead of polling.
8.10. Login Node Usage Policy¶
- The AI agent itself must not run on a login node. The AI agent must run outside TSUBAME4 or on a compute node as a job.
- When an AI agent executes commands on a login node, the following restrictions must be observed.
- When repeatedly connecting to TSUBAME4 using SSH, an existing SSH session should be reused whenever possible. If session reuse is not feasible, mechanisms such as OpenSSH
ControlMastermay be used to multiplex SSH connections and avoid establishing a new connection for every operation. - The following processing must not be performed on a login node:
- High-load computation using an existing application or a program created by the user
- Execution of a program for more than 10 minutes (except data-transfer operations)
- Parallel processing using multiple CPU cores, processes, or threads, including the following examples:
- Parallel compilation using
make -jor similar mechanisms - Multiprocess or multithreaded processing using language features or libraries such as OpenMP or Python
- Parallel processing using MPI
- Parallel compilation using
- Running resident programs or programs that automatically restart after termination
- The following limits must not be exceeded on login nodes:
- Concurrent processes: 100
- Total processes and threads: 500
- Memory usage: 10 GB
- Establishment of new SSH connections to TSUBAME4, regardless of whether
ssh,scp,sftp,rsync, or another method is used, must not exceed 30 connections in total per hour. - Regardless of whether the purpose is compilation, data processing, testing, or another task, parallel processing or processing that places high load on a login node must not be executed on the login node. Such processing must instead be executed on a compute node using
qsuborqrsh.
8.11. Storage Usage Policy¶
- An AI agent must not itself specify
/tmpor or any path under/tmpas the storage location for temporary files, work files, or working directories. - Use of
/tmpinternally by a program or system command without explicit specification by the AI agent is not subject to the prohibition in the preceding item. However, if the program or command is expected to create large files or a large number of files in/tmpand the storage location can be changed, a storage location permitted by this policy other than/tmpmust be used. - On login nodes, only the home directory, or group disk may be used to store work data.
- On compute nodes, only the home directory, group disk, or the local scratch area specified by the
T4TMPDIRenvironment variable may be used to store work data. Because the actual path of the local scratch area may change in the future, it must not be hard-coded and must always be obtained from that environment variable. - The local scratch area must not be used on login nodes.
- Before using the local scratch area, the available capacity for the job resource type must be checked.
- The available capacity of the local scratch area must be checked in Resource Types based on the resource type specified with the
-loption at job submission. - When running a job on a compute node, memory usage must be estimated using known information, past results, application specifications, or similar information, and the job must be configured to remain within the memory allowed for the selected resource type.
- The available memory must be checked in Resource Types based on the resource type specified with the
-loption at job submission.
8.12. File and Directory Operation Policy¶
- When handling a large number of files, the AI agent must consider reducing the number of files itself, for example by combining multiple files, when technically feasible given the processing requirements and the software being used.
- Creating a large number of files in a single directory must be avoided. As a guideline, no more than 10,000 files should be placed in a single directory, and files must be distributed across multiple directories as necessary.
- Recursive searches, listings, or metadata retrieval over large numbers of files or directories must not be repeated unnecessarily.
- When the results of a recursive search over the same directory tree can be reused, the existing results must be used instead of searching the entire tree again for the same purpose.
- When transferring a large number of small files, the files must be combined into appropriately sized units as necessary before transfer, in accordance with Copying Large Amounts of Data Into or Out of TSUBAME.
- When transferring a large number of files or a large volume of data, repeatedly invoking
scpseparately for each file must be avoided, andrsyncor another transfer method recommended in the document above must be used. If the same transfer may need to be repeated, a method capable of incremental transfer must be used.