NOAA-GFDL / mkmf

Other
10 stars 51 forks source link

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

Open thomas-robinson opened 4 years ago

thomas-robinson commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Right- It's a quoting problem. This recent change that added a backslash (https://github.com/NOAA-GFDL/mkmf/pull/27/commits/fc3ccf8e268ae0c8205ab977a05e37d1f841e053) 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 commented 4 years ago

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 commented 4 years ago

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.

bensonr commented 4 years ago

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

ceblanton commented 4 years ago

@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 commented 4 years ago

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