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

nccmp: new port #4084

Merged
merged 2 commits into from Jun 16, 2019
Merged

nccmp: new port #4084

merged 2 commits into from Jun 16, 2019

Conversation

mojca
Copy link
Member

@mojca mojca commented Apr 17, 2019

Tool for comparing NetCDF files

Closes: https://trac.macports.org/ticket/53118

Description

Tested on

macOS 10.x
Xcode 8.x

Verification

Have you

  • checked your Portfile with port lint?
  • tried existing tests with sudo port test? (two tests fail)
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@Dave-Allured: please test if this works as expected.

Tool for comparing NetCDF files

Closes: https://trac.macports.org/ticket/53118
@macportsbot macportsbot added by: member Created by a member with commit rights type: submission labels Apr 17, 2019
@macportsbot
Copy link

Travis Build #5990 Failed.

Lint results
--->  Verifying Portfile for nccmp
--->  0 errors and 0 warnings found.

Port nccmp fail on xcode10.2. Log
Port nccmp fail on xcode9.4. Log
Port nccmp fail on xcode8.3. Log

sha256 bf5fa189a89d97973c868d7e7c57403790cb0ad3d9549f08a85c68c3cfb0fc78 \
size 306586

depends_lib port:netcdf
Copy link
Contributor

@mf2k mf2k Apr 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the README, you need to add a configure argument to locate netcdf in the Macports (i.e. non-standard) location.

maybe something like:

configure.args-append --with-netcdf=${prefix}/lib/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configure was complaining, but I had an impression that the binary correctly linked to netcdf. What is non-standard in our netcdf installation?

That said, cmake configuration is different (and I would have used it if I didn't have issues running the unit tests; admittedly I did not spend any significant amount of time trying to get them to work).

But I'm way more confused about why all the build failures happened.

@Dave-Allured: Can you please check? If you want to maintain a port, providing the feedback about whether a patch works is the minimum you would be asked to do :).
We can help you with macports side of things, but I have absolutely no idea what to do with this software, how to test it etc.

Copy link
Contributor

@mf2k mf2k Apr 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just mean /opt/local vs. /usr/local. Most software does not look in the Macports default install location.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The xcode 10.2 job failed during fetch, due to coincidence of various server problems on three different mirror sites. I think the error from gitlab.com was transient, and this job should simply be retried.

However, wait on that, because the other two logs show the same destroot failure. This is probably universal, so we should figure that out first. It looks like the nccmp binary built fine, then something went wrong in destroot. From xcode 9.4 log, similar in xcode 8.3:

467. /bin/sh: .././install-sh: Permission denied
468. make[2]: *** [install-man1] Error 1

Is this a simple permission problem on install-sh? This is where my experience runs short. I don't know how to dig into the files in a broken build on the Macports test platform.

@Dave-Allured
Copy link
Contributor

@mf2k: No, don't use --with-netcdf, at least not yet. This configure option does something different than expected. This is part of the header-pad kludge to access private symbols from nccmp. Although I am not familiar with the details, it seems this option carries the risk of breaking the executable when libnetcdf is updated without rebuilding nccmp.

As I said before, I believe the header-pad option is obscure and rarely used.

@mf2k
Copy link
Contributor

mf2k commented May 11, 2019

I'm not clear what needs to happen for this to get committed.

@Dave-Allured
Copy link
Contributor

@mf2k, hold off on committing until this gets fixed. See PR #4084 for context:

467. /bin/sh: .././install-sh: Permission denied
468. make[2]: *** [install-man1] Error 1

I can not debug this because I do not know how to browse actual files inside Travis builds. Advice?

@mf2k
Copy link
Contributor

mf2k commented May 23, 2019

I am not sure how to fix the buildbot issues.

@ryandesign
Copy link
Contributor

ryandesign commented Jun 14, 2019

467. /bin/sh: .././install-sh: Permission denied
468. make[2]: *** [install-man1] Error 1

The script was missing the execute bit. I have pushed a commit to this PR to fix this, and filed an upstream bug report with the developers. You would not have seen this problem if you had the coreutils port installed, since in that case its ginstall program would have been used instead of the install-sh script.

I can not debug this because I do not know how to browse actual files inside Travis builds. Advice?

I don't believe any facility exists for accessing our build files on Travis. I expect they delete the virtual machine in which the build took place right after the build finishes; by the time you see a comment in a PR that a build failed, the files are already gone. In future, if you want to debug issues, you'll need to reproduce the issue on your own machine and proceed from there.

@macportsbot
Copy link

Travis Build #6905 Passed.

Lint results
--->  Verifying Portfile for nccmp
--->  0 errors and 0 warnings found.

Port nccmp success on xcode10.2. Log
Port nccmp success on xcode9.4. Log
Port nccmp success on xcode8.3. Log
Port nccmp success on xcode7.3. Log

@Dave-Allured
Copy link
Contributor

I can not debug this because I do not know how to browse actual files inside Travis builds. Advice?

I don't believe any facility exists for accessing our build files on Travis. I expect they delete the virtual machine in which the build took place right after the build finishes; by the time you see a comment in a PR that a build failed, the files are already gone. In future, if you want to debug issues, you'll need to reproduce the issue on your own machine and proceed from there.

Okay. I need to learn how to test new and uncommitted ports in Macports context on my own Mac.

Thanks for fixing the permission problem on install.sh. It looks like this new port is now ready to commit.

@ryandesign
Copy link
Contributor

I need to learn how to test new and uncommitted ports in Macports context on my own Mac.

Place the Portfile in any directory. cd to that directory in the Terminal. Run sudo port install. If the Portfile references any local patchfiles, make a "files" directory in the same place and put the patchfiles in it.

@Dave-Allured
Copy link
Contributor

Okay, that worked. Thanks for the tip. The port built and installed in my local test area, which is set up to not use sudo or /opt/local. The new executable reads Netcdf files and works as expected. How else may I help to finish this commit?

101> ls -go $f1 $f2
-rw-r--r--  1   68405332 May 13 15:47 2019 0513b.prelim/ozone.corrected.20190402.12z.nc
-rw-r--r--  1   68405332 May 13 18:27 2019 0513d.gcc9/ozone.corrected.20190402.12z.nc

102> set tol = 0.02983
103> nccmp -dmgs $tol $f1 $f2
DIFFER : VARIABLE : O3 : POSITION : [38,0,173,260] : VALUES : 0.0225125 <> 0.0523433 : PERCENT : 56.9906

104> set tol = 0.02984
105> nccmp -dmgs -t $tol $f1 $f2
Files "0513b.prelim/ozone.corrected.20190402.12z.nc" and "0513d.gcc9/ozone.corrected.20190402.12z.nc" are identical.

@ryandesign ryandesign merged commit d06a51b into macports:master Jun 16, 2019
@mojca mojca deleted the nccmp branch June 23, 2019 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by: member Created by a member with commit rights type: submission
5 participants