From: mecej4 on
rudra wrote:

> There is no improvement/change when I compiled everything without
> openmp

That's to be expected. Given buggy serial code, adding OpenMP on top of it
is like putting a rose garland around the neck of a starved horse and
expecting it to win the race.

-- mecej4
From: rudra on
On May 26, 7:28 pm, mecej4 <mecej4.nyets...(a)operamail.com> wrote:
>
> Three people have told you that your subroutine calls have the arguments
> mismatched in number and type. So far you have ignored these posts.
>

Not really!!
I have managed to cleanup the argument list, and that I was about to
post. But then I also found Les's post and make it what he has said.
which now looks like as:
1 implicit none
2
3 !
***********************************************************************!
4 interface
5 subroutine
lm_a(oidxdn,opnu,opold,oqnu,oqold, &
6 clabl_1,lmx,&!
w_oidn,w_opp,w_oqnu,w_oqold, &
7
d_ialpha,d_ifmt3d,d_itrans,d_jbasdn,d_ldn,d_lmaxw, &
8
d_ltmax,d_mdn,d_mmixat,d_mmixpq,d_nbas,d_nclass,d_ndimin, &
9
d_ngen,d_nit,d_nitat,d_niter,d_nkdmx,d_nkxyz,d_nl,d_nopts, &
10
d_norder,d_npts,d_nrxc,d_nrxyz,d_nsp, &
11
d_as,d_beta,d_dele,d_deltr,d_efermi,d_kap2,d_kfit, &
12
d_emax,d_emaxc,d_emin,d_eminc,d_eps,d_facvol,d_gamma,d_ommax1, &
13
d_ommax2,d_range,d_rmaxes,d_rmaxs,d_rmaxs2,d_rmines,d_rms2, &
14
d_rmsdel,d_tolef,d_toleto,d_tolews,d_vmtz,d_wc,d_width,switch, &
15 asnit)
16
17
integer::d_ialpha,d_ifmt3d,d_itrans,d_jbasdn,d_ldn,d_lmaxw, &
18
d_ltmax(3),d_mdn,d_mmixat,d_mmixpq,d_nbas,d_nclass,d_ndimin, &
19
d_ngen,d_nit,d_nitat,d_niter,d_nkdmx,d_nkxyz(3),d_nl,d_nopts, &
20
d_norder,d_npts,d_nrxc,d_nrxyz(3),d_nsp,oidxdn,opnu,opold,oqnu, &
21
oqold,lmx(200),lmxrho(200),asnit!,oidxdn,opnu,opold,oqnu,oqold
22 double
precision::d_as,d_beta,d_dele,d_deltr,d_efermi,d_kap2, &
23
d_emax,d_emaxc,d_emin,d_eminc,d_eps,d_facvol,d_gamma,d_ommax1(3)&

24 ,d_ommax2(3),d_range,d_rmaxes,d_rmaxs,d_rmaxs2,d_rmines,d_rms2,
&
25
d_rmsdel,d_tolef,d_toleto,d_tolews,d_vmtz,d_wc,d_width,d_kfit
26 logical:: switch(31)
27 character(4)::clabl_1
28 end subroutine lm_a
29
30 subroutine
lm_end(oidxdn,opnu,opold,oqnu,oqold, &
31 clabl_1,lmx,&!
w_oidn,w_opp,w_oqnu,w_oqold, &
32
ialpha,ifmt3d,itrans,jbasdn,ldn,lmaxw, &
33 ltmax, mdn,mmixat,mmixpq, nbas,d_nclass,
ndimin,ngen,nit, &
34
nitat,niter,nkdmx,nkxyz,d_nl,nopts,norder,npts,nrxc,nrxyz,d_nsp,&
35 as, beta,dele,deltr,
efermi,kap2,kfit,emax,emaxc,emin, &
36
eminc,eps,facvol,gamma,ommax1,ommax2,range,rmaxes, &
37
rmaxs,rmaxs2,rmines,rms2,rmsdel,tolef,toleto,tolews,vmtz,wc, &
38 width,switch)
39
40
integer::d_ialpha,d_ifmt3d,d_itrans,d_jbasdn,d_ldn,d_lmaxw, &
41
ltmax(3),d_mdn,d_mmixat,d_mmixpq,d_nbas,d_nclass,d_ndimin, &
42
d_ngen,d_nit,d_nitat,d_niter,nkdmx,nkxyz(3),d_nl,d_nopts, &
43
d_norder,d_npts,d_nrxc,nrxyz(3),d_nsp,oidxdn,opnu,opold,oqnu, &
44 oqold,lmx(200),lmxrho(200)
45 character(4)::clabl_1
46 double
precision::as,beta,dele,deltr,efermi,kap2, &
47
emax,emaxc,emin,eminc,eps,facvol,gamma,ommax1(3) &

48 ,ommax2(3),range,rmaxes,rmaxs,rmaxs2,rmines,rms2,
&
49 rmsdel,tolef,toleto,tolews,vmtz,wc,width,kfit
50 logical switch(31)
51 end subroutine lm_end
52
53 subroutine
lm_b(oidxdn_b,opnu_b,opold_b,oqnu_b,oqold_b, &
54
clabl_1_b,lmx_b,d_ialpha_b,d_ifmt3d_b, &
55
d_itrans_b,d_jbasdn_b,d_ldn_b,d_lmaxw_b,d_ltmax_b,d_mdn_b, &
56
d_mmixat_b,d_mmixpq_b,d_nbas_b,d_nclass_b,d_ndimin_b,d_ngen_b, &
57
d_nit_b,d_nitat_b,d_niter_b,d_nkdmx_b,d_nkxyz_b,d_nl_b, &
58
d_nopts_b,d_norder_b,d_npts_b,d_nrxc_b,d_nrxyz_b,d_nsp_b,d_as_b,&
59
d_beta_b,d_dele_b,d_deltr_b,d_efermi_b,d_kap2_b,d_kfit_b, &
60
d_emax_b,d_emaxc_b,d_emin_b,d_eminc_b,d_eps_b,d_facvol_b, &
61
d_gamma_b,d_ommax1_b,d_ommax2_b,d_range_b,d_rmaxes_b,d_rmaxs_b, &
62
d_rmaxs2_b,d_rmines_b,d_rms2_b,d_rmsdel_b,d_tolef_b,d_toleto_b, &
63 d_tolews_b,d_vmtz_b,d_wc_b,d_width_b,switch,asnit)
64
65
integer::d_ialpha_b,d_ifmt3d_b,d_itrans_b,d_jbasdn_b,d_ldn_b, &
66
d_lmaxw_b,d_ltmax_b(3),d_mdn_b,d_mmixat_b,d_mmixpq_b,d_nbas_b, &
67
d_nclass_b,d_ndimin_b,d_ngen_b,d_nit_b,d_nitat_b,d_niter_b, &
68
d_nkdmx_b,d_nkxyz_b(3),d_nl_b,d_nopts_b,d_norder_b,d_npts_b, &
69
d_nrxc_b,d_nrxyz_b(3),d_nsp_b,oidxdn_b,opnu_b,opold_b,oqnu_b, &
70 oqold_b,lmx_b(200),asnit
71
72 character(4)::clabl_1_b
73 logical::switch(31)
74 double
precision::d_as_b,d_beta_b,d_dele_b,d_deltr_b,d_efermi_b,&
75 d_kap2_b,
d_emax_b,d_emaxc_b,d_emin_b,d_eminc_b,d_eps_b, &
76
d_facvol_b,d_gamma_b,d_ommax1_b(3),d_ommax2_b(3),d_range_b, &
77
d_rmaxes_b,d_rmaxs_b,d_rmaxs2_b,d_rmines_b,d_rms2_b,d_rmsdel_b, &
78
d_tolef_b,d_toleto_b,d_tolews_b,d_vmtz_b,d_wc_b,d_width_b, &
79 d_kfit_b
80 end subroutine lm_b
81
82 end interface
83
84 ! LMTO variables
85
integer::d_ialpha,d_ifmt3d,d_itrans,d_jbasdn,d_ldn,d_lmaxw, &
86
d_ltmax(3),d_mdn,d_mmixat,d_mmixpq,d_nbas,d_nclass,d_ndimin, &
87
d_ngen,d_nit,d_nitat,d_niter,d_nkdmx,d_nkxyz(3),d_nl,d_nopts, &
88
d_norder,d_npts,d_nrxc,d_nrxyz(3),d_nsp,oidxdn,opnu,opold,oqnu, &
89 oqold,lmx(200),lmxrho(200),nit
90 character(4)::clabl_1
91 logical::switch(31)
92
93 double
precision::d_as,d_beta,d_dele,d_deltr,d_efermi,d_kap2, &
94
d_emax,d_emaxc,d_emin,d_eminc,d_eps,d_facvol,d_gamma,d_ommax1(3)&

95 ,d_ommax2(3),d_range,d_rmaxes,d_rmaxs,d_rmaxs2,d_rmines,d_rms2,
&
96
d_rmsdel,d_tolef,d_toleto,d_tolews,d_vmtz,d_wc,d_width,d_kfit
97
98
integer::d_ialpha_b,d_ifmt3d_b,d_itrans_b,d_jbasdn_b,d_ldn_b, &
99
d_lmaxw_b,d_ltmax_b(3),d_mdn_b,d_mmixat_b,d_mmixpq_b,d_nbas_b, &
100
d_nclass_b,d_ndimin_b,d_ngen_b,d_nit_b,d_nitat_b,d_niter_b, &
101
d_nkdmx_b,d_nkxyz_b(3),d_nl_b,d_nopts_b,d_norder_b,d_npts_b, &
102
d_nrxc_b,d_nrxyz_b(3),d_nsp_b,oidxdn_b,opnu_b,opold_b,oqnu_b, &
103 oqold_b,lmx_b(200)
104
105 double
precision::d_as_b,d_beta_b,d_dele_b,d_deltr_b,d_efermi_b,&
106 d_kap2_b,
d_emax_b,d_emaxc_b,d_emin_b,d_eminc_b,d_eps_b, &
107
d_facvol_b,d_gamma_b,d_ommax1_b(3),d_ommax2_b(3),d_range_b, &
108
d_rmaxes_b,d_rmaxs_b,d_rmaxs2_b,d_rmines_b,d_rms2_b,d_rmsdel_b, &
109
d_tolef_b,d_toleto_b,d_tolews_b,d_vmtz_b,d_wc_b,d_width_b, &
110 d_kfit_b
111 character(4)::clabl_1_b
112
113
114 call
lm_a(oidxdn,opnu,opold,oqnu,oqold,clabl_1,lmx, &
115
d_ialpha,d_ifmt3d,d_itrans,d_jbasdn,d_ldn, &
116
d_lmaxw,d_ltmax,d_mdn,d_mmixat,d_mmixpq,d_nbas,d_nclass, &
117
d_ndimin,d_ngen,d_nit,d_nitat,d_niter,d_nkdmx,d_nkxyz,d_nl, &
118
d_nopts,d_norder,d_npts,d_nrxc,d_nrxyz,d_nsp,d_as,d_beta,d_dele,&
119
d_deltr,d_efermi,d_kap2,d_kfit,d_emax,d_emaxc,d_emin,d_eminc, &
120
d_eps,d_facvol,d_gamma,d_ommax1,d_ommax2,d_range,d_rmaxes, &
121
d_rmaxs,d_rmaxs2,d_rmines,d_rms2,d_rmsdel,d_tolef,d_toleto, &
122 d_tolews,d_vmtz,d_wc,d_width,switch,nit)
123
124
125 call
lm_end(oidxdn,opnu,opold,oqnu,oqold,clabl_1,lmx, &
126
d_ialpha,d_ifmt3d,d_itrans,d_jbasdn,d_ldn, &
127
d_lmaxw,d_ltmax,d_mdn,d_mmixat,d_mmixpq,d_nbas,d_nclass, &
128
d_ndimin,d_ngen,d_nit,d_nitat,d_niter,d_nkdmx,d_nkxyz,d_nl, &
129
d_nopts,d_norder,d_npts,d_nrxc,d_nrxyz,d_nsp,d_as,d_beta,d_dele,&
130
d_deltr,d_efermi,d_kap2,d_kfit,d_emax,d_emaxc,d_emin,d_eminc, &
131
d_eps,d_facvol,d_gamma,d_ommax1,d_ommax2,d_range,d_rmaxes, &
132
d_rmaxs,d_rmaxs2,d_rmines,d_rms2,d_rmsdel,d_tolef,d_toleto, &
133 d_tolews,d_vmtz,d_wc,d_width,switch)
134
135 end

$ ifort trylmto.f90 -L/home/Rudra/LMTO-ASR-DISTRO_NEW/LMTO-A -llm_a
$
so, compilation is done! offcourse some runtime error is still there
and thats why i asked for idea...if you read my last but 1 post, what
I really asked is to give some better idea of splitting the code.
From: dpb on
rudra wrote:
....

> ... what I really asked is to give some better idea of splitting the
> code.

To amplify my response somewhat from earlier on the subject...

That would require stepping back and looking at the overall objective of
the project as a start, followed by an evaluation of what the pieces are
at present and then a plan to get to the object end.

Once one has that overall grasp, then one can begin to look at the
structure of the existing codes and see what makes sense from their
present structure (or, sadly, lack thereof is what one finds far too
often in legacy code). At that point some decisions can be made as to
how to proceed; sometimes, even, the logical decision is to throw the
baby out w/ the bath water and start again if the code base is already
truly horrible and the objective is valuable (and particularly if it is
long term rather than simply a one-time hack).

But, assuming the answer is to try to meld some pieces together, it
surely should be possible after six months to have enough of an idea of
how the code works and what it does that there is some logic in making
data structures of related parts that can be placed in call lists as
composites, other data that may be so widely interspersed as to be
likely candidates for module-level variables, and such general levels of
abstraction.

Then, of course, there's the idea of factorization of the code itself
into compilation units that do a more restricted piece of the puzzle so
they _don't_ have to know the whole world to operate.

That isn't a five-minute task by any means, granted. But, you've spent
six-months and have apparently nothing to show so another month or so
that might lead to some results afterwards wouldn't seem to bad an
investment.

Of course, there's also the expedient (assuming this is real work and
not either coursework or just personal entertainment) of hiring some
"real" help either to do the project or at consult on it.

(And, no, I personally really, really don't want to be that person; I am
happily retired (from technical consulting anyway) and am fully
intending on staying that way (unless, of course, somebody makes an
offer I just can't refuse... :) ).

Anyway, while in theory it's possible you can get through the jumbled
tangled mess you have posted and come out the other side, I personally
think a rehash and reboot would likely lead to the promised land at
least as quickly and would have a higher value on the other end.

--
From: Richard Maine on
dpb <none(a)non.net> wrote:

> That isn't a five-minute task by any means, granted. But, you've spent
> six-months and have apparently nothing to show so another month or so
> that might lead to some results afterwards wouldn't seem to bad an
> investment.

Unless the 6 months has all been spent attempting to do the kinds of
spot fixes that so many of the questions seem to indicate, without much
looking at the bigger picture, in which case another month of the same
is likely to give the same results.

> Of course, there's also the expedient (assuming this is real work and
> not either coursework or just personal entertainment) of hiring some
> "real" help either to do the project or at consult on it.
>
> (And, no, I personally really, really don't want to be that person; I am
> happily retired (from technical consulting anyway) and am fully
> intending on staying that way (unless, of course, somebody makes an
> offer I just can't refuse... :) ).

Very much the same. And for those who might think such professional
consulting is cheap. Well, I've never actually established rates, as,
like dpb, I'd rather stay retired. But I was making a bit over $500/day
plus benefits at a regular, full-time job when I retired. As a general
rule, consulting usually runs several times the daily rate of a
full-time job, and does tend to be billed in daily increments, even for
part of a day, and comes with no guarantee of results. Something that
just matched the "general rule" would not count as an offer I could not
refuse. No, I'm not holding my breath.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: Louis Krupp on
On 5/26/2010 8:16 AM, rudra wrote:
> There is no improvement/change when I compiled everything without
> openmp
>

And exactly what happened? What error message(s) did you get?

Have you made sure you're recompiling absolutely everything? That's
always a potential problem with makefiles: Unless the makefile itself
is a dependency, you have to a "make clean" (or the manual equivalent)
if you change anything in the makefile.

Louis