~albertog/siesta/4.0-stm

« back to all changes in this revision

Viewing changes to Src/MPI/int_explorer.f90

  • Committer: Alberto Garcia
  • Date: 2016-09-13 12:00:42 UTC
  • mfrom: (500.1.6 4.0-ag)
  • Revision ID: albertog@icmab.es-20160913120042-79waws5ec5d2cc49
Changes to further standards compliance

Brought about by the use of extra compiler checks, notably by g95 and
the '-std=f2003 -fall-intrinsics' setting in gfortran.

Apart from syntax and visibility issues, non-standard declarations
such as "real*8" have been removed.

Also, the building of the MPI interfaces has been updated to properly
include 8-byte integers.

(Declarations in the code in Util are not fully updated yet)
                

        

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
2
! Copyright (C) 1996-2016       The SIESTA group
 
3
!  This file is distributed under the terms of the
 
4
!  GNU General Public License: see COPYING in the top directory
 
5
!  or http://www.gnu.org/copyleft/gpl.txt.
 
6
! See Docs/Contributors.txt for a list of contributors.
 
7
!
 
8
program int_explorer
 
9
 
 
10
!
 
11
! Standard output: one or two integers, corresponding
 
12
!                  to the "standard" and "8-byte" integers
 
13
!
 
14
integer, parameter  ::  i8b = selected_int_kind(12)
 
15
integer, parameter  ::  idef = kind(1)
 
16
 
 
17
if (idef > 0) then
 
18
   if (i8b > 0) then
 
19
      if (idef /= i8b) then
 
20
         write(unit=*,fmt=*) idef, i8b
 
21
         write(unit=0,fmt=*) "int def: ", idef, " 8-byte int kind: ", i8b
 
22
      else
 
23
         write(unit=*,fmt=*) idef
 
24
         write(unit=0,fmt=*) "In your computer the standard int is 8-byte"
 
25
      endif
 
26
   else
 
27
      write(unit=*,fmt=*) idef
 
28
      write(unit=0,fmt=*) "Your computer does not have 8-byte ints!"
 
29
      STOP
 
30
   endif
 
31
else
 
32
      write(unit=0,fmt=*) "Your computer's int number system is weird..."
 
33
      STOP
 
34
endif
 
35
 
 
36
write(unit=0,fmt=*) "Your computer's default precision int kind is: ", idef
 
37
      
 
38
 
 
39
end program int_explorer
 
40