tmLQCD icon indicating copy to clipboard operation
tmLQCD copied to clipboard

Full Autotools build

Open sunpho84 opened this issue 7 years ago • 28 comments

  • GPU and SPI not yet enabled
  • A single long Makefile.am: this might be broken in many files if you prefer, though I can't see a practical reason for doing that

sunpho84 avatar Feb 04 '18 22:02 sunpho84

Thanks, I'll take a look at this next week. I'm not sure I like the single list of all source files too much, but if that's the only way to achieve the desired goal, so be it.

kostrzewa avatar Feb 25 '18 12:02 kostrzewa

No no one can certainly split the Makefile.am across multiple files and use include directive to collect them in the main Makefile.am, if you prefer. I can do that quickly. What I find cumbersome, is to split the build into (in)convenient sublibraries. Given that you always link all of them, there is little reason to have a libsolver, a libhmc, etc etc, I would keep just libtmlQCD as a single target. That's also beneficial to parallel compilation. In any case, I can arrange for split sublibs if you wish.

sunpho84 avatar Feb 25 '18 15:02 sunpho84

Ok now the Makefile.am is split across different files, included in subdirs, there is still a bit of a mess in the master Makefile.am and one would probably split the main folder sourcefiles list into a dedicated file (or put the files in an appropriate directory?)

sunpho84 avatar Feb 27 '18 16:02 sunpho84

did I tell already how much I love automake!? ;)

anyhow, I guess I have to type automake in the main directory, correct?

Here automake-warnings.txt the list of warnings and errors... anyone?

urbach avatar Mar 14 '18 14:03 urbach

btw: I have automake (GNU automake) 1.15

urbach avatar Mar 14 '18 14:03 urbach

even if I invoke automake --add-missing I do not get a configure script that would be working

urbach avatar Mar 14 '18 14:03 urbach

Works for me.

$ automake --add-missing
$ autoreconf

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

include files are not installed by make install, the rest seems to work as expected

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

of course, the external libraries should be taken care of

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

well, this is what I get after an autoreconf:

$> autoreconf 
configure.ac:15: error: required file './compile' not found
configure.ac:15:   'automake --add-missing' can install 'compile'
configure.ac:13: error: required file './missing' not found
configure.ac:13:   'automake --add-missing' can install 'missing'
autoreconf: automake failed with exit status: 1

another round of automake --add-missing solves it then. Is this ment seriously?

Works for me.

$ automake --add-missing
$ autoreconf

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/etmc/tmLQCD/pull/415#issuecomment-373036254 -- Carsten Urbach e-mail: [email protected] [email protected] Fon : +49 (0)228 73 2379 skype : carsten.urbach URL: http://www.carsten-urbach.eu

urbach avatar Mar 14 '18 14:03 urbach

That's why one usually has an autogen.sh script.

It worked with a single invocation of automake --add-missing for me though (in a fresh source directory). Should be tested on Marconi and Jureca, just in case problems arise there.

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

has this been tried with --enable-sse2?

well, this is what I get after an autoreconf:

$> autoreconf 
configure.ac:15: error: required file './compile' not found
configure.ac:15:   'automake --add-missing' can install 'compile'
configure.ac:13: error: required file './missing' not found
configure.ac:13:   'automake --add-missing' can install 'missing'
autoreconf: automake failed with exit status: 1

another round of automake --add-missing solves it then. Is this ment seriously?

Works for me.

$ automake --add-missing
$ autoreconf

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/etmc/tmLQCD/pull/415#issuecomment-373036254 -- Carsten Urbach e-mail: [email protected] [email protected] Fon : +49 (0)228 73 2379 skype : carsten.urbach URL: http://www.carsten-urbach.eu

-- Carsten Urbach e-mail: [email protected] [email protected] Fon : +49 (0)228 73 2379 skype : carsten.urbach URL: http://www.carsten-urbach.eu

urbach avatar Mar 14 '18 14:03 urbach

I think the full set of configure options needs to be mapped out. Ideally one would do this via travis...

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

SSE2 / SSE3 seem to work, but produce the kinds of errors upon compilation that we got a while ago from the single precision stuff

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

for me it does not compile with SSE2

urbach avatar Mar 14 '18 14:03 urbach

but this might not be due to automake

urbach avatar Mar 14 '18 14:03 urbach

for me it does not compile with SSE2

no, it doesn't compile, but the flags seem to be defined correctly

the errors come from the single precision hopping matrix...

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

and D_psi, respectively

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

My autgen.sh -like script (for nissa) goes like this

#!/bin/sh

rm -fr \
    aclocal.m4 \
    autom4te.cache \
    $(find . -name "Makefile.in") \
    config/{compile,config.guess,config.sub,depcomp,install-sh,missing,ylwrap} \
    configure

aclocal
autoreconf --verbose --install --force

sunpho84 avatar Mar 14 '18 14:03 sunpho84

and D_psi, respectively

same for me...

-- Carsten Urbach e-mail: [email protected] [email protected] Fon : +49 (0)228 73 2379 skype : carsten.urbach URL: http://www.carsten-urbach.eu

urbach avatar Mar 14 '18 14:03 urbach

For what concern flags, I've modified the ALIGN stuff, adding or removing the description (if I believe correctly), but it would be better if you could check it...

sunpho84 avatar Mar 14 '18 14:03 sunpho84

The README should probably be adjusted to contain

aclocal
autoreconf --verbose --install --force

as an instruction for generating configure.

kostrzewa avatar Mar 14 '18 14:03 kostrzewa

Yes, but the autogen.sh or boostrap.shwould be advisable

sunpho84 avatar Mar 14 '18 15:03 sunpho84

Agreed.

kostrzewa avatar Mar 14 '18 15:03 kostrzewa

Yes, but the autogen.sh or boostrap.shwould be advisable

yes, add it please. I have no experience with automake whatsoever...

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/etmc/tmLQCD/pull/415#issuecomment-373053886 -- Carsten Urbach e-mail: [email protected] [email protected] Fon : +49 (0)228 73 2379 skype : carsten.urbach URL: http://www.carsten-urbach.eu

urbach avatar Mar 14 '18 15:03 urbach

The wikipedia article about GNU Autotools has a nice flowchart, this really helped me when I tried to compile the USQCD code.

I have found that aclocal && autoreconf -fiv is indeed sufficient. Just calling autoconf (even with flags like --install or --add-missing) does not do everything that is needed. In principle one does not need to call autoconf manually. automake should not be called manually, the configure script will do that.

For USQCD projects the following commands do all I need:

aclocal
autoreconf -fiv
./configure
make
make install

martin-ueding avatar Mar 14 '18 18:03 martin-ueding

The wikipedia article about GNU Autotools has a nice flowchart, this really helped me when I tried to compile the USQCD code.

If this is nice, I don't want to hear what's the feeling of setting up a project with cmake

autoreconf -fiv

same same

So what about the gpu side?

sunpho84 avatar Mar 14 '18 22:03 sunpho84

there are very good reasons that I never used cmake or automake for tmLQCD... ;)

urbach avatar Mar 15 '18 08:03 urbach