Vectors test fails on AMD Ryzen 9 4900HS

Issue #2581 resolved
Zach Etienne created an issue

Vectors, after correctly finding that CCTK_REAL_VEC_SIZE is in fact 4 on this CPU, with flags:

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sme sev sev_es

segfaults on the vec_loadu_maybe[1] test in Vectors.

INFO (Vectors): Testing vectorisation... [errors may result in segfaults]
INFO (VecINFO (Vectors): Testing vectorisation... [errors may result in segfaults]
INFO (Vectors): Test vec_set1...
INFO (Vectors): Test vec_set...
INFO (Vectors): Test vec_elt[0]...
INFO (Vectors): Test vec_elt[1]...
INFO (Vectors): Test vec_elt[2]...
INFO (Vectors): Test vec_elt[3]...
INFO (Vectors): Test vec_load...
INFO (Vectors): Test vec_loadu[0]...
INFO (Vectors): Test vec_loadu[1]...
INFO (Vectors): Test vec_loadu[2]...
INFO (Vectors): Test vec_loadu[3]...
INFO (Vectors): Test vec_loadu_maybe[0]...
INFO (Vectors): Test vec_loadu_maybe[1]...
Rank 0 with PID 218092 received signal 11

After commenting out this test, the test suite runs with no problems.

Comments (7)

  1. Erik Schnetter

    This test checks whether unaligned loads are working. It is likely that there is a bug in thorn vectors where it uses an aligned load where it shouldn’t.

    This part of thorn Vectors is unused by most code. If you do not see a segfault at run time, then your code is very likely working correctly.

  2. Roland Haas

    @Zach Etienne can you grant access to the system showing the issue to Erik or I so that one could test this? Or do some debugging yourself if provided suggestions what to test?

  3. Zach Etienne reporter

    I just recompiled with the latest version of the ET on that machine. It compiled without any issues, and was able to run a few parfiles that use Vectors . Marking the ticket as Resolved.

  4. Roland Haas

    @Zach Etienne you say you can compile without issues. However looking at the issue description the problem was never a compile time problem but a runtime failure.

    Can you try and run the code? Just the testsuite for thorn Vectors should do. Something like:

    make sim-testsuite PROMPT=no CCTK_TESTSUITE_RUN_TESTS=Vectors/vectors
    

    should do. Or you can leave out the PROMPT and CCTK_TESTSUITE_RUN_TESTS options and use the interactive menu to select which tests to run.

  5. Zach Etienne reporter

    Sorry forgot to report that I ran the Vectors tests from the testsuite as well. Again no failures.

  6. Roland Haas

    RIght. Actually you did report that you could run parfiles “and was able to run a few parfiles that use Vectors “ which would have been good enough (the testsuite just runs the same self-tests for all possible architectures) but I missed that part of the sentence, sorry.

  7. Log in to comment