[lammps-users] about eam/opt bug!

Dear support, I found a bug in eam/opt for the attached example. In fact if I put eam instead opt the attached sample works. It stop in the following loop

fast_alpha_t* restrict fast_alpha =
(fast_alpha_t*) malloc(ntypes2*(nr+1)sizeof(fast_alpha_t));
for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) {
fast_alpha_t
restrict tab = &fast_alpha[i*ntypes*nr+j*nr];
for(int m = 1; m <= nr; m++) {
tab[m].rhor0i = rhor_spline[type2rhor[i+1][j+1]][m][6];
tab[m].rhor1i = rhor_spline[type2rhor[i+1][j+1]][m][5];
tab[m].rhor2i = rhor_spline[type2rhor[i+1][j+1]][m][4];
tab[m].rhor3i = rhor_spline[type2rhor[i+1][j+1]][m][3];
tab[m].rhor0j = rhor_spline[type2rhor[j+1][i+1]][m][6];
tab[m].rhor1j = rhor_spline[type2rhor[j+1][i+1]][m][5];
tab[m].rhor2j = rhor_spline[type2rhor[j+1][i+1]][m][4];
tab[m].rhor3j = rhor_spline[type2rhor[j+1][i+1]][m][3];
}
}

Best regard.

Nicola

gold_graphite.tar.gz (3.97 MB)