Complementarity Frictional Contact In GAMS 2014-05-19

The purpose of this post is to detail work done by Dan Melanz and I on the topic of solving frictional contact problems using the General Algebraic Modeling System (GAMS)

The best way to describe GAMS is that it is a language and framework for writing mathematical programming and optimization problems. GAMS can solve many different classes of problems, in this post the Nonlinear Programming (NLP), Quadratically Constrained Program (QCP) and Extended Mathematical Program (EMP) problem types will be discussed.

References

These papers provide more details about the various formulations used in this post.

Primal Model:

V. Acary and F. Cadoux, “Applications of an Existence Result for the Coulomb Friction Problem,” Recent Advances in Contact Mechanics, pp. 45–66, 2013.

V. Acary, F. Cadoux, C. Lemaréchal, and J. Malick, “A formulation of the linear discrete Coulomb friction problem via convex optimization,” Z. angew. Math. Mech., vol. 91, no. 2, pp. 155–175, Feb. 2011.

F. Bertails-Descoubes, F. Cadoux, G. Daviet, and V. Acary, “A nonsmooth Newton solver for capturing exact Coulomb friction in fiber assemblies,” ACM Transactions on Graphics, vol. 30, no. 1, pp. 1–14, Jan. 2011.

Dual Model:

M. Anitescu and G. D. Hart, “A constraint-stabilized time-stepping approach for rigid multibody dynamics with joints, contact and friction,” Int. J. Numer. Meth. Engng., vol. 60, no. 14, pp. 2335–2371, Aug. 2004.

A. Tasora and M. Anitescu, “A complementarity-based rolling friction model for rigid contacts,” Meccanica, vol. 48, no. 7, pp. 1643–1659, Sep. 2013.

Resizeable IguanaTex 2014-05-16

Recently I discovered an awesome PowerPoint plugin called IguanaTex. From the site: “IguanaTex is a PowerPoint plug-in which allows you to insert LaTeX equations into your PowerPoint presentation. It is distributed completely for free.” It is however a bit more than that, it allows you to write a full LaTeX document within a PowerPoint slide. What does this mean? simply put, anything that you could do in LaTeX, you can now do in PowerPoint, my favorite is generating really nice looking tables, equations and lists.

My biggest problem with this program is that the main window is not resizeable, these days with high resolution monitors and screens, having more screen space to do work is very helpful.

Prerequisites

Before I talk about the changes I made, I am going to assume that you were able to successfully get the program installed and the plugin loaded into PowerPoint. You must have a LaTeX install to to actually use this plugin, but it is not needed for installation.

Installation

To install the plugin, simply unload the old plugin (refer to the installation process on how to load plugin) and add this version. Now you will have a version that you can resize!

If you would like details on the changes I made, keep reading.

OpenMP Memory Benchmark 2014-03-08

Writing a memory bandwidth benchmark in OpenMP

There is a lack of memory bandwidth tests that are capable of running with multiple threads. I set out to write my own and by going through this process learned about some of the pitfalls that one can get into.

The importance of Node Interleaving on AMD compute nodes 2014-03-04

Enabling Node Interleaving in the bios can greatly increase performance of a compute node. Node interleaving essentially lets the CPU decide where to put the memory, disabling it means that the user must explicitly tell where in memory to put data so that the associated CPU gets best performance.

An explanation of Node Interleaving can be found here

The end result, a 4-5x performance increase in terms of memory bandwidth.

OpenCL Performance Tuning 2014-02-27

This post will discuss the process I went through to optimize a sparse matrix vector multiply (SPMV) that I use in my multibody dynamics code. I wanted to document the process and information that I gathered so that it may help others, and so that I could refer back to it.

Here is how I plan on going about this: First I want to determine the peak performance I could hope to achieve on my testing machine. I know I will never reach peak performance so comparing my code’s performance to the maximum theorical doesn’t make sense. I will rely on clpeak as my control. Then I will take my SPMV operation and try to get it to run as close as possible to what the benchmark tells me is possible.

I plan on detailing every kernel modification I made even when it makes the code perform slower. I am by no means an expert with OpenCL (currently at 3 days of experience), but I do know a bit about writing parallel code.