Re: [SIESTA-L] Compilation problem of siesta1.3f1p on 64-bit machine

2005-04-26 Thread QingGuo Feng
Dear Óscar Paz,
 Thanks for your reply. Yes, now it works. But now I have
another question. When can the single quotes be replaced by double
quotes in Fortran? Do they behave completely same for all the cases? I
asked this question because in my Fortran book it uses single quotes
to write string. I never thought about the way of changing single
quotes to double quotes to solve the problem. I will consult his
question in the documents later. But I will appreciate you greatly If
you can give me brief introduction because it will save me a lot of
time. Thanks a lot.

Best regards
Q. Feng
On 4/26/05, Óscar Paz [EMAIL PROTECTED] wrote:
 Dear QingGuo,
 
I think this is caused by an error in the Intel compiler. Although
 the syntax of the line is correct as is, I changed the single quotes
 around brackets by double quotes and it compiled succesfully.
 
 Sincerely, Óscar.-





Re: [SIESTA-L] Compilation problem of siesta1.3f1p on 64-bit machine

2005-04-26 Thread Óscar Paz

Dear QingGuo,

 I think this is caused by an error in the Intel compiler. Although the
syntax of the line is correct as is, I changed the single quotes around
brackets by double quotes and it compiled succesfully.

Sincerely, Óscar.-


QingGuo Feng wrote:


Dear all,
I have met an installation problem, and even though I have read the
archives, I found no similar reports.
When I tried to compile the siesta code on my dual opteron amd 64
machine with intel em64t compiler 8.1 and Math Kernel Library
7.2 under SUSE operation system, I get the following error message:

fortcom: Error: atom.f, line 4485: Unbalanced parentheses
.   nsm=1,nsemic(l)+1-(cnfigtb(l,nsemic(l)+1,is)-config(l)))
^
fortcom: Error: atom.f, line 4484: Syntax error, found ',' when expecting
one of: :
.  (cnfigtb(l,nsm,is),sym(l),'(',qPAO(l,nsm),')',
--^
fortcom: Error: atom.f, line 4484: Syntax error, found ''' when expecting
one of: ( * :: , IDENTIFIER CHAR_CON_KIND_PARAM CHAR_NAM_KIND_PARAM
CHARACTER_CONSTANT ...
.  (cnfigtb(l,nsm,is),sym(l),'(',qPAO(l,nsm),')',
--^
compilation aborted for atom.f (code 1)
make: *** [atom.o] Error 1

It seems there is no syntax error in this expression (atom.f, lines
4483-4485).I have thought whether it's caused by the strict format of
fortran. But it does not work when I delete some space in the
continued line so as to ensure the expression is in the region from
column 7 to column 72 or compile with lower optimization option -O0. In
fact when I compile the code on a 32-bit machine with Intel 32-bit
compiler 8.1 and corresponding 32-bit Math Kernel Library, it goes through
successfully and does not show this message. Has anybody met this problem
too? Or can anybody give me some possible explanation for this problem and
suggestions to solve it?
Thanks.

By the way, I attached my used arch.make here:
SIESTA_ARCH=intel-mkl
#
# Intel fortran compiler for linux with mkl optimized blas and lapack
#
# Be sure to experiment with different optimization options.
# You have quite a number of combinations to try...
#
FC=ifort
#
FFLAGS= -w -mp -tpp5 -O3
#this default options works well for 32-bit machine
FFLAGS_DEBUG= -g
LDFLAGS=  -Vaxlib
COMP_LIBS= /opt/lib/libgoto.so ./xerbla.o
RANLIB=echo
#
NETCDF_LIBS=
NETCDF_INTERFACE=
DEFS_CDF=
#
MPI_INTERFACE=
MPI_INCLUDE=
DEFS_MPI=
#
GUIDE=/opt/intel/mkl72/lib/em64t/libguide.a
LAPACK=/opt/intel/mkl72/lib/em64t/libmkl_lapack.a
BLAS=/opt/intel/mkl72/lib/em64t/libmkl_em64t.a
#G2C=/usr/lib64/libg2c.a
LIBS=$(LAPACK) $(BLAS) $(G2C) $(GUIDE)  -lpthread
SYS=bsd
DEFS= $(DEFS_CDF) $(DEFS_MPI)
#
.F.o:
   $(FC) -c $(FFLAGS)  $(DEFS) $
f.o:
   $(FC) -c $(FFLAGS)   $
.F90.o:
   $(FC) -c $(FFLAGS)  $(DEFS) $
.f90.o:
   $(FC) -c $(FFLAGS)   $
#

Best regards
Q. Feng
--
Institut fuer Theoretische Physik
J. W. Goethe Universitaet
D-60438 Frankfurt/Main, Germany










[SIESTA-L] Compilation problem of siesta1.3f1p on 64-bit machine

2005-04-26 Thread QingGuo Feng
Dear all,
 I have met an installation problem, and even though I have read the
archives, I found no similar reports.
 When I tried to compile the siesta code on my dual opteron amd 64
machine with intel em64t compiler 8.1 and Math Kernel Library
7.2 under SUSE operation system, I get the following error message:

fortcom: Error: atom.f, line 4485: Unbalanced parentheses
 .   nsm=1,nsemic(l)+1-(cnfigtb(l,nsemic(l)+1,is)-config(l)))
^
fortcom: Error: atom.f, line 4484: Syntax error, found ',' when expecting
one of: :
 .  (cnfigtb(l,nsm,is),sym(l),'(',qPAO(l,nsm),')',
--^
fortcom: Error: atom.f, line 4484: Syntax error, found ''' when expecting
one of: ( * :: , IDENTIFIER CHAR_CON_KIND_PARAM CHAR_NAM_KIND_PARAM
CHARACTER_CONSTANT ...
 .  (cnfigtb(l,nsm,is),sym(l),'(',qPAO(l,nsm),')',
--^
compilation aborted for atom.f (code 1)
make: *** [atom.o] Error 1

It seems there is no syntax error in this expression (atom.f, lines
4483-4485).I have thought whether it's caused by the strict format of
fortran. But it does not work when I delete some space in the
continued line so as to ensure the expression is in the region from
column 7 to column 72 or compile with lower optimization option -O0. In
fact when I compile the code on a 32-bit machine with Intel 32-bit
compiler 8.1 and corresponding 32-bit Math Kernel Library, it goes through
successfully and does not show this message. Has anybody met this problem
too? Or can anybody give me some possible explanation for this problem and
suggestions to solve it?
Thanks.

By the way, I attached my used arch.make here:
SIESTA_ARCH=intel-mkl
#
# Intel fortran compiler for linux with mkl optimized blas and lapack
#
# Be sure to experiment with different optimization options.
# You have quite a number of combinations to try...
#
FC=ifort
#
FFLAGS= -w -mp -tpp5 -O3
#this default options works well for 32-bit machine
FFLAGS_DEBUG= -g
LDFLAGS=  -Vaxlib
COMP_LIBS= /opt/lib/libgoto.so ./xerbla.o
RANLIB=echo
#
NETCDF_LIBS=
NETCDF_INTERFACE=
DEFS_CDF=
#
MPI_INTERFACE=
MPI_INCLUDE=
DEFS_MPI=
#
GUIDE=/opt/intel/mkl72/lib/em64t/libguide.a
LAPACK=/opt/intel/mkl72/lib/em64t/libmkl_lapack.a
BLAS=/opt/intel/mkl72/lib/em64t/libmkl_em64t.a
#G2C=/usr/lib64/libg2c.a
LIBS=$(LAPACK) $(BLAS) $(G2C) $(GUIDE)  -lpthread
SYS=bsd
DEFS= $(DEFS_CDF) $(DEFS_MPI)
#
.F.o:
$(FC) -c $(FFLAGS)  $(DEFS) $
f.o:
$(FC) -c $(FFLAGS)   $
.F90.o:
$(FC) -c $(FFLAGS)  $(DEFS) $
.f90.o:
$(FC) -c $(FFLAGS)   $
#

Best regards
Q. Feng
--
Institut fuer Theoretische Physik
J. W. Goethe Universitaet
D-60438 Frankfurt/Main, Germany




Re: [SIESTA-L] grid2cube

2005-04-26 Thread Andrei Postnikov
Dear Miguel and Rudy (and all),

now that we are discussing this topic, I also have a script
to convert RHO and other grid properties into XCrysden format.
I attach a Fortran source and a README file.
Your suggestions and criticisms are welcome.

(Miguel: you did not attach your script in your mail,
at least it didn't go to the list).

For whoever is interested, I also have a tool to plot Fermi surfaces
from SIESTA data with XCrysden.
As you may figure out, a tool to transfer wavefunctions with XCrysden is
not yet ready.

Best regards,

Andrei Postnikov

 +-- Dr. habil. Andrei Postnikov - Tel. +49-541-969.2377 -- Fax .2351 ---+
 | Institut fuer Festkoerperforschung - FZ Juelich, D-52425 Juelich, Germany |
 +-- [EMAIL PROTECTED] - http://www.home.uni-osnabrueck.de/apostnik/ --+

On Mon, 25 Apr 2005, Miguel Pruneda wrote:

| Dear Rudy (and all),
|
| As far as I know, the format cube is only valid for orthogonal cells.  There
| are other options to plot .RHO (and .DRHO, .VH, .VT, etc).  Some of them are
| included in the siesta/Utils directory. Check the mailing-list history, 
because
| this is a frequent topic of discussion.
|
| You can also use the format of XCrysden (called xfs) to plot 3D surfaces.  I
| attach a script similar to grid2cube.f, written in f77, that you can use in 
the
| same way as grid2cube.  You can download XCrysden at: http://www.xcrysden.org/
|
| Cheers,
| Miguel
|
| Missatge citat per Rudy Coquet [EMAIL PROTECTED]:
|
|  Dear SIESTA users,
| 
|  I would like to know if there is an easy way to convert a .RHO file to a
|  cube file? Usually grid2cube works fine but I have a non-orthogonal
|  cell so I cannot use it.
| 
|  Thank you,
| 
|  Rudy Coquet
|  Cardiff Universtity, UK.
| 
|
|
|
|
| -
| This mail sent through IMP: http://horde.org/imp/
|
|C
C   rho2xsf,  a script to transform 3-dim grid function
C (i.e. LDOS, RHO, DRHO, etc.) written in SIESTA
C by subr. iorho
C into a grid for XCrysden
C
C   !!!   IMPORTANT  -- !!!
C   compile this code with the same compiler switches as Siesta,
C   otherwise reading the data from unformatted files will be spoiled.  
C
C Written by Andrei Postnikov, Mar 2005
C [EMAIL PROTECTED]
C
  program rho2xsf
  implicit none
  integer MPTS,mesh0(3),mesh1(3),ip,nspin,is,ii,jj,
 .iat,nat,ityp,nz,ix,iy,iz,ind,mn,
 .ixmax,iymax,izmax,ixmin,iymin,izmin
  parameter (MPTS=1)
  character inpfil*60,outfil*60,syslab*30,suffix*6
  real*8 cell(3,3),coord(3),b2ang
  parameter (b2ang=0.529177)  !  Bohr to Angstroem
  real   func(MPTS),fdum  !  NB! single precision, as in iorho.F
  real   fmax,fmin
C
C string manipulation functions in Fortran used below:
C len_trim(string): returns the length of string 
C   without trailing blank characters,
C char(integer)   : returns the character in the specified position
C   of computer's ASCII table, i.e. char(49)=1
C
  write (6,701)
  701 format( Specify  SystemLabel (or 'siesta' if none): ,$)
  read (5,*) syslab
  inpfil = syslab(1:len_trim(syslab))//'.XV'
  open (11,file=inpfil,form='formatted',status='old',err=801)
  write (6,*) 'Found and opened: ',inpfil
C reads from .XV and writes into .XSF file in XCrysden format:
  outfil = syslab(1:len_trim(syslab))//'.XSF'
  open (12,file=outfil,form='formatted',status='new',err=802)
  write (6,*) 'Opened as new:',outfil
C --- write crystal structure data:
  write (12,'(a7)') 'CRYSTAL'
  write (12,'(a7)') 'PRIMVEC'
  do ii=1,3
read  (11,*,end=803,err=803)   (cell(ii,jj),jj=1,3)
write (12,204) (cell(ii,jj)*b2ang,jj=1,3)
  enddo
  write (12,'(a9)')  'PRIMCOORD'
  read  (11,*,end=804,err=804)  nat
  write (12,'(i4,a3)')  nat,'  1'
  do iat=1,nat
read (11,*,end=805,err=805) ityp, nz, (coord(ii),ii=1,3)
write (12,201) nz, (coord(ii)*b2ang,ii=1,3)
  enddo
  close (11)
C --- finished with .XV; now look for grid data files to include:
C
  101 write (6,702)
  702 format (' Add grid property (LDOS, RHO, ...;',
 .' or BYE if none): ',$)
  read (5,*) suffix
  inpfil = syslab(1:len_trim(syslab))//
 .  '.'//suffix(1:len_trim(suffix))
  open (11,file=inpfil,form='unformatted',status='old',err=806)
  write (6,*) 'Found and opened: ',inpfil(1:len_trim(inpfil))
  read (11,err=807) cell 
  read (11,err=808) mesh0, nspin 
C
C --- Here, introdruce mesh step (keep every mn's point along
C each grid dimension).
   11 write (6,'(a18,3i5)') 'Grid divisions:   ',mesh0
  write (6,'(a39,$)')  Keep for XSF file every N'th point, N=
  read (5,*) mn
  if (mn.le.0) then
write (6,*) ' N must be positive, try again'
goto 11
  endif
  if