Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added our tweaked version of NAS benchmarks.
[simgrid.git] / examples / smpi / NAS / LU / nodedim.f
1
2 c---------------------------------------------------------------------
3 c---------------------------------------------------------------------
4
5       integer function nodedim(num)
6
7 c---------------------------------------------------------------------
8 c---------------------------------------------------------------------
9
10 c---------------------------------------------------------------------
11 c
12 c  compute the exponent where num = 2**nodedim
13 c  NOTE: assumes a power-of-two number of nodes
14 c
15 c---------------------------------------------------------------------
16
17       implicit none
18
19 c---------------------------------------------------------------------
20 c  input parameters
21 c---------------------------------------------------------------------
22       integer num
23
24 c---------------------------------------------------------------------
25 c  local variables
26 c---------------------------------------------------------------------
27       double precision fnum
28
29
30       fnum = dble(num)
31       nodedim = log(fnum)/log(2.0d+0) + 0.00001
32
33       return
34       end
35
36