Skip to content

implement custom implementation of obtain_file method in QuantumESPRESSO easyblock#618

Closed
boegel wants to merge 1 commit intoeasybuilders:developfrom
boegel:quantumespresso_download
Closed

implement custom implementation of obtain_file method in QuantumESPRESSO easyblock#618
boegel wants to merge 1 commit intoeasybuilders:developfrom
boegel:quantumespresso_download

Conversation

@boegel
Copy link
Member

@boegel boegel commented Jun 1, 2015

No description provided.

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/985/
Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/985/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member Author

boegel commented Jun 1, 2015

@wpoely86, @JensTimmerman: thoughts on this?

I'm not sure how happy I am with this, but it does fix the issue at hand.

@boegel
Copy link
Member Author

boegel commented Jun 1, 2015

Copy link
Member

Choose a reason for hiding this comment

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

remove empty line

@wpoely86
Copy link
Member

wpoely86 commented Jun 1, 2015

so what is the problem here? It returns a html page instead of a 404 ?

@boegel
Copy link
Member Author

boegel commented Jun 1, 2015

@wpoely86
Copy link
Member

wpoely86 commented Jun 1, 2015

Is this not worth adding the framework then?

@boegel
Copy link
Member Author

boegel commented Jun 2, 2015

@wpoely86: maybe, I'm not sure, this is the first time we run into an issue like this, afaik

Choose a reason for hiding this comment

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

you're ignoring every EasyBuildError, not just download errors?

@JensTimmerman
Copy link

This should probably be fixed somewhere in the framework, instead of just this EasyBlock?

Choose a reason for hiding this comment

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

woudn't the md5sum pick this up?

Copy link
Member

Choose a reason for hiding this comment

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

only if it is set, which is still a minority of the easyconfigs.

Choose a reason for hiding this comment

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

sure, but it's a lot faster and easier to set the md5sum for the sources here then to try to fix it this way?

Copy link
Member Author

Choose a reason for hiding this comment

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

If there's an MD5sum available, it will detect this issue, yes, but simply complain that things don't match.

Checking the MD5sum if you know that the download is faulty is pretty useless.

Choose a reason for hiding this comment

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

the sum only get's checked after the download stage, not after each individual download?

@JensTimmerman
Copy link

Why is this special workaround needed? Can't the md5sum pick this failure to download up?
And then notify the user to check out the download urls.

The download problem is bigger then just for this package, we see this all over EasyBuild, links that go missing etc, so should be tackled on a bigger level, not on an individual basis?

@wpoely86
Copy link
Member

wpoely86 commented Jun 2, 2015

I agree with @JensTimmerman here. Should be handled in the framework. Does a simple check on the return mimetype not suffice to check whether we get html or something else?

@JensTimmerman
Copy link

The problem is you then have to specify in the easyconfig what mime type you are expecting, the extension doesn't really mean anything anyway, but of course, it could be used as an indicator, I have some code in a branch that checks magic numbers, so we could spit out warnings if magic numbers don't match up with the extension...

We could do that, but since we have the checksum infrastructure in place already I suggest we use that?

Anyway, not something that should be fixed here?

@wpoely86
Copy link
Member

wpoely86 commented Jun 2, 2015

Why not do both? Checksums are the best option but it's nice to have a fallback.

Do we actually need the magic numbers stuff? Do we have any cases where the content-type is text/html of a valid download link?

@boegel
Copy link
Member Author

boegel commented Jun 2, 2015

The problem here is that without having this in place, the download for QuantumESPRESSO can never work.

The non-generic URLs used in easybuilders/easybuild-easyconfigs#1644 don't yield a 404 if a download is attempted that is not available at that URL; the generic URL does, but not everything can be downloaded that way.

So, without this workaround, auto-download for QuantumESPRESSO is simply broken, and there's no way around it by reordering the source_urls.

I agree that this fix can be implemented more generally, and maybe it should (and be disabled by default).

But we've never run into an issue like this, i.e. source URLs that do not properly yield a 404 when attempting to download something that isn't there. So this problem is specific to QuantumESPRESSO, for now.

@JensTimmerman
Copy link

My point about the md5sum is that this is the way to figure out if a download is correct or not, So can the general framework code be changed to check the md5sum after a download, and if that's wrong, move on to the next source url?

@boegel
Copy link
Member Author

boegel commented Jun 2, 2015

What if checksums are not available? (as they are now, in QuantumESPRESSO easyconfigs)?
Or when --try-software-version is used (checksums are cleared then, since they're guaranteed to be broken)?

@JensTimmerman
Copy link

then you have to add the checksums to the easyconfig, or fix it in the framework, instead of trying to patch it in in the easyblock?

@boegel boegel added this to the v2.3 milestone Jul 11, 2015
@boegel boegel modified the milestones: v2.4.0, v2.5.0 Nov 6, 2015
@boegel boegel modified the milestones: v2.5.0, v2.6.0 Dec 14, 2015
@ocaisa
Copy link
Member

ocaisa commented Apr 5, 2024

With #3257, we're moving to a whole new easyblock for QE, so closing this

@ocaisa ocaisa closed this Apr 5, 2024
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 this pull request may close these issues.

5 participants