Skip to content

Conversation

@valtandor
Copy link
Contributor

This addition to the EasyBlock allows the user to specify, in the easyconfig, a launching string if a different MPI launcher is used (for example, srun).

@boegel boegel changed the title Add the ability to specify a custom parallel launcher Molpro: add the ability to specify a custom parallel launcher May 19, 2016
}
run_cmd_qa(cmd, qa=qa, std_qa=stdqa, log_all=True, simple=True)

molpro_path = os.path.join(self.installdir, 'bin', 'molpro')
Copy link
Member

Choose a reason for hiding this comment

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

path is the same in both if and else bodies, so hoist it above the if?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In fact, in one case self.installdir was used, and in the other, self.full_prefix, so not the same. However, I have set a variable destroot and used that instead, so that only one call to os.path.join is needed, and can be done outside the if statement.

@boegel boegel added this to the v2.9.0 milestone May 19, 2016
@boegel
Copy link
Member

boegel commented May 19, 2016

@valtandor some minor remarks, please ping me when they're tackled since Travis doesn't notify of updates

@valtandor
Copy link
Contributor Author

@boegel I will do, but it will need to wait for about two or three weeks as I'm on leave as of today with very limited access to my usual machines.

@valtandor
Copy link
Contributor Author

@boegel: This should have the required changes implemented.

if self.cfg['parallel_launcher'] is not None:
apply_regex_substitutions(molpro_exe, [(launchertext, r'\1 "%s"' % self.cfg['parallel_launcher'])])
elif self.orig_launcher is not None:
apply_regex_substitutions(molpro_exe, [(launchertext, r"\1 %s" % self.orig_launcher)])
Copy link
Member

Choose a reason for hiding this comment

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

@valtandor while testing this, I noticed that the syntax here is not correct, i.e.:

$ grep '^LAUNCHER' $EASYBUILD_PREFIX/software/Molpro/*/*/bin/molpro
LAUNCHER= /path/to/software/impi/5.0.2.044-iccifort-2015.1.133-GCC-4.9.2/bin64/mpiexec -machinefile %h -n %n %x

the space after the =, that's just not right in a bash script...

This issue was already there in the easyblock however, you didn't introduce it. But we should fix this while we're at it.

This additional change fixes that problem, please review/merge: valtandor#4

Copy link
Member

Choose a reason for hiding this comment

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

@valtandor ping?

@boegel boegel modified the milestones: v2.9.0, v3.0 Sep 23, 2016
@boegel boegel modified the milestones: v3.1, v3.0 Nov 13, 2016
@boegel boegel removed this from the 3.1.0 milestone Jan 30, 2017
@boegel boegel modified the milestones: 3.2.0, 3.1.0 Jan 30, 2017
@boegel boegel modified the milestones: 3.2.0, 3.3.0 May 2, 2017
@boegel boegel modified the milestones: 3.3.0, 3.x Jun 22, 2017
@boegel boegel modified the milestones: 3.x, 4.x Feb 20, 2020
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.

2 participants