SSE3 optimization and Android binary
log in

Advanced search

Message boards : Number crunching : SSE3 optimization and Android binary

Author Message
manalog
Send message
Joined: 5 Oct 15
Posts: 33
Credit: 1,098,442
RAC: 0
Italy
Message 1743 - Posted: 3 Apr 2020, 16:33:06 UTC
Last modified: 3 Apr 2020, 16:36:35 UTC

Hi all,
I tried to compile "pc" using SSE3 instruction in order to run it on Core2 processor. The results of the test run do not seem exciting:

WITH SSE3 bin/pc input/tile.txt output/output.txt 0.05 1 393 0 Loading: 0.164 computeStandardDeviations: 0.001 computeCorrelations: 0.350 pcAlgorithm, l 0: 0.013 pcAlgorithm, l 1: 0.698 pcAlgorithm, l 2: 0.349 pcAlgorithm, l 3: 0.046 pcAlgorithm, l 4: 0.015 pcAlgorithm, l 5: 0.004 pcAlgorithm, l 6: 0.001 pcAlgorithm, l 7: 0.000 pcAlgorithm, l 8: 0.000 I file output/output.txt e output/ref_output.txt sono identici WITHOUT SSE3 bin/pc input/tile.txt output/output.txt 0.05 1 393 0 Loading: 0.167 computeStandardDeviations: 0.001 computeCorrelations: 0.374 pcAlgorithm, l 0: 0.013 pcAlgorithm, l 1: 0.691 pcAlgorithm, l 2: 0.355 pcAlgorithm, l 3: 0.048 pcAlgorithm, l 4: 0.015 pcAlgorithm, l 5: 0.004 pcAlgorithm, l 6: 0.001 pcAlgorithm, l 7: 0.000 pcAlgorithm, l 8: 0.000 I file output/output.txt e output/ref_output.txt sono identici WITHOUT SSE3 bin/pc input/tile2.txt output/output2.txt 0.05 1 2470 0 Loading: 0.354 computeStandardDeviations: 0.001 computeCorrelations: 0.083 pcAlgorithm, l 0: 0.001 pcAlgorithm, l 1: 0.026 pcAlgorithm, l 2: 0.440 pcAlgorithm, l 3: 3.057 pcAlgorithm, l 4: 6.627 pcAlgorithm, l 5: 7.104 pcAlgorithm, l 6: 5.675 pcAlgorithm, l 7: 3.771 pcAlgorithm, l 8: 3.020 pcAlgorithm, l 9: 1.796 pcAlgorithm, l 10: 1.053 pcAlgorithm, l 11: 0.550 pcAlgorithm, l 12: 0.270 pcAlgorithm, l 13: 0.098 pcAlgorithm, l 14: 0.029 pcAlgorithm, l 15: 0.006 pcAlgorithm, l 16: 0.001 pcAlgorithm, l 17: 0.000 pcAlgorithm, l 18: 0.000 I file output/output2.txt e output/ref_output2.txt sono identici WITH SSE3: bin/pc input/tile2.txt output/output2.txt 0.05 1 2470 0 Loading: 0.229 computeStandardDeviations: 0.001 computeCorrelations: 0.086 pcAlgorithm, l 0: 0.001 pcAlgorithm, l 1: 0.027 pcAlgorithm, l 2: 0.445 pcAlgorithm, l 3: 3.089 pcAlgorithm, l 4: 6.959 pcAlgorithm, l 5: 7.226 pcAlgorithm, l 6: 5.636 pcAlgorithm, l 7: 3.744 pcAlgorithm, l 8: 2.985 pcAlgorithm, l 9: 1.796 pcAlgorithm, l 10: 1.055 pcAlgorithm, l 11: 0.556 pcAlgorithm, l 12: 0.272 pcAlgorithm, l 13: 0.104 pcAlgorithm, l 14: 0.031 pcAlgorithm, l 15: 0.007 pcAlgorithm, l 16: 0.001 pcAlgorithm, l 17: 0.000 pcAlgorithm, l 18: 0.000 I file output/output2.txt e output/ref_output2.txt sono identici


Actually, it looks that the version of pc provided by Tn-grid, although it only supports SSE2, runs like the version I compiled for SSE3 using
-march=core2 -mtune=core2 -m64 -msse3 -mssse3
. Should I leave the idea to optimize "pc" for SSE3 or there is some option I can add to achieve some tangible improvement?

I take the occasion to ask someone more experienced than me if it is easy to compile pc for Android-x86_64 and Android-arm. I would like to do it and of course I would give the binary to anyone if I succeed. I compiled the android toolchain from the boinc package but then I do not know in which way should I modify the "make" file in the pc-boinc source to point to the android libraries and compiler instead of the standard g++ compiler. Sorry for my confusion but I am not a programmer, I just wanted to make a tentative in order to crunch Tn-grid's WUs on Android devices too. Considered that it looks like a very easy task for someone who know how to do it: is there any volunteer who wants to compile tn-grid for Android instead of me? Or perhaps suggesting me the needed steps? I think it could be of great value for the whole community!

Profile valterc
Project administrator
Project tester
Send message
Joined: 30 Oct 13
Posts: 624
Credit: 34,677,535
RAC: 0
Italy
Message 1746 - Posted: 3 Apr 2020, 17:11:08 UTC - in response to Message 1743.

The optimized versions (SSE2, AVX, FMA) of the application were built not only by giving the right directives to the compiler but also by writing some specific assembly code. Nevertheless the obtained speed gain was relatively small. The dramatic speed increase relative to the first version was mainly obtained by cleverly rewriting the source code. It seems to me that, because of the 'intrinsic' nature of our code, SIMD optimizations are not *very* useful.

Having a Android version of the application would be really fine. The application uses little RAM so it should fit, but I'm completely ignorant about Android development....

manalog
Send message
Joined: 5 Oct 15
Posts: 33
Credit: 1,098,442
RAC: 0
Italy
Message 1747 - Posted: 3 Apr 2020, 17:32:44 UTC
Last modified: 3 Apr 2020, 17:36:12 UTC

Ok so regarding the SIMD optimization I'll remain stick to the package provided by the server. It's fine as long as I am using my (slow) cpu efficiently.

Regarding Android, I think it is very easy for anyone with a clue on programming. I'm a complete newbie and nonetheless I was close to success only by following the official guide. I compiled the android_tc and and boinc libraries only by copying the commands. The problem was with the final step, that is, compiling "pc". I stopped just because the script provided by Boinc assumes that your app has a configure script, while "pc" has only a script that calls g++ and make and I do not know how to fix this, but just because I am ignorant: I recognize that it just matter of typing the right commands (calling the c++ compiler from the android toolchain) ;)
I can work on that by studying the procedure, but if you want take a look at it before I spend time just learning the basics.

This is the script:

#!/bin/sh set -e # # See: http://boinc.berkeley.edu/trac/wiki/AndroidBuildApp # # Script to compile a generic application on Android export ANDROID_TC="${ANDROID_TC:-$HOME/android-tc}" export ANDROIDTC="${ANDROID_TC_X86:-$ANDROID_TC/x86}" export TCBINARIES="$ANDROIDTC/bin" export TCINCLUDES="$ANDROIDTC/i686-linux-android" export TCSYSROOT="$ANDROIDTC/sysroot" export STDCPPTC="$TCINCLUDES/lib/libstdc++.a" export PATH="$TCBINARIES:$TCINCLUDES/bin:$PATH" export CC=i686-linux-android-gcc export CXX=i686-linux-android-g++ export LD=i686-linux-android-ld export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE" export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -O3 -fomit-frame-pointer -fPIE" export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie" export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include" make clean if [ -e "./configure" ]; then ./configure --host=i686-linux --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-shared --enable-static fi make

all the files called by the script are created by other scripts included in the directory.[/code]

Dotsch
Send message
Joined: 4 Nov 17
Posts: 8
Credit: 223,157
RAC: 0
Message 1771 - Posted: 14 Apr 2020, 16:43:52 UTC - in response to Message 1747.

Eventually, we can try to compile it together? I have some expiriance with BOINC and BOINC science project porting to several platforms. But no Android device available and also less expiriance with Android.

I stopped just because the script provided by Boinc assumes that your app has a configure script, while "pc" has only a script that calls g++ and make and I do not know how to fix this, but just because I am ignorant: I recognize that it just matter of typing the right commands (calling the c++ compiler from the android toolchain) ;)

Am I understood you right, that you was able to comile the BOINC API and Library and the liniking of the "pc" binary produce errors?

For the macOS application, I have copied it to boinc/samples/tngrid, compiled it there.

On errors on the link stage (in the tngrid direcetroy), can you please issue a "gmake -n" to see the command which be issued for the linking of "pc".

Profile [B@P] Daniel
Volunteer developer
Send message
Joined: 19 Oct 16
Posts: 90
Credit: 2,205,103
RAC: 0
Poland
Message 1780 - Posted: 17 Apr 2020, 20:29:27 UTC

I built Android apps in the past, here is link to my post with more details: http://gene.disi.unitn.it/test/forum_thread.php?id=158&postid=905#905

I did this by taking crosscompiler from Android NDK and connected it to existing Makefiles used for building project app. I found these makefles. Here are important parts of them:

From Makefile for 32-bit Android app:

ARCH += -march=armv7-a -mtune=cortex-a7 -mfpu=vfpv4 -mfloat-abi=softfp LDFLAGS += -Wl,--fix-cortex-a8 PIE ?= 0 $(info Using PIE=$(PIE)) ifeq ($(PIE),1) CFLAGS += -fPIE LDFLAGS += -fPIE -pie BOINC_DIR = ../../_boinc32pie/ else LDFLAGS += -fno-PIE -no-pie BOINC_DIR = ../../_boinc32nonpie/ endif TOOLPATH = ../../$(TOOLDIR) CFLAGS = --sysroot=c:/tn-grid/android/_arm32/sysroot/ -DANDROID -DDECLARE_TIMEZONE -Ic:/tn-grid/android/_arm32/include/c++/4.9.x/arm-linux-androideabi/ LDFLAGS = --sysroot=c:/tn-grid/android/_arm32/sysroot/ CC = ../../_arm32/bin/arm-linux-androideabi-gcc CXX = ../../_arm32/bin/arm-linux-androideabi-g++


From Makefile for 64-bit Android app:

CFLAGS = --sysroot=c:/tn-grid/android/_arm64/sysroot/ -DANDROID -DANDROID_64 -DDECLARE_TIMEZONE -fPIE LDFLAGS = --sysroot=c:/tn-grid/android/_arm64/sysroot -fPIE -pie CC = ../../_arm64/bin/aarch64-linux-android-gcc CXX = ../../_arm64/bin/aarch64-linux-android-g++ BOINC_DIR = ../../_boinc64/


I used these Makefiles from Cygwin. I hope that this will help you.

In Makefile for 32-bit app I has to use -mfloat-abi=softfp instead of -mfloat-abi=hard. This was required by Android. You can check if is is possible now, otherwise app will be slower than corresponding ARM Linux app.
____________

manalog
Send message
Joined: 5 Oct 15
Posts: 33
Credit: 1,098,442
RAC: 0
Italy
Message 1789 - Posted: 19 Apr 2020, 12:56:41 UTC

Thank you for your hints, Daniel.
I tried to go further in the compilation. Please keep in mind that I am an absolute beginner in the field so it is possible that I am doing silly mistakes.
What I've done:
1) Downloaded the android-r21 ndk. I think they changed something from the older version, in particular the compiler binary;
2) Compiled boinc for android-arm using the scripts provided in the source tree. The script compiled also an android toolkit (android-tc) and everything went smooth (and very fast despite I am using just a Core2Duo laptop)
3) I modified the Makefile present in PC-IM source tree using your suggestion:

# 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 # 32-bit, no SIMD #ARCH += -m32 -mno-sse # SSE2, 32-bit #ARCH += -march=core2 -mtune=core2 -m32 # AVX, 32-bit #ARCH += -march=core2 -mtune=generic -msse4.2 -mpopcnt -maes -mpclmul -mavx -m32 # AVX+FMA, 32-bit #ARCH += -march=core2 -mtune=generic -msse4.2 -mpopcnt -maes -mpclmul -mavx -mfma -m32 #--- nuovo --- ARCH += -march=armv7-a -mtune=cortex-a7 -mfpu=vfpv4 -mfloat-abi=softfp LDFLAGS += -Wl,--fix-cortex-a8 #PIE ?= 0 #$(info Using PIE=$(PIE)) #ifeq ($(PIE),1) #CFLAGS += -fPIE #LDFLAGS += -fPIE -pie #BOINC_DIR = ../../_boinc32pie/ #else LDFLAGS += -fno-PIE -no-pie BOINC_DIR = /home/matteo/Software/boinc #endif #TOOLPATH = ../../$(TOOLDIR) CFLAGS = --sysroot=/home/matteo/Software/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/sysroot/ -DANDROID -DDECLARE_TIMEZONE -Ic:"/home/matteo/Software/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/include/c++/4.9.x/" LDFLAGS = --sysroot=/home/matteo/Software/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/sysroot/ CC = /home/matteo/Software/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/clang CXX = /home/matteo/Software/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ #--- vecchio --- #CC ?= gcc #CXX ?= g++ #ARCH += -march=core2 -mtune=core2 -m64 -msse3 -mssse3 #BOINC_DIR ?= ../../.. BOINC_API_DIR ?= $(BOINC_DIR)/api BOINC_LIB_DIR ?= $(BOINC_DIR)/lib BOINC_ZIP_DIR ?= $(BOINC_DIR)/zip BOINC_LIBS ?= $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a ifdef BOINC_STUB BOINC_DIR = ../boinc_stub BOINC_LIBS = endif FREETYPE_DIR = /usr/include/freetype2 CPPFLAGS += -I$(BOINC_DIR) -I$(BOINC_LIB_DIR) -I$(BOINC_API_DIR) -I$(BOINC_ZIP_DIR) -I$(FREETYPE_DIR) -Isimd #CFLAGS += -c -O3 $(ARCH) -Wall -Wextra -pedantic -Werror $(VARIANTFLAGS) -MMD -MP #CXXFLAGS += $(CFLAGS) -std=gnu++11 #LDFLAGS += $(ARCH) -L/usr/X11R6/lib -L. LIBS ?= -static-libgcc -static-libstdc++ -pthread -Wl,-Bstatic -lbz2 CXXSOURCES = BoincFile.cpp Graph.cpp boinc_functions.cpp utility.cpp pc.cpp main.cpp CSOURCES = erf.c OBJECTS = $(CXXSOURCES:.cpp=.o) $(CSOURCES:.c=.o) EXECUTABLE = ../bin/pc all: $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) $(CXX) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBS) $(BOINC_LIBS) .cpp.o: $(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ clean: rm -rf ../bin/$(EXECUTABLE) *.o *~ *.d .PHONY: all clean -include $(CXXSOURCES:.cpp=.d) $(CSOURCES:.c=.d)


Unfortunately, this does not work because it misses a "config.h" file needed by "parse.h":
/home/matteo/Software/boinc/lib/parse.h:26:10: fatal error: 'config.h' file not found

This is weird because I am using the official source tree of boinc and it should be error free.
Daniel, do you still have the binary you compiled? Perhaps they are still valuable and we don't have to re-do the work again ;) They are no longer present in the archived you linked in your old post.

manalog
Send message
Joined: 5 Oct 15
Posts: 33
Credit: 1,098,442
RAC: 0
Italy
Message 1790 - Posted: 19 Apr 2020, 12:57:10 UTC
Last modified: 19 Apr 2020, 12:57:49 UTC

double post

Profile [B@P] Daniel
Volunteer developer
Send message
Joined: 19 Oct 16
Posts: 90
Credit: 2,205,103
RAC: 0
Poland
Message 1791 - Posted: 19 Apr 2020, 17:32:20 UTC

Yes, this is known issue in BOINC. You need to manually copy config.h file from boinc source root dir to InstallPath/include/boinc after installing all files. Or if you use files from directly from boinc build dir, add /home/matteo/Software/boinc/ to include paths.

You can also modify this parse.h to use #include "../config.h".
____________

manalog
Send message
Joined: 5 Oct 15
Posts: 33
Credit: 1,098,442
RAC: 0
Italy
Message 1792 - Posted: 19 Apr 2020, 19:11:28 UTC - in response to Message 1791.

I tried all day, but I am not able to do it. Now I receive

BoincFile.cpp:22:18: fatal error: string: No such file or directory #include <string> ^ compilation terminated. Makefile:79: recipe for target 'BoincFile.o' failed make: *** [BoincFile.o] Error 1
and this is weird because string.h is a basic C++ library.

I give up the idea, I hope that someone more experienced than me may do it.
In case, my only suggestion is to build for all the possible platforms: once you are able to compile it's a matter of minutes to compile for several platforms, and it would be an added value to tn-grid. For example, in this moment no projects are able to run on android-x86. [/code]

Jan Vaclavik
Send message
Joined: 7 Apr 20
Posts: 2
Credit: 57,748
RAC: 0
Czech Republic
Message 1809 - Posted: 28 Apr 2020, 9:41:03 UTC - in response to Message 1746.

The optimized versions (SSE2, AVX, FMA) of the application ...

Somewhat off-topic, but are there any plans to add Windows FMA app?
It would not impact my computer, but at least some of those Windows machines currently running AVX app should be able to benefit, right?

Profile valterc
Project administrator
Project tester
Send message
Joined: 30 Oct 13
Posts: 624
Credit: 34,677,535
RAC: 0
Italy
Message 1810 - Posted: 28 Apr 2020, 11:14:25 UTC - in response to Message 1809.
Last modified: 17 May 2020, 9:33:10 UTC

The optimized versions (SSE2, AVX, FMA) of the application ...

Somewhat off-topic, but are there any plans to add Windows FMA app?
It would not impact my computer, but at least some of those Windows machines currently running AVX app should be able to benefit, right?

We had problems with v1.10 Windows FMA version (mainly for AMD cpus, early bioses) so we decided not to build it when switching to v1.11, also the speed increase was minimal (in some cases the AVX version performed better). I may try to rebuild it and put it on beta, have to think about it.

Juanro49
Avatar
Send message
Joined: 27 Apr 20
Posts: 17
Credit: 115,528
RAC: 0
Spain
Message 1831 - Posted: 16 May 2020, 22:11:41 UTC

Hi!

I'm try to compile an Android binary but I have this error when manually build TN-Grid executable

This is my build script https://bin.disroot.org/?efa76485d88e614e#2uMR2WgifRtYuFyW8vEfHdEU56N5NYDnz87wsk4sQTzd

And my app Makefile https://bin.disroot.org/?7ab51c427cb1f791#BqdC6EUshq1wLLWEKHp3UW4hz6tzsCirxxmP68t3Vt8C

[/url]
____________
Consulta como ver TV y leer noticias desde tu movil en una sola app con FeedTV.
Apoya la investigación desde esta imagen

Profile [B@P] Daniel
Volunteer developer
Send message
Joined: 19 Oct 16
Posts: 90
Credit: 2,205,103
RAC: 0
Poland
Message 1832 - Posted: 17 May 2020, 7:26:06 UTC - in response to Message 1831.

It looks that bzip2 library was build with -D_FORTIFY_SOURCE, which is not supported by glibc on Android. You need to rebuild bzip2 with this flag disabled. Here is related question on StackOverflow:
https://stackoverflow.com/questions/22977898/android-4-4-undefined-reference-to-printf-chk
____________

Juanro49
Avatar
Send message
Joined: 27 Apr 20
Posts: 17
Credit: 115,528
RAC: 0
Spain
Message 1834 - Posted: 17 May 2020, 15:27:50 UTC - in response to Message 1832.

It looks that bzip2 library was build with -D_FORTIFY_SOURCE, which is not supported by glibc on Android. You need to rebuild bzip2 with this flag disabled. Here is related question on StackOverflow:
https://stackoverflow.com/questions/22977898/android-4-4-undefined-reference-to-printf-chk


Thanks, I build bzip2 and make with compiled lib and work fine!!

/home/juanro/StudioProjects/boinc-android/src/boinc/samples/pc-boinc/bin/pc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, with debug_info, not stripped


Now, how can I test this binary to view that ir work fine?
____________
Consulta como ver TV y leer noticias desde tu movil en una sola app con FeedTV.
Apoya la investigación desde esta imagen

manalog
Send message
Joined: 5 Oct 15
Posts: 33
Credit: 1,098,442
RAC: 0
Italy
Message 1835 - Posted: 17 May 2020, 17:29:42 UTC - in response to Message 1834.

You have to put in the project's director an app_info.xml file with the name of your executable and then restart boinc.
https://boinc.berkeley.edu/wiki/Anonymous_platform
let us know if everything goes fine!

Then, if your procedure worked, you could explain all the passage you've done so that we will be able to compile also for arm32.
Did you compile the app with some extension? (ex. NEON, PIE)

Juanro49
Avatar
Send message
Joined: 27 Apr 20
Posts: 17
Credit: 115,528
RAC: 0
Spain
Message 1838 - Posted: 17 May 2020, 19:39:52 UTC - in response to Message 1835.

You have to put in the project's director an app_info.xml file with the name of your executable and then restart boinc.
https://boinc.berkeley.edu/wiki/Anonymous_platform
let us know if everything goes fine!

Then, if your procedure worked, you could explain all the passage you've done so that we will be able to compile also for arm32.
Did you compile the app with some extension? (ex. NEON, PIE)


Thanks! I try this and for the moment it works fine!!




Definitive build script android64_build.sh https://bin.disroot.org/?cae7d50e268c2abd#4VXpES87gfvQFgW7QkHnCG5fyCTumuKC3hMYofNGPY2R
Definitive makefile https://bin.disroot.org/?81265057234777a3#9tJmVrkUwAWRc5dVyrFQf49LRj5sWDcwo4nZAV8pYZK8 (optimiced for cortex a53, you can change for other -mtune value defined in https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/AArch64-Options.html#aarch64-feature-modifiers)

I try this steps:


____________
Consulta como ver TV y leer noticias desde tu movil en una sola app con FeedTV.
Apoya la investigación desde esta imagen

Profile [B@P] Daniel
Volunteer developer
Send message
Joined: 19 Oct 16
Posts: 90
Credit: 2,205,103
RAC: 0
Poland
Message 1844 - Posted: 18 May 2020, 17:07:28 UTC - in response to Message 1835.

You have to put in the project's director an app_info.xml file with the name of your executable and then restart boinc.
https://boinc.berkeley.edu/wiki/Anonymous_platform
let us know if everything goes fine!

Then, if your procedure worked, you could explain all the passage you've done so that we will be able to compile also for arm32.
Did you compile the app with some extension? (ex. NEON, PIE)

AARCH64 apps for Android always are PIE and have NEON enabled.
____________

Juanro49
Avatar
Send message
Joined: 27 Apr 20
Posts: 17
Credit: 115,528
RAC: 0
Spain
Message 1845 - Posted: 18 May 2020, 20:32:16 UTC

Hi all!

now, I sucessfully compile a 32 bits armv7-a version



I will try to test if it works well on my Ifive mini 4. http://gene.disi.unitn.it/test/show_host_detail.php?hostid=58688

Definitive build script android32_build.sh https://bin.disroot.org/?8a895f9191fe1cdd#AN1MyMVoqv2t7x9dKQ4z7VHYVCvj4LEe44uggQ1PzZqU
Definitive makefile https://bin.disroot.org/?981945d91a0f2297#4VCRaZHSEQei5DNYjWAccQ97AiGkxbevXed82dxxyeHu (optimiced for cortex a17, with neon-vfpv4, you can change for other -mtune value defined in https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/ARM-Options.html#ARM-Options)

Regarding the 64-bit version, at the moment it works well on my Huawei Nova with boinc in termux http://gene.disi.unitn.it/test/show_host_detail.php?hostid=58688
____________
Consulta como ver TV y leer noticias desde tu movil en una sola app con FeedTV.
Apoya la investigación desde esta imagen

manalog
Send message
Joined: 5 Oct 15
Posts: 33
Credit: 1,098,442
RAC: 0
Italy
Message 1883 - Posted: 7 Jul 2020, 13:37:23 UTC - in response to Message 1845.

Hi,
I have compiled an optimized version of the app for my cpu, an Intel Xeon L5420. I got a good increase in performance: the running time passed from an average of 25500 seconds to 19500.

I have used these flags for GCC:

ARCH += -march=native -mtune=native -Ofast -fprofile-use -fno-signed-zeros -fno-trapping-math -frename-registers -funroll-loops


I compiled the application twice:
first time I used -fprofile-generated and ran the application for a while; it generated some .gcda files in the src directory: these files are profile files that enable to further optimize the binary, in order to have it very tailored to your system.
So the second step was to use -fprofile-use in order to use the gcda files previously generated. Actually I didn't created very good profile files, I just ran four or five times the very rapid tests included in the source tree.

I'd like to share this binary with you: https://drive.google.com/file/d/1nGfHSGxbS3QXKp8dIPIqGh5HyJLeRn4g/view?usp=sharing

I have seen several hosts using cpu similar to mine on this project, so other users could use it to increase credit and science ;)

Falconet
Send message
Joined: 21 Dec 16
Posts: 105
Credit: 3,092,711
RAC: 0
Portugal
Message 1898 - Posted: 17 Jul 2020, 11:39:34 UTC - in response to Message 1883.

Nice,

Hope it can be brought to the official app list.
____________


Post to thread

Message boards : Number crunching : SSE3 optimization and Android binary


Main page · Your account · Message boards


Copyright © 2024 CNR-TN & UniTN