NOAA-GFDL/mkmf

git-version-string adds spaces for uncommitted files

Opened this issue · 7 comments

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

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.

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

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.

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.

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

@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?

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