Tag Info

New answers tagged

1

Linux's kernel APIs are very stable. (I'm talking about the system calls, not the APIs inside the kernel.) A statically linked executable produced since 1997 or thereabouts (the switch to ELF as the executable format) should work on any current Linux systems. However, statically linked executables have many downsides: they're bulky, they can't be upgraded ...


0

Yes, mostly, although you may need to avoid new kernel features. If you wish to create a portable C++ program it is advisable to adhere to the official ISO C++ standard. As the standard gets changed, you may need to adapt your program but that is usually not a lot of work. You can ask g++ to keep to an older standard to avoid your program not compiling on ...


0

The GCC documentation explains this: GCC allows you to use -g with -O. The shortcuts taken by optimized code may occasionally produce surprising results: some variables you declared may not exist at all; flow of control may briefly move where you did not expect it; some statements may not be executed because they compute constant results or their values ...


1

After you reported getting output like total nodes=1 and This node=0 printed out 4 times, I concluded you are trying this: mpirun -np 4 script-name.sh. It does this because mpirun is launching 4 copies of a shell script which doesn't understand MPI communication semantics. If you can somehow get launch mpirun on a script, then remember (1) the ...


2

You should be aware that the "latency" might include the stdio system buffering enough output for an "efficient" filesystem write. See man 3 setbuf for some further information. The buffering is on a per FILE * basis, so stderr is typically unbuffered, while stdio is typically buffered. That's why output to stderr and output to stdout end up appearing ...



Top 50 recent answers are included