PITTNullCode/NullNews does not build on BlueGene/P

Create issue
Issue #646 closed
Erik Schnetter created an issue

PITTNullCode/NullNews does not build on BlueGene/P; the C++ STL reports an error. The reason seems to be that NULL is interpreted as integer constant instead of a pointer. An explicit case solves this problem there:

Index: src/set_pointers.h
--- src/set_pointers.h  (revision 3)
+++ src/set_pointers.h  (working copy)
@@ -1,9 +1,9 @@

   // define pointer array for past timelevels!
-  vector<CCTK_REAL*> uBondiP(max_timelevels, NULL);
-  vector<CCTK_COMPLEX*> Psi4P(max_timelevels, NULL);
-  vector<CCTK_COMPLEX*> NewsP(max_timelevels, NULL);
-  vector<CCTK_COMPLEX*> NewsBP(max_timelevels, NULL);
+  vector<CCTK_REAL*> uBondiP(max_timelevels, (CCTK_REAL*)NULL);
+  vector<CCTK_COMPLEX*> Psi4P(max_timelevels, (CCTK_COMPLEX*)NULL);
+  vector<CCTK_COMPLEX*> NewsP(max_timelevels, (CCTK_COMPLEX*)NULL);
+  vector<CCTK_COMPLEX*> NewsBP(max_timelevels, (CCTK_COMPLEX*)NULL);

   // Get current timelevel...
   // We assume here that the two vars uBondi[0] amd uBondi[1] are right next to each


Comments (7)

  1. Ian Hinder
    • removed comment

    Looks fine - please apply. Out of interest, what is the difference between the STL on that machine and on others?

  2. Erik Schnetter reporter
    • removed comment

    I don't know what this will do on other machines, so I will not commit it before the release. Blue Gene/P is not a production platform yet.

    The STL on this Blue Gene/P comes from gcc 4.1 (I believe); however, the C++ compiler is from IBM (xlc), and is a variant that was probably split off their major development branch some time before the Blue Gene/P architecture was released (a few years ago). I do not think that this platform receives or ever received major updates for C/C++ language standards.

  3. Roland Haas
    • removed comment

    Also prevents builds on Ubuntu 11.10 with the system default gcc (4.6). Affects Maxwell release. Ok to backport?

  4. Log in to comment