https://www.pantz.org/software/screen/disabling_gnu_screen_lock_screen.html
Managing Multiple SSH Keys
RLIMIT_NOFILE
Protocol Buffers
How To Kill A Supercomputer: Dirty Power, Cosmic Rays, and Bad Solder
Non-volatile Storage Implications of the Datacenter’s Shifting Center
How to cancel a local git commit
How To: 2 Methods To Change TimeZone in Linux
git diff displays colors incorrectly
http://unix.stackexchange.com/questions/64927/git-diff-displays-colors-incorrectly
git config --global core.pager 'less -R'
How to commit only some files?
C/C++ tip: How to list compiler predefined macros
XL C for AIX 13.1.0: Compiling a shared library
To compile a shared library that uses dynamic linking:
- Compile each source file into an object file, with no linking. For example: xlc -c test1.c -o test1.o
- Optional: Create an export file listing the global symbols to be exported, by doing one of the following:
- Use the CreateExportList utility, described in Exporting symbols with the CreateExportList utility.
- Use the -qexpfile compiler option with the -qmkshrobj option. The -qexpfile option saves all exported symbols from a list of given object files in a designated file. For example: xlc -qmkshrobj -qexpfile=exportlist test1.o test2.o
- Manually create an export file using a text editor. You can edit an export file to include or exclude global symbols from the target shared library.
- Use the -qmkshrobj option to create a shared library from the generated object files.
- If you created an export file in step 2, use the -bE linker option to use your global symbol export list. If you do not specify a -bE option, all the global symbols are exported except for those symbols that have the hidden or internal visibility attribute.
- For example: xlc -qmkshrobj -o mySharedObject.o test1.o test2.o -bE:exportlist
Notes:- The default name of the shared object is shr.o, unless you use the -o option to specify another name.
- Exporting some functions (such as restf# where # is a number) might cause incorrect execution. If any files in the shared library use floating point and are compiled with the -qtwolink option, do not export the restf# or equivalent floating-point utility functions.
- Optional: Use the AIX® ar command to produce an archive library file from multiple shared or static objects. For example: ar -rv libtest.a mySharedObject.o myStaticObject.o
- Link the shared library to the main application, as described in Linking a library to an application.
For use with runtime linking
To create a shared library that uses runtime linking:
- Follow steps 1 and 2 in the procedure described above.
- Use the -G option to create a shared library from the generated object files, and to enable runtime linking with applications that support it.
- If you created an export file, use the -bE linker option to use your global symbol export list. If you do not specify a -bE option, all the global symbols are exported except for those symbols that have the hidden or internal visibility attribute.
- For example: xlc -G -o libtest.so test1.o test2.o -bE:exportlist
- Link the shared library to the main application using the -brtl option, as described in Linking a library to an application.
CMake Tutorial
Github API Rate limit exceeded
In Vim how do I effectively insert the same characters across multiple lines?
|
Multithreading MPI
Intel MPI
mpiicc thread_support.c -mt_mpi
MVAPICH2
mpirun_rsh -np 2 –env MV2_USE_CUDA=1 MV2_ENABLE_
Cary MPICH2
Fine-grained Multi-threading Support
Cray-MPICH now offers improved support for multi-threaded applications
that perform MPI operations within threaded regions. Currently, this
feature is available as a separate version of the Cray-MPICH library
that is invoked by using a new compiler driver option, -craympich-mt.
This feature requires CLE release 5.1 or higher, CrayPE version 2.2.0
or higher, and supports both C/C++ and Fortran in the PrgEnv-cray,
PrgEnv-intel, PrgEnv-gnu, and PrgEnv-pgi programming environments.
At this time, this library supports only MPI point-to-point
operations. Applications that perform collective, one-sided, or MPI-
I/O operations within threaded regions will not see any benefits.
Single-threaded applications, or applications that do not currently
perform MPI operations within threaded regions, should continue to use
the default Cray-MPICH library. This feature does not alter the
thread-safety behavior of the default Cray-MPICH library.
Support for larger subsets of MPI operations will be provided in
future releases.
To use the fine-grained threading feature, follow these steps.
Step 1. Compile a multi-threaded MPI application using the
-craympich-mt compiler driver option.
If the code uses static linking:
cc -craympich-mt -o mpi_mt_test.x mpi_mt_test.c
If the code uses dynamic linking:
cc -dynamic -craympich-mt -o mpi_mt_test.x mpi_mt_test.c
Note: The -craympich-mt and -default64 compiler command line
options are mutually exclusive. If both of these options are
specified on a command line, the compiler will ignore the first
one specified and use the second one.
Step 2. Set the environment variables.
export MPICH_MAX_THREAD_SAFETY=multiple
export MPICH_VERSION_DISPLAY=1
Step 3. Run the executable.
aprun arguments ./executable_name
The MPICH_VERSION_DISPLAY environment variable is set in order to
display the version string and verify that the desired library has
been used. The default threading library displays this version string:
BUILD INFO : Built Date Time Year (svn rev rev) MT-G CPR-R
Where MT-G corresponds to the default Multi-threaded MPI library with
global locks.
The new fine-grained threading library displays this version string:
BUILD INFO : Built Date Time Year (svn rev rev) MT-O CPR-R
Where MT-O corresponds to the fine-grained Multi-threaded MPI library
with per-object locks.
CORAL Benchmark Codes
Understanding Memory
Examples of the use of standard interfaces in The Linux Programming Interface
Examples of the use of standard interfaces in The Linux Programming Interface
http://man7.org/tlpi/code/online/interfaces.html