<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re:mpiifort and preprocessing flags in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1563524#M11428</link>
    <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/78902"&gt;@Kevin_McGrattan&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;please try to use this&lt;/P&gt;&lt;P&gt;mpiifort -fc=ifx -o test_mpiifort "-fpp -DGITHASH_PP='Nov 7'" test_mpiifort.f90&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 17 Jan 2024 09:10:33 GMT</pubDate>
    <dc:creator>TobiasK</dc:creator>
    <dc:date>2024-01-17T09:10:33Z</dc:date>
    <item>
      <title>mpiifort and preprocessing flags</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1549612#M11204</link>
      <description>&lt;P&gt;I have a short Fortran/MPI test code on my Windows 10 computer that simply writes out a text string that includes a preprocessing variable string called GITHASH_PP:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;program test_mpiifort&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;use mpi_f08&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;implicit none&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;integer size, rank, namelen, ierr&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;character (len=MPI_MAX_PROCESSOR_NAME) :: name&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;type(mpi_status) :: stat&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;call MPI_INIT (ierr)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;call MPI_COMM_SIZE (MPI_COMM_WORLD, size, ierr)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;call MPI_COMM_RANK (MPI_COMM_WORLD, rank, ierr)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;call MPI_GET_PROCESSOR_NAME (name, namelen, ierr)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;write(0,'(A,I0,A)') 'Rank ',rank,' writes the string:'//TRIM(GITHASH_PP)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;call MPI_FINALIZE (ierr)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;end&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="intelc"&gt;I compile at the Intel 64 command prompt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;C:\Users\mcgratta\Documents\firemodels_forked\fds\Utilities\test_mpi&amp;gt;mpiifort -fc=ifx -o test_mpiifort -fpp -DGITHASH_PP&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;="'Nov7'" test_mpiifort.f90&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;mpifc.bat for the Intel(R) MPI Library 2021.11 for Windows*&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Copyright Intel Corporation.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.0 Build 20231017&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Copyright (C) 1985-2023 Intel Corporation. All rights reserved.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Microsoft (R) Incremental Linker Version 14.22.27905.0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;-out:test_mpiifort.exe&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-subsystem:console&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"/LIBPATH:C:\Program Files (x86)\Intel\oneAPI\mpi\latest\env\\..\lib"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"/LIBPATH:C:\Program Files (x86)\Intel\oneAPI\mpi\latest\env\\..\lib"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;impi.lib&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;test_mpiifort.obj&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then run the job:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;C:\Users\mcgratta\Documents\firemodels_forked\fds\Utilities\test_mpi&amp;gt;mpiexec -n 4 test_mpiifort&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Rank 0 writes the string: Nov7&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Rank 3 writes the string: Nov7&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Rank 2 writes the string: Nov7&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Rank 1 writes the string: Nov7&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="intelc"&gt;Everything works. However, if I add a space to the text string 'Nov 7', the compilation fails:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;C:\Users\mcgratta\Documents\firemodels_forked\fds\Utilities\test_mpi&amp;gt;mpiifort -fc=ifx -o test_mpiifort -fpp -DGITHASH_PP&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;="'Nov 7'" test_mpiifort.f90&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;mpifc.bat for the Intel(R) MPI Library 2021.11 for Windows*&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Copyright Intel Corporation.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.0.0 Build 20231017&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Copyright (C) 1985-2023 Intel Corporation. All rights reserved.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;C:\Users\mcgratta\AppData\Local\Temp\5\1132435.i90: catastrophic error: Internal Compiler Error: No filename given on th&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;e command-line&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;compilation aborted for test_mpiifort.f90 (code 1)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ERROR in the compiling/linking [1]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried every possible combination of single quotes, double quotes, escape characters like backslashes, but nothing works. These do work with ifort, and I know that mpiifort is just a script. But how do we pass PP directives with mpiifort?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 14:55:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1549612#M11204</guid>
      <dc:creator>Kevin_McGrattan</dc:creator>
      <dc:date>2023-12-01T14:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: mpiifort and preprocessing flags</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1549654#M11205</link>
      <description>&lt;P&gt;Moving this over to the HPC Toolkit Forum. The folks there know about MPI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 16:37:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1549654#M11205</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-12-01T16:37:47Z</dc:date>
    </item>
    <item>
      <title>Re:mpiifort and preprocessing flags</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1561863#M11399</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/78902"&gt;@Kevin_McGrattan&lt;/a&gt;&lt;/P&gt;&lt;P&gt;thanks for reporting this, it seems to be a shortcoming  of the mpiifort script.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:39:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1561863#M11399</guid>
      <dc:creator>TobiasK</dc:creator>
      <dc:date>2024-01-11T13:39:04Z</dc:date>
    </item>
    <item>
      <title>Re:mpiifort and preprocessing flags</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1563524#M11428</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/78902"&gt;@Kevin_McGrattan&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;please try to use this&lt;/P&gt;&lt;P&gt;mpiifort -fc=ifx -o test_mpiifort "-fpp -DGITHASH_PP='Nov 7'" test_mpiifort.f90&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Jan 2024 09:10:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/mpiifort-and-preprocessing-flags/m-p/1563524#M11428</guid>
      <dc:creator>TobiasK</dc:creator>
      <dc:date>2024-01-17T09:10:33Z</dc:date>
    </item>
  </channel>
</rss>

