Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bld/Depends can get out of sync with dependencies in evolving code #1138

Closed
klindsay28 opened this issue Feb 14, 2017 · 8 comments
Closed

bld/Depends can get out of sync with dependencies in evolving code #1138

klindsay28 opened this issue Feb 14, 2017 · 8 comments
Assignees

Comments

@klindsay28
Copy link
Collaborator

During development, I usually have a stand-alone case that I do test builds and runs in, prior to invoking create_test. As I change code, I regularly run case.build to ensure that the new code compiles.

A recent change I made introduced a new dependency between Fortran modules, A.F90 now uses B.F90, where it did not before. The new dependency was not reflected in the bld/Depends file, because the Depends file was never updated. I also ran case.build --clean, which removed the .mod files. It turns out that make tried to compile A.F90 prior to compiling B.F90, and the compiler couldn't find B.mod. So I couldn't get the build to work. It did work when I setup a completely new case.

I think there needs to be a mechanism to rebuild the Depends file.

@gold2718
Copy link

You may not consider this a solution but here is my method for this situation (commands executed from case directory):

./case.build --clean-all
rm -rf bld
./case.setup --clean
./case.setup

@jedwards4b
Copy link
Contributor

What @gold2718 said with the additional note that
./case.setup --clean
./case.setup

can be replaced by
./case.setup --reset

@mvertens
Copy link
Contributor

mvertens commented Feb 14, 2017 via email

@gold2718
Copy link

I'm not sure why --clean-all does not remove bld or at least all the files in bld. @jedwards4b? @jgfouca?

@jgfouca
Copy link
Contributor

jgfouca commented Feb 14, 2017

@gold2718 good question, it seems like it should. Maybe there's some legacy reason why it doesn't.

@jedwards4b
Copy link
Contributor

I think it just felt like overkill - we can try that change if you want.

@gold2718
Copy link

I agree about the overkill but right now, we have underkill which is worse because --clean-all does not work.

@ghost ghost assigned jedwards4b Feb 14, 2017
@ghost ghost added the in progress label Feb 14, 2017
@jedwards4b
Copy link
Contributor

Cleaning by simply removing the build directory is incorrect and causes problems in the case of tests that build two executables in the same directory. PR #1140 addresses this issue without removing the bld directory.

@ghost ghost removed the in progress label Feb 15, 2017
jedwards4b added a commit that referenced this issue Feb 15, 2017
Make case.build clean options clean more thoroughly.

Test suite: scripts_regression_tests.py
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes #1138

User interface changes?:

Code review: Goldy
@ghost ghost assigned rljacob Mar 10, 2017
@ghost ghost added the in progress label Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants