This file contains some common problems/questions regarding Qsieve and provides answers and hints to solve them. Q: Question/Problem A: Answer/Solution --------------------------------------------------------------------------- Q1: We have problems to compile on Cygwin! A: - Have you tried ./configure to create a makefile? - if "./configure && make && make install" doesn't work, try "./configure" from inside the package directory. Edit "Makefile.sample" and try "make -f Makefile.sample" Q2: Where does Qsieve place its files? A: By default, persistent files are placed in the current working directory, and temporary files are placed in "/tmp". These values can be changed in the configuration file. If an environment variable "QSIEVE_CFG" is defined, then the file given there is used as configuration file. If no such environment variable exists, then "qsieve.cfg" in the current working directory will be used. If no configuration file is found, then a warning message is emitted. Q3: Binaries have been successfully compiled on Cygwin/Linux, but they do not function properly! A: For Qsieve versions < 3.0: first check, whether a "/tmp" directory exists. If not, create a folder named "/tmp" and try again. (see also Q2) If the problem still exists, then you may have compiled the wrong binaries for your computer. There are many different optimization levels triggered by the makefile. Optimization is done at compile-time to gain maximum performance. For example, if "3D-Now!" instructions are enabled, then the resulting binaries will only run on computers which do support "3D-Now!" instructions. You can either try to compile a more generic version of the binaries or you compile different versions for each machine. Please keep also in mind, that static binaries are linked against the GMP-library that was provided at compile-time. In most cases this should be no problem (except for performance reasons). But if you link against tuned versions of GMP, then the resulting binaries are machine-dependent. Q4: After upgrading to Cygwin 1.5.11-1, Qsieve fails to work properly! A: - see http://www.mail-archive.com/cygwin@cygwin.com/msg44295.html try to upgrade Cygwin to a newer version or -- at least -- upgrade your cygwin.dll to a recent snapshot. Q5: [obsolete for Qsieve-3.0] Qsieve client aborts with a message, saying that "opening communication_stream "/tmp/... failed" or that "communication stream is in error state". Why this? What to do? A: First check, whether a "/tmp" directory exists. If not, create a folder named "/tmp" and try again. (see also Q2) Does the problem still exist? -- My guess is, that the client was connected via Internet and not via LAN. If this assumption is correct, then most probably the connection was temporarily broken. If IP-addresses change during data transfers, such errors/failures are detected (but not resolved). Restart the client manually, or preferable, write a tiny script: 1. call client 2. wait 2 minutes 3. check, whether connection to server can be established 4. on success: goto 1. Additionally you can monitor periodically the state of the client. On Linux you can use a cronjob for this task. If the client is idle for too long, kill it and trigger a restart. Take a look to the ./contrib directory for such scripts. Q6: I want to setup a Qsieve status webpage under the apache httpd-2.0.x / http-2.2.x webserver. How to do this under Linux? A: - first ensure, that APACHE and PHP are installed - php should be compiled with gd and png support - then switch to the directory, where the apache "http.conf" is located - edit http.conf - restart the apache daemon for example: ------------ if host.conf has the following entries ... AddType application/x-httpd-php .php NameVirtualHost *:80 DocumentRoot /place-where-qsieve-is-installed/share/qsieve/html ServerName qsieve DirectoryIndex qsieve-status.php ... and the /etc/hosts has an entry like "127.0.0.3 qsieve" then the webservice is locally available under "http://qsieve/" whenever a Qsieve server is up and running. If you define additionally in qsieve.cfg: "XMLStatusFile = /place-where-qsieve-is-installed/share/qsieve/html/status.xml" then a logfile of the latest factorizations is shown whenever the Qsieve server cannot be connected. (Since the webinterface directory might be a read-only location, you may have to move the webinterface to another place or edit the php-script.) Q7: Qsieve segfaults on SuSE 9.0! A: If you have compiled a statically linked version of Qsieve using "gcc version 3.3.1 (SuSE Linux)", then most probably broken exception handling is causing the segmentation fault. You can try using dynamic linking: "./configure --enable-shared" or use another compiler version. (see also: http://gcc.gnu.org/ml/gcc-help/2004-04/msg00069.html) Q8: I get compile errors like "mpz_wrapper.H: error: ambiguous overload for 'operator<<'". What to do? A: See the README file, it contains info about how to compile Qsieve! Newer versions of GMP have already C++-support. You may need to modify the "gmp.h" header file to allow QSIEVE to use its own I/O-functions: The std::ostream& operator<< declarations must be deactivated; simply replace the following line (near the operator<< declarations) #ifdef __cplusplus by #if defined(__cplusplus) && !defined(USER_GMP_WRAP) and everyone is happy again... For gmp-4.1.2 to gmp-4.2.2 you can also proceed as follows: 1. cp gmp.h gmp.h.orig 2. patch gmp.h < gmp.h.patch Q9: The compiler complains about "error: register specified for 'XMM6' isn't suitable for data type"! A: Most probably you have forgotten to tell the compiler to allow SSE instructions. You can do that by specifying appropriate CPUFLAGS in the Makefile. Either use "-march=", where is pentium3, pentium4, athlon-xp (or any other architecture that supports SSE), or by specifying "-msse" or "-msse2". Q10: My compiler doesn't accept "-march=athlon-64". How can I compile SSE2 support anyway? A: You can try to specify "-march=athlon-xp -msse2" instead of "-march=athlon-64". For gcc-3.2.x and gcc-3.3.x this should work. Newer releases of gcc should accept "-march=athlon-64". For other compilers I don't know... Q11: I have started the Qsieve server on my Cygwin system. I have started a net-client on another computer, but it cannot connect to the server! What is wrong? A: First, please check, whether a local net-client can connect to you local Qsieve server [-> see README for the setup]. If this works, does the external net-client use the correct IP address? Also, don't forget to open tcp port 12364 on your Windows firewall, so that the external client is allowed to connect to the server. (The ports for Qsieve are hard-coded in the binaries, you can look up the source file "qsieve-fwd.H" for the actual values.) Q12: Does Qsieve support 64bit systems? A: Up to version 3.01, 64 bit systems were only supported in generic mode, which is ugly slow compared to optimized 32-bit builds. For Qsieve >=3.02 there is now 64bit inline assembler support for X86_64 systems which should work at least for Athon-64 systems. A few benchmarks (Qsieve-3.02) on ubuntu-amd64 7.04 have shown, that server and ecm run faster in 64 bit mode, whereas sieving is slightly slower than in 32 bit mode. The reason for this is adapted 32 bit inline assembler code, which has not yet been optimized for 64 bit. Q13: I am using a dual-core system. How to proceed? A: To gain maximum performance, you should start one net-client per core. When performing ecm with fft-continuation, the memory consuming part of ecm may be locked via named semaphores to gain optimal processing speed (Qsieve>=3.02). See also Q14. Q14: I got an error message about named semaphores. What's this about? A: For Qsieve>=3.02, named semaphores are used to ensure that the Qsieve clients enter memory consuming routines mutual exclusively. But there may be a few problems: a) If you get an error message, that creation of a named semaphore has failed under Linux, then you should check that there exists a virtual filesystem mounted under /dev/shm. (refer man-page sem_overview) b) If a client has locked the semaphore and gets killed before releasing it, then all other clients are locked. There is a tool in the contrib subdirectory, which you can use to clear the semaphore. Under Linux you can also proceed as follows: - check, where the /dev/shm is mounted (mount | grep /dev/shm) - check for named semaphores (eg. [shm-dir]/sem.qsieve_gigs_of_mem) - delete the semaphore (rm [shm-dir]/sem.qsieve_gigs_of_mem) Q15: Any hints for speeding up disk access? A: You may use a fast usb-stick for accessing the DynamicRelationsFile. If you decide to use ext3 filesystem, using the following mount options may probably gain additional performance: noatime, commit=60, data=writeback Q16: There are compiling errors concerning the gmp-library in conjunction with Qsieve when using gcc-4.3 (experimental). Is there a way to circumvent these errors? A: As a preliminary patch, please edit gmp.h under /usr/include (or wherever your gmp.h header file resides). Search for the following lines: --- snap --- #if defined (__cplusplus) extern "C" { using std::FILE; #endif --- snap --- and replace "std::FILE;" by "::FILE;". This should work; but since -- at the time of writing this -- gcc-4.3 is under development, this may or may not work for you. Q17: How to install Qsieve 3.01/3.02 on Ubuntu? A: On ubuntu amd-64 7.04 I have no problems to compile qsieve-3.01. (Except that the 64bit version of qsieve-3.01 is ugly slow.) In synaptic package manager, search for "g++" and install g++, libstdc++6 and libstdc++6-4.1-dev. Also search for "libgmp" and install libgmp3c2, libgmp3-dev and libgmpxx4. I'm not sure whether this is the complete list of dependencies, but I hope so. Dependencies for other versions, e.g. Qsieve-3.02 on Ubuntu 7.10 should be similar.