Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/articles/programming/)
-   -   Best notes from our company's blog on parallel and 64-bit software development (http://www.go4expert.com/articles/notes-companys-blog-parallel-64-bit-t22001/)

Karpov2007 5May2010 11:37

Best notes from our company's blog on parallel and 64-bit software development
 

Abstract



This text contains links to the best posts of the blog conducted by the workers of OOO "Program Verification Systems" company. The notes are devoted to the topic of 64-bit and parallel OpenMP software development.

Introduction



On reading the article "Information architecture of blogs (RU)" [1], we had to agree with its main thesis "blog is a means of communication, not storage of structured information". As a result, it got clear that arranging some information in the form of blog-notes on our site was not a very good idea. In the blog, there are posts on various topics and of different obsolescence levels all mixed together.

To partly solve this issue, we decided to gather the most interesting posts present in the blog by this moment (May, 2010). Below are links to these posts arranged in topics and supplied with small descriptions.

Interesting examples of 64-bit errors



When examining code of various applications, we sometimes encounter interesting 64-bit errors. By 64-bit errors we understand code fragments which are correct when compiling the application for a 32-bit system but lead to errors when being compiled in the 64-bit mode. The examples of such errors are described in our blog:
  1. Problems of 64-bit code in real programs: FreeBSD.
  2. A nice 64-bit error in C.
  3. Change of type alignment and the consequences.
  4. Problems of 64-bit code in real programs: magic constants.
  5. Issues of 64-bit code in real programs: virtual functions.
  6. 64-bit code issues in real programs: pointer type change.
  7. Issues of 64-bit code in real programs: qsort.
  8. Issues in real programs - what errors are not there in the world...
  9. Atavisms in large systems.

The essence of 64-bit errors



By the way, if you do not agree that the described errors should be called "64-bit", please see this post: "Are 64-bit errors real?". It is written in a bit humorous manner and explains why we call 64-bit errors "64-bit errors".

Loki



We cannot believe it ourselves, but the fact remains - in due time we were asked by the Loki library administrator to check this library for 64-bit errors and we did it. And the analyzer did not crash or hang :) We have a note in the blog about this experience: "PVS-Studio and testing Loki". To learn more about this check and its result, please read the article "64-bit Loki" [2].

64 bits is a business of far future



I cannot agree with this thesis. Here is a post on this topic about how 64 bits are coming into our life irrespectively if we want it or not: "64-bit world is getting closer".

Description of diagnosis for some 64-bit errors



In some posts, we describe how PVS-Studio tool allows to detect some kinds of errors and what diagnostic rules are implemented in it for this purpose.
  1. Magic constants and malloc() function.
  2. Search of 64-bit errors in array implementation.
  3. Search of explicit type conversion errors in 64-bit programs.
  4. Testing of Linux-applications with the help of PVS-Studio in Windows.

64-bit motley crew



Here are some more posts on 64-bit software development:
  1. Why A + B != A - (-B).
  2. Optimization in the world of 64-bit errors.
  3. In what way can C++0x standard help you eliminate 64-bit errors.
  4. /Wp64 switch and template processing error.
  5. Viva64 for optimizing data structures.

Parallel notes



We have made a small series of publications devoted to the parallel programming technology OpenMP. These notes cannot replace a book or training course but they let you get acquainted with the OpenMP technology to understand if it fits your tasks and if you should study it in detail.
  1. Levels of Paralleling.
  2. Parallel notes N1 - OpenMP technology.
  3. Parallel notes N2 - toolkit for OpenMP.
  4. Parallel notes N3 - base OpenMP constructs.
  5. Parallel notes N4 - continuing to study OpenMP constructs.
  6. Parallel notes N5 - continuing to study OpenMP constructs.

Parallel errors in OpenMP applications



There are rather few resources on parallel programming in our blog yet. But some issues, the programmer may encounter, are described and it may appear very useful for beginners studying the OpenMP technology.
  1. OpenMP and exceptions.
  2. Processing of exceptions inside parallel sections.
  3. Be careful when working with atomic directive.
  4. Use of rand() in OpenMP parallel sections.

Cold Tachyon



In October, 2009, the first online-seminar in Russian "Intel Parallel Studio workflow" arranged by Intel took place. Kirill Mavrodiev demonstrated there how to parallelize an application considering it a black box. In other words, he described a typical situation when the developer has an unfamiliar code which requires modifying. For example, it must be parallelized. For this purpose, the OpenMP technology was chosen while the dynamic analyzer Parallel Inspector was chosen for the task of error detection.

In the note "Cold Tachyon", we describe how to solve the task of searching for parallel errors in Tachyon program using the capabilities of VivaMP static analyzer included into PVS-Studio.

PC-Lint and PVS-Studio



Static analyzer PC-Ling can be called our rival because it also claims to be called "parallel lint", i.e. an analyzer that allows to detect parallel errors in source code. But on closer examination, it turns out that the functionalities of our tool and PC-Lint do not intersect in this sphere. It is described in detail in the note "Peaceful coexistence of PC-Lint and VivaMP".

What the question of comparing the capabilities of 64-bit code diagnosis in PVS-Studio and PC-Lint is concerned, please see the article "Comparing PVS-Studio with other code analyzers" [3]. Note that this article has become a bit obsolete because we regularly improve the capabilities of the PVS-Studio package in the sphere of detecting 64-bit and parallel errors since it is the natural specialization of our tool.

The plan "Course on static analysis"



Once we had a conversation with the company TEKAMA about the question of developing a course on static code analysis for one of their corporate clients. Unfortunately, the project was not implemented but we are still ready to develop theoretical and practical courses in this sphere. If you would like to get tutorial courses in the sphere of software quality and code verification - write to us. We are sure that we will be able to find mutual interests.

In the blog, you may see contents of the course on static analysis which we are ready to develop.

References


  1. Alik Kirillovich. "Information architecture of blogs" (RU). http://www.viva64.com/go.php?url=317
  2. Andrei Alexandrescu, Andrey Karpov, Evgeniy Ryzhkov, Peter Kummel, Rich Sposato. 64-bit Loki. http://www.viva64.com/art-1-2-2133646414.html
  3. Evgeniy Ryzhkov. Comparing PVS-Studio with other code analyzers. http://www.viva64.com/art-4-2-1722855810.html

shabbir 1Jun2010 18:17

Re: Best notes from our company's blog on parallel and 64-bit software development
 
If you liked this article do nominate this article for Article of the month - May 2010


All times are GMT +5.5. The time now is 14:05.