Is source code available?

Message boards : Number crunching : Is source code available?

To post messages, you must log in.

AuthorMessage
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 839 - Posted: 17 May 2018, 7:11:11 UTC

Hi,

I'm wondering source code for recent Amicable Numbers version v2.08 is available or not for Linux 64-bit. I found old source repository in github which supports up to 10^13.

Thanks in advance!!
Luckiest in the world!

ID: 839 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Sergei Chernykh
Project administrator
Project developer

Send message
Joined: 5 Jan 17
Posts: 534
Credit: 72,451,573
RAC: 0
   
Message 840 - Posted: 17 May 2018, 7:12:01 UTC - in response to Message 839.  

ID: 840 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 841 - Posted: 17 May 2018, 7:24:16 UTC - in response to Message 840.  

https://github.com/SChernykh/Amicable/tree/boinc-version-128-bit


Thank you for quick response!!! It'll be help me a lot!
Luckiest in the world!

ID: 841 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Sergei Chernykh
Project administrator
Project developer

Send message
Joined: 5 Jan 17
Posts: 534
Credit: 72,451,573
RAC: 0
   
Message 842 - Posted: 17 May 2018, 7:34:18 UTC - in response to Message 841.  

Thank you for quick response!!! It'll be help me a lot!

Do you have any issues with running the existing Linux binary on your system? Don't forget to make a pull request if your modifications could be useful for other users.
ID: 842 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 843 - Posted: 17 May 2018, 10:12:52 UTC - in response to Message 842.  
Last modified: 17 May 2018, 10:23:37 UTC

I don't have any issues running stock applications. I just want to optimize it with Intel compiler.

I found errors compiling with gcc 7.3.1 coming with Fedora 27 (current latest version is gcc 8.1.1 on Fedora 28).

It's in switch statement in Amicable/primesieve/src/primesieve/EratSmall.cpp, many fallthrough were seen; each "case:" statement doesn't end with "break;" and go through next "case:" statement. It is forbidden since gcc/g++ 7. In order to disable the compiler to check, I added "-Wimplicit-fallthrough=0" to WARNINGS and made a new makefile called Makefile. I don't know it's allowed by previous gcc/g++.

There is another workaround for c++11 modifying the source file, but it will fail with Visual Studio.

As for this fallthrough problem, see https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/.
Luckiest in the world!

ID: 843 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 844 - Posted: 17 May 2018, 11:34:28 UTC - in response to Message 843.  

Another small bug. I checked out boinc version and compiled. It failed to find config.h which was in boinc directory. So I added "-I ../boinc" to INCLUDES variable in Makefile.
Luckiest in the world!

ID: 844 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 845 - Posted: 17 May 2018, 12:17:00 UTC
Last modified: 17 May 2018, 12:30:10 UTC

Hi all,

I need some help!!

I compile an optimized gcc version (optimized for haswell) of amicable number, but I don't know app_info.xml for amicable numbers. I tried some, but all failed with "Syntax error in app_info.xml", because (maybe) app_name and name were wrong. Mine is as follows. What's wrong?
<app_info>
  <app>
    <name>amicable</name>
  </app>
  <file_info>
    <name>amicable</name>
    <executable/>
  </file_info>
  <app_version>
    <app_name>amicable</name>
    <version_num>208</version_num>
    <api_version>7.11.0</api_version>
    <file_ref>
      <file_name>amicable</file_name>
      <main_program/>
    </file_ref>
  </app_version>
</app_info>


I will distribute optimized linux application for cpu when it's built.

Thanks in advance!
Luckiest in the world!

ID: 845 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Sergei Chernykh
Project administrator
Project developer

Send message
Joined: 5 Jan 17
Posts: 534
Credit: 72,451,573
RAC: 0
   
Message 846 - Posted: 17 May 2018, 13:03:13 UTC - in response to Message 845.  

It says "syntax error" because you have mismatched tags:
 <app_name>amicable</name>
ID: 846 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 847 - Posted: 17 May 2018, 13:08:49 UTC - in response to Message 846.  
Last modified: 17 May 2018, 13:26:45 UTC

It says "syntax error" because you have mismatched tags:
 <app_name>amicable</name>


Thank you!! Good point. Somehow emacs didn't notify it to me. But fixing it, I still have an error message.

Thu 17 May 2018 10:05:11 PM JST | Amicable Numbers | Message from server: Unknown app name amicable in app_info.xml
Thu 17 May 2018 10:05:11 PM JST | Amicable Numbers | No tasks sent
Thu 17 May 2018 10:05:11 PM JST | Amicable Numbers | Message from server: Your app_info.xml file doesn't have a usable version of Amicable Numbers up to 10^20.


So the app_name must include info on 10^20. What app_name is set on the server, Sergei?

EDIT: I need to edit Amicable/Amicable/Platform_GCC_Linux.h so that Intel Compiler can utilize __int64. "typedef long long __int64;" gives an error with Intel compiler, so I modified it so that Intel compiler should use "#define __int64 long long". Intel compiler uses a predefined macro __INTEL_COMPILER, so #ifndef/#else/#endif were used.

And I saw http://boinc.berkeley.edu/wiki/Anonymous_platform and changed version_num to 280, but the error message was the same.
Luckiest in the world!

ID: 847 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Sergei Chernykh
Project administrator
Project developer

Send message
Joined: 5 Jan 17
Posts: 534
Credit: 72,451,573
RAC: 0
   
Message 848 - Posted: 17 May 2018, 13:28:35 UTC - in response to Message 847.  

So the app_name must include info on 10^20. What app_name is set on the server, Sergei?

app_name is amicable_10_20
ID: 848 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 849 - Posted: 17 May 2018, 13:38:58 UTC
Last modified: 17 May 2018, 13:43:24 UTC

Ok. I've done it!

Hint was in the name of work units' names. They begin with amicable_10_20, so I set it to the app_name, it worked!

But the number of cpus must be set as avg_ncpus in app_info.xml file manually. Otherwise threads of the number of cpu minus one were made.

Anyway it worked!!

Thank you for your help!

EDIT: oh! Sergei, thank you for mentioning it!

EDIT2: Intel Compiler version has only half of the original EST on my Haswell rig, but I don't know it works so nicely, because the compiler has much advantage in floating point calculations. I will test this for some days.
Luckiest in the world!

ID: 849 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Tatsuo Yamagata

Send message
Joined: 13 Nov 17
Posts: 8
Credit: 53,520,560
RAC: 0
   
Message 850 - Posted: 19 May 2018, 3:21:54 UTC

hmmmm....

I used the same task, https://sech.me/boinc/Amicable/workunit.php?wuid=5678963 in standalone mode.

The result is

Haswell (4790K, 4th gen. core i7) optimized: 41929.51 seconds.

Stock application: 42847.81 seconds.

Only difference of less than 2.5%. It can be within error!! Intel Compiler doesn't have little advantage in integer math. I will not make further and won't release optimized apps.

Sorry....
Luckiest in the world!

ID: 850 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote

Message boards : Number crunching : Is source code available?


©2024 Sergei Chernykh