Hello, My original code (following) gives a seg fault at the string array assignment at about num_atoms=150,000:
int num_atoms=dimension[0]*dimension[1]*dimension[2]*prim_lat.size();
double superlat[num_atoms][3];
string current_occ[num_atoms];
Thinking this was a first instance of me hitting a stack overflow issue, and thinking you can assign to the heap using a dynamic allocation, I tried:
int num_atoms=dimension[0]*dimension[1]*dimension[2]*prim_lat.size();
double superlat[num_atoms][3];
string *current_occ = new string[num_atoms];
This code gave a seg fault at about num_atoms=350,000. I'm not sure the workaround for this issue. Is this just a case where I need to increase the stack/heap limit? If so, can I do this as a gcc option?
Thank you, Paul