You are here

Compiling PEST in Linux

Windows users benefit from being able to download a pre-compiled binary distribution of the parameter estimation tool PEST. However, Linux users have to compile it themselves, since the popular Linux distributions do not provide it as a package. Although the instructions for doing this are pretty clear, the procedure fails with many recent Fortran compilers including gfortran, due to new restrictions on program structure.

You will see a series of error messages something like this:

sceua_p.f:1397.10:

       use subiter                                                      
          1
Error: 'feval' of module 'subiter', imported at (1), is also the name of the current program unit

A discussion of why this has happened can be found here. But to cut to the chase, you need to edit the file sceua_p.F (note the uppercase F, this will be converted into sceua_p.f by the preprocessor). Changes are as follows:

line 1407, replace "use subiter" with "use subiter, ignore_me => feval"

line 1696, replace "use subiter" with "use subiter, ignore_me => mul_feval"

line 2048, replace "use subiter" with "use subiter, ignore_me => record_parameters"

Note the line numbers are correct for PEST v13.0 but may vary for later versions (for that matter, they may fix the bug!)

Also, those of you with many CPUs in your machine may be in the habit of adding the -j2 or -j4 switch to "make" to allow operations to proceed in parallel. Do not do this when building PEST -- there are dependencies which are not set out explicitly in the makefile, and trying to do things in parallel will probably give rise to errors.

Hope this helps!

Forums: