mersenneforum.org > Data mersenne.ca
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

2019-12-08, 01:12   #276
James Heinrich

"James Heinrich"
May 2004
ex-Northern Ontario

3,361 Posts

Quote:
 Originally Posted by snme2pm1 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.

2019-12-08, 01:34   #277
snme2pm1

"Graham uses ISO 8601"
Mar 2014
AU, Sydney

241 Posts

Quote:
 Originally Posted by James Heinrich 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?

2019-12-08, 02:17   #278
axn

Jun 2003

7·709 Posts

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">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
Attached Thumbnails

Attached Files
 6f632f6897cab8930515d28b169a794c.ico.zip (346.7 KB, 60 views)

2019-12-08, 19:10   #279
James Heinrich

"James Heinrich"
May 2004
ex-Northern Ontario

1101001000012 Posts

Quote:
 Originally Posted by axn 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.

2019-12-10, 10:16   #280
snme2pm1

"Graham uses ISO 8601"
Mar 2014
AU, Sydney

241 Posts

Quote:
 Originally Posted by James Heinrich 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

 2019-12-10, 15:49 #281 storm5510 Random Account     Aug 2009 2×971 Posts 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
 2019-12-10, 16:53 #282 chris2be8     Sep 2009 2×1,021 Posts 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
2019-12-10, 17:49   #283
storm5510
Random Account

Aug 2009

2·971 Posts

Quote:
 Originally Posted by chris2be8 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. 2019-12-10, 21:58 #284 nordi Dec 2016 71 Posts Quote:  Originally Posted by storm5510 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? 2019-12-10, 22:03 #285 PhilF Feb 2005 Colorado 617 Posts Quote:  Originally Posted by nordi 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".

2019-12-11, 00:43   #286
storm5510
Random Account

Aug 2009

79616 Posts

Quote:
 Originally Posted by nordi 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.

 Similar Threads Thread Thread Starter Forum Replies Last Post GP2 mersenne.ca 44 2016-06-19 19:29 LaurV mersenne.ca 8 2013-11-25 21:01 siegert81 Math 2 2011-09-19 17:36 optim PrimeNet 13 2004-07-09 13:51

All times are UTC. The time now is 12:29.

Fri May 14 12:29:57 UTC 2021 up 36 days, 7:10, 0 users, load averages: 1.51, 1.40, 1.40