Commit Graph

31 Commits

Author SHA1 Message Date
giannozz f533b052d5 dbl => DP (defined as previously dbl was)
syntax for declarations: real(DP), without "kind="


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2135 c92efa57-630b-4861-b058-cf58834340f0
2005-08-28 14:09:42 +00:00
giannozz bf4bfe222f General cleanup of intrinsic functions:
conversion to real    => DBLE
(including real part of a complex number)
conversion to complex => CMPLX
complex conjugate     => CONJG
imaginary part        => AIMAG

All functions are uppercase.
CMPLX is preprocessed by f_defs.h and performs an explicit cast:
#define CMPLX(a,b)  cmplx(a,b,kind=DP)
This implies that 1) f_defs.h must be included whenever a CMPLX is present,
2) CMPLX should stay in a single line, 3) DP must be defined.

All occurrences of real, float, dreal, dfloat, dconjg, dimag, dcmplx
removed - please do not reintroduce any of them.
Tested only with ifc7 and g95 - beware unintended side effects

Maybe not the best solution (explicit casts everywhere would be better)
but it can be easily changed with a script if the need arises.
The following code might be used to test for possible trouble:

program test_intrinsic

  implicit none
  integer, parameter :: dp = selected_real_kind(14,200)
  real (kind=dp) :: a = 0.123456789012345_dp
  real (kind=dp) :: b = 0.987654321098765_dp
  complex (kind=dp) :: c = ( 0.123456789012345_dp, 0.987654321098765_dp)

  print *, '      A = ', a
  print *, ' DBLE(A)= ', DBLE(a)
  print *, '      C = ', c
  print *, 'CONJG(C)= ', CONJG(c)
  print *, 'DBLE(c),AIMAG(C)  = ', DBLE(c), AIMAG(c)
  print *, 'CMPLX(A,B,kind=dp)= ', CMPLX( a, b, kind=dp)

end program test_intrinsic

Note that CMPLX and REAL without a cast yield single precision numbers on
ifc7 and g95 !!!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2133 c92efa57-630b-4861-b058-cf58834340f0
2005-08-26 17:44:42 +00:00
ballabio d214f05b60 last end subroutine --> end subroutine name [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1874 c92efa57-630b-4861-b058-cf58834340f0
2005-05-18 14:02:51 +00:00
ballabio 315a100b4b more end --> end function [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1869 c92efa57-630b-4861-b058-cf58834340f0
2005-05-17 17:07:57 +00:00
giannozz f6c7dd48e0 Added optimized support for ALTIX machines - contributed by Martin Hilgeman
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1545 c92efa57-630b-4861-b058-cf58834340f0
2005-01-07 12:57:41 +00:00
sbraccia 0caeadbd7b Machine-dependent definitions are now contained in two different files (both in /include):
1) f_defs.h  for definitions to be included in FORTRAN files ONLY
   2) c_defs.h  for definitions to be included in C       files ONLY

C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1012 c92efa57-630b-4861-b058-cf58834340f0
2004-06-25 17:25:37 +00:00
giannozz 2e56d835a5 Fix for Altrix FFT
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@683 c92efa57-630b-4861-b058-cf58834340f0
2004-02-27 09:08:37 +00:00
giannozz 88f90f0851 Support for SGI Altix (Martin Hilgeman) - see cpdocs/ChangeLog
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@681 c92efa57-630b-4861-b058-cf58834340f0
2004-02-26 16:26:48 +00:00
giannozz 0b1a5c9fd8 Extensive module cleanup: DP moved from wrong place (parameters) to the
correct place (kinds); module "varie" replaced by "control_flags" (not
yet in pwcom, though) - many many files changed.
64-bit cpus (Opteron, maybe Itanium) should now work if __LINUX64 is defined


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@513 c92efa57-630b-4861-b058-cf58834340f0
2004-01-23 15:08:03 +00:00
sbraccia d5030e787e Unit stdout (set in io_global.f90) is used to write on standard output
instead of 6 or *.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@364 c92efa57-630b-4861-b058-cf58834340f0
2003-11-04 10:26:03 +00:00
giannozz b04721ac28 *** empty log message ***
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@316 c92efa57-630b-4861-b058-cf58834340f0
2003-09-22 17:12:43 +00:00
giannozz e212a3e854 Wrong coordinates written if atomic_positions='crystal'
Errors in makefiles for cygwin and hp
Various compilation problems for t3e, alpha


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@313 c92efa57-630b-4861-b058-cf58834340f0
2003-09-17 08:36:08 +00:00
cavazzon 19d6d59207 fix for alpha platform and FFTW:
SIZE( c ) substituted with ldc * nsl


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@233 c92efa57-630b-4861-b058-cf58834340f0
2003-06-12 16:46:56 +00:00
giannozz 6dc987f2fe Yet another line continuation problem in bp_c_phase.f90 (with ifc)
DEC __QSW TRU64 => __ALPHA for Alpha machines (with OSF/Tru64 or
whatever it is called now: any Alpha Linux around?)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@232 c92efa57-630b-4861-b058-cf58834340f0
2003-06-12 11:23:17 +00:00
cavazzon 55bca2f76e Compilation on SGI:
in fft_scalar.f90 there wasn't all proper #ifdef
 bc_c_phase.f900 : when continuing a string on a new line an "&"
  character should be added on the new line too!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@230 c92efa57-630b-4861-b058-cf58834340f0
2003-06-12 08:56:47 +00:00
cavazzon f56b9ef4d0 - also FPMD now is linked to the
same fft scalar drivers as CPV and PWSCF


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@216 c92efa57-630b-4861-b058-cf58834340f0
2003-05-23 09:39:48 +00:00
cavazzon 7ec278895a bug fix, sticks and serial Gamma code. The do_fft_x and do_fft_y
vectors was built only from half of G-space.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@201 c92efa57-630b-4861-b058-cf58834340f0
2003-05-03 15:10:42 +00:00
cavazzon 90d14d64ca isign convention set as in PW and CPV
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@200 c92efa57-630b-4861-b058-cf58834340f0
2003-05-03 09:48:45 +00:00
cavazzon 07c97593b8 - cleanup
- serial code sticks enabled with fftw to (then we should check when
  it is worth to use them, in most cases seems convenient)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@197 c92efa57-630b-4861-b058-cf58834340f0
2003-05-01 22:47:53 +00:00
cavazzon 23aec87a2f - more performance issues
- ifdef __PARA removed from the main subroutine of PW, Gamma, D3, PP, PH
  now startup is called both for serial and parallel codes.
- cfts_3 included in fft_scalar ( tested for __AIX )
- module pencils in serial executions is no more needed


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@189 c92efa57-630b-4861-b058-cf58834340f0
2003-04-28 07:23:04 +00:00
cavazzon 616b483f36 Performance issues and Harware Performance Monitor
interface for Power4 processor ( can by switched on defining __HPM )


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@187 c92efa57-630b-4861-b058-cf58834340f0
2003-04-24 22:10:04 +00:00
cavazzon 37a8dec5dd tabmesh tables replaced by good_fft_order in FPMD
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@184 c92efa57-630b-4861-b058-cf58834340f0
2003-04-23 10:40:23 +00:00
cavazzon 23634ce31b good_fft_dimension moved to fft_scalar
small fix (most probably a typo) in scatter.f90


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@181 c92efa57-630b-4861-b058-cf58834340f0
2003-04-22 21:26:28 +00:00
cavazzon 609a2863fe More cleaning and updating from the IBM SP4
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@177 c92efa57-630b-4861-b058-cf58834340f0
2003-04-21 22:11:41 +00:00
cavazzon 9b397d0af2 fft driver for SGI added
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@174 c92efa57-630b-4861-b058-cf58834340f0
2003-04-21 16:04:45 +00:00
cavazzon 57b3b443e1 fix for a weird behaviour of compact compiler (#@!$*#?@) and optional
subroutine arguments


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@173 c92efa57-630b-4861-b058-cf58834340f0
2003-04-21 10:32:20 +00:00
cavazzon 4831aaabac FPMD:
cleaning + removing of redundant files ( now in Modules )
  now FPMD rely entirely on Module/fft_scalar and Module/fft_base

CPV:
  fft drivers, in the parallel case, now rely entirely on fft_scalar
  CPV depends on FFTW only through fft_scalar which in turn calls
  the wrappers contained in clib/fft_sticks, in other words CPV and
  FPMD are now completely isolated from FFTW primitives.

PW:
  clocks.f90  moved to Modules
  scnds.f90   moved to flib

  When __AIX is defined PW now uses Module/fft_scalar drivers too.
  For testing and debugging, usage of fft_scalar or
  cft_sp drivers can be selected, for the time being, defining or undefining the
  __FFT_MODULE_DRV macro in the cft3.f90 and cft3s.f90 files.

  fft_scatter has been moved to Module/fft_base, file PW/fft_scatter.f90
  is still there for testing and debugging


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@170 c92efa57-630b-4861-b058-cf58834340f0
2003-04-20 22:22:26 +00:00
cavazzon a382fc8065 All CPV and FPMD FFTW drivers moved to Modules/fft_scalars.f90
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@169 c92efa57-630b-4861-b058-cf58834340f0
2003-04-19 16:39:25 +00:00
cavazzon d5cab68c77 All the fft scalar drivers for AIX moved to Module/fft_scalar.f90
( CPV and FPMD codes )


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@168 c92efa57-630b-4861-b058-cf58834340f0
2003-04-19 07:40:46 +00:00
cavazzon fb90a63222 scalar driver tested and fixed for alpha systems and FFTW
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@164 c92efa57-630b-4861-b058-cf58834340f0
2003-04-18 10:18:46 +00:00
cavazzon 1b9a9caa6b Working on FFTs, added module fft_scalar that will
contain all scalar fft drivers


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@157 c92efa57-630b-4861-b058-cf58834340f0
2003-04-17 21:43:54 +00:00