This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Compiling code ====== * Article written by Markus Stöhr (VSC Team) <html><br></html>(last update 2017-10-09 by ms). ===== simple example ===== eg. from HDF5: <code> EXAMPLE=$VSC_HDF5_ROOT/share/hdf5_examples/c/ph5example.c </code> Compile using Intel C Compiler ([[examples/04_module_environment/compile-intel.sh|file]]): <code> module purge module load intel/16 \ intel-mpi/5 hdf5/1.8.18-MPI cp $EXAMPLE . mpiicc -lhdf5 ph5example.c -o ph5example </code> Compile using Gnu C Compiler ([[examples/04_module_environment/compile-gnu.sh|file]]): <code> module purge module load gcc/5.3 \ intel-mpi/5 hdf5/1.8.18-MPI cp $EXAMPLE . mpicc -lhdf5 ph5example.c -o ph5example </code> If needed add e.g. include directory explicitly: <code> mpiicc -I$VSC_HDF5_INCLUDE -lhdf5 ph5example.c -o ph5example </code> ---- pandoc/introduction-to-vsc/04_module_environment/02_compiling.txt Last modified: 2017/10/09 14:07by pandoc