Akbar, this weird... it could be that, for whatever reason, the system is
nor being able to find a library it shouldn't even look for, since you have
specified static linking in LDFLAGS. Try adding -pthread
before -L/home/akbar/Packages/scalapack-1.8.0, and to LDFLAGS as well just
to make sure.

Marcos

On Fri, Jul 30, 2010 at 8:47 AM, akbar jahangiri <[email protected]>wrote:

> Dear Marcos
>
> I tried to compile SIESTA package but I faced some difficulties like :
>
> First the following error which system ( I think ) is not able to find the
> library "lpthread_nonshared"
> ======================================================================
>
> g.o pxf.o libfdf.a  libxmlparser.a libmpi_f90.a\
>                 `FoX/FoX-config --libs --wcml`
> -L/home/akbar/Packages/scalapack-1.8.0 -lscalapack
> -L/home/akbar/Packages/BLACS/LIB -lblacsF77init -lblacs -L/usr/lib
> -lpthread_nonshared
>
> ld: cannot find -lpthread
> make: *** [siesta] Error 1
> ======================================================================
>
> But when I search for it in my system I have it as you mention before.
>
> =====================================================================
> [ak...@mac1 Obj]$ locate libpthread
> /lib/libpthread-2.12.so
> /lib/libpthread.so.0
> /lib/i686/nosegneg/libpthread-2.12.so
> /lib/i686/nosegneg/libpthread.so.0
> /usr/lib/libpthread.so
> /usr/lib/libpthread_nonshared.a
> =====================================================================
>
> what can be the problem ?
>
> my arch make file is attached too.
>
> Thank you very much
> best regards
> Akbar
>
>
>
>
>
> 2010/7/25 Marcos Veríssimo Alves <[email protected]>
>
> Akbar,
>>
>> Your system is not being able to find libpthread.a. Usually this is in
>> /usr/lib or /usr/lib64, depending on the version of the compiler (32 or 64
>> bits) you are using. Also, if in the compilation options you have -static
>> and libpthread.a is not present (but only libpthread.so) then you should use
>> libpthread_nonshared.a, which should appear as lpthread_nonshared in the
>> list of libraries.
>>
>> Marcos
>>
>>
>> On Sat, Jul 24, 2010 at 5:08 PM, akbar jahangiri <[email protected]>wrote:
>>
>>> Dear Marcos
>>>
>>> Thank you for your guidance.
>>>
>>> While compiling Siesta-3.0_rc2 I have still problem, I think related to
>>> libraries (BLACS).
>>> But I have compiled the libraries as you have mentioned in this mail. and
>>> I was able to compile them.
>>> When I am going to compile SIESTA I get the following error which I think
>>> I should not get! (according to my arch.make file )
>>>
>>> =========================================================
>>> o get_target_stress.o fire_optim.o zm_fire_optim.o cell_fire_optim.o
>>> m_fire_para.o m_fire_mixing.o write_raw_efs.o m_iodm.o m_sparse.o
>>> kpoint_pdos.o  nag.o pxf.o libfdf.a  libxmlparser.a libmpi_f90.a\
>>>                 `FoX/FoX-config --libs --wcml`
>>> -L/home/akbar/Packages/scalapack-1.8.0 -lscalapack
>>> -L/home/akbar/Packages/BLACS/LIB -lblacsF77init -lblacs -lblacsCinit
>>> ld: cannot find -lpthread
>>> make: *** [siesta] Error 1
>>> ============================================================
>>>
>>> I am sending the arck.make file too.
>>> I should mention in the directory of "BLACS"  I did not have the
>>> following "libs" (which I have comment them in arch.make file )
>>>
>>> >>>-lmkl_lapack -lmkl_em64t -lguide -lpthread_nonshared -lmkl_core <<
>>>
>>> but still siesta is asking for them !!!!
>>>
>>> could you please let me know what is the problem?
>>>
>>> Best regards
>>> Akbar Jahangiri
>>>
>>> 2010/7/13 Marcos Veríssimo Alves <[email protected]>
>>>
>>> Hi all,
>>>>
>>>> Given that many people are actually having problems compiling whatever
>>>> version of Siesta after 2.x, I have decided to send a small, ultra-concise,
>>>> step-by-step guide to compile siesta as I have done in my desktop and my
>>>> laptop. I suppose it will be the case of many people here, so I forward an
>>>> email I sent to a colleague some time ago for the compilation of siesta
>>>> 3.0-rc1. I have just tested the executable with the nanotube 5-0 test on a
>>>> dual core desktop and it runs fine. So, I expect thos instructions to work
>>>> for most multicore computers.
>>>>
>>>> Steps for compiling Siesta 3.0-rc2
>>>>
>>>> 0 - Very very very very very important: *ifort 10.1* *(11, at least
>>>> until some time ago, didn't work. It's buggy and it will only waste your
>>>> time - and the time of the people of the rest of the list)* and
>>>> mkl 10.0.1.014. Again, without this, you'll probably be wasting your time,
>>>> and everyone else in the list's as well. Don't forget to set the 
>>>> environment
>>>> variables with the appropriate scripts for ifort and mkl. Also, search
>>>> netlib.org for the Blacs and Scalapack.
>>>>
>>>> 1 - I am using mpich2-1.2.1. If you want to use a newer version, feel
>>>> free to do so, but please download mpich2. It's faster to compile, and it's
>>>> known to work.
>>>>
>>>> 2 - Type tar -zxvf for the mpich tarball and, for configuring:
>>>> ./configure F77=ifort FFLAGS=-O2 F90=ifort F90FLAGS=-O2 --enable-f90
>>>>
>>>> 3 - Type make install. For installing in the default directories, you
>>>> will need root access. If you don't have root access, ask the sysadmin or
>>>> your closest Linux guru to install ifort 10, the mkl and mpich with the
>>>> instructions given in steps 0-3. If you install in "unconventional
>>>> directories" then don't forget to inclued them in your PATH environment
>>>> variable, preferably before anything else that was already set.
>>>>
>>>> 4 - With mpich compiled, it's time to compile BLACS. There's no need to
>>>> be root for that - just use the one I am sending here. Adapt the Bmake.inc
>>>> inside the root directory to reflect the installation directories you need:
>>>> mpif90, mpi include files and all that jazz, and type make mpi .
>>>>
>>>> 5 - Compile scalapack. I am using scalapack 1.7.5. Adapt SLmake.inc as
>>>> needed and type make.
>>>>
>>>> 6 - Use the arch.make included in this email to compile siesta after
>>>> having creating the compilation directory with 
>>>> $SIESTA_HOME/Src/objsetup.sh.
>>>> Adapt arch.make to reflect the directories where all the libraries are
>>>> found. and type make.
>>>>
>>>> 7 - Start the mpd and run siesta in parallel (you might end up not being
>>>> able to hold some tears, hopefully out of happiness :D )
>>>>
>>>> Hope this helps. It is also possible to use the Blacs and Scalapack
>>>> included with the mkl, but for this you'll have to search the list archives
>>>> after November 2009...
>>>>
>>>> Cheers,
>>>>
>>>> Marcos
>>>>
>>>
>>>
>>
>

Responder a