Skip to content

{tools}[foss/2020a] Change default bitmaptype for IRkernel to cairo#11645

Merged
Micket merged 2 commits intoeasybuilders:developfrom
sara-nl:20201109163342_new_pr_IRkernel11
Nov 11, 2020
Merged

{tools}[foss/2020a] Change default bitmaptype for IRkernel to cairo#11645
Micket merged 2 commits intoeasybuilders:developfrom
sara-nl:20201109163342_new_pr_IRkernel11

Conversation

@casparvl
Copy link
Copy Markdown
Contributor

@casparvl casparvl commented Nov 9, 2020

(created using eb --new-pr)

I ran into this issue: IRkernel/IRkernel#388

At least two more people (@zao and eylenth) encountered this issue as well.

There are two options to run IRkernel on headless nodes: run an Xvfb so that the png device can still use the Xlib bitmaptype, or change the default bitmaptype to cairo. The latter makes most sense to me, since the cairo bitmaptype generally produces nicer plots to (e.g. can use TrueType fonts).

To do that, the kernelspec should read

{"argv": ["R", "--slave", "-e", "options(bitmapType='cairo'); IRkernel::main()", "--args", "{connection_file}"],
 "display_name":"R",
 "language":"R"
}

instead of

{"argv": ["R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"],
"display_name":"R",
"language":"R"
}

i.e. it should run the options(bitmapType='cairo') before starting the actual kernel.

Since running IRkernel on headless nodes is quite a common use case in the EasyBuild community, and since I've heard from @zao and eylenth that they hit the same issue, it makes sense to me to 'fix' this in the EasyConfig. I do that by adding

'sed -i \'s/"IRkernel::main()"/"options(bitmapType=\\x27cairo\\x27); IRkernel::main()"/g\' %s/kernels/ir/kernel.json' % local_kerneldir

To the postinstallcmds (which are already used to 'install' the kernelspec).

We can discuss if this also needs to be backported to older EasyConfigs, but I think the most important thing is that we adopt this in future versions.

…or headless nodes, since otherwise, without X11, you run into IRkernel/IRkernel#388
@casparvl casparvl changed the title Change default bitmaptype for IRkernel to cairo {tools}[foss/2020a] Change default bitmaptype for IRkernel to cairo Nov 9, 2020
@Micket Micket added the bug fix label Nov 10, 2020
@Micket Micket added this to the 4.3.2 milestone Nov 10, 2020
@Micket
Copy link
Copy Markdown
Contributor

Micket commented Nov 10, 2020

@boegelbot please test @ generoso

Copy link
Copy Markdown
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

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

lgtm

@boegelbot
Copy link
Copy Markdown
Collaborator

@Micket: Request for testing this PR well received on generoso

PR test command 'EB_PR=11645 EB_ARGS= /apps/slurm/default/bin/sbatch --job-name test_PR_11645 --ntasks=4 ~/boegelbot/eb_from_pr_upload_generoso.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 9728

Test results coming soon (I hope)...

Details

- notification for comment with ID 724611570 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
generoso-c1-s-2 - Linux centos linux 8.2.2004, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (haswell), Python 3.6.8
See https://gist.github.com/71b0e9dce580c88ae979dbbbf2118908 for a full test report.

@Micket
Copy link
Copy Markdown
Contributor

Micket commented Nov 11, 2020

Going in, thanks @casparvl!

@Micket Micket merged commit 3b83b37 into easybuilders:develop Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants