Subject: [Fenics] instant can now use CMake as build system instead of distutils

From: Johan Hake <[email-masked]>
Date: Fri, 01 Feb 2013 12:46:09 +0100

Hello!

Recently there have been some annoyance with distutils and how we
runtime check where swig is. Kent, Johannes and I have now added a CMake
based system. Both UFC and DOLFIN use that now to JIT compile extension
modules. It uses what ever compiler defined in the UseFOO file. The
default configuration system of instant is still distutils, retaining
all backward compatibility.

The configuability of instant using cmake is reduced compared to
distutils, as it just reads in UseFOO files. It can easily be extended
to be more general, like the present distutils system.

Please report any issues that most probably crops up.

Johan

---

From: "Garth N. Wells" <[email-masked]>
Date: Fri, 1 Feb 2013 11:49:54 +0000

Nice!

Garth

On 1 February 2013 11:46, Johan Hake <[email-masked]> wrote:
> _______________________________________________
> Mailing list: https://launchpad.net/~fenics
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~fenics
> More help   : https://help.launchpad.net/ListHelp

---

From: "Garth N. Wells" <[email-masked]>
Date: Sat, 2 Feb 2013 21:51:33 +0000

I have some trouble with the  ufl-jit-assemble-chain in DOLFIN related
to Boost math libraries. I get

......93b919307320.so: undefined symbol: boost_cyl_bessel_j;

I recall somebody reporting this already, but I can't find the message.

Garth

---

From: Johan Hake <[email-masked]>
Date: Sat, 02 Feb 2013 23:30:30 +0100

Yes, I reported it, but I cannot either find the message...

Anyhow it is related to the one of the tests in the
ufl-jit-assemble-chain test suit, which uses boost_math. In the
distutils system we always linked to boost_math and the problem was
avoided.

We can fix it by:

1) Add boost_math when configuring ufc and also add it to the
UFCConfig.cmake file.

2) Add boost_math as an additional lib dependency when JIT compiling UFC
modules. This will add back runtime configuration to JII compiling.

3) Expose a number of configuration options like libs, lib_dirs aso to
the cmake build system and let the user provide the whereabout of an
external library.

There are pros and cons with all of these. The last one looks most
attractive to me, but requires the most work. 1 also seams attractive as
the bessel function is exposed in UFL and hence should be available when
generating UFC forms.

Johan

---

From: "Garth N. Wells" <[email-masked]>
Date: Sat, 2 Feb 2013 22:33:54 +0000

> the bessel function is exposed in UFL and hence should be available when

I'm about to push a 'fix' - use Boost math special functions instead
of boost::math::tr1. The former is header only, hence no linking
issues.

With the recent change, is there somewhere that the flags, libraries,
etc, that are being used by the JIT compiler can be inspected?

Garth

---

From: Johan Hake <[email-masked]>
Date: Sat, 02 Feb 2013 23:43:35 +0100

> of boost::math::tr1. The former is header only, hence no linking

Sounds very good.

> etc, that are being used by the JIT compiler can be inspected?

Put a message("${FOO}") statement in the UFCConfig.file which get read
by the instant JIT compiler and then have a look in the config.log file
in the cache directory.

Johan