Where do I put site.cfg? What should it contain? Can I build w/o atlas?
I'm trying to build numpy an svn sandbox (just updated a couple minutes ago). If I grub around in numpy/distutils/system_info.py it says something about creating a site.cfg file with (for example) information about locating atlas. It says nothing about where this file belongs. I took a stab and placed it in my numpy source tree, right next to setup.py, with these lines: [atlas] library_dirs = /home/titan/skipm/src/ATLAS/lib/SunOS_Babe include_dirs = /home/titan/skipm/src/ATLAS/include/SunOS_Babe # for overriding the names of the atlas libraries atlas_libs = lapack, f77blas, cblas, atlas I then verified that those directories exist, contain apparently useful contents, and that I didn't have a conflicting environment variable named ATLAS: % ls /home/titan/skipm/src/ATLAS/lib/SunOS_Babe Make.inc libatlas.a libf77blas.a libtstatlas.a Makefile libcblas.a liblapack.a % ls /home/titan/skipm/src/ATLAS/include/SunOS_Babe atlas_buildinfo.h atlas_dmv.h atlas_smvT.h atlas_zr1.h atlas_cNCmm.h atlas_dmvN.h atlas_sr1.h atlas_zsysinfo.h atlas_cacheedge.h atlas_dmvS.h atlas_ssysinfo.h atlas_ztrsmXover.h atlas_cmv.h atlas_dmvT.h atlas_strsmXover.h cXover.h atlas_cmvN.h atlas_dr1.h atlas_trsmNB.h cmm.h atlas_cmvS.h atlas_dsysinfo.h atlas_type.h dXover.h atlas_cmvT.h atlas_dtrsmXover.h atlas_zNCmm.h dmm.h atlas_cr1.h atlas_sNCmm.h atlas_zmv.h sXover.h atlas_csysinfo.h atlas_smv.h atlas_zmvN.h smm.h atlas_ctrsmXover.h atlas_smvN.h atlas_zmvS.h zXover.h atlas_dNCmm.h atlas_smvS.h atlas_zmvT.h zmm.h % env | grep ATLAS % Then I tried "python setup.py build": Script started on Wed Feb 15 13:23:21 2006 babe:% python setup.py build Running from numpy source directory. No module named __svn_version__ F2PY Version 2_2110 blas_opt_info: blas_mkl_info: NOT AVAILABLE atlas_blas_threads_info: Setting PTATLAS=ATLAS Setting PTATLAS=ATLAS Setting PTATLAS=ATLAS FOUND: libraries = ['ptf77blas', 'ptcblas', 'atlas'] library_dirs = ['/opt/lib'] language = c include_dirs = ['/opt/include'] running build_src building extension "atlas_version" sources adding 'build/src/atlas_version_0x4568501b.c' to sources. running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext building 'atlas_version' extension compiling C sources gcc options: '-fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC' compile options: '-I/opt/include -Inumpy/core/include -I/opt/app/g++lib6/python-2.4/include/python2.4 -c' /opt/lang/gcc-3.4/bin/gcc -shared build/temp.solaris-2.8-i86pc-2.4/build/src/atlas_version_0x4568501b.o -L/opt/lib -lptf77blas -lptcblas -latlas -o build/temp.solaris-2.8-i86pc-2.4/atlas_version.so Text relocation remains referenced against symbol offset in file <unknown> 0x7 /opt/lib/libatlas.a(ATL_buildinfo.o) <unknown> 0xc /opt/lib/libatlas.a(ATL_buildinfo.o) <unknown> 0x11 /opt/lib/libatlas.a(ATL_buildinfo.o) <unknown> 0x16 /opt/lib/libatlas.a(ATL_buildinfo.o) How come distutils is ignoring my site.cfg file? Neither of these commands: python setup.py --help python setup.py build --help mention site.cfg. Failing all this, is there some way to build numpy/scipy without atlas? At this point I just want the damn thing to build. I'll worry about performance later (if at all). Thx, -- Skip Montanaro http://www.musi-cal.com/ skip@pobox.com
skip@pobox.com wrote:
I'm trying to build numpy an svn sandbox (just updated a couple minutes ago). If I grub around in numpy/distutils/system_info.py it says something about creating a site.cfg file with (for example) information about locating atlas. It says nothing about where this file belongs.
Sure it does. "The file 'site.cfg' in the same directory as this module is read for configuration options." I think it's a really bad place for it to be, but that is the state of affairs right now. -- Robert Kern robert.kern@gmail.com "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
Robert Kern wrote:
skip@pobox.com wrote:
I'm trying to build numpy an svn sandbox (just updated a couple minutes ago). If I grub around in numpy/distutils/system_info.py it says something about creating a site.cfg file with (for example) information about locating atlas. It says nothing about where this file belongs.
Sure it does. "The file 'site.cfg' in the same directory as this module is read for configuration options." I think it's a really bad place for it to be, but that is the state of affairs right now.
So, in particular, does this mean that it is read from (relative to the location of the main setup.py file) numpy/distutils/site.cfg ?? Yes, that is a bad place. We need some suggestions as to where site.cfg should be read from. I think you can set the environment variable ATLAS to 'None' and it will ignore ATLAS... I believe this is true of any of the configuration options. -Travis
Travis> Yes, that is a bad place. We need some suggestions as to where Travis> site.cfg should be read from. First place to look should be `pwd`. Travis> I think you can set the environment variable ATLAS to 'None' and Travis> it will ignore ATLAS... Thank you, thank you, thank you. I now have numpy built... I'll tackle the rest of scipy mañana. Skip
>> It says nothing about where this file belongs. Robert> Sure it does. "The file 'site.cfg' in the same directory as this Robert> module is read for configuration options." Thanks. My post was made partly in frustration. Kinda hard to see straight when your blood is boiling... Any reason for site.cfg to not be searched for in the current directory? It seems that might allow better multi-platform builds (e.g., I'm working on Solaris 10 now, but will eventually build on at least one variety of Linux). Skip
skip@pobox.com wrote:
>> It says nothing about where this file belongs.
Robert> Sure it does. "The file 'site.cfg' in the same directory as this Robert> module is read for configuration options."
Thanks. My post was made partly in frustration. Kinda hard to see straight when your blood is boiling... Any reason for site.cfg to not be searched for in the current directory? It seems that might allow better multi-platform builds (e.g., I'm working on Solaris 10 now, but will eventually build on at least one variety of Linux).
Try the latest SVN. http://projects.scipy.org/scipy/numpy/changeset/2112 -- Robert Kern robert.kern@gmail.com "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
Robert> Try the latest SVN. Robert> http://projects.scipy.org/scipy/numpy/changeset/2112 Thanks. Next time I'm in a masochistic mood and want to build with atlas I'll give it a whirl. While I think of it, is there any reason that include_dirs in site.cfg is ignored? Skip
skip@pobox.com wrote:
Robert> Try the latest SVN.
Robert> http://projects.scipy.org/scipy/numpy/changeset/2112
Thanks. Next time I'm in a masochistic mood and want to build with atlas I'll give it a whirl. While I think of it, is there any reason that include_dirs in site.cfg is ignored?
It shouldn't be. Exactly what is failing for you? -- Robert Kern robert.kern@gmail.com "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
skip@pobox.com wrote:
Robert> Try the latest SVN.
Robert> http://projects.scipy.org/scipy/numpy/changeset/2112
Thanks. Next time I'm in a masochistic mood and want to build with atlas I'll give it a whirl. While I think of it, is there any reason that include_dirs in site.cfg is ignored?
I haven't personally figured out how/if site.cfg is related to setup.cfg, but in setup.cfg, there was an issue that was fixed just yesterday regarding include_dirs: http://projects.scipy.org/scipy/numpy/ticket/4 (I apparently gave the ticket a wrong title referring to site.cfg -- I mean setup.cfg.) I wonder if that fixes your issue or if there's another one...
skip@pobox.com wrote:
I'm trying to build numpy an svn sandbox (just updated a couple minutes ago). If I grub around in numpy/distutils/system_info.py it says something about creating a site.cfg file with (for example) information about locating atlas. It says nothing about where this file belongs. I took a stab and placed it in my numpy source tree, right next to setup.py, with these lines:
Failing all this, is there some way to build numpy/scipy without atlas? At this point I just want the damn thing to build. I'll worry about performance later (if at all).
Yes. You need to set the appropriate environment variables to 'None' In particular, on my system (which is multithreaded and has a BLAS picked up from /usr/lib and an unthreaded ATLAS that the system will find) export PTATLAS='None' export ATLAS='None' export BLAS='None' did the trick. -Travis
participants (4)
-
Andrew Straw -
Robert Kern -
skip@pobox.com -
Travis Oliphant