Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 122958 - cblas-reference-20030223.ebuild (new ebuild)
Summary: cblas-reference-20030223.ebuild (new ebuild)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Science Related Packages
URL: http://www.netlib.org/blas/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2006-02-15 13:22 UTC by Adam Piątyszek
Modified: 2006-04-11 06:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
New ebuild providing NetLib's CBLAS interface to BLAS (cblas-reference-20030223.ebuild,2.42 KB, text/plain)
2006-02-15 13:24 UTC, Adam Piątyszek
Details
Patch for src/Makefile in CBLAS/src directory (cblas-gentoo.patch,687 bytes, patch)
2006-02-15 13:25 UTC, Adam Piątyszek
Details | Diff
updated ebuild (cblas-reference-20030223.ebuild,1.74 KB, text/plain)
2006-03-18 04:32 UTC, Markus Dittrich (RETIRED)
Details
patch for the ebuild modified by Markus (cblas-reference-20030223.ebuild.patch,1.11 KB, patch)
2006-03-19 02:19 UTC, Adam Piątyszek
Details | Diff
c-reference file for eselect tool (c-reference,525 bytes, text/plain)
2006-03-20 14:32 UTC, Adam Piątyszek
Details
updated ebuild with eselect support (cblas-reference-20030223.ebuild,1.75 KB, text/plain)
2006-03-20 14:33 UTC, Adam Piątyszek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Piątyszek 2006-02-15 13:22:34 UTC
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
Comment 1 Adam Piątyszek 2006-02-15 13:24:09 UTC
Created attachment 79870 [details]
New ebuild providing NetLib's CBLAS interface to BLAS
Comment 2 Adam Piątyszek 2006-02-15 13:25:03 UTC
Created attachment 79871 [details, diff]
Patch for src/Makefile in CBLAS/src directory
Comment 3 Markus Dittrich (RETIRED) gentoo-dev 2006-03-18 04:32:26 UTC
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
Comment 4 Adam Piątyszek 2006-03-19 02:19:27 UTC
Created attachment 82524 [details, diff]
patch for the ebuild modified by Markus
Comment 5 Adam Piątyszek 2006-03-19 02:32:59 UTC
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.
Comment 6 Markus Dittrich (RETIRED) gentoo-dev 2006-03-20 08:06:47 UTC
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
Comment 7 Markus Dittrich (RETIRED) gentoo-dev 2006-03-20 10:05:49 UTC
Sorry, I forgot to cc sci@g.o on this one.

best,
Markus
Comment 8 Markus Dittrich (RETIRED) gentoo-dev 2006-03-20 10:30:34 UTC
(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
Comment 9 Adam Piątyszek 2006-03-20 13:43:36 UTC
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
Comment 10 Adam Piątyszek 2006-03-20 14:32:00 UTC
Created attachment 82715 [details]
c-reference file for eselect tool
Comment 11 Adam Piątyszek 2006-03-20 14:33:05 UTC
Created attachment 82716 [details]
updated ebuild with eselect support
Comment 12 Adam Piątyszek 2006-03-20 14:41:11 UTC
(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...
Comment 13 Markus Dittrich (RETIRED) gentoo-dev 2006-03-25 05:12:06 UTC
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 
Comment 14 Adam Piątyszek 2006-03-26 23:22:19 UTC
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
Comment 15 Markus Dittrich (RETIRED) gentoo-dev 2006-03-27 06:57:55 UTC
(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 
Comment 16 Adam Piątyszek 2006-04-11 04:50:11 UTC
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
Comment 17 Markus Dittrich (RETIRED) gentoo-dev 2006-04-11 06:36:27 UTC
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