Page 1 of 1

Abinit 6.12.1 configuration issues

Posted: Wed Feb 29, 2012 11:16 pm
by abidave
Hi developers -

I've run into a couple of issues with the configuration of 6.12.1

config.h appears to end up with all plugins enabled even when I specifically pass configure flags to disable (e.g bigdft, wannier90, etc). The 5.5 build system guide on the website - page 11 - says the defaults should be "no". Even if I give the flags shown on that page with "no", the options are set to yes in config.h

The second issue - some compilers use the -module flag to tell the compiler both where to deposit module files, and where to subsequently find them during a build. This seems to work fine in the "src" tree, but in the "fallbacks" tree, the build system does an "install" of modules which presupposes their location:

/usr/bin/install -c -m 644 xc_funcs.h ./libxc_funcs_m.unknown ./xc_f90_lib_m.unknown ./xc_f90_types_m.unknown '~/abinit-6.12.1/fallbacks/exports/include'

Here - these modules are presumed to be in the current directory rather then the -module directory

Where is the best place in the build system to twiddle these? I've tried messing with the adinit_moddir variable in the configure script, but haven't been successful in propagating anything to the Makefiles yet.

Thanks.

Re: Abinit 6.12.1 configuration issues

Posted: Thu Mar 01, 2012 5:10 pm
by pouillon
Abinit and its fallbacks now use two separate build systems. In the case of fallbacks, I wrote a minimalistic wrapper for the build systems of the individual packages. Hence, if you encounter a problem there, this is because of the build system of a package which is external to Abinit. And in most cases, they will work only when you let them decide where to put their Fortran modules.

If you need support for a compiler which is currently not supported by the build system of Abinit, please describe how to get version information and provide the exact output that you get from the compiler, as well as default optimization flags.

Re: Abinit 6.12.1 configuration issues

Posted: Thu Mar 01, 2012 9:16 pm
by abidave
Thanks for the reply Yann. Your message is basically what I see, and how I try to compile.

The real hitch is that even if there are two seperate build systems, there appears to be a single, or linked "configure" system. (i.e. there is no "configure" in the "src' directory that applies only to "src")

To try and build I have to:

> cd abinit-6.12.1
> (set environment variables for compilers and flags suitable for "fallbacks") ./configure (don't build plugin's flags)
This runs configure on both fallbacks and src
> (fix config.h which doesn't seem to honor some of the "don't build plugin's" flags)
> cd fallbacks; make
> cd ..
> (set environment variables for compilers and flags suitable for "abinit") ./configure (don't build plugin's flags)
> > (fix config.h which doesn't seem to honor some of the "don't build plugin's" flags)
>cd src; make

This proceedure is necessary because I need to pass a different FCFLAGS to abinit then to fallbacks.

Two fairly simple solutions that I can think of to make this easier for the user to build:

Would it be possible to do something like add FCFLAGS_FALLBACKS and FCFLAGS_ABINIT what only get passed to their particular build tree? That would allow for one "configure" and one "make" to build both source trees.

and/or

Would it be possible to add a configure script to the "src" directory so that you can run two completely seperate configures and builds

Re: Abinit 6.12.1 configuration issues

Posted: Fri Mar 02, 2012 12:15 pm
by pouillon
The current philosophy of the build system is to provide autonomous subsystems, i.e. to be able to configure and build parts of Abinit (doc, fallbacks, gui, tests) separately from the core. These subsystems can be "enslaved" by the top configure script to still be able to buld Abinit as a whole. The ultimate goal is to remove the fallbacks from the Abinit source tree. On the other hand, the core build system has to take care of more than just src/, that's why the configure script is at the top and not in src/.

I am aware that compiling the fallbacks with the same parameters as Abinit may prove suboptimal and/or damageable in some cases. However the fallbacks are still under active development and will significantly improve with time. What is currently available is a bit minimalistic. It is also not mandatory to rebuild the fallbacks for each new version of Abinit, thus you can tweak the config.mk file produced by the core build system of Abinit or write it yourself from config.mk.in and install the fallbacks separately from Abinit. Then, all necessary information to link them with Abinit can be found in ~abinit/doc/config/build-config.ac.