Closed tsuyoshi38 closed 10 months ago
I am sorry, but I have found that even after I made these changes the code does not run with -O3. But, CQ runs correctly with -g. On our supercomputer, CQ runs correctly in both cases, with and without these changes.
Even if this doesn't fix the problem you reported with -O3, it's still a very good change to have made! This is much safer and better coding practice.
It may not be a bug, but .. after I updated the MacOS, I encountered a problem in the following part with the option (-O3).
if (n_dumpL>0 .and. mod (n_iter, n_dumpL) == 0) then call dump_pos_and_matrices(index=unit_DM_save) endif
The problem seems to come from the 2nd one when n_dumpL=0. I thought it is not used since we also checked n_dumpL. But, it is probably safer to change it to
if (n_dumpL>0) then if(mod (n_iter, n_dumpL) == 0) call dump_pos_and_matrices(index=unit_DM_save) endif