# Batch Meshing and Execution of Projects

newFASANT supports two methods of meshing and running simulations from the command line or terminal, allowing you use the mesher and kernels without launching the newFASANT GUI.

## Using the Batch Utility

To specify the number of processors, threads and the different MPI options, you must set up the following environment variables:
• NF_PROCS
Overwrites the number of MPI tasks stored in the project. In Linux, it works similarly but also can be filled with --use-job-scheduler to call feko_parallel with this parameter.
Overwrites the number of OpenMP threads stored in the project. It works similarly in Linux.
• NF_MPI_OPTIONS
Defines additional options for MPI. In Windows, these options are supplied as an input parameter for MPIexec. Linux works in a similar way, but instead of supplying them to MPIexec it goes to feko_parallel1.
Launch the newFASANT batch utility using the command:
newfasant <"project file path"> [options]
project file path
The path to the project file inside “”.
The command line options are:
-mesh
Mesh the project.
For example:
newfasant "/home/newfasant/MyProject.nfp" -mesh
-calculate
Execute the project.
For example:
newfasant "/home/newfasant/MyProject.nfp" -calculate
-update
Mesh and execute the project.
For example:
newfasant "/home/newfasant/MyProject.nfp" -update
newfasant_batch.exe -h

## Using Runfeko

Another way to launch newFASANT from a command line or terminal is by using the runfeko utility. The syntax for launching newFASANT through runfeko is:

runfeko FILENAME [OPTIONS]
FILENAME
The path of the .nfp project (with or without extension).
--version
print the version information and then exit
-np x
start the parallel newFASANT version with x processes (special case “-np all” uses all available from the machines file)
--use-job-scheduler
run the parallel newFASANT Solver within a queuing system (see documentation which are supported) and obtain the number of parallel processes as well as the host list directly from the respective job scheduler
--feko-options ...
all following options will be passed to newFASANT
runfeko C:/Temp/horn -np 4 --feko-option --num-threads 4
runfeko horn.nfp --use-job-scheduler --feko-options --num-threads 4