sim-universal-construction icon indicating copy to clipboard operation
sim-universal-construction copied to clipboard

Run the ".run_all.sh" file, get stuck, and don't execute any further.

Open cxk1686 opened this issue 3 years ago • 11 comments

Hello, I have a question I would like to ask you: that is, when I run ".run_all.sh", I encountered a stuck phenomenon. Excuse me, how should this be resolved? thanks I am using an ARM64 system with a raspberry pi.

pi@raspberrypi:/opt/sim-universal-construction $ cat /proc/cpuinfo
processor	: 0
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 1
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 2
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 3
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

Hardware	: BCM2835
Revision	: d03141
Serial		: 10000000ad931999
Model		: Raspberry Pi Compute Module 4 Rev 1.1
root@raspberrypi:/opt/sim-universal-construction# . run_all.sh 
Executing activesetbench.run (1/32) ...Done
Executing ccqueuebench.run (2/32) ...Done
Executing ccstackbench.run (3/32) ...Done
Executing ccsynchbench.run (4/32)

cxk1686 avatar Aug 16 '22 01:08 cxk1686

@cxk1686 Thanks for reporting this. Could you give more details about the Linux distro that you are using? Is a 64-bit distro or a 32-bit? Moreover, please check if validate.sh runs successfully or not.

nkallima avatar Aug 18 '22 08:08 nkallima

@cxk1686 Thanks for reporting this. Could you give more details about the Linux distro that you are using? Is a 64-bit distro or a 32-bit? Moreover, please check if validate.sh runs successfully or not.

@nkallima hello, When I run the validate.sh file, I also get stuck.

root@raspberrypi:/opt/sim-universal-construction# . validate.sh 
Compiling the sources...						[ PASS ]

Validating for   1 thread(s)
============================
Validating ccsynchbench.run     					[ PASS ]
Validating dsmsynchbench.run    					[ PASS ]
Validating hsynchbench.run      					[ PASS ]
Validating oscibench.run        					[ PASS ]
Validating simbench.run         					[ PASS ]
Validating fcbench.run          					[ PASS ]
Validating oyamabench.run       					[ PASS ]
Validating mcsbench.run         					[ PASS ]
Validating clhbench.run         					[ PASS ]
Validating pthreadsbench.run    					[ PASS ]
Validating fadbench.run         					[ PASS ]
Validating ccstackbench.run     					[ PASS ]
Validating clhstackbench.run    					[ PASS ]
Validating dsmstackbench.run    					[ PASS ]
Validating hstackbench.run      					[ PASS ]
Validating oscistackbench.run   					[ PASS ]
Validating simstackbench.run    					[ PASS ]
Validating fcstackbench.run     					[ PASS ]
Validating ccqueuebench.run     					[ PASS ]
Validating clhqueuebench.run    					[ PASS ]
Validating dsmqueuebench.run    					[ PASS ]
Validating hqueuebench.run      					[ PASS ]
Validating osciqueuebench.run   					[ PASS ]
Validating simqueuebench.run    					[ PASS ]
Validating fcqueuebench.run     					[ PASS ]
Validating lcrqbench.run        					[ PASS ]
Validating clhhashbench.run     					[ PASS ]
Validating dsmhashbench.run     					[ PASS ]

Validating for   2 thread(s)
============================
Validating ccsynchbench.run

I am using a 64 bit system with raspberry pi.

Raspberry Pi OS with desktop
Release date: April 4th 2022
System: 64-bit
Kernel version: 5.15
Debian version: 11 (bullseye)
Size: 757MB
Show SHA256 file integrity hash:
[Release notes](https://downloads.raspberrypi.org/raspios_arm64/release_notes.txt)
root@raspberrypi:/home/pi# cat /proc/version
Linux version 5.15.32-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022

Thanks

cxk1686 avatar Aug 22 '22 01:08 cxk1686

@cxk1686, thanks for the additional info.

Unfortunately, I currently do not have access to a raspberry PI board. Thus, I'm not able to reproduce this. However, it seems that ccsynchbench.run does not finish its execution for 2 or more threads. Could you please check if there is any other benchmark that behaves similarly, e.g. dsmsynchbench.run, fadbench.run, etc? You could execute any benchmark by running ./build/bin/benchmark_binary.run -t 2', where benchmark_binary.run is the binary of the benchmark and -t` is the argument for controlling the number of threads.

Cheers

nkallima avatar Aug 24 '22 08:08 nkallima

@cxk1686, thanks for the additional info.

Unfortunately, I currently do not have access to a raspberry PI board. Thus, I'm not able to reproduce this. However, it seems that ccsynchbench.run does not finish its execution for 2 or more threads. Could you please check if there is any other benchmark that behaves similarly, e.g. dsmsynchbench.run, fadbench.run, etc? You could execute any benchmark by running ./build/bin/benchmark_binary.run -t 2', where benchmark_binary.run is the binary of the benchmark and -t` is the argument for controlling the number of threads.

Cheers

@edatsika OK, I will try it, but I changed the RUNS_PER_THREAD=100000 in the validate.h file to a smaller value, such as RUNS_PER_THREAD=800, and the file runs successfully.

Thanks

cxk1686 avatar Aug 24 '22 09:08 cxk1686

I changed the value of SYNCH_RUNS and made it smaller, and run_all.sh ran successfully. Excuse me, does this mean that my test environment configuration is low?

cxk1686 avatar Aug 28 '22 06:08 cxk1686

@cxk1686,

Try to increase RUNS_PER_THREAD in small relatively steps, (for example, doubling its value in every step). In case that your system is slow, the validation test would need more time to finish in each test. In case that there is some race, then the validation test may fail to finish its execution even in short tests.

nkallima avatar Aug 29 '22 07:08 nkallima

@cxk1686,

Try to increase RUNS_PER_THREAD in small relatively steps, (for example, doubling its value in every step). In case that your system is slow, the validation test would need more time to finish in each test. In case that there is some race, then the validation test may fail to finish its execution even in short tests.

ok, i'll try what you said, thanks a lot, cheers.

cxk1686 avatar Aug 30 '22 23:08 cxk1686

Hello @cxk1686,

Today, I got access to a Raspbian aarch64 on a Pi3. It seems that validate.sh and run_all.sh finish their execution without any errors.

From your /proc/cpuinfo report, I see that you are running on a BCM2835, which is a 32-bit processor?

nkallima avatar Aug 31 '22 19:08 nkallima

@nkallima I checked, the CPU of this Raspberry Pi is 64-bit.

Processors
SOC/Package Information	
ARM Cortex-A72 r0p3 (AArch64)	1500.00 MHz
ARM Cortex-A72 r0p3 (AArch64)	1500.00 MHz
ARM Cortex-A72 r0p3 (AArch64)	1500.00 MHz
ARM Cortex-A72 r0p3 (AArch64)	1500.00 MHz

cxk1686 avatar Sep 06 '22 09:09 cxk1686

@cxk1686 Thanks for the reply,

Unfortunately, I do not have access to any A72 machine. Any more progress or info about running the scripts with smaller values for the RUNS_PER_THREAD.

nkallima avatar Sep 16 '22 07:09 nkallima

@cxk1686
I recently had the opportunity to test the framework on a Raspberry Pi. Please take a look at version 3.3.0 of the code, available at v3.3.0. Although this version is still under development, we have addressed several bugs specifically related to machines with a weak memory model, such as the Raspberry Pi.

nkallima avatar Apr 16 '24 10:04 nkallima

Release https://github.com/nkallima/sim-universal-construction/releases/tag/v3.3.0 seems to solve these problems at least for me.

nkallima avatar Dec 04 '24 11:12 nkallima