Message Boards

Compilation problem on Ubuntu 18.04 caused by PETSc

Jason Duguay, modified 4 Months ago.

Compilation problem on Ubuntu 18.04 caused by PETSc

Youngling Posts: 1 Join Date: 6/12/19 Recent Posts



I am trying to compile this version of Delft3D on Ubuntu 18.04:


I went through and made sure I had all the listed dependencies. Then I proceeded to do the steps for Option 1. However, after running this command:


CFLAGS='-O2' CXXFLAGS='-O2' FFLAGS='-O2' FCFLAGS='-O2' ./configure --prefix=`pwd` --with-netcdf --with-mpi --with-metis –with-petsc


I keep running into this error:




checking for mpif.h... yes

configure: creating ./ creating libtool

checking for the extension of Delft3D plugins... .so

./configure: line 29905: ACX_MKL: command not found

checking for PETSc... no

configure: error: Package requirements (PETSc < 3.5) were not met:


Requested 'PETSc < 3.5' but version of PETSc is 3.7.7


Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.


Alternatively, you may set the environment variables PETSc_CFLAGS

and PETSc_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.



I tried to get a downgraded version of PETSc with sudo apt-get install petsc-dev, but there only seems to be version 3.7.7 available. I also tried manaully installing an older version of PETSc from their website, however I can’t seem to get over this one. Since PETSc is not listed in the official list of dependancies, I am starting to think that maybe I have gone wrong somewhere in the installation process.


Any help in overcoming this problem would be super helpful :)

Adri Mourits, modified 3 Months ago.

RE: Compilation problem on Ubuntu 18.04 caused by PETSc

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts

Hi Jason,

What happens if you exclude PETSc by removing the flag "–with-petsc"? Do you plan to do parallel computations with D-Flow FM using PETSc?

Using the correct version number is indeed very sensitive. The PETSc documentation should clarify them.

As a general advise: Be sure that everything is compiled with the same compiler as you use for the Delf3D code.