Skip to content

Commit

Permalink
Consolidating rsp files and updating docs with instructions to escape…
Browse files Browse the repository at this point in the history
… @ character
  • Loading branch information
samharrison7 committed Jan 3, 2024
1 parent 713cc5d commit d1fb4dc
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ gprof

# Temp files
~$*.docx
*~
*.csv#

# Docs
docs/_build/
docs/_build/
4 changes: 0 additions & 4 deletions build.rsp

This file was deleted.

4 changes: 0 additions & 4 deletions debug.rsp

This file was deleted.

6 changes: 6 additions & 0 deletions docs/getting-started/building-the-model.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Building the model

Before running the model, it needs to be compiled into an executable file. There are a number of ways to do this, but all require the following to be installed:
Expand Down Expand Up @@ -33,6 +34,11 @@ The easiest way to build the model is use [fpm](https://fpm.fortran-lang.org/) (
$ fpm @build
```

```{note}
If you are using Windows PowerShell, the "@" character is a special character and must be escaped using a backtick: `fpm \`@build`.
```


The model binary will be placed in a subdirectory of the `build` folder. The `fpm @run` command can be used to run this executable (see [](./running-the-model)). Alternatively, you can install the model:

```sh
Expand Down
4 changes: 4 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ $ cd nanofase
$ fpm @install
```

```{note}
If you are using Windows PowerShell, the character "@" is a special character and must be escaped by a backtick (grave character): `fpm \`@install`
```

Use the `--prefix <path-to-installation-dir>` flag to install the model into a directory of your choice, e.g. `fpm @install --prefix <path-to-installation-dir>`.

Test the model with the [test scenario](getting-started/test-scenario.md). Presuming the install directory is on your `$PATH`:
Expand Down
23 changes: 23 additions & 0 deletions fpm.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Build the model for debugging
@debug
options build
options --profile debug
options --flag "-Og -pg -Wall -fallow-argument-mismatch"

# Build the model for release
@release
options build
options --profile release
options --flag "-O3 -fallow-argument-mismatch"

# Run the debug model build
@run
options run
options --profile debug
options --flag "-Og -pg -Wall -fallow-argument-mismatch"

# Install the release model build
@install
options install
options --profile release
options --flag "-O3 -fallow-argument-mismatch"
5 changes: 0 additions & 5 deletions install.rsp

This file was deleted.

4 changes: 0 additions & 4 deletions release.rsp

This file was deleted.

4 changes: 0 additions & 4 deletions run.rsp

This file was deleted.

3 changes: 2 additions & 1 deletion src/VersionModule.f90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module VersionModule
implicit none; character(len=17), parameter :: MODEL_VERSION = "0.0.4-24-gdf24b0b"
implicit none
character(len=17), parameter :: MODEL_VERSION = "0.0.4"
end module

0 comments on commit d1fb4dc

Please sign in to comment.