{"id":314,"date":"2013-04-26T09:13:44","date_gmt":"2013-04-26T09:13:44","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=314"},"modified":"2017-10-13T14:26:44","modified_gmt":"2017-10-13T14:26:44","slug":"fll6i23dc","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/naglibraries\/fll6i23dc\/","title":{"rendered":"Mark 23 Fortran using Intel Compiler (FLL6I23DC)"},"content":{"rendered":"<p>This is the serial (single core) version of the NAG Fortran library.  Run the following module commands to load the environment for the Intel Compiler and the relevant NAG library<\/p>\n<pre>\r\nmodule load compilers\/intel\/fortran\/12.0.5\r\nmodule load libs\/intel\/nag\/fortran_mark23_intel\r\n<\/pre>\n<p>This will set the following environment variable for easy access to the libraries, header files and example scripts:<\/p>\n<pre>\r\nNAG_HOME_FLL6I23DC=\/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\r\n<\/pre>\n<h2>Compiling the example programs<\/h2>\n<p>The NAG library ships with example programs for every routine available.  The directory<\/p>\n<pre>\r\n$NAG_HOME_FLL6I23DC\/scripts\/\r\n<\/pre>\n<p>contains four scripts:<\/p>\n<pre>\r\nnag_example_mkl\r\nnag_example_shar_mkl\r\nnag_example\r\nnag_example_shar\r\n<\/pre>\n<p>which provide easy to use interfaces to compile, link and run each of these examples. This <em>scripts<\/em> directory is added to your PATH environment variable for convenience. The differences between these scripts are shown below:<\/p>\n<ul>\n<li><strong>nag_example_mkl<\/strong>, to link with the NAG static library libnag_mkl.a and the supplied MKL libraries<\/li>\n<li><strong>nag_example_shar_mkl<\/strong>, to link with the NAG shareable library libnag_mkl.so and the supplied MKL libraries<\/li>\n<li><strong>nag_example<\/strong>, to link with the NAG self-contained static library libnag_nag.a<\/li>\n<li><strong>nag_example_shar<\/strong>, to link with the NAG self-contained shareable library libnag_nag.so<\/li>\n<\/ul>\n<p>These can be used to inform you how to compile the NAG library according to your needs.  For example, to compile,link and run the example for the routine c02aff using the NAG static library libnag_mkl.a and the NAG-supplied MKL libraries you would run<\/p>\n<pre>\r\nnag_example_mkl c02aff\r\n<\/pre>\n<p>The output from this script is<\/p>\n<pre>\r\nCopying c02affe.f90 to current directory\r\ncp \/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/examples\/source\/c02affe.f90 .\r\n\r\nexport LD_LIBRARY_PATH=\/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/mkl_intel64:\/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/lib:\/opt\/gridware\/compilers\/intel\/2011.5.220\/composerxe-2011.5.220\/compiler\/lib\/intel64\r\n\r\nCompiling and linking c02affe.f90 to produce executable c02affe.exe\r\nifort -I\/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/nag_interface_blocks c02affe.f90 \\\r\n    \/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/lib\/libnag_mkl.a -Wl,--start-group \\\r\n    \/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/mkl_intel64\/libmkl_core.a \\\r\n    \/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/mkl_intel64\/libmkl_intel_lp64.a \\\r\n    \/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/mkl_intel64\/libmkl_intel_thread.a \\\r\n    -Wl,--end-group -liomp5 -lpthread -o  c02affe.exe\r\n\r\nCopying c02affe.d to current directory\r\ncp \/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl\/examples\/data\/c02affe.d .\r\n\r\nRunning c02affe.exe with data from c02affe.d\r\n.\/c02affe.exe < c02affe.d > c02affe.r\r\n\r\n<\/pre>\n<p>Among other things, the above shows you the form of the ifort command that NAG recommend for this usage case.  The output from running the example will be contained in the file c02affe.r<\/p>\n<h2>Submitting an example job<\/h2>\n<p>To run the c02affe.exe example compiled above on the CSF, you could use the following SGE submission script<\/p>\n<pre>\r\n#$ -S \/bin\/bash\r\n#$ -N NAGExample\r\n#$ -cwd\r\n#$ -o outputfile.log\r\n#$ -j y\r\n#$ -V\r\n\r\n.\/c02affe.exe < c02affe.d > c02affe.r\r\n<\/pre>\n<h2>Links<\/h2>\n<ul>\n<li><a href=\"http:\/\/www.nag.co.uk\/doc\/inun\/fl23\/l6idc\/un.html\">NAG&#8217;s online documentation for this implementation of the library<\/a> (FLL6I23DC)<\/li>\n<li><a href=\"http:\/\/www.nag.co.uk\/numeric\/FL\/nagdoc_fl23\/html\/FRONTMATTER\/manconts.html\">Contents page for all routines available in the library<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This is the serial (single core) version of the NAG Fortran library. Run the following module commands to load the environment for the Intel Compiler and the relevant NAG library module load compilers\/intel\/fortran\/12.0.5 module load libs\/intel\/nag\/fortran_mark23_intel This will set the following environment variable for easy access to the libraries, header files and example scripts: NAG_HOME_FLL6I23DC=\/opt\/gridware\/libs\/intel\/nag\/fll6i23dcl Compiling the example programs The NAG library ships with example programs for every routine available. The directory $NAG_HOME_FLL6I23DC\/scripts\/ contains four.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/naglibraries\/fll6i23dc\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":293,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-314","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=314"}],"version-history":[{"count":9,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/314\/revisions"}],"predecessor-version":[{"id":4312,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/314\/revisions\/4312"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/293"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}