added tiny test to check that the Cmi defined types have the correct size
authorFilippo Gioachin <gioachin@illinois.edu>
Wed, 23 Mar 2005 06:31:51 +0000 (06:31 +0000)
committerFilippo Gioachin <gioachin@illinois.edu>
Wed, 23 Mar 2005 06:31:51 +0000 (06:31 +0000)
src/conv-core/check.C [new file with mode: 0644]
src/scripts/Makefile

diff --git a/src/conv-core/check.C b/src/conv-core/check.C
new file mode 100644 (file)
index 0000000..2dcf3fb
--- /dev/null
@@ -0,0 +1,49 @@
+#include "converse.h"
+#include <stdio.h>
+
+int main() {
+  CmiInt2 int2;
+  CmiInt4 int4;
+  CmiInt8 int8;
+  CmiUInt2 uint2;
+  CmiUInt4 uint4;
+  CmiUInt8 uint8;
+  CmiFloat4 float4;
+  CmiFloat8 float8;
+
+  if (sizeof(int2) != 2) {
+    printf("Error: sizeof(CmiInt2) is %d!\n",sizeof(int2));
+    exit(1);
+  }
+  if (sizeof(int4) != 4) {
+    printf("Error: sizeof(CmiInt4) is %d!\n",sizeof(int4));
+    exit(1);
+  }
+  if (sizeof(int8) != 8) {
+    printf("Error: sizeof(CmiInt8) is %d!\n",sizeof(int8));
+    exit(1);
+  }
+
+  if (sizeof(uint2) != 2) {
+    printf("Error: sizeof(CmiUInt2) is %d!\n",sizeof(uint2));
+    exit(1);
+  }
+  if (sizeof(uint4) != 4) {
+    printf("Error: sizeof(CmiUInt4) is %d!\n",sizeof(uint4));
+    exit(1);
+  }
+  if (sizeof(uint8) != 8) {
+    printf("Error: sizeof(CmiUInt8) is %d!\n",sizeof(uint8));
+    exit(1);
+  }
+
+  if (sizeof(float4) != 4) {
+    printf("Error: sizeof(CmiFloat4) is %d!\n",sizeof(float4));
+    exit(1);
+  }
+  if (sizeof(float8) != 8) {
+    printf("Error: sizeof(CmiFloat8) is %d!\n",sizeof(float8));
+    exit(1);
+  }
+
+}
index 28fc2f2b4cdb0eed24f0ca8f3db481de9333fa46..2f4d186dda12bb163b300bf8ce78705f94ce72e2 100644 (file)
@@ -339,6 +339,8 @@ converse: basics
        $(MAKE) converse-target
 
 converse-target:  $(CVLIBS) fmain-ok charmrun-target swapglobal-target conv-cpm
+       $(CXX) -o check check.C
+       ./check
 
 charmrun-target: sockRoutines.c sockRoutines.h ccs-server.c ccs-server.h sockRoutines-seq.o
        if [ -d charmrun ] ; then ( cd charmrun ; $(MAKE) OPTS='$(OPTS)' ) ; fi