![]() |
|
|
#276 | |
|
"Jerry"
Nov 2011
Vancouver, WA
112310 Posts |
Quote:
|
|
|
|
|
|
|
#277 |
|
Banned
"Luigi"
Aug 2002
Team Italia
481510 Posts |
Ubuntu 11.10 - Linux64, CUDA drivers 5.0, CUDA runtime version 4.1
Code:
uigi@luigi-ubuntu:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) As mmff 0.26 binary is compiled with CUDA runtime version 4.2, I couldn't run it out of the box, and tried recompiling it, but... I had problems trying to compile mmff It seems that some classical C math functions don't link correctly, even moving the -lm switch on the Makefile at the beginning of the line.In any case, I am appending the compile log, hoping that someone of good will will throw an eye on it... Thank you anyway. Luigi Last fiddled with by ET_ on 2012-12-04 at 17:56 |
|
|
|
|
|
#278 |
|
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
The GNU linker by default processes object files and libraries in the order as they are specified on the command line, remembers which unresolved references there are from each file it processes, and tries to resolve those references with symbols in object files and libraries that follow. This means putting -lm at the start of the command line has no effect: there are no unsatisfied references to math library functions at that point, and the unresolved references to libm from later files never get resolved because no -lm follows them.
Put -lm at the end, and generally a object/library file which contains functions that another file Y needs after the file Y. If you have circular dependencies, you can use some command line switch (forgot which) to make gnu ld re-scan the objects on the command line until all symbols are resolved, but you rarely need that. |
|
|
|
|
|
#279 | |
|
Banned
"Luigi"
Aug 2002
Team Italia
32×5×107 Posts |
Quote:
Update: I tried a make clean followed by a make all (I forgot the "all" thingie... )result: Code:
nvcc fatal : Unsupported gpu architecture 'compute_30' Code:
--generate-code arch=compute_30,code=sm_30 result: Code:
#error -- unsupported GNU version! gcc 4.6 and up are not supported! Does runtime version 5.0 correct this error, or I have to try some fancy link and download an older version of GCC? Luigi Last fiddled with by ET_ on 2012-12-04 at 18:27 |
|
|
|
|
|
|
#280 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
36·13 Posts |
Quote:
Find this file and edit __GNUC_MINOR__ > 6 into __GNUC_MINOR__ > 9 Code:
/usr/local/cuda/include/host_config.h: #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 9) |
|
|
|
|
|
|
#281 | |
|
Banned
"Luigi"
Aug 2002
Team Italia
32×5×107 Posts |
Quote:
Log appended. There is a request to restart the system, maybe a pending update; I will tell you if after the reboot something changes. Thank you Serge. Luigi |
|
|
|
|
|
|
#282 |
|
"Nancy"
Aug 2002
Alexandria
1001101000112 Posts |
Code:
gcc -fPIC -L/usr/local/cuda/lib64/ -lcudart -lm timer.o parse.o read_config.o mfaktc.o checkpoint.o signal_handler.o output.o tf_barrett96_gs.o gpusieve.o -o ../mmff.exe |
|
|
|
|
|
#283 | |
|
Banned
"Luigi"
Aug 2002
Team Italia
32·5·107 Posts |
Quote:
Should I modify it? Luigi Last fiddled with by ET_ on 2012-12-04 at 19:23 |
|
|
|
|
|
|
#284 |
|
Jul 2003
So Cal
2·34·13 Posts |
Newer versions of gcc no longer support putting the libraries at the beginning. Try
Code:
gcc -fPIC -L/usr/local/cuda/lib64/ -o ../mmff.exe timer.o parse.o read_config.o mfaktc.o checkpoint.o signal_handler.o output.o tf_barrett96_gs.o gpusieve.o -lcudart -lm |
|
|
|
|
|
#285 |
|
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
I just checked what I did on our work machine to make it compile:
Code:
kruppaal@quiche:~/mmff$ diff src/Makefile src.my/Makefile 14c14 < NVCCFLAGS += --generate-code arch=compute_20,code=sm_20 --generate-code arch=compute_30,code=sm_30 --- > NVCCFLAGS += --generate-code arch=compute_20,code=sm_20 # --generate-code arch=compute_30,code=sm_30 16c16 < NVCCFLAGS += --compiler-options=-Wall --- > NVCCFLAGS += --compiler-options="-Wall -B/usr/lib/gcc/x86_64-linux-gnu/4.5.3/" 20c20,21 < LDFLAGS = -fPIC $(CUDA_LIB) -lcudart -lm --- > LDFLAGS = -fPIC $(CUDA_LIB) > MMFFLIB = -lcudart -lm 35c36 < $(LD) $(LDFLAGS) $^ -o $@ --- > $(LD) $(LDFLAGS) $^ $(MMFFLIB) -o $@ |
|
|
|
|
|
#286 |
|
Banned
"Luigi"
Aug 2002
Team Italia
32×5×107 Posts |
Thank you Greg, your line worked great!
![]() Alex, now I found an old Makefile from the project GPU-ECM: Code:
# CUDA does not support gcc >= 4.6 # this can be useful if your default gcc is >= 4.6 # if not just comment the following two lines. #CC_BIN:=/tmp/gcc45 #USE_THIS_CC:=--compiler-bindir $(CC_BIN) It's time to reserve some exponent... My mmff is already doing its selftest. Thanks again! ![]() Luigi |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mersenne trial division implementation | mathPuzzles | Math | 8 | 2017-04-21 07:21 |
| trial division over a factor base | Peter Hackman | Factoring | 7 | 2009-10-26 18:27 |
| P95 trial division strategy | SPWorley | Math | 8 | 2009-08-24 23:26 |
| Trial division software for Mersenne | SPWorley | Factoring | 7 | 2009-08-16 00:23 |
| Need GMP trial-division timings | ewmayer | Factoring | 7 | 2008-12-11 22:12 |