mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2013-04-25, 23:31   #1
SWSaunders
 
Apr 2013

2 Posts
Default Building MSieve without VS?

Is it possible to build msieve with gpu support from the latest svn sources using only cygwin? Meaning, without relying on Visual Studio?

I've tried running polynomial generation using the precompiled 151_gpu, but it only gets a few seconds in before terminating with "Illegal instruction." Everything I've read so far has indicated I need to build my own executable to avoid that issue. Unfortunately, I do not have a copy of VS at my disposal at the moment, however.

If the question has been asked before, apologies. I searched and found no likely culprits.
SWSaunders is offline   Reply With Quote
Old 2013-04-26, 00:35   #2
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

67258 Posts
Default

It has been a while since I tried building in cygwin. From the cygwin shell you should be able to do
Code:
make all NO_ZLIB=1 CUDA=1 WIN=1
from the base source directory and get a usable msieve.exe; however, if you are getting illegal instruction errors it's possible the machine you're running the binary on is old, and you might have to replace '-march=core2' in the makefile with '-march=native'.
jasonp is offline   Reply With Quote
Old 2013-04-26, 02:47   #3
SWSaunders
 
Apr 2013

2 Posts
Default

For clarity:
  • it was the already-compiled msieve151_gpu.exe downloaded from SourceForge that was giving me an "Illegal instruction" error when I ran it.
  • before building, I changed the makefile to use "-march=athlon64" as that's the architecture I'm be running on; I did not try native (and I will shortly)
  • my build command was "make all WIN=1 CUDA=1", but I'll add NO_ZLIB=1
  • when building (with -march=athlon64), the build would fail with a fatal error reading "Cannot find compiler 'cl.exe'", which I understand to be part of Visual Studio (which I have not installed... hence, my original question)
SWSaunders is offline   Reply With Quote
Old 2013-04-26, 11:19   #4
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

DD516 Posts
Default

Unfortunately, I'd forgotten that the GPU branch builds CUDA code with Nvidia's NVCC compiler, which on windows requires Microsoft's compiler to be present. You don't need to run a MSVC project, but you do need cl.exe in your path.

MS makes the compiler toolchain for Visual Studio 2008 and 2010 available as a free download. You never have to use it directly, but you need it for CUDA code. In fact you still need it even if you are only building code to run on a GPU, because the compilation process requires Microsoft's preprocessor.
jasonp is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help building GMP for prime95 29.3 Prime95 Linux 16 2017-08-29 18:02
Building sr1sieve for RPi wombatman Software 14 2017-03-04 16:21
Building msieve under Ubuntu 12.04 VolMike Msieve 9 2012-10-14 07:57
Help building new computer Prime95 Hardware 30 2009-09-12 05:58
Building gcc 4.4.0 CRGreathouse Software 1 2009-07-07 22:25

All times are UTC. The time now is 00:52.


Sat Jul 17 00:52:42 UTC 2021 up 49 days, 22:39, 1 user, load averages: 1.32, 1.47, 1.40

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.