Make fails with GPU module enabled

68 views
Skip to first unread message

Richard Kelly

unread,
Nov 4, 2022, 8:58:00 AM11/4/22
to ProjectChrono
When the GPU module is enabled I get the error below when I try to make. I am using ubuntu 20.04 and gcc 9.4 g++ 9.4.  It compiles without the GPU module.



Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_f7a74/fast && /usr/bin/make -f CMakeFiles/cmTC_f7a74.dir/build.make CMakeFiles/cmTC_f7a74.dir/build
make[1]: Entering directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f7a74.dir/src.c.o
/usr/bin/cc   -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_f7a74.dir/src.c.o   -c "/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp/src.c"
Linking C executable cmTC_f7a74
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f7a74.dir/link.txt --verbose=1
/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD    CMakeFiles/cmTC_f7a74.dir/src.c.o  -o cmTC_f7a74
/usr/bin/ld: CMakeFiles/cmTC_f7a74.dir/src.c.o: in function `main':
src.c:(.text+0x46): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x52): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x63): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_f7a74.dir/build.make:87: cmTC_f7a74] Error 1
make[1]: Leaving directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_f7a74/fast] Error 2


Source file was:
#include <pthread.h>

void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Performing C++ SOURCE FILE Test DETECTED_NEON failed with the following output:
Change Dir: /media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_44c59/fast && /usr/bin/make -f CMakeFiles/cmTC_44c59.dir/build.make CMakeFiles/cmTC_44c59.dir/build
make[1]: Entering directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_44c59.dir/src.cxx.o
/usr/bin/c++    -pthread -fopenmp -DDETECTED_NEON -march=armv8-a   -std=gnu++14 -o CMakeFiles/cmTC_44c59.dir/src.cxx.o -c "/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp/src.cxx"
cc1plus: error: bad value (‘armv8-a’) for ‘-march=’ switch
cc1plus: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 native
make[1]: *** [CMakeFiles/cmTC_44c59.dir/build.make:66: CMakeFiles/cmTC_44c59.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_44c59/fast] Error 2


...and run output:

Return value: 1
Source file was:

#include <arm_neon.h>
    int main()
    {
      float64_t a[2] = {  1., 2. };
      float64_t b[2] = { -1., 3. };
      float64_t c[2];

      float64x2_t va = vld1q_f64(&a[0]);
      float64x2_t vb = vld1q_f64(&b[0]);
      float64x2_t vc = vaddq_f64(va, vb);
      vst1q_f64(&c[0], vc);

      if (c[0] == 0. && c[1] == 5.)
        return 0;
      else
        return 0;
    }
   

Ruochun Zhang

unread,
Nov 7, 2022, 2:21:44 AM11/7/22
to ProjectChrono
Hi,

Radu may have a better insight on this particular problem, but could you let us know your CUDA version? In the mean time, you can first make sure Chrono::FSI module is turned off, and then try building with gcc 11.2 or 11.3 to see if it changes anything.

Thank you,
Ruochun

Richard Kelly

unread,
Nov 7, 2022, 10:26:54 AM11/7/22
to Ruochun Zhang, ProjectChrono
Thanks Ruochun for replying to my question. I tried to compile with gcc 11.1 and 11.3 and get the same error. There is something going on with my cuda installation though... Seems like the system can see there is a GPU there but not much more than that.. I'll do some reading in the nvidia forums to see if I can fix.

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243





nvidia-debugdump --list
Found 1 NVIDIA devices
Error: nvmlDeviceGetHandleByIndex(): Not Found
FAILED to get details on GPU (0x0): Not Found



nvidia-smi
Unable to determine the device handle for GPU 0000:01:00.0: Not Found


________________________________
From: projec...@googlegroups.com <projec...@googlegroups.com> on behalf of Ruochun Zhang <ruoc...@gmail.com>
Sent: Monday, November 7, 2022 3:51 AM
To: ProjectChrono
Subject: [chrono] Re: Make fails with GPU module enabled
--
You received this message because you are subscribed to a topic in the Google Groups "ProjectChrono" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/projectchrono/GNApNCiXJHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to projectchron...@googlegroups.com<mailto:projectchron...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/5983d41a-1753-40da-b95b-2d6c35c6d514n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/5983d41a-1753-40da-b95b-2d6c35c6d514n%40googlegroups.com?utm_medium=email&utm_source=footer>.
This email is governed by the Terms and Conditions found in our Disclaimer<http://www.mi.mun.ca/ict/disclaimer>.

Richard Kelly

unread,
Nov 7, 2022, 12:52:49 PM11/7/22
to Ruochun Zhang, ProjectChrono

nvidia-smi now outputs the following, so it looks like the driver at least works now... Still getting the same error while compiling though.

Mon Nov 7 14:20:01 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 520.61.05 Driver Version: 520.61.05 CUDA Version: 11.8 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA RTX A5000 On | 00000000:01:00.0 Off | Off |
| 30% 32C P8 6W / 230W | 10MiB / 24564MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1442 G /usr/lib/xorg/Xorg 4MiB |
| 0 N/A N/A 2240 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------+




________________________________
From: Richard Kelly
Sent: Monday, November 7, 2022 11:56 AM
To: Ruochun Zhang; ProjectChrono
Subject: Re: [chrono] Re: Make fails with GPU module enabled

JASON Z

unread,
Nov 7, 2022, 1:03:40 PM11/7/22
to ProjectChrono
Richard,

Could you please delete the build directory and retry cmake configuration? If you don't clean the cmake cache, the cmake might still pick up the old gcc version.

Also, do you have OPENMP installed?

Could you please post your system spec also? CPU, MEM, GPU, etc?

Jason

JASON Z

unread,
Nov 7, 2022, 2:50:01 PM11/7/22
to ProjectChrono
Directing conversation back to forum:

Richard,

Ok, I missed your previous post. Your nvcc is 10.1 correct? You should probably not work with any gcc later than 8.0. check here: https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version. You have two choices: downgrade gcc to 8, or upgrade nvcc to 11.8. It is a little tricky there, as CUDA won't work with gcc 12. My recommendation will be an upgrade of nvcc to 11.8. Your GPU is a new model and works with 11.8.

To upgrade to 11.8, remove whatever nvcc you have, then follow here: https://developer.nvidia.com/cuda-downloads.

I have personally tested gcc 11 and nvcc 11.8 on ubuntu 22.04, and I can confirm this combination works.

Jason



Reply to:
Hi Jazon,


I wiped out the old build and tried again, though I only had gcc 11.1 and 12.2. 11.1 gave the same error. 12.2 gave the error trace below. I do have openmp installed via libomp-dev


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/gcc-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/g++-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Determining if the C compiler works failed with the following output:
Change Dir: /media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_423e9/fast && /usr/bin/make -f CMakeFiles/cmTC_423e9.dir/build.make CMakeFiles/cmTC_423e9.dir/build

make[1]: Entering directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_423e9.dir/testCCompiler.c.o
/home/linuxbrew/.linuxbrew/bin/gcc-11    -o CMakeFiles/cmTC_423e9.dir/testCCompiler.c.o   -c "/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp/testCCompiler.c"
Linking C executable cmTC_423e9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_423e9.dir/link.txt --verbose=1
/home/linuxbrew/.linuxbrew/bin/gcc-11      CMakeFiles/cmTC_423e9.dir/testCCompiler.c.o  -o cmTC_423e9
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_423e9.dir/build.make:87: cmTC_423e9] Error 1

make[1]: Leaving directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_423e9/fast] Error 2



Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/gcc-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/g++-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Determining if the C compiler works failed with the following output:
Change Dir: /media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_73eb9/fast && /usr/bin/make -f CMakeFiles/cmTC_73eb9.dir/build.make CMakeFiles/cmTC_73eb9.dir/build

make[1]: Entering directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_73eb9.dir/testCCompiler.c.o
/home/linuxbrew/.linuxbrew/bin/gcc-11    -o CMakeFiles/
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/gcc-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/g++-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Determining if the C compiler works failed with the following output:
Change Dir: /media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_423e9/fast && /usr/bin/make -f CMakeFiles/cmTC_423e9.dir/build.make CMakeFiles/cmTC_423e9.dir/build

make[1]: Entering directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_423e9.dir/testCCompiler.c.o
/home/linuxbrew/.linuxbrew/bin/gcc-11    -o CMakeFiles/cmTC_423e9.dir/testCCompiler.c.o   -c "/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp/testCCompiler.c"
Linking C executable cmTC_423e9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_423e9.dir/link.txt --verbose=1
/home/linuxbrew/.linuxbrew/bin/gcc-11      CMakeFiles/cmTC_423e9.dir/testCCompiler.c.o  -o cmTC_423e9
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_423e9.dir/build.make:87: cmTC_423e9] Error 1

make[1]: Leaving directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_423e9/fast] Error 2



Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/gcc-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/linuxbrew/.linuxbrew/bin/g++-11
Build flags:
Id flags:

The output was:
1
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status


Determining if the C compiler works failed with the following output:
Change Dir: /media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_73eb9/fast && /usr/bin/make -f CMakeFiles/cmTC_73eb9.dir/build.make CMakeFiles/cmTC_73eb9.dir/build

make[1]: Entering directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_73eb9.dir/testCCompiler.c.o
/home/linuxbrew/.linuxbrew/bin/gcc-11    -o CMakeFiles/cmTC_73eb9.dir/testCCompiler.c.o   -c "/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp/testCCompiler.c"
Linking C executable cmTC_73eb9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_73eb9.dir/link.txt --verbose=1
/home/linuxbrew/.linuxbrew/bin/gcc-11      CMakeFiles/cmTC_73eb9.dir/testCCompiler.c.o  -o cmTC_73eb9
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_73eb9.dir/build.make:87: cmTC_73eb9] Error 1

make[1]: Leaving directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_73eb9/fast] Error 2



cmTC_73eb9.dir/testCCompiler.c.o   -c "/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp/testCCompiler.c"
Linking C executable cmTC_73eb9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_73eb9.dir/link.txt --verbose=1
/home/linuxbrew/.linuxbrew/bin/gcc-11      CMakeFiles/cmTC_73eb9.dir/testCCompiler.c.o  -o cmTC_73eb9
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so: error loading plugin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc@11/11.3.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/11/liblto_plugin.so)

collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_73eb9.dir/build.make:87: cmTC_73eb9] Error 1

make[1]: Leaving directory '/media/richard/My Passport/workspace/chrono_build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_73eb9/fast] Error 2

JASON Z

unread,
Nov 9, 2022, 2:43:58 AM11/9/22
to ProjectChrono
Richard,

Could you please provide the spec of the system you are trying to build with? CPU? MEM? GPU? Are you building it on an arm System?

Jason

Reply all
Reply to author
Forward
0 new messages