Skip to content

Commit 62ad992

Browse files
committed
readme file and test script updated
1 parent d66c6a2 commit 62ad992

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ generating a random one.
6464

6565
The project has a `build.sh` script.
6666
`build-[variant]/` directories will be created, each one representing a variant
67-
off the project they build. If you call the script without arguments, it will build
67+
off the project builded. If you call the script without arguments, it will build
6868
all the variants, but you can also specify the variant you want, passing it as the
6969
first argument. The available variants are:
7070

7171
- `serial`: Builds the project to only execute serial methods.
7272
- `mpi`: Builds the project to execute the sequential solver in parallel using MPI.
7373
- `mpi2`: Builds the project to only include the MPI and OpenMP defined in sacess-library.
74-
After this, running `test.sh` is a good way to know if the cuqdyn library works as expected.
74+
75+
After this, running `test.sh` is a good way to know if the cuqdyn library works as expected.
7576

7677
## Using the CLI
7778

@@ -162,7 +163,7 @@ There are three types of input files needed to run the cli:
162163
The data file containing a mtrix of observed data and the initial value
163164
needed to solve the ODE. The data file can be a .mat file where the first matrix
164165
found will be used (`test/data/lotka_volterra_data_homoc_noise_0.10_size_30_data_1.mat`)
165-
or a txt file written in the following format:
166+
or a txt file written with the following format:
166167
```
167168
# The first row is gonna be used as the initial condition
168169
31 3 # Matrix dimensions so the parsing is easier
@@ -175,13 +176,13 @@ There are three types of input files needed to run the cli:
175176

176177
## Defining a new model
177178

178-
Using strings en evaluate them is slow compared to compiled instructions, so, to make this
179-
possible we designed a way to define the models in Rust and compile them to machine code.
179+
Using strings and evaluate them is slow compared to compiled instructions, so, to make this
180+
possible, we designed a way to define the models in Rust and compile them to machine code.
180181

181-
Lets going to dig into it with an example of the Lotka Volterra model:
182+
Let's dig into it with an example of the Lotka Volterra model:
182183

183-
First of all, we need to write some Rust code. We will me using the following file
184-
`modules/mexpreval/src/models.rs`. Inside, we will create a new unit struct and implement
184+
First of all, we need to write some Rust code. We will be using the following file
185+
`modules/mexpreval/src/models.rs`. Inside, we create a new unit struct and implement
185186
the Model trait like this:
186187
```Rust
187188
#[derive(Default)]
@@ -206,7 +207,7 @@ pub fn eval_model_fun(model: &str, ode_expr: &OdeExpr) -> Box<dyn Model> {
206207
}
207208
```
208209

209-
After you establish an identifier in the match, at the bottom of the file, them model can be
210+
After you establish an identifier in the match at the bottom of the file, the model can be
210211
used indicating the identifier in the XML config file like this:
211212

212213
```xml

test.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ execute_variant() {
66
BUILD_DIR="build-$variant"
77

88
if [ ! -d "$BUILD_DIR/" ]; then
9-
bash build.sh "$variant"
9+
exit 0
1010
fi
1111

1212
rm -rf "$BUILD_DIR/tests/data/*"
@@ -49,8 +49,6 @@ execute_variant() {
4949
.venv/bin/python plot.py "$CLI_TEST_DIR/data/output/cuqdyn-results.txt"
5050
}
5151

52-
bash build.sh "$1"
53-
5452
if [ ! -d ".venv" ]; then
5553
if ! python3 -m venv .venv; then
5654
echo "Error creating python virtual environment. Install python3-venv."
@@ -68,11 +66,6 @@ variants=(
6866
"mpi2"
6967
)
7068

71-
if [[ " ${variants[*]} " =~ " $1 " ]]; then
72-
execute_variant "$1"
73-
exit 0
74-
fi
75-
7669
for variant in "${variants[@]}"; do
7770
execute_variant "$variant" &
7871
done

0 commit comments

Comments
 (0)