[Users] HDF5 compile issues w/ or w/o CactusExternal/HDF5
Ian Hinder
ian.hinder at aei.mpg.de
Sun Jun 19 02:02:26 CDT 2011
On 19 Jun 2011, at 03:16, Luca Baiotti wrote:
> By the way,
>
> if you have an up-to-date flesh and Makefile, you should get an error
> message if you set HDF5 = YES
You might be interested in a message I sent to the Cactus users' mailing list a little while ago which explains how the ExternalLibraries mechanism works:
> Hi all,
>
> I just had a question from someone about ExternalLibraries, and it's a common enough confusion that I thought it best to write to the list in case other people are wondering as well.
>
> Cactus thorns often depend on certain libraries being available on the system. Examples are HDF5, GSL, BLAS, LAPACK, but there are several others. For each required library, there is a thorn in the ExternalLibraries arrangement, which is part of Cactus. In order to use one of these external libraries with Cactus, you must include the appropriate thorn in your thornlist.
>
> When using the thorns in ExternalLibraries, you have two options for each thorn. You can either decide to use an existing installation of the library, which might have been installed by the cluster administrators, or for an individual's machine by the system's package manager, OR you can configure the thorn to build the library as part of the Cactus build process. Taking HDF5 as an example, this is determined by the HDF5_DIR configuration variable in your optionlist.
>
> If you set HDF5_DIR to the location of an HDF5 installation (for example /cluster/libs/hdf5-1.8.0), then the HDF5 thorn will set up the include paths and linker paths to automatically find the header and object files during the build.
>
> If, instead, you set HDF5_DIR = BUILD, then the HDF5 thorn will build a private version of the library and set up the paths to use it during the Cactus build. This is achieved by having a source tarball of the package as part of the HDF5 thorn.
>
> If you don't specify HDF5_DIR at all, then the thorn will look in a few common places for the library, and if it doesn't find it, it will build the thorn.
>
> There are corresponding *_DIR configuration variables for each of the other thorns in ExternalLibraries.
>
> The above information should be sufficient to use external libraries with Cactus.
>
> Now, some additional points:
>
> * The thorns in ExternalLibraries work by specifying a "script" in their configuration.ccl files. This script is run as part of the CST after the "configure" step and before compilation begins. In the case of HDF5, this script is called "HDF5.sh" and is in the main thorn directory. The script handles reading the HDF5_DIR environment variable and deciding whether to build the library or use an existing installation, and it also builds the library if necessary.
>
> * The above is the "new way" of dealing with external libraries in Cactus. The "old way" was to have configuration scripts in Cactus/lib/make/extras, which are part of the Cactus "flesh". This is known as using the "extras" mechanism. These scripts are run during the configuration step, and are generally incompatible with the ExternalLibraries method, and none of them are capable of building libraries for you. For example, for HDF5, you would set the variable "HDF5 = /cluster/libs...". The new system has several advantages. Firstly, it is not necessary to modify the flesh to edit or add a library. Secondly, you only need to check out those thorns which you actually need, and since the thorns contain the source tarballs, this can be a considerable space-saving. Thirdly, the new mechanism makes it possible to build the libraries in the case that you need that.
>
> * Since there are two ways to specify to Cactus the location of HDF5 (for example), the old and the new, you need to be careful to only use one of them. If you include the HDF5 thorn in your thornlist, then you must not set the HDF5 variable for the "extras" mechanism.
>
> I hope this clears up some confusion.
>
>
> Luca
>
>
> On 19/6/11 6:53 AM, Scott Hawley wrote:
>> Hi. I'm unable to get HDF5 capability to install. If I set
>> HDF5_DIR=/sw, which is the installation already on my machine, I get
>> the error message that I need a thorn that implements HDF5. ("CST
>> error 1: -> Thorn 'CarpetIOHDF5' requires the capability 'HDF5'.
>> Please add a thorn that provides 'HDF5' to your ThornList or remove
>> 'CarpetIOHDF5' from it !")
>>
>>
>> If I leave HDF5_DIR unset (and all other "HDF5" flags unset as well)
>> and include CactusExternal/HDF5 in my Thornlist, then I also get an
>> error message saying it's unable to compile, as shown below.
>>
>> To be clear, the options settings which are either left in the file
>> or commented out via "#", are:
>>
>> HDF5 = YES
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
--
Ian Hinder
ian.hinder at aei.mpg.de
More information about the Users
mailing list