Computing, Programming

NuKeeper YAML Example

Having rolled out the use of NuKeeper across multiple repos in Azure DevOps I thought I would share an example YAML build definition to save others similar headaches to what I have had, also a few handy tips on what I learned the hard way.

The main issue I had was ensuring the credentials were correctly passed through, you need to set the environment variable ‘NuKeeper_azure_devops_token‘ with the value $(System.AccessToken).

Another issue I had was that I had set the checkout to do a shallow clone / fetch to save time on bigger repos, this did not play nicely with NuKeeper and I was getting an error ‘NuKeeperException : Git Cannot checkout branch’

trigger: none # you don't likely want this firing every time someone pushes a branch

schedules:
- cron: 0 4 * * 1,2,3,4,5 # 4am Mon-Fri
  always: true # you want this to fire regardless of changes to this repo
  branches:
    include:
    - refs/heads/master
    
pool:
  vmImage: windows-latest

steps:
- checkout: self
  persistCredentials: True
- task: NuKeeper@0
  displayName: NuKeeper
  env:
    NuKeeper_azure_devops_token: $(System.AccessToken) # this is important!
  inputs:
    arguments: --consolidate --maxpackageupdates 10 --change minor --age 0 --include ^CompanyNugetPrefix
    feed: /87ed4aa7-4a9f-4ea0-89f5-a9782a2067ae #GUID of your products nuget feed
Programming

SSL certificate problem: unable to get local issuer certificate

If you are connecting to an on premises TFS instance and you are using Git in Visual Studio 2017 then you may get the error “SSL certificate problem: unable to get local issuer certificate”.

To get around this you want the inbuilt Git to use WinSSL / the builtin Windows Security Store. You can do this in the following way:

  1. Close all instances of Visual Studio
  2. Open a command prompt as administrator
  3. cd to the installation directory for VS2017’s Git – C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin
  4. Run the command: git config --system http.sslbackend schannel
  5. Reopen Visual Studio

This should modify the following file (by default)

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\etc\gitconfig

Programming

Visual Studio 2015 Update 3 Error C4772

Having just switched from Visual Studio 2015 Update 1 to Update 3 and updated our compiler from Intel Composer 2016.2 to 2017.1 we got an error C4772:

C++ Error C4772: #import referenced a type from a missing type library; ‘__missing_type__’ used as a placeholder

The code included two type libraries Common and Logger, the Logger library had a dependency on the Common type library. Previously this worked fine but it seems a change in Visual Studio 2015 or Intel Composer 2017 have broken this.

#import "..\tlb\Common.tlb"
#import "..\tlb\Logger.tlb"

If the code was changed to the following then the error disappeared:

#import "..\tlb\Common.tlb" no_registry
#import "..\tlb\Logger.tlb" no_registry

Unfortunately this only worked fine with the Microsoft compiler, with the Intel compiler we got an error C1108. For now this small import project can just be switched to MS compiler only, but it would seem that the reason for the error below is because when switching to the Intel compiler it adds ‘$(MSBuild_ExecutablePath)’ to the Exclude Directories, of which it includes ‘C:\windows\Microsoft.NET\Framework\v4.0.30319\’ which is where TLBREF.dll lives.

c:\program files (x86)\microsoft visual studio 14.0\vc\include\comdef.h: : error C1108: unable to find DLL: ‘TLBREF.dll’

Computing, Programming

Intel Developer Workshop

Currently attending an Intel Developer Workshop at The Genome Analysis Centre in Norwich. Learning lots more about more advanced techniques for optimising code for speed. I already knew a fair bit about parallelization, vectorization and other such things but it’s nice to go into a bit more depth into the various aspects of performance tuning such as avoid cache misses and filling the various processing pipelines.

The Travelodge I am staying at isn’t exactly the nicest place on Earth, but I suppose it’ll do for a couple of nights. Hoping to be able to put more of the things I have learnt into practise when I am back at work, we should be getting licences for the Parallel Studio XE package so I can make use of Vtune and the various performance libraries to speed up the Simcyp Simulator.

Computing, Programming

Intel Developer Conference

Today I attended an Intel Developer Conference at the Mayfair hotel in London. The presentations covered various aspects of the Intel Parallel Studio XE software suite as well as informing people of the upcoming features of their new processors including the AVX-512 instruction set that will be similar to those in the Xeon Phi co-processors that are already available. These new instruction sets will be very useful for some of the number crunching that we do at Simcyp, just a shame they are a few years away from mainstream use really.

The best bit of the conference though was that they had a raffle at the end I won the main prize with was an Intel powered, Lenovo Yoga 2 Pro. Only had a quick look at it but it’s really light and looks to have lots of cool features such as being able to be a laptop or fold on itself to be a tablet. Definitely worth getting up at 5am to travel down to London for!

Also I found out there will be a developer workshop in a weeks time at the The Genome Analysis Centre in Norwich which hopefully I will be able to attend.