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

Rational config handling #23

Merged
merged 13 commits into from
May 25, 2018

Conversation

PDoakORNL
Copy link
Collaborator

To accomplish support for using pycicle with a personal fork and a PR destination branch other than master. I tried to be careful to not break or change any current functionality. For instance a good test would be hpx should be able to run with this as if it were master.

Unfortunately my existing CI instances weren't upgraded to the post merge master which did produce some minor breaking changes to the DCA CI on condo.

Copy link
Owner

@biddisco biddisco left a comment

Choose a reason for hiding this comment

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

the pbs/slurm stuff is the only thing that stands out as being dodgy.

ssh -fN -R38080:localhost:8080 you@clusterA-login-node
```
If you have load balancing on log in nodes make sure to explicitly raise the reverse tunnel on the login node pycicle is running on.

Copy link
Owner

Choose a reason for hiding this comment

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

Doc improvements Wonderful


# Launch jobs using slurm rather than directly running them on the machine
set(PYCICLE_SLURM FALSE)
set(PYCICLE_PBS TRUE)
Copy link
Owner

Choose a reason for hiding this comment

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

I think the set(PYCICLE_JOB_LAUNCH "pbs") approach is nicer than having a bool, for each possiblity. This was changed in my last big update and I suspect you started adding these tweaks before I merged your other stuff.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't test the dca master branch CI so I missed this.

@@ -110,7 +112,7 @@ string(CONCAT CTEST_BUILD_OPTIONS ${CTEST_BUILD_OPTIONS}
# Setup a slurm job submission template
# note that this is intentionally multiline
#######################################################################
set(PYCICLE_JOB_SCRIPT_TEMPLATE "#!/bin/bash
set(PYCICLE_PBS_TEMPLATE "#!/bin/bash
Copy link
Owner

Choose a reason for hiding this comment

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

same here - I renamed it to PYCICLE_JOB_SCRIPT_TEMPLATE to make it easier to search/replace and switch between slurm/pbs /other

@@ -1,5 +1,4 @@
# Copyright (c) 2018 Peter Doak
# Copyright (c) 2017-2018 John Biddiscombe
# Copyright (c) 2018 John Biddiscombe, Peter Doak
Copy link
Owner

Choose a reason for hiding this comment

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

trivial detail, but I quite like the hpx convention where each contributor puts his name on a separate line and edits the dates accordingly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yest that's more informative, I'll switch it back

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So last person to update file on top?

@@ -92,15 +94,17 @@ endif()
#####################################################################
# if this is a PR to be merged with master for testing
#####################################################################
if (NOT PYCICLE_PR STREQUAL "master")
if (NOT PYCICLE_PR STREQUAL "${PYCICLE_MASTER}")
Copy link
Owner

Choose a reason for hiding this comment

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

good catch

'PYCICLE_CDASH_HTTP_PATH',
'PYCICLE_BUILD_STAMP',
'PYCICLE_COMPILER_SETUP',
'PYCICLE_SLURM',
Copy link
Owner

Choose a reason for hiding this comment

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

same comment here - see refactoroed slurm/pbs option

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes part of the point here is to support some config error catching.

@@ -0,0 +1,79 @@
# Copyright (c) 2017-2018 John Biddiscombe, Peter Doak
Copy link
Owner

Choose a reason for hiding this comment

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

wow. I'd better test this right away. all the settings in one place. good idea

@PDoakORNL
Copy link
Collaborator Author

Ok fixed those issues.

@biddisco
Copy link
Owner

jb-s76:~/pycicle$ python3 ~/src/pycicle/pycicle.py -m jb-laptop -P hpx -d
Traceback (most recent call last):
  File "/home/biddisco/src/pycicle/pycicle.py", line 26, in <module>
    from pycicle_params import PycicleParams
  File "/home/biddisco/src/pycicle/pycicle_params.py", line 74
    m = re.findall(setting + ur"\s*\"(.+?)\"", line)
                                            ^
SyntaxError: invalid syntax

must be something to do with python 2 vs python 3. I use python3 on my machines.

I'll try to fix it ...

@biddisco
Copy link
Owner

so it seems python 3 allows u"string" or r"string", but not ur"string", so I'll use u"string"

I've got a problem with default args. pycicle compiler_type is set to None and the default "gcc" is not substituted. Might as well make that a compulsory setting and remove the default value. Only needs me to add gcc to my jb-laptop config.

@biddisco biddisco merged commit 5cc62aa into biddisco:master May 25, 2018
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.

None yet

2 participants