*DO loop index same as outer index AQ...?
*DO loop index same as outer index AQ...?
(OP)
Hi,
I am doing a parametric study via *do-loops. In process of saving results to arrays obtaining following error message : *DO loop index same as outer index AQ. It is related with *DO,AQ,1,3...
The first crazy thing is that in code written above I use similar Do-loop construction and it works.
The second crazy thing is that I can remember that I have already had this problem some time ago and resolved it, but I can not remember which way...
Anyone can help ?
Regards,
Lubo
I am doing a parametric study via *do-loops. In process of saving results to arrays obtaining following error message : *DO loop index same as outer index AQ. It is related with *DO,AQ,1,3...
The first crazy thing is that in code written above I use similar Do-loop construction and it works.
The second crazy thing is that I can remember that I have already had this problem some time ago and resolved it, but I can not remember which way...
Anyone can help ?
Regards,
Lubo





RE: *DO loop index same as outer index AQ...?
The problem is, that you are using the same loop variable in two different loops or something similar.
Change the variable of the do loop index. For example from i to ii.
Regards,
Alex
RE: *DO loop index same as outer index AQ...?
in addition to Alex: you are using the same index in two different NIDIFICATED loops (one inside the other).
Regards
RE: *DO loop index same as outer index AQ...?
the problem was that I wrote two slightly different do-loops as follows :
*do,aq,1,5
...
*enddo
*do,aq,1,5
*do,bq,1,3
...
*enddo
*enddo
in the first do-loop I forgot to write *enddo so this loop was executed only one time not five times. After I added *enddo the problem was solved. I am using the same do-loop index in subsequent do-loop quite often without problems...
Thank you mihaiupb and cbrn anyway.
Regards,
Lubo