mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Data > mersenne.ca

Reply
 
Thread Tools
Old 2019-12-08, 01:12   #276
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3×11×97 Posts
Default

Quote:
Originally Posted by snme2pm1 View Post
yet the icon that appears in web browser tabs is identical. Perhaps a different colour?
My artistic skills verge on nonexistent, but I have made a blue version of the favicon. It will start appearing as your browser cache expires.

If anyone wants to make a mersenne.ca logo of sorts, or at least a favicon, feel free to submit such.
James Heinrich is offline   Reply With Quote
Old 2019-12-08, 01:34   #277
snme2pm1
 
"Graham uses ISO 8601"
Mar 2014
AU, Sydney

241 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
My artistic skills verge on nonexistent, but I have made a blue version of the favicon. It will start appearing as your browser cache expires.

If anyone wants to make a mersenne.ca logo of sorts, or at least a favicon, feel free to submit such.
I reckoned that this subject might move to a popular vote!
Yet what is your best suitable originating material format that you might be able to sustain and further edit?
Or perhaps such notion of edit apparently seems void?
snme2pm1 is offline   Reply With Quote
Old 2019-12-08, 02:17   #278
axn
 
axn's Avatar
 
Jun 2003

4,789 Posts
Default

Generated from the front page graph using https://www.favicon-generator.org/
Zip file contains the various icons, and the png is the source image.
Here's their suggested html code:
Code:
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192"  href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
Attached Thumbnails
Click image for larger version

Name:	factor_bits_1000M_20191207.png
Views:	51
Size:	21.5 KB
ID:	21412  
Attached Files
File Type: zip 6f632f6897cab8930515d28b169a794c.ico.zip (346.7 KB, 37 views)
axn is offline   Reply With Quote
Old 2019-12-08, 19:10   #279
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3·11·97 Posts
Default

Quote:
Originally Posted by axn View Post
Generated from the front page graph
I like it.

The favicon (in all its myriad incarnations) are regenerated from the most recent graph once a week. It won't change much of course, but since I wrote the code already to generate everything it may as well be fresh.
James Heinrich is offline   Reply With Quote
Old 2019-12-10, 10:16   #280
snme2pm1
 
"Graham uses ISO 8601"
Mar 2014
AU, Sydney

241 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
I like it.
I am pleased that axn: https://www.mersenneforum.org/member.php?u=528 was so helpful.
Yet it is your choice as to what graphic to apply for such icon generation purposes.
Perhaps the top portion is unwanted noise.
Perhaps the line graph might be more exaggerated so as to not be muted at low resolution.

Anyhow you now have a multicolour flag with slightly lifted left edges...
What will Aaron consider in response?

PS: Appoligies, s/Arron/Aaron/

Last fiddled with by snme2pm1 on 2019-12-10 at 10:42 Reason: Apoligies to Aaron for spelling
snme2pm1 is offline   Reply With Quote
Old 2019-12-10, 15:49   #281
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

6A016 Posts
Default

Back to business, even if only for a little while.

Some of you may be aware that I converted my HP workstation to Ubuntu 19.10 so I can learn how to use it, a little. I will skip the the rest of the story here.

I finally managed to get a CUDA10 variant of mfaktc to run. It just needed a library update.

I have been feeding it, mfaktc, by hand by doing manual downloads from James' request page. I studied his bash script. I lot of what was in there was relative to using a RAM drive. With this in mind, I removed all the code relative to using one. Being an antique programmer, it did not take me long to understand the flow.

First off, the /bin/bash folder only appears as a link to another location. So I changed that part. Wget and curl were already on my system. Only curl needed an update. Doing some searching on the web, I found the proper file name extension. I called my greatly modified script mfa.sh. The web page said to compile it like so:

Code:
chmod +x mfa.sh
It preceded without any errors. I try to run it:

Code:
./mfa.sh
It returns this:

Code:
bash: ./mfa.sh: /home/norman/mfaktc/^M: bad interpreter: No such file or directory
Using the full path name: ./home/norman/mfaktc/mfa.sh returns basically the same.

The path above is what I put in the first line of the script. The script is in the same folder as mfaktc. The only part of this I am not sure about is the "LD_LIBRARY_PATH" statement. The location does not seem correct. The Wget argument appears basically similar to the one in my Windows batch file, so I replaced it with mine. I left the original as a reference comment.

The script is below so if anyone spots anything, please comment.

Code:
#!/home/norman/mfaktc/
# Simple bash file to automatically retrieve TF >1000M worktodo from mersenne.ca
# and submits results back. Should be called in your mfaktc working directory.
# Will loop infinitely, submitting results and getting more work as needed.
# Requires Wget: sudo apt-get install wget
# Requires cURL: sudo apt-get install curl
#
# To exit: 1) Press ctrl-C once while mfaktc is running
#          2) Press ctrl-C once while script is sleeping 10 seconds before downloading more work
#          3) Do not press ctrl-C otherwise. It could be dangerous for your work.


# Work fetch options
#TFLimit=69
#maxAssignments=10
#useRAMDisk=0

if [ $? -eq 0 ]
then
    echo "mfaktc is already running, exiting"
    sleep 30
    exit
fi

trap "echo received signal \"SIGINT\"$'\n'script will exit once the results are sent." SIGINT
while true
do
    LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ./mfaktc.exe # Use your command for mfaktc

    if [ -s worktodo.txt ]; then break; fi

    echo "mfaktc has run out of work or ^C was pressed!. Downloading more work in 5 seconds"
    sleep 5

    [ $? -eq 130 ] && break

    if [ -e results.txt ]
    then
        echo "Sending results to mersenne.ca"
        echo $(date '+%d/%m/%Y %H:%M:%S') >> ~/mfaktc-results-submitted.log
        curl --form "results_file=@results.txt" https://www.mersenne.ca/bulk-factors.php >> ~/mfaktc-results-submitted.log
        if  [ $? -ge 1 ]
        then
            echo "cURL failed"
            break
        fi
        cat results.txt >> ~/mfaktc-results-submitted.txt
        rm results.txt
    fi

    echo "Retrieving worktodo from mersenne.ca"
    # wget "https://www.mersenne.ca/tf1G.php?download_worktodo=1&tf_limit=$TFLimit&max_assignments=$maxAssignments&biggest=0" -O - >> worktodo.txt
    wget "https://www.mersenne.ca/tf1G.php?download_worktodo=1&tf_min=68&tf_limit=69&min_exponent=3400000000&max_exponent=3409999999&max_assignments=50&biggest=0" -O - >> worktodo.txt

done
storm5510 is offline   Reply With Quote
Old 2019-12-10, 16:53   #282
chris2be8
 
chris2be8's Avatar
 
Sep 2009

79C16 Posts
Default

Have you been editing it on Windows? The ^M looks like the CR from the Windows default CRLF line ending (UNIX uses just a LF).

The first line should point to the interpreter you want to run the script. In most of my bash scripts it's:
Code:
#!/bin/bash
So if /home/norman/mfaktc/ is a directory you would be telling it to run a file called ^M in that directory. Which probably doesn't exist.

Chris
chris2be8 is online now   Reply With Quote
Old 2019-12-10, 17:49   #283
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

32408 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
Have you been editing it on Windows? The ^M looks like the CR from the Windows default CRLF line ending (UNIX uses just a LF).

The first line should point to the interpreter you want to run the script. In most of my bash scripts it's:
Code:
#!/bin/bash
So if /home/norman/mfaktc/ is a directory you would be telling it to run a file called ^M in that directory. Which probably doesn't exist.

Chris

Actually, I did edit it on Windows using Notepad++. It has the ability to change the coding. So, I changed it, and placed /bin/bash back. It now appears to run. The script is exiting where $? -eq 0 is. I am guessing this is sometime of command line parameter. I do not know what this needs to be.
storm5510 is offline   Reply With Quote
Old 2019-12-10, 21:58   #284
nordi
 
Dec 2016

3·13 Posts
Default

Quote:
Originally Posted by storm5510 View Post
The script is exiting where $? -eq 0 is.
The "$?" gets replaced with the exit code of the previous command. An exit code of "0" indicates that the program ran successfully.

Doing this as the very first command seems quite pointless. Maybe this code was checking the outcome of a command that you removed while editing the file?
nordi is offline   Reply With Quote
Old 2019-12-10, 22:03   #285
PhilF
 
PhilF's Avatar
 
Feb 2005
Colorado

2×32×31 Posts
Default

Quote:
Originally Posted by nordi View Post
The "$?" gets replaced with the exit code of the previous command. An exit code of "0" indicates that the program ran successfully.

Doing this as the very first command seems quite pointless. Maybe this code was checking the outcome of a command that you removed while editing the file?
And to add to that answer, the -eq means "equals".
PhilF is online now   Reply With Quote
Old 2019-12-11, 00:43   #286
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
U.S.A.

169610 Posts
Default

Quote:
Originally Posted by nordi View Post
The "$?" gets replaced with the exit code of the previous command. An exit code of "0" indicates that the program ran successfully.

Doing this as the very first command seems quite pointless. Maybe this code was checking the outcome of a command that you removed while editing the file?
I commented the section, recompiled, and it is running they way it should, from what I see.

It is placing its results save files in the folder above:

Code:
cat results.txt >> ~/mfaktc-results-submitted.txt
I changed it to this:

Code:
cat results.txt >> ~/mfaktc/mfaktc-results-submitted.txt
A log file was also being created in the same location. I changed its path to point to the program folder, like above. I imagine James made this rather generic because of not knowing what anyone's folder structure would be. Perhaps he can elaborate on his usage of catching an exit code at the top. Now that I know what it is, it seems this would only be useful in calling the script from another process and passing it the code.

This HP is not my primary computer, which means I can leave it run for days, or weeks, if I wanted to. It would only be periodically necessary to change the exponent request range. I changed this part because the GPU in the HP is rather slow.
storm5510 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Small inconsistencies between mersenne.org and mersenne.ca factor databases GP2 mersenne.ca 44 2016-06-19 19:29
mersenne.ca (ex mersenne-aries.sili.net) LaurV mersenne.ca 8 2013-11-25 21:01
Gaussian-Mersenne & Eisenstein-Mersenne primes siegert81 Math 2 2011-09-19 17:36
Mersenne Wiki: Improving the mersenne primes web site by FOSS methods optim PrimeNet 13 2004-07-09 13:51

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

Fri Dec 4 18:14:41 UTC 2020 up 1 day, 14:25, 0 users, load averages: 1.25, 1.38, 1.52

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.