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

git-version-string adds spaces for uncommitted files #33

Open
thomas-robinson opened this issue Feb 6, 2020 · 7 comments
Open

git-version-string adds spaces for uncommitted files #33

thomas-robinson opened this issue Feb 6, 2020 · 7 comments

Comments

@thomas-robinson
Copy link
Member

I am trying to compile with fre/test which (to my understanding) uses git-version-string in mkmf. I am testing code that I modified to see if it compiles. The problem is that when git-version-string is run, it produces output with spaces and the compiler is reading everything after the spaces as files which don't exist.

To Reproduce on Gaea:

> module load fre/test
> git-version-string /lustre/f2/dev/Thomas.Robinson/error_reproduce/mom6/src/SIS2/src/SIS_diag_mediator.F90
'ref:547c0cddeebd56c3518cc3b0e8baf44ebfa9af0b status:Modified blob:16c60ae40f3af71776a37a1224c7574dac5f60e3'

This needs to print with no spaces

@underwoo
Copy link
Member

underwoo commented Feb 6, 2020

It is more than likely a quoting problem in mkmf. They spaces should work. Please post the compile command line so we can look into this.

@ceblanton
Copy link
Contributor

Right- It's a quoting problem. This recent change that added a backslash (fc3ccf8) somehow causes this. It's as if the backslashed double-quote and the single quote from git-version-string are being interpreted as the same type of quote, so that there are two sets of empty quotes with the unquoted words from git-version-string being interpreted as files to compile

@underwoo
Copy link
Member

underwoo commented Feb 6, 2020

The back slashed were added to correct another issue found with mkmf. It might be worth removing this option from mkmf, especially as we will not use it with autotools or cmake.

@thomas-robinson for now, you can remove the -g option from the mkmf calls to progress.

@thomas-robinson
Copy link
Member Author

I've just been committing all of my changes before compiling which works. I can squash when I do a PR for the development I'm doing.

ceblanton pushed a commit to ceblanton/mkmf that referenced this issue Feb 7, 2020
This reverts commit 1a60b1a.

Revert the update to `mkmf -g` option that escaped the double quotes
around the call to `git-version-string`. The reason is that
this update causes some compiler wrappers to have quoting problems (NOAA-GFDL#33)
that resulted in `git-version-string`'s output not being quoted as needed.
ceblanton pushed a commit to ceblanton/mkmf that referenced this issue Feb 7, 2020
@bensonr
Copy link

bensonr commented Feb 7, 2020

IIRC, this was needed on the skylake dev box when running mpifort/mpiicc via Intel MPI.

@ceblanton
Copy link
Contributor

@bensonr, I was unable to reproduce the issue using Intel MPI mpifort on orion. Can you please create account for me and/or Luis on the skylake dev box so we can try it there?

@bensonr
Copy link

bensonr commented Feb 10, 2020

@ceblanton @LuisSalbey please see your work email for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants