Skip to content

Merge qsub remodel - #250

Merged
tiborauer merged 78 commits into
automaticanalysis:masterfrom
hhentschke:qsub_remodel
Sep 4, 2021
Merged

Merge qsub remodel#250
tiborauer merged 78 commits into
automaticanalysis:masterfrom
hhentschke:qsub_remodel

Conversation

@hhentschke

Copy link
Copy Markdown
Contributor

No description provided.

All queue processor classes including qsub are handle classes, meaning that variables instantiated with that class are pointers to an object that is shared among all workspaces. Copies of that variable are all pointers to the same object. So, if any class method changes properties of its own instance, these changes will be 'global' in the sense that they are instantly effective also outside the method's workspace, obviating the need to return the class instance from any of the class' methods.
Copying value of global variable aacache to individual workers' workspaces as in the previous commit works, but is circuitous. This commit implements the solution already realized for aaq_qsub, namely, making aacache a field of aaworker, which is an input argument into aa_doprocessing_onetask (hint by Tibor, automaticanalysis@4162fd4#diff-5fe57c0d988d08e201c8e99e6622ecbec1a4bff90b55c366780a2740aac6ccde)
- adds & restructures help and comments
- removes some unused code
- renames some variables
@tiborauer

Copy link
Copy Markdown
Member

@hhentschke, I have just sent a PR to your repo, which fixes a few small (unrelated) issues. After these fixes, I can approve this PR.

@tiborauer

Copy link
Copy Markdown
Member

I still have some issues with parpool but only when the engine is also submitted as a job and aaq_parpool is a sub-job. When I run the engine on the login node, then it works and is, indeed, faster than batch probably due to the full (in)dependency check.

@tiborauer

Copy link
Copy Markdown
Member

Thanks, @hhentschke. I am happy with this PR.
How about you, @jones-michael-s?

@jones-michael-s

Copy link
Copy Markdown
Collaborator

I've tested matlab_pct and it runs fine here (it seems faster than before -- is that possible?).

What I'd like to see is some documentation. @tiborauer suggested I try out the aaq_parpool option, but I have no idea how to do that.

@tiborauer

tiborauer commented Sep 2, 2021

Copy link
Copy Markdown
Member

I suggest looking at the README. Based on my experience, you do not have to do anything but set the aap.options.wheretoprocess accordingly. As usual, the value should be the engine name without 'aaq' (e.g. 'parpool' for 'aaq_parpool').

@jones-michael-s

Copy link
Copy Markdown
Collaborator

Ok, I have run the parpool version here. No crash and is wicked fast!

A minor complaint is that we don't get module info messages echoed to the command window. I assume this is the nature of the beast? Meh, I can live with it.

However, I'm still going to complain about documentation. The readme is a start, but it's not "documentation." And while I'm sure operation is obvious to the people who worked on the code, it isn't to the rest of us. I didn't even know how to select the new processing option. But also: does the new PCT use the same aap settings? Do I need to create a new local pool profile. Apparently not -- the analysis ran -- but what about optimization? What are the hardware requirements/recommendations? What versions of matlab are supported?

We should adopt the rule that if you write (or rewrite) a substantial piece of the code, then you need to write (or rewrite) documentation for it as part of the PR. Who better qualified to write the documentation than the developer?

Maybe this is in the works for the parallel project, but I checked the wiki and it doesn't seem to have been updated.

In summary: New PCT code works great, go ahead and merge but needs documentation.

@tiborauer

tiborauer commented Sep 4, 2021

Copy link
Copy Markdown
Member

Hi @jones-michael-s, I hear what you say and am with you on the need for more documentation for aa and especially for the cluster integration. However, this documentation that you miss is for aa(q) in general and not specific for this PR.
The new aaq engines work the same way as the previous ones and require the same hardware/software configuration/optimization. And there is only a slight change in MATLAB compatibility because parpool and parfeval requires R2103b rather than R2013a as opposed to what the website says; which I can rectify easily.
Only HTCondor requires MATLAB b2020b, which is also indicated. HTCondor finally works again and with 'batch' only (which is due to a fundamental property of HTCondor no supporting communicating jobs in general). aaq_condor should be, perhaps, removed, because it might confuse users.

The README clearly describes aaq_batch and aaq_parpool with their most relevant features and some recommendation. It also indicates that they are there to replace aaq_qsub and aaq_matlab_pct, respectively; which are also still available as "legacy" versions.
Long story short, no matter whether you used aaq_qsub or aaq_matlab_pct, the README gives you a one-to-one mapping without any further need to change anything.

@jones-michael-s jones-michael-s left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See PR discussion for comments...

@tiborauer
tiborauer merged commit 791095b into automaticanalysis:master Sep 4, 2021
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.

3 participants