log in |
Message boards : Number crunching : Compiling for AVX-512
Previous · 1 · 2 · 3 · Next
Author | Message |
---|---|
I applied for a Covid-19 research license to get the Intel compiler. Waiting to hear back. | |
ID: 2092 · Reply Quote | |
I applied for a Covid-19 research license to get the Intel compiler. Waiting to hear back. I suggest to use the latest free gcc on Linux (if you want to play with it), I cannot help you with the Intel compiler but others probably would. You may find the source code of the application here: https://bitbucket.org/francesco-asnicar/pc-boinc/ | |
ID: 2093 · Reply Quote | |
I checked and gcc comes as a default in LM 20: | |
ID: 2094 · Reply Quote | |
find the source code of the application here: https://bitbucket.org/francesco-asnicar/pc-boinc/ Thanks for that. BTW, libbz2-dev is now in the Ubuntu 20.04 repositories. Following the instructions but I don't know the lingo, e.g. what does "clone this repository in the folder BOINC_dev/boinc/samples/" mean??? I think my problem is knowing what "this" refers to. Next line, "Assuming you now have this repository inside BOINC_dev/boinc/samples/pc-boinc/" Does "this" mean this download? https://bitbucket.org/francesco-asnicar/pc-boinc/downloads/ Edit: DLed that file and extracted it. Changed folder name to pc-boinc. "you can compile it using the provided scripts inside the src folder" These scripts might as well be in Klingon. I'll look for gcc tutorials and see if I can figure out what to do next. | |
ID: 2095 · Reply Quote | |
It appears that after compiling I'll need to test it using the BOINC Anonymous Platform. https://boinc.berkeley.edu/wiki/Anonymous_platform <app_info>
<app>
<name>gene_pcim</name>
</app>
<file_info>
<name>gene_pcim_v1.10_linux64__avx512</name>
<executable/>
</file_info>
<app_version>
<app_name>gene_pcim</app_name>
<version_num>110</version_num>
<api_version>7.9.0</api_version>
<plan_class>avx512</plan_class>
<flops>5784707816.501904</flops>
<avg_ncpus>1.000000</avg_ncpus>
<file_ref>
<file_name>gene_pcim_v1.10_linux64__avx512</file_name>
<main_program/>
</file_ref>
</app_version>
</app_info> If this looks ok I'll give it a whirl.Do I need to delete the other executables and only have the avx512 executable in my project folder or will they just be ignored??? | |
ID: 2096 · Reply Quote | |
it seems to me (but I may be wrong) that you don't need to define the plan_class, instead you should define the platform (like | |
ID: 2097 · Reply Quote | |
it seems to me (but I may be wrong) that you don't need to define the plan_class, instead you should define the platform (like <platform>x86_64-pc-linux-gnu</platform>)I don't know but I think BOINC learns everything it needs about my CPU in my client_state.xml <host_info> section. When switching from regular use to anonymous platform I suggest to: wait until there are no workunits in the cache (or abort them all), exit boinc, copy the app_info.xml and the executable in the proper place (check its x bit, chmod a+x), start boinc.This is where my head starts spinning. In client_state.xml I have these 3 statements: <download_url>http://gene.disi.unitn.it/test/download/gene_pcim_v1.10_linux64__avx</download_url> <download_url>http://gene.disi.unitn.it/test/download/gene_pcim_v1.10_linux64__fma</download_url> <download_url>http://gene.disi.unitn.it/test/download/gene_pcim_v1.10_linux64__sse2</download_url> Which makes me think I have to have something like them with __avx512 to get new WUs. So I was planning on testing with WUs I already have DLed. EDIT: which compiler switch did you use? -march=skylake-avx512 ?Yes, these are the two switches I came across it seems I need: -march=skylake-avx512 -ftree-vectorize But then not all AVX-512 CPUs are Skylake. E.g., i9-10980XE is formerly known as Cascade Lake: https://ark.intel.com/content/www/us/en/ark/products/198017/intel-core-i9-10980xe-extreme-edition-processor-24-75m-cache-3-00-ghz.html Apparently they're called the Core X-series but there's not a switch for Core X. Also there's Knights Landing which I do not have. So I guess I just have to try them. If not all my AVX-512 CPUs work then I could try -march=cascadelake. There's so many switches I don't know if I need any others or not? https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html I'm still trying to figure out my questions in message 2095. I hope to focus on this today. | |
ID: 2098 · Reply Quote | |
About the 3 lines in client_state.xml: that's because your computer supports all three versions of the applications (sse2, avx, fma). BOINC tries all of them and eventually should choose the faster one. | |
ID: 2099 · Reply Quote | |
I looked at that AVX-512 list and guessed that some could be excluded, e.g. AI, neural nets & Galois Fields. Beyond that I'm willing to try them all if we have a way to test and tell them apart. But we seem to only have 4 to chose from: F, VL, DQ & BW. CD is only for Xeon Phi. I try them in this order: F, BW, DQ & VL. | |
ID: 2100 · Reply Quote | |
Ok, I edited makefile by adding: # AVX512, 64-bit
ARCH += -march=skylake-avx512 -mtune=skylake-avx512 -mavx512f -mpopcnt -maes -mpclmul -m64 -ftree-vectorize Then in a terminal I ran:/home/aurum/BOINC_dev/boinc/samples/pc-boinc/src/linux64_build.sh Lots of lines scrolled by, terminal closed and I can't find an executable. It added a link to libstdc++.a that when I try to open it says archive type not supported (I have Linux Mint 20 Ubuntu 20.04 Focal). What's next??? | |
ID: 2101 · Reply Quote | |
Regarding your previous message: You may look at this small validation suite for the gene pc-im application (a small and normal input file, with the outputs as reference). Hope it helps. | |
ID: 2102 · Reply Quote | |
The build script you were using tries first to compile the needed BOINC libraries (which is not so easy). You can skip this part by using the ones I compiled some time ago (although not the latest ones), get them from here https://gene.disi.unitn.it/test/files/boinc_libs-x32-x64.7z. After that you may move inside the pc-boinc/src directory and issue a "make" from here. I don't expect that you will be successful at the first try (the executable, if built, will land in pc-boinc/bin) Ok, I edited makefile by adding: | |
ID: 2103 · Reply Quote | |
I've been reading the 11,041 line config.log file and it keeps trying different things. I suspect part of the problem may be that when I cloned BOINC I got the dev version and not the 7.16.6 release: | |
ID: 2104 · Reply Quote | |
After reading this topic, I started reviewing the code.
After you have done that change the Makefile It seems that you are using AVX512F functions(see intel guide above) for intel skylake and icelake. If you compile the program you will see if it compiles for SSE or AVX. If it compiles for SSE add the "-mavx -mfma -mavx2 " parameters in the makefile in ARCH Compile the program and run via test_run2.sh if the results are equal you can try to run in with a larger set. Looking forward in seeing your results | |
ID: 2106 · Reply Quote | |
I suggest you first compile the program as-is.Ok, to me "as-is" means do not change anything just run it. Tried that and the only thing in ./BOINC_dev/boinc/samples/pc-boinc/bin is a.txt, a placeholder. Next, I uncommented AVX in ./pc-boinc/src/Makefile: # SSE2, 64-bit
ARCH += -march=core2 -mtune=core2 -m64
# AVX, 64-bit
#ARCH += -march=core2 -mtune=generic -msse4.2 -mpopcnt -maes -mpclmul -mavx -m64
# AVX+FMA, 64-bit
#ARCH += -march=core2 -mtune=generic -msse4.2 -mpopcnt -maes -mpclmul -mavx -mfma -m64
# AVX2+FMA, 64-bit
#ARCH += -march=core2 -mtune=generic -msse4.2 -mpopcnt -maes -mpclmul -mavx -mfma -mavx2 -m64 And still got nothing.It adds a Link to Archive: /home/aurum/BOINC_dev/boinc/samples/pc-boinc/src/libstdc++.a /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a Suspect it's trying to tell me I'm missing a library. I searched the Synaptic Package Manager (SPM) for libstdc++ and it listed 374 packages with 6 of them installed: lib32stdc++-9-dev libstdc++-9-dev libstdc++6 libstdc++6:i386 libx32stdc++-9-dev libx32stdc++6 So I installed lib32stdc++-10-dev and SNP added libstdc++-10-dev. Deleted the Link to Archive and tried again. Still got nothing and the Link to Archive is back. Any suggestions what I'm missing??? Edit: I bet if someone that knows what they're doing looked at my config.log output they could see what I need to fix or install. It's 11401 lines and has so many comments like: gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
configure:4093: $? = 0
configure:4082: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4093: $? = 1
configure:4082: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:4093: $? = 1 | |
ID: 2110 · Reply Quote | |
First thing you need to correct in your app_info is the application version. | |
ID: 2111 · Reply Quote | |
I've been reading the 11,041 line config.log file and it keeps trying different things. I suspect part of the problem may be that when I cloned BOINC I got the dev version and not the 7.16.6 release: Use the Tags branch at github. You can clone any point release of BOINC by going into the TAG tree. https://github.com/BOINC/boinc/tree/client_release/7.16/7.16.6 | |
ID: 2112 · Reply Quote | |
First thing you need to correct in your app_info is the application version.Liken unto so? <app_info>
<app>
<name>gene_pcim</name>
</app>
<file_info>
<name>gene_pcim_v6.66_linux64__avx512</name>
<executable/>
</file_info>
<app_version>
<app_name>gene_pcim</app_name>
<version_num>666</version_num>
<api_version>7.9.0</api_version>
<plan_class>avx512</plan_class>
<flops>5784707816.501904</flops>
<avg_ncpus>1.000000</avg_ncpus>
<file_ref>
<file_name>gene_pcim_v6.66_linux64__avx512</file_name>
<main_program/>
</file_ref>
</app_version>
</app_info> | |
ID: 2113 · Reply Quote | |
Yes. This is my Einstein app_info for example. <app_info>
<app>
<name>einsteinbinary_BRP4</name>
</app>
<file_info>
<name>einsteinbinary_cuda64</name>
<executable/>
</file_info>
<file_info>
<name>einsteinbinary_cuda-db.dev</name>
</file_info>
<file_info>
<name>einsteinbinary_cuda-dbhs.dev</name>
</file_info>
<file_info>
<name>libcufft.so.8.0</name>
</file_info>
<file_info>
<name>libcudart.so.8.0</name>
</file_info>
<app_version>
<app_name>einsteinbinary_BRP4</app_name>
<version_num>999</version_num>
<api_version>7.2.2</api_version>
<coproc>
<type>CUDA</type>
<count>1.0</count>
</coproc>
<file_ref>
<file_name>einsteinbinary_cuda64</file_name>
<main_program/>
</file_ref>
<file_ref>
<file_name>einsteinbinary_cuda-db.dev</file_name>
<open_name>db.dev</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>einsteinbinary_cuda-dbhs.dev</file_name>
<open_name>dbhs.dev</open_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>libcufft.so.8.0</file_name>
<copy_file/>
</file_ref>
<file_ref>
<file_name>libcudart.so.8.0</file_name>
<copy_file/>
</file_ref>
</app_version>
</app_info> | |
ID: 2114 · Reply Quote | |
Use the Tags branch at github. You can clone any point release of BOINC by going into the TAG tree.I tried to no avail. aurum@Rig-38:~$ git clone https://github.com/BOINC/boinc/tree/client_release/7.16/7.16.6 boinc
Cloning into 'boinc'...
fatal: repository 'https://github.com/BOINC/boinc/tree/client_release/7.16/7.16.6/' not found
| |
ID: 2116 · Reply Quote | |
Message boards :
Number crunching :
Compiling for AVX-512