# Running studies

## Launching a run

Make the `.export` file the active editor, then click the rocket icon **Run with code_aster** in the editor title bar, or **Run with code_aster** in the sidebar's Quick actions (shown while a `.export` is active).

The extension opens a terminal named `code-aster runner` in the folder of the `.export` and runs:

```bash
<aliasForRun> <file>.export 2>&1 | tee "<log file>"
```

With the default alias this is `cave run <file>.export`. Later runs reuse the same terminal and change to the right folder first. To use another launcher, change `vs-code-aster.aliasForRun` (see [Installation](/installation#4-running-code_aster)).

The run uses the `.export` as saved on disk: save your changes first.

## Diagnostics from a run

While the run goes on, the log is parsed and the results appear in the **Problems** panel with the source `code-aster`:

- alarms (`<A>`) as warnings, errors (`<E>`, `<F>`) as errors;
- Python tracebacks and syntax errors;
- fatal errors, and errors of the MED library.

Each message is attached to the `.comm` line that caused it when that line can be found, otherwise to the first line of the `.export`. Duplicates are merged. No `F mess` entry is needed in the `.export`. Diagnostics are cleared when the next run starts.

## Run logs

Each run writes `run-<date and time>.log` to `.vs-code-aster/run_logs/` in the folder of the `.export`. The last `vs-code-aster.maxRunLogs` logs (10 by default) are kept.

## Running many cases

After you have run three different studies, the extension may suggest [csauto](https://simvia-tech.github.io/csauto/), Simvia's extension for parameter studies: it generates every case of a study from one table and a template, runs them locally or on Slurm, and follows them in a dashboard. The suggestion comes after a run starts, at most once a month and three times in all, never when csauto is installed, and **Don't show again** turns it off for good.

## Before you run

**Validate Current Study** checks concepts and file units across the `.comm` and the `.export` without running code_aster. See [Study validation](/validation).
