[flang-dev] Can not build SPEC CPU 2017 fpspeed with -fopenmp

Kiran Chandramohan via flang-dev flang-dev at lists.llvm.org
Sun Nov 1 14:06:38 PST 2020


Hello Chan Edison,

Semantic checks for OpenMP constructs are in progress. I believe checks and creation of symbols for reduction-based clauses will be happening soon.

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 (https://github.com/flang-compiler/flang) and not llvm/flang.

Thanks,
Kiran
________________________________
From: flang-dev <flang-dev-bounces at lists.llvm.org> on behalf of Chan Edison via flang-dev <flang-dev at lists.llvm.org>
Sent: 01 November 2020 03:36
To: flang-dev at lists.llvm.org <flang-dev at lists.llvm.org>
Subject: [flang-dev] Can not build SPEC CPU 2017 fpspeed with -fopenmp


The tuning part of my CFP2017 speed config:



intspeed,fpspeed:

    EXTRA_OPTIMIZE = -fopenmp -DSPEC_OPENMP

fpspeed:

    preENV_OMP_STACKSIZE = 128M



###############################################################################

#--------  Baseline Tuning Flags ----------------------------------------------

###############################################################################

default=base:               # flags for all base

       OPTIMIZE                = -Ofast -march=znver2 -fno-finite-math-only



    LIBS        = -L/home/edison/Downloads/llvm-project/build/lib/ -lFortranSemantics -lFortranRuntime -lFortranCommon \

                  -lFortranDecimal  -lFortranEvaluate  -lFortranEvaluateTesting  -lFortranParser -L/home/edison/Downloads/llvm-project/build/lib/ -lomp -lopenmp



The error output:

/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 fill1.F -o fill1.fppized.f

/home/edison/cpu2017/bin/specperl /home/edison/cpu2017/bin/harness/specpp -DSPEC -DNDEBUG -DSPEC_OPENMP -DSPEC_LP64 fill2.F -o fill2.fppized.f

/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

/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

/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

/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

/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

/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

shell_lam.fppized.f:192:29: error: Internal: no symbol found for 'max'

  !$OMP+            REDUCTION(MAX:t8)

                              ^^^

/home/edison/llvm/bin/f18: semantic errors in shell_lam.fppized.f

specmake: *** [/home/edison/cpu2017/benchspec/Makefile.defaults:391: shell_lam.fppized.o] Error 1

specmake: *** Waiting for unfinished jobs....

/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o fill1.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp fill1.fppized.f

/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

/home/edison/llvm/bin/f18               -std=f2008ts    -m64 -c -o fill2.fppized.o -Ofast -march=znver2 -fno-finite-math-only -fopenmp fill2.fppized.f

/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

/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

/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



My LLVM(flang/F18) is git from the master branch(git clone https://github.com/llvm/llvm-project.git) and make with this cmake config:

cmake -G "Unix Makefiles" \

-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \

-DLLVM_CONFIG=$INSTALL_PREFIX/bin/llvm-config \

-DCMAKE_BUILD_TYPE=Release \

-DLLVM_TARGETS_TO_BUILD=X86 \

-DFLANG_INCLUDE_TESTS=On \

-DLLVM_ENABLE_PROJECTS="clang;clang++;lld;flang;flang-driver;libcxx;libcxxabi;openmp" \

-DBUILD_FLANG_NEW_DRIVER=ON \

-LIBOMP_FORTRAN_MODULES=ON \

-DCMAKE_C_COMPILER=gcc \

-DCMAKE_CXX_COMPILER=g++ \

../llvm



If whitout -fopenmp, the 603.bwaves_s can be build and run successful but whit only one thread.



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.

I know there is some other error with this config, but I hope fix the OMP part first.

My OS: Ubuntu 20.10 x86_64, CPU AMD Ryzen 7 X3800.





发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-dev/attachments/20201101/7489bdc2/attachment-0001.html>


More information about the flang-dev mailing list