From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: *** X-Spam-Status: No, score=3.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, FORGED_MUA_MOZILLA,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,222ed89632aabb93 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.205.139.2 with SMTP id iu2mr5549632bkc.7.1342044420061; Wed, 11 Jul 2012 15:07:00 -0700 (PDT) Path: m12ni40bkm.0!nntp.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: Free AMD Core Math Library (BLAS/LAPACK) + Ada Date: Wed, 11 Jul 2012 13:17:15 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <41b74e89-f112-4791-883d-236080652dbf@googlegroups.com> <2565f27a-48d1-4000-978d-c3946154ea32@googlegroups.com> <212027fd-e3a3-45cc-b594-df6a4ae96138@googlegroups.com> <0c159836-b4b9-4861-85cd-e3e61e94f8bc@googlegroups.com> <99901f55-e61a-4808-a442-1a62e625cd2e@googlegroups.com> <37b4ba31-245e-44d1-9183-5c3367c88101@googlegroups.com> <027286e8-2436-408a-acad-c1bbf42431f8@googlegroups.com> <4ffda054$0$6583$9b4e6d93@newsspool3.arcor-online.net> <7057a456-5715-435c-95c5-cc6e9f80818d@googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: KdJUrTuvv3Zv/s8pPxNluw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-07-11T13:17:15-05:00 List-Id: On 7/11/2012 11:54 AM, Ada novice wrote: > On Wednesday, July 11, 2012 4:48:36 PM UTC+1, Georg Bauhaus wrote: > > In step 5 from Nasser: > > http://12000.org/my_notes/ada/index.htm > > On issuing gnatmake *.adb, I get: > > gcc-4.6 -c ada_blas-complex.adb > gcc-4.6 -c ada_blas.ads > gcc-4.6 -c ada_blas-real.adb > gcc-4.6 -c example1.adb > gcc-4.6 -c example_support.ads > gnatbind -x example1.ali > gnatlink exmaple1.ali > > ./exmaple_support_o: In function `example_support_real__blas_amax` > example_suport.ads(.text+0xeb): undefined reference to `isamax_` > This is a blas link. once you have done step (2) in the cheat sheet above, you need to refresh your .bashrc to make sure those environment variables are exported. i.e. type >source $HOME/.bashrc (first time you login or start a new terminal, this is done automatically as part of making a new shell, but it seems you did not do login after adding those env. variables to your .bashrc). Now, type >echo $LD_LIBRARY_PATH to make sure they are defined. Now gnatmake in step(5) should work. (assuming you did step (1) which is installation of the blas and lapack and that LD_LIBRARY_PATH is correct pointing to the those libraries. But step(5) is missing one thing, I'll fix the cheat sheet now. Please try this command instead to build the BLAS files ----------------------------- >ls /usr/lib/atlas-base/atlas/ libblas.so.3gf libblas.so.3gf.0 liblapack.so.3gf liblapack.so.3gf.0 >gnatmake *.adb -largs -lblas gnatbind -x example1.ali gnatlink example1.ali -lblas gnatbind -x print_precisions.ali gnatlink print_precisions.ali -lblas >./example1 Dot product is: 0.00000E+00 > ----------------------------- Notice you need to add -largs -lblas to gnatmake command to tell it the library to link to (the blas library). the LD_LIBRARY_PATH is just for convenience to that I do have to type the path each time I call gnatmake. You do not really needed, you can pass gnatmake all the arguments each time like this: ------------------------------- >export LD_LIBRARY_PATH= #clear it >echo $LD_LIBRARY_PATH >gnatmake *.adb -largs -lblas -L/usr/lib/atlas-base/atlas gnatmake: "example1" up to date. gnatbind -x print_precisions.ali gnatlink print_precisions.ali -lblas -L/usr/lib/atlas-base/atlas > --------------------------------------- As for you other question on empty .bashrc, that is fine. I also had no .bashrc file when I installed mint. You can just create one in text editor. Also there are many templates of .bashrc on the net you can copy and edit for your use. But for now, just keep it simple and make one and use it. -Nasser