sa2c / thirring-rhmc

For Simon Hands' 3D Thirring Model LFT simulation code.
0 stars 1 forks source link

Parallel compilation bug #4

Open chillenzer opened 1 year ago

chillenzer commented 1 year ago

After everything else about compilation is resolved now, one further thing: I get

mpif90 -O3 -Wall -ffree-line-length-none -g -mcmodel=medium  -DMPI -DNP_X=2 -DNP_Y=2 -DNP_T=2  -DSITE_RANDOM -c  -o params.o params.F90
mpif90 -O3 -Wall -ffree-line-length-none -g -mcmodel=medium  -DMPI -DNP_X=2 -DNP_Y=2 -DNP_T=2  -DSITE_RANDOM -c  -o params.o params.F90
f951: Fatal Error: Cannot rename module file 'params.mod0' to 'params.mod': No such file or directory

when I attempt parallel builds. From what I can tell, it's this problem. But I'm not 100% sure how that could translate into a solution for us. It's not that much of a deal because running single-threaded and/or retrying once solves it but still something to think about...

edbennett commented 1 year ago

The symptoms and exact end problem are the same as that netCDF issue, but I'm not sure the cause is the same.

In principle the problem looks obvious—for some reason params is getting compiled twice simultaneously, so the second one to complete can't find the .mod0 file it was working on because the first one moved it.

The question I have is why make is trying to compile params twice. Possibly the detailed debug output from make would help answer this, but I'm not sure. (I've never found make to be particularly helpful at letting you understand how it's deciding what to do in parallel.)

chillenzer commented 1 year ago

Yeah, that's the part that I was referring to from the netCDF issue. I tried adding a few explicit dependencies on params.mod (in pertinent places) in the hope that make would realise that it is doing the same thing there but that didn't work. Will get a debug log of that process and check.