Thread 'Linux Application'

Questions and Answers : Unix/Linux : Linux Application
Message board moderation

To post messages, you must log in.

AuthorMessage
Deleted user12

Send message
Joined: 24 Dec 24
Posts: 1
Credit: 0
RAC: 0
Message 9 - Posted: 23 Dec 2024, 5:18:23 UTC

Is there going to be a Linux application in the future?

Conan
ID: 9 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 10 - Posted: 23 Dec 2024, 6:36:42 UTC - in response to Message 9.  

In reply to Conan's message of 23 Dec 2024:
Is there going to be a Linux application in the future?

Conan

Will appear if you tell me how to compile PARI/GP for Linux.

Maybe termit knows this.
But it still has problems running on Windows.
ID: 10 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 11 - Posted: 23 Dec 2024, 11:10:18 UTC
Last modified: 23 Dec 2024, 11:10:34 UTC

I found a quote from Demis

Для винды - да.
Для линукса - я уже много раз писал что, это немного хитрее.
И нужно смотреть как сделать для линукса стандалоне версию...
(просто для винды она УЖЕ сделана)

See
https://boinc.termit.me/adsl/forum_thread.php?id=74&postid=759
ID: 11 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 12 - Posted: 23 Dec 2024, 11:23:45 UTC
Last modified: 23 Dec 2024, 11:24:45 UTC

And one more quote from Demis

Повторюсь еще раз:
С боинк-клиентами так не получится (не важно какая система).
Они должны получать готовое приложение.
Со всеми внедренными библиотеками.

Это обязательное условие, т.к. на клиенте может оказаться такая библиотека,
но не той версии под которую написано приложение.
Одна из них это gmp (на ней-же основана и primesieve, на которой работает приложение SPT).
Это объяснял еще в июле кажется.

При сборке pari/gp потребуется обновление gmp.
И это проблема.
Напоминаю, что в июле 2023 устанавливал на сервер pari/gp.
Он обновил все модули gmp.

По этой причине полетела вся сборка по SPT и не только само приложение,
но и ассимилятор, и прочие программы, что необходимы для нормальной работы проекта.

Было потрачено 3 или 4 дня,
чтобы найти все хвосты "от неправильной" (то есть другой) версии
и вернуть все в рабочее состояние.

See
https://boinc.termit.me/adsl/forum_thread.php?id=74&postid=764
ID: 12 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
fzs600

Send message
Joined: 30 Dec 24
Posts: 4
Credit: 309,164
RAC: 11,913
Message 16 - Posted: 30 Dec 2024, 6:57:59 UTC - in response to Message 9.  

In reply to Deleted user12's message of 23 Dec 2024:
Is there going to be a Linux application in the future?

Conan

yes, now that the project is open to the public, we're waiting for a linux application.
ID: 16 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
entity

Send message
Joined: 31 Dec 24
Posts: 19
Credit: 5,889,248
RAC: 74,439
Message 22 - Posted: 31 Dec 2024, 3:19:02 UTC - in response to Message 10.  
Last modified: 31 Dec 2024, 3:35:03 UTC

In reply to Natalia Makarova's message of 23 Dec 2024:
In reply to Conan's message of 23 Dec 2024:
Is there going to be a Linux application in the future?

Conan

Will appear if you tell me how to compile PARI/GP for Linux.

Maybe termit knows this.
But it still has problems running on Windows.

The PARI/GP site has instructions for compiling and running on Linux. When I worked with you before (assuming this is the same application) there was another program (symtuples.exe) required that was written specifically for Windows that needed to be re-written for Linux. PARI/GP itself works fine on Linux.

See:
I compiled the PARI/GP program for Linux and started running ...test_4 through ...test_11 simultaneously on one of my larger systems. the ...test_6 program ended after 7 hours. Programs 4,5,7,8,9,11 continue to run (11 hours so far).
Here is the output from the results_6.txt file:

[logfile is "results_6.txt"]
0 from number
0 to � number
[0,6,12,30,42,72,90,96,120,126,132,156,162,180,210,222,240,246,252]
patterns length 19
557940830126698960967415390 period
search in 0 (0.E-19) - 557940830126698960967415390 (5.6 E26)
central 3: [120,126,132]
prove by 71#: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]
3822059520 formulae to generate
201210320071817509379420161: [0, 6, 40, 42, 70, 76, 90, 96, 118, 126, 132, 162, 178, 196, 198, 210, 222, 246, 252]
valids=8
number form=423734170

268710736779238753759355131: [0, 6, 12, 18, 42, 48, 72, 106, 120, 126, 130, 156, 162, 196, 198, 210, 246, 250, 252]
valids=9
number form=771145973

520185588494747469608998897: [0, 6, 10, 16, 36, 42, 76, 90, 96, 126, 132, 156, 180, 184, 210, 222, 232, 246, 252]
valids=9
number form=1190255518
ID: 22 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 23 - Posted: 31 Dec 2024, 7:29:40 UTC

entity
Thanks.
I remember that.

I think termit will try to make a Linux app when it finishes launching Windows.
ID: 23 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 79 - Posted: 23 Jan 2025, 1:08:33 UTC

Dear project participants!

termit needs help to launch the Application for Linux.

Who can help, please write a PM to me or termit.
ID: 79 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 108 - Posted: 3 Feb 2025, 3:43:00 UTC

Dear project participants!

Let's think together how to launch the Application for Linux.

Here's what we need.

1. The gp.exe program, which should work in Linux.

We take this program from the official page
https://pari.math.u-bordeaux.fr/download.html

2. A working program that performs calculations.

This program is published here
https://boinc.mak.termit.me/odlk2025/forum_thread.php?id=13&postid=52

3. A program that runs the gp.exe program and monitors its execution.

The code for this program in C++ is published here
https://boinc.progger.info/odlk/forum_thread.php?id=290&postid=14671

All these programs need to be adapted for Linux.

Who can help termit?

Maybe you have some thoughts.
Please share
ID: 108 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 126 - Posted: 6 Feb 2025, 14:19:39 UTC

I wrote here
https://gaiaathome.eu/gaiaathome/forum_thread.php?id=100

Please, recommend other projects where the Linux Application works (if you participate in these projects and know well how they work).
I will write there too.
Maybe someone will respond.
ID: 126 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 127 - Posted: 7 Feb 2025, 13:39:21 UTC

ID: 127 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 130 - Posted: 11 Feb 2025, 11:34:49 UTC
Last modified: 13 Feb 2025, 9:00:06 UTC

ID: 130 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 141 - Posted: 20 Feb 2025, 14:31:08 UTC
Last modified: 20 Feb 2025, 14:33:51 UTC

entity wrote
When I worked with you before (assuming this is the same application) there was another program (symtuples.exe) required that was written specifically for Windows that needed to be re-written for Linux.

Yes, that's the most important thing!

The program we need now is the same, the code for this program is published here
https://boinc.progger.info/odlk/forum_thread.php?id=290&postid=14671

entity
can you rewrite this code for Linux?

Maybe someone else can?
The TBEG BOINC project maintains the database
https://boinc.tbrada.eu/spt/explore.php
ID: 141 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 145 - Posted: 21 Feb 2025, 6:15:26 UTC
Last modified: 21 Feb 2025, 6:29:33 UTC

I asked a colleague from Italy about gp.exe for Linux.

He replied

I just find that pari/gp is officually in Ubuntu:
https://installati.one/install-pari-gp-ubuntu-20-04/

so one can download the linux executable with

sudo apt -y install pari-gp

termit
perhaps this will be useful to you.
The TBEG BOINC project maintains the database
https://boinc.tbrada.eu/spt/explore.php
ID: 145 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 147 - Posted: 25 Feb 2025, 5:57:28 UTC

My colleague from Italy Stefano Tognon rewrote the SymTuples.cpp program for Linux.

I publish this code

#include <iostream>
#include <assert.h>
#include <ctime>
#include <cstdio>
#include <cstring>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>

using namespace std;

#define CHECKPOINT_FILENAME "checkpoint.txt"
#define POLL_PERIOD 1.0

#define INPUT_FILENAME "in"
#define OUTPUT_FILENAME "out"

int read_checkpoint(int& percent_completed, double& cpu_time) {
    int nt;
    double c;

    percent_completed = 0;
    cpu_time = 0;

    FILE* f = fopen(CHECKPOINT_FILENAME, "r");
    if (!f) return -1;  // ERR_FOPEN equivalent
    int n = fscanf(f, "%d %lf", &nt, &c);
    fclose(f);
    if (n != 2) return 0;
    percent_completed = nt;
    cpu_time = c;
    return 0;
}

void write_checkpoint(int percent_completed, double cpu_time) {
    FILE* f = fopen(CHECKPOINT_FILENAME, "w");
    if (!f) return;
    fprintf(f, "%d %f\n", percent_completed, cpu_time);
    fclose(f);
}

int start_process_gp() {
    fprintf(stderr, "\nStarting child process 'gp' and waiting until process exits.\n");
    fprintf(stderr, "Command line : %s\n", "gp spt.txt");

    pid_t pid = fork();
    if (pid == -1) {
        perror("fork failed");
        return 1;
    }

    if (pid == 0) {
        // Child process
        execlp("gp", "gp", "spt.txt", (char*)NULL);  // Execute the command
        perror("execlp failed");
        return 1;
    } else {
        // Parent process
        int status;
        waitpid(pid, &status, 0);  // Wait for the child process to terminate

        if (WIFEXITED(status)) {
            fprintf(stderr, "Process gp finished with exit code %d.\n", WEXITSTATUS(status));
        } else {
            fprintf(stderr, "Process gp terminated abnormally.\n");
            return 1;
        }
    }

    return 0;
}

int main(int argc, char* argv[]) {
    int retval = 0;

    // Placeholder for BOINC options and status (adjust if needed for Linux)
    // In Linux, we might need to replace BOINC initialization code with an appropriate API for Linux
    // e.g., use the BOINC client tools in the Linux environment if required.

    retval = start_process_gp();
    if (retval) {
        fprintf(stderr, "Error starting process gp. Exiting.\n");
        return retval;
    }

    fprintf(stderr, "Program completed.\n");
    return 0;
}


The colleague then compiled an executable program from this code.
After that, he ran the test on Linux.
The test was successful.
The TBEG BOINC project maintains the database
https://boinc.tbrada.eu/spt/explore.php
ID: 147 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileNatalia Makarova
Volunteer moderator
Project scientist
Avatar

Send message
Joined: 24 Dec 24
Posts: 259
Credit: 4,975,592
RAC: 30,870
Message 148 - Posted: 25 Feb 2025, 6:00:37 UTC
Last modified: 25 Feb 2025, 6:07:39 UTC

I hope all this will help termit to run the Linux Application.

termit
If you have any more questions, please write to me.

I sent you an archive that a colleague sent me.
The archive contains the source code of the SymTuplesLinux.cpp program and the executable program.

The working program spt.txt does not change.
The TBEG BOINC project maintains the database
https://boinc.tbrada.eu/spt/explore.php
ID: 148 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote

Questions and Answers : Unix/Linux : Linux Application

©2025 Natalia Makarova and Co