mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2017-02-08, 23:55   #12
nordi
 
Dec 2016

73 Posts
Default

@paulunderwood: I worked around the -lgcc_s problem you had. Remove the " -Wl,-no_pie" option from the makefile. It seems "ld" only has "-pie", not "-no_pie".
nordi is offline   Reply With Quote
Old 2017-02-09, 00:59   #13
nordi
 
Dec 2016

73 Posts
Default

I have a pretty well-automated version now: To build PFGW with Docker, get and extract the sources of PFGW. In the directory with the sources, create a Dockerfile with this content:
Code:
FROM gcc
RUN apt-get update && apt-get install -y libgmp-dev wget unzip

RUN mkdir /usr/src/mprime && \
    cd /usr/src/mprime && \ 
    # openpfgw insists on version 28.6
    wget -O mprime.zip --quiet https://www.mersenne.org/ftp_root/gimps/p95v286.source.zip && \
    # unzip produces some warnings and therefore has exit code 1.
    unzip mprime.zip ; \
    rm mprime.zip
RUN cd /usr/src/mprime/gwnum && \
    make -j -f make64

COPY . /usr/src/openpfgw
WORKDIR /usr/src/openpfgw
RUN cp /usr/lib/x86_64-linux-gnu/libgmp.a packages/gmp/64bit/
RUN cp /usr/src/mprime/gwnum/gwnum.a packages/gwnum/64bit/gwnum.a
RUN sed -i 's/-Wl,-no_pie//g' makefile

RUN make -j
Run "docker build -t pfgw ." (mind the dot at the end) to build a new image. Then "docker run -it pfgw" to start a container with that image. The executable is at /usr/src/openpfgw/pfgw64 and it actually works.

This assumes "#include <ctype.h>" fix to PFGW is already applied.
nordi is offline   Reply With Quote
Old 2017-02-09, 01:59   #14
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,739 Posts
Default

Thanks for the tips, nordi

Incidentally, I added gwset_num_threads ( &gwdata, 4 ); to every line with gwinit2(&gwdata, sizeof(gwhandle), (char *) GWNUM_VERSION); and got a multi-threaded PFGW working at 300% on my Haswell 4770k. Good for speedy proofs, but not so good for overall number-crunching throughput
paulunderwood is offline   Reply With Quote
Old 2017-02-09, 11:31   #15
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

23×3×5×72 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Thanks for the tips, nordi

Incidentally, I added gwset_num_threads ( &gwdata, 4 ); to every line with gwinit2(&gwdata, sizeof(gwhandle), (char *) GWNUM_VERSION); and got a multi-threaded PFGW working at 300% on my Haswell 4770k. Good for speedy proofs, but not so good for overall number-crunching throughput
It is more efficient the larger the FFT. There would be people using it if this feature was added to the main source. Please do rouge.
A larger fft can fit in the L3 cache with 1x4threads than 4x1threads
henryzz is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
(Open)PFGW 32 bit linux Rincewind Software 0 2016-03-10 09:18
PFGW latest well-tested version mdettweiler Conjectures 'R Us 109 2010-09-29 20:20
Linux newpgen pfgw llr jasong Linux 10 2008-02-16 23:55
src2414 how to compile 64 bit in Linux Unregistered Software 1 2005-08-22 13:19
How to Compile mprime Under Linux Blaise Pascal Software 12 2005-01-13 14:40

All times are UTC. The time now is 08:34.


Sat Jul 17 08:34:53 UTC 2021 up 50 days, 6:22, 1 user, load averages: 1.19, 1.42, 1.47

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.