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
>>>
>>
>>
>
#
# This file is part of the SIESTA package.
#
# Copyright (c) Fundacion General Universidad Autonoma de Madrid:
# E.Artacho, J.Gale, A.Garcia, J.Junquera, P.Ordejon, D.Sanchez-Portal
# and J.M.Soler, 1996- .
#
# Use of this software constitutes agreement with the full conditions
# given in the SIESTA license, as signed by all legitimate users.
#
.SUFFIXES:
.SUFFIXES: .f .F .o .a .f90 .F90

SIESTA_ARCH=x86_fedora-unknown-linux-gnu--Intel

FPP=
FPP_OUTPUT=
FC=mpif90
RANLIB=ranlib

SYS=nag

SP_KIND=4
DP_KIND=8
KINDS=$(SP_KIND) $(DP_KIND)

#FFLAGS=-O2 -mtune=core2 -xP -mp1 -prefetch
#FFLAGS= -g -mp -O2 #-Vaxlib -static -i-static # -vec-report0
FFLAGS= -g -O2
FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DWXML_INIT_FIX

LDFLAGS= -Vaxlib -i-static -static
#LDFLAGS= -Vaxlib -i-static -static
ARFLAGS_EXTRA=

FCFLAGS_fixed_f=
FCFLAGS_free_f90=
FPPFLAGS_fixed_F=
FPPFLAGS_free_F90=

BLAS_LIBS= -L $(HOME)/intel/mkl/9.1.023/lib/32/ -libmkl_ia32
#-L/opt/intel/mkl/10.0.1.014/lib/em64t -lmkl_em64t
LAPACK_LIBS= -L $(HOME)/intel/mkl/9.1.023/lib/32/ -lmkl_lapack
#-L/opt/intel/mkl/10.0.1.014/lib/em64t -lmkl_lapack
BLACS_LIBS=
SCALAPACK_LIBS=
COMP_LIBS=


#
# This (as well as the -DMPI definition) is essential for MPI support
MPI_INTERFACE=libmpi_f90.a
MPI_INCLUDE=.

# Preprocessor definitions or flags.
# Here we use FPPFLAGS (as 'configure' calls them), but historically
# it was very common to use DEFS. Try to use only FPPFLAGS from now on,
# converting any old arch.make files you might have lying around, and
# remember that you have to change the final building rules at the end
# to use only FPPFLAGS. DEFS is deprecated.

#LIBS=$(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(NETCDF_LIBS)
LIBS= -L/home/akbar/Packages/scalapack-1.8.0 -lscalapack 
-L/home/akbar/Packages/BLACS/LIB -lblacsF77init -lblacs -L/usr/lib 
-lpthread_nonshared

#-L/usr/local/software/install/scalapack-1.7.5 -lscalapack
#-L/usr/local/software/install/BLACS/LIB -lblacsF77init -lblacs -lblacsCinit 
-lmkl_lapack -lmkl_em64t -l#guide -lpthread_nonshared -lmkl_core

#SIESTA needs an F90 interface to MPI
#This will give you SIESTA's own implementation
#If your compiler vendor offers an alternative, you may change
#to it here.
MPI_INTERFACE= libmpi_f90.a
MPI_INCLUDE= /usr/local/include
MPI_LIBS= -L/usr/local/lib -lfmpich -lmpich -lmpif90
DEFS_MPI= -DMPI

#Dependency rules are created by autoconf according to whether
#discrete preprocessing is necessary or not.
.F.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F)  $<
.F90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_free_F90) $<
.f.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_fixed_f)  $<
.f90.o:
        $(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_free_f90)  $<

Responder a