Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicit libs example ? #165

Closed
miroi opened this issue Mar 17, 2016 · 13 comments
Closed

explicit libs example ? #165

miroi opened this issue Mar 17, 2016 · 13 comments

Comments

@miroi
Copy link
Contributor

miroi commented Mar 17, 2016

Hi,

I wanted explicit libraries to be passed to compiled objects.

I put into autocmake.cfg (after DIRAC autocmake.cfg)

[explicit]
docopt: --explicit-libs=<LIBS> Explicit linker specification for extra libraries passed directly to the linker [default: off].
define: '-DEXPLICIT_LIBS=%s' % arguments['--explicit-libs'].strip()

did setup

python setup --fc=gfortran --blas=off --lapack=off --explicit-libs="/u/milias/Work/qch/software/lapack/lapack-3.6.0/build/lib/liblapack.a  /u/milias/Work/qch/software/lapack/lapack-3.6.0/build/lib/libblas.a"  build_gfortran_lapack3.6.0

but the linking command is not complete:

/usr/bin/gfortran       -O3 -funroll-all-loops CMakeFiles/dsyerv_check.dir/dsyerv_check.F90.o CMakeFiles/dsyerv_check.dir/eispack.F.o  -o dsyerv_check -rdynamic /u/milias/Work/qch/software/lapack/lapack-3.6.0/build/lib/liblapack.a

The reason could be the python strip() command.
Could we have an autocmake example of explicit libs adding ?

@miroi
Copy link
Contributor Author

miroi commented Mar 17, 2016

The problem is that explicit

[explicit]
docopt: --explicit-libs=<LIBS> Explicit linker specification for extra libraries passed directly to the linker [default: off].
define: '-DEXPLICIT_LIBS=%s' % arguments['--explicit-libs']

accepts only one string, we need more strings separated by blanks....

@bast
Copy link
Member

bast commented Mar 18, 2016

I will try to fix that. But independently of this apparent issue why don't you include BLAS and LAPACK via --blas and --lapack?

@miroi
Copy link
Contributor Author

miroi commented Mar 18, 2016

Hi,

I was testing fresh lapack3.6.0, https://github.com/miroi/lapack-dsyevr-test

python setup --fc=ifort --blas=off --lapack=off --cmake-options="-D EXPLICIT_LIBS='-L/u/milias/Work/qch/software/lapack/lapack-3.6.0/build/lib -llapack -lblas -lgfortran'"  build_ifort_lapack3.6.0

I don't know if ot works to include both blas+lapack viac --blas/--lapack for such a package...

@bast
Copy link
Member

bast commented Mar 18, 2016

Well ideally it should work and if it does not, we need to fix it. It is otherwise unnatural to include BLAS and LAPACK using --blas=off --lapack=off. But independently I will try to fix the --explicit-libs issue.

@bast
Copy link
Member

bast commented Mar 18, 2016

There is no explicit libs module in Autocmake. This is not an Autocmake issue. Probably a DIRAC issue. Closing.

@bast bast closed this as completed Mar 18, 2016
@miroi
Copy link
Contributor Author

miroi commented Mar 18, 2016

Yes,it's rather DIRAC support. Also, would be good to extend the autocmake documentation on it...

@bast
Copy link
Member

bast commented Mar 18, 2016

Extend the Autocmake documentation on what?

@miroi
Copy link
Contributor Author

miroi commented Mar 18, 2016

....on adding the explicit libs as I did, via --cmake-options="-D EXPLICIT_LIBS='-L/u ...

@bast
Copy link
Member

bast commented Mar 18, 2016

You mean documentation on --cmake-options? Autocmake knows nothing about EXPLICIT_LIBS. Please try to keep these things separated.

@miroi
Copy link
Contributor Author

miroi commented Mar 18, 2016

I would add an example (or test) to autocmake on how to include standalone math libraries. This has to do with math library search when math libs are on 'non-standard' positions (like user downloaded packages).

@bast
Copy link
Member

bast commented Mar 18, 2016

Good idea on such doc. I will open a new issue on that. This one is closed now.

@miroi
Copy link
Contributor Author

miroi commented Mar 18, 2016

...and please, Rado, would you improve EXPLICIT_LIBS usage in Dirac to that it can include more than one string ?

@bast
Copy link
Member

bast commented Mar 18, 2016

This is not the right place to discuss DIRAC issues. Open an issue there, mention me, and then we see what we can do about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants