Loading a PyTorch Model in C++ error in execution

username: zaynabhabibi
cooked: <p>Hi,<br>
I am trying the loadind a Pytorch Model in C++ tutorial :  <a href="https://brsoff.github.io/tutorials/advanced/cpp_export.html" rel="nofollow noopener">https://brsoff.github.io/tutorials/advanced/cpp_export.html</a><br>
I do not have any problem from the step 1 to the step 3, but when I am trying to execute the script module in C++ (step 4) I have a free() pointer error :</p>
<p>*** Error in `./example-app’: free(): invalid pointer: 0x00007ffc1b6ab040 ***<br>
======= Backtrace: =========<br>
/lib64/libc.so.6(+0x81609)[0x7f9691e44609]<br>
./example-app(_ZN9__gnu_cxx13new_allocatorIPNSt8__detail15_Hash_node_baseEE10deallocateEPS3_m+0x20)[0x442eda]<br>
./example-app(_ZNSt10_HashtableIN3c106SymbolES1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb1ELb1ELb1EEEE21_M_deallocate_bucketsEPPNS3_15_Hash_node_baseEm+0x49)[0x44096d]<br>
./example-app(_ZNSt10_HashtableIN3c106SymbolES1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb1ELb1ELb1EEEED1Ev+0x36)[0x43d4fe]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so(+0x83d5c8)[0x7f9708bfe5c8]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so(_ZN5torch3jit6script16SchemaTypeParser9parseTypeEv+0xc13)[0x7f9708c3c733]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so(+0x865d75)[0x7f9708c26d75]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so(+0x8688c6)[0x7f9708c298c6]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so(+0x864723)[0x7f9708c25723]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so(_ZN5torch3jit17parseSchemaOrNameERKSs+0x6f7)[0x7f9708c28cf7]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so(_ZN5torch3jit11parseSchemaERKSs+0x23)[0x7f9708c29623]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1(+0xaab25b)[0x7f9717db825b]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1(_ZN5torch3jit16registerOperatorEONS0_8OperatorE+0x15)[0x7f9717dc4cd5]<br>
/home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1(+0x27c350)[0x7f9717589350]<br>
/lib64/ld-linux-x86-64.so.2(+0xf8f3)[0x7f97189be8f3]<br>
/lib64/ld-linux-x86-64.so.2(+0x115a)[0x7f97189b015a]<br>
======= Memory map: ========<br>
00400000-0045b000 r-xp 00000000 fd:02 23416494                           /home/pixur/Documents/Zaynab/TestLibtorch/cpp/build/example-app<br>
0065b000-0065c000 r–p 0005b000 fd:02 23416494                           /home/pixur/Documents/Zaynab/TestLibtorch/cpp/build/example-app<br>
0065c000-0065d000 rw-p 0005c000 fd:02 23416494                           /home/pixur/Documents/Zaynab/TestLibtorch/cpp/build/example-app<br>
01a66000-022a8000 rw-p 00000000 00:00 0                                  [heap]<br>
7f9688000000-7f9688021000 rw-p 00000000 00:00 0<br>
7f9688021000-7f968c000000 —p 00000000 00:00 0<br>
7f968f50b000-7f968f520000 r-xp 00000000 fd:00 33618302                   /usr/lib64/libz.so.1.2.7<br>
7f968f520000-7f968f71f000 —p 00015000 fd:00 33618302                   /usr/lib64/libz.so.1.2.7<br>
7f968f71f000-7f968f720000 r–p 00014000 fd:00 33618302                   /usr/lib64/libz.so.1.2.7<br>
7f968f720000-7f968f721000 rw-p 00015000 fd:00 33618302                   /usr/lib64/libz.so.1.2.7<br>
7f968f721000-7f968f778000 r-xp 00000000 fd:00 37466332                   /usr/local/lib64/libopencv_flann.so.4.1.1<br>
7f968f778000-7f968f977000 —p 00057000 fd:00 37466332                   /usr/local/lib64/libopencv_flann.so.4.1.1<br>
7f968f977000-7f968f97a000 r–p 00056000 fd:00 37466332                   /usr/local/lib64/libopencv_flann.so.4.1.1<br>
7f968f97a000-7f968f97b000 rw-p 00059000 fd:00 37466332                   /usr/local/lib64/libopencv_flann.so.4.1.1<br>
7f968f97b000-7f968fa47000 r-xp 00000000 fd:00 37466363                   /usr/local/lib64/libopencv_features2d.so.4.1.1<br>
7f968fa47000-7f968fc46000 —p 000cc000 fd:00 37466363                   /usr/local/lib64/libopencv_features2d.so.4.1.1<br>
7f968fc46000-7f968fc4c000 r–p 000cb000 fd:00 37466363                   /usr/local/lib64/libopencv_features2d.so.4.1.1<br>
7f968fc4c000-7f968fc4e000 rw-p 000d1000 fd:00 37466363                   /usr/local/lib64/libopencv_features2d.so.4.1.1<br>
7f968fc4e000-7f968fc4f000 rw-p 00000000 00:00 0<br>
7f968fc4f000-7f968fe03000 r-xp 00000000 fd:00 37466379                   /usr/local/lib64/libopencv_calib3d.so.4.1.1<br>
7f968fe03000-7f9690003000 —p 001b4000 fd:00 37466379                   /usr/local/lib64/libopencv_calib3d.so.4.1.1<br>
7f9690003000-7f9690007000 r–p 001b4000 fd:00 37466379                   /usr/local/lib64/libopencv_calib3d.so.4.1.1<br>
7f9690007000-7f9690008000 rw-p 001b8000 fd:00 37466379                   /usr/local/lib64/libopencv_calib3d.so.4.1.1<br>
7f9690008000-7f9690009000 rw-p 00000000 00:00 0<br>
7f9690009000-7f9690315000 r-xp 00000000 fd:00 37466367                   /usr/local/lib64/libopencv_imgcodecs.so.4.1.1<br>
7f9690315000-7f9690515000 —p 0030c000 fd:00 37466367                   /usr/local/lib64/libopencv_imgcodecs.so.4.1.1<br>
7f9690515000-7f9690520000 r–p 0030c000 fd:00 37466367                   /usr/local/lib64/libopencv_imgcodecs.so.4.1.1<br>
7f9690520000-7f9690524000 rw-p 00317000 fd:00 37466367                   /usr/local/lib64/libopencv_imgcodecs.so.4.1.1<br>
7f9690524000-7f969058e000 rw-p 00000000 00:00 0<br>
7f969058e000-7f9690aec000 r-xp 00000000 fd:00 37466336                   /usr/local/lib64/libopencv_imgproc.so.4.1.1<br>
7f9690aec000-7f9690cec000 —p 0055e000 fd:00 37466336                   /usr/local/lib64/libopencv_imgproc.so.4.1.1<br>
7f9690cec000-7f9690d0b000 r–p 0055e000 fd:00 37466336                   /usr/local/lib64/libopencv_imgproc.so.4.1.1<br>
7f9690d0b000-7f9690d14000 rw-p 0057d000 fd:00 37466336                   /usr/local/lib64/libopencv_imgproc.so.4.1.1<br>
7f9690d14000-7f9690db6000 rw-p 00000000 00:00 0<br>
7f9690db6000-7f9690dfd000 r-xp 00000000 fd:00 33559109                   /usr/lib64/libnvidia-fatbinaryloader.so.418.67<br>
7f9690dfd000-7f9690ffd000 —p 00047000 fd:00 33559109                   /usr/lib64/libnvidia-fatbinaryloader.so.418.67<br>
7f9690ffd000-7f9690fff000 rw-p 00047000 fd:00 33559109                   /usr/lib64/libnvidia-fatbinaryloader.so.418.67<br>
7f9690fff000-7f9691004000 rw-p 00000000 00:00 0<br>
7f9691004000-7f9691006000 r-xp 00000000 fd:00 33558188                   /usr/lib64/libdl-2.17.so<br>
7f9691006000-7f9691206000 —p 00002000 fd:00 33558188                   /usr/lib64/libdl-2.17.so<br>
7f9691206000-7f9691207000 r–p 00002000 fd:00 33558188                   /usr/lib64/libdl-2.17.so<br>
7f9691207000-7f9691208000 rw-p 00003000 fd:00 33558188                   /usr/lib64/libdl-2.17.so<br>
7f9691208000-7f9691309000 r-xp 00000000 fd:00 33558190                   /usr/lib64/libm-2.17.so<br>
7f9691309000-7f9691508000 —p 00101000 fd:00 33558190                   /usr/lib64/libm-2.17.so<br>
7f9691508000-7f9691509000 r–p 00100000 fd:00 33558190                   /usr/lib64/libm-2.17.so<br>
7f9691509000-7f969150a000 rw-p 00101000 fd:00 33558190                   /usr/lib64/libm-2.17.so<br>
7f969150a000-7f9691511000 r-xp 00000000 fd:00 33558255                   /usr/lib64/librt-2.17.so<br>
7f9691511000-7f9691710000 —p 00007000 fd:00 33558255                   /usr/lib64/librt-2.17.so<br>
7f9691710000-7f9691711000 r–p 00006000 fd:00 33558255                   /usr/lib64/librt-2.17.so<br>
7f9691711000-7f9691712000 rw-p 00007000 fd:00 33558255                   /usr/lib64/librt-2.17.so<br>
7f9691712000-7f9691787000 r-xp 00000000 fd:02 1613308384                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcudart-1581fefa.so.10.0<br>
7f9691787000-7f9691987000 —p 00075000 fd:02 1613308384                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcudart-1581fefa.so.10.0<br>
7f9691987000-7f969198b000 rw-p 00075000 fd:02 1613308384                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcudart-1581fefa.so.10.0<br>
7f969198b000-7f969198c000 rw-p 00000000 00:00 0<br>
7f969198c000-7f969198f000 rw-p 0007a000 fd:02 1613308384                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcudart-1581fefa.so.10.0<br>
7f969198f000-7f9691997000 r-xp 00000000 fd:02 1613308896                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libnvToolsExt-3965bdd0.so.1<br>
7f9691997000-7f9691b97000 —p 00008000 fd:02 1613308896                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libnvToolsExt-3965bdd0.so.1<br>
7f9691b97000-7f9691b98000 rw-p 00008000 fd:02 1613308896                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libnvToolsExt-3965bdd0.so.1<br>
7f9691b98000-7f9691b99000 rw-p 0000a000 fd:02 1613308896                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libnvToolsExt-3965bdd0.so.1<br>
7f9691b99000-7f9691bbe000 r-xp 00000000 fd:02 1613308894                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libgomp-4f651535.so.1<br>
7f9691bbe000-7f9691dbd000 —p 00025000 fd:02 1613308894                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libgomp-4f651535.so.1<br>
7f9691dbd000-7f9691dbe000 r–p 00024000 fd:02 1613308894                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libgomp-4f651535.so.1<br>
7f9691dbe000-7f9691dc3000 rw-p 00025000 fd:02 1613308894                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libgomp-4f651535.so.1<br>
7f9691dc3000-7f9691f85000 r-xp 00000000 fd:00 33556059                   /usr/lib64/libc-2.17.so<br>
7f9691f85000-7f9692185000 —p 001c2000 fd:00 33556059                   /usr/lib64/libc-2.17.so<br>
7f9692185000-7f9692189000 r–p 001c2000 fd:00 33556059                   /usr/lib64/libc-2.17.so<br>
7f9692189000-7f969218b000 rw-p 001c6000 fd:00 33556059                   /usr/lib64/libc-2.17.so<br>
7f969218b000-7f9692190000 rw-p 00000000 00:00 0<br>
7f9692190000-7f96921a5000 r-xp 00000000 fd:00 33555937                   /usr/lib64/libgcc_s-4.8.5-20150702.so.1<br>
7f96921a5000-7f96923a4000 —p 00015000 fd:00 33555937                   /usr/lib64/libgcc_s-4.8.5-20150702.so.1<br>
7f96923a4000-7f96923a5000 r–p 00014000 fd:00 33555937                   /usr/lib64/libgcc_s-4.8.5-20150702.so.1<br>
7f96923a5000-7f96923a6000 rw-p 00015000 fd:00 33555937                   /usr/lib64/libgcc_s-4.8.5-20150702.so.1<br>
7f96923a6000-7f969248f000 r-xp 00000000 fd:00 33558422                   /usr/lib64/libstdc++.so.6.0.19<br>
7f969248f000-7f969268e000 —p 000e9000 fd:00 33558422                   /usr/lib64/libstdc++.so.6.0.19<br>
7f969268e000-7f9692696000 r–p 000e8000 fd:00 33558422                   /usr/lib64/libstdc++.so.6.0.19<br>
7f9692696000-7f9692698000 rw-p 000f0000 fd:00 33558422                   /usr/lib64/libstdc++.so.6.0.19<br>
7f9692698000-7f96926ad000 rw-p 00000000 00:00 0<br>
7f96926ad000-7f9692aa4000 r-xp 00000000 fd:00 37465745                   /usr/local/lib64/libopencv_core.so.4.1.1<br>
7f9692aa4000-7f9692ca3000 —p 003f7000 fd:00 37465745                   /usr/local/lib64/libopencv_core.so.4.1.1<br>
7f9692ca3000-7f9692cb0000 r–p 003f6000 fd:00 37465745                   /usr/local/lib64/libopencv_core.so.4.1.1<br>
7f9692cb0000-7f9692cb5000 rw-p 00403000 fd:00 37465745                   /usr/local/lib64/libopencv_core.so.4.1.1<br>
7f9692cb5000-7f9692cbd000 rw-p 00000000 00:00 0<br>
7f9692cbd000-7f9692cd4000 r-xp 00000000 fd:00 33558249                   /usr/lib64/libpthread-2.17.so<br>
7f9692cd4000-7f9692ed3000 —p 00017000 fd:00 33558249                   /usr/lib64/libpthread-2.17.so<br>
7f9692ed3000-7f9692ed4000 r–p 00016000 fd:00 33558249                   /usr/lib64/libpthread-2.17.so<br>
7f9692ed4000-7f9692ed5000 rw-p 00017000 fd:00 33558249                   /usr/lib64/libpthread-2.17.so<br>
7f9692ed5000-7f9692ed9000 rw-p 00000000 00:00 0<br>
7f9692ed9000-7f970477e000 r-xp 00000000 fd:02 1613308867                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2_gpu.so<br>
7f970477e000-7f970497d000 —p 718a5000 fd:02 1613308867                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2_gpu.so<br>
7f970497d000-7f9704a82000 r–p 718a4000 fd:02 1613308867                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2_gpu.so<br>
7f9704a82000-7f9705ea3000 rw-p 719a9000 fd:02 1613308867                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2_gpu.so<br>
7f9705ea3000-7f9706c5e000 rw-p 00000000 00:00 0<br>
7f9706c5e000-7f97083c1000 rw-p 765df000 fd:02 1613308867                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2_gpu.so<br>
7f97083c1000-7f97120da000 r-xp 00000000 fd:02 1613308380                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so<br>
7f97120da000-7f97122d9000 —p 09d19000 fd:02 1613308380                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so<br>
7f97122d9000-7f97123b7000 r–p 09d18000 fd:02 1613308380                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so<br>
7f97123b7000-7f9712512000 rw-p 09df6000 fd:02 1613308380                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so<br>
7f9712512000-7f9712588000 rw-p 00000000 00:00 0<br>
7f9712588000-7f9712995000 rw-p 0ad87000 fd:02 1613308380                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libcaffe2.so<br>
7f9712995000-7f97129e1000 r-xp 00000000 fd:00 37466375                   /usr/local/lib64/libopencv_videoio.so.4.1.1<br>
7f97129e1000-7f9712be0000 —p 0004c000 fd:00 37466375                   /usr/local/lib64/libopencv_videoio.so.4.1.1<br>
7f9712be0000-7f9712be2000 r–p 0004b000 fd:00 37466375                   /usr/local/lib64/libopencv_videoio.so.4.1.1<br>
7f9712be2000-7f9712be3000 rw-p 0004d000 fd:00 37466375                   /usr/local/lib64/libopencv_videoio.so.4.1.1<br>
7f9712be3000-7f9712be6000 rw-p 00000000 00:00 0<br>
7f9712be6000-7f9712c5a000 r-xp 00000000 fd:00 37466411                   /usr/local/lib64/libopencv_video.so.4.1.1<br>
7f9712c5a000-7f9712e5a000 —p 00074000 fd:00 37466411                   /usr/local/lib64/libopencv_video.so.4.1.1<br>
7f9712e5a000-7f9712e5c000 r–p 00074000 fd:00 37466411                   /usr/local/lib64/libopencv_video.so.4.1.1<br>
7f9712e5c000-7f9712e5d000 rw-p 00076000 fd:00 37466411                   /usr/local/lib64/libopencv_video.so.4.1.1<br>
7f9712e5d000-7f9712f06000 r-xp 00000000 fd:00 37466394                   /usr/local/lib64/libopencv_stitching.so.4.1.1<br>
7f9712f06000-7f9713106000 —p 000a9000 fd:00 37466394                   /usr/local/lib64/libopencv_stitching.so.4.1.1<br>
7f9713106000-7f971310a000 r–p 000a9000 fd:00 37466394                   /usr/local/lib64/libopencv_stitching.so.4.1.1<br>
7f971310a000-7f971310b000 rw-p 000ad000 fd:00 37466394                   /usr/local/lib64/libopencv_stitching.so.4.1.1<br>
7f971310b000-7f97131df000 r-xp 00000000 fd:00 37466346                   /usr/local/lib64/libopencv_photo.so.4.1.1<br>
7f97131df000-7f97133de000 —p 000d4000 fd:00 37466346                   /usr/local/lib64/libopencv_photo.so.4.1.1<br>
7f97133de000-7f97133e1000 r–p 000d3000 fd:00 37466346                   /usr/local/lib64/libopencv_photo.so.4.1.1<br>
7f97133e1000-7f97133e2000 rw-p 000d6000 fd:00 37466346                   /usr/local/lib64/libopencv_photo.so.4.1.1<br>
7f97133e2000-7f9713448000 r-xp 00000000 fd:00 37466390                   /usr/local/lib64/libopencv_objdetect.so.4.1.1<br>
7f9713448000-7f9713647000 —p 00066000 fd:00 37466390                   /usr/local/lib64/libopencv_objdetect.so.4.1.1<br>
7f9713647000-7f9713649000 r–p 00065000 fd:00 37466390                   /usr/local/lib64/libopencv_objdetect.so.4.1.1<br>
7f9713649000-7f971364a000 rw-p 00067000 fd:00 37466390                   /usr/local/lib64/libopencv_objdetect.so.4.1.1<br>
7f971364a000-7f971370d000 r-xp 00000000 fd:00 37466342                   /usr/local/lib64/libopencv_ml.so.4.1.1<br>
7f971370d000-7f971390d000 —p 000c3000 fd:00 37466342                   /usr/local/lib64/libopencv_ml.so.4.1.1<br>
7f971390d000-7f9713911000 r–p 000c3000 fd:00 37466342                   /usr/local/lib64/libopencv_ml.so.4.1.1<br>
7f9713911000-7f9713912000 rw-p 000c7000 fd:00 37466342                   /usr/local/lib64/libopencv_ml.so.4.1.1<br>
7f9713912000-7f971391c000 r-xp 00000000 fd:00 37466386                   /usr/local/lib64/libopencv_highgui.so.4.1.1<br>
7f971391c000-7f9713b1b000 —p 0000a000 fd:00 37466386                   /usr/local/lib64/libopencv_highgui.so.4.1.1<br>
7f9713b1b000-7f9713b1c000 r–p 00009000 fd:00 37466386                   /usr/local/lib64/libopencv_highgui.so.4.1.1<br>
7f9713b1c000-7f9713b1d000 rw-p 0000a000 fd:00 37466386                   /usr/local/lib64/libopencv_highgui.so.4.1.1<br>
7f9713b1d000-7f9713f1e000 r-xp 00000000 fd:00 37466350                   /usr/local/lib64/libopencv_dnn.so.4.1.1<br>
7f9713f1e000-7f971411d000 —p 00401000 fd:00 37466350                   /usr/local/lib64/libopencv_dnn.so.4.1.1<br>
7f971411d000-7f9714134000 r–p 00400000 fd:00 37466350                   /usr/local/lib64/libopencv_dnn.so.4.1.1<br>
7f9714134000-7f9714138000 rw-p 00417000 fd:00 37466350                   /usr/local/lib64/libopencv_dnn.so.4.1.1<br>
7f9714138000-7f971413d000 rw-p 00000000 00:00 0<br>
7f971413d000-7f9714158000 r-xp 00000000 fd:02 1613308385                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10_cuda.so<br>
7f9714158000-7f9714357000 —p 0001b000 fd:02 1613308385                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10_cuda.so<br>
7f9714357000-7f9714358000 r–p 0001a000 fd:02 1613308385                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10_cuda.so<br>
7f9714358000-7f9714359000 rw-p 0001b000 fd:02 1613308385                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10_cuda.so<br>
7f9714359000-7f971435d000 rw-p 00000000 00:00 0<br>
7f971435d000-7f9714363000 rw-p 00024000 fd:02 1613308385                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10_cuda.so<br>
7f9714363000-7f97143da000 r-xp 00000000 fd:00 100734668                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudart.so.10.1.168<br>
7f97143da000-7f97145da000 —p 00077000 fd:00 100734668                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudart.so.10.1.168<br>
7f97145da000-7f97145de000 rw-p 00077000 fd:00 100734668                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudart.so.10.1.168<br>
7f97145de000-7f97145df000 rw-p 00000000 00:00 0<br>
7f97145df000-7f97145e7000 r-xp 00000000 fd:00 106168878                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvToolsExt.so.1.0.0<br>
7f97145e7000-7f97147e7000 —p 00008000 fd:00 106168878                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvToolsExt.so.1.0.0<br>
7f97147e7000-7f97147e8000 rw-p 00008000 fd:00 106168878                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvToolsExt.so.1.0.0<br>
7f97147e8000-7f97159e6000 r-xp 00000000 fd:00 101504711                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvrtc.so.10.1.168<br>
7f97159e6000-7f9715be5000 —p 011fe000 fd:00 101504711                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvrtc.so.10.1.168<br>
7f9715be5000-7f9715e68000 r–p 011fd000 fd:00 101504711                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvrtc.so.10.1.168<br>
7f9715e68000-7f9715eaf000 rw-p 01480000 fd:00 101504711                  /usr/local/cuda-10.1/targets/x86_64-linux/lib/libnvrtc.so.10.1.168<br>
7f9715eaf000-7f9715f56000 rw-p 00000000 00:00 0<br>
7f9715f56000-7f9716d42000 r-xp 00000000 fd:00 33559094                   /usr/lib64/libcuda.so.418.67<br>
7f9716d42000-7f9716f41000 —p 00dec000 fd:00 33559094                   /usr/lib64/libcuda.so.418.67<br>
7f9716f41000-7f97170bb000 rw-p 00deb000 fd:00 33559094                   /usr/lib64/libcuda.so.418.67<br>
7f97170bb000-7f97170cb000 rw-p 00000000 00:00 0<br>
7f97170cb000-7f9717103000 r-xp 00000000 fd:02 1613308378                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10.so<br>
7f9717103000-7f9717303000 —p 00038000 fd:02 1613308378                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10.so<br>
7f9717303000-7f9717304000 r–p 00038000 fd:02 1613308378                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10.so<br>
7f9717304000-7f9717305000 rw-p 00039000 fd:02 1613308378                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10.so<br>
7f9717305000-7f9717306000 rw-p 00000000 00:00 0<br>
7f9717306000-7f971730d000 rw-p 0004d000 fd:02 1613308378                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libc10.so<br>
7f971730d000-7f9718384000 r-xp 00000000 fd:02 1613308383                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1<br>
7f9718384000-7f9718584000 —p 01077000 fd:02 1613308383                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1<br>
7f9718584000-7f97185c3000 r–p 01077000 fd:02 1613308383                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1<br>
7f97185c3000-7f97185ca000 rw-p 010b6000 fd:02 1613308383                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1<br>
7f97185ca000-7f97185cd000 rw-p 00000000 00:00 0<br>
7f97185cd000-7f97189af000 rw-p 013fd000 fd:02 1613308383                 /home/pixur/Documents/Zaynab/TestLibtorch/libtorch/lib/libtorch.so.1<br>
7f97189af000-7f97189d1000 r-xp 00000000 fd:00 33556048                   /usr/lib64/ld-2.17.so<br>
7f9718b7d000-7f9718bb5000 rw-p 00000000 00:00 0<br>
7f9718bcd000-7f9718bd0000 rw-p 00000000 00:00 0<br>
7f9718bd0000-7f9718bd1000 r–p 00021000 fd:00 33556048                   /usr/lib64/ld-2.17.so<br>
7f9718bd1000-7f9718bd2000 rw-p 00022000 fd:00 33556048                   /usr/lib64/ld-2.17.so<br>
7f9718bd2000-7f9718bd3000 rw-p 00000000 00:00 0<br>
7ffc1b69e000-7ffc1b6bf000 rw-p 00000000 00:00 0                          [stack]<br>
7ffc1b776000-7ffc1b778000 r-xp 00000000 00:00 0                          [vdso]<br>
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]<br>
Abandon (core dumped)</p>
<p>my environment :<br>
centos7<br>
Python 3.7.3<br>
Torch 1. 0.0<br>
Cuda 10.1</p>
<p>Did anyone face the same problem? I will appreciate a little help <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>

username: tom
cooked: <p>When using Centos 7, be sure to not use a too old C++ compiler, you need gcc &gt;= 4.9.something. 4.8.x will not do.</p>
<p>Best regars</p>
<p>Thomas</p>

username: zaynabhabibi
cooked: <p>Yes using gcc 4.9 resolve the problem.<br>
Thank you</p>