<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Chan Edison,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Semantic checks for OpenMP constructs are in progress. I believe checks and creation of symbols for reduction-based clauses will be happening soon.<br>
<br>
In case you are not aware, the llvm/flang project currently has only the parser and semantic checks enabled. For codegen, it uses an external compiler. By default, the external compiler is gfortran. But you can also set it to other compilers like AOCC using
 an environment variable (F18_FC). AOCC is based on the Classic Flang project (<a href="https://github.com/flang-compiler/flang" id="LPlnk">https://github.com/flang-compiler/flang</a>) and not llvm/flang.<br>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<br>
Thanks,<br>
Kiran</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> flang-dev <flang-dev-bounces@lists.llvm.org> on behalf of Chan Edison via flang-dev <flang-dev@lists.llvm.org><br>
<b>Sent:</b> 01 November 2020 03:36<br>
<b>To:</b> flang-dev@lists.llvm.org <flang-dev@lists.llvm.org><br>
<b>Subject:</b> [flang-dev] Can not build SPEC CPU 2017 fpspeed with -fopenmp</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:SimSun}
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:DengXian}
@font-face
        {font-family:DengXian}
@font-face
        {font-family:SimSun}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:DengXian}
a:link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
.x_MsoChpDefault
        {}
@page WordSection1
        {margin:72.0pt 90.0pt 72.0pt 90.0pt}
div.x_WordSection1
        {}
-->
</style>
<div lang="ZH-CN" link="blue" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span lang="EN-US">The tuning part of my CFP2017 speed config:</span></p>
<p class="x_MsoNormal"><span lang="EN-US"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US">intspeed,fpspeed:</span></p>
<p class="x_MsoNormal"><span lang="EN-US">    EXTRA_OPTIMIZE = -fopenmp -DSPEC_OPENMP</span></p>
<p class="x_MsoNormal"><span lang="EN-US">fpspeed:</span></p>
<p class="x_MsoNormal"><span lang="EN-US">    preENV_OMP_STACKSIZE = 128M</span></p>
<p class="x_MsoNormal"><span lang="EN-US"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US">###############################################################################</span></p>
<p class="x_MsoNormal"><span lang="EN-US">#--------  Baseline Tuning Flags ----------------------------------------------</span></p>
<p class="x_MsoNormal"><span lang="EN-US">###############################################################################</span></p>
<p class="x_MsoNormal"><span lang="EN-US">default=base:               # flags for all base</span></p>
<p class="x_MsoNormal"><span lang="EN-US">       OPTIMIZE                = -Ofast -march=znver2 -fno-finite-math-only</span></p>
<p class="x_MsoNormal"><span lang="EN-US"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US">    LIBS        = -L/home/edison/Downloads/llvm-project/build/lib/ -lFortranSemantics -lFortranRuntime -lFortranCommon \</span></p>
<p class="x_MsoNormal"><span lang="EN-US">                  -lFortranDecimal  -lFortranEvaluate  -lFortranEvaluateTesting  -lFortranParser -L/home/edison/Downloads/llvm-project/build/lib/ -lomp -lopenmp</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt; color:red">The error output</span><span lang="EN-US" style="font-size:12.0pt">:</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 fill1.F -o fill1.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 fill2.F -o fill2.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 jacobian_lam.F -o jacobian_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 flow_lam.F -o flow_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 flux_lam.F -o flux_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 block_solver.F -o block_solver.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 shell_lam.F -o shell_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o shell_lam.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp shell_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">shell_lam.fppized.f:192:29: error: Internal: no symbol found for 'max'</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">  !$OMP+            REDUCTION(MAX:t8)</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">                              ^^^</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18: semantic errors in shell_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">specmake: *** [/home/edison/cpu2017/benchspec/Makefile.defaults:391: shell_lam.fppized.o] Error 1</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">specmake: *** Waiting for unfinished jobs....</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o fill1.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp fill1.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o flow_lam.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp flow_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o fill2.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp fill2.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o jacobian_lam.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp jacobian_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o block_solver.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp block_solver.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o flux_lam.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp flux_lam.fppized.f</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">My LLVM(flang/F18) is git from the master branch(git clone
<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>) and make with this cmake config:</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">cmake -G "Unix Makefiles" \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DLLVM_CONFIG=$INSTALL_PREFIX/bin/llvm-config \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DCMAKE_BUILD_TYPE=Release \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DLLVM_TARGETS_TO_BUILD=X86 \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DFLANG_INCLUDE_TESTS=On \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DLLVM_ENABLE_PROJECTS="clang;clang++;lld;flang;flang-driver;libcxx;libcxxabi;openmp" \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DBUILD_FLANG_NEW_DRIVER=ON \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-LIBOMP_FORTRAN_MODULES=ON \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DCMAKE_C_COMPILER=gcc \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">-DCMAKE_CXX_COMPILER=g++ \</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">../llvm</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">If whitout -fopenmp, the 603.bwaves_s can be build and run successful but whit only one thread.</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">I have ran successful CPU2017 with AOCC 2.2 which is based on LLVM 10, but now I want to try it on the last LLVM.</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">I know there is some other error with this config, but I hope fix the OMP part first.</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt">My OS: Ubuntu 20.10 x86_64, CPU AMD Ryzen 7 X3800.</span></p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt"> </span></p>
<p class="x_MsoNormal"><span lang="EN-US"> </span></p>
<p class="x_MsoNormal">发送自<span lang="EN-US"> Windows 10 </span>版<span lang="EN-US"><a href="https://go.microsoft.com/fwlink/?LinkId=550986"><span lang="EN-US"><span lang="EN-US">邮件</span></span></a></span>应用</p>
<p class="x_MsoNormal"><span lang="EN-US" style="font-size:12.0pt; font-family:SimSun"> </span></p>
</div>
</div>
</body>
</html>