<div dir="ltr">PETSc seems to be skipping the compiler that it should use:<div><br></div><div>-- Check for working CXX compiler: /opt/FJSVxtclanga/tcsds-1.2.31/bin/mpiFCC - skipped<br></div><div><br></div><div>I see -fopenmp was added. This might be wrong. I use -Kopenmp.</div><div><br></div><div>--help says:</div><div><br></div><div>       -fopenmp<br><br>       The -fopenmp option specifies to enable Specification of OpenMP Appli-<br>       cation Program Interface.<br><br>       When the -fopenmp option is specified, -mt is set.<br><br>       The -fopenmp option is needed if an object program compiled with the<br>       -fopenmp option exists in the command line as input files.<br><br>Any ideas?<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 14, 2021 at 5:17 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The following is working for me  on the compute node [its completed kokkos (core) build - and is now building kokkos-kernels<br>
<br>
 ~/petsc.save/arch-arm/lib/petsc/conf/reconfigure-arch-arm.py --download-p4est --download-zlib --download-kokkos --download-kokkos-kernels --download-kokkos-commit=origin/develop --download-cmake=<a href="https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1.tar.gz" rel="noreferrer" target="_blank">https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1.tar.gz</a><br>
<br>
-DKokkos_ENABLE_OPENMP=ON give me some issue - so I didn't try any of the additional options..<br>
<br>
Satish<br>
<br>
On Wed, 14 Apr 2021, Mark Adams wrote:<br>
<br>
> Satish, I get this error.<br>
> <br>
> I wonder if this syntax is wrong:<br>
> <br>
>     '--download-kokkos-cmake-arguments=-DCMAKE_BUILD_TYPE=Release<br>
> -DBUILD_TESTING=OFF -DKokkos_ENABLE_LIBDL=OFF -DKokkos_ENABLE_OPENMP=ON<br>
> -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_AGGRESSIVE_VECTORIZATION=ON',<br>
> <br>
> <br>
> =============================================================================================<br>
>                               Configuring KOKKOS with cmake; this may take<br>
> several minutes<br>
> <br>
> =============================================================================================<br>
> <br>
> Executing: /usr/bin/cmake ..<br>
> -DCMAKE_INSTALL_PREFIX=/home/ra010009/a04199/petsc/arch-arm<br>
> -DCMAKE_INSTALL_NAME_DIR:STRING="/home/ra010009/a04199/petsc/arch-arm/lib"<br>
> -DCMAKE_INSTALL_LIBDIR:STRING="lib" -DCMAKE_VERBOSE_MAKEFILE=1<br>
> -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="mpifcc"<br>
> -DMPI_C_COMPILER="mpifcc" -DCMAKE_AR=/usr/bin/ar<br>
> -DCMAKE_RANLIB=/usr/bin/ranlib -DCMAKE_C_FLAGS:STRING="-fPIC -Kfast,openmp<br>
> -fopenmp" -DCMAKE_C_FLAGS_DEBUG:STRING="-fPIC -Kfast,openmp -fopenmp"<br>
> -DCMAKE_C_FLAGS_RELEASE:STRING="-fPIC -Kfast,openmp -fopenmp"<br>
> -DCMAKE_CXX_COMPILER="mpiFCC" -DMPI_CXX_COMPILER="mpiFCC"<br>
> -DCMAKE_CXX_FLAGS:STRING="-Kfast,openmp -fopenmp -fPIC -fopenmp"<br>
> -DCMAKE_CXX_FLAGS_DEBUG:STRING="-Kfast,openmp -fopenmp -fPIC -fopenmp"<br>
> -DCMAKE_CXX_FLAGS_RELEASE:STRING="-Kfast,openmp -fopenmp -fPIC -fopenmp"<br>
> -DCMAKE_Fortran_COMPILER="mpifrt" -DMPI_Fortran_COMPILER="mpifrt"<br>
> -DCMAKE_Fortran_FLAGS:STRING="-fPIC -O -fopenmp"<br>
> -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-fPIC -O -fopenmp"<br>
> -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-fPIC -O -fopenmp"<br>
> -DCMAKE_EXE_LINKER_FLAGS:STRING=" -fopenmp" -DBUILD_SHARED_LIBS:BOOL=ON<br>
> -DUSE_XSDK_DEFAULTS=YES -DXSDK_ENABLE_DEBUG=NO<br>
> -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON<br>
> -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DKokkos_ENABLE_MPI=ON<br>
> -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON<br>
> -DCMAKE_CXX_STANDARD="14" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF<br>
> -DKokkos_ENABLE_LIBDL=OFF -DKokkos_ENABLE_OPENMP=ON<br>
> -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_AGGRESSIVE_VECTORIZATION=ON<br>
> stdout:<br>
> -- Setting default Kokkos CXX standard to 14<br>
> -- The CXX compiler identification is Fujitsu<br>
> -- Check for working CXX compiler: /opt/FJSVxtclanga/tcsds-1.2.31/bin/mpiFCC<br>
> -- Check for working CXX compiler:<br>
> /opt/FJSVxtclanga/tcsds-1.2.31/bin/mpiFCC -- works<br>
> -- Detecting CXX compiler ABI info<br>
> -- Detecting CXX compiler ABI info - done<br>
> -- The project name is: Kokkos<br>
> -- Configuring incomplete, errors occurred!<br>
> See also<br>
> "/vol0004/ra010009/a04199/petsc/arch-arm/externalpackages/git.kokkos/petsc-build/CMakeFiles/CMakeOutput.log".<br>
>                     Error configuring KOKKOS with cmake Could not execute<br>
> "['/usr/bin/cmake ..<br>
> -DCMAKE_INSTALL_PREFIX=/home/ra010009/a04199/petsc/arch-arm<br>
> -DCMAKE_INSTALL_NAME_DIR:STRING="/home/ra010009/a04199/petsc/arch-arm/lib"<br>
> -DCMAKE_INSTALL_LIBDIR:STRING="lib" -DCMAKE_VERBOSE_MAKEFILE=1<br>
> -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="mpifcc"<br>
> -DMPI_C_COMPILER="mpifcc" -DCMAKE_AR=/usr/bin/ar<br>
> -DCMAKE_RANLIB=/usr/bin/ranlib -DCMAKE_C_FLAGS:STRING="-fPIC -Kfast,openmp<br>
> -fopenmp" -DCMAKE_C_FLAGS_DEBUG:STRING="-fPIC -Kfast,openmp -fopenmp"<br>
> -DCMAKE_C_FLAGS_RELEASE:STRING="-fPIC -Kfast,openmp -fopenmp"<br>
> -DCMAKE_CXX_COMPILER="mpiFCC" -DMPI_CXX_COMPILER="mpiFCC"<br>
> -DCMAKE_CXX_FLAGS:STRING="-Kfast,openmp -fopenmp -fPIC -fopenmp"<br>
> -DCMAKE_CXX_FLAGS_DEBUG:STRING="-Kfast,openmp -fopenmp -fPIC -fopenmp"<br>
> -DCMAKE_CXX_FLAGS_RELEASE:STRING="-Kfast,openmp -fopenmp -fPIC -fopenmp"<br>
> -DCMAKE_Fortran_COMPILER="mpifrt" -DMPI_Fortran_COMPILER="mpifrt"<br>
> -DCMAKE_Fortran_FLAGS:STRING="-fPIC -O -fopenmp"<br>
> -DCMAKE_Fortran_FLAGS_DEBUG:STRING="-fPIC -O -fopenmp"<br>
> -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-fPIC -O -fopenmp"<br>
> -DCMAKE_EXE_LINKER_FLAGS:STRING=" -fopenmp" -DBUILD_SHARED_LIBS:BOOL=ON<br>
> -DUSE_XSDK_DEFAULTS=YES -DXSDK_ENABLE_DEBUG=NO<br>
> -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON<br>
> -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DKokkos_ENABLE_MPI=ON<br>
> -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_OPENMP=ON<br>
> -DCMAKE_CXX_STANDARD="14" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF<br>
> -DKokkos_ENABLE_LIBDL=OFF -DKokkos_ENABLE_OPENMP=ON<br>
> -DKokkos_ENABLE_SERIAL=ON -DKokkos_ENABLE_AGGRESSIVE_VECTORIZATION=ON']":<br>
> -- Setting default Kokkos CXX standard to 14<br>
> -- The CXX compiler identification is Fujitsu<br>
> -- Check for working CXX compiler: /opt/FJSVxtclanga/tcsds-1.2.31/bin/mpiFCC<br>
> -- Check for working CXX compiler:<br>
> /opt/FJSVxtclanga/tcsds-1.2.31/bin/mpiFCC -- works<br>
> -- Detecting CXX compiler ABI info<br>
> -- Detecting CXX compiler ABI info - done<br>
> -- The project name is: Kokkos<br>
> -- Configuring incomplete, errors occurred!<br>
> See also<br>
> "/vol0004/ra010009/a04199/petsc/arch-arm/externalpackages/git.kokkos/petsc-build/CMakeFiles/CMakeOutput.log".CMake<br>
> Error at cmake/kokkos_compiler_id.cmake:129 (STRING):<br>
> <br>
> *  STRING sub-command REPLACE requires at least four arguments.*Call Stack<br>
> (most recent call first):<br>
>   cmake/kokkos_tribits.cmake:174 (INCLUDE)<br>
>   CMakeLists.txt:166 (KOKKOS_SETUP_BUILD_ENVIRONMENT)<br>
> <br>
> On Wed, Apr 14, 2021 at 3:34 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> <br>
> > Additional kokkos cmake arguments can be passed in via<br>
> > --download-kokkos-cmake-arguments=string option.<br>
> ><br>
> > Satish<br>
> ><br>
> > On Wed, 14 Apr 2021, Mark Adams wrote:<br>
> ><br>
> > > Satish,<br>
> > ><br>
> > > For the fujitsu compiler OMP is -Kopenmp.<br>
> > ><br>
> > > Sarat (cc'ed) tells me that he built Kokkos with:<br>
> > ><br>
> > > cmake -DCMAKE_BUILD_TYPE=Release \<br>
> > >     -DCMAKE_INSTALL_PREFIX=${KOKKOS_SRC_DIR}/install \<br>
> > >     -DBUILD_TESTING=OFF \<br>
> > >     -DKokkos_ENABLE_LIBDL=OFF \<br>
> > >     -DKokkos_ENABLE_OPENMP=ON \<br>
> > >     -DKokkos_ENABLE_SERIAL=ON \<br>
> > >     -DKokkos_ENABLE_AGGRESSIVE_VECTORIZATION=ON \<br>
> > >     ..<br>
> > ><br>
> > > How might I make this happen in PETSc?<br>
> > ><br>
> > > Thanks,<br>
> > > Mark<br>
> > ><br>
> > ><br>
> > > On Wed, Apr 14, 2021 at 2:44 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> > ><br>
> > > > On Wed, 14 Apr 2021, Mark Adams wrote:<br>
> > > ><br>
> > > > > I have this building now.<br>
> > > > > Do you know anything about OpenMP?<br>
> > > > > I can add --with-openmp<br>
> > > > > That should get Kokkos to be made with OpenMP.<br>
> > > > > Should PETSc deal with the compilers correctly?<br>
> > > ><br>
> > > > Well it tries the following compiler options for openmp.<br>
> > > ><br>
> > > >     oflags = ["-fopenmp", # Gnu<br>
> > > >               "-qsmp=omp",# IBM XL C/C++<br>
> > > >               "-h omp",   # Cray. Must come after XL because XL<br>
> > interprets<br>
> > > > this option as meaning "-soname omp"<br>
> > > >               "-mp",      # Portland Group<br>
> > > >               "-Qopenmp", # Intel windows<br>
> > > >               "-openmp",  # Intel<br>
> > > >               "-xopenmp", # Sun<br>
> > > >               "+Oopenmp", # HP<br>
> > > >               "/openmp"   # Microsoft Visual Studio<br>
> > > >               ]<br>
> > > ><br>
> > > > I don't know what the flag for fugaku compiler is.<br>
> > > ><br>
> > > > Satish<br>
> > > ><br>
> > > ><br>
> > > > > Thanks,<br>
> > > > > Mark<br>
> > > > ><br>
> > > > > On Wed, Apr 14, 2021 at 1:45 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
> > > > ><br>
> > > > > > Thanks,<br>
> > > > > > If you feel inspired you could try Kokkos :||<br>
> > > > > > I am in a parking lot waiting for my daughter but can try this<br>
> > when I<br>
> > > > get<br>
> > > > > > home,<br>
> > > > > > Thanks again,<br>
> > > > > > Mark<br>
> > > > > ><br>
> > > > > > On Wed, Apr 14, 2021 at 1:33 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>><br>
> > > > wrote:<br>
> > > > > ><br>
> > > > > >> I think I allocated a single node - and did the build on it.<br>
> > > > > >><br>
> > > > > >> Now I'm getting an error - don't know what changed..<br>
> > > > > >><br>
> > > > > >> login6$ pjsub --interact -L "node=1" -L "rscunit=rscunit_ft01" -L<br>
> > > > > >> "rscgrp=eap-int" -L "elapse=1:00:00" --sparam "wait-time=600"<br>
> > > > > >> [ERR.] PJM 0059 pjsub rscgrp=eap-int is disabled.<br>
> > > > > >><br>
> > > > > >> Ok - the following worked..<br>
> > > > > >><br>
> > > > > >> login6$ pjsub --interact -L "node=1" -L "rscunit=rscunit_ft01" -L<br>
> > > > > >> "elapse=1:00:00" --sparam "wait-time=600"<br>
> > > > > >> [INFO] PJM 0000 pjsub Job 6301572 submitted.<br>
> > > > > >> [INFO] PJM 0081 .connected.<br>
> > > > > >> [INFO] PJM 0082 pjsub Interactive job 6301572 started.<br>
> > > > > >> [a04201@j31-3110s petsc]$<br>
> > > > > >><br>
> > > > > >> Ok - trying this build now.<br>
> > > > > >><br>
> > > > > >> [a04201@j31-3110s petsc]$ cat<br>
> > > > > >> ~/petsc.save/arch-arm/lib/petsc/conf/reconfigure-arch-arm.py<br>
> > > > > >> #!/usr/bin/python3<br>
> > > > > >> if __name__ == '__main__':<br>
> > > > > >>   import sys<br>
> > > > > >>   import os<br>
> > > > > >>   sys.path.insert(0, os.path.abspath('config'))<br>
> > > > > >>   import configure<br>
> > > > > >>   configure_options = [<br>
> > > > > >>     '--with-blaslapack-lib=-lfjlapack',<br>
> > > > > >>     '--with-debugging=0',<br>
> > > > > >>     'CC=mpifcc',<br>
> > > > > >>     'CXX=mpiFCC',<br>
> > > > > >>     'FC=mpifrt',<br>
> > > > > >>     'PETSC_ARCH=arch-arm',<br>
> > > > > >>   ]<br>
> > > > > >>   configure.petsc_configure(configure_options)<br>
> > > > > >> [a04201@j31-3110s petsc]$<br>
> > > > > >> ~/petsc.save/arch-arm/lib/petsc/conf/reconfigure-arch-arm.py<br>
> > > > > >> --download-p4est --download-zlib<br>
> > > > > >> <snip><br>
> > > > > >> p4est:<br>
> > > > > >>   Includes: -I/vol0004/ra010009/a04201/petsc/arch-arm/include<br>
> > > > > >>   Library:  -Wl,-rpath,/vol0004/ra010009/a04201/petsc/arch-arm/lib<br>
> > > > > >> -L/vol0004/ra010009/a04201/petsc/arch-arm/lib -lp4est -lsc<br>
> > > > > >><br>
> > > > > >> Ok - this worked for me.<br>
> > > > > >><br>
> > > > > >> Satish<br>
> > > > > >><br>
> > > > > >> On Wed, 14 Apr 2021, Mark Adams wrote:<br>
> > > > > >><br>
> > > > > >> > Do you recall what nodes you use to build on a "compute" node,<br>
> > to<br>
> > > > avoid<br>
> > > > > >> > cross compilation?<br>
> > > > > >> ><br>
> > > > > >> > On Wed, Apr 14, 2021 at 12:08 PM Satish Balay <<br>
> > <a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>><br>
> > > > > >> wrote:<br>
> > > > > >> ><br>
> > > > > >> > > looks like p4est cannot be cross-compiled.<br>
> > > > > >> > ><br>
> > > > > >> > > Satish<br>
> > > > > >> > ><br>
> > > > > >> > > On Wed, 14 Apr 2021, Mark Adams wrote:<br>
> > > > > >> > ><br>
> > > > > >> > > > I get this error with p4est on Fugaku.<br>
> > > > > >> > > > It is a Fortran error. Odd.<br>
> > > > > >> > > > Mark<br>
> > > > > >> > > ><br>
> > > > > >> > ><br>
> > > > > >> > ><br>
> > > > > >> ><br>
> > > > > >><br>
> > > > > >><br>
> > > > ><br>
> > > ><br>
> > > ><br>
> > ><br>
> ><br>
> ><br>
> <br>
<br>
</blockquote></div>