Hi! On Tue, 21 Oct 2014 21:13:23 +0400, Ilya Verbin <iver...@gmail.com> wrote: > This patchset would contain target-specific things to support offloading to > the > devices with Intel MIC architecture. > Particularly: mkoffload tool, liboffloadmic library and a plugin for libgomp.
By chance (when tracking down a different problem), I've found the following. Would you please check whether that's a real problem in liboffloadmic, or its libgomp plugin, or just a mis-diagnosis by Valgrind? $ build-gcc/gcc/xgcc -Bbuild-gcc/gcc/ source-gcc/libgomp/testsuite/libgomp.fortran/examples-4/e.55.2.f90 -Bbuild-gcc/x86_64-unknown-linux-gnu/./libgomp/ -Bbuild-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs -Ibuild-gcc/x86_64-unknown-linux-gnu/./libgomp -Isource-gcc/libgomp/testsuite/../../include -Isource-gcc/libgomp/testsuite/.. -Binstall/offload-x86_64-intelmicemul-linux-gnu/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0 -Binstall/offload-x86_64-intelmicemul-linux-gnu/bin -fopenmp -Bbuild-gcc/x86_64-unknown-linux-gnu/./libgomp/../libquadmath/.libs/ -O0 -Bbuild-gcc/x86_64-unknown-linux-gnu/./libgomp/../libgfortran/.libs -fintrinsic-modules-path=build-gcc/x86_64-unknown-linux-gnu/./libgomp -Lbuild-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs -Lbuild-gcc/x86_64-unknown-linux-gnu/./libgomp/../libquadmath/.libs/ -Lbuild-gcc/x86_64-unknown-linux-gnu/./libgomp/../libgfortran/.libs -lgfortran -lm -g $ LD_LIBRARY_PATH=.:build-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../liboffloadmic/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../liboffloadmic/plugin/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libstdc++-v3/src/.libs:install/offload-x86_64-intelmicemul-linux-gnu/lib64:install/offload-x86_64-intelmicemul-linux-gnu/lib:build-gcc/gcc:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libgfortran/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libquadmath/.libs:.:build-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../liboffloadmic/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../liboffloadmic/plugin/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libstdc++-v3/src/.libs:install/offload-x86_64-intelmicemul-linux-gnu/lib64:install/offload-x86_64-intelmicemul-linux-gnu/lib:build-gcc/gcc:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libgfortran/.libs:build-gcc/x86_64-unknown-linux-gnu/./libgomp/../libquadmath/.libs: valgrind ./a.out ==21327== Memcheck, a memory error detector ==21327== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==21327== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==21327== Command: ./a.out ==21327== ==21327== Syscall param write(buf) points to uninitialised byte(s) ==21327== at 0x5686340: __write_nocancel (syscall-template.S:81) ==21327== by 0x6AFC5C8: COIPipelineRunFunction@@COI_1.0 (coi_host.cpp:798) ==21327== by 0x68D942A: _ZN6Engine7computeERKSt4listB5cxx11IP9coibufferSaIS2_EEPKvtPvtjPK8coieventPSA_ (offload_engine.cpp:424) ==21327== by 0x68DED45: OffloadDescriptor::compute() (offload_host.cpp:2934) ==21327== by 0x68E64F8: OffloadDescriptor::offload(char const*, bool, VarDesc*, VarDesc2*, int, void const**, int, void const**, int, void const*) (offload_host.cpp:2191) ==21327== by 0x68D8D10: offload_offload_wrap(OffloadDescriptor*, char const*, int, int, VarDesc*, VarDesc2*, int, void const**, void const**, int, void const*) (compiler_if_host.cpp:259) ==21327== by 0x68D8E19: __offload_offload1 (compiler_if_host.cpp:281) ==21327== by 0x66B5387: offload(char const*, unsigned long, int, char const*, int, VarDesc*, VarDesc2*) [clone .constprop.24] (libgomp-plugin-intelmic.cpp:168) ==21327== by 0x54716C7: gomp_init_device (target.c:628) ==21327== by 0x5471E0D: GOMP_target_data (target.c:750) ==21327== by 0x400E6F: vec_mult_ (e.55.2.f90:38) ==21327== by 0x4011C9: MAIN__ (e.55.2.f90:55) ==21327== Address 0x62ce6a2 is 18 bytes inside a block of size 72 alloc'd ==21327== at 0x4C2AB80: malloc (vg_replace_malloc.c:292) ==21327== by 0x68DD278: OffloadDescriptor::setup_misc_data(char const*) (offload_host.cpp:2060) ==21327== by 0x68E64D8: OffloadDescriptor::offload(char const*, bool, VarDesc*, VarDesc2*, int, void const**, int, void const**, int, void const*) (offload_host.cpp:2179) ==21327== by 0x68D8D10: offload_offload_wrap(OffloadDescriptor*, char const*, int, int, VarDesc*, VarDesc2*, int, void const**, void const**, int, void const*) (compiler_if_host.cpp:259) ==21327== by 0x68D8E19: __offload_offload1 (compiler_if_host.cpp:281) ==21327== by 0x66B5387: offload(char const*, unsigned long, int, char const*, int, VarDesc*, VarDesc2*) [clone .constprop.24] (libgomp-plugin-intelmic.cpp:168) ==21327== by 0x54716C7: gomp_init_device (target.c:628) ==21327== by 0x5471E0D: GOMP_target_data (target.c:750) ==21327== by 0x400E6F: vec_mult_ (e.55.2.f90:38) ==21327== by 0x4011C9: MAIN__ (e.55.2.f90:55) ==21327== by 0x401200: main (e.55.2.f90:56) ==21327== ==21327== Invalid read of size 4 ==21327== at 0x6AFD808: COIProcessLoadLibraryFromMemory@COI_2.0 (coi_host.cpp:1168) ==21327== by 0x68D9146: Engine::load_libraries() (offload_engine.cpp:243) ==21327== by 0x68DA269: Engine::init() (offload_engine.cpp:102) ==21327== by 0x68D8B85: __offload_target_acquire1 (compiler_if_host.cpp:188) ==21327== by 0x66B5362: offload(char const*, unsigned long, int, char const*, int, VarDesc*, VarDesc2*) [clone .constprop.24] (libgomp-plugin-intelmic.cpp:166) ==21327== by 0x66B5509: get_target_table(int, int&, int&, void**&) [clone .constprop.23] (libgomp-plugin-intelmic.cpp:203) ==21327== by 0x66B573E: GOMP_OFFLOAD_get_table (libgomp-plugin-intelmic.cpp:267) ==21327== by 0x54716ED: gomp_init_device (target.c:632) ==21327== by 0x5471E0D: GOMP_target_data (target.c:750) ==21327== by 0x400E6F: vec_mult_ (e.55.2.f90:38) ==21327== by 0x4011C9: MAIN__ (e.55.2.f90:55) ==21327== by 0x401200: main (e.55.2.f90:56) ==21327== Address 0x62d1424 is 36 bytes inside a block of size 37 alloc'd ==21327== at 0x4C2AB80: malloc (vg_replace_malloc.c:292) ==21327== by 0x6AFD706: COIProcessLoadLibraryFromMemory@COI_2.0 (coi_host.cpp:1154) ==21327== by 0x68D9146: Engine::load_libraries() (offload_engine.cpp:243) ==21327== by 0x68DA269: Engine::init() (offload_engine.cpp:102) ==21327== by 0x68D8B85: __offload_target_acquire1 (compiler_if_host.cpp:188) ==21327== by 0x66B5362: offload(char const*, unsigned long, int, char const*, int, VarDesc*, VarDesc2*) [clone .constprop.24] (libgomp-plugin-intelmic.cpp:166) ==21327== by 0x66B5509: get_target_table(int, int&, int&, void**&) [clone .constprop.23] (libgomp-plugin-intelmic.cpp:203) ==21327== by 0x66B573E: GOMP_OFFLOAD_get_table (libgomp-plugin-intelmic.cpp:267) ==21327== by 0x54716ED: gomp_init_device (target.c:632) ==21327== by 0x5471E0D: GOMP_target_data (target.c:750) ==21327== by 0x400E6F: vec_mult_ (e.55.2.f90:38) ==21327== by 0x4011C9: MAIN__ (e.55.2.f90:55) ==21327== ==21327== ==21327== HEAP SUMMARY: ==21327== in use at exit: 18,480 bytes in 55 blocks ==21327== total heap usage: 851 allocs, 796 frees, 227,151 bytes allocated ==21327== ==21327== LEAK SUMMARY: ==21327== definitely lost: 16 bytes in 1 blocks ==21327== indirectly lost: 0 bytes in 0 blocks ==21327== possibly lost: 673 bytes in 17 blocks ==21327== still reachable: 17,791 bytes in 37 blocks ==21327== suppressed: 0 bytes in 0 blocks ==21327== Rerun with --leak-check=full to see details of leaked memory ==21327== ==21327== For counts of detected and suppressed errors, rerun with: -v ==21327== Use --track-origins=yes to see where uninitialised values come from ==21327== ERROR SUMMARY: 72 errors from 2 contexts (suppressed: 0 from 0) Grüße, Thomas
signature.asc
Description: PGP signature