ChasteGuides/RunningFirstTests

Running Chaste for the first time

Once the dependencies have been installed, and Chaste is downloaded, it is time to check whether everything is set-up correctly, by running the tests. There are, at the time of writing, over 300 test files (found in folders such as pde/test, heart/test, etc) for testing the source code (found in pde/src, heart/src, etc).

A first test

In the command line, cd to the main Chaste directory, and then run

scons global/test/TestHelloWorld.hpp

Alternatively, in eclipse, create a new 'Make Target' using this command, as shown in the attached screenshot. Double-click the new Make Target to run this command.

If this compiles and runs, you should see

Passed
OK!

in the output (also shown in attached screenshot). The output also says how many tests that have been run passed ("All 300 tests run passed" in the screenshot; for you it will probably be "All 1 tests run passed"), and gives the location of a local file named index.html which you can load in a web-browser to see the test summary.

Running all the tests

Option 1: all tests in one go

Run the following, either in the command line, or by creating a make target.

scons

This may take of the order of a few hours the first time, as there is a lot of compilation and running to do. Once it is completed, check the local webpage (as described above) - if it is all green you are good to go!

Note: if you have a multicore machine you can do scons -j4, say, to have 4 processors compiling and running tests.

Option 2: all tests, component by component

Instead of running all the tests in one go, you may want to do the following to verify that particular components are running fine before moving to the next one. The pde component for example depends on mesh but not vice versa, so the below checks the mesh before pde.

scons global
scons io
scons linalg
scons mesh
scons ode
scons pde
scons continuum_mechanics

Or, just

scons core

for all of the above.

Then, if you are interested in cardiac Chaste

scons heart

or, if you are interested in cell-based Chaste

scons cell_based
scons crypt

Note on Boost error

If you have installed Chaste using the Ubuntu package, you may sometimes see an ugly looking error such as

*** Process received signal ***
Signal: Aborted (6)
Signal code:  (-6)
[0xb775c40c]
[0xb775c424]
..
*** End of error message ***
Aborted (core dumped)

and/or

pure virtual method called 
terminate called without an active exception

Check to see if the output still says

Passed
OK!

if so, the test ran fine, and the error is due to a bug in Boost (one of the dependencies). See here; essentially the message can be ignored.

Next steps

You should now look at other pages linked from ChasteGuides, such as the UserTutorials.

Attachments