Giter Site home page Giter Site logo

Comments (6)

mmguar avatar mmguar commented on September 16, 2024 1

Thank you for the pointer.
update-alternatives is unfortunately unavailable in arch, but the solution was to create a simlink in /usr/local/bin for gcc, g++ and cc (see here):
sudo ln -s $(which gcc-5) /usr/local/bin/gcc sudo ln -s $(which g++-5) /usr/local/bin/g++
Unfortunately that is not enough as the command that gives the error specifies -ccbin /usr/bin/cc, so it was necessary to temporary replace /usr/bin/cc:
sudo mv /usr/bin/cc /usr/bin/cc.new sudo cp /usr/bin/cc-10 /usr/bin/cc
Compilation is fine then.
If anyone was to stumble upon this again, please remember to revert to your standard gcc with:
sudo rm /usr/bin/cc sudo mv /usr/bin/cc.new /usr/bin/cc sudo rm /usr/local/bin/gcc /usr/local/bin/g++ hash -r
Thank you again Lorenzo.

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on September 16, 2024

Hi! What do you mean by "c++ 11.1.0"? Is that your g++ version? Or the CUDA version?

Edit:
Can you copy the output of these two commands?

nvcc --version
g++ --version

from oxdna.

mmguar avatar mmguar commented on September 16, 2024

Hi Lorenzo. Apologies for being unclear.
g++ and gcc in the path end up being the cuda versions

[matteo@matteOs4 build]$ g++ --version
g++ (Arch Linux 10.2.0-3) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[matteo@matteOs4 build]$ type g++
g++ is hashed (/opt/cuda/bin/g++)

aliasing them to /usr/bin/gcc shows version 11.1.0, which should be correct, but does not solve compilation issues.
As for nvcc

[matteo@matteOs4 build]$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Mar_21_19:15:46_PDT_2021
Cuda compilation tools, release 11.3, V11.3.58
Build cuda_11.3.r11.3/compiler.29745058_0

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on September 16, 2024

OK, it seems there is a mismatch between the compiler and the libs it uses to compile. If you look at the errors, they refer to the path /usr/include/c++/11.1.0, which seems to indicate that the system compiler is g++ 11.1.0, which is not the one used to compile the code. I'm not sure how to solve this, but it doesn't seem strictly related to oxDNA. Is this a cluster node? Is there anyone who can help you with this?

from oxdna.

mmguar avatar mmguar commented on September 16, 2024

Hm, I understand that this is not an oxDNA problem most likely and I appreciate the support.
I removed the wrong bindings to gcc and g++, now they all show version 11.1.0, which is the one installed system-wide. The previous ones were the one shipped with cuda, which overrode the system ones through a poor PATH specification.
So now I believe I am compiling oxDNA with gcc 11.1.0 (--version confirms it), but I do still get the same errors.

Unfortunately it is my own computer and thus I have to debug it myself. I am more so looking for any pointers towards the right direction. It might also just be that arch is too "nightly" and cuda will not compile correctly before an update.

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on September 16, 2024

As far as I know CUDA 11.3 is incompatible with g++ > 10. You'll have to install an older version and set it as the default (if you using ubuntu there is the handy update-alternatives command that can help you switch between versions).

from oxdna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.