public inbox for gentoo-science@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-science] Quantum ESPRESSO
@ 2006-06-08  9:53 Honza Macháček
  2006-06-08 14:59 ` Donnie Berkholz
  2006-06-09 10:19 ` Honza Macháček
  0 siblings, 2 replies; 4+ messages in thread
From: Honza Macháček @ 2006-06-08  9:53 UTC (permalink / raw
  To: gentoo-science

  I have just manually compiled Quantum ESPRESSO on my Athlon 2500+.
Since I have little experience in making ebuilds and not much time for
trying, I'm not sure if I can produce anything usable for Bugzilla.
Therefore I at least rely, what I did:

1. Tried playing with the ebuild from Spyderous overlay, thoug I don't
have ifc. All my attempts only crippled the ebuild and failed miserably.

2. Tried manual compilation of the sources from
http://www.pwscf.org/download.htm using gfortran of gcc-4.1.1
(F90=gfortran ./configure && make all). Died of internal compiler error.

3. Looked at g95 (http://www.g95.org/src.shtml). Ugly source structure,
queer building sequence and essentially no version numbering. May be
best installed as an option of gcc (g95 USE flag?).

4. Looked at the gcc-4.1.1 ebuild. Heavy reading due to heavy use of the
toolchain eclass. Gave up ebuild adaptation.

5. Tried manual compilation of g95 with gcc-4.1.1 sources. Failed.

6. Tried manual compilation of g95 with gcc-4.0.3 sources, that
according to the webpage should work. Success. Installed in /usr/local
and added /usr/local/bin/g95 symlink to i686-pc-linux-gnu-g95.
Standalone ebuild for g95 would be probably better than merging it with
gcc after all, and easier to create too, yet still likely beyond my ability.

7. Tried manual compilation of ESPRESSO (./configure && make all).
Mostly worked, only tools crashed due to metadyn_pp referencing
undefined pgopen_.

8. Found on the web that pgopen should be found in the pgplot package.
Tried to emerge that, but failed for the lack of g77.

9. Mangled pgplot ebuild to recognize g95 and tried emerging again. g95
was not accepted by the ebuild.

10. Mangled pgplot ebuild to recognize gfortran and tried emerging
again. Failed due to syntax errors in arguments supplied to GRGI0[1-6]
functions.

11. Turned again to g95. Mangled fortran.eclass to recognize that (and
prioritize over gfortran, althoug not stating gfortran in the ebuild
might neutralize its default priority as well). Emerged pgplot. g95
shouted warnings of ``Inconsistent types (INTEGER(4)/INTEGER(1)) in
actual argument lists'' in GRGI0[1-6] functions, but compiled the code.

12. Tried manual compilation of ESPRESSO (./configure && make all).
Mostly worked, only tools crashed due to metadyn_pp referencing
undefined pgopen_.

13. Grepped the ESPRESSO source tree for pgopen_, found nothing. Grepped
for pgplot. Found libraries configuration mentioned in
pwtools/metadyn_pp.f90, but nowhere in makefiles or the configure script.

14. Edited make.sys, added -D__PGPLOT to DFLAGS and ``-lm -lc -lpgplot
-lX11'' to LIBS. Compiled successfuly.

  Now I have to first learn using ESPRESSO to test, wheather my build
actually works. If I manage to sum up my compilation steps into ebuilds
and patches, I'll put them on Bugzilla, but I'm affraid I cannot promise
that.

  With best regards
						Honza Macháček
-- 
gentoo-science@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-science] Quantum ESPRESSO
  2006-06-08  9:53 [gentoo-science] Quantum ESPRESSO Honza Macháček
@ 2006-06-08 14:59 ` Donnie Berkholz
  2006-06-08 15:39   ` Sebastien Fabbro
  2006-06-09 10:19 ` Honza Macháček
  1 sibling, 1 reply; 4+ messages in thread
From: Donnie Berkholz @ 2006-06-08 14:59 UTC (permalink / raw
  To: gentoo-science

[-- Attachment #1: Type: text/plain, Size: 4322 bytes --]

Honza Macháček wrote:
>   I have just manually compiled Quantum ESPRESSO on my Athlon 2500+.
> Since I have little experience in making ebuilds and not much time for
> trying, I'm not sure if I can produce anything usable for Bugzilla.
> Therefore I at least rely, what I did:

Great!

> 1. Tried playing with the ebuild from Spyderous overlay, thoug I don't
> have ifc. All my attempts only crippled the ebuild and failed miserably.

In theory my ebuild should work at least up through src_compile(), I
think src_install() is still broken. It's a work in progress.

> 2. Tried manual compilation of the sources from
> http://www.pwscf.org/download.htm using gfortran of gcc-4.1.1
> (F90=gfortran ./configure && make all). Died of internal compiler error.

Yep. I've filed a gcc bug for this --
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27889 -- although I think
there is another ICE in the same file.

> 3. Looked at g95 (http://www.g95.org/src.shtml). Ugly source structure,
> queer building sequence and essentially no version numbering. May be
> best installed as an option of gcc (g95 USE flag?).

Nah, needs to be a separate package since it's distributed separately
and so forth, like gnat. I wouldn't mind having an ebuild for this, though.

> 4. Looked at the gcc-4.1.1 ebuild. Heavy reading due to heavy use of the
> toolchain eclass. Gave up ebuild adaptation.
> 
> 5. Tried manual compilation of g95 with gcc-4.1.1 sources. Failed.
> 
> 6. Tried manual compilation of g95 with gcc-4.0.3 sources, that
> according to the webpage should work. Success. Installed in /usr/local
> and added /usr/local/bin/g95 symlink to i686-pc-linux-gnu-g95.
> Standalone ebuild for g95 would be probably better than merging it with
> gcc after all, and easier to create too, yet still likely beyond my ability.

Agreed, standalone is the way to go. Surprised it's broken on gcc 4.1.


> 7. Tried manual compilation of ESPRESSO (./configure && make all).
> Mostly worked, only tools crashed due to metadyn_pp referencing
> undefined pgopen_.
> 
> 8. Found on the web that pgopen should be found in the pgplot package.
> Tried to emerge that, but failed for the lack of g77.
> 
> 9. Mangled pgplot ebuild to recognize g95 and tried emerging again. g95
> was not accepted by the ebuild.

You need to edit fortran.eclass to recognize g95. There are three places
in there where you need to add a g95 bit -- two case statements and one
OR list of all the compilers like "g95|g77|gfortran|icc|ifort" or so.

> 10. Mangled pgplot ebuild to recognize gfortran and tried emerging
> again. Failed due to syntax errors in arguments supplied to GRGI0[1-6]
> functions.

pgplot can't work with gfortran now because gfortran doesn't recognize
%VAL -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23060. I've got a
pgplot patch that deals with most of the rest of the issues, but waiting
on that.

> 11. Turned again to g95. Mangled fortran.eclass to recognize that (and
> prioritize over gfortran, althoug not stating gfortran in the ebuild
> might neutralize its default priority as well). Emerged pgplot. g95
> shouted warnings of ``Inconsistent types (INTEGER(4)/INTEGER(1)) in
> actual argument lists'' in GRGI0[1-6] functions, but compiled the code.

Ah, see you figured out the eclass here..

> 12. Tried manual compilation of ESPRESSO (./configure && make all).
> Mostly worked, only tools crashed due to metadyn_pp referencing
> undefined pgopen_.
> 
> 13. Grepped the ESPRESSO source tree for pgopen_, found nothing. Grepped
> for pgplot. Found libraries configuration mentioned in
> pwtools/metadyn_pp.f90, but nowhere in makefiles or the configure script.

Try 'grep -i pgopen -r .' in the espresso source. The underscore isn't
in the Fortran, that's added by the compiler/linker.

> 14. Edited make.sys, added -D__PGPLOT to DFLAGS and ``-lm -lc -lpgplot
> -lX11'' to LIBS. Compiled successfuly.
> 
>   Now I have to first learn using ESPRESSO to test, wheather my build
> actually works. If I manage to sum up my compilation steps into ebuilds
> and patches, I'll put them on Bugzilla, but I'm affraid I cannot promise
> that.

I just don't think we can add it to the tree until a few more gfortran
bugs get fixed.

Thanks,
Donnie


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-science] Quantum ESPRESSO
  2006-06-08 14:59 ` Donnie Berkholz
@ 2006-06-08 15:39   ` Sebastien Fabbro
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastien Fabbro @ 2006-06-08 15:39 UTC (permalink / raw
  To: gentoo-science


> pgplot can't work with gfortran now because gfortran doesn't recognize
> %VAL -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23060. I've got a
> pgplot patch that deals with most of the rest of the issues, but waiting
> on that.

I also got several ebuilds waiting for that %val implementation in
gfortran to pass the gcc-4.1 update. I was also trying the pgplot ebuild
in portage, and switched back to g77. While at it, I slightly patched
the pgplot in the scientific overlay:
http://gentooscience.org/browser/overlay/sci-libs/pgplot
you might want to merge your patches with.

Sebastien
-- 
gentoo-science@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-science] Quantum ESPRESSO
  2006-06-08  9:53 [gentoo-science] Quantum ESPRESSO Honza Macháček
  2006-06-08 14:59 ` Donnie Berkholz
@ 2006-06-09 10:19 ` Honza Macháček
  1 sibling, 0 replies; 4+ messages in thread
From: Honza Macháček @ 2006-06-09 10:19 UTC (permalink / raw
  To: gentoo-science

[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]

  Finally I have at least submitted something like an ebuild for g95 to
https://bugs.gentoo.org/show_bug.cgi?id=102199
  Testing of my build of Quantum ESPRESSO did not go exceedingly well,
too many segfaults while calculating the examples, but at least
example01, 04, 08, 09, 11, 18, 23, 27, and 29 seem to have gone well.
I'll try to find out, why so many calculations in the other examples
crashed, wheather it was due to some reproducible fault of the ESPRESSO
build, or some misconfiguration of my system and libraries, but my
abilities for that are even more limited then the time I can pay to that.
  In addition, I have compiled the CP2K
(http://cp2k.berlios.de/index.html) CVS code (``The latest CVS entry
found is /xray_diffraction.F/1.10/Tue Feb 7 10:40:09
2006//D2006.06.06.13.40.00,'' says the automatically generated manual)
with g95. The compilation went well with gfortran too (I attach my
Linux-i686-gfortran.sopt addapted for linking ATLAS), but the gfortran
build crashed when tested on tests/QS/H2O.inp. When I addapted
Linux-i686-g95.sopt to interface with gcc-4.1.1/gfortran compiled ATLAS
(I'm attaching that too) and used g95, the code not only compiled, but
also actually worked and computed at least tests/QS/H2O.inp successfuly.
  With best regards
						Honza Macháček

[-- Attachment #2: Linux-i686-gfortran.sopt --]
[-- Type: text/plain, Size: 384 bytes --]

PERL     = perl
CC       = cc
CPP      = cpp

FC       = gfortran 
LD       = gfortran

AR       = ar -r

CPPFLAGS = -C -D__G95 -D__FFTSG -traditional-cpp -P
FCFLAGS  = -O1 -g -mieee-fp -ffast-math -ffree-form -fomit-frame-pointer
LDFLAGS  = $(FCFLAGS) 
LIBS     = /usr/lib/liblapack.a  /usr/lib/libblas.a /usr/lib/libcblas.a /usr/lib/libatlas.a

OBJECTS_ARCHITECTURE = machine_g95.o

[-- Attachment #3: Linux-i686-g95.sopt --]
[-- Type: text/plain, Size: 421 bytes --]

PERL     = perl
CC       = cc
CPP      = cpp

FC       = g95 
LD       = g95

AR       = ar -r

CPPFLAGS = -C -D__G95 -D__FFTSG -traditional -P
FCFLAGS  = -O1 -g -mieee-fp -ffast-math -ffree-form -fomit-frame-pointer
LDFLAGS  = $(FCFLAGS)
LIBS     = /usr/lib/liblapack.a  /usr/lib/libblas.a /usr/lib/libcblas.a /usr/lib/libatlas.a /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgfortran.a


OBJECTS_ARCHITECTURE = machine_g95.o

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-06-09 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-08  9:53 [gentoo-science] Quantum ESPRESSO Honza Macháček
2006-06-08 14:59 ` Donnie Berkholz
2006-06-08 15:39   ` Sebastien Fabbro
2006-06-09 10:19 ` Honza Macháček

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox