{"id":832,"date":"2019-06-20T14:41:41","date_gmt":"2019-06-20T13:41:41","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/htccondor\/?page_id=832"},"modified":"2025-02-21T11:59:51","modified_gmt":"2025-02-21T11:59:51","slug":"intel-c-compilers","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/intel-c-compilers\/","title":{"rendered":"Intel C++ Compilers"},"content":{"rendered":"<div class=\"entrytext\">\n<h2><span id=\"Overview\">Overview<\/span><\/h2>\n<p>The Intel Compilers are highly optimizing Fortran, C and C++ compilers that are suitable for both Intel and AMD processors. They include features such as OpenMP and auto vectorisation which allow programmers to easily take advantage of modern, multi-core processors.  The compilers are supplied with the Intel Math Kernel Libraries which are highly optimized versions of the BLAS and LAPACK linear algebra libraries.<\/p>\n<h2>Restrictions on use\/License information<\/h2>\n<p>\nThe University has a license for the Intel compiler suite. The Intel compilers are available to any student or member of staff of the University of Manchester for the purpose of the normal business of the University. Such use includes research, personal development and administration and management of the university. The software may not be used for research, consultancy or services leading to commercial exploitation of the software.\n<\/p>\n<h2><span id=\"Versions_installed\">Versions installed<\/span><\/h2>\n<table align=\"center\" border=\"1\">\n<tbody>\n<tr>\n<th align=\"center\">Intel compiler version<\/th>\n<th align=\"center\">HTCondor ClassAd<\/th>\n<\/tr>\n<tr>\n<td align=\"center\">11.1<\/td>\n<td align=\"center\">HAS_INTEL_11_1<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">15.0.3<\/td>\n<td align=\"center\">HAS_INTEL_15_0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"Set_up_procedure_on_submit_node\">Set up procedure on submit node<\/span><\/h2>\n<p>You will need to load the module file for the version of the Intel compilers you wish to use whenever you want to compile code or run executables you&#8217;ve compiled.  To load the module file:<\/p>\n<pre>\r\nmodule load intel_compilers\/11.1.075\r\n\r\nor\r\n\r\nmodule load intel_compilers\/15.0.3\r\n<\/pre>\n<h2><span id=\"Running_the_application\">Running the application<\/span><\/h2>\n<p>Running programs compiled using the Intel compiler suite is simply a matter of submitting the job file with a suitable submit file.<\/p>\n<pre>\r\nUniverse = vanilla\r\n\r\nRequirements = (Target.Opsys == \"LINUX\" &amp;&amp; Target.Arch == \"X86_64\" &amp;&amp; &lt;HTCondor ClassAd&gt;=?=True)\r\nRequest_Memory = 1000\r\n\r\nLog = intel.log\r\nOutput = intel.out\r\nError = intel.error\r\nNotification = Error\r\n\r\nShould_Transfer_Files = Yes\r\nWhen_To_Transfer_Output = On_Exit\r\n\r\nExecutable = &lt;intel_executable&gt;\r\nTransfer_Executable = True\r\nTransfer_Input_Files = &lt;optional input files&gt;\r\n\r\nQueue\r\n<\/pre>\n<p>If your submit file is called <tt>submit.txt<\/tt> then your job can be submitted to HTCondor using the command <tt>condor_submit submit.txt<\/tt>.<\/p>\n<h2><span id=\"AVX vectorisation\">AVX vectorisation<\/span><\/h2>\n<p>\nA significant number of the compute nodes in Condor use either the Intel <em>Sandybridge<\/em> or the Intel <em>Ivybridge<\/em> architecture, both of which support the AVX instruction set.  This allows your code to make use of the 256-bit wide floating-point vector instructions supported by the Intel hardware.<\/p>\n<p>The <em>Haswell<\/em> and <em>Broadwell<\/em> nodes support the AVX2 vector instructions.  These promote the 128-bit wide integer vector instructions found in AVX hardware to 256-bit wide integer instructions.\n<\/p>\n<h2><span id=\"Compiling with AVX\">Compiling your code to take advantage of AVX vectorisation<\/span><\/h2>\n<p>If your code is Fortran, C or C++, you can ask the Intel Compilers to attempt to take advantage of AVX (or AVX2\/AVX512) using the following compiler flags:<\/p>\n<pre>\r\n-msse4.2 -axCORE-AVX2,AVX\r\n<\/pre>\n<p>The -ax flag instructs the compiler to generate multiple, processor-specific auto-dispatch code paths if there is a benefit to doing so.  The code will be compiled in to a single executable.<\/p>\n<p>\nThe Condor pool is made up of many different machines and not all of them support AVX vectorisation.  Those that do contain the Condor class-ad HAS_AVX so, if you want to only target AVX capable machines, add this to the list of requirements in your condor-submit script.\n<\/p>\n<h2>Sample Intel compiler suite HTCondor jobs<\/h2>\n<ol>\n<li><a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/GCC_hello_world\/\">C++ code for printing &#8220;Hello World&#8221;, the current working directory and the GNU compiler version<\/a>.<\/li>\n<li>C, C++ and Fortran codes for calculating Pi using <em>n<\/em> terms of the Gregory series.<\/li>\n<\/ol>\n<p><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview The Intel Compilers are highly optimizing Fortran, C and C++ compilers that are suitable for both Intel and AMD processors. They include features such as OpenMP and auto vectorisation which allow programmers to easily take advantage of modern, multi-core processors. The compilers are supplied with the Intel Math Kernel Libraries which are highly optimized versions of the BLAS and LAPACK linear algebra libraries. Restrictions on use\/License information The University has a license for the.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/software\/intel-c-compilers\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"parent":17,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-832","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/comments?post=832"}],"version-history":[{"count":7,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/832\/revisions"}],"predecessor-version":[{"id":1230,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/832\/revisions\/1230"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/pages\/17"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/htccondor\/wp-json\/wp\/v2\/media?parent=832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}