Open rjleveque opened 8 years ago
Moreover, when I reverted back to the original Makefile
and did make new
, it still used the local amr_module.mod
file left over from my testing with a smaller max1d
, which is very strange since the compile log shows it using the library version.
this might explain why my i*8 recompilation didn’t work properly.
In the end i delete all *mod files - if I can find them all - and keep trying. modules still don’t work right.
— Marsha
On Feb 22, 2016, at 1:16 AM, Randall J. LeVeque notifications@github.com wrote:
Moreover, when I reverted back to the original Makefile and did make new, it still used the local amr_module.mod file left over from my testing with a smaller max1d, which is very strange since the compile log shows it using the library version.
— Reply to this email directly or view it on GitHub.
@malchera has been having issues with this as well but I am not sure he's using the new makefiles.
I am currently not able to reproduce the problem but what I do as a workaround is to delete all object files and module files within $CLAW along with a make new.
rm -f
find $CLAW -regex '.*.(mod|o)$'``
The obvious drawback is that it requires me to always compile everything again, but I don't know if there's currently a better solution for that. This is also required when switching compilers, for example.
I pulled the new Makefiles from the repo so that I get the changes for Makefile.common, but for my examples I am using the old files since I did change a lot.
I have been exploring options to fix this today and have made the following observations regarding modules and compilation:
cmake
but did not find it a robust solution eitherI am still thinking about where this leaves us.
BTW, I noticed that there are mistakes in the Makefile.geoclaw
and Makefile.amrclaw
files pointing to the wrong source in some cases. I will issue PRs for the fixes.
Another problem I discovered with the new Makefile system: if you replace a module with a local version, e.g. via:
where the local version has a different value of
max1d
, for example, and then domake new
, this module will get compiled after the other modules listed inMakefile.amr_2d
whereas it is supposed to be compiled first because other modulesuse
this one.Actually I think it's worse than that -- the other modules when compiled will use
src/2d/amr_module.mod
rather than the local version unless the other modules are also copied to the local directory and also added to theMakefile
.This suggests we shouldn't allow changing library modules in the
Makefile
in this manner, although the user could still add additional local modules that aren't replacing those in the library and that can be compiled after the library versions.