Page 1 of 1

add optional functionality

Posted: Fri Oct 26, 2012 11:00 am
by mancini
Hello,
I'm trying to add a new functionality to ABINIT : LOTF (Learn On The Fly).
I set the folder which contains LOTF routines and modules in src/68_LOTF.
makemake and compilation are ok.

Now I would to put LOTF as "optional".
To do that I added the to config/specs/corelibs.conf the following lines:

176 [68_lotf]
177 abirules = no
178 optional = yes

but at the makemake I obtain:
[makemake] Generating Makefile.in for each directory
src/98_main/Makefile.am:88: DO_BUILD_68_LOTF does not appear in AM_CONDITIONAL
src/Makefile.am:32: DO_BUILD_68_LOTF does not appear in AM_CONDITIONAL
Makefile.am:648: DO_BUILD_68_LOTF does not appear in AM_CONDITIONAL
[makemake] Aborting now!

What I have to do ?
Have you any idea of my error?
I was looking for the doc in ~abinit/doc without success.

Thanks.
Best regards,
Marco

Re: add optional functionality

Posted: Mon Oct 29, 2012 12:50 pm
by pouillon
You have to add a corresponding option in config/specs/options.conf, or else it will not make much sense to have the build of your directory optional.

This feature is not documented because it still is under test. For now, just look within options.conf to find examples of DO_BUILD_* options.

Re: add optional functionality

Posted: Mon Oct 29, 2012 2:38 pm
by mancini
Hello Yann,
thanks for your reply.

I was modifying the file config/specs/options.conf
The lines I added were:

[enable_lotf]
description = Activate LOTF functionality (EXPERIMENTAL)
default = no
status = new
define = HAVE_LOTF

I didn't know that the feature was under test.
And I think that when I have started to develop the file config/specs/options.conf was different
and it didn't contain DO_BUILD_* options.

Now I added:
conditional = DO_BUILD_68_LOTF

But I have the same error.
any idea?

Best regards,
Marco

Re: add optional functionality

Posted: Tue Oct 30, 2012 7:37 pm
by pouillon
I don't find anything in your private branch. Did you push it?

Re: add optional functionality

Posted: Wed Oct 31, 2012 9:29 am
by mancini
Yann,
I pushed it right now.
reamark that the code is totally embryonal

Marco

Re: add optional functionality

Posted: Fri Nov 02, 2012 6:55 pm
by pouillon
There is a typo in config/specs/options.conf for enable_lotf: "conditionals".

Re: add optional functionality

Posted: Mon Nov 05, 2012 9:17 pm
by mancini
Yann,
you are right but the problem subsists.
Marco

Re: add optional functionality  [SOLVED]

Posted: Tue Nov 06, 2012 10:39 am
by mancini
Yann,

I am sorry.
I don't know why on my laptop it doesn't work but this morning
at the office it worked fine.
I was able to configure and compile with and without LOTF enabled.

So, for me this post is resolved.
Thanks again.

Best regards,
Marco