Hi! Please find the attached ebuild and patch that provide NetLib's C interface for BLAS routines, namely CBLAS. The ebuild is similar to the blas-reference and lapack-reference ebuilds. Note: I haven't tested the ifc compilation, but since it is almost the same as in blas-reference ebuild, I guess it should work. BR, /ediap
Created attachment 79870 [details] New ebuild providing NetLib's CBLAS interface to BLAS
Created attachment 79871 [details, diff] Patch for src/Makefile in CBLAS/src directory
Created attachment 82451 [details] updated ebuild Hi Adam, Thank you very much for the ebuild. I've reworked it a little bit and particularly removed the ifc use flag. It builds fine for me by simply setting F77="g77" or "ifc". It didn't have time yet to test the actual libraries. Please give it a spin and let me know what you think. Thanks, Markus
Created attachment 82524 [details, diff] patch for the ebuild modified by Markus
Hi Markus, > Thank you very much for the ebuild. I've reworked it a little bit and > particularly removed the ifc use flag. It builds fine for me by simply > setting F77="g77" or "ifc". It didn't have time yet to test the actual > libraries. Please give it a spin and let me know what you think. Thanks for your help in validating this ebuid... I found three issues in your latest ebuild, which I tried to fix in the patch provided: 1) FFLAGS passed to the "make all" command in src_compile section are not defined. I changed it to CFLAGS, since the same behaviour is used in blas-reference-*.ebuild. Is it OK? (BTW, in my previous ebuild FFLAGS were set to CFLAGS for gcc compiler only). 2) RPATH was not defined in src_install section but used in installation commands. 3) Library stripping and symlinking is automatically done by "libtool --mode=install" command, so I removed these doubled commands. /ediap PS. Thanks for bumping the IT++ library ebuild.
Hi Adam, Thanks a lot for your comments! > 1) FFLAGS passed to the "make all" command in src_compile section are not > defined. I changed it to CFLAGS, since the same behaviour is used in > blas-reference-*.ebuild. Is it OK? (BTW, in my previous ebuild FFLAGS were set > to CFLAGS for gcc compiler only). In my opinion FFLAGS should remain here. It is the user's responsibility to define them appropriately, e.g. by passing FFLAGS=xxx on the command line or by defining them in /etc/make.conf. Simply setting them to CFLAGS could lead to unpleasant surprises, particularly if different C and Fortran compilers are used. > 2) RPATH was not defined in src_install section but used in installation > commands. As long as a variable is not defined as local in a code block (i.e. local RPATH=xx wouldn't work) it remains visible to the rest of the script, hence defining it only once in src_compile should be fine. > 3) Library stripping and symlinking is automatically done by "libtool > --mode=install" command, so I removed these doubled commands. > You're absolutely correct and thanks for pointing this out. I'll do a little more testing and will then commit the ebuild to portage. > PS. Thanks for bumping the IT++ library ebuild. > You're welcome. Best, Markus
Sorry, I forgot to cc sci@g.o on this one. best, Markus
(In reply to comment #6) > I'll do a little more testing and will then commit the ebuild to > portage. I forgot to add that we of course need to make sure that cblas-reference plays well with blas-config. Hence the libraries should go into /usr/$(get_libdir)/blas/cblas-reference and we need to provide the appropriate cblas-reference stubb in in /usr/$(get_libdir)/blas. Thanks, Markus
Hi again, (In reply to comment #6) > In my opinion FFLAGS should remain here. It is the user's responsibility to > define > them appropriately, e.g. by passing FFLAGS=xxx on the command line or > by defining them in /etc/make.conf. Simply setting them to CFLAGS could lead > to unpleasant surprises, particularly if different C and Fortran compilers are > used. OK. Let's leave the FFLAGS as they are now used. > As long as a variable is not defined as local in a code block (i.e. local > RPATH=xx > wouldn't work) it remains visible to the rest of the script, hence defining it > only once in src_compile should be fine. You are right. I just checked this and it works as you describe. /ediap
Created attachment 82715 [details] c-reference file for eselect tool
Created attachment 82716 [details] updated ebuild with eselect support
(In reply to comment #8) > I forgot to add that we of course need to make sure that > cblas-reference plays well with blas-config. > Hence the libraries should go into /usr/$(get_libdir)/blas/cblas-reference > and we need to provide the appropriate cblas-reference stubb > in in /usr/$(get_libdir)/blas. I prepared such a support in the latest attached ebuild, however "eselect blas set reference" not work properly for CBLAS yet. I guess eselect needs to be updated accordingly, which is quite strange and inconvenient when adding new ebuilds. Could you have a look at the updated ebuild and validate it once again? Thanks! /ediap PS. Have you seen the latest post from Sebastian Fabbro at gentoo-science mailing list? He also mentioned virtual/cblas as an option, which could be valuable...
Hi Adam, I just committed the cblas-reference ebuild to portage. Currently, it is still package.masked and I would be very grateful if you could try it out once it hits the mirrors. I compiled itpp against it with no problems. Thanks, Markus
Hi Markus, > I just committed the cblas-reference ebuild to portage. > Currently, it is still package.masked and I would be very > grateful if you could try it out once it hits the mirrors. > I compiled itpp against it with no problems. Thanks for the commit. I have just tested it with IT++ and it seems to work. I also had a look at the final ebuild and I wonder why did you change the /usr/$(get_lib)/blas/reference into /usr/$(get_lib)/blas/cblas-reference. I think, you can unmask the ebuild as is to the "~arch" state. BR, /ediap
(In reply to comment #14) > Thanks for the commit. I have just tested it with IT++ and it seems to work. I > also had a look at the final ebuild and I wonder why did you change the > /usr/$(get_lib)/blas/reference into /usr/$(get_lib)/blas/cblas-reference. Hi Adam, Thanks for testing, it is highly appreciated! I have to agree with you that the cblas-reference libs should be in the same directory as the blas-reference ones. I've changed the ebuild accordingly and unmasked it. best, Markus
Hi Markus, Could you please add "~amd64" to the KEYWORDS for this ebuild. I have tested cblas-reference on a 64-bit AMD platworm, and it works OK with, at least with IT++. Thanks, /ediap
Hi Adam, Thank you very much for testing. The ~amd64 marking can only be done by our amd64 team since I don't own an amd64 machine myself (gentoo policy). I'll file a bug with them later and cc you to it. Thanks, Markus