5.3.2. Run Preparation Using the Command Line Interface

In addition to preparing jobs in the Forte User Interface, jobs in Ansys Forte may be prepared from a command-line prompt using the Command Line Interface (which is fully documented in Command Line Interface).

Assuming that you have made all required changes to settings (see Prerequisites to Preparing Runs and Run Preparation Using the Command Line Interface) and have saved your project in the Forte User Interface and are you are ready to prepare your job from your MyProject.ftsim, use the following Command Line Interface command to prepare the run directory:

Warning:  Windows systems have a limit for the length of path strings unless you are using Windows 10 or later and your registry has been modified to allow longer paths. See https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry for more details. If you do not have this modification in the Windows 10 registry, ensure that the path to the project files does not exceed 256 characters. The Ansys Forte User Interface displays a warning if the path exceeds 256 characters.

Windows

call run_forte.bat CLI -project MyProject.ftsim --prepare -mpi_args number_of_MPIprocesses

Linux

forte.sh CLI -project MyProject.ftsim --prepare -mpi_args number_of_MPIprocesses

where /path/to/dir is the path to your run directory. If this option is omitted, then the default of MyProject.analysis/Nominal (see Table 5.1: Ansys Forte standard directory organization is used.


Tip:  Use –mpi_args none when you are preparing a job for a queuing system that will determine the number of MPI processes from the job submission script. For more details, see Distributed Parallel Using a Queuing System.


Use --prep_force to delete previous results in the specified folder

Regardless of whether the job is being prepared using the Forte User Interface or using the Command Line Interface, the following files are created in the run directory:

  • run_mpi.bat and run_mpi.sh

which are used to run the job which call the additional scripts

  • run_env.bat and run_env.sh

respectively, on the Windows or Linux platform, which set the Ansys Forte runtime environment and additional environment variables specified in the Run Settings panel, and also define the Intel MPI runtime environment that is part of the Ansys installation.