mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   mfaktc: a CUDA program for Mersenne prefactoring (https://www.mersenneforum.org/showthread.php?t=12827)

kriesel 2023-01-16 16:13

Does there exist an mfaktc build that will work on Google Colab in either its Ubuntu 18.04 or 20.04 VM incarnations currently, which appear unpredictably, usually 18.04? I'm getting Cudart version discrepancies with 10.0, or glibc / libstdc issues with the cuda 12.0 for linux mmfsktc build, and updating 18.04 does not resolve that issue for mmff so likely won't for mfaktc.
Downloadable from the mersenne.ca mirror would be ideal.
Failing that, Colab specific build-in-situ step by step directions, that work as Colab currently is, and will be unlikely to be broken by Colab's migration in progress to Ubuntu 20.04 or other future changes.

Same goes for mmff.

kriesel 2023-01-16 17:06

[QUOTE=Mark Rose;622705]Wrong thread, ...
That being said, it's very quick to compile if nvidia-cuda-dev is installed: even on an old two core/two thread machine it takes less than 15 seconds.[/QUOTE]Oops re thread.
It would be a shame if we all had to switch to the paradigm of reinstall the necessary tools and recompile for every notebook GPU session of a few hours or less, because the Colab environment can not be trusted to remain stable from one session to another. Colab VMs are 1 core 2 HT, and when there are GPUs available, the sessions time out around 3.5 hours, so some hopefully small percentage each time to rebuild the app would be a tax on the session's productivity. (Probably under 1%) Hmm, maybe we could compile in each Colab OS version once, and save the resulting executables, and detect which to launch by the output of !cat /etc/issue in future VM sessions.
Rebuilding for different CUDA levels should not usually be necessary, both because the GPU models seem to be fairly stable on Colab or in personal gear, and because a single executable can be built to support many CC levels. CUDA 8 supported CC2.0-6.1, for example (or in other words, ancient Quadro 4000 to GTX10xx).

Mark Rose 2023-01-16 17:12

[QUOTE=kriesel;622709]Oops re thread.
It would be a shame if we all had to switch to the paradigm of reinstall the necessary tools and recompile for every notebook GPU session of a few hours or less, because the Colab environment can not be trusted to remain stable from one session to another. Colab VMs are 1 core 2 HT, and when there are GPUs available, the sessions time out around 3.5 hours, so some hopefully small percentage each time to rebuild the app would be a tax on the session's productivity. (Probably under 1%) Hmm, maybe we could compile in each Colab OS version once, and save the resulting executables, and detect which to launch by the output of !cat /etc/issue in future VM sessions.
Rebuilding for different CUDA levels should not usually be necessary, both because the GPU models seem to be fairly stable on Colab or in personal gear, and because a single executable can be built to support many CC levels. CUDA 8 supported CC2.0-6.1, for example (or in other words, ancient Quadro 4000 to GTX10xx).[/QUOTE]

18.04 probably won't last long as support ends for it at the end of April. Compiling multiple binaries seems like a simple approach.

And it's not so much the CUDA level, it's a mismatch between the driver and the library.

rebirther 2023-01-25 16:41

Some users getting:
[CODE]./mfaktc.exe: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./mfaktc.exe)[/CODE]

Is it possible to recompile on an older linux version and Glibc 2.29 or 2.31? cuda12 app is affected

ATH 2023-02-15 06:44

Mfaktc with CUDA 11.6 compiled on colab:
[URL="http://hoegge.dk/mersenne/mfaktc-CUDA11_6.zip"]mfaktc-CUDA11_6.zip[/URL]


This colab notebook downloads mfaktc and compiles it if you have your Google Drive.
It creates the folder "mfaktc-compile" and download and extracts mfaktc, the files will be in:
mfaktc-compile\mfaktc-0.21\mfaktc.exe
mfaktc-compile\mfaktc-0.21\mfaktc.ini

I did not make it correct the .ini file, but it does correct params.h to
#define GPU_SIEVE_SIZE_MAX 2047

[CODE]import subprocess
import os

from google.colab import drive

if not os.path.exists('/content/drive/My Drive'):
drive.mount('/content/drive')

%cd '/content/drive/My Drive'
!sudo mkdir mfaktc-compile
%cd mfaktc-compile
!wget https://www.mersenneforum.org/mfaktc/mfaktc-0.21/mfaktc-0.21.tar.gz
!sudo tar -xzvf mfaktc-0.21.tar.gz
!wget --user-agent="Mozilla/5.0 (Windows NT x.y; rv:10.0) Gecko/20100101 Firefox/10.0" http://hoegge.dk/mersenne/Makefile-mfaktc.txt
%cd mfaktc-0.21
%cd src
!cp '/content/drive/My Drive/mfaktc-compile/Makefile-mfaktc.txt' ./Makefile
!sed -i 's/128/2047/g' params.h
!make
[/CODE]

chalsall 2023-02-15 18:56

[QUOTE=ATH;624980]This colab notebook downloads mfaktc and compiles it if you have your Google Drive.
It creates the folder "mfaktc-compile" and download and extracts mfaktc, the files will be in...[/QUOTE]

Thank you for this. Excellent work. I will likely use this in the future.

It will help us all in the future when Google upgrades its VMs without warning us...

Not that we have any right to complain. They are giving us this compute (in exchange for observing how Humans react to a Geeky changing situation)...

storm5510 2023-03-30 00:08

[U]A long-time annoyance solved.[/U]

For several years I have had various programs fail to start and display a notification that needed file(s) are missing. [I]mfaktc[/I] among others. The missing names always began with "api." I found the solution. What they needed was the C++ redistributable libraries. The one which solved the [I]mfaktc[/I] problem on an old Windows 7 system was the 2015 edition. There are several on the M$ website.

I had given up on trying to run several things over time because of this. For whatever program needs them, they must be registered in order to be visible. Thankfully, the installer does this.

lalera 2023-04-07 23:43

2 Attachment(s)
hi,
mfaktc v0.21
12.1
this is for wagstaff

storm5510 2023-04-08 14:34

[QUOTE=lalera;628010]hi,
mfaktc v0.21
12.1
this is for wagstaff[/QUOTE]

These appear to be quite old except for the binary in "4a," going by the date stamps on the files. :ermm:

lalera 2023-04-17 22:08

[QUOTE=storm5510;628040]These appear to be quite old except for the binary in "4a," going by the date stamps on the files. :ermm:[/QUOTE]

hi,
the program is quite that old
2015feb


All times are UTC. The time now is 14:22.

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