-
Notifications
You must be signed in to change notification settings - Fork 26
Makefile.in: Using current $CC in dmtcp/config.log? #459
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
base: main
Are you sure you want to change the base?
Conversation
|
MANA uses the following commands to 'make' DMTCP |
rajatpratapbisht
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running make clean failed. This led me to the request some changes. :)
25dfa27 to
6b2e6f9
Compare
|
@rajatpratapbisht , Thanks for the diagnosis and fixes. Sorry for my own delay, but I think I've fixed it now. Could you please test this once again on Discovery (where the bug was originally found)? |
|
@rajatpratapbisht , Ping. :-) |
Makefile.in
Outdated
| @ cc_version="$$(${CC} --version | head -1 | tr -d '\n')" ; \ | ||
| if test ! -e dmtcp/bin/dmtcp_coordinator || \ | ||
| test ! -e dmtcp/config.log || \ | ||
| ! grep --quiet $${cc_version} dmtcp/config.log; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable $${cc_version} is should be "$${cc_version}"
Because of missing double-quotes, grep is misinterpreting gcc (GCC) 8.1.0 as individual files:
ERROR LOG:
** Warning: Building MANA can take longer on a compute node.
** Please build MANA on a login node.
grep: (GCC): No such file or directory
grep: 11.1.0: No such file or directory
make mana
...
i
Makefile.in
Outdated
| clean: tidy | ||
| @ cc_version="$$(${CC} --version | head -1 | tr -d '\n')" ; \ | ||
| if test ! -e dmtcp/config.log || \ | ||
| ! grep --quiet $${cc_version} dmtcp/config.log; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above !
$${cc_version} -> "$${cc_version}"
346dbe9 to
43b0259
Compare
Makefile.in
Outdated
|
|
||
| # MANA configure does configure DMTCP. But no re-make in DMTCP. Check ${CC}. | ||
| default: display-build-env add-git-hooks mana_prereqs | ||
| @ cc_version="$$(${CC} --version | head -1 | tr -d '\n')" ; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section is identical to clean, thus can be made into a smaller subcommand for internal use and better readability
e2dfe19 to
a948b13
Compare
|
@karya0, Based on discussions with @rajatpratapbisht we still have one more issue with a cluster using modules for CC and CXX. The module may cause configure to define CC and CXX as a hard-coded absolute path. So, we configure first, and then switch modules. The user must then either re-configure everything (maybe that's the right solution) or else define CC=cc, CXX=c++ in the Makefile. (But if the user has environment variables CC or CXX, we always prefer that in the Makefile variable.) Let's think about the right solution. However, note that on Discovery, gcc is in a path that is a link to a full pathname for a gcc compiler, and changing a module changes that executable. But /usr/bin/{gcc,cc} exists and is always gcc-4.8.0. And they may or may not set the env. vars CC and CXX. (They set it in the gcc-11 module, but not in the gcc-8 module.) Maybe the solution is that in Makefile:default, we should test if the hardcoded CC variable in the Makefile is the same as the current env var (if set) or the current gcc (not the absolute path) if set, etc. If anything is inconsistent, then tell the user to re-configure and exit the Makefile. And using On further reflection, MANA should decide what is the current C/C++ compiler and then set the env var's CC and CXX before configuring DMTCP. Then DMTCP will be forced to do the right thing. And when switching modules, we will not only do 'make clean' in DMTCP, but also re-configure DMTCP with the current env var's for CC and CXX that we will choose. And for MANA, it's used on clusters, and so setting CC=gcc (or first try CC env var and then cc) should be enough for MANA. |
|
since ./configure is a shell script we can add at the start something like: something like : |
a948b13 to
6aaa560
Compare
@rajatpratapbisht , Please test this PR.
@karya0 , This is the issue that we described to you earlier. I think this is the least invasive fix.
The following problem can occur when using Slurm at HPC sites.
The solution here is to check the ${CC} version in the default make target and the clean target.
When we install a new MANA and 'make', how does MANA do 'make' on DMTCP? If that's clear, then we can simplify the code in the 'default' target. I'm too lazy right now to check that out.
@rajatpratapbisht ,
Could you test out this PR, and see if it works on Discovery?
Please test with changing modules, and also please test with a new clone of MANA.
Finally, could you look into when MANA automatically does 'make' on DMTCP? I'm still not entirely sure if the 'default' target is needed and correct.
Thanks.