The key is to specify an installation directory for which you have write permissions. You can't use yum or any other installation process that requires elevated privileges, but this is almost never necessary. In most cases you'll want to download the source code and build the software so it's compatible with the Frontera software environment. You're welcome to download third-party research software and install it in your own account. You can discover already installed software using TACC's Software Search tool or execute module spider or module avail on the command-line. $ mpicc -show # Show compile line generated by call to mpicc similarly for other wrappers To see the effect of a given wrapper, call it with the -show option: These wrappers call the compiler with the options, include paths, and libraries necessary to produce an MPI executable using the MPI module you're using. $ mpif90 mycode.f90 -o myexe # Fortran source, full build $ mpicxx mycode.cpp -o myexe # C++ source, full build $ mpicc -c mycode.c # C source, compile without linking $ mpicc mycode.c -o myexe # C source, full build After loading an impi or mvapich2 module, compile and/or link using an mpi wrapper ( mpicc, mpicxx, mpif90) in place of the compiler: Intel MPI (module impi) and MVAPICH2 (module mvapich2) are the two MPI libraries available on Frontera. To see whether and how an executable named myexe resolves dependencies on dynamically linked libraries, execute ldd myexe.Ī separate section below addresses the Intel Math Kernel Library (MKL). For software installed at the system-level, TACC's modules generally modify LD_LIBRARY_PATH automatically. In general, however, the LD_LIBRARY_PATH environment variable specifies the search path for dynamic libraries. The link line can use rpath to store in the executable an explicit path to a shared library. a suffix library's binary code becomes part of executable image at link time) versus dynamically-linked shared (.so suffix library's binary code is not part of executable it's located and loaded into memory at run time). Much depends on the type of library: static (. The details of the linking process vary, and order sometimes matters. Other module files define similar environment variables see Using Modules for more information. On Frontera, both the hdf5 and phdf5 modules define the environment variables $TACC_HDF5_INC and $TACC_HDF5_LIB. See the published Intel documentation, available both online and in $ -lmylib -lhdf5 # link $ icc -qopenmp mycode.c -o myexe # OpenMP Here are simple examples that use the Intel compiler to build an executable from source code:Ĭompiling a code that uses OpenMP would look like this: Each Intel module also gives you direct access to mkl without loading an mkl module see Intel MKL for more information. Intel is the recommended and default compiler suite on Frontera. We recommend that you master the basics of makefiles as quickly as possible: even the simplest computational research project will benefit enormously from the power and flexibility of a makefile-based build process. You will quickly outgrow the examples here. You will undoubtedly want to explore these concepts more deeply using online resources. This section of the user guide does nothing more than introduce the big ideas with simple one-line examples. Increasingly, however, the build process is a sophisticated multi-step automated workflow managed by a special framework like autotools or cmake, intended to achieve a repeatable, maintainable, portable mechanism for installing software across a wide range of target platforms. More typically, the process leverages the power of makefiles, so you can change a line or two in the source code, then rebuild in a systematic way only the components affected by the change. In its simplest form, building software involves a simple, one-line call or short shell script that invokes a compiler. The phrase "building software" is a common way to describe the process of producing a machine-readable executable file from source files written in C, Fortran, or some other programming language.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |