[CPMD-list] cpmd2cube crosscompilation

Eric VERFAILLIE ericverfaillie at yahoo.fr
Tue Sep 14 10:30:29 CEST 2004


Hello,
It's working (I think, it's in calculation now...)
 --- Ari P Seitsonen <Ari.P.Seitsonen at iki.fi> a écrit : 
> 
> Dear Eric,
> 
>   If I also have understood correctly, you want to run CPMD on the NEC-SX6
> and run 'cpmd2cube' on a single processor on the linux PC, is that
> correct? I tried that (running on NEC-SX5 though, then on a linux PC with
> SuSE 9.1 and PGI 5.1), and with the following modifications I managed to
> get the HOMO of the water molecule correctly:

yes you're right



>   1) Change the routine 'read_density_file' (in 'readwrites.F') to the
>     version following below; the idea is to read the integers into
>     INTEGER*8 variables - ehmm, there would be a nicer way in FORTRAN90, I
>     admit, then copy the values to the origiran variables. I did this not
>     to have to change all the libraries if using the compiler to switch
>     all integers to 8-byte integers
> 
>   2) Use the option '-byteswapio' if compiling with PGI (something similar
>     if using 'ifc'/'ifort')


 i think only  '-convert big_endian' for 'ifort' is necessary but i added -i -r8 too.

>   3) Run with the option '-double' (since the data is written into 16-byte
>     complex in NEC)

this is very important thank you
 
> Please keep us updated whether you manage to visualise the CPMD cube files
> this or another way (now there's an option in CPMD to give cube files
> instead of the unformatted files I thought), and please don't hesitate to
> call for help if you don't manage.
> 
>   I still strongly advice all users of 'cpmd2cube' to apply the changes
> provided by Axel Kohlmeyer!!



I have done a try with the new cpmd2cube but it doesn't work i'll try again when
calculations will be done 
it's take a long time because i had to manage an i/o error in the disk shared between the
nec and the crosscomilling pc. 

I will advertise you if it doesn't work again with the new cpmd2cube and give you the
error messages.

Thanks a lot for the help


> 
> ----------------------------------------------------------------------
> 
> 
> !******************************************************************************
> 
> ! read density/Wannier file
> 
> SUBROUTINE read_density_file ( fname_in, c0, singleprecision, atom, &
>      ibrav, celldm, nr1, nr2, nr3, gcut, gcutw, nhg, key )
>   
>   IMPLICIT NONE
>   
> ! Arguments
>   CHARACTER ( LEN = * ) :: fname_in
>   COMPLEX ( dbl ), DIMENSION ( : ), POINTER :: c0
>   LOGICAL, INTENT ( IN ) :: singleprecision
>   TYPE ( atom_type ), INTENT ( OUT ) :: atom
>   INTEGER, INTENT ( OUT ) :: nhg, nr1, nr2, nr3, ibrav
>   REAL ( dbl ), INTENT ( OUT ) :: celldm ( 6 ), gcut, gcutw
>   INTEGER, INTENT ( IN ) :: key
>   
> ! Locals
>   INTEGER :: iochannel = 99
>   INTEGER :: ia, sp, ig, allocstatus
>   INTEGER*8 :: ibrav_read, nr1_read, nr2_read, nr3_read, nhg_read
>   INTEGER*8 :: iatyp_read, nsp_read, na_read ( 1000 )
>   COMPLEX ( sgl ), DIMENSION ( : ), ALLOCATABLE :: c0x
>   
> !------------------------------------------------------------------------------
>   
>   OPEN ( UNIT = iochannel, FILE = fname_in, &
>        STATUS = "OLD", FORM = "UNFORMATTED" )
>   
>   READ ( iochannel ) ibrav_read
>   ibrav = ibrav_read
>   READ ( iochannel ) celldm
>   READ ( iochannel ) nr1_read, nr2_read, nr3_read
>   nr1 = nr1_read; nr2 = nr2_read; nr3 = nr3_read
>   READ ( iochannel ) gcut, nhg_read, gcutw
>   nhg = nhg_read
>   READ ( iochannel ) nsp_read
>   atom % nsp = nsp_read
>   READ ( iochannel ) ( na_read ( sp ), sp = 1, atom % nsp )
>   atom % na ( 1 : atom % nsp ) = na_read ( 1 : atom % nsp )
>   
>   atom % nat = 0
>   DO sp = 1, atom % nsp
>      atom % nat = atom % nat + atom % na ( sp )
>      DO ia = 1, atom % na ( sp )
>         READ ( iochannel ) &
>              atom % tau0 ( 1, ia, sp ), atom % tau0 ( 2, ia, sp ), &
>              atom % tau0 ( 3, ia, sp ), iatyp_read
>         atom % iatyp ( sp ) = iatyp_read
>      END DO
>   END DO
>   
> ! read in the density/wave function
>   IF ( .NOT. ASSOCIATED ( c0 ) ) THEN
>      ALLOCATE ( c0 ( nhg ), STAT = allocstatus )
>      IF ( allocstatus /= 0 ) STOP "read_density_file, error allocating c0"
>   END IF
>   
>   IF ( SIZE ( c0 ) /= nhg ) STOP "read_density_file, c0 incorrectly sized"
>   
>   IF ( singleprecision ) THEN
>      
>      ALLOCATE ( c0x ( nhg ), STAT = allocstatus )
>      IF ( allocstatus /= 0 ) STOP "read_density_file, error allocating c0x"
>      
>      READ ( iochannel ) ( c0x ( ig ), ig = 1, nhg )
>      
>      c0 = c0x
>      
>      DEALLOCATE ( c0x, STAT = allocstatus )
>      IF ( allocstatus /= 0 ) STOP "read_density_file, error deallocating c0x"
>      
>   ELSE
>      
>      READ ( iochannel ) ( c0 ( ig ), ig = 1, nhg )
>      
>   END IF
>   
>   CLOSE ( UNIT = iochannel )
>   
> END SUBROUTINE read_density_file
> 
> !******************************************************************************
> 
> ----------------------------------
> 
>     Greetings,
> 
>        apsi
> 
> -=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
>  Ari Paavo Seitsonen / Ari.P.Seitsonen at iki.fi / http://www.iki.fi/~apsi/
>  Tel +41 1 635 44 97 / Fax +41 1 635 68 38 / GSM +41 79 719 09 35      
>  Anschrift: Physikalisch Chemisches Institut (PCI), Universität Zürich (UniZh)
>  Indirizzo: Winterthurerstrasse 190, CH-8057 Zürich
>  Address:   Schweiz / Svizzera / Suisse / Svizra / Switzerland
> 
> On Fri, 10 Sep 2004, Eric VERFAILLIE wrote:
> 
> > Hello,
> > I have done some calculation on Wannier functions on SiO2 on a NEC-SX6 with cross
> > compilation (modification of earth simulator makefile). I hadn't got any problem but
> the
> > binary format of WANNIER_1* files can't be read on linux PC whith cpm2cube even with
> the
> > F_UFMTENDIAN variable.
> > 
> > My system is too big to be run on a single processor.
> > 
> > I tried to cross compil cpmd2cube but with any results.
> > 
> > Is there any solutions.
> > 
> > i know that i can compil cpmd with -conversion big_endian but it doesn't work on
> cross
> > compilation.
> > i have done a F90 program in order to know if 
> > F_UFMTENDIAN work and it does
> > 
> > 
> > program essai
> > real   cc4
> > real   cc8
> > real   c4
> > real   c8
> > c4 = 456.456
> > c8 = 789.789
> > 
> > !  prepare little endian representation of data
> > 
> > open(11,file='lit.tmp',form='unformatted')
> > write(11) c8
> > write(11) c4
> > close(11)
> > 
> > !  prepare big endian representation of data
> > 
> > open(10,file='big.tmp',form='unformatted')
> > write(10) c8
> > write(10) c4
> > close(10)
> > 
> > !  read big endian data and operate with them on
> > !  little endian machine
> > 
> > open(100,file='big.tmp',form='unformatted')
> > read(100) cc8
> > read(100) cc4
> > 
> > write (1,*) cc8,cc4
> > !    Any operation with data, which have been read
> > 
> > !    . . .
> > close(100)
> > stop
> > end program essai
> > 
> > 
> > with F_UFMTENDIAN=10,100
> > i've got
> > od -t x4 lit.tmp
> > 0000000 04000000 7f724544 04000000 04000000
> > 0000020 5e3ae443 04000000
> > 0000030
> > od -t x4 big.tmp
> > 0000000 00000004 4445727f 00000004 00000004
> > 0000020 43e43a5e 00000004
> 
=== message truncated === 


=====
Si ce n'est pas strictement nécessaire.
S'il vous plaît, évitez de m'envoyer des pièces jointes au format Word ou PowerPoint.
Voir http://www.fsf.org/philosophy/no-word-attachments.fr.html
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html



01001101001011100010000001010110011001010111001001100110
01100001011010010110110001101100011010010110010100100000
010001010111001001101001011000110000110100001010

0111100101101111011101010010011101110010011001010010000001110111
0110010101101100011000110110111101101101011001010000110100001010


	

	
		
Vous manquez d’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com



More information about the CPMD-list mailing list