![]() |
|
|
#1 |
|
"Bob Silverman"
Nov 2003
North of Boston
756510 Posts |
I got a version of the build matrix code compiled and linked.
I am now working on the Lanczos code. The make file has a reference to a variable defined as an input the to compiler: BLOCKING_FACTOR. It is used in macros inside .h files and there is an #ifndef BLOCKING_FACTOR but its value is not defined anywhere. It is seemingly provided as an input to make when make is invoked. There does not seem to be any guidance. I can only guess at its value. The code also seems to use some syntax/constructs that are not liked by the compiler. e.g. typedef char hexstr_t[1 + BITS_PER_ELEMENT/4]; The code is clearly trying to define a type as a character array of fixed size. But the compiler fails to recognize the syntax. Later hexstr_t hvalue; hvalue[i] = ...... barfs as well with two errors: "type defaults to int" for the typedef declaration, then later "hvalue is neither an array or pointer" for the assignment. This is easy to fix, but why write code this way???? Last fiddled with by R.D. Silverman on 2015-09-07 at 19:35 Reason: addition |
|
|
|
|
|
#2 | |
|
"Bob Silverman"
Nov 2003
North of Boston
5·17·89 Posts |
Quote:
|
|
|
|
|
|
|
#3 | |
|
"Bob Silverman"
Nov 2003
North of Boston
756510 Posts |
Quote:
|
|
|
|
|
|
|
#4 | |
|
"Bob Silverman"
Nov 2003
North of Boston
1D8D16 Posts |
Quote:
to no avail. The compiler refuses to compile this construct. Advice? Note that I get hundreds of errors. Last fiddled with by R.D. Silverman on 2015-09-07 at 20:18 |
|
|
|
|
|
|
#5 | |
|
Mar 2006
10001010102 Posts |
Quote:
Code:
#define BITS_PER_ELEMENT 32
int main(void) {
typedef char hexstr_t[1 + BITS_PER_ELEMENT/4];
hexstr_t hvalue;
hvalue[0] = 1;
if (hvalue[0] == 2) hvalue[0] = 1;
return 0;
}
Code:
gcc -o typedef.exe -Wall -ansi -pedantic -Wextra -std=gnu99 test.c I guess the best way to proceed here is to ask, what version of gcc are you using? (gcc --version) I'm using: gcc.exe (x86_64-posix-seh-rev1, Built by MinGW-W64 project) 4.9.2 What are the first couple of errors that you see? Does the CWI code need a "configure" step? Sometimes big code projects need a "./configure [options]" in the main directory once before trying to do make. Does the CWI code need this, and if so, what options did you pass to configure? Also, what options, if any, are you passing to "make"? |
|
|
|
|
|
|
#6 | |
|
"Bob Silverman"
Nov 2003
North of Boston
11101100011012 Posts |
Quote:
x86-64-w64-mingw32-gcc.exe there is also x86-64-w64-mingw32-gcc-5.0.1 c:\TDM-GCC-64\bin\gcc -c -Wall -std=gnu99 -D_MSC_VER -DUSE_PTHREAD -D_GNU_SOURCE -pthread %1 These are defines turned on in the CWI makefile. There is no config step. AFAIK BTW, I am also running into some data types and defines that are not defined anywhere within the .c or .h files: DISTR, DBLINT I suspect the latter may come from GMP somewhere. |
|
|
|
|
|
|
#7 | |
|
"Bob Silverman"
Nov 2003
North of Boston
1D8D16 Posts |
Quote:
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=C:/TDM-GCC-64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-5.1.0/configure --build=x86_64-w64-mingw32 --enable-targets=all --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-cxx-flags=-DWINPTHREAD_STATIC --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-1 --with-bugurl=http://tdm-gcc.tdragon.net/bugs Thread model: posix gcc version 5.1.0 (tdm64-1) I've been at this all day. My brain is mush. I am quitting for now. I do not know why this typedef is not compiling. Last fiddled with by R.D. Silverman on 2015-09-07 at 21:55 |
|
|
|
|
|
|
#8 |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
160658 Posts |
Do you get the same error when you compile WraithX's test code?
If it compiles fine for you, then there is probably a syntax error on the previous line of your code (dropped ; or what have you). If that fails, then you may have a compiler bug in gcc 5 (or mingw or something) (????). |
|
|
|
|
|
#9 | ||
|
Jan 2008
France
25516 Posts |
Quote:
Code:
/*
A November, 2003 timing run showed 128-bit vectors
performed best on IA-64 even with its many registers.
[This may be partially due to the 3 Megabyte L3 cache --
it can hold two vectors each of length 65536
if elements are 16 bytes each but not if they are 32 bytes.]
64-bit vectors ranked second, 256-bit third.
These tests used NMAT_BYTE_WIDTH = INNER_NYTE_WIDTH = 8.
The tests did not consider that more matrix rows (for small primes)
can be omitted if we use wider vectors
-- rather the same matrix was used three times.
A test on an AMD Phenom II with a 3746144 x 3754318 w259102075
matrix suggested that a blocking factor of 256 is better even
for this relatively small matrix size.
*/
Quote:
|
||
|
|
|
|
|
#10 | |
|
"Bob Silverman"
Nov 2003
North of Boston
5·17·89 Posts |
Quote:
It seems that the compile failed because BITS_PER_ELEMENT was not defined. It was not defined because BLOCKING_FACTOR was not defined................ |
|
|
|
|
|
|
#11 | |
|
"Bob Silverman"
Nov 2003
North of Boston
1D8D16 Posts |
Quote:
to work correctly and produces a matrix identical with the old code. The new CWI code has two versions for LA: gauss.c and lanczos.c I managed to get a 64-bit version of the former built. But when I run it it gives the same matrix weight mismatch error that I got before. I assume that CWI is no longer supporting this, but I'd like to ask someone there (who is still there?) about this problem. I could work around the problem, telling the code not to exit, but I don't want to waste a week running LA code only to find out that I get the wrong answer.... Compiling lanczos.c is still ongoing. Last fiddled with by R.D. Silverman on 2015-09-08 at 13:52 |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling mfaktc on Mac OS X | dozba | GPU Computing | 23 | 2017-10-03 19:50 |
| compiling GMP-ECM | ATH | GMP-ECM | 69 | 2017-01-04 12:03 |
| We beat the odds where I work | schickel | Lounge | 4 | 2013-08-28 03:55 |
| Compiling mprime source code under Ubuntu | sol_kanar | Software | 3 | 2009-03-26 09:15 |
| Compiling 24.14 | CBoland | Software | 6 | 2007-08-01 00:11 |