I’ve been working on a long kernel that is part of an insect dispersal function in a spatially explicit model. To the degree that emulation mode works, it works when I compile it with emu=1. When I compile it with dbg=1, it also works. When I compile with a straight make, I get errors in the output (I’m losing insects when I shouldn’t be). When I examine the ptx file, it reports -O0 for the optimization level when dbg=1 is defined, and -O3 when not. I haven’t been able to alter these optimization levels. Have others experienced this? To me it appears that something is going wrong with the optimization, but then, I’m an entomologist. Any clues as to what I might be looking for? Is my only option to start changing the code at random until it works? If it really is an optimization problem, is it likely that writing a simplified version of the code as an example would still have the problem?
Thanks for your help,
Mike