Sometimes the PATH
and LD_LIBRARY_PATH
are not set correctly for the CUDA installation
export PATH=$PATH:/usr/local/cuda/bin/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib6
#!/bin/bash | |
# wrapper for the cd command | |
# it expands sequence .... to ../../../../ (each dot becomes a ../ ) | |
# example: ' cd .... ' -> ' cd ../../../../ ' | |
# if the command does not match ' cd ..[.]+ ' , it is passed directly to the cd command | |
# alias cd=". /path/to/mycd.sh" | |
if [[ $# != 1 ]]; then |
echo "int foo() { return 3;}" | clang++ -cc1 - |
Sometimes the PATH
and LD_LIBRARY_PATH
are not set correctly for the CUDA installation
export PATH=$PATH:/usr/local/cuda/bin/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib6
[cling]$ #include "cling/Interpreter/Interpreter.h"
[cling]$ gCling->allowRedefinition();
[cling]$ gCling->isRedefinitionAllowed();
To get the arguments of cling, which are passed on start, you can use the reflection feature of cling.
#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/InvocationOptions.h"
// gCling is an object of type cling::Interpreter
std::vector<const char*> remaining = gCling->getOptions().CompilerOpts.Remaining;
remaining
image name | GCC version |
---|---|
nvidia/cuda:8.0-devel-ubuntu16.04 | 5.4.0 20160609 |
nvidia/cuda:9.0-devel-ubuntu16.04 | 5.4.0 20160609 |
nvidia/cuda:9.1-devel-ubuntu16.04 | 5.4.0 20160609 |
nvidia/cuda:9.2-devel-ubuntu16.04 | 5.4.0 20160609 |
nvidia/cuda:10.0-devel-ubuntu18.04 | 7.4.0 |
nvidia/cuda:10.1-devel-ubuntu18.04 | 7.4.0 |
nvidia/cuda:10.2-devel-ubuntu18.04 | 7.4.0 |
#include "cling/Interpreter/Interpreter.h" | |
#include "cling/Interpreter/Transaction.h" | |
#include "llvm/IR/Function.h" | |
#include "llvm/IR/Module.h" | |
#include "llvm/Support/raw_ostream.h" | |
auto T1 = gCling->getLatestTransaction(); | |
// command | |
T1->getNext()->dumpPretty(); | |
T1->getNext()->getModule()->print(llvm::outs(), nullptr); |
# go to build directory | |
# expect, that the cmake configure step is already done in the build folder | |
cd build | |
# create extra folder, because a lot of files will be created | |
mkdir graph | |
cmake . --graphviz=graph/app.dot | |
cd graph | |
# render dot file to svg | |
dot -Tsvg app.dot -o app.svg |
Automatic loading of Spack modules when the Conda environment is loaded.
Spack and Conda can influence each other with side effects. Therefore I do not activate them by default. The following functions allow you to activate Conda and Spack by bash command.
# for example, add to .bashrc